=' ) ) { add_action( 'admin_notices', [$this, 'admin_notice_minimum_elementor_version'] ); return; } // Check for required PHP version if ( version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '<' ) ) { add_action( 'admin_notices', [$this, 'admin_notice_minimum_php_version'] ); return; } $this->include_files(); // Register custom category add_action( 'elementor/elements/categories_registered', [$this, 'add_category'] ); // Register custom controls add_action( 'elementor/controls/controls_registered', [$this, 'register_controls'] ); Widgets::init(); Assets::init(); // Dashboard::init(); } public function include_files() { require( __DIR__ . '/inc/functions.php' ); require( __DIR__ . '/inc/custom-icons.php' ); require( __DIR__ . '/classes/widget-manager.php' ); require( __DIR__ . '/classes/asset-manager.php' ); } /** * Add custom category. * * @param $elements_manager */ public function add_category( $elements_manager ) { $elements_manager->add_category( 'Advanced_Addons_category', [ 'title' => __( 'Advanced Addons', 'advanced-addons-elementor' ), 'icon' => 'fa fa-smile-o', ] ); } /** * Admin notice. * * Warning when the site doesn't have Elementor installed or activated. * * @since 1.0.0 * @access public */ public function admin_notice_missing_elementor() { if ( isset( $_GET['activate'] ) ) { unset( $_GET['activate'] ); } $message = sprintf( /* translators: 1: Plugin name 2: Elementor */ esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'advanced-addons-elementor' ), '' . esc_html__( 'Advanced Addons for Elementor', 'advanced-addons-elementor' ) . '', '' . esc_html__( 'Elementor', 'advanced-addons-elementor' ) . '' ); printf( '
%1$s
%1$s
%1$s