updated plugin GP Premium
version 2.5.2
This commit is contained in:
@ -949,6 +949,7 @@ class GeneratePress_Site_Library_Helper {
|
||||
'Spacing' => 'generate_package_spacing',
|
||||
'Typography' => 'generate_package_typography',
|
||||
'WooCommerce' => 'generate_package_woocommerce',
|
||||
'Font Library' => 'generate_package_font_library',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,15 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
if ( $force_refresh || empty( $sites ) || $sites_expire < $time_now ) {
|
||||
$sites = array();
|
||||
|
||||
$data = wp_safe_remote_get( 'https://gpsites.co/wp-json/wp/v2/sites?per_page=100' );
|
||||
$url = 'https://sites.generatepress.com/wp-json/gp-starter-sites/v1/sites';
|
||||
|
||||
if ( defined( 'GENERATEBLOCKS_VERSION' ) ) {
|
||||
if ( ! function_exists( 'generateblocks_use_v1_blocks' ) || generateblocks_use_v1_blocks() ) {
|
||||
$url = 'https://gpsites.co/wp-json/wp/v2/sites?per_page=100';
|
||||
}
|
||||
}
|
||||
|
||||
$data = wp_safe_remote_get( $url );
|
||||
|
||||
if ( is_wp_error( $data ) ) {
|
||||
update_option( 'generatepress_sites', 'no results', false );
|
||||
@ -549,6 +557,11 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
add_action( 'wxr_importer.processed.post', array( 'GeneratePress_Site_Library_Helper', 'track_post' ) );
|
||||
add_action( 'wxr_importer.processed.term', array( 'GeneratePress_Site_Library_Helper', 'track_term' ) );
|
||||
|
||||
if ( class_exists( 'GeneratePress_Pro_Font_Library' ) ) {
|
||||
$font_instance = GeneratePress_Pro_Font_Library::get_instance();
|
||||
add_action( 'import_post_meta', array( $font_instance, 'update_post_meta' ), 100, 3 );
|
||||
}
|
||||
|
||||
// Disables generation of multiple image sizes (thumbnails) in the content import step.
|
||||
if ( ! apply_filters( 'generate_sites_regen_thumbnails', true ) ) {
|
||||
add_filter( 'intermediate_image_sizes_advanced', '__return_null' );
|
||||
@ -560,6 +573,18 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
|
||||
GeneratePress_Site_Library_Helper::import_xml( $xml_path, $site_slug );
|
||||
|
||||
if ( class_exists( 'GeneratePress_Pro_Font_Library' ) ) {
|
||||
GeneratePress_Pro_Font_Library::build_css_file();
|
||||
}
|
||||
|
||||
if ( class_exists( 'GenerateBlocks_Pro_Enqueue_Styles' ) ) {
|
||||
$instance = GenerateBlocks_Pro_Enqueue_Styles::get_instance();
|
||||
|
||||
if ( $instance && method_exists( $instance, 'build_css' ) ) {
|
||||
$instance->build_css();
|
||||
}
|
||||
}
|
||||
|
||||
return $this->success( 'Content imported' );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user