. * * Register filters and actions for the files manager. * * @since 1.2.0 * @access private */ private function register_actions() { add_action( 'deleted_post', [ $this, 'on_delete_post' ] ); add_filter( 'wxr_export_skip_postmeta', [ $this, 'on_export_post_meta' ], 10, 2 ); add_action( 'update_option_home', function () { $this->reset_assets_data(); } ); add_action( 'update_option_siteurl', function () { $this->reset_assets_data(); } ); } /** * Reset Assets Data. * * Reset the page assets data. * * @since 3.3.0 * @access private */ private function reset_assets_data() { delete_option( Page_Assets_Data_Manager::ASSETS_DATA_KEY ); } /** * Generate CSS. * * Generates CSS for all posts built with Elementor. * * @since 3.25.0 * @access public */ public function generate_css() { $batch_size = apply_filters( 'elementor/core/files/generate_css/batch_size', 100 ); $processed_posts = 0; while ( true ) { $args = [ 'post_type' => get_post_types(), 'posts_per_page' => $batch_size, 'meta_query' => [ [ 'key' => Document_Base::BUILT_WITH_ELEMENTOR_META_KEY, 'compare' => 'EXISTS', ], ], 'offset' => $processed_posts, 'fields' => 'ids', ]; $query = new \WP_Query( $args ); if ( empty( $query->posts ) ) { break; } foreach ( $query->posts as $post_id ) { $document = Plugin::$instance->documents->get_doc_for_frontend( $post_id ); if ( $document ) { $css_file = Post_CSS::create( $post_id ); $css_file->update(); } } $processed_posts += $batch_size; } /** * Elementor Generate CSS files. * * Fires after Elementor generates new CSS files * * @since 3.25.0 */ do_action( 'elementor/core/files/after_generate_css' ); } }
Fatal error: Uncaught Error: Class "Elementor\Core\Files\Manager" not found in /htdocs/wp-content/plugins/elementor/includes/plugin.php:747 Stack trace: #0 /htdocs/wp-content/plugins/elementor/includes/plugin.php(674): Elementor\Plugin->init_components() #1 /htdocs/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('') #2 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /htdocs/wp-settings.php(700): do_action('init') #5 /htdocs/wp-config.php(106): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-content/plugins/elementor/includes/plugin.php on line 747