updated plugin GP Premium
version 2.1.1
This commit is contained in:
@ -206,20 +206,21 @@ class GeneratePress_Site_Library_Rest extends WP_REST_Controller {
|
||||
|
||||
foreach ( (array) $data as $site ) {
|
||||
$sites[ $site['name'] ] = array(
|
||||
'name' => $site['name'],
|
||||
'directory' => $site['directory'],
|
||||
'preview_url' => $site['preview_url'],
|
||||
'author_name' => $site['author_name'],
|
||||
'author_url' => $site['author_url'],
|
||||
'description' => $site['description'],
|
||||
'page_builder' => $site['page_builder'],
|
||||
'category' => $site['category'],
|
||||
'min_version' => $site['min_version'],
|
||||
'uploads_url' => $site['uploads_url'],
|
||||
'plugins' => $site['plugins'],
|
||||
'documentation' => $site['documentation'],
|
||||
'image_width' => ! empty( $site['image_width'] ) ? $site['image_width'] : 600,
|
||||
'image_height' => ! empty( $site['image_height'] ) ? $site['image_height'] : 600,
|
||||
'name' => $site['name'],
|
||||
'directory' => $site['directory'],
|
||||
'preview_url' => $site['preview_url'],
|
||||
'author_name' => $site['author_name'],
|
||||
'author_url' => $site['author_url'],
|
||||
'description' => $site['description'],
|
||||
'page_builder' => $site['page_builder'],
|
||||
'category' => $site['category'],
|
||||
'min_version' => $site['min_version'],
|
||||
'min_theme_version' => $site['min_theme_version'],
|
||||
'uploads_url' => $site['uploads_url'],
|
||||
'plugins' => $site['plugins'],
|
||||
'documentation' => $site['documentation'],
|
||||
'image_width' => ! empty( $site['image_width'] ) ? $site['image_width'] : 600,
|
||||
'image_height' => ! empty( $site['image_height'] ) ? $site['image_height'] : 600,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ class GeneratePress_Site_Library {
|
||||
add_action( 'generate_export_items', array( $this, 'add_export_checkbox' ) );
|
||||
add_filter( 'generate_export_data', array( $this, 'do_site_export' ) );
|
||||
add_filter( 'generate_dashboard_tabs', array( $this, 'add_dashboard_tab' ) );
|
||||
add_filter( 'generate_dashboard_screens', array( $this, 'add_dashboard_screen' ) );
|
||||
add_action( 'admin_head', array( $this, 'fix_menu' ) );
|
||||
}
|
||||
|
||||
@ -112,6 +113,7 @@ class GeneratePress_Site_Library {
|
||||
'homeUrl' => esc_url( home_url() ),
|
||||
'hasBackup' => ! empty( get_option( '_generatepress_site_library_backup', array() ) ),
|
||||
'gppVersion' => GP_PREMIUM_VERSION,
|
||||
'gpVersion' => generate_premium_get_theme_version(),
|
||||
'elementorReplaceUrls' => esc_url( admin_url( 'admin.php?page=elementor-tools#tab-replace_url' ) ),
|
||||
'uploadsUrl' => $uploads_url['baseurl'],
|
||||
'isDebugEnabled' => defined( 'WP_DEBUG' ) && true === WP_DEBUG,
|
||||
@ -125,12 +127,14 @@ class GeneratePress_Site_Library {
|
||||
GP_PREMIUM_VERSION
|
||||
);
|
||||
|
||||
wp_enqueue_style(
|
||||
'generate-premium-dashboard',
|
||||
GP_PREMIUM_DIR_URL . 'inc/assets/dashboard.css',
|
||||
array(),
|
||||
GP_PREMIUM_VERSION
|
||||
);
|
||||
if ( ! class_exists( 'GeneratePress_Dashboard' ) ) {
|
||||
wp_enqueue_style(
|
||||
'generate-premium-dashboard',
|
||||
GP_PREMIUM_DIR_URL . 'inc/legacy/assets/dashboard.css',
|
||||
array(),
|
||||
GP_PREMIUM_VERSION
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,21 +142,25 @@ class GeneratePress_Site_Library {
|
||||
* Add our page.
|
||||
*/
|
||||
public function library_page() {
|
||||
?>
|
||||
<div class="site-library-header">
|
||||
<div class="site-library-container">
|
||||
<div class="library-title">
|
||||
<?php _e( 'GeneratePress Site Library', 'gp-premium' ); ?>
|
||||
</div>
|
||||
if ( ! class_exists( 'GeneratePress_Dashboard' ) ) :
|
||||
?>
|
||||
<div class="site-library-header">
|
||||
<div class="site-library-container">
|
||||
<div class="library-title">
|
||||
<?php _e( 'GeneratePress Site Library', 'gp-premium' ); ?>
|
||||
</div>
|
||||
|
||||
<div class="library-links">
|
||||
<a href="https://generatepress.com/support" target="_blank"><?php _e( 'Support', 'gp-premium' ); ?></a>
|
||||
<a href="https://docs.generatepress.com" target="_blank"><?php _e( 'Documentation', 'gp-premium' ); ?></a>
|
||||
<div class="library-links">
|
||||
<a href="https://generatepress.com/support" target="_blank"><?php _e( 'Support', 'gp-premium' ); ?></a>
|
||||
<a href="https://docs.generatepress.com" target="_blank"><?php _e( 'Documentation', 'gp-premium' ); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
<?php do_action( 'generate_before_site_library' ); ?>
|
||||
do_action( 'generate_before_site_library' );
|
||||
?>
|
||||
|
||||
<div id="gpp-site-library"></div>
|
||||
<?php
|
||||
@ -176,6 +184,17 @@ class GeneratePress_Site_Library {
|
||||
return $tabs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tell GeneratePress this is an admin page.
|
||||
*
|
||||
* @param array $screens Existing screens.
|
||||
*/
|
||||
public function add_dashboard_screen( $screens ) {
|
||||
$screens[] = 'appearance_page_generatepress-library';
|
||||
|
||||
return $screens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add our GeneratePress Site export checkbox to the Export module.
|
||||
*/
|
||||
|
@ -1926,7 +1926,13 @@ class WXRImporter extends \WP_Importer {
|
||||
|
||||
// Run the update
|
||||
$data['ID'] = $post_id;
|
||||
|
||||
if ( isset( $data['post_content'] ) ) {
|
||||
$data['post_content'] = wp_slash( $data['post_content'] );
|
||||
}
|
||||
|
||||
$result = wp_update_post( $data, true );
|
||||
|
||||
if ( is_wp_error( $result ) ) {
|
||||
$this->logger->warning( sprintf(
|
||||
__( 'Could not update "%s" (post #%d) with mapped data', 'wordpress-importer' ),
|
||||
|
Reference in New Issue
Block a user