) ) { return esc_html__( 'WordPress Widgets', 'elementor' ); } $class_reflection = new \ReflectionClass( $widget ); $plugin_basename = plugin_basename( $class_reflection->getFileName() ); $plugin_directory = strtok( $plugin_basename, '/' ); $plugins_data = get_plugins( '/' . $plugin_directory ); $plugin_data = array_shift( $plugins_data ); return $plugin_data['Name'] ?? esc_html__( 'Unknown', 'elementor' ); } public function ajax_save_disabled_elements() { $this->verify_permission(); $elements = Utils::get_super_global_value( $_POST, 'widgets' ); // phpcs:ignore WordPress.Security.NonceVerification.Missing if ( empty( $elements ) ) { wp_send_json_error( esc_html__( 'No elements to save.', 'elementor' ) ); } $disabled_elements = json_decode( $elements ); if ( ! is_array( $disabled_elements ) ) { wp_send_json_error( esc_html__( 'Unexpected elements data.', 'elementor' ) ); } Options::update_disabled_elements( $disabled_elements ); do_action( 'elementor/element_manager/save_disabled_elements' ); wp_send_json_success(); } public function ajax_get_widgets_usage() { $this->verify_permission(); /** @var Usage_Module $usage_module */ $usage_module = Usage_Module::instance(); $usage_module->recalc_usage(); $widgets_usage = []; foreach ( $usage_module->get_formatted_usage( 'raw' ) as $data ) { foreach ( $data['elements'] as $element => $count ) { if ( ! isset( $widgets_usage[ $element ] ) ) { $widgets_usage[ $element ] = 0; } $widgets_usage[ $element ] += $count; } } wp_send_json_success( $widgets_usage ); } }
Fatal error: Uncaught Error: Class "Elementor\Modules\ElementManager\Ajax" not found in /htdocs/wp-content/plugins/elementor/modules/element-manager/module.php:23 Stack trace: #0 /htdocs/wp-content/plugins/elementor/core/base/module.php(85): Elementor\Modules\ElementManager\Module->__construct() #1 /htdocs/wp-content/plugins/elementor/core/modules-manager.php(64): Elementor\Core\Base\Module::instance() #2 /htdocs/wp-content/plugins/elementor/includes/plugin.php(730): Elementor\Core\Modules_Manager->__construct() #3 /htdocs/wp-content/plugins/elementor/includes/plugin.php(647): Elementor\Plugin->init_components() #4 /htdocs/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #5 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #7 /htdocs/wp-settings.php(704): do_action('init') #8 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #9 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #10 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #11 /htdocs/index.php(17): require('/htdocs/wp-blog...') #12 {main} thrown in /htdocs/wp-content/plugins/elementor/modules/element-manager/module.php on line 23