page_title( ASTRA_SITES_NAME ) . ' - Importing Images for Blog name \'' . get_bloginfo( 'name' ) . '\' (' . get_current_blog_id() . ')' ); // Add "widget" in import [queue]. if ( class_exists( 'Astra_Sites_Batch_Processing_Widgets' ) ) { self::$process_all->push_to_queue( Astra_Sites_Batch_Processing_Widgets::get_instance() ); } // Add "gutenberg" in import [queue]. self::$process_all->push_to_queue( Astra_Sites_Batch_Processing_Gutenberg::get_instance() ); // Add "brizy" in import [queue]. if ( is_plugin_active( 'brizy/brizy.php' ) ) { self::$process_all->push_to_queue( Astra_Sites_Batch_Processing_Brizy::get_instance() ); } // Add "bb-plugin" in import [queue]. // Add "beaver-builder-lite-version" in import [queue]. if ( is_plugin_active( 'beaver-builder-lite-version/fl-builder.php' ) || is_plugin_active( 'bb-plugin/fl-builder.php' ) ) { self::$process_all->push_to_queue( Astra_Sites_Batch_Processing_Beaver_Builder::get_instance() ); } // Add "elementor" in import [queue]. // @todo Remove required `allow_url_fopen` support. if ( ini_get( 'allow_url_fopen' ) ) { if ( is_plugin_active( 'elementor/elementor.php' ) ) { $import = new \Elementor\TemplateLibrary\Astra_Sites_Batch_Processing_Elementor(); self::$process_all->push_to_queue( $import ); } } else { Astra_Sites_Importer_Log::add( 'Couldn\'t not import image due to allow_url_fopen() is disabled!' ); } // Add "astra-addon" in import [queue]. if ( is_plugin_active( 'astra-addon/astra-addon.php' ) ) { if ( class_exists( 'Astra_Sites_Compatibility_Astra_Pro' ) ) { self::$process_all->push_to_queue( Astra_Sites_Compatibility_Astra_Pro::get_instance() ); } } // Add "misc" in import [queue]. self::$process_all->push_to_queue( Astra_Sites_Batch_Processing_Misc::get_instance() ); // Dispatch Queue. self::$process_all->save()->dispatch(); } /** * Get all post id's * * @since 1.0.14 * * @param array $post_types Post types. * @return array */ public static function get_pages( $post_types = array() ) { if ( $post_types ) { $args = array( 'post_type' => $post_types, // Query performance optimization. 'fields' => 'ids', 'no_found_rows' => true, 'post_status' => 'publish', 'posts_per_page' => -1, ); $query = new WP_Query( $args ); // Have posts? if ( $query->have_posts() ) : return $query->posts; endif; } return null; } /** * Get Supporting Post Types.. * * @since 1.3.7 * @param integer $feature Feature. * @return array */ public static function get_post_types_supporting( $feature ) { global $_wp_post_type_features; $post_types = array_keys( wp_filter_object_list( $_wp_post_type_features, array( $feature => true ) ) ); return $post_types; } } /** * Kicking this off by calling 'get_instance()' method */ Astra_Sites_Batch_Processing::get_instance(); endif;