| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace UiCoreElements; |
| 3 | 4 | |
| 4 | 5 | /** |
| 5 | 6 | * Scripts and Styles Class |
| @@ -11,14 +12,15 @@ | ||
| 11 | 12 | $this->init_utils(); |
| 12 | 13 | |
| 13 | 14 | require_once UICORE_ELEMENTS_INCLUDES . '/class-widget-base.php'; |
| 14 | 15 | require_once UICORE_ELEMENTS_INCLUDES . '/class-nested-widget-base.php'; |
| 15 | - if(!class_exists('\UiCoreAnimate\Base')){ | |
| 16 | + if (!class_exists('\UiCoreAnimate\Base')) { | |
| 16 | 17 | require_once UICORE_ELEMENTS_INCLUDES . '/class-animate.php'; |
| 17 | - } | |
| 18 | + } | |
| 18 | 19 | |
| 19 | 20 | |
| 20 | 21 | add_action('elementor/elements/categories_registered', [$this, 'create_custom_category'], 999); |
| 22 | + add_action('elementor/widgets/widgets_registered', [$this, 'extend_widgets'], 999); | |
| 21 | 23 | add_action('elementor/controls/register', [$this, 'init_controls']); |
| 22 | 24 | add_action('elementor/widgets/register', [$this, 'init_widgets']); |
| 23 | 25 | } |
| 24 | 26 | |
| @@ -64,11 +66,13 @@ | ||
| 64 | 66 | require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/the-content.php'; |
| 65 | 67 | require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/the-title.php'; |
| 66 | 68 | require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/post-meta.php'; |
| 67 | 69 | require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/page-description.php'; |
| 70 | + require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/post-featured-image.php'; | |
| 71 | + require_once UICORE_ELEMENTS_INCLUDES . '/widgets/theme-builder/advanced-menu.php'; | |
| 68 | 72 | |
| 69 | 73 | // Dependent on Uicore Framework |
| 70 | - if(defined('UICORE_ASSETS')){ | |
| 74 | + if (defined('UICORE_ASSETS')) { | |
| 71 | 75 | require_once UICORE_ELEMENTS_INCLUDES . '/widgets/post-grid.php'; |
| 72 | 76 | } |
| 73 | 77 | } |
| 74 | 78 | |
| @@ -74,14 +78,12 @@ | ||
| 74 | 78 | |
| 75 | 79 | |
| 76 | 80 | public function init_controls() |
| 77 | 81 | { |
| 78 | - require UICORE_ELEMENTS_INCLUDES . '/controls/class-post-filter-control.php'; | |
| 79 | - require UICORE_ELEMENTS_INCLUDES . '/controls/class-product-filter-control.php'; | |
| 82 | + require_once UICORE_ELEMENTS_INCLUDES . '/controls/class-post-filter-control.php'; | |
| 83 | + require_once UICORE_ELEMENTS_INCLUDES . '/controls/class-product-filter-control.php'; | |
| 80 | 84 | } |
| 81 | 85 | |
| 82 | - | |
| 83 | - | |
| 84 | 86 | public function init_utils() |
| 85 | 87 | { |
| 86 | 88 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/grid-component.php'; |
| 87 | 89 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/carousel-component.php'; |
| @@ -95,9 +97,15 @@ | ||
| 95 | 97 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/item-style-component.php'; |
| 96 | 98 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/post-component.php'; |
| 97 | 99 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/product-component.php'; |
| 98 | 100 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/form-service.php'; |
| 101 | + require_once UICORE_ELEMENTS_INCLUDES . '/utils/newsletter-services.php'; | |
| 99 | 102 | require_once UICORE_ELEMENTS_INCLUDES . '/utils/form-component.php'; |
| 103 | + } | |
| 104 | + | |
| 105 | + public function extend_widgets() | |
| 106 | + { | |
| 107 | + require UICORE_ELEMENTS_INCLUDES . '/controls/class-lightbox-button.php'; | |
| 100 | 108 | } |
| 101 | 109 | |
| 102 | 110 | function create_custom_category($elements_manager) |
| 103 | 111 | { |