Download theme
1
wp-content/themes/hello-elementor/assets/css/custom.css
Normal file
3233
wp-content/themes/hello-elementor/assets/css/custom.scss
Normal file
@@ -0,0 +1 @@
|
||||
#accordion-section-hello-options .accordion-section-title,#accordion-section-hello-options .accordion-section-title:after{color:#c36}#customize-control-hello-header-footer .hello-action-links{margin:15px auto;text-align:center}#customize-control-hello-header-footer .hello-action-links-title{font-weight:600;margin:10px 0}#customize-control-hello-header-footer .hello-action-links-message{margin:0 0 20px}#accordion-section-hello-upsell-elementor-pro{background-color:#fff;box-shadow:-2px 8px 20px 0 rgba(0,0,0,.2);display:flex!important;flex-direction:column;gap:8px;margin:20px 20px 30px;padding:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-title:after{display:none}#accordion-section-hello-upsell-elementor-pro h3,#accordion-section-hello-upsell-elementor-pro p{background-color:transparent!important;border:0!important;margin:0;padding:0;text-decoration:none}#accordion-section-hello-upsell-elementor-pro h3{font-weight:700}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons{display:flex;gap:8px;justify-content:flex-end;margin-block-start:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons a{background-color:#92003b;border-radius:4px;color:#fff;padding:8px 16px;text-decoration:none}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'aa90c0c82912bd3a64ea');
|
||||
@@ -0,0 +1 @@
|
||||
#accordion-section-hello-options .accordion-section-title,#accordion-section-hello-options .accordion-section-title:after{color:#c36}#customize-control-hello-header-footer .hello-action-links{margin:15px auto;text-align:center}#customize-control-hello-header-footer .hello-action-links-title{font-weight:600;margin:10px 0}#customize-control-hello-header-footer .hello-action-links-message{margin:0 0 20px}#accordion-section-hello-upsell-elementor-pro{background-color:#fff;box-shadow:2px 8px 20px 0 rgba(0,0,0,.2);display:flex!important;flex-direction:column;gap:8px;margin:20px 20px 30px;padding:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-title:after{display:none}#accordion-section-hello-upsell-elementor-pro h3,#accordion-section-hello-upsell-elementor-pro p{background-color:transparent!important;border:0!important;margin:0;padding:0;text-decoration:none}#accordion-section-hello-upsell-elementor-pro h3{font-weight:700}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons{display:flex;gap:8px;justify-content:flex-end;margin-block-start:16px}#accordion-section-hello-upsell-elementor-pro .accordion-section-buttons a{background-color:#92003b;border-radius:4px;color:#fff;padding:8px 16px;text-decoration:none}
|
||||
@@ -0,0 +1 @@
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title{margin-block-start:24px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message{margin-block-start:12px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin-block-start:24px}
|
||||
@@ -0,0 +1 @@
|
||||
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}p{margin-block-end:.75rem}img{border-style:none;height:auto;max-width:100%;vertical-align:middle}pre{font-family:monospace;font-size:1em;white-space:pre-wrap}code,kbd,pre,samp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem}blockquote{font-style:italic}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '377baf681f2138bc7e58');
|
||||
@@ -0,0 +1 @@
|
||||
body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}p{margin-block-end:.75rem}img{border-style:none;height:auto;max-width:100%;vertical-align:middle}pre{font-family:monospace;font-size:1em;white-space:pre-wrap}code,kbd,pre,samp{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem}blockquote{font-style:italic}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '29d3ef9742e2e1da326c');
|
||||
1
wp-content/themes/hello-elementor/assets/css/editor.css
Normal file
@@ -0,0 +1 @@
|
||||
.hello-elementor.elementor-nerd-box .elementor-nerd-box-title{margin-block-start:24px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-message{margin-block-start:12px}.hello-elementor.elementor-nerd-box .elementor-nerd-box-link{margin-block-start:24px}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '35eef2f211c36a776630');
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '02f39e3cb7d776085f4a');
|
||||
1
wp-content/themes/hello-elementor/assets/css/reset.css
Normal file
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'aad983901f10bf7e4e52');
|
||||
1
wp-content/themes/hello-elementor/assets/css/theme.css
Normal file
@@ -0,0 +1,3 @@
|
||||
<g id="BrandYoutube">
|
||||
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M4.95964 4.64459C3.76302 4.64459 2.79297 5.61464 2.79297 6.81126V10.8113C2.79297 12.0079 3.76302 12.9779 4.95964 12.9779H11.6263C12.8229 12.9779 13.793 12.0079 13.793 10.8113V6.81126C13.793 5.61464 12.8229 4.64459 11.6263 4.64459H4.95964ZM1.79297 6.81126C1.79297 5.06236 3.21073 3.64459 4.95964 3.64459H11.6263C13.3752 3.64459 14.793 5.06236 14.793 6.81126V10.8113C14.793 12.5602 13.3752 13.9779 11.6263 13.9779H4.95964C3.21073 13.9779 1.79297 12.5602 1.79297 10.8113V6.81126ZM6.71329 6.37616C6.87004 6.28741 7.06242 6.28983 7.21688 6.38251L10.5502 8.38251C10.7008 8.47287 10.793 8.63563 10.793 8.81126C10.793 8.98689 10.7008 9.14964 10.5502 9.24001L7.21688 11.24C7.06242 11.3327 6.87004 11.3351 6.71329 11.2464C6.55653 11.1576 6.45964 10.9914 6.45964 10.8113V6.81126C6.45964 6.63112 6.55653 6.46491 6.71329 6.37616ZM7.45964 7.69435V9.92816L9.32114 8.81126L7.45964 7.69435Z" fill="black" fill-opacity="0.54"/>
|
||||
</g>
|
||||
@@ -0,0 +1,9 @@
|
||||
<g id="ElementorLogo">
|
||||
<g id="Vector">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.29297 15.8113C4.42698 15.8113 1.29297 12.6773 1.29297 8.81128C1.29297 4.94529 4.42698 1.81128 8.29297 1.81128C12.159 1.81128 15.293 4.94529 15.293 8.81128C15.293 12.6773 12.159 15.8113 8.29297 15.8113ZM8.29297 2.81128C4.97926 2.81128 2.29297 5.49757 2.29297 8.81128C2.29297 12.125 4.97926 14.8113 8.29297 14.8113C11.6067 14.8113 14.293 12.125 14.293 8.81128C14.293 5.49757 11.6067 2.81128 8.29297 2.81128Z" fill="black" fill-opacity="0.54" />
|
||||
<path d="M5.95964 6.14461H6.95948V11.1448H5.95964V6.14461Z" fill="black" fill-opacity="0.54" />
|
||||
<path d="M7.95934 6.14461H10.9589V7.14445H7.95934V6.14461Z" fill="black" fill-opacity="0.54" />
|
||||
<path d="M7.95934 8.14432H10.9589V9.14416H7.95934V8.14432Z" fill="black" fill-opacity="0.54" />
|
||||
<path d="M7.95934 10.1449H10.9589V11.1448H7.95934V10.1449Z" fill="black" fill-opacity="0.54" />
|
||||
</g>
|
||||
</g>
|
||||
BIN
wp-content/themes/hello-elementor/assets/images/ai.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="23" height="24" fill="none" xmlns:v="https://vecta.io/nano"><path d="M11.5.45a11.26 11.26 0 0 0-5.796 1.564 11.64 11.64 0 0 0-4.14 4.14A11.26 11.26 0 0 0 0 11.95a11.26 11.26 0 0 0 1.564 5.796 11.64 11.64 0 0 0 4.14 4.14c1.779 1.043 3.711 1.564 5.796 1.564s4.017-.521 5.796-1.564a11.64 11.64 0 0 0 4.14-4.14C22.479 15.967 23 14.035 23 11.95s-.521-4.017-1.564-5.796a11.64 11.64 0 0 0-4.14-4.14A11.26 11.26 0 0 0 11.5.45zM8.625 16.734H6.716V7.166h1.909v9.568zm7.659 0h-5.75v-1.909h5.75v1.909zm0-3.818h-5.75v-1.932h5.75v1.932zm0-3.841h-5.75V7.166h5.75v1.909z" fill="black"/></svg>
|
||||
|
After Width: | Height: | Size: 624 B |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 31 KiB |
@@ -0,0 +1,12 @@
|
||||
<svg width="298" height="321" viewBox="0 0 298 321" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_38_2198)">
|
||||
<rect width="298" height="321" rx="8" fill="#FFE1F9"/>
|
||||
<path opacity="0.8" d="M51.1458 70.0189C51.2625 69.6831 51.7375 69.6831 51.8542 70.0189L65.8221 110.198C65.8602 110.308 65.947 110.394 66.0571 110.431L106.94 124.144C107.281 124.259 107.281 124.741 106.94 124.856L66.0571 138.569C65.947 138.606 65.8602 138.692 65.8221 138.802L51.8542 178.981C51.7375 179.317 51.2625 179.317 51.1458 178.981L37.1779 138.802C37.1398 138.692 37.053 138.606 36.9429 138.569L-3.94012 124.856C-4.2811 124.741 -4.2811 124.259 -3.94012 124.144L36.9429 110.431C37.053 110.394 37.1398 110.308 37.1779 110.198L51.1458 70.0189Z" fill="#FFC5F3"/>
|
||||
<path opacity="0.8" d="M219.538 217.877V152.719C219.538 150.732 217.12 149.753 215.738 151.181L13.6283 360.001C12.2704 361.404 13.2646 363.75 15.2171 363.75H381.42C382.641 363.75 383.631 362.76 383.631 361.539V98.8461C383.631 96.9507 381.403 95.9338 379.971 97.176L147.479 298.917L219.538 217.877Z" fill="#FFC5F3"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_38_2198">
|
||||
<rect width="298" height="321" rx="8" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="72" height="72" rx="8" fill="#FF7BE5"/>
|
||||
<path d="M22.6561 13.4253C22.7433 13.1728 23.1004 13.1728 23.1877 13.4253L25.8479 21.1216C25.8764 21.2039 25.9414 21.2684 26.0239 21.2963L33.8038 23.921C34.059 24.0071 34.059 24.3679 33.8038 24.454L26.0239 27.0787C25.9414 27.1066 25.8764 27.1711 25.8479 27.2534L23.1877 34.9497C23.1004 35.2022 22.7433 35.2022 22.6561 34.9497L19.9958 27.2534C19.9674 27.1711 19.9024 27.1066 19.8199 27.0787L12.0399 24.454C11.7848 24.3679 11.7848 24.0071 12.0399 23.921L19.8199 21.2963C19.9024 21.2684 19.9674 21.2039 19.9958 21.1216L22.6561 13.4253Z" fill="white"/>
|
||||
<path d="M38.7521 41.0697V32.7816C38.7521 32.5288 38.4446 32.4044 38.2688 32.586L12.5602 59.1482C12.3875 59.3266 12.514 59.625 12.7623 59.625H59.3438C59.4991 59.625 59.625 59.4991 59.625 59.3438V25.9289C59.625 25.6878 59.3415 25.5585 59.1594 25.7165L29.5861 51.3782L38.7521 41.0697Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1004 B |
|
After Width: | Height: | Size: 218 KiB |
BIN
wp-content/themes/hello-elementor/assets/images/send-logo.gif
Normal file
|
After Width: | Height: | Size: 561 KiB |
1
wp-content/themes/hello-elementor/assets/js/271.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[271],{1271:function(e,l,s){s.r(l);var d=s(1609),t=s(3072),h=s(790);const a=d.forwardRef(((e,l)=>(0,h.jsxs)(t.A,{viewBox:"0 0 24 24",...e,ref:l,children:[(0,h.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 21C6.47715 21 2 16.5228 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 16.5228 17.5228 21 12 21ZM12 3C7.58172 3 4 6.58172 4 11C4 15.4183 7.58172 19 12 19C16.4183 19 20 15.4183 20 11C20 6.58172 16.4183 3 12 3Z"}),(0,h.jsx)("path",{d:"M8.5 7H10V15H8.5V7Z"}),(0,h.jsx)("path",{d:"M11.5 7H16V9H11.5V7Z"}),(0,h.jsx)("path",{d:"M11.5 10H16V12H11.5V10Z"}),(0,h.jsx)("path",{d:"M11.5 13H16V15H11.5V13Z"})]})));l.default=a}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/299.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[299],{1299:function(e,L,C){C.r(L),C.d(L,{default:function(){return t}});var l=C(1609),n=C(3072),t=l.forwardRef(((e,L)=>l.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:L},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0001 2C12.266 2 12.5089 2.15027 12.6266 2.38762L15.3384 7.85709L21.4017 8.73178C21.665 8.76976 21.8838 8.95331 21.9659 9.20518C22.0481 9.45705 21.9794 9.73351 21.7888 9.91822L17.395 14.1754L18.431 20.1871C18.476 20.4481 18.3681 20.7118 18.1528 20.8674C17.9375 21.0229 17.6522 21.0433 17.4168 20.9198L12.0063 18.0819L6.58287 20.9201C6.3475 21.0433 6.06229 21.0228 5.84715 20.8672C5.63202 20.7116 5.52429 20.448 5.56925 20.1871L6.60527 14.1754L2.21146 9.91822C2.02081 9.73351 1.95213 9.45705 2.0343 9.20518C2.11647 8.95331 2.33523 8.76976 2.59853 8.73178L8.66185 7.85709L11.3737 2.38762C11.4914 2.15027 11.7342 2 12.0001 2ZM12.0001 4.26658L9.75213 8.80054C9.65033 9.00586 9.45352 9.14813 9.22588 9.18097L4.20166 9.90576L7.84321 13.4341C8.0081 13.5938 8.08337 13.8242 8.04447 14.0499L7.18563 19.0334L11.6815 16.6806C11.8853 16.574 12.1287 16.5741 12.3323 16.6809L16.8143 19.0318L15.9558 14.0499C15.9169 13.8242 15.9921 13.5938 16.157 13.4341L19.7986 9.90576L14.7744 9.18097C14.5467 9.14813 14.3499 9.00586 14.2481 8.80054L12.0001 4.26658Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/380.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[380],{4380:function(e,l,n){n.r(l),n.d(l,{default:function(){return o}});var t=n(1609),r=n(3072),o=t.forwardRef(((e,l)=>t.createElement(r.A,{viewBox:"0 0 24 24",...e,ref:l},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C4.86193 4.75 4.75 4.86193 4.75 5V7.25H19.25V5C19.25 4.86193 19.1381 4.75 19 4.75H5ZM20.75 5C20.75 4.0335 19.9665 3.25 19 3.25H5C4.0335 3.25 3.25 4.0335 3.25 5V19C3.25 19.9665 4.0335 20.75 5 20.75H19C19.9665 20.75 20.75 19.9665 20.75 19V5ZM19.25 8.75H4.75V19C4.75 19.1381 4.86193 19.25 5 19.25H19C19.1381 19.25 19.25 19.1381 19.25 19V8.75Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/387.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[387],{3387:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var t=l(1609),n=l(3072),r=t.forwardRef(((e,C)=>t.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},t.createElement("path",{d:"M15 7.25C14.5858 7.25 14.25 7.58579 14.25 8C14.25 8.41421 14.5858 8.75 15 8.75H15.01C15.4242 8.75 15.76 8.41421 15.76 8C15.76 7.58579 15.4242 7.25 15.01 7.25H15Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.75 6C21.75 5.00544 21.3549 4.05161 20.6517 3.34835C19.9484 2.64509 18.9946 2.25 18 2.25H6C5.00544 2.25 4.05161 2.64509 3.34835 3.34835C2.64509 4.05161 2.25 5.00544 2.25 6V18C2.25 18.9946 2.64509 19.9484 3.34835 20.6517C4.05161 21.3549 5.00544 21.75 6 21.75H18C18.9946 21.75 19.9484 21.3549 20.6517 20.6517C21.3549 19.9484 21.75 18.9946 21.75 18V6ZM4.40901 4.40901C4.83097 3.98705 5.40326 3.75 6 3.75H18C18.5967 3.75 19.169 3.98705 19.591 4.40901C20.0129 4.83097 20.25 5.40326 20.25 6V14.1894L18.5303 12.4697L18.52 12.4596C17.9434 11.9048 17.2466 11.5803 16.5 11.5803C15.7534 11.5803 15.0566 11.9048 14.48 12.4596L14.4697 12.4697L14 12.9394L11.5303 10.4697L11.52 10.4596C10.9434 9.90478 10.2466 9.58032 9.5 9.58032C8.75344 9.58032 8.05657 9.90478 7.47996 10.4596L7.46967 10.4697L3.75 14.1894V6C3.75 5.40326 3.98705 4.83097 4.40901 4.40901ZM15.0607 14.0001L15.5249 13.5358C15.8745 13.2012 16.2119 13.0803 16.5 13.0803C16.7881 13.0803 17.1254 13.2012 17.4751 13.5358L20.25 16.3107V18C20.25 18.5967 20.0129 19.169 19.591 19.591C19.169 20.0129 18.5967 20.25 18 20.25H6C5.40326 20.25 4.83097 20.0129 4.40901 19.591C3.98705 19.169 3.75 18.5967 3.75 18V16.3107L8.52489 11.5358C8.87455 11.2012 9.21189 11.0803 9.5 11.0803C9.78811 11.0803 10.1254 11.2012 10.4751 11.5358L15.4697 16.5304C15.7626 16.8233 16.2374 16.8233 16.5303 16.5304C16.8232 16.2375 16.8232 15.7626 16.5303 15.4697L15.0607 14.0001Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/415.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[415],{8415:function(C,e,l){l.r(e),l.d(e,{default:function(){return d}});var t=l(1609),n=l(3072),d=t.forwardRef(((C,e)=>t.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.76256 3.76256C4.09075 3.43438 4.53587 3.25 5 3.25H9C9.46413 3.25 9.90925 3.43438 10.2374 3.76256C10.5656 4.09075 10.75 4.53587 10.75 5V9C10.75 9.46413 10.5656 9.90925 10.2374 10.2374C9.90925 10.5656 9.46413 10.75 9 10.75H5C4.53587 10.75 4.09075 10.5656 3.76256 10.2374C3.43438 9.90925 3.25 9.46413 3.25 9V5C3.25 4.53587 3.43438 4.09075 3.76256 3.76256ZM5 4.75C4.9337 4.75 4.87011 4.77634 4.82322 4.82322C4.77634 4.87011 4.75 4.9337 4.75 5V9C4.75 9.0663 4.77634 9.12989 4.82322 9.17678C4.87011 9.22366 4.9337 9.25 5 9.25H9C9.0663 9.25 9.12989 9.22366 9.17678 9.17678C9.22366 9.12989 9.25 9.0663 9.25 9V5C9.25 4.9337 9.22366 4.87011 9.17678 4.82322C9.12989 4.77634 9.0663 4.75 9 4.75H5Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.76256 13.7626C4.09075 13.4344 4.53587 13.25 5 13.25H9C9.46413 13.25 9.90925 13.4344 10.2374 13.7626C10.5656 14.0908 10.75 14.5359 10.75 15V19C10.75 19.4641 10.5656 19.9092 10.2374 20.2374C9.90925 20.5656 9.46413 20.75 9 20.75H5C4.53587 20.75 4.09075 20.5656 3.76256 20.2374C3.43437 19.9092 3.25 19.4641 3.25 19V15C3.25 14.5359 3.43438 14.0908 3.76256 13.7626ZM5 14.75C4.9337 14.75 4.87011 14.7763 4.82322 14.8232C4.77634 14.8701 4.75 14.9337 4.75 15V19C4.75 19.0663 4.77634 19.1299 4.82322 19.1768C4.87011 19.2237 4.93369 19.25 5 19.25H9C9.06631 19.25 9.12989 19.2237 9.17678 19.1768C9.22366 19.1299 9.25 19.0663 9.25 19V15C9.25 14.9337 9.22366 14.8701 9.17678 14.8232C9.12989 14.7763 9.0663 14.75 9 14.75H5Z"}),t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 13.25C14.5359 13.25 14.0908 13.4344 13.7626 13.7626C13.4344 14.0908 13.25 14.5359 13.25 15V19C13.25 19.4641 13.4344 19.9092 13.7626 20.2374C14.0908 20.5656 14.5359 20.75 15 20.75H19C19.4641 20.75 19.9092 20.5656 20.2374 20.2374C20.5656 19.9092 20.75 19.4641 20.75 19V15C20.75 14.5359 20.5656 14.0908 20.2374 13.7626C19.9092 13.4344 19.4641 13.25 19 13.25H15ZM14.8232 14.8232C14.8701 14.7763 14.9337 14.75 15 14.75H19C19.0663 14.75 19.1299 14.7763 19.1768 14.8232C19.2237 14.8701 19.25 14.9337 19.25 15V19C19.25 19.0663 19.2237 19.1299 19.1768 19.1768C19.1299 19.2237 19.0663 19.25 19 19.25H15C14.9337 19.25 14.8701 19.2237 14.8232 19.1768C14.7763 19.1299 14.75 19.0663 14.75 19V15C14.75 14.9337 14.7763 14.8701 14.8232 14.8232Z"}),t.createElement("path",{d:"M13.25 7C13.25 6.58579 13.5858 6.25 14 6.25H16.25V4C16.25 3.58579 16.5858 3.25 17 3.25C17.4142 3.25 17.75 3.58579 17.75 4V6.25H20C20.4142 6.25 20.75 6.58579 20.75 7C20.75 7.41421 20.4142 7.75 20 7.75H17.75V10C17.75 10.4142 17.4142 10.75 17 10.75C16.5858 10.75 16.25 10.4142 16.25 10V7.75H14C13.5858 7.75 13.25 7.41421 13.25 7Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/468.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[468],{3468:function(C,e,L){L.r(e),L.d(e,{default:function(){return t}});var l=L(1609),n=L(3072),t=l.forwardRef(((C,e)=>l.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.0221 2.2505C14.7086 2.2428 14.3993 2.32462 14.1306 2.48639C13.8619 2.64816 13.6449 2.88316 13.5049 3.16386L10.9999 8.19197L3.92384 11.2998C3.49889 11.4865 3.16549 11.8343 2.99698 12.2667C2.82848 12.6992 2.83867 13.1809 3.02531 13.6058L4.63384 17.2682C4.82048 17.6931 5.16829 18.0265 5.60074 18.195C6.0332 18.3635 6.51489 18.3533 6.93984 18.1667L8.9999 17.2619L10.709 21.1532C10.8956 21.5781 11.2434 21.9115 11.6759 22.08C12.1083 22.2485 12.59 22.2383 13.015 22.0517L13.9306 21.6496C14.3555 21.4629 14.6889 21.1151 14.8574 20.6827C15.0259 20.2502 15.0157 19.7685 14.8291 19.3436L13.12 15.4523L14.0159 15.0588L19.4131 16.616C19.7145 16.7029 20.0346 16.7021 20.3355 16.6137C20.6364 16.5253 20.9059 16.3529 21.1124 16.1168C21.3188 15.8807 21.4537 15.5907 21.5013 15.2806C21.5488 14.9707 21.507 14.6537 21.3808 14.3667M21.3808 14.3667L20.4142 12.1659C21.0102 11.7447 21.4752 11.1551 21.7441 10.4649C22.1052 9.53824 22.0834 8.50606 21.6834 7.59546C21.2835 6.68486 20.5382 5.97043 19.6115 5.60934C18.9213 5.3404 18.1726 5.28388 17.4591 5.43778L16.4927 3.23726C16.3667 2.95018 16.1613 2.70457 15.901 2.52988C15.6405 2.35511 15.3357 2.2582 15.0221 2.2505M18.0836 6.85961C18.4152 6.83504 18.7512 6.88399 19.0669 7.00698C19.6229 7.22364 20.0701 7.6523 20.3101 8.19866C20.55 8.74502 20.5631 9.36433 20.3465 9.92035C20.2235 10.236 20.0321 10.5166 19.7897 10.7441L18.0836 6.85961ZM15.1191 3.8401C15.1077 3.81399 15.0889 3.79133 15.0652 3.77544C15.0415 3.75956 15.0138 3.75075 14.9853 3.75005C14.9568 3.74935 14.9287 3.75678 14.9042 3.77149C14.8798 3.7862 14.8601 3.80756 14.8474 3.83308L12.2214 9.10391C12.1432 9.26095 12.0123 9.38559 11.8517 9.45615L10.7072 9.95881L12.5168 14.0789L13.6613 13.5763C13.8219 13.5057 14.0022 13.4937 14.1708 13.5423L19.8288 15.1748C19.8562 15.1827 19.8852 15.1826 19.9126 15.1746C19.9399 15.1665 19.9645 15.1509 19.9832 15.1294C20.002 15.1079 20.0143 15.0816 20.0186 15.0534C20.0229 15.0252 20.0191 14.9964 20.0076 14.9703L15.1191 3.8401ZM11.7466 16.0555L13.4557 19.9468C13.4824 20.0075 13.4838 20.0763 13.4598 20.1381C13.4357 20.1999 13.3881 20.2495 13.3274 20.2762L12.4118 20.6783C12.3511 20.705 12.2823 20.7064 12.2205 20.6824C12.1587 20.6583 12.109 20.6107 12.0824 20.55L10.3733 16.6587L11.7466 16.0555ZM11.1434 14.6821L9.33384 10.562L4.52704 12.6732C4.46633 12.6999 4.4187 12.7496 4.39463 12.8113C4.37056 12.8731 4.37201 12.9419 4.39868 13.0026L6.00721 16.665C6.03387 16.7257 6.08356 16.7733 6.14534 16.7974C6.20712 16.8214 6.27593 16.82 6.33664 16.7933L11.1434 14.6821Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/495.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[495],{8495:function(e,C,t){t.r(C),t.d(C,{default:function(){return r}});var l=t(1609),n=t(3072),r=l.forwardRef(((e,C)=>l.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.75 2C6.02066 2 5.32118 2.28973 4.80546 2.80546C4.28973 3.32118 4 4.02065 4 4.75V18.75C4 19.4793 4.28973 20.1788 4.80546 20.6945C5.32118 21.2103 6.02065 21.5 6.75 21.5H16.75C17.4793 21.5 18.1788 21.2103 18.6945 20.6945C19.2103 20.1788 19.5 19.4793 19.5 18.75V7.75C19.5 7.55109 19.421 7.36032 19.2803 7.21967L14.2803 2.21967C14.1397 2.07902 13.9489 2 13.75 2H6.75ZM5.86612 3.86612C6.10054 3.6317 6.41848 3.5 6.75 3.5H13V6.75C13 7.21413 13.1844 7.65925 13.5126 7.98744C13.8408 8.31563 14.2859 8.5 14.75 8.5H18V18.75C18 19.0815 17.8683 19.3995 17.6339 19.6339C17.3995 19.8683 17.0815 20 16.75 20H6.75C6.41848 20 6.10054 19.8683 5.86612 19.6339C5.6317 19.3995 5.5 19.0815 5.5 18.75V4.75C5.5 4.41848 5.6317 4.10054 5.86612 3.86612ZM16.9393 7L14.5 4.56066V6.75C14.5 6.8163 14.5263 6.87989 14.5732 6.92678C14.6201 6.97366 14.6837 7 14.75 7H16.9393Z"}),l.createElement("path",{d:"M8.5 12.25C8.08579 12.25 7.75 12.5858 7.75 13C7.75 13.4142 8.08579 13.75 8.5 13.75H15C15.4142 13.75 15.75 13.4142 15.75 13C15.75 12.5858 15.4142 12.25 15 12.25H8.5Z"}),l.createElement("path",{d:"M8.5 16.25C8.08579 16.25 7.75 16.5858 7.75 17C7.75 17.4142 8.08579 17.75 8.5 17.75H15C15.4142 17.75 15.75 17.4142 15.75 17C15.75 16.5858 15.4142 16.25 15 16.25H8.5Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/502.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[502],{3502:function(e,C,l){l.r(C),l.d(C,{default:function(){return t}});var H=l(1609),n=l(3072),t=H.forwardRef(((e,C)=>H.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},H.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9341 3.93414C12.0125 2.8558 13.475 2.25 15 2.25H18C18.4142 2.25 18.75 2.58579 18.75 3V7C18.75 7.41421 18.4142 7.75 18 7.75H15C14.9337 7.75 14.8701 7.77634 14.8232 7.82322C14.7763 7.87011 14.75 7.9337 14.75 8V9.25H18C18.231 9.25 18.449 9.3564 18.5912 9.53844C18.7333 9.72048 18.7836 9.95785 18.7276 10.1819L17.7276 14.1819C17.6441 14.5158 17.3442 14.75 17 14.75H14.75V21C14.75 21.4142 14.4142 21.75 14 21.75H10C9.58579 21.75 9.25 21.4142 9.25 21V14.75H7C6.58579 14.75 6.25 14.4142 6.25 14V10C6.25 9.58579 6.58579 9.25 7 9.25H9.25V8C9.25 6.47501 9.8558 5.01247 10.9341 3.93414ZM15 3.75C13.8728 3.75 12.7918 4.19777 11.9948 4.9948C11.1978 5.79183 10.75 6.87283 10.75 8V10C10.75 10.4142 10.4142 10.75 10 10.75H7.75V13.25H10C10.4142 13.25 10.75 13.5858 10.75 14V20.25H13.25V14C13.25 13.5858 13.5858 13.25 14 13.25H16.4144L17.0394 10.75H14C13.5858 10.75 13.25 10.4142 13.25 10V8C13.25 7.53587 13.4344 7.09075 13.7626 6.76256C14.0908 6.43437 14.5359 6.25 15 6.25H17.25V3.75H15Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/516.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[516],{1516:function(e,t,r){r.r(t),r.d(t,{default:function(){return n}});var C=r(1609),l=r(3072),n=C.forwardRef(((e,t)=>C.createElement(l.A,{viewBox:"0 0 24 24",...e,ref:t},C.createElement("path",{d:"M4.25 5C4.25 4.58579 4.58579 4.25 5 4.25H19C19.4142 4.25 19.75 4.58579 19.75 5V7C19.75 7.41421 19.4142 7.75 19 7.75C18.5858 7.75 18.25 7.41421 18.25 7V5.75H12.75V18.25H14C14.4142 18.25 14.75 18.5858 14.75 19C14.75 19.4142 14.4142 19.75 14 19.75H10C9.58579 19.75 9.25 19.4142 9.25 19C9.25 18.5858 9.58579 18.25 10 18.25H11.25V5.75H5.75V7C5.75 7.41421 5.41421 7.75 5 7.75C4.58579 7.75 4.25 7.41421 4.25 7V5Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/612.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[612],{3612:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((e,C)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:C},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 3.75C6.66848 3.75 6.35054 3.8817 6.11612 4.11612C5.8817 4.35054 5.75 4.66848 5.75 5V19C5.75 19.3315 5.8817 19.6495 6.11612 19.8839C6.35054 20.1183 6.66848 20.25 7 20.25H17C17.3315 20.25 17.6495 20.1183 17.8839 19.8839C18.1183 19.6495 18.25 19.3315 18.25 19V8.75H15C14.5359 8.75 14.0908 8.56563 13.7626 8.23744C13.4344 7.90925 13.25 7.46413 13.25 7V3.75H7ZM14.75 4.81066L17.1893 7.25H15C14.9337 7.25 14.8701 7.22366 14.8232 7.17678C14.7763 7.12989 14.75 7.0663 14.75 7V4.81066ZM5.05546 3.05546C5.57118 2.53973 6.27065 2.25 7 2.25H14C14.1989 2.25 14.3897 2.32902 14.5303 2.46967L19.5303 7.46967C19.671 7.61032 19.75 7.80109 19.75 8V19C19.75 19.7293 19.4603 20.4288 18.9445 20.9445C18.4288 21.4603 17.7293 21.75 17 21.75H7C6.27065 21.75 5.57118 21.4603 5.05546 20.9445C4.53973 20.4288 4.25 19.7293 4.25 19V5C4.25 4.27065 4.53973 3.57118 5.05546 3.05546Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/763.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[763],{7763:function(e,C,l){l.r(C),l.d(C,{default:function(){return t}});var H=l(1609),n=l(3072),t=H.forwardRef(((e,C)=>H.createElement(n.A,{viewBox:"0 0 24 24",...e,ref:C},H.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C4.86193 4.75 4.75 4.86193 4.75 5V7C4.75 7.13807 4.86193 7.25 5 7.25H19C19.1381 7.25 19.25 7.13807 19.25 7V5C19.25 4.86193 19.1381 4.75 19 4.75H5ZM3.25 5C3.25 4.0335 4.0335 3.25 5 3.25H19C19.9665 3.25 20.75 4.0335 20.75 5V7C20.75 7.9665 19.9665 8.75 19 8.75H5C4.0335 8.75 3.25 7.9665 3.25 7V5ZM5 12.75C4.86193 12.75 4.75 12.8619 4.75 13V19C4.75 19.1381 4.86193 19.25 5 19.25H9C9.13807 19.25 9.25 19.1381 9.25 19V13C9.25 12.8619 9.13807 12.75 9 12.75H5ZM3.25 13C3.25 12.0335 4.0335 11.25 5 11.25H9C9.9665 11.25 10.75 12.0335 10.75 13V19C10.75 19.9665 9.9665 20.75 9 20.75H5C4.0335 20.75 3.25 19.9665 3.25 19V13ZM13.25 12C13.25 11.5858 13.5858 11.25 14 11.25H20C20.4142 11.25 20.75 11.5858 20.75 12C20.75 12.4142 20.4142 12.75 20 12.75H14C13.5858 12.75 13.25 12.4142 13.25 12ZM13.25 16C13.25 15.5858 13.5858 15.25 14 15.25H20C20.4142 15.25 20.75 15.5858 20.75 16C20.75 16.4142 20.4142 16.75 20 16.75H14C13.5858 16.75 13.25 16.4142 13.25 16ZM13.25 20C13.25 19.5858 13.5858 19.25 14 19.25H20C20.4142 19.25 20.75 19.5858 20.75 20C20.75 20.4142 20.4142 20.75 20 20.75H14C13.5858 20.75 13.25 20.4142 13.25 20Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/768.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[768],{9768:function(e,C,l){l.r(C),l.d(C,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((e,C)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:C},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3.75C7.44365 3.75 3.75 7.44365 3.75 12C3.75 16.5563 7.44365 20.25 12 20.25C16.5563 20.25 20.25 16.5563 20.25 12C20.25 7.44365 16.5563 3.75 12 3.75ZM2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM11.4346 6.31004C12.1055 6.17314 12.8016 6.27204 13.4089 6.58932L13.4116 6.59074C14.0173 6.91037 14.4974 7.42629 14.7778 8.05316C15.0582 8.6798 15.1241 9.38318 14.9657 10.0516C14.8073 10.7201 14.4329 11.3179 13.8992 11.7478C13.5634 12.0182 13.1769 12.2121 12.766 12.3194L12.766 13C12.766 13.4142 12.4302 13.75 12.016 13.75C11.6018 13.75 11.266 13.4142 11.266 13L11.266 11.6666C11.266 11.2533 11.6003 10.9179 12.0136 10.9166C12.3547 10.9155 12.6874 10.7978 12.9583 10.5796C13.2296 10.3611 13.4236 10.054 13.5061 9.7057C13.5887 9.35728 13.5541 8.99081 13.4087 8.66579C13.2635 8.34144 13.0175 8.07918 12.7129 7.91806C12.4103 7.76042 12.0658 7.71214 11.7345 7.77976C11.4024 7.84752 11.0997 8.02843 10.8772 8.29658C10.6126 8.61532 10.1398 8.65925 9.82106 8.39471C9.50232 8.13018 9.45839 7.65734 9.72293 7.3386C10.1611 6.81066 10.7638 6.44691 11.4346 6.31004ZM12 15.25C12.4142 15.25 12.75 15.5858 12.75 16V16.04C12.75 16.4542 12.4142 16.79 12 16.79C11.5858 16.79 11.25 16.4542 11.25 16.04V16C11.25 15.5858 11.5858 15.25 12 15.25Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/770.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[770],{6770:function(C,e,l){l.r(e),l.d(e,{default:function(){return t}});var L=l(1609),n=l(3072),t=L.forwardRef(((C,e)=>L.createElement(n.A,{viewBox:"0 0 24 24",...C,ref:e},L.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.9461 4.49382C12.7055 3.50206 11.2945 3.50206 11.0539 4.49382L11.0538 4.49421C10.6578 6.12252 8.79686 6.89441 7.36336 6.02285L7.36299 6.02262C6.49035 5.49135 5.49253 6.49022 6.0235 7.3618C6.22619 7.69432 6.34752 8.06998 6.37762 8.45824C6.40773 8.84659 6.34572 9.23656 6.19663 9.59641C6.04755 9.95627 5.8156 10.2758 5.51966 10.5291C5.22378 10.7823 4.8723 10.9621 4.49382 11.0539C3.50206 11.2945 3.50206 12.7055 4.49382 12.9461L4.49422 12.9462C4.87244 13.0382 5.22363 13.2181 5.51923 13.4714C5.81483 13.7246 6.0465 14.0441 6.19542 14.4037C6.34433 14.7633 6.40629 15.153 6.37625 15.5411C6.34621 15.9292 6.22502 16.3047 6.02253 16.6371C5.49145 17.5098 6.49026 18.5074 7.3618 17.9765C7.69431 17.7738 8.06998 17.6525 8.45824 17.6224C8.84659 17.5923 9.23656 17.6543 9.59641 17.8034C9.95627 17.9525 10.2758 18.1844 10.5291 18.4803C10.7823 18.7762 10.9621 19.1277 11.0539 19.5062C11.2945 20.4979 12.7055 20.4979 12.9461 19.5062L12.9462 19.5058C13.0382 19.1276 13.2181 18.7764 13.4714 18.4808C13.7246 18.1852 14.0441 17.9535 14.4037 17.8046C14.7633 17.6557 15.153 17.5937 15.5411 17.6238C15.9292 17.6538 16.3047 17.775 16.6371 17.9775C17.5097 18.5085 18.5074 17.5097 17.9765 16.6382C17.7738 16.3057 17.6525 15.93 17.6224 15.5418C17.5923 15.1534 17.6543 14.7634 17.8034 14.4036C17.9525 14.0437 18.1844 13.7242 18.4803 13.4709C18.7762 13.2177 19.1277 13.0379 19.5062 12.9461C20.4979 12.7055 20.4979 11.2945 19.5062 11.0539L19.5058 11.0538C19.1276 10.9618 18.7764 10.7819 18.4808 10.5286C18.1852 10.2754 17.9535 9.95594 17.8046 9.59631C17.6557 9.23668 17.5937 8.84698 17.6238 8.45889C17.6538 8.07081 17.775 7.69528 17.9775 7.36285C18.5085 6.49025 17.5097 5.49256 16.6382 6.0235C16.3057 6.22619 15.93 6.34752 15.5418 6.37762C15.1534 6.40773 14.7634 6.34572 14.4036 6.19663C14.0437 6.04755 13.7242 5.8156 13.4709 5.51966C13.2177 5.22378 13.0379 4.8723 12.9461 4.49382ZM9.59624 4.13979C10.2079 1.61994 13.7925 1.62007 14.4039 4.14018L14.4039 4.14039C14.44 4.28943 14.5108 4.42783 14.6105 4.54434C14.7102 4.66085 14.836 4.75216 14.9777 4.81086C15.1194 4.86955 15.2729 4.89397 15.4258 4.88211C15.5787 4.87026 15.7266 4.82247 15.8576 4.74264L15.8578 4.7425C18.0722 3.39347 20.6074 5.92764 19.2586 8.14301L19.2585 8.14315C19.1788 8.27403 19.1311 8.42187 19.1193 8.57465C19.1075 8.72744 19.1318 8.88086 19.1905 9.02245C19.2491 9.16404 19.3403 9.28979 19.4567 9.38949C19.573 9.4891 19.7111 9.5599 19.8598 9.59614C22.3801 10.2075 22.3801 13.7925 19.8598 14.4039L19.8596 14.4039C19.7106 14.44 19.5722 14.5108 19.4557 14.6105C19.3392 14.7102 19.2478 14.836 19.1891 14.9777C19.1304 15.1194 19.106 15.2729 19.1179 15.4258C19.1297 15.5787 19.1775 15.7266 19.2574 15.8576L19.2575 15.8578C20.6065 18.0722 18.0724 20.6074 15.857 19.2586L15.8569 19.2585C15.726 19.1788 15.5781 19.1311 15.4253 19.1193C15.2726 19.1075 15.1191 19.1318 14.9776 19.1905C14.836 19.2491 14.7102 19.3403 14.6105 19.4567C14.5109 19.573 14.4401 19.7111 14.4039 19.8598C13.7925 22.3801 10.2075 22.3801 9.59614 19.8598L9.59609 19.8596C9.55998 19.7106 9.48919 19.5722 9.38948 19.4557C9.28977 19.3392 9.16396 19.2478 9.02228 19.1891C8.88061 19.1304 8.72708 19.106 8.57419 19.1179C8.4213 19.1297 8.27337 19.1775 8.14244 19.2574L8.1422 19.2575C5.92778 20.6065 3.39265 18.0724 4.74138 15.857L4.74147 15.8569C4.82118 15.726 4.86889 15.5781 4.88072 15.4253C4.89255 15.2726 4.86816 15.1191 4.80953 14.9776C4.7509 14.836 4.65969 14.7102 4.54332 14.6105C4.42705 14.5109 4.28893 14.4401 4.14018 14.4039C1.61994 13.7925 1.61994 10.2075 4.14018 9.59614L4.14039 9.59609C4.28943 9.55998 4.42783 9.48919 4.54434 9.38948C4.66085 9.28977 4.75216 9.16396 4.81086 9.02228C4.86955 8.88061 4.89397 8.72708 4.88211 8.57419C4.87026 8.4213 4.82247 8.27337 4.74264 8.14244L4.7425 8.1422C3.39354 5.92791 5.92736 3.39294 8.14263 4.74115C8.70903 5.08552 9.4399 4.7816 9.59614 4.14018M12 9.75C10.7574 9.75 9.75 10.7574 9.75 12C9.75 13.2426 10.7574 14.25 12 14.25C13.2426 14.25 14.25 13.2426 14.25 12C14.25 10.7574 13.2426 9.75 12 9.75ZM8.25 12C8.25 9.92893 9.92893 8.25 12 8.25C14.0711 8.25 15.75 9.92893 15.75 12C15.75 14.0711 14.0711 15.75 12 15.75C9.92893 15.75 8.25 14.0711 8.25 12Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/799.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[799],{5180:function(e,l,C){C.r(l),C.d(l,{default:function(){return r}});var n=C(1609),t=C(3072),r=n.forwardRef(((e,l)=>n.createElement(t.A,{viewBox:"0 0 24 24",...e,ref:l},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.75C5 4.33579 5.33579 4 5.75 4H18.6203C19.0345 4 19.3703 4.33579 19.3703 4.75V6.46604C19.3703 6.88026 19.0345 7.21604 18.6203 7.21604C18.2061 7.21604 17.8703 6.88026 17.8703 6.46604V5.5H12.9355V15.3932H13.7594C14.1736 15.3932 14.5094 15.729 14.5094 16.1432C14.5094 16.5574 14.1736 16.8932 13.7594 16.8932H10.6113C10.1971 16.8932 9.8613 16.5574 9.8613 16.1432C9.8613 15.729 10.1971 15.3932 10.6113 15.3932H11.4355V5.5H6.5V6.46604C6.5 6.88026 6.16421 7.21604 5.75 7.21604C5.33579 7.21604 5 6.88026 5 6.46604V4.75ZM6 19.1426C6 18.7284 6.33579 18.3926 6.75 18.3926H17.6203C18.0345 18.3926 18.3703 18.7284 18.3703 19.1426C18.3703 19.5568 18.0345 19.8926 17.6203 19.8926H6.75C6.33579 19.8926 6 19.5568 6 19.1426Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/835.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[835],{1835:function(e,C,l){l.r(C);var n=l(1609),o=l(3072),r=l(790);const d=n.forwardRef(((e,C)=>(0,r.jsx)(o.A,{viewBox:"0 0 24 24",...e,ref:C,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.95964 2.64459C2.76302 2.64459 1.79297 3.61464 1.79297 4.81126V12.8113C1.79297 14.0079 2.76302 14.9779 3.95964 14.9779H16.6263C17.8229 14.9779 18.793 14.0079 18.793 12.8113V4.81126C18.793 3.61464 17.8229 2.64459 16.6263 2.64459H3.95964ZM0.79297 4.81126C0.79297 3.06236 2.21073 1.64459 3.95964 1.64459H16.6263C18.3752 1.64459 19.793 3.06236 19.793 4.81126V12.8113C19.793 14.5602 18.3752 15.9779 16.6263 15.9779H3.95964C2.21073 15.9779 0.79297 14.5602 0.79297 12.8113V4.81126ZM7.71329 4.87616C7.87004 4.78741 8.06242 4.78983 8.21688 4.88251L13.5502 7.88251C13.7008 7.97287 13.793 8.13563 13.793 8.31126C13.793 8.48689 13.7008 8.64964 13.5502 8.74001L8.21688 11.74C8.06242 11.8327 7.87004 11.8351 7.71329 11.7464C7.55653 11.6576 7.45964 11.4914 7.45964 11.3113V5.31126C7.45964 5.13112 7.55653 4.96491 7.71329 4.87616ZM8.45964 6.19435V10.4282L12.3211 8.31126L8.45964 6.19435Z"})})));C.default=d}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/91.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[91],{3091:function(C,e,l){l.r(e),l.d(e,{default:function(){return r}});var n=l(1609),t=l(3072),r=n.forwardRef(((C,e)=>n.createElement(t.A,{viewBox:"0 0 24 24",...C,ref:e},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.8815 2.25919C20.9203 2.25301 20.9599 2.24983 21 2.24988C21.0827 2.24978 21.1629 2.26335 21.2384 2.2887C21.367 2.33162 21.4784 2.40776 21.5642 2.5058C21.6895 2.64891 21.76 2.83868 21.749 3.03992C21.7477 3.06492 21.7452 3.08966 21.7414 3.11407C21.3311 6.09743 20.124 8.91507 18.2472 11.2703C16.5079 13.4529 14.2532 15.1635 11.6906 16.2509C11.8289 17.1168 11.7249 18.0054 11.3884 18.8177C11.0289 19.6857 10.4201 20.4275 9.63896 20.9495C8.85782 21.4714 7.93946 21.75 7 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V17C2.25 16.0605 2.52858 15.1421 3.05052 14.361C3.57246 13.5799 4.3143 12.9711 5.18225 12.6115C5.99455 12.2751 6.88314 12.1711 7.74905 12.3094C8.83643 9.74682 10.547 7.49212 12.7296 5.75287C15.0837 3.87693 17.8998 2.67012 20.8815 2.25919ZM10.0984 16.0649C10.077 16.0082 10.0629 15.9506 10.0557 15.893C9.89413 15.4471 9.63624 15.04 9.2981 14.7019C8.96001 14.3638 8.55301 14.1059 8.10721 13.9444C8.04953 13.9372 7.99178 13.9231 7.93499 13.9016C7.90509 13.8903 7.87632 13.8773 7.84877 13.8628C7.77794 13.8436 7.70633 13.8268 7.63404 13.8124C7.0036 13.687 6.35014 13.7514 5.75628 13.9974C5.16242 14.2433 4.65484 14.6599 4.29772 15.1944C3.94061 15.7288 3.75 16.3572 3.75 17V20.25H7C7.64279 20.25 8.27114 20.0594 8.8056 19.7022C9.34006 19.3451 9.75662 18.8376 10.0026 18.2437C10.2486 17.6498 10.313 16.9964 10.1876 16.3659C10.1732 16.2935 10.1563 16.2218 10.1371 16.1509C10.1226 16.1234 10.1097 16.0947 10.0984 16.0649ZM10.3588 13.6412C10.7069 13.9894 10.9969 14.3876 11.2204 14.8204C12.2258 14.3839 13.1782 13.8417 14.0621 13.2048C13.3066 11.827 12.173 10.6933 10.7952 9.93782C10.1583 10.8218 9.61603 11.7741 9.17957 12.7795C9.61238 13.0031 10.0106 13.293 10.3588 13.6412ZM11.7434 8.75107C13.1943 9.59789 14.4021 10.8057 15.2489 12.2565C15.9093 11.6727 16.5204 11.0304 17.0741 10.3355C18.5698 8.45849 19.5983 6.25889 20.0821 3.9179C17.7411 4.40165 15.5415 5.43018 13.6644 6.92595C12.9696 7.47964 12.3273 8.0907 11.7434 8.75107Z"}))))}}]);
|
||||
1
wp-content/themes/hello-elementor/assets/js/998.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkhello_elementor=self.webpackChunkhello_elementor||[]).push([[998],{9998:function(e,l,n){n.r(l),n.d(l,{default:function(){return L}});var t=n(1609),r=n(3072),L=t.forwardRef(((e,l)=>t.createElement(r.A,{viewBox:"0 0 24 24",...e,ref:l},t.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 19.25C19.1381 19.25 19.25 19.1381 19.25 19L19.25 16.75L4.75 16.75L4.75 19C4.75 19.1381 4.86193 19.25 5 19.25L19 19.25ZM3.25 19C3.25 19.9665 4.0335 20.75 5 20.75L19 20.75C19.9665 20.75 20.75 19.9665 20.75 19L20.75 5C20.75 4.0335 19.9665 3.25 19 3.25L5 3.25C4.0335 3.25 3.25 4.0335 3.25 5L3.25 19ZM4.75 15.25L19.25 15.25L19.25 5C19.25 4.86193 19.1381 4.75 19 4.75L5 4.75C4.86193 4.75 4.75 4.86193 4.75 5L4.75 15.25Z"}))))}}]);
|
||||
161
wp-content/themes/hello-elementor/assets/js/custom.js
Normal file
@@ -0,0 +1,161 @@
|
||||
jQuery(function ($) {
|
||||
$('.variation-buttons button').on('click', function () {
|
||||
const $button = $(this)
|
||||
const $ul = $button.closest('ul')
|
||||
const attributeName = $ul.data('attribute_name')
|
||||
const value = $button.data('value')
|
||||
|
||||
console.log(attributeName)
|
||||
|
||||
const $select = $('select[name="' + attributeName + '"]')
|
||||
|
||||
if ($select.length) {
|
||||
$select.val(value).trigger('change')
|
||||
|
||||
$ul.find('button').removeClass('selected')
|
||||
$button.addClass('selected')
|
||||
}
|
||||
})
|
||||
|
||||
$('form.variations_form').on('click', '.reset_variations', function () {
|
||||
$(this)
|
||||
.siblings('.variation-buttons')
|
||||
.each(function () {
|
||||
$(this).find('button.selected').removeClass('selected')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('form.variations_form').on('found_variation', function (event, variation) {
|
||||
const template = wp.template('variation-template')
|
||||
const fullHtml = template({ variation: variation })
|
||||
|
||||
const $temp = $('<div>').html(fullHtml)
|
||||
|
||||
const priceHtml = $temp.find('.woocommerce-variation-price').html()
|
||||
|
||||
$('#custom-variation-price .variation-price-label').html('Cena brutto')
|
||||
$('#custom-variation-price .variation-price-value').html(priceHtml)
|
||||
})
|
||||
|
||||
$('form.variations_form').on('reset_data', function () {
|
||||
$('#custom-variation-price .variation-price-label').html('')
|
||||
$('#custom-variation-price .variation-price-value').html('')
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('body').on('click', '.quantity.product-quantity .qty-minus', function () {
|
||||
var currentVal =
|
||||
parseInt($(this).siblings('input[type="number"]').val()) || 0
|
||||
var min =
|
||||
parseInt($(this).siblings('input[type="number"]').attr('min')) || 0
|
||||
if (currentVal > min) {
|
||||
$(this)
|
||||
.siblings('input[type="number"]')
|
||||
.val(currentVal - 1)
|
||||
.trigger('input')
|
||||
}
|
||||
})
|
||||
$('body').on('click', '.quantity.product-quantity .qty-plus', function () {
|
||||
var currentVal =
|
||||
parseInt($(this).siblings('input[type="number"]').val()) || 0
|
||||
var max =
|
||||
parseInt($(this).siblings('input[type="number"]').attr('max')) || 999
|
||||
if (currentVal < max) {
|
||||
$(this)
|
||||
.siblings('input[type="number"]')
|
||||
.val(currentVal + 1)
|
||||
.trigger('input')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(function ($) {
|
||||
$('.elementor-widget-custom_slider_nav a.slider-tab.disabled').on(
|
||||
'click',
|
||||
function (e) {
|
||||
e.preventDefault()
|
||||
|
||||
if ($('#season-tooltip').length === 0) {
|
||||
$('body').append(
|
||||
'<div id="season-tooltip" class="season-tooltip">W przygotowaniu</div>'
|
||||
)
|
||||
}
|
||||
|
||||
const $tooltip = $('#season-tooltip')
|
||||
|
||||
const offsetX = 15
|
||||
const offsetY = 15
|
||||
$tooltip
|
||||
.css({
|
||||
top: e.pageY + offsetY + 'px',
|
||||
left: e.pageX + offsetX + 'px',
|
||||
})
|
||||
.stop(true, true)
|
||||
.fadeIn(200)
|
||||
|
||||
setTimeout(function () {
|
||||
$tooltip.fadeOut(300)
|
||||
}, 1000)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
jQuery(document).ready(function ($) {
|
||||
$('body').on('click', '#c_showcoupon', function (e) {
|
||||
e.preventDefault()
|
||||
$('.woocommerce-form-coupon-box').slideToggle()
|
||||
})
|
||||
})
|
||||
|
||||
jQuery(document).ready(function ($) {
|
||||
$('#c_apply_coupon_button').click(function () {
|
||||
var couponCode = $('#c_coupon_code').val()
|
||||
|
||||
if (couponCode.trim() === '') {
|
||||
$('#c_coupon_response').html('Wprowadź kod kuponu.').css('color', 'red')
|
||||
return
|
||||
}
|
||||
|
||||
var data = {
|
||||
security: wc_checkout_params.apply_coupon_nonce,
|
||||
coupon_code: couponCode,
|
||||
billing_email: $('input[name="billing_email"]').val(),
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: wc_checkout_params.wc_ajax_url
|
||||
.toString()
|
||||
.replace('%%endpoint%%', 'apply_coupon'),
|
||||
data: data,
|
||||
beforeSend: function () {
|
||||
$('#c_apply_coupon_button')
|
||||
.prop('disabled', true)
|
||||
.text('Zastosowanie...')
|
||||
$('#c_coupon_response').html('Przetwarzanie...').css('color', 'blue')
|
||||
},
|
||||
success: function (response) {
|
||||
$('#c_apply_coupon_button')
|
||||
.prop('disabled', false)
|
||||
.text('Zastosuj kupon')
|
||||
|
||||
if (response) {
|
||||
$('#c_coupon_response').html(response).css('color', 'green')
|
||||
$(document.body).trigger('update_checkout')
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
$('#c_coupon_response')
|
||||
.html('Wystąpił błąd. Spróbuj ponownie.')
|
||||
.css('color', 'red')
|
||||
$('#c_apply_coupon_button')
|
||||
.prop('disabled', false)
|
||||
.text('Zastosuj kupon')
|
||||
},
|
||||
dataType: 'html',
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-i18n'), 'version' => '6dedc5c6d6554468b9db');
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'e289788a50eecad5c287');
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";class e extends $e.modules.hookUI.After{getCommand(){return"document/elements/settings"}getId(){return"hello-elementor-editor-controls-handler"}getHelloThemeControls(){return{hello_header_logo_display:{selector:".site-header .site-logo, .site-header .site-title",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_logo_display)}},hello_header_menu_display:{selector:".site-header .site-navigation, .site-header .site-navigation-toggle-holder",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_menu_display)}},hello_header_tagline_display:{selector:".site-header .site-description",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_header_tagline_display)}},hello_header_logo_type:{selector:".site-header .site-branding",callback:(e,o)=>{const t=o.container.controls.hello_header_logo_type.options,l=o.settings.hello_header_logo_type;this.toggleLayoutClass(e,"show-",t,l)}},hello_header_layout:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_layout.options,l=o.settings.hello_header_layout;this.toggleLayoutClass(e,"header-",t,l)}},hello_header_width:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_width.options,l=o.settings.hello_header_width;this.toggleLayoutClass(e,"header-",t,l)}},hello_header_menu_layout:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_menu_layout.options,l=o.settings.hello_header_menu_layout;e.find(".site-navigation-toggle-holder").removeClass("elementor-active"),e.find(".site-navigation-dropdown").removeClass("show"),this.toggleLayoutClass(e,"menu-layout-",t,l)}},hello_header_menu_dropdown:{selector:".site-header",callback:(e,o)=>{const t=o.container.controls.hello_header_menu_dropdown.options,l=o.settings.hello_header_menu_dropdown;this.toggleLayoutClass(e,"menu-dropdown-",t,l)}},hello_footer_logo_display:{selector:".site-footer .site-logo, .site-footer .site-title",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_logo_display)}},hello_footer_tagline_display:{selector:".site-footer .site-description",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_tagline_display)}},hello_footer_menu_display:{selector:".site-footer .site-navigation",callback:(e,o)=>{this.toggleShowHideClass(e,o.settings.hello_footer_menu_display)}},hello_footer_copyright_display:{selector:".site-footer .copyright",callback:(e,o)=>{const t=e.closest("#site-footer"),l=o.settings.hello_footer_copyright_display;this.toggleShowHideClass(e,l),t.toggleClass("footer-has-copyright","yes"===l)}},hello_footer_logo_type:{selector:".site-footer .site-branding",callback:(e,o)=>{const t=o.container.controls.hello_footer_logo_type.options,l=o.settings.hello_footer_logo_type;this.toggleLayoutClass(e,"show-",t,l)}},hello_footer_layout:{selector:".site-footer",callback:(e,o)=>{const t=o.container.controls.hello_footer_layout.options,l=o.settings.hello_footer_layout;this.toggleLayoutClass(e,"footer-",t,l)}},hello_footer_width:{selector:".site-footer",callback:(e,o)=>{const t=o.container.controls.hello_footer_width.options,l=o.settings.hello_footer_width;this.toggleLayoutClass(e,"footer-",t,l)}},hello_footer_copyright_text:{selector:".site-footer .copyright",callback:(e,o)=>{const t=o.settings.hello_footer_copyright_text;e.find("p").text(t)}}}}toggleShowHideClass(e,o){e.removeClass("hide").removeClass("show").addClass(o?"show":"hide")}toggleLayoutClass(e,o,t,l){Object.entries(t).forEach((([t])=>{e.removeClass(o+t)})),""!==l&&e.addClass(o+l)}getConditions(e){const o="kit"===elementor.documents.getCurrent().config.type,t=Object.keys(e.settings),l=1===t.length;return!!(o&&e.settings&&l)&&!!Object.keys(this.getHelloThemeControls()).includes(t[0])}apply(e){const o=this.getHelloThemeControls()[Object.keys(e.settings)[0]],t=elementor.$previewContents.find(o.selector);o.callback(t,e)}}var o=class extends $e.modules.ComponentBase{pages={};getNamespace(){return"hello-elementor"}defaultHooks(){return this.importHooks({ControlsHook:e})}};$e.components.register(new o)}();
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'd45683985595780d10ad');
|
||||
@@ -0,0 +1 @@
|
||||
document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll('a[href="admin.php?page=hello-elementor-ai-site-planner"], a[href="admin.php?page=hello-elementor-theme-builder"]').forEach((e=>{e.setAttribute("target","_blank")}))}));
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-i18n', 'wp-notices'), 'version' => '2946f8c6e691a77887bc');
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-i18n'), 'version' => 'ad52abaee6adea314f36');
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'ce55f4e617b3eb2a4c17');
|
||||
@@ -0,0 +1 @@
|
||||
!function(){class e{constructor(){this.initSettings(),this.initElements(),this.bindEvents()}initSettings(){this.settings={selectors:{menuToggle:".site-header .site-navigation-toggle",menuToggleHolder:".site-header .site-navigation-toggle-holder",dropdownMenu:".site-header .site-navigation-dropdown"}}}initElements(){this.elements={window:window,menuToggle:document.querySelector(this.settings.selectors.menuToggle),menuToggleHolder:document.querySelector(this.settings.selectors.menuToggleHolder),dropdownMenu:document.querySelector(this.settings.selectors.dropdownMenu)}}bindEvents(){this.elements.menuToggleHolder&&!this.elements.menuToggleHolder?.classList.contains("hide")&&(this.elements.menuToggle.addEventListener("click",(()=>this.handleMenuToggle())),this.elements.dropdownMenu.querySelectorAll(".menu-item-has-children > a").forEach((e=>e.addEventListener("click",(e=>this.handleMenuChildren(e))))))}closeMenuItems(){this.elements.menuToggleHolder.classList.remove("elementor-active"),this.elements.window.removeEventListener("resize",(()=>this.closeMenuItems()))}handleMenuToggle(){const e=!this.elements.menuToggleHolder.classList.contains("elementor-active");this.elements.menuToggle.setAttribute("aria-expanded",e),this.elements.dropdownMenu.setAttribute("aria-hidden",!e),this.elements.dropdownMenu.inert=!e,this.elements.menuToggleHolder.classList.toggle("elementor-active",e),this.elements.dropdownMenu.querySelectorAll(".elementor-active").forEach((e=>e.classList.remove("elementor-active"))),e?this.elements.window.addEventListener("resize",(()=>this.closeMenuItems())):this.elements.window.removeEventListener("resize",(()=>this.closeMenuItems()))}handleMenuChildren(e){const t=e.currentTarget.parentElement;t?.classList&&t.classList.toggle("elementor-active")}}document.addEventListener("DOMContentLoaded",(()=>{new e}))}();
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-i18n'), 'version' => '34f5ea01de78b25cc630');
|
||||
101
wp-content/themes/hello-elementor/assets/js/hello-home-app.js
Normal file
78
wp-content/themes/hello-elementor/comments.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the list of comments and the comment form.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! post_type_supports( get_post_type(), 'comments' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! have_comments() && ! comments_open() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Comment Reply Script.
|
||||
if ( comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
?>
|
||||
<section id="comments" class="comments-area">
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 class="title-comments">
|
||||
<?php
|
||||
$comments_number = get_comments_number();
|
||||
if ( '1' === $comments_number ) {
|
||||
printf( esc_html_x( 'One Response', 'comments title', 'hello-elementor' ) );
|
||||
} else {
|
||||
printf(
|
||||
/* translators: %s: Number of comments. */
|
||||
esc_html(
|
||||
_nx(
|
||||
'%s Response',
|
||||
'%s Responses',
|
||||
$comments_number,
|
||||
'comments title',
|
||||
'hello-elementor'
|
||||
)
|
||||
),
|
||||
esc_html( number_format_i18n( $comments_number ) )
|
||||
);
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments(
|
||||
[
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 42,
|
||||
]
|
||||
);
|
||||
?>
|
||||
</ol>
|
||||
|
||||
<?php the_comments_navigation(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
comment_form(
|
||||
[
|
||||
'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">',
|
||||
'title_reply_after' => '</h2>',
|
||||
]
|
||||
);
|
||||
?>
|
||||
|
||||
</section>
|
||||
27
wp-content/themes/hello-elementor/footer.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains the body & html closing tags.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'footer' ) ) {
|
||||
if ( hello_elementor_display_header_footer() ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
get_template_part( 'template-parts/dynamic-footer' );
|
||||
} else {
|
||||
get_template_part( 'template-parts/footer' );
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
42
wp-content/themes/hello-elementor/header.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the header
|
||||
*
|
||||
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' );
|
||||
$enable_skip_link = apply_filters( 'hello_elementor_enable_skip_link', true );
|
||||
$skip_link_url = apply_filters( 'hello_elementor_skip_link_url', '#content' );
|
||||
?>
|
||||
<!doctype html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
|
||||
<link rel="profile" href="https://gmpg.org/xfn/11">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php wp_body_open(); ?>
|
||||
|
||||
<?php if ( $enable_skip_link ) { ?>
|
||||
<a class="skip-link screen-reader-text" href="<?php echo esc_url( $skip_link_url ); ?>"><?php echo esc_html__( 'Skip to content', 'hello-elementor' ); ?></a>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
|
||||
if ( hello_elementor_display_header_footer() ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
get_template_part( 'template-parts/dynamic-header' );
|
||||
} else {
|
||||
get_template_part( 'template-parts/header' );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Customizer controls for header & footer.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_customizer_register( $wp_customize ) {
|
||||
require_once get_template_directory() . '/includes/customizer/customizer-action-links.php';
|
||||
|
||||
$wp_customize->add_section(
|
||||
'hello-options',
|
||||
[
|
||||
'title' => esc_html__( 'Header & Footer', 'hello-elementor' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
]
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'hello-header-footer',
|
||||
[
|
||||
'sanitize_callback' => false,
|
||||
'transport' => 'refresh',
|
||||
]
|
||||
);
|
||||
|
||||
$wp_customize->add_control(
|
||||
new HelloElementor\Includes\Customizer\Hello_Customizer_Action_Links(
|
||||
$wp_customize,
|
||||
'hello-header-footer',
|
||||
[
|
||||
'section' => 'hello-options',
|
||||
'priority' => 20,
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'customize_register', 'hello_customizer_register' );
|
||||
|
||||
/**
|
||||
* Register Customizer controls for Elementor Pro upsell.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_customizer_register_elementor_pro_upsell( $wp_customize ) {
|
||||
if ( function_exists( 'elementor_pro_load_plugin' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
require_once get_template_directory() . '/includes/customizer/customizer-upsell.php';
|
||||
|
||||
$wp_customize->add_section(
|
||||
new HelloElementor\Includes\Customizer\Hello_Customizer_Upsell(
|
||||
$wp_customize,
|
||||
'hello-upsell-elementor-pro',
|
||||
[
|
||||
'heading' => esc_html__( 'Customize your entire website with Elementor Pro', 'hello-elementor' ),
|
||||
'description' => esc_html__( 'Build and customize every part of your website, including Theme Parts with Elementor Pro.', 'hello-elementor' ),
|
||||
'button_text' => esc_html__( 'Upgrade Now', 'hello-elementor' ),
|
||||
'button_url' => 'https://elementor.com/pro/?utm_source=hello-theme-customize&utm_campaign=gopro&utm_medium=wp-dash',
|
||||
'priority' => 999999,
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'customize_register', 'hello_customizer_register_elementor_pro_upsell' );
|
||||
|
||||
/**
|
||||
* Enqueue Customizer CSS.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function hello_customizer_styles() {
|
||||
wp_enqueue_style(
|
||||
'hello-elementor-customizer',
|
||||
HELLO_THEME_STYLE_URL . 'customizer.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
}
|
||||
add_action( 'admin_enqueue_scripts', 'hello_customizer_styles' );
|
||||
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
namespace HelloElementor\Includes\Customizer;
|
||||
|
||||
use HelloTheme\Includes\Utils;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Hello_Customizer_Action_Links extends \WP_Customize_Control {
|
||||
|
||||
// Whitelist content parameter
|
||||
public $content = '';
|
||||
|
||||
/**
|
||||
* Render the control's content.
|
||||
*
|
||||
* Allows the content to be overridden without having to rewrite the wrapper.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function render_content() {
|
||||
$this->print_customizer_action_links();
|
||||
|
||||
if ( isset( $this->description ) ) {
|
||||
echo '<span class="description customize-control-description">' . wp_kses_post( $this->description ) . '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print customizer action links.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function print_customizer_action_links() {
|
||||
if ( ! function_exists( 'get_plugins' ) ) {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
}
|
||||
|
||||
$action_link_data = [];
|
||||
$action_link_type = Utils::get_action_link_type();
|
||||
|
||||
switch ( $action_link_type ) {
|
||||
case 'install-elementor':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Install Elementor', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url(
|
||||
add_query_arg(
|
||||
[
|
||||
'action' => 'install-plugin',
|
||||
'plugin' => 'elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
),
|
||||
'install-plugin_elementor'
|
||||
),
|
||||
];
|
||||
break;
|
||||
case 'activate-elementor':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Create cross-site header & footer using Elementor.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Activate Elementor', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'plugins.php?action=activate&plugin=elementor/elementor.php', 'activate-plugin_elementor/elementor.php' ),
|
||||
];
|
||||
break;
|
||||
case 'activate-header-footer-experiment':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Style using Elementor', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Design your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Activate header & footer experiment', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'admin.php?page=elementor#tab-experiments' ),
|
||||
];
|
||||
break;
|
||||
case 'style-header-footer':
|
||||
$action_link_data = [
|
||||
'image' => get_template_directory_uri() . '/assets/images/elementor.svg',
|
||||
'alt' => esc_attr__( 'Elementor', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Style cross-site header & footer', 'hello-elementor' ),
|
||||
'message' => esc_html__( 'Customize your cross-site header & footer from Elementor’s "Site Settings" panel.', 'hello-elementor' ),
|
||||
'button' => esc_html__( 'Start Designing', 'hello-elementor' ),
|
||||
'link' => wp_nonce_url( 'post.php?post=' . get_option( 'elementor_active_kit' ) . '&action=elementor' ),
|
||||
];
|
||||
break;
|
||||
}
|
||||
|
||||
$customizer_content = $this->get_customizer_action_links_html( $action_link_data );
|
||||
|
||||
echo wp_kses_post( $customizer_content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the customizer action links HTML.
|
||||
*
|
||||
* @param array $data
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function get_customizer_action_links_html( $data ) {
|
||||
if (
|
||||
empty( $data )
|
||||
|| ! isset( $data['image'] )
|
||||
|| ! isset( $data['alt'] )
|
||||
|| ! isset( $data['title'] )
|
||||
|| ! isset( $data['message'] )
|
||||
|| ! isset( $data['link'] )
|
||||
|| ! isset( $data['button'] )
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div class="hello-action-links">
|
||||
<img src="%1$s" alt="%2$s">
|
||||
<p class="hello-action-links-title">%3$s</p>
|
||||
<p class="hello-action-links-message">%4$s</p>
|
||||
<a class="button button-primary" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>',
|
||||
$data['image'],
|
||||
$data['alt'],
|
||||
$data['title'],
|
||||
$data['message'],
|
||||
$data['link'],
|
||||
$data['button'],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace HelloElementor\Includes\Customizer;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Hello_Customizer_Upsell extends \WP_Customize_Section {
|
||||
|
||||
public $heading;
|
||||
|
||||
public $description;
|
||||
|
||||
public $button_text;
|
||||
|
||||
public $button_url;
|
||||
|
||||
/**
|
||||
* Render the section, and the controls that have been added to it.
|
||||
*/
|
||||
protected function render() {
|
||||
?>
|
||||
<li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="accordion-section control-section control-section-<?php echo esc_attr( $this->id ); ?> cannot-expand">
|
||||
<h3 class="accordion-section-title"><?php echo esc_html( $this->heading ); ?></h3>
|
||||
<p class="accordion-section-description"><?php echo esc_html( $this->description ); ?></p>
|
||||
<div class="accordion-section-buttons">
|
||||
<a href="<?php echo esc_url( $this->button_url ); ?>" target="_blank"><?php echo esc_html( $this->button_text ); ?></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Site Settings Controls.
|
||||
*/
|
||||
|
||||
add_action( 'elementor/init', 'hello_elementor_settings_init' );
|
||||
|
||||
function hello_elementor_settings_init() {
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
require 'settings/settings-header.php';
|
||||
require 'settings/settings-footer.php';
|
||||
|
||||
add_action( 'elementor/kit/register_tabs', function( \Elementor\Core\Kits\Documents\Kit $kit ) {
|
||||
if ( ! hello_elementor_display_header_footer() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$kit->register_tab( 'hello-settings-header', HelloElementor\Includes\Settings\Settings_Header::class );
|
||||
$kit->register_tab( 'hello-settings-footer', HelloElementor\Includes\Settings\Settings_Footer::class );
|
||||
}, 1, 40 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to return a setting.
|
||||
*
|
||||
* Saves 2 lines to get kit, then get setting. Also caches the kit and setting.
|
||||
*
|
||||
* @param string $setting_id
|
||||
* @return string|array same as the Elementor internal function does.
|
||||
*/
|
||||
function hello_elementor_get_setting( $setting_id ) {
|
||||
global $hello_elementor_settings;
|
||||
|
||||
$return = '';
|
||||
|
||||
if ( ! isset( $hello_elementor_settings['kit_settings'] ) ) {
|
||||
$kit = \Elementor\Plugin::$instance->kits_manager->get_active_kit();
|
||||
$hello_elementor_settings['kit_settings'] = $kit->get_settings();
|
||||
}
|
||||
|
||||
if ( isset( $hello_elementor_settings['kit_settings'][ $setting_id ] ) ) {
|
||||
$return = $hello_elementor_settings['kit_settings'][ $setting_id ];
|
||||
}
|
||||
|
||||
return apply_filters( 'hello_elementor_' . $setting_id, $return );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to show/hide elements
|
||||
*
|
||||
* This works with switches, if the setting ID that has been passed is toggled on, we'll return show, otherwise we'll return hide
|
||||
*
|
||||
* @param string $setting_id
|
||||
* @return string|array same as the Elementor internal function does.
|
||||
*/
|
||||
function hello_show_or_hide( $setting_id ) {
|
||||
return ( 'yes' === hello_elementor_get_setting( $setting_id ) ? 'show' : 'hide' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to translate the header layout setting into a class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function hello_get_header_layout_class() {
|
||||
$layout_classes = [];
|
||||
|
||||
$header_layout = hello_elementor_get_setting( 'hello_header_layout' );
|
||||
if ( 'inverted' === $header_layout ) {
|
||||
$layout_classes[] = 'header-inverted';
|
||||
} elseif ( 'stacked' === $header_layout ) {
|
||||
$layout_classes[] = 'header-stacked';
|
||||
}
|
||||
|
||||
$header_width = hello_elementor_get_setting( 'hello_header_width' );
|
||||
if ( 'full-width' === $header_width ) {
|
||||
$layout_classes[] = 'header-full-width';
|
||||
}
|
||||
|
||||
$header_menu_dropdown = hello_elementor_get_setting( 'hello_header_menu_dropdown' );
|
||||
if ( 'tablet' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-tablet';
|
||||
} elseif ( 'mobile' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-mobile';
|
||||
} elseif ( 'none' === $header_menu_dropdown ) {
|
||||
$layout_classes[] = 'menu-dropdown-none';
|
||||
}
|
||||
|
||||
$hello_header_menu_layout = hello_elementor_get_setting( 'hello_header_menu_layout' );
|
||||
if ( 'dropdown' === $hello_header_menu_layout ) {
|
||||
$layout_classes[] = 'menu-layout-dropdown';
|
||||
}
|
||||
|
||||
return implode( ' ', $layout_classes );
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to translate the footer layout setting into a class name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function hello_get_footer_layout_class() {
|
||||
$footer_layout = hello_elementor_get_setting( 'hello_footer_layout' );
|
||||
|
||||
$layout_classes = [];
|
||||
|
||||
if ( 'inverted' === $footer_layout ) {
|
||||
$layout_classes[] = 'footer-inverted';
|
||||
} elseif ( 'stacked' === $footer_layout ) {
|
||||
$layout_classes[] = 'footer-stacked';
|
||||
}
|
||||
|
||||
$footer_width = hello_elementor_get_setting( 'hello_footer_width' );
|
||||
|
||||
if ( 'full-width' === $footer_width ) {
|
||||
$layout_classes[] = 'footer-full-width';
|
||||
}
|
||||
|
||||
if ( hello_elementor_get_setting( 'hello_footer_copyright_display' ) && '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) ) {
|
||||
$layout_classes[] = 'footer-has-copyright';
|
||||
}
|
||||
|
||||
return implode( ' ', $layout_classes );
|
||||
}
|
||||
|
||||
add_action( 'elementor/editor/after_enqueue_scripts', function() {
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
||||
|
||||
wp_enqueue_script(
|
||||
'hello-theme-editor',
|
||||
HELLO_THEME_SCRIPTS_URL . 'hello-editor.js',
|
||||
[ 'jquery', 'elementor-editor' ],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'hello-editor',
|
||||
HELLO_THEME_STYLE_URL . 'editor.css',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION
|
||||
);
|
||||
} );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
if ( ! hello_elementor_display_header_footer() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! hello_header_footer_experiment_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
'hello-theme-frontend',
|
||||
HELLO_THEME_SCRIPTS_URL . 'hello-frontend.js',
|
||||
[],
|
||||
HELLO_ELEMENTOR_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
\Elementor\Plugin::$instance->kits_manager->frontend_before_enqueue_styles();
|
||||
} );
|
||||
|
||||
|
||||
/**
|
||||
* Helper function to decide whether to output the header template.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_get_header_display() {
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
|
||||
return (
|
||||
$is_editor
|
||||
|| hello_elementor_get_setting( 'hello_header_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_header_menu_display' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to decide whether to output the footer template.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function hello_get_footer_display() {
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
|
||||
return (
|
||||
$is_editor
|
||||
|| hello_elementor_get_setting( 'hello_footer_logo_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_tagline_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_menu_display' )
|
||||
|| hello_elementor_get_setting( 'hello_footer_copyright_display' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Hello Elementor theme Header & Footer to Experiments.
|
||||
*/
|
||||
add_action( 'elementor/experiments/default-features-registered', function( \Elementor\Core\Experiments\Manager $experiments_manager ) {
|
||||
$experiments_manager->add_feature( [
|
||||
'name' => 'hello-theme-header-footer',
|
||||
'title' => esc_html__( 'Header & Footer', 'hello-elementor' ),
|
||||
'tag' => esc_html__( 'Hello Theme', 'hello-elementor' ),
|
||||
'description' => sprintf(
|
||||
'%1$s <a href="%2$s" target="_blank">%3$s</a>',
|
||||
esc_html__( 'Customize and style the builtin Hello Theme’s cross-site header & footer from the Elementor "Site Settings" panel.', 'hello-elementor' ),
|
||||
'https://go.elementor.com/wp-dash-header-footer',
|
||||
esc_html__( 'Learn More', 'hello-elementor' )
|
||||
),
|
||||
'release_status' => $experiments_manager::RELEASE_STATUS_STABLE,
|
||||
'new_site' => [
|
||||
'minimum_installation_version' => '3.3.0',
|
||||
'default_active' => $experiments_manager::STATE_ACTIVE,
|
||||
],
|
||||
] );
|
||||
} );
|
||||
|
||||
/**
|
||||
* Helper function to check if Header & Footer Experiment is Active/Inactive
|
||||
*/
|
||||
function hello_header_footer_experiment_active() {
|
||||
// If Elementor is not active, return false
|
||||
if ( ! did_action( 'elementor/loaded' ) ) {
|
||||
return false;
|
||||
}
|
||||
// Backwards compat.
|
||||
if ( ! method_exists( \Elementor\Plugin::$instance->experiments, 'is_feature_active' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) ( \Elementor\Plugin::$instance->experiments->is_feature_active( 'hello-theme-header-footer' ) );
|
||||
}
|
||||
284
wp-content/themes/hello-elementor/includes/module-base.php
Normal file
@@ -0,0 +1,284 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Includes;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* Module Base.
|
||||
*
|
||||
* An abstract class providing the properties and methods needed to
|
||||
* manage and handle modules in inheriting classes.
|
||||
*
|
||||
* @abstract
|
||||
* @package HelloTheme
|
||||
* @subpackage HelloThemeModules
|
||||
*/
|
||||
abstract class Module_Base {
|
||||
|
||||
/**
|
||||
* Module class reflection.
|
||||
*
|
||||
* Holds the information about a class.
|
||||
* @access private
|
||||
*
|
||||
* @var ?\ReflectionClass
|
||||
*/
|
||||
private ?\ReflectionClass $reflection = null;
|
||||
|
||||
/**
|
||||
* Module components.
|
||||
*
|
||||
* Holds the module components.
|
||||
* @access private
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private array $components = [];
|
||||
|
||||
/**
|
||||
* Module instance.
|
||||
*
|
||||
* Holds the module instance.
|
||||
* @access protected
|
||||
*
|
||||
* @var Module_Base[]
|
||||
*/
|
||||
protected static array $instances = [];
|
||||
|
||||
/**
|
||||
* Get module name.
|
||||
*
|
||||
* Retrieve the module name.
|
||||
* @access public
|
||||
* @abstract
|
||||
*
|
||||
* @return string Module name.
|
||||
*/
|
||||
abstract public static function get_name(): string;
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @access protected
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
abstract protected function get_component_ids(): array;
|
||||
|
||||
/**
|
||||
* Singleton Instance.
|
||||
*
|
||||
* Ensures only one instance of the module class is loaded or can be loaded.
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return Module_Base An instance of the class.
|
||||
*/
|
||||
public static function instance(): Module_Base {
|
||||
$class_name = static::class_name();
|
||||
|
||||
if ( empty( static::$instances[ $class_name ] ) ) {
|
||||
static::$instances[ $class_name ] = new static(); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
return static::$instances[ $class_name ];
|
||||
}
|
||||
|
||||
/**
|
||||
* is_active
|
||||
*
|
||||
* @access public
|
||||
* @static
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function is_active(): bool {
|
||||
/**
|
||||
* allow enabling/disabling the module on run-time
|
||||
*
|
||||
* @param bool $is_active the filters value
|
||||
*/
|
||||
return apply_filters( 'hello-plus-theme/modules/' . static::get_name() . '/is-active', true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Class name.
|
||||
*
|
||||
* Retrieve the name of the class.
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
public static function class_name(): string {
|
||||
return get_called_class();
|
||||
}
|
||||
|
||||
/**
|
||||
* @access public
|
||||
*
|
||||
* @return \ReflectionClass
|
||||
*/
|
||||
public function get_reflection(): \ReflectionClass {
|
||||
if ( null === $this->reflection ) {
|
||||
try {
|
||||
$this->reflection = new \ReflectionClass( $this );
|
||||
} catch ( \ReflectionException $e ) {
|
||||
if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
|
||||
error_log( $e->getMessage() ); //phpcs:ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->reflection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add module component.
|
||||
*
|
||||
* Add new component to the current module.
|
||||
* @access public
|
||||
*
|
||||
* @param string $id Component ID.
|
||||
* @param mixed $instance An instance of the component.
|
||||
*/
|
||||
public function add_component( string $id, $instance ) {
|
||||
$this->components[ $id ] = $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @access public
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_components(): array {
|
||||
return $this->components;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get module component.
|
||||
*
|
||||
* Retrieve the module component.
|
||||
* @access public
|
||||
*
|
||||
* @param string $id Component ID.
|
||||
*
|
||||
* @return mixed An instance of the component, or `null` if the component
|
||||
* doesn't exist.
|
||||
*/
|
||||
public function get_component( string $id ) {
|
||||
if ( isset( $this->components[ $id ] ) ) {
|
||||
return $this->components[ $id ];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the namespace of the class
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function namespace_name(): string {
|
||||
$class_name = static::class_name();
|
||||
return substr( $class_name, 0, strrpos( $class_name, '\\' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an array of components.
|
||||
* Assumes namespace structure contains `\Components\`
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param ?array $components_ids => component's class name.
|
||||
* @return void
|
||||
*/
|
||||
protected function register_components( ?array $components_ids = null ): void {
|
||||
if ( empty( $components_ids ) ) {
|
||||
$components_ids = $this->get_component_ids();
|
||||
}
|
||||
$namespace = static::namespace_name();
|
||||
foreach ( $components_ids as $component_id ) {
|
||||
$class_name = $namespace . '\\Components\\' . $component_id;
|
||||
$this->add_component( $component_id, new $class_name() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the Module's widgets.
|
||||
* Assumes namespace structure contains `\Widgets\`
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param \Elementor\Widgets_Manager $widgets_manager
|
||||
* @return void
|
||||
*/
|
||||
public function register_widgets( \Elementor\Widgets_Manager $widgets_manager ): void {
|
||||
$widget_ids = $this->get_widget_ids();
|
||||
$namespace = static::namespace_name();
|
||||
|
||||
foreach ( $widget_ids as $widget_id ) {
|
||||
$class_name = $namespace . '\\Widgets\\' . $widget_id;
|
||||
$widgets_manager->register( new $class_name() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @access protected
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
protected function get_widget_ids(): array {
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @access protected
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function register_hooks(): void {
|
||||
add_action( 'elementor/widgets/register', [ $this, 'register_widgets' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone.
|
||||
*
|
||||
* Disable class cloning and throw an error on object clone.
|
||||
*
|
||||
* The whole idea of the singleton design pattern is that there is a single
|
||||
* object. Therefore, we don't want the object to be cloned.
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
public function __clone() {
|
||||
// Cloning instances of the class is forbidden
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'hello-elementor' ), '0.0.1' ); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
/**
|
||||
* Wakeup.
|
||||
*
|
||||
* Disable un-serializing of the class.
|
||||
* @access public
|
||||
*/
|
||||
public function __wakeup() {
|
||||
// Un-serializing instances of the class is forbidden
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Something went wrong.', 'hello-elementor' ), '0.0.1' ); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
/**
|
||||
* class constructor
|
||||
*
|
||||
* @access protected
|
||||
*
|
||||
* @param ?string[] $components_list
|
||||
*/
|
||||
protected function __construct( ?array $components_list = null ) {
|
||||
$this->register_components( $components_list );
|
||||
$this->register_hooks();
|
||||
}
|
||||
}
|
||||
43
wp-content/themes/hello-elementor/includes/script.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Includes;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Script {
|
||||
|
||||
protected string $handle;
|
||||
protected array $dependencies;
|
||||
|
||||
public function __construct( string $handle, array $dependencies = [] ) {
|
||||
$this->handle = $handle;
|
||||
$this->dependencies = $dependencies;
|
||||
}
|
||||
|
||||
public function enqueue() {
|
||||
$asset_path = HELLO_THEME_SCRIPTS_PATH . $this->handle . '.asset.php';
|
||||
$asset_url = HELLO_THEME_SCRIPTS_URL;
|
||||
|
||||
if ( ! file_exists( $asset_path ) ) {
|
||||
throw new \Exception( $asset_path . ' - You need to run `npm run build` for the "hello-elementor" first.' );
|
||||
}
|
||||
|
||||
$script_asset = require $asset_path;
|
||||
|
||||
foreach ( $this->dependencies as $dependency ) {
|
||||
$script_asset['dependencies'][] = $dependency;
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
$this->handle,
|
||||
$asset_url . "$this->handle.js",
|
||||
$script_asset['dependencies'],
|
||||
$script_asset['version'],
|
||||
true
|
||||
);
|
||||
|
||||
\wp_set_script_translations( $this->handle, 'hello-elementor' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
use HelloTheme\Theme;
|
||||
use HelloTheme\Modules\AdminHome\Components\Settings_Controller;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
add_action( 'init', 'hello_elementor_tweak_settings', 0 );
|
||||
|
||||
function hello_elementor_tweak_settings() {
|
||||
/**
|
||||
* @var Settings_Controller $settings_controller
|
||||
*/
|
||||
$settings_controller = Theme::instance()
|
||||
->get_module( 'AdminHome' )
|
||||
->get_component( 'Settings_Controller' );
|
||||
|
||||
$settings_controller->legacy_register_settings();
|
||||
}
|
||||
/**
|
||||
* Register a new setting.
|
||||
*
|
||||
* @deprecated 3.4.0
|
||||
*/
|
||||
function hello_elementor_register_settings( $settings_group, $settings ) {
|
||||
/**
|
||||
* @var Settings_Controller $settings_controller
|
||||
*/
|
||||
$settings_controller = Theme::instance()
|
||||
->get_module( 'AdminHome' )
|
||||
->get_component( 'Settings_Controller' );
|
||||
|
||||
$settings_controller->register_settings( $settings_group, $settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Run a tweek only if the user requested it.
|
||||
*
|
||||
* @deprecated 3.4.0
|
||||
*/
|
||||
function hello_elementor_do_tweak( $setting, $tweak_callback ) {
|
||||
/**
|
||||
* @var Settings_Controller $settings_controller
|
||||
*/
|
||||
$settings_controller = Theme::instance()
|
||||
->get_module( 'AdminHome' )
|
||||
->get_component( 'Settings_Controller' );
|
||||
|
||||
$settings_controller->apply_setting( $setting, $tweak_callback );
|
||||
}
|
||||
|
||||
/**
|
||||
* Render theme tweaks.
|
||||
*
|
||||
* @deprecated 3.4.0
|
||||
*/
|
||||
function hello_elementor_render_tweaks( $settings_group, $settings ) {
|
||||
/**
|
||||
* @var Settings_Controller $settings_controller
|
||||
*/
|
||||
$settings_controller = Theme::instance()
|
||||
->get_module( 'AdminHome' )
|
||||
->get_component( 'Settings_Controller' );
|
||||
|
||||
$settings_controller->apply_settings( $settings_group, $settings );
|
||||
}
|
||||
@@ -0,0 +1,756 @@
|
||||
<?php
|
||||
|
||||
namespace HelloElementor\Includes\Settings;
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Settings_Footer extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
return 'hello-settings-footer';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Hello Theme Footer', 'hello-elementor' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-footer';
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return 'theme-style';
|
||||
}
|
||||
|
||||
protected function register_tab_controls() {
|
||||
$start = is_rtl() ? 'right' : 'left';
|
||||
$end = ! is_rtl() ? 'right' : 'left';
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Footer', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_logo_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-branding',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .site-navigation',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
'selector' => '.site-footer .copyright',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_disable_note',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'warning',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens the theme settings page. */
|
||||
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => '',
|
||||
'hello_footer_tagline_display' => '',
|
||||
'hello_footer_menu_display' => '',
|
||||
'hello_footer_copyright_display' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_layout',
|
||||
[
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'inverted' => [
|
||||
'title' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$start",
|
||||
],
|
||||
'stacked' => [
|
||||
'title' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||
'icon' => 'eicon-h-align-center',
|
||||
],
|
||||
'default' => [
|
||||
'title' => esc_html__( 'Default', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$end",
|
||||
],
|
||||
],
|
||||
'toggle' => false,
|
||||
'selector' => '.site-footer',
|
||||
'default' => 'default',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_tagline_position',
|
||||
[
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'label' => esc_html__( 'Tagline Position', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'before' => [
|
||||
'title' => esc_html__( 'Before', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$start",
|
||||
],
|
||||
'below' => [
|
||||
'title' => esc_html__( 'Below', 'hello-elementor' ),
|
||||
'icon' => 'eicon-arrow-down',
|
||||
],
|
||||
'after' => [
|
||||
'title' => esc_html__( 'After', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$end",
|
||||
],
|
||||
],
|
||||
'toggle' => false,
|
||||
'default' => 'below',
|
||||
'selectors_dictionary' => [
|
||||
'before' => 'flex-direction: row-reverse; align-items: center;',
|
||||
'below' => 'flex-direction: column; align-items: stretch;',
|
||||
'after' => 'flex-direction: row; align-items: center;',
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-branding' => '{{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_tagline_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Tagline Gap', 'hello-elementor' ),
|
||||
'size_units' => [ 'px', 'em ', 'rem', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 10,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 10,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-branding' => 'gap: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_width',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-footer',
|
||||
'default' => 'boxed',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_custom_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 2000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_width' => 'boxed',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .footer-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Side Margins', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 5,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 5,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_layout!' => 'stacked',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_background',
|
||||
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'separator' => 'before',
|
||||
'selector' => '.site-footer',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_logo_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display!' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_logo_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'logo',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_logo_type',
|
||||
[
|
||||
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'logo',
|
||||
'options' => [
|
||||
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_footer_logo_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 1000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'logo',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_title_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-footer .site-title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_title_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-footer .site-title a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_title_text_stroke',
|
||||
'label' => esc_html__( 'Text Stroke', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-footer .site-title a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'hello_footer_title_colors' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'hello_footer_title_colors_normal',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-title a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'hello_footer_title_colors_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_hover_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_logo_display' => 'yes',
|
||||
'hello_footer_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-title a:hover' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_title_hover_color_transition_duration',
|
||||
[
|
||||
'label' => esc_html__( 'Transition Duration', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 's', 'ms', 'custom' ],
|
||||
'default' => [
|
||||
'unit' => 's',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-title a' => 'transition-duration: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_tagline',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_tagline_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .site-description' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_tagline_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_tagline_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_menu_tab',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_menu_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$available_menus = wp_get_nav_menus();
|
||||
|
||||
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||
foreach ( $available_menus as $available_menu ) {
|
||||
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||
}
|
||||
|
||||
if ( 1 === count( $menus ) ) {
|
||||
$this->add_control(
|
||||
'hello_footer_menu_notice',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'heading' => esc_html__( 'There are no menus in your site.', 'hello-elementor' ),
|
||||
'content' => sprintf(
|
||||
__( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ),
|
||||
admin_url( 'nav-menus.php?action=edit&menu=0' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->add_control(
|
||||
'hello_footer_menu_warning',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
__( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus. Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||
admin_url( 'nav-menus.php' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu',
|
||||
[
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => $menus,
|
||||
'default' => array_keys( $menus )[0],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_menu_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'footer .footer-inner .site-navigation a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_menu_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'selector' => 'footer .footer-inner .site-navigation a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_menu_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'selector' => 'footer .footer-inner .site-navigation a',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_footer_copyright_section',
|
||||
[
|
||||
'tab' => 'hello-settings-footer',
|
||||
'label' => esc_html__( 'Copyright', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_footer_copyright_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_text',
|
||||
[
|
||||
'type' => Controls_Manager::TEXTAREA,
|
||||
'label' => esc_html__( 'Text', 'hello-elementor' ),
|
||||
'default' => esc_html__( 'All rights reserved', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_footer_copyright_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_footer_copyright_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-footer .copyright p' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_copyright_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_copyright_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .copyright p',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_footer_copyright_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_footer_copyright_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-footer .copyright p',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
public function on_save( $data ) {
|
||||
// Save chosen footer menu to the WP settings.
|
||||
if ( isset( $data['settings']['hello_footer_menu'] ) ) {
|
||||
$menu_id = $data['settings']['hello_footer_menu'];
|
||||
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||
$locations['menu-2'] = (int) $menu_id;
|
||||
set_theme_mod( 'nav_menu_locations', $locations );
|
||||
}
|
||||
}
|
||||
|
||||
public function get_additional_tab_content() {
|
||||
$content_template = '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||
<p class="elementor-nerd-box-title">%3$s</p>
|
||||
<p class="elementor-nerd-box-message">%4$s</p>
|
||||
<a class="elementor-nerd-box-link elementor-button go-pro" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>';
|
||||
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create custom footers', 'hello-elementor' ),
|
||||
esc_html__( 'Adjust your footer to include contact forms, sitemaps and more with Elementor Pro.', 'hello-elementor' ),
|
||||
'https://go.elementor.com/hello-theme-footer/',
|
||||
esc_html__( 'Upgrade Now', 'hello-elementor' )
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom footer with the Theme Builder', 'hello-elementor' ),
|
||||
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/footer' ),
|
||||
esc_html__( 'Create Footer', 'hello-elementor' )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,789 @@
|
||||
<?php
|
||||
|
||||
namespace HelloElementor\Includes\Settings;
|
||||
|
||||
use Elementor\Plugin;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Background;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use Elementor\Group_Control_Text_Stroke;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Kits\Documents\Tabs\Tab_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
class Settings_Header extends Tab_Base {
|
||||
|
||||
public function get_id() {
|
||||
return 'hello-settings-header';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Hello Theme Header', 'hello-elementor' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-header';
|
||||
}
|
||||
|
||||
public function get_help_url() {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function get_group() {
|
||||
return 'theme-style';
|
||||
}
|
||||
|
||||
protected function register_tab_controls() {
|
||||
$start = is_rtl() ? 'right' : 'left';
|
||||
$end = ! is_rtl() ? 'right' : 'left';
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_section',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Header', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_logo_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_display',
|
||||
[
|
||||
'type' => Controls_Manager::SWITCHER,
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'default' => 'yes',
|
||||
'label_on' => esc_html__( 'Show', 'hello-elementor' ),
|
||||
'label_off' => esc_html__( 'Hide', 'hello-elementor' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_disable_note',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'warning',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens the theme settings page. */
|
||||
__( 'Note: Hiding all the elements, only hides them visually. To disable them completely go to <a href="%s">Theme Settings</a> .', 'hello-elementor' ),
|
||||
admin_url( 'themes.php?page=hello-theme-settings' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => '',
|
||||
'hello_header_tagline_display' => '',
|
||||
'hello_header_menu_display' => '',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_layout',
|
||||
[
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'label' => esc_html__( 'Layout', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'inverted' => [
|
||||
'title' => esc_html__( 'Inverted', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$start",
|
||||
],
|
||||
'stacked' => [
|
||||
'title' => esc_html__( 'Centered', 'hello-elementor' ),
|
||||
'icon' => 'eicon-h-align-center',
|
||||
],
|
||||
'default' => [
|
||||
'title' => esc_html__( 'Default', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$end",
|
||||
],
|
||||
],
|
||||
'toggle' => false,
|
||||
'selector' => '.site-header',
|
||||
'default' => 'default',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_tagline_position',
|
||||
[
|
||||
'type' => Controls_Manager::CHOOSE,
|
||||
'label' => esc_html__( 'Tagline Position', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'before' => [
|
||||
'title' => esc_html__( 'Before', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$start",
|
||||
],
|
||||
'below' => [
|
||||
'title' => esc_html__( 'Below', 'hello-elementor' ),
|
||||
'icon' => 'eicon-arrow-down',
|
||||
],
|
||||
'after' => [
|
||||
'title' => esc_html__( 'After', 'hello-elementor' ),
|
||||
'icon' => "eicon-arrow-$end",
|
||||
],
|
||||
],
|
||||
'toggle' => false,
|
||||
'default' => 'below',
|
||||
'selectors_dictionary' => [
|
||||
'before' => 'flex-direction: row-reverse; align-items: center;',
|
||||
'below' => 'flex-direction: column; align-items: stretch;',
|
||||
'after' => 'flex-direction: row; align-items: center;',
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
'hello_header_logo_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-branding' => '{{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_tagline_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Tagline Gap', 'hello-elementor' ),
|
||||
'size_units' => [ 'px', 'em ', 'rem', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 10,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 10,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
'hello_header_logo_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-branding' => 'gap: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_width',
|
||||
[
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'label' => esc_html__( 'Width', 'hello-elementor' ),
|
||||
'options' => [
|
||||
'boxed' => esc_html__( 'Boxed', 'hello-elementor' ),
|
||||
'full-width' => esc_html__( 'Full Width', 'hello-elementor' ),
|
||||
],
|
||||
'selector' => '.site-header',
|
||||
'default' => 'boxed',
|
||||
'separator' => 'before',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_custom_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Content Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 2000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_width' => 'boxed',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .header-inner' => 'width: {{SIZE}}{{UNIT}}; max-width: 100%;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_gap',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Side Margins', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em ', 'rem', 'vw', 'custom' ],
|
||||
'default' => [
|
||||
'size' => '0',
|
||||
],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 5,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 5,
|
||||
],
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header' => 'padding-inline-end: {{SIZE}}{{UNIT}}; padding-inline-start: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_layout',
|
||||
'operator' => '!=',
|
||||
'value' => 'stacked',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Background::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_background',
|
||||
'label' => esc_html__( 'Background', 'hello-elementor' ),
|
||||
'types' => [ 'classic', 'gradient' ],
|
||||
'separator' => 'before',
|
||||
'selector' => '.site-header',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_logo_section',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Site Logo', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_logo_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_logo_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s logo', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'logo',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s title', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_logo_type',
|
||||
[
|
||||
'label' => esc_html__( 'Type', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => ( has_custom_logo() ? 'logo' : 'title' ),
|
||||
'options' => [
|
||||
'logo' => esc_html__( 'Logo', 'hello-elementor' ),
|
||||
'title' => esc_html__( 'Title', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'hello_header_logo_width',
|
||||
[
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'label' => esc_html__( 'Logo Width', 'hello-elementor' ),
|
||||
'size_units' => [ '%', 'px', 'em', 'rem', 'vw', 'custom' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'max' => 1000,
|
||||
],
|
||||
'em' => [
|
||||
'max' => 100,
|
||||
],
|
||||
'rem' => [
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'logo',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-branding .site-logo img' => 'width: {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_title_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-header .site-title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_title_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-header .site-title a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Stroke::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_title_text_stroke',
|
||||
'label' => esc_html__( 'Text Stroke', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selector' => '.site-header .site-title a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->start_controls_tabs( 'hello_header_title_colors' );
|
||||
|
||||
$this->start_controls_tab(
|
||||
'hello_header_title_colors_normal',
|
||||
[
|
||||
'label' => esc_html__( 'Normal', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-title a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->start_controls_tab(
|
||||
'hello_header_title_colors_hover',
|
||||
[
|
||||
'label' => esc_html__( 'Hover', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_hover_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_logo_display' => 'yes',
|
||||
'hello_header_logo_type' => 'title',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-title a:hover' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_title_hover_color_transition_duration',
|
||||
[
|
||||
'label' => esc_html__( 'Transition Duration', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 's', 'ms', 'custom' ],
|
||||
'default' => [
|
||||
'unit' => 's',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-title a' => 'transition-duration: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_tab();
|
||||
|
||||
$this->end_controls_tabs();
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_tagline',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Tagline', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_tagline_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_link',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
/* translators: %s: Link that opens Elementor's "Site Identity" panel. */
|
||||
__( 'Go to <a href="%s">Site Identity</a> to manage your site\'s tagline', 'hello-elementor' ),
|
||||
"javascript:\$e.route('panel/global/settings-site-identity')"
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_tagline_color',
|
||||
[
|
||||
'label' => esc_html__( 'Text Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-description' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_tagline_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_tagline_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_tagline_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-description',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'hello_header_menu_tab',
|
||||
[
|
||||
'tab' => 'hello-settings-header',
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'conditions' => [
|
||||
'relation' => 'and',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'hello_header_menu_display',
|
||||
'operator' => '=',
|
||||
'value' => 'yes',
|
||||
],
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$available_menus = wp_get_nav_menus();
|
||||
|
||||
$menus = [ '0' => esc_html__( '— Select a Menu —', 'hello-elementor' ) ];
|
||||
foreach ( $available_menus as $available_menu ) {
|
||||
$menus[ $available_menu->term_id ] = $available_menu->name;
|
||||
}
|
||||
|
||||
if ( 1 === count( $menus ) ) {
|
||||
$this->add_control(
|
||||
'hello_header_menu_notice',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'heading' => esc_html__( 'There are no menus in your site.', 'hello-elementor' ),
|
||||
'content' => sprintf(
|
||||
__( 'Go to <a href="%s" target="_blank">Menus screen</a> to create one.', 'hello-elementor' ),
|
||||
admin_url( 'nav-menus.php?action=edit&menu=0' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->add_control(
|
||||
'hello_header_menu_warning',
|
||||
[
|
||||
'type' => Controls_Manager::ALERT,
|
||||
'alert_type' => 'info',
|
||||
'content' => sprintf(
|
||||
__( 'Go to the <a href="%s" target="_blank">Menus screen</a> to manage your menus. Changes will be reflected in the preview only after the page reloads.', 'hello-elementor' ),
|
||||
admin_url( 'nav-menus.php' )
|
||||
),
|
||||
'render_type' => 'ui',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu',
|
||||
[
|
||||
'label' => esc_html__( 'Menu', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'options' => $menus,
|
||||
'default' => array_keys( $menus )[0],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_layout',
|
||||
[
|
||||
'label' => esc_html__( 'Menu Layout', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'horizontal',
|
||||
'options' => [
|
||||
'horizontal' => esc_html__( 'Horizontal', 'hello-elementor' ),
|
||||
'dropdown' => esc_html__( 'Dropdown', 'hello-elementor' ),
|
||||
],
|
||||
'frontend_available' => true,
|
||||
]
|
||||
);
|
||||
|
||||
$dropdown_options = [];
|
||||
$active_breakpoints = Plugin::$instance->breakpoints->get_active_breakpoints();
|
||||
$selected_breakpoints = [ 'mobile', 'tablet' ];
|
||||
|
||||
foreach ( $active_breakpoints as $breakpoint_key => $breakpoint_instance ) {
|
||||
if ( ! in_array( $breakpoint_key, $selected_breakpoints, true ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$dropdown_options[ $breakpoint_key ] = sprintf(
|
||||
/* translators: 1: Breakpoint label, 2: Breakpoint value. */
|
||||
esc_html__( '%1$s (> %2$dpx)', 'hello-elementor' ),
|
||||
$breakpoint_instance->get_label(),
|
||||
$breakpoint_instance->get_value()
|
||||
);
|
||||
}
|
||||
|
||||
$dropdown_options['none'] = esc_html__( 'None', 'hello-elementor' );
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_dropdown',
|
||||
[
|
||||
'label' => esc_html__( 'Breakpoint', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'tablet',
|
||||
'options' => $dropdown_options,
|
||||
'selector' => '.site-header',
|
||||
'condition' => [
|
||||
'hello_header_menu_layout!' => 'dropdown',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_color',
|
||||
[
|
||||
'label' => esc_html__( 'Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-navigation ul.menu li a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_toggle_color',
|
||||
[
|
||||
'label' => esc_html__( 'Toggle Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-navigation-toggle .site-navigation-toggle-icon' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'hello_header_menu_toggle_background_color',
|
||||
[
|
||||
'label' => esc_html__( 'Toggle Background Color', 'hello-elementor' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selectors' => [
|
||||
'.site-header .site-navigation-toggle' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_menu_typography',
|
||||
'label' => esc_html__( 'Typography', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-navigation .menu li',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Text_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'hello_header_menu_text_shadow',
|
||||
'label' => esc_html__( 'Text Shadow', 'hello-elementor' ),
|
||||
'condition' => [
|
||||
'hello_header_menu_display' => 'yes',
|
||||
],
|
||||
'selector' => '.site-header .site-navigation .menu li',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
public function on_save( $data ) {
|
||||
// Save chosen header menu to the WP settings.
|
||||
if ( isset( $data['settings']['hello_header_menu'] ) ) {
|
||||
$menu_id = $data['settings']['hello_header_menu'];
|
||||
$locations = get_theme_mod( 'nav_menu_locations' );
|
||||
$locations['menu-1'] = (int) $menu_id;
|
||||
set_theme_mod( 'nav_menu_locations', $locations );
|
||||
}
|
||||
}
|
||||
|
||||
public function get_additional_tab_content() {
|
||||
$content_template = '
|
||||
<div class="hello-elementor elementor-nerd-box">
|
||||
<img src="%1$s" class="elementor-nerd-box-icon" alt="%2$s">
|
||||
<p class="elementor-nerd-box-title">%3$s</p>
|
||||
<p class="elementor-nerd-box-message">%4$s</p>
|
||||
<a class="elementor-nerd-box-link elementor-button go-pro" target="_blank" href="%5$s">%6$s</a>
|
||||
</div>';
|
||||
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) ) {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Get Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create custom headers', 'hello-elementor' ),
|
||||
esc_html__( 'Add mega menus, search bars, login buttons and more with Elementor Pro.', 'hello-elementor' ),
|
||||
'https://go.elementor.com/hello-theme-header/',
|
||||
esc_html__( 'Upgrade Now', 'hello-elementor' )
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
$content_template,
|
||||
get_template_directory_uri() . '/assets/images/go-pro.svg',
|
||||
esc_attr__( 'Elementor Pro', 'hello-elementor' ),
|
||||
esc_html__( 'Create a custom header with the Theme Builder', 'hello-elementor' ),
|
||||
esc_html__( 'With the Theme Builder you can jump directly into each part of your site', 'hello-elementor' ),
|
||||
get_admin_url( null, 'admin.php?page=elementor-app#/site-editor/templates/header' ),
|
||||
esc_html__( 'Create Header', 'hello-elementor' )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
115
wp-content/themes/hello-elementor/includes/utils.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Includes;
|
||||
|
||||
use Elementor\App\App;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* class Utils
|
||||
**/
|
||||
class Utils {
|
||||
|
||||
public static function elementor(): \Elementor\Plugin {
|
||||
return \Elementor\Plugin::$instance;
|
||||
}
|
||||
|
||||
public static function has_pro(): bool {
|
||||
return defined( 'ELEMENTOR_PRO_VERSION' );
|
||||
}
|
||||
|
||||
public static function is_elementor_active(): bool {
|
||||
static $elementor_active = null;
|
||||
if ( null === $elementor_active ) {
|
||||
$elementor_active = defined( 'ELEMENTOR_VERSION' );
|
||||
}
|
||||
|
||||
return $elementor_active;
|
||||
}
|
||||
|
||||
public static function is_elementor_installed(): bool {
|
||||
static $elementor_installed = null;
|
||||
if ( null === $elementor_installed ) {
|
||||
$elementor_installed = file_exists( WP_PLUGIN_DIR . '/elementor/elementor.php' );
|
||||
}
|
||||
|
||||
return $elementor_installed;
|
||||
}
|
||||
|
||||
public static function get_theme_builder_slug(): string {
|
||||
if ( ! class_exists( 'Elementor\App\App' ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( self::has_pro() ) {
|
||||
return App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION . '#site-editor';
|
||||
}
|
||||
|
||||
if ( self::is_elementor_active() ) {
|
||||
return App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION . '#site-editor/promotion';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public static function get_theme_builder_url(): string {
|
||||
if ( ! class_exists( 'Elementor\App\App' ) ) {
|
||||
return 'https://go.elementor.com/hello-theme-builder';
|
||||
}
|
||||
|
||||
if ( self::has_pro() ) {
|
||||
return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor';
|
||||
}
|
||||
|
||||
if ( self::is_elementor_active() ) {
|
||||
return admin_url( 'admin.php?page=' . App::PAGE_ID . '&ver=' . ELEMENTOR_VERSION ) . '#site-editor/promotion';
|
||||
}
|
||||
|
||||
return 'https://go.elementor.com/hello-theme-builder';
|
||||
}
|
||||
|
||||
public static function get_elementor_activation_link(): string {
|
||||
$plugin = 'elementor/elementor.php';
|
||||
|
||||
$url = 'plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all';
|
||||
|
||||
return add_query_arg( '_wpnonce', wp_create_nonce( 'activate-plugin_' . $plugin ), $url );
|
||||
}
|
||||
|
||||
public static function get_ai_site_planner_url(): string {
|
||||
return 'https://go.elementor.com/hello-site-planner';
|
||||
}
|
||||
|
||||
public static function get_plugin_install_url( $plugin_slug ): string {
|
||||
$action = 'install-plugin';
|
||||
|
||||
$url = add_query_arg(
|
||||
[
|
||||
'action' => $action,
|
||||
'plugin' => $plugin_slug,
|
||||
'referrer' => 'hello-elementor',
|
||||
],
|
||||
admin_url( 'update.php' )
|
||||
);
|
||||
|
||||
return add_query_arg( '_wpnonce', wp_create_nonce( $action . '_' . $plugin_slug ), $url );
|
||||
}
|
||||
|
||||
public static function get_action_link_type() {
|
||||
$installed_plugins = get_plugins();
|
||||
|
||||
if ( ! isset( $installed_plugins['elementor/elementor.php'] ) ) {
|
||||
$action_link_type = 'install-elementor';
|
||||
} elseif ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
||||
$action_link_type = 'activate-elementor';
|
||||
} elseif ( ! hello_header_footer_experiment_active() ) {
|
||||
$action_link_type = 'activate-header-footer-experiment';
|
||||
} else {
|
||||
$action_link_type = 'style-header-footer';
|
||||
}
|
||||
return $action_link_type;
|
||||
}
|
||||
}
|
||||
36
wp-content/themes/hello-elementor/index.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* The site's entry point.
|
||||
*
|
||||
* Loads the relevant template part,
|
||||
* the loop is executed (when needed) by the relevant template part.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
get_header();
|
||||
|
||||
$is_elementor_theme_exist = function_exists( 'elementor_theme_do_location' );
|
||||
|
||||
if ( is_singular() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||
get_template_part( 'template-parts/single' );
|
||||
}
|
||||
} elseif ( is_archive() || is_home() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||
get_template_part( 'template-parts/archive' );
|
||||
}
|
||||
} elseif ( is_search() ) {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'archive' ) ) {
|
||||
get_template_part( 'template-parts/search' );
|
||||
}
|
||||
} else {
|
||||
if ( ! $is_elementor_theme_exist || ! elementor_theme_do_location( 'single' ) ) {
|
||||
get_template_part( 'template-parts/404' );
|
||||
}
|
||||
}
|
||||
|
||||
get_footer();
|
||||
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use HelloTheme\Includes\Script;
|
||||
use HelloTheme\Includes\Utils;
|
||||
|
||||
class Admin_Menu_Controller {
|
||||
|
||||
const MENU_PAGE_ICON = 'dashicons-plus-alt';
|
||||
const MENU_PAGE_POSITION = 59.9;
|
||||
const AI_SITE_PLANNER_SLUG = '-ai-site-planner';
|
||||
const THEME_BUILDER_SLUG = '-theme-builder';
|
||||
|
||||
public function admin_menu(): void {
|
||||
add_menu_page(
|
||||
__( 'Hello', 'hello-elementor' ),
|
||||
__( 'Hello', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
EHP_THEME_SLUG,
|
||||
[ $this, 'render_home' ],
|
||||
self::MENU_PAGE_ICON,
|
||||
self::MENU_PAGE_POSITION
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
EHP_THEME_SLUG,
|
||||
__( 'Home', 'hello-elementor' ),
|
||||
__( 'Home', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
EHP_THEME_SLUG,
|
||||
[ $this, 'render_home' ]
|
||||
);
|
||||
|
||||
do_action( 'hello-plus-theme/admin-menu', EHP_THEME_SLUG );
|
||||
|
||||
$theme_builder_slug = Utils::get_theme_builder_slug();
|
||||
add_submenu_page(
|
||||
EHP_THEME_SLUG,
|
||||
__( 'Theme Builder', 'hello-elementor' ),
|
||||
__( 'Theme Builder', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
empty( $theme_builder_slug ) ? EHP_THEME_SLUG . self::THEME_BUILDER_SLUG : $theme_builder_slug,
|
||||
[ $this, 'render_home' ]
|
||||
);
|
||||
|
||||
add_submenu_page(
|
||||
EHP_THEME_SLUG,
|
||||
__( 'AI Site Planner', 'hello-elementor' ),
|
||||
__( 'AI Site Planner', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
EHP_THEME_SLUG . self::AI_SITE_PLANNER_SLUG,
|
||||
[ $this, 'render_home' ]
|
||||
);
|
||||
}
|
||||
|
||||
public function render_home(): void {
|
||||
echo '<div id="ehe-admin-home"></div>';
|
||||
}
|
||||
|
||||
public function redirect_menus(): void {
|
||||
$page = sanitize_key( filter_input( INPUT_GET, 'page', FILTER_UNSAFE_RAW ) );
|
||||
|
||||
switch ( $page ) {
|
||||
case EHP_THEME_SLUG . self::AI_SITE_PLANNER_SLUG:
|
||||
wp_redirect( Utils::get_ai_site_planner_url() );
|
||||
exit;
|
||||
|
||||
case EHP_THEME_SLUG . self::THEME_BUILDER_SLUG:
|
||||
wp_redirect( Utils::get_theme_builder_url() );
|
||||
exit;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function admin_enqueue_scripts() {
|
||||
$script = new Script(
|
||||
'hello-elementor-menu',
|
||||
);
|
||||
|
||||
$script->enqueue();
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
add_action( 'admin_menu', [ $this, 'admin_menu' ] );
|
||||
add_action( 'admin_init', [ $this, 'redirect_menus' ] );
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
use HelloTheme\Includes\Script;
|
||||
use HelloTheme\Includes\Utils;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Admin_Top_Bar {
|
||||
|
||||
private function render_admin_top_bar() {
|
||||
?>
|
||||
<div id="ehe-admin-top-bar-root" style="height: 50px">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
private function is_top_bar_active() {
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
return ( false !== strpos( $current_screen->id ?? '', EHP_THEME_SLUG ) ) &&
|
||||
! Utils::is_elementor_active();
|
||||
}
|
||||
|
||||
private function enqueue_scripts() {
|
||||
$script = new Script(
|
||||
'hello-elementor-topbar',
|
||||
);
|
||||
|
||||
$script->enqueue();
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
if ( ! is_admin() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_action( 'current_screen', function () {
|
||||
if ( ! $this->is_top_bar_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_action( 'in_admin_header', function () {
|
||||
$this->render_admin_top_bar();
|
||||
} );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', function () {
|
||||
$this->enqueue_scripts();
|
||||
} );
|
||||
} );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Ajax_Handler {
|
||||
|
||||
public function __construct() {
|
||||
add_action( 'wp_ajax_ehe_install_elementor', [ $this, 'install_elementor' ] );
|
||||
}
|
||||
|
||||
public function install_elementor() {
|
||||
wp_ajax_install_plugin();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use HelloTheme\Modules\AdminHome\Rest\Admin_Config;
|
||||
use HelloTheme\Modules\AdminHome\Rest\Promotions;
|
||||
use HelloTheme\Modules\AdminHome\Rest\Theme_Settings;
|
||||
use HelloTheme\Modules\AdminHome\Rest\Whats_New;
|
||||
|
||||
class Api_Controller {
|
||||
|
||||
protected $endpoints = [];
|
||||
|
||||
public function __construct() {
|
||||
$this->endpoints['promotions'] = new Promotions();
|
||||
$this->endpoints['admin-config'] = new Admin_Config();
|
||||
$this->endpoints['theme-settings'] = new Theme_Settings();
|
||||
$this->endpoints['whats-new'] = new Whats_New();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
use HelloTheme\Includes\Script;
|
||||
use HelloTheme\Includes\Utils;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Conversion_Banner {
|
||||
|
||||
private function render_conversion_banner() {
|
||||
?>
|
||||
<div id="ehe-admin-cb" style="width: calc(100% - 48px)">
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
private function is_conversion_banner_active(): bool {
|
||||
if ( get_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Utils::has_pro() && Utils::is_elementor_active() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$current_screen = get_current_screen();
|
||||
|
||||
return false === strpos( $current_screen->id ?? '', EHP_THEME_SLUG );
|
||||
}
|
||||
|
||||
private function enqueue_scripts() {
|
||||
$script = new Script(
|
||||
'hello-conversion-banner',
|
||||
[ 'wp-util' ]
|
||||
);
|
||||
|
||||
$script->enqueue();
|
||||
|
||||
$is_installing_plugin_with_uploader = 'upload-plugin' === filter_input( INPUT_GET, 'action', FILTER_UNSAFE_RAW );
|
||||
|
||||
wp_localize_script(
|
||||
'hello-conversion-banner',
|
||||
'ehe_cb',
|
||||
[
|
||||
'nonce' => wp_create_nonce( 'ehe_cb_nonce' ),
|
||||
'beforeWrap' => $is_installing_plugin_with_uploader,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function dismiss_theme_notice() {
|
||||
check_ajax_referer( 'ehe_cb_nonce', 'nonce' );
|
||||
|
||||
update_user_meta( get_current_user_id(), '_hello_elementor_install_notice', true );
|
||||
|
||||
wp_send_json_success( [ 'message' => __( 'Notice dismissed.', 'hello-elementor' ) ] );
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
|
||||
add_action( 'wp_ajax_ehe_dismiss_theme_notice', [ $this, 'dismiss_theme_notice' ] );
|
||||
|
||||
add_action( 'current_screen', function () {
|
||||
if ( ! $this->is_conversion_banner_active() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
add_action( 'in_admin_header', function () {
|
||||
$this->render_conversion_banner();
|
||||
}, 11 );
|
||||
|
||||
add_action( 'admin_enqueue_scripts', function () {
|
||||
$this->enqueue_scripts();
|
||||
} );
|
||||
} );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use Elementor\WPNotificationsPackage\V120\Notifications as Notifications_SDK;
|
||||
|
||||
class Notificator {
|
||||
private ?Notifications_SDK $notificator = null;
|
||||
|
||||
public function get_notifications_by_conditions( $force_request = false ) {
|
||||
return $this->notificator->get_notifications_by_conditions( $force_request );
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
if ( ! class_exists( 'Elementor\WPNotificationsPackage\V120\Notifications' ) ) {
|
||||
require_once HELLO_THEME_PATH . '/vendor/autoload.php';
|
||||
}
|
||||
|
||||
$this->notificator = new Notifications_SDK( [
|
||||
'app_name' => 'hello-elementor',
|
||||
'app_version' => HELLO_ELEMENTOR_VERSION,
|
||||
'short_app_name' => 'hello-elementor',
|
||||
'app_data' => [
|
||||
'theme_name' => 'hello-elementor',
|
||||
],
|
||||
] );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use HelloTheme\Includes\Script;
|
||||
|
||||
class Scripts_Controller {
|
||||
|
||||
public function __construct() {
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'admin_enqueue_scripts' ] );
|
||||
}
|
||||
|
||||
public function admin_enqueue_scripts() {
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( 'toplevel_page_' . EHP_THEME_SLUG !== $screen->id ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$script = new Script(
|
||||
'hello-home-app',
|
||||
[ 'wp-util' ]
|
||||
);
|
||||
|
||||
$script->enqueue();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Components;
|
||||
|
||||
use HelloTheme\Includes\Script;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Settings_Controller {
|
||||
|
||||
const SETTINGS_FILTER_NAME = 'hello-plus-theme/settings';
|
||||
const SETTINGS_PAGE_SLUG = 'hello-elementor-settings';
|
||||
const SETTING_PREFIX = 'hello_elementor_settings';
|
||||
const SETTINGS = [
|
||||
'DESCRIPTION_META_TAG' => '_description_meta_tag',
|
||||
'SKIP_LINK' => '_skip_link',
|
||||
'HEADER_FOOTER' => '_header_footer',
|
||||
'PAGE_TITLE' => '_page_title',
|
||||
'HELLO_STYLE' => '_hello_style',
|
||||
'HELLO_THEME' => '_hello_theme',
|
||||
];
|
||||
|
||||
public static function get_settings_mapping(): array {
|
||||
return array_map(
|
||||
function ( $key ) {
|
||||
return self::SETTING_PREFIX . $key;
|
||||
},
|
||||
self::SETTINGS
|
||||
);
|
||||
}
|
||||
|
||||
public static function get_settings(): array {
|
||||
|
||||
$settings = array_map( function ( $key ) {
|
||||
return self::get_option( $key ) === 'true';
|
||||
}, self::get_settings_mapping() );
|
||||
|
||||
return apply_filters( self::SETTINGS_FILTER_NAME, $settings );
|
||||
}
|
||||
|
||||
protected static function get_option( string $option_name, $default_value = false ) {
|
||||
$option = get_option( $option_name, $default_value );
|
||||
|
||||
return apply_filters( self::SETTINGS_FILTER_NAME . '/' . $option_name, $option );
|
||||
}
|
||||
|
||||
public function legacy_register_settings() {
|
||||
$this->register_settings();
|
||||
$this->apply_settings();
|
||||
}
|
||||
|
||||
public function apply_setting( $setting, $tweak_callback ) {
|
||||
$option = get_option( $setting );
|
||||
|
||||
if ( isset( $option ) && ( 'true' === $option ) && is_callable( $tweak_callback ) ) {
|
||||
$tweak_callback();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function apply_settings( $settings_group = self::SETTING_PREFIX, $settings = self::SETTINGS ) {
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['DESCRIPTION_META_TAG'],
|
||||
function () {
|
||||
remove_action( 'wp_head', 'hello_elementor_add_description_meta_tag' );
|
||||
}
|
||||
);
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['SKIP_LINK'],
|
||||
function () {
|
||||
add_filter( 'hello_elementor_enable_skip_link', '__return_false' );
|
||||
}
|
||||
);
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['HEADER_FOOTER'],
|
||||
function () {
|
||||
add_filter( 'hello_elementor_header_footer', '__return_false' );
|
||||
}
|
||||
);
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['PAGE_TITLE'],
|
||||
function () {
|
||||
add_filter( 'hello_elementor_page_title', '__return_false' );
|
||||
}
|
||||
);
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['HELLO_STYLE'],
|
||||
function () {
|
||||
add_filter( 'hello_elementor_enqueue_style', '__return_false' );
|
||||
}
|
||||
);
|
||||
|
||||
$this->apply_setting(
|
||||
$settings_group . $settings['HELLO_THEME'],
|
||||
function () {
|
||||
add_filter( 'hello_elementor_enqueue_theme_style', '__return_false' );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function register_settings( $settings_group = self::SETTING_PREFIX, $settings = self::SETTINGS ) {
|
||||
foreach ( $settings as $setting_value ) {
|
||||
register_setting(
|
||||
$settings_group,
|
||||
$settings_group . $setting_value,
|
||||
[
|
||||
'default' => '',
|
||||
'show_in_rest' => true,
|
||||
'type' => 'string',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function enqueue_hello_plus_settings_scripts() {
|
||||
$screen = get_current_screen();
|
||||
|
||||
if ( ! str_ends_with( $screen->id, '_page_' . self::SETTINGS_PAGE_SLUG ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$script = new Script(
|
||||
'hello-elementor-settings',
|
||||
[ 'wp-util' ]
|
||||
);
|
||||
|
||||
$script->enqueue();
|
||||
}
|
||||
|
||||
public function register_settings_page( $parent_slug ): void {
|
||||
add_submenu_page(
|
||||
$parent_slug,
|
||||
__( 'Settings', 'hello-elementor' ),
|
||||
__( 'Settings', 'hello-elementor' ),
|
||||
'manage_options',
|
||||
self::SETTINGS_PAGE_SLUG,
|
||||
[ $this, 'render_settings_page' ]
|
||||
);
|
||||
}
|
||||
|
||||
public function render_settings_page(): void {
|
||||
echo '<div id="ehe-admin-settings"></div>';
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_hello_plus_settings_scripts' ] );
|
||||
add_action( 'hello-plus-theme/admin-menu', [ $this, 'register_settings_page' ], 10, 1 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome;
|
||||
|
||||
use HelloTheme\Includes\Module_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* class Module
|
||||
*
|
||||
* @package HelloPlus
|
||||
* @subpackage HelloPlusModules
|
||||
*/
|
||||
class Module extends Module_Base {
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function get_name(): string {
|
||||
return 'admin-home';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function get_component_ids(): array {
|
||||
return [
|
||||
'Admin_Menu_Controller',
|
||||
'Scripts_Controller',
|
||||
'Api_Controller',
|
||||
'Ajax_Handler',
|
||||
'Conversion_Banner',
|
||||
'Admin_Top_Bar',
|
||||
'Settings_Controller',
|
||||
'Notificator',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use HelloTheme\Includes\Utils;
|
||||
use WP_REST_Server;
|
||||
|
||||
class Admin_Config extends Rest_Base {
|
||||
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
self::ROUTE_NAMESPACE,
|
||||
'/admin-settings',
|
||||
[
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => [ $this, 'get_admin_config' ],
|
||||
'permission_callback' => [ $this, 'permission_callback' ],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function get_admin_config() {
|
||||
$config = $this->get_welcome_box_config( [] );
|
||||
|
||||
$config = $this->get_site_parts( $config );
|
||||
|
||||
$config = $this->get_resources( $config );
|
||||
|
||||
$config = apply_filters( 'hello-plus-theme/rest/admin-config', $config );
|
||||
|
||||
$config['config'] = [
|
||||
'nonceInstall' => wp_create_nonce( 'updates' ),
|
||||
'slug' => 'elementor',
|
||||
];
|
||||
|
||||
return rest_ensure_response( [ 'config' => $config ] );
|
||||
}
|
||||
|
||||
public function get_resources( array $config ) {
|
||||
$config['resourcesData'] = [
|
||||
'community' => [
|
||||
[
|
||||
'title' => __( 'Facebook', 'hello-elementor' ),
|
||||
'link' => 'https://www.facebook.com/groups/Elementors/',
|
||||
'icon' => 'BrandFacebookIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
[
|
||||
'title' => __( 'YouTube', 'hello-elementor' ),
|
||||
'link' => 'https://www.youtube.com/@Elementor',
|
||||
'icon' => 'BrandYoutubeIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
[
|
||||
'title' => __( 'Discord', 'hello-elementor' ),
|
||||
'link' => 'https://discord.com/servers/elementor-official-community-1164474724626206720',
|
||||
'target' => '_blank',
|
||||
],
|
||||
[
|
||||
'title' => __( 'Rate Us', 'hello-elementor' ),
|
||||
'link' => 'https://wordpress.org/support/theme/hello-elementor/reviews/#new-post',
|
||||
'icon' => 'StarIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
],
|
||||
'resources' => [
|
||||
[
|
||||
'title' => __( 'Help Center', 'hello-elementor' ),
|
||||
'link' => ' https://go.elementor.com/hello-help/',
|
||||
'icon' => 'HelpIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
[
|
||||
'title' => __( 'Blog', 'hello-elementor' ),
|
||||
'link' => 'https://go.elementor.com/hello-blog/',
|
||||
'icon' => 'SpeakerphoneIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
[
|
||||
'title' => __( 'Platinum Support', 'hello-elementor' ),
|
||||
'link' => 'https://go.elementor.com/platinum-support',
|
||||
'icon' => 'BrandElementorIcon',
|
||||
'target' => '_blank',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
public function get_site_parts( array $config ): array {
|
||||
$last_five_pages_query = new \WP_Query(
|
||||
[
|
||||
'posts_per_page' => 5,
|
||||
'post_type' => 'page',
|
||||
'post_status' => 'publish',
|
||||
'orderby' => 'post_date',
|
||||
'order' => 'DESC',
|
||||
'fields' => 'ids',
|
||||
'no_found_rows' => true,
|
||||
'lazy_load_term_meta' => true,
|
||||
'update_post_meta_cache' => false,
|
||||
]
|
||||
);
|
||||
|
||||
$site_pages = [];
|
||||
|
||||
if ( $last_five_pages_query->have_posts() ) {
|
||||
$elementor_active = Utils::is_elementor_active();
|
||||
$edit_with_elementor = $elementor_active ? '&action=elementor' : '';
|
||||
while ( $last_five_pages_query->have_posts() ) {
|
||||
$last_five_pages_query->the_post();
|
||||
$site_pages[] = [
|
||||
'title' => get_the_title(),
|
||||
'link' => get_edit_post_link( get_the_ID(), 'admin' ) . $edit_with_elementor,
|
||||
'icon' => 'PagesIcon',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$general = [
|
||||
[
|
||||
'title' => __( 'Add New Page', 'hello-elementor' ),
|
||||
'link' => self_admin_url( 'post-new.php?post_type=page' ),
|
||||
'icon' => 'PageTypeIcon',
|
||||
],
|
||||
[
|
||||
'title' => __( 'Settings', 'hello-elementor' ),
|
||||
'link' => self_admin_url( 'admin.php?page=hello-elementor-settings' ),
|
||||
],
|
||||
];
|
||||
|
||||
$common_parts = [];
|
||||
|
||||
$customizer_header_footer_url = $this->get_open_homepage_with_tab( '', [ 'autofocus[section]' => 'hello-options' ] );
|
||||
|
||||
$header_part = [
|
||||
'id' => 'header',
|
||||
'title' => __( 'Header', 'hello-elementor' ),
|
||||
'link' => $customizer_header_footer_url,
|
||||
'icon' => 'HeaderTemplateIcon',
|
||||
'sublinks' => [],
|
||||
];
|
||||
$footer_part = [
|
||||
'id' => 'footer',
|
||||
'title' => __( 'Footer', 'hello-elementor' ),
|
||||
'link' => $customizer_header_footer_url,
|
||||
'icon' => 'FooterTemplateIcon',
|
||||
'sublinks' => [],
|
||||
];
|
||||
|
||||
if ( Utils::is_elementor_active() ) {
|
||||
$common_parts = [
|
||||
[
|
||||
'title' => __( 'Theme Builder', 'hello-elementor' ),
|
||||
'link' => Utils::get_theme_builder_url(),
|
||||
'icon' => 'ThemeBuilderIcon',
|
||||
],
|
||||
];
|
||||
$header_part['link'] = $this->get_open_homepage_with_tab( 'hello-settings-header' );
|
||||
$footer_part['link'] = $this->get_open_homepage_with_tab( 'hello-settings-footer' );
|
||||
|
||||
if ( Utils::has_pro() ) {
|
||||
$header_part = $this->update_pro_part( $header_part, 'header' );
|
||||
$footer_part = $this->update_pro_part( $footer_part, 'footer' );
|
||||
}
|
||||
}
|
||||
|
||||
$site_parts = [
|
||||
'siteParts' => array_merge(
|
||||
[
|
||||
$header_part,
|
||||
$footer_part,
|
||||
],
|
||||
$common_parts
|
||||
),
|
||||
'sitePages' => $site_pages,
|
||||
'general' => $general,
|
||||
];
|
||||
|
||||
$config['siteParts'] = apply_filters( 'hello-plus-theme/template-parts', $site_parts );
|
||||
|
||||
return $this->get_quicklinks( $config );
|
||||
}
|
||||
|
||||
private function update_pro_part( array $part, string $location ): array {
|
||||
$theme_builder_module = \ElementorPro\Modules\ThemeBuilder\Module::instance();
|
||||
$conditions_manager = $theme_builder_module->get_conditions_manager();
|
||||
|
||||
$documents = $conditions_manager->get_documents_for_location( $location );
|
||||
if ( ! empty( $documents ) ) {
|
||||
$first_document_id = array_key_first( $documents );
|
||||
$edit_link = get_edit_post_link( $first_document_id, 'admin' ) . '&action=elementor';
|
||||
|
||||
} else {
|
||||
$edit_link = $this->get_open_homepage_with_tab( 'hello-settings-' . $location );
|
||||
}
|
||||
$part['sublinks'] = [
|
||||
[
|
||||
'title' => __( 'Edit', 'hello-elementor' ),
|
||||
'link' => $edit_link,
|
||||
],
|
||||
[
|
||||
'title' => __( 'Add New', 'hello-elementor' ),
|
||||
'link' => \Elementor\Plugin::instance()->app->get_base_url() . '#/site-editor/templates/' . $location,
|
||||
],
|
||||
];
|
||||
|
||||
return $part;
|
||||
}
|
||||
|
||||
public function get_open_homepage_with_tab( $action, $customizer_fallback_args = [] ): string {
|
||||
if ( Utils::is_elementor_active() && method_exists( \Elementor\Core\DocumentTypes\Page::class, 'get_site_settings_url_config' ) ) {
|
||||
return \Elementor\Core\DocumentTypes\Page::get_site_settings_url_config( $action )['url'];
|
||||
}
|
||||
|
||||
return add_query_arg( $customizer_fallback_args, self_admin_url( 'customize.php' ) );
|
||||
}
|
||||
|
||||
public function get_quicklinks( $config ): array {
|
||||
$config['quickLinks'] = [
|
||||
'site_name' => [
|
||||
'title' => __( 'Site Name', 'hello-elementor' ),
|
||||
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||
'icon' => 'TextIcon',
|
||||
|
||||
],
|
||||
'site_logo' => [
|
||||
'title' => __( 'Site Logo', 'hello-elementor' ),
|
||||
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||
'icon' => 'PhotoIcon',
|
||||
],
|
||||
'site_favicon' => [
|
||||
'title' => __( 'Site Favicon', 'hello-elementor' ),
|
||||
'link' => $this->get_open_homepage_with_tab( 'settings-site-identity', [ 'autofocus[section]' => 'title_tagline' ] ),
|
||||
'icon' => 'AppsIcon',
|
||||
],
|
||||
];
|
||||
|
||||
if ( Utils::is_elementor_active() ) {
|
||||
$config['quickLinks']['site_colors'] = [
|
||||
'title' => __( 'Site Colors', 'hello-elementor' ),
|
||||
'link' => $this->get_open_homepage_with_tab( 'global-colors' ),
|
||||
'icon' => 'BrushIcon',
|
||||
];
|
||||
|
||||
$config['quickLinks']['site_fonts'] = [
|
||||
'title' => __( 'Site Fonts', 'hello-elementor' ),
|
||||
'link' => $this->get_open_homepage_with_tab( 'global-typography' ),
|
||||
'icon' => 'UnderlineIcon',
|
||||
];
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
public function get_welcome_box_config( array $config ): array {
|
||||
$is_elementor_installed = Utils::is_elementor_installed();
|
||||
$is_elementor_active = Utils::is_elementor_active();
|
||||
$has_pro = Utils::has_pro();
|
||||
|
||||
if ( ! $is_elementor_active ) {
|
||||
$link = $is_elementor_installed ? Utils::get_elementor_activation_link() : 'install';
|
||||
|
||||
$action_link_type = Utils::get_action_link_type();
|
||||
|
||||
if ( 'activate-elementor' === $action_link_type ) {
|
||||
$cta_text = __( 'Activate Elementor', 'hello-elementor' );
|
||||
} else {
|
||||
$cta_text = __( 'Install Elementor', 'hello-elementor' );
|
||||
}
|
||||
|
||||
$config['welcome'] = [
|
||||
'title' => __( 'Thanks for installing the Hello Theme!', 'hello-elementor' ),
|
||||
'text' => __( 'Welcome to Hello Theme—a lightweight, blank canvas designed to integrate seamlessly with Elementor, the most popular, no-code visual website builder. By installing and activating Elementor, you\'ll unlock the power to craft a professional website with advanced features and functionalities.', 'hello-elementor' ),
|
||||
'buttons' => [
|
||||
[
|
||||
'linkText' => $cta_text,
|
||||
'variant' => 'contained',
|
||||
'link' => $link,
|
||||
'color' => 'primary',
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'src' => HELLO_THEME_IMAGES_URL . 'install-elementor.png',
|
||||
'alt' => $cta_text,
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
if ( $is_elementor_active && ! $has_pro ) {
|
||||
$config['welcome'] = [
|
||||
'title' => __( 'Go Pro, Go Limitless', 'hello-elementor' ),
|
||||
'text' => __( 'Unlock the theme builder, popup builder, 100+ widgets and more advanced tools to take your website to the next level.', 'hello-elementor' ),
|
||||
'buttons' => [
|
||||
[
|
||||
'linkText' => __( 'Upgrade now', 'hello-elementor' ),
|
||||
'variant' => 'contained',
|
||||
'link' => 'https://go.elementor.com/hello-upgrade-epro/',
|
||||
'color' => 'primary',
|
||||
'target' => '_blank',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
$config['welcome'] = [];
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||
|
||||
use HelloTheme\Includes\Utils;
|
||||
use WP_REST_Server;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Promotions extends Rest_Base {
|
||||
|
||||
public function get_promotions() {
|
||||
$action_links_data = [];
|
||||
|
||||
if ( ! defined( 'ELEMENTOR_PRO_VERSION' ) && Utils::is_elementor_active() ) {
|
||||
$action_links_data[] = [
|
||||
'type' => 'go-pro',
|
||||
'image' => HELLO_THEME_IMAGES_URL . 'go-pro.svg',
|
||||
'url' => 'https://go.elementor.com/hello-upgrade-epro/',
|
||||
'alt' => __( 'Elementor Pro', 'hello-elementor' ),
|
||||
'title' => __( 'Bring your vision to life', 'hello-elementor' ),
|
||||
'messages' => [
|
||||
__( 'Get complete design flexibility for your website with Elementor Pro’s advanced tools and premium features.', 'hello-elementor' ),
|
||||
],
|
||||
'button' => __( 'Upgrade Now', 'hello-elementor' ),
|
||||
'upgrade' => true,
|
||||
'features' => [
|
||||
__( 'Popup Builder', 'hello-elementor' ),
|
||||
__( 'Custom Code & CSS', 'hello-elementor' ),
|
||||
__( 'E-commerce Features', 'hello-elementor' ),
|
||||
__( 'Collaborative Notes', 'hello-elementor' ),
|
||||
__( 'Form Submission', 'hello-elementor' ),
|
||||
__( 'Form Integrations', 'hello-elementor' ),
|
||||
__( 'Customs Attribute', 'hello-elementor' ),
|
||||
__( 'Role Manager', 'hello-elementor' ),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
if (
|
||||
! defined( 'ELEMENTOR_IMAGE_OPTIMIZER_VERSION' ) &&
|
||||
! defined( 'IMAGE_OPTIMIZATION_VERSION' )
|
||||
) {
|
||||
$action_links_data[] = [
|
||||
'type' => 'go-image-optimizer',
|
||||
'image' => HELLO_THEME_IMAGES_URL . 'image-optimizer.svg',
|
||||
'url' => Utils::get_plugin_install_url( 'image-optimization' ),
|
||||
'alt' => __( 'Elementor Image Optimizer', 'hello-elementor' ),
|
||||
'title' => '',
|
||||
'messages' => [
|
||||
__( 'Optimize Images.', 'hello-elementor' ),
|
||||
__( 'Reduce Size.', 'hello-elementor' ),
|
||||
__( 'Improve Speed.', 'hello-elementor' ),
|
||||
__( 'Try Image Optimizer for free', 'hello-elementor' ),
|
||||
],
|
||||
'button' => __( 'Install', 'hello-elementor' ),
|
||||
'width' => 72,
|
||||
'height' => 'auto',
|
||||
'target' => '_self',
|
||||
'backgroundImage' => HELLO_THEME_IMAGES_URL . 'image-optimization-bg.svg',
|
||||
];
|
||||
}
|
||||
|
||||
if ( ! defined( 'SEND_VERSION' ) ) {
|
||||
$action_links_data[] = [
|
||||
'type' => 'go-send',
|
||||
'image' => HELLO_THEME_IMAGES_URL . 'send-logo.gif',
|
||||
'backgroundColor' => '#EFEFFF',
|
||||
'url' => 'https://go.elementor.com/Hello_send',
|
||||
'alt' => __( 'Send', 'hello-elementor' ),
|
||||
'title' => '',
|
||||
'messages' => [
|
||||
__( 'Connect any website to automated Email & SMS workflows in a click with Send.', 'hello-elementor' ),
|
||||
],
|
||||
'button' => __( 'Install', 'hello-elementor' ),
|
||||
'buttonBgColor' => '#524CFF',
|
||||
'width' => 72,
|
||||
'height' => 'auto',
|
||||
];
|
||||
} elseif (
|
||||
! defined( 'ELEMENTOR_AI_VERSION' ) &&
|
||||
Utils::is_elementor_installed()
|
||||
) {
|
||||
$action_links_data[] = [
|
||||
'type' => 'go-ai',
|
||||
'image' => HELLO_THEME_IMAGES_URL . 'ai.png',
|
||||
'url' => 'https://go.elementor.com/hello-site-planner',
|
||||
'alt' => __( 'Elementor AI', 'hello-elementor' ),
|
||||
'title' => __( 'Elementor AI', 'hello-elementor' ),
|
||||
'messages' => [
|
||||
__( 'Boost creativity with Elementor AI. Craft & enhance copy, create custom CSS & Code, and generate images to elevate your website.', 'hello-elementor' ),
|
||||
],
|
||||
'button' => __( 'Let\'s Go', 'hello-elementor' ),
|
||||
];
|
||||
}
|
||||
|
||||
return rest_ensure_response( [ 'links' => $action_links_data ] );
|
||||
}
|
||||
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
self::ROUTE_NAMESPACE,
|
||||
'/promotions',
|
||||
[
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => [ $this, 'get_promotions' ],
|
||||
'permission_callback' => [ $this, 'permission_callback' ],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||
|
||||
use HelloTheme\Modules\AdminHome\Module;
|
||||
use WP_REST_Server;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
abstract class Rest_Base {
|
||||
const ROUTE_NAMESPACE = 'elementor-hello-elementor/v1';
|
||||
|
||||
abstract public function register_routes();
|
||||
|
||||
public function permission_callback(): bool {
|
||||
return current_user_can( 'manage_options' );
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
add_action( 'rest_api_init', [ $this, 'register_routes' ] );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
use HelloTheme\Modules\AdminHome\Components\Settings_Controller;
|
||||
use WP_REST_Server;
|
||||
|
||||
class Theme_Settings extends Rest_Base {
|
||||
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
self::ROUTE_NAMESPACE,
|
||||
'/theme-settings',
|
||||
[
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => [ $this, 'get_theme_settings' ],
|
||||
'permission_callback' => [ $this, 'permission_callback' ],
|
||||
]
|
||||
);
|
||||
|
||||
register_rest_route(
|
||||
self::ROUTE_NAMESPACE,
|
||||
'/theme-settings',
|
||||
[
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'callback' => [ $this, 'set_theme_settings' ],
|
||||
'permission_callback' => [ $this, 'permission_callback' ],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function get_theme_settings() {
|
||||
return rest_ensure_response(
|
||||
[
|
||||
'settings' => Settings_Controller::get_settings(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function set_theme_settings( \WP_REST_Request $request ) {
|
||||
$settings = $request->get_param( 'settings' );
|
||||
|
||||
if ( ! is_array( $settings ) ) {
|
||||
return new \WP_Error(
|
||||
'invalid_settings',
|
||||
esc_html__( 'Settings must be an array', 'hello-elementor' ),
|
||||
[ 'status' => 400 ]
|
||||
);
|
||||
}
|
||||
|
||||
$settings_map = Settings_Controller::get_settings_mapping();
|
||||
|
||||
foreach ( $settings as $key => $value ) {
|
||||
if ( ! array_key_exists( $key, $settings_map ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$value = $value ? 'true' : 'false';
|
||||
|
||||
update_option( $settings_map[ $key ], $value );
|
||||
}
|
||||
|
||||
return rest_ensure_response( [ 'settings' => $settings ] );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace HelloTheme\Modules\AdminHome\Rest;
|
||||
|
||||
use HelloTheme\Modules\AdminHome\Module;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
class Whats_New extends Rest_Base {
|
||||
|
||||
public function get_notifications() {
|
||||
$notificator = Module::instance()->get_component( 'Notificator' );
|
||||
return $notificator->get_notifications_by_conditions();
|
||||
}
|
||||
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
self::ROUTE_NAMESPACE,
|
||||
'/whats-new',
|
||||
[
|
||||
'methods' => \WP_REST_Server::READABLE,
|
||||
'callback' => [ $this, 'get_notifications' ],
|
||||
'permission_callback' => [ $this, 'permission_callback' ],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
323
wp-content/themes/hello-elementor/readme.txt
Normal file
@@ -0,0 +1,323 @@
|
||||
=== Hello Elementor ===
|
||||
|
||||
Contributors: elemntor, KingYes, ariel.k, bainternet
|
||||
Requires at least: 6.0
|
||||
Tested up to: 6.8
|
||||
Stable tag: 3.4.4
|
||||
Version: 3.4.4
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v3 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
A lightweight and minimalist WordPress theme for Elementor site builder.
|
||||
|
||||
== Description ==
|
||||
|
||||
Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website.
|
||||
|
||||
The theme's main focus is on providing a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. It is optimized for speed and performance, and its simplicity and flexibility make it a great choice for both beginners and experienced website designers.
|
||||
|
||||
The theme supports common WordPress features which can be extended using a child-theme. In addition, there are several ways to add custom styles. It can be done from **Elementor**, using a child-theme, or with an external plugin. To customize the theme further, visit [Elementor developers docs](https://developers.elementor.com/docs/hello-elementor-theme/).
|
||||
|
||||
== Copyright ==
|
||||
|
||||
This theme, like WordPress, is distributed under the terms of GPL.
|
||||
Use it as your springboard to building a site with ***Elementor***.
|
||||
|
||||
Hello Elementor bundles the following third-party resources:
|
||||
|
||||
Font Awesome icons for theme screenshot
|
||||
License: SIL Open Font License, version 1.1.
|
||||
Source: https://fontawesome.com/v4.7.0/
|
||||
|
||||
Image for theme screenshot, Copyright Jason Blackeye
|
||||
License: CC0 1.0 Universal (CC0 1.0)
|
||||
Source: https://stocksnap.io/photo/4B83RD7BV9
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.4.4 - 2025-06-08 =
|
||||
* Tweak: Improve Header/Footer edit access from theme Home
|
||||
|
||||
= 3.4.3 - 2025-05-26 =
|
||||
* Fix: Settings page empty after 3.4.0 in translated sites
|
||||
* Fix: PHP 8.4 deprecation notice
|
||||
|
||||
= 3.4.2 - 2025-05-19 =
|
||||
* Tweak: Set Home links font weight to regular
|
||||
* Tweak: Dart SASS 3.0.0 - resolve scss deprecated warnings
|
||||
* Fix: Settings page empty after 3.4.0
|
||||
|
||||
= 3.4.1 - 2025-05-08 =
|
||||
* Fix: Critical Error after theme update [critical-error-on-website-54/#post-18454740](https://wordpress.org/support/topic/critical-error-on-website-54/#post-18454740)
|
||||
|
||||
= 3.4.0 - 2025-05-05 =
|
||||
* New: Add Theme Home
|
||||
* Tweak: Theme settings page style
|
||||
|
||||
= 3.3.0 - 2025-01-21 =
|
||||
* Tweak: Added changelog link in theme settings
|
||||
* Tweak: Updated minimum required Safari version to 15.5
|
||||
* Tweak: Update autoprefixer to latest versions
|
||||
|
||||
= 3.2.1 - 2024-12-16 =
|
||||
* Fix: Gutenberg editor expanded disproportionately after adding support for `theme.json` ([#430](https://github.com/elementor/hello-theme/issues/430))
|
||||
* Fix: Use CSS logical properties in the theme
|
||||
* Fix: Add ARIA attributes to header nav menu
|
||||
|
||||
= 3.2.0 - 2024-12-15 =
|
||||
* Tweak: Convert classic to hybrid theme with block-editor support
|
||||
* Tweak: Added new design options to header/footer
|
||||
* Tweak: Update `Tested up to 6.7`
|
||||
* Fix: Minify JS files ([#419](https://github.com/elementor/hello-theme/issues/419))
|
||||
|
||||
= 3.1.1 - 2024-07-30 =
|
||||
* Fix: Use consistent `<h2>` for comments title and comment form
|
||||
|
||||
= 3.1.0 - 2024-06-19 =
|
||||
* Tweak: Update `Requires PHP 7.4`
|
||||
* Tweak: Update `Tested up to 6.5`
|
||||
* Tweak: Add the ability to style the brand layout
|
||||
* Tweak: Remove deprecated Elementor code
|
||||
* Tweak: Restore default focus styling inside the theme
|
||||
* Tweak: Add `aria-label` attribute to various `<nav>` elements
|
||||
* Tweak: Improve mobile menu keyboard accessibility
|
||||
* Tweak: Semantic mobile menu toggle button
|
||||
* Fix: The header renders redundant `<p>` when tagline is empty
|
||||
* Fix: Single post renders redundant wrapping `<div>` when it has no tags
|
||||
* Fix: Remove redundant wrapping `<div>` from `wp_nav_menu()` output
|
||||
* Fix: Wrap page `<h1>` with `<div>`, not `<header>`
|
||||
* Fix: Use consistent `<h3>` for comments title and comment form
|
||||
* Fix: Remove heading tags from dynamic header/footer
|
||||
* Fix: Mobile Menu hamburger is not visible for logged-out users in some cases ([#369](https://github.com/elementor/hello-theme/issues/369))
|
||||
* Fix: Remove duplicate ID attributes in the header mobile menu
|
||||
* Fix: Remove redundant table styles ([#311](https://github.com/elementor/hello-theme/issues/311))
|
||||
* Fix: Remove redundant space bellow Site Logo in the header/footer
|
||||
* Fix: Remove redundant CSS from dynamic header/footer layout
|
||||
* Fix: Separate post tags in single post ([#304](https://github.com/elementor/hello-theme/issues/304))
|
||||
* Fix: Display `the_tags()` after `wp_link_pages()`
|
||||
* Fix: Remove page break navigation from archives when using `<!--nextpage-->`
|
||||
* Fix: Style posts pagination component layout
|
||||
* Fix: Add RTL support to pagination arrows in archive pages
|
||||
* Fix: Update pagination prev/next labels and positions ([#404](https://github.com/elementor/hello-theme/issues/404))
|
||||
* Fix: Check if Elementor is loaded when using dynamic header & footer
|
||||
|
||||
= 3.0.2 - 2024-05-28 =
|
||||
* Internal: Version bump release to refresh WordPress repository
|
||||
|
||||
= 3.0.1 - 2024-01-24 =
|
||||
* Fix: Harden security for admin notice dismiss button
|
||||
* Fix: Add `alt` attribute to all the images in the dashboard
|
||||
|
||||
= 3.0.0 - 2023-12-26 =
|
||||
* New: Option to disable cross-site header & footer
|
||||
* Tweak: Update `Requires PHP 7.3`
|
||||
* Tweak: Update `Tested up to 6.4`
|
||||
* Tweak: Move cross-site header & footer styles to a separate CSS file
|
||||
* Tweak: Don't load `header-footer.min.css` when disabling header & footer
|
||||
* Tweak: Don't load `hello-frontend.min.js` when disabling header & footer
|
||||
* Tweak: Replace jQuery code with vanilla JS in the frontend
|
||||
* Tweak: Replace jQuery code with vanilla JS in WordPress admin
|
||||
* Tweak: Remove unused JS code from the frontend
|
||||
* Tweak: Remove unused CSS code from the editor
|
||||
* Tweak: Remove unnecessary `role` attributes from HTML landmark elements
|
||||
* Tweak: Link from Elementor Site Settings to Hello Theme Settings
|
||||
* Fix: Dynamic script version for better caching
|
||||
|
||||
= 2.9.0 - 2023-10-25 =
|
||||
* New: Introducing the new settings page for the theme
|
||||
* New: Option to disable description meta tag
|
||||
* New: Option to disable skip link
|
||||
* New: Option to disable page title
|
||||
* New: Option to unregister Hello style.css
|
||||
* New: Option to unregister Hello theme.css
|
||||
* Tweak: Update `Requires at least 6.0`
|
||||
* Tweak: Update `Tested up to 6.3`
|
||||
|
||||
= 2.8.1 - 2023-07-05 =
|
||||
* Tweak: Added additional CSS selectors to apply RTL on comments
|
||||
* Fix: Comment area style regression
|
||||
|
||||
= 2.8.0 - 2023-07-04 =
|
||||
* Tweak: Update `Requires PHP 7.0`
|
||||
* Tweak: Added description meta tag with excerpt text
|
||||
* Tweak: Use CSS logical properties rather than physical properties
|
||||
* Tweak: Replace legacy `page-break-*` CSS properties with `break-*` properties
|
||||
* Tweak: Remove duplicate CSS classes for screen readers
|
||||
* Tweak: Merge similar translation strings (i18n)
|
||||
|
||||
= 2.7.1 - 2023-03-27 =
|
||||
* Tweak: Add excerpt support for pages
|
||||
* Tweak: When post comments are closed, display it to the user
|
||||
* Fix: Empty "Skip to content" href ([#276](https://github.com/elementor/hello-theme/issues/276))
|
||||
* Fix: Child themes using `hello_elementor_body_open()` no longer working ([#278](https://github.com/elementor/hello-theme/issues/278))
|
||||
|
||||
= 2.7.0 - 2023-03-26 =
|
||||
* Tweak: Update `Requires at least 5.9`
|
||||
* Tweak: Update `Tested up to 6.2`
|
||||
* Tweak: Remove backwards compatibility support for `wp_body_open()`
|
||||
* Tweak: Match `search.php` markup to `archive.php` markup
|
||||
* Tweak: Check if posts have featured images set
|
||||
* Tweak: Remove unnecessary `role` attributes from HTML landmark elements
|
||||
* Tweak: Escape translation strings for secure HTML output
|
||||
* Tweak: Use i18n function to make the "Menu" string translatable
|
||||
* Tweak: Minify SVG assets
|
||||
* Tweak: Make header nav-menu keyboard accessible
|
||||
* Tweak: Add `role="button"` to the nav-menu toggle for better accessibility
|
||||
* Tweak: Toggle mobile nav-menu with `Enter` & `Space` keyboard keys
|
||||
* Tweak: Add `hello_elementor_enable_skip_link` filter to enable/disable the skip link
|
||||
* Tweak: Add `hello_elementor_skip_link_url` filter to change skip link URL
|
||||
* Tweak: Use theme CSS not Elementor plugins CSS
|
||||
* Tweak: Added support for the new Elementor version
|
||||
* Tweak: Update autoprefixer to exclude dead browsers
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_load_textdomain` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_register_menus` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_add_theme_support` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_add_woocommerce_support` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_enqueue_style` filter hook
|
||||
* Tweak: Delete deprecated `elementor_hello_theme_register_elementor_locations` filter hook
|
||||
* Tweak: Added additional and `custom` units to header & footer panels
|
||||
* Tweak: Link to Elementor "Site Identity" panel from the header & footer panels
|
||||
* Tweak: Delete the `hello_elementor_load_textdomain` filter hook
|
||||
|
||||
= 2.6.1 - 2022-07-11 =
|
||||
* Tweak: Tables looks weird on dark backgrounds ([#126](https://github.com/elementor/hello-theme/issues/126))
|
||||
* Fix: Remove unnecessary PHP tags ([#213](https://github.com/elementor/hello-theme/issues/213))
|
||||
|
||||
= 2.6.0 - 2022-07-10 =
|
||||
* Tweak: Added `theme_support` for `script` and `style` to avoid validation warnings ([#184](https://github.com/elementor/hello-theme/issues/184))
|
||||
* Tweak: Sanitized content for allowed HTML tags in post title ([#118](https://github.com/elementor/hello-theme/issues/118))
|
||||
* Tweak: Changed the containers to `max-width: 1140px` instead of `960px` to align with the header-footer width
|
||||
* Tweak: Centering the page title for better consistency in all cases
|
||||
* Tweak: Added link between the customizer to Elementor global settings
|
||||
* Tweak: Added Skip Links to custom or dynamic header for better accessibility
|
||||
* Fix: Added output escaping in several places ([#194](https://github.com/elementor/hello-theme/issues/194))
|
||||
* Fix: Post Password Form Submit button alignment (Props [@romanbondar](https://github.com/romanbondar))
|
||||
* Fix: Fatal error when kit doesn't exist or needs to be recreated ([#175](https://github.com/elementor/hello-theme/issues/175))
|
||||
|
||||
= 2.5.0 - 2022-01-26 =
|
||||
* Tweak: Added keyboard navigation to Hello Elementor theme menus
|
||||
* Tweak: Added Skip Links and `#content` for the main wrapper for better accessibility ([#133](https://github.com/elementor/hello-theme/issues/133))
|
||||
* Tweak: Added underline for text links in Post Content for better accessibility
|
||||
* Tweak: Removed `outline: none` from inputs for better accessibility
|
||||
* Fix: Footer menu location is not being presented on sites that are not running Elementor
|
||||
|
||||
= 2.4.2 - 2021-12-20 =
|
||||
* Tweak: Use HTTPS in XFN profile link to prevent mixed content error ([Topic](https://wordpress.org/support/topic/url-scheme-in-xfn-profile-link/))
|
||||
* Tweak: Remove comments in `style.min.css` output ([#179](https://github.com/elementor/hello-theme/issues/179))
|
||||
* Tweak: Promoted Hello Elementor theme Header & Footer experiment status to Stable
|
||||
* Tweak: Added compatibility for upcoming WordPress version 5.9
|
||||
|
||||
= 2.4.1 - 2021-07-07 =
|
||||
* Fix: Hello Elementor theme Header & Footer experiment should be inactive for existing sites
|
||||
|
||||
= 2.4.0 - 2021-06-29 =
|
||||
* New: Introducing Header and Footer site elements as an Elementor Experiment
|
||||
* Tweak: Updated Elementor admin notices UI
|
||||
|
||||
= 2.3.1 - 2020-12-28 =
|
||||
* Tweak: Improved UI for table elements
|
||||
* Tweak: Added support for Gutenberg Wide and Full image formats (Props [@ramiy](https://github.com/ramiy))
|
||||
* Tweak: Added font smoothing
|
||||
* Tweak: Update `Tested up to 5.6`
|
||||
* Tweak: Update `Requires PHP 5.6`
|
||||
* Fix: Adjusted font-family in `code`, `pre`, `kbd` and `samp` elements (Props [@75th](https://github.com/75th))
|
||||
|
||||
= 2.3.0 - 2020-04-19 =
|
||||
* Tweak: Removed caption centering by default to allow alignment using Elementor (Props [@cirkut](https://github.com/cirkut))
|
||||
* Tweak: Removed `text-align` property from table elements to avoid alignment issue in RTL websites (Props [@ramiy](https://github.com/ramiy))
|
||||
* Tweak: Added `input[type="url"]` to CSS reset rules ([#109](https://github.com/elementor/hello-theme/issues/109))
|
||||
* Tweak: Update `Tested up to 5.4`
|
||||
|
||||
= 2.2.2 - 2019-12-23 =
|
||||
* Fix: Conflicts with minifier `cssnano` and CSS animations (Props [@CeliaRozalenM](https://github.com/CeliaRozalenM))
|
||||
* Fix: Max-width property is missing in `_archive.scss` (Props [@redpik](https://github.com/redpik))
|
||||
|
||||
= 2.2.1 - 2019-09-10 =
|
||||
* Tweak: Added max width to `wp-caption` ([#91](https://github.com/elementor/hello-theme/issues/91))
|
||||
* Tweak: Added support of `wp_body_open`
|
||||
|
||||
= 2.2.0 - 2019-07-22 =
|
||||
* Tweak: Added viewport content filter ([#49](https://github.com/elementor/hello-theme/issues/49))
|
||||
* Tweak: Added support Hide Title in Elementor
|
||||
* Tweak: Adhere to TRT's Theme Sniffer
|
||||
|
||||
= 2.1.2 - 2019-06-19 =
|
||||
* Tweak: Added theme version to enqueued styles
|
||||
* Tweak: Remove header tags with `hello_elementor_page_title` filter
|
||||
|
||||
= 2.1.1 - 2019-06-13 =
|
||||
* Tweak: Rename `Install Elementor Now` button to `Install Elementor`
|
||||
|
||||
= 2.1.0 - 2019-06-12 =
|
||||
* New: Added basic theme styling
|
||||
* New: Added tagline under the site name in header
|
||||
* New: Added `hello_elementor_page_title` filter for show\hide page title
|
||||
* New: Added `hello_elementor_enqueue_theme_style` filter for enqueue theme-specific style
|
||||
* Tweak: Hide site name & tagline if logo file is exist
|
||||
* Tweak: Hide default page list when there is no primary menu
|
||||
* Tweak: Removed `#main` in `archive.php`, `single.php`, `search.php` & `404.php` files
|
||||
* Tweak: Removed `#site-header` in `header.php` file
|
||||
* Tweak: Replaced `#top-menu` with `.site-navigation`
|
||||
* Tweak: Removed custom SCSS directory, it is recommended to use child theme instead of editing parent theme
|
||||
|
||||
= 2.0.7 - 2019-06-04 =
|
||||
* Tweak: Added nextpage support to `single.php`
|
||||
* Tweak: Keep both original and minified css files
|
||||
* Tweak: Removed `flexible-header`, `custom-colors`, `editor-style` tags
|
||||
|
||||
= 2.0.6 - 2019-05-08 =
|
||||
* Tweak: Removed irrelevant font family from `$font-family-base`
|
||||
* Fix: Minified `style.css` for better optimization
|
||||
|
||||
= 2.0.5 - 2019-05-21 =
|
||||
* New: Introducing [Hello Theme Child](https://github.com/elementor/hello-theme-child)
|
||||
* Tweak: Enqueue only parent theme stylesheet
|
||||
* Tweak: Added admin notice box for recommending Elementor plugin
|
||||
|
||||
= 2.0.4 - 2019-05-20 =
|
||||
* Tweak: Removed `accessibility-ready` tag from `style.css`
|
||||
|
||||
= 2.0.3 - 2019-05-19 =
|
||||
* Tweak: Removed `accessibility-ready` tag
|
||||
|
||||
= 2.0.2 - 2019-05-13 =
|
||||
* Tweak: Added `hello_elementor_content_width` filter, as per WordPress best practice
|
||||
|
||||
= 2.0.1 - 2019-05-12 =
|
||||
* Tweak: Updated theme screenshot (following comment by WP Theme Review team)
|
||||
|
||||
= 2.0.0 - 2019-05-12 =
|
||||
* Tweak: Updated theme screenshot (following comment by WP Theme Review team)
|
||||
* Tweak: Add Copyright & Image and Icon License sections in readme (following comment by WP Theme Review team)
|
||||
* Tweak: Remove duplicated call to `add_theme_support( 'custom-logo')`
|
||||
* Tweak: Readme file grammar & spelling
|
||||
* Tweak: Update `Tested up to 5.2`
|
||||
* Tweak: Change functions.php methods names prefix from `hello_elementor_theme_` to `hello_elementor_`
|
||||
* Tweak: Change hook names to fit theme's name. Old hooks are deprecated, users are urged to update their code where needed
|
||||
* Tweak: Update style for `img`, `textarea`, 'label'
|
||||
|
||||
= 1.2.0 - 2019-02-12 =
|
||||
* New: Added classic-editor.css for Classic editor
|
||||
* Tweak: A lot of changes to match theme review guidelines
|
||||
* Tweak: Updated theme screenshot
|
||||
|
||||
= 1.1.1 - 2019-01-28 =
|
||||
* Tweak: Removed padding reset for lists
|
||||
|
||||
= 1.1.0 - 2018-12-26 =
|
||||
* New: Added SCSS & do thorough style reset
|
||||
* New: Added readme file
|
||||
* New: Added `elementor_hello_theme_load_textdomain` filter for load theme's textdomain
|
||||
* New: Added `elementor_hello_theme_register_menus` filter for register the theme's default menu location
|
||||
* New: Added `elementor_hello_theme_add_theme_support` filter for register the various supported features
|
||||
* New: Added `elementor_hello_theme_add_woocommerce_support` filter for register woocommerce features, including product-gallery zoom, swipe & lightbox features
|
||||
* New: Added `elementor_hello_theme_enqueue_style` filter for enqueue style
|
||||
* New: Added `elementor_hello_theme_register_elementor_locations` filter for register elementor settings
|
||||
* New: Added child-theme preparations
|
||||
* New: Added template part search
|
||||
* New: Added translation support
|
||||
* Tweak: Re-write of already existing template parts
|
||||
|
||||
= 1.0.0 - 2018-03-19 =
|
||||
* Initial Public Release
|
||||
BIN
wp-content/themes/hello-elementor/screenshot.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
13
wp-content/themes/hello-elementor/sidebar.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying sidebar.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
/**
|
||||
* This file is here to avoid the Deprecated Message for sidebar by wp-includes/theme-compat/sidebar.php.
|
||||
*/
|
||||
16
wp-content/themes/hello-elementor/style.css
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Theme Name: Hello Elementor
|
||||
Theme URI: https://elementor.com/hello-theme/?utm_source=wp-themes&utm_campaign=theme-uri&utm_medium=wp-dash
|
||||
Description: Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website. The theme, which is optimized for performance, provides a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. Its simplicity and flexibility make it a great choice for both beginners and experienced Web Creators.
|
||||
Author: Elementor Team
|
||||
Author URI: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
|
||||
Version: 3.4.4
|
||||
Stable tag: 3.4.4
|
||||
Requires at least: 6.0
|
||||
Tested up to: 6.8
|
||||
Requires PHP: 7.4
|
||||
License: GNU General Public License v3 or later.
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
Text Domain: hello-elementor
|
||||
Tags: accessibility-ready, flexible-header, custom-colors, custom-menu, custom-logo, featured-images, rtl-language-support, threaded-comments, translation-ready,
|
||||
*/
|
||||
24
wp-content/themes/hello-elementor/template-parts/404.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found).
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
<main id="content" class="site-main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<div class="page-header">
|
||||
<h1 class="entry-title"><?php echo esc_html__( 'The page can’t be found.', 'hello-elementor' ); ?></h1>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<p><?php echo esc_html__( 'It looks like nothing was found at this location.', 'hello-elementor' ); ?></p>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
59
wp-content/themes/hello-elementor/template-parts/archive.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
?>
|
||||
<main id="content" class="site-main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<div class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="entry-title">', '</h1>' );
|
||||
the_archive_description( '<p class="archive-description">', '</p>' );
|
||||
?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="page-content">
|
||||
<?php
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
$post_link = get_permalink();
|
||||
?>
|
||||
<article class="post">
|
||||
<?php
|
||||
printf( '<h2 class="%s"><a href="%s">%s</a></h2>', 'entry-title', esc_url( $post_link ), wp_kses_post( get_the_title() ) );
|
||||
if ( has_post_thumbnail() ) {
|
||||
printf( '<a href="%s">%s</a>', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
|
||||
}
|
||||
the_excerpt();
|
||||
?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
global $wp_query;
|
||||
if ( $wp_query->max_num_pages > 1 ) :
|
||||
$prev_arrow = is_rtl() ? '→' : '←';
|
||||
$next_arrow = is_rtl() ? '←' : '→';
|
||||
?>
|
||||
<nav class="pagination">
|
||||
<div class="nav-previous"><?php
|
||||
/* translators: %s: HTML entity for arrow character. */
|
||||
previous_posts_link( sprintf( esc_html__( '%s Previous', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $prev_arrow ) ) );
|
||||
?></div>
|
||||
<div class="nav-next"><?php
|
||||
/* translators: %s: HTML entity for arrow character. */
|
||||
next_posts_link( sprintf( esc_html__( 'Next %s', 'hello-elementor' ), sprintf( '<span class="meta-nav">%s</span>', $next_arrow ) ) );
|
||||
?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
</main>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying footer.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
$footer_class = did_action( 'elementor/loaded' ) ? hello_get_footer_layout_class() : '';
|
||||
$footer_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-2',
|
||||
'fallback_cb' => false,
|
||||
'container' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer dynamic-footer <?php echo esc_attr( $footer_class ); ?>">
|
||||
<div class="footer-inner">
|
||||
<div class="site-branding show-<?php echo esc_attr( hello_elementor_get_setting( 'hello_footer_logo_type' ) ); ?>">
|
||||
<?php if ( has_custom_logo() && ( 'title' !== hello_elementor_get_setting( 'hello_footer_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-logo <?php echo esc_attr( hello_show_or_hide( 'hello_footer_logo_display' ) ); ?>">
|
||||
<?php the_custom_logo(); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $site_name && ( 'logo' !== hello_elementor_get_setting( 'hello_footer_logo_type' ) ) || $is_editor ) : ?>
|
||||
<div class="site-title <?php echo esc_attr( hello_show_or_hide( 'hello_footer_logo_display' ) ); ?>">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $tagline || $is_editor ) : ?>
|
||||
<p class="site-description <?php echo esc_attr( hello_show_or_hide( 'hello_footer_tagline_display' ) ); ?>">
|
||||
<?php echo esc_html( $tagline ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $footer_nav_menu ) : ?>
|
||||
<nav class="site-navigation <?php echo esc_attr( hello_show_or_hide( 'hello_footer_menu_display' ) ); ?>" aria-label="<?php echo esc_attr__( 'Footer menu', 'hello-elementor' ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $footer_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( '' !== hello_elementor_get_setting( 'hello_footer_copyright_text' ) || $is_editor ) : ?>
|
||||
<div class="copyright <?php echo esc_attr( hello_show_or_hide( 'hello_footer_copyright_display' ) ); ?>">
|
||||
<p><?php echo wp_kses_post( hello_elementor_get_setting( 'hello_footer_copyright_text' ) ); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! hello_get_header_display() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$is_editor = isset( $_GET['elementor-preview'] );
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
$header_class = did_action( 'elementor/loaded' ) ? hello_get_header_layout_class() : '';
|
||||
$menu_args = [
|
||||
'theme_location' => 'menu-1',
|
||||
'fallback_cb' => false,
|
||||
'container' => false,
|
||||
'echo' => false,
|
||||
];
|
||||
$header_nav_menu = wp_nav_menu( $menu_args );
|
||||
$header_mobile_nav_menu = wp_nav_menu( $menu_args ); // The same menu but separate call to avoid duplicate ID attributes.
|
||||
?>
|
||||
<header id="site-header" class="site-header dynamic-header <?php echo esc_attr( $header_class ); ?>">
|
||||
<div class="header-inner">
|
||||
<div class="site-branding show-<?php echo esc_attr( hello_elementor_get_setting( 'hello_header_logo_type' ) ); ?>">
|
||||
<?php if ( has_custom_logo() && ( 'title' !== hello_elementor_get_setting( 'hello_header_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-logo <?php echo esc_attr( hello_show_or_hide( 'hello_header_logo_display' ) ); ?>">
|
||||
<?php the_custom_logo(); ?>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $site_name && ( 'logo' !== hello_elementor_get_setting( 'hello_header_logo_type' ) || $is_editor ) ) : ?>
|
||||
<div class="site-title <?php echo esc_attr( hello_show_or_hide( 'hello_header_logo_display' ) ); ?>">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr__( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
if ( $tagline && ( hello_elementor_get_setting( 'hello_header_tagline_display' ) || $is_editor ) ) : ?>
|
||||
<p class="site-description <?php echo esc_attr( hello_show_or_hide( 'hello_header_tagline_display' ) ); ?>">
|
||||
<?php echo esc_html( $tagline ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( $header_nav_menu ) : ?>
|
||||
<nav class="site-navigation <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>" aria-label="<?php echo esc_attr__( 'Main menu', 'hello-elementor' ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $header_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php if ( $header_mobile_nav_menu ) : ?>
|
||||
<div class="site-navigation-toggle-holder <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>">
|
||||
<button type="button" class="site-navigation-toggle" aria-label="<?php echo esc_attr( 'Menu', 'hello-elementor' ); ?>">
|
||||
<span class="site-navigation-toggle-icon" aria-hidden="true"></span>
|
||||
</button>
|
||||
</div>
|
||||
<nav class="site-navigation-dropdown <?php echo esc_attr( hello_show_or_hide( 'hello_header_menu_display' ) ); ?>" aria-label="<?php echo esc_attr__( 'Mobile menu', 'hello-elementor' ); ?>" aria-hidden="true" inert>
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $header_mobile_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</header>
|
||||
27
wp-content/themes/hello-elementor/template-parts/footer.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying footer.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
$footer_nav_menu = wp_nav_menu( [
|
||||
'theme_location' => 'menu-2',
|
||||
'fallback_cb' => false,
|
||||
'container' => false,
|
||||
'echo' => false,
|
||||
] );
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer">
|
||||
<?php if ( $footer_nav_menu ) : ?>
|
||||
<nav class="site-navigation" aria-label="<?php echo esc_attr__( 'Footer menu', 'hello-elementor' ); ?>">
|
||||
<?php
|
||||
// PHPCS - escaped by WordPress with "wp_nav_menu"
|
||||
echo $footer_nav_menu; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</footer>
|
||||