updated plugin GP Premium version 2.3.0

This commit is contained in:
2023-03-29 18:20:22 +00:00
committed by Gitium
parent e42ba0e05a
commit 16a556be53
40 changed files with 539 additions and 172 deletions

View File

@ -227,12 +227,10 @@ class GeneratePress_External_CSS_File {
return false;
}
global $wp_filesystem;
$filesystem = generate_premium_get_wp_filesystem();
// Initialize the WordPress filesystem.
if ( empty( $wp_filesystem ) ) {
require_once ABSPATH . '/wp-admin/includes/file.php';
WP_Filesystem();
if ( ! $filesystem ) {
return false;
}
// Take care of domain mapping.
@ -252,7 +250,7 @@ class GeneratePress_External_CSS_File {
$chmod_file = FS_CHMOD_FILE;
}
if ( ! $wp_filesystem->put_contents( $this->file( 'path' ), wp_strip_all_tags( $content ), $chmod_file ) ) {
if ( ! $filesystem->put_contents( $this->file( 'path' ), wp_strip_all_tags( $content ), $chmod_file ) ) {
// Fail!
return false;