LUG, new Custom_Icons_Promotion_Menu_Item() ); } } private function can_use_custom_icons() { return ( API::is_license_active() || $this->has_icons() ); } private function has_icons() { if ( null !== $this->has_icons ) { return $this->has_icons; } $existing_icons = new \WP_Query( [ 'post_type' => static::CPT, 'posts_per_page' => 1, ] ); $this->has_icons = $existing_icons->post_count > 0; return $this->has_icons; } public function redirect_admin_old_page_to_new() { if ( ! empty( $_GET['page'] ) && 'elementor_custom_icons' === $_GET['page'] ) { wp_safe_redirect( admin_url( static::MENU_SLUG ) ); die; } } /** * Clean up admin Font manager admin listing */ public function clean_admin_listing_page() { global $typenow; if ( self::CPT !== $typenow ) { return; } add_filter( 'months_dropdown_results', '__return_empty_array' ); add_filter( 'screen_options_show_screen', '__return_false' ); } public function post_row_actions( $actions, $post ) { if ( self::CPT !== $post->post_type ) { return $actions; } unset( $actions['inline hide-if-no-js'] ); return $actions; } public function add_finder_item( array $categories ) { $categories['settings']['items']['custom-icons'] = [ 'title' => esc_html__( 'Custom Icons', 'elementor-pro' ), 'icon' => 'favorite', 'url' => admin_url( static::MENU_SLUG ), 'keywords' => [ 'custom', 'icons', 'elementor' ], ]; if ( ! $this->can_use_custom_icons() ) { $lock = new Feature_Lock( [ 'type' => 'custom-icon' ] ); $categories['settings']['items']['custom-icons']['lock'] = $lock->get_config(); } return $categories; } /** * Register Font Manager action and filter hooks */ protected function actions() { add_action( 'init', [ $this, 'register_post_type' ] ); if ( is_admin() ) { add_action( 'init', [ $this, 'redirect_admin_old_page_to_new' ] ); add_action( 'elementor/admin/menu/register', function ( Admin_Menu_Manager $admin_menu_manager ) { $this->register_admin_menu( $admin_menu_manager ); } ); // TODO: BC - Remove after `Admin_Menu_Manager` will be the standard. add_action( 'admin_menu', function () { if ( did_action( 'elementor/admin/menu/register' ) ) { return; } $menu_title = _x( 'Custom Icons', 'Elementor Font', 'elementor-pro' ); add_submenu_page( Settings::PAGE_ID, $menu_title, $menu_title, self::CAPABILITY, static::MENU_SLUG ); }, 50 ); add_action( 'admin_head', [ $this, 'clean_admin_listing_page' ] ); } // TODO: Maybe just ignore all of those when the user can't use custom icons? add_filter( 'post_updated_messages', [ $this, 'post_updated_messages' ] ); add_filter( 'post_row_actions', [ $this, 'post_row_actions' ], 10, 2 ); add_filter( 'elementor/finder/categories', [ $this, 'add_finder_item' ] ); /** * Elementor icons manager loaded. * * Fires after the icons manager was fully loaded and instantiated. * * @since 2.0.0 * * @param Fonts_Manager $this An instance of icons manager. */ do_action( 'elementor_pro/icons_manager_loaded', $this ); } /** * Fonts_Manager constructor. */ public function __construct() { $this->actions(); $this->add_icon_type( 'custom', new Icons\Custom_Icons() ); $this->add_icon_type( 'font-awesome-pro', new Icons\Font_Awesome_Pro() ); } }
Fatal error: Uncaught Error: Class 'ElementorPro\Modules\AssetsManager\AssetTypes\Icons_Manager' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor-pro/modules/assets-manager/module.php:40 Stack trace: #0 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/core/base/module.php(85): ElementorPro\Modules\AssetsManager\Module->__construct() #1 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor-pro/core/modules-manager.php(98): Elementor\Core\Base\Module::instance() #2 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor-pro/plugin.php(403): ElementorPro\Core\Modules_Manager->__construct() #3 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): ElementorPro\Plugin->on_elementor_init('') #4 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #5 /var/www/html/dportilho.com.br/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #6 /var/www/html/dportilho.com.br/web/wp-content/plugins/element in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor-pro/modules/assets-manager/module.php on line 40