From eb9181b250a255f1e130ff5d6743c65c22e28b39 Mon Sep 17 00:00:00 2001 From: Lai Power Date: Tue, 29 Apr 2025 21:19:14 +0000 Subject: [PATCH] updated plugin `GP Premium` version 2.5.2 --- .../gp-premium/dist/adjacent-posts.asset.php | 1 + .../plugins/gp-premium/dist/adjacent-posts.js | 1 + .../elements/assets/admin/elements.css | 4 + .../font-library/class-font-library-rest.php | 2 +- wp-content/plugins/gp-premium/gp-premium.php | 23 +- .../gp-premium/inc/class-adjacent-posts.php | 84 +++++ .../inc/class-register-dynamic-tags.php | 306 ++++++++++++++++++ .../plugins/gp-premium/inc/deprecated.php | 10 + .../controls/class-information-control.php | 6 +- .../controls/css/information-control.css | 12 + wp-content/plugins/gp-premium/readme.txt | 13 +- .../class-site-library-helper.php | 1 + .../site-library/class-site-library-rest.php | 27 +- .../plugins/gp-premium/webpack.config.js | 1 + 14 files changed, 470 insertions(+), 21 deletions(-) create mode 100644 wp-content/plugins/gp-premium/dist/adjacent-posts.asset.php create mode 100644 wp-content/plugins/gp-premium/dist/adjacent-posts.js create mode 100644 wp-content/plugins/gp-premium/inc/class-adjacent-posts.php create mode 100644 wp-content/plugins/gp-premium/inc/class-register-dynamic-tags.php create mode 100644 wp-content/plugins/gp-premium/library/customizer/controls/css/information-control.css diff --git a/wp-content/plugins/gp-premium/dist/adjacent-posts.asset.php b/wp-content/plugins/gp-premium/dist/adjacent-posts.asset.php new file mode 100644 index 00000000..fb7f8530 --- /dev/null +++ b/wp-content/plugins/gp-premium/dist/adjacent-posts.asset.php @@ -0,0 +1 @@ + array('wp-hooks', 'wp-i18n'), 'version' => 'bfbc5254c52ffe55aa92'); diff --git a/wp-content/plugins/gp-premium/dist/adjacent-posts.js b/wp-content/plugins/gp-premium/dist/adjacent-posts.js new file mode 100644 index 00000000..673839b4 --- /dev/null +++ b/wp-content/plugins/gp-premium/dist/adjacent-posts.js @@ -0,0 +1 @@ +(()=>{"use strict";const s=window.wp.i18n,e=window.wp.hooks;(0,e.addFilter)("generateblocks.dynamicTags.sourceOptions","generatepress-pro/dynamicTags/set-adjacent-post-options",(function(e,{dynamicTagType:t}){return"post"!==t||(e.push({value:"next-post",label:(0,s.__)("Next Post","gp-premium")}),e.push({value:"previous-post",label:(0,s.__)("Previous Post","gp-premium")})),e})),(0,e.addFilter)("generateblocks.dynamicTags.sourcesInOptions","generatepress-pro/dynamicTags/set-adjacent-sources-in-options",(function(s){return s.push("next-post"),s.push("previous-post"),s}))})(); \ No newline at end of file diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/elements.css b/wp-content/plugins/gp-premium/elements/assets/admin/elements.css index c37c91b7..08699596 100644 --- a/wp-content/plugins/gp-premium/elements/assets/admin/elements.css +++ b/wp-content/plugins/gp-premium/elements/assets/admin/elements.css @@ -80,3 +80,7 @@ button.close-choose-element-type svg { font-size: 11px; border-radius: 2px; } + +.wrap #generate_premium_elements.closed .inside { + display: block; +} diff --git a/wp-content/plugins/gp-premium/font-library/class-font-library-rest.php b/wp-content/plugins/gp-premium/font-library/class-font-library-rest.php index 112617eb..b91e5aea 100644 --- a/wp-content/plugins/gp-premium/font-library/class-font-library-rest.php +++ b/wp-content/plugins/gp-premium/font-library/class-font-library-rest.php @@ -385,7 +385,7 @@ class GeneratePress_Pro_Font_Library_Rest extends WP_REST_Controller { // Generate the font CSS. $generate_css = $this->build_css_file(); - if ( false === $generate_css->success ) { + if ( false === $generate_css->data['success'] ) { return $this->error( 500, __( 'CSS Generation failed', 'gp-premium' ) ); } diff --git a/wp-content/plugins/gp-premium/gp-premium.php b/wp-content/plugins/gp-premium/gp-premium.php index c894fa08..14974bfa 100644 --- a/wp-content/plugins/gp-premium/gp-premium.php +++ b/wp-content/plugins/gp-premium/gp-premium.php @@ -3,7 +3,7 @@ * Plugin Name: GP Premium * Plugin URI: https://generatepress.com * Description: The entire collection of GeneratePress premium modules. - * Version: 2.5.0 + * Version: 2.5.2 * Requires at least: 6.1 * Requires PHP: 7.2 * Author: Tom Usborne @@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } -define( 'GP_PREMIUM_VERSION', '2.5.0' ); +define( 'GP_PREMIUM_VERSION', '2.5.2' ); define( 'GP_PREMIUM_DIR_PATH', plugin_dir_path( __FILE__ ) ); define( 'GP_PREMIUM_DIR_URL', plugin_dir_url( __FILE__ ) ); define( 'GP_LIBRARY_DIRECTORY', plugin_dir_path( __FILE__ ) . 'library/' ); @@ -53,16 +53,6 @@ if ( ! function_exists( 'generatepress_is_module_active' ) ) { } } -if ( ! function_exists( 'generate_package_setup' ) ) { - add_action( 'plugins_loaded', 'generate_package_setup' ); - /** - * Set up our translations - **/ - function generate_package_setup() { - load_plugin_textdomain( 'gp-premium', false, 'gp-premium/langs/' ); - } -} - if ( generatepress_is_module_active( 'generate_package_backgrounds', 'GENERATE_BACKGROUNDS' ) ) { require_once GP_PREMIUM_DIR_PATH . 'backgrounds/generate-backgrounds.php'; } @@ -81,6 +71,8 @@ if ( generatepress_is_module_active( 'generate_package_disable_elements', 'GENER if ( generatepress_is_module_active( 'generate_package_elements', 'GENERATE_ELEMENTS' ) ) { require_once GP_PREMIUM_DIR_PATH . 'elements/elements.php'; + require_once GP_PREMIUM_DIR_PATH . 'inc/class-register-dynamic-tags.php'; + require_once GP_PREMIUM_DIR_PATH . 'inc/class-adjacent-posts.php'; } if ( generatepress_is_module_active( 'generate_package_secondary_nav', 'GENERATE_SECONDARY_NAV' ) ) { @@ -132,6 +124,8 @@ function generate_premium_load_modules() { if ( version_compare( generate_premium_get_theme_version(), '3.1.0-alpha.1', '<' ) && generatepress_is_module_active( 'generate_package_colors', 'GENERATE_COLORS' ) ) { require_once GP_PREMIUM_DIR_PATH . 'colors/generate-colors.php'; } + + load_plugin_textdomain( 'gp-premium', false, 'gp-premium/langs/' ); } // General functionality. @@ -160,10 +154,7 @@ if ( generatepress_is_module_active( 'generate_package_font_library', 'GENERATE_ require_once GP_PREMIUM_DIR_PATH . 'font-library/class-font-library.php'; require_once GP_PREMIUM_DIR_PATH . 'font-library/class-font-library-rest.php'; require_once GP_PREMIUM_DIR_PATH . 'font-library/class-font-library-optimize.php'; - - if ( is_admin() ) { - require_once GP_PREMIUM_DIR_PATH . 'font-library/class-font-library-cpt.php'; - } + require_once GP_PREMIUM_DIR_PATH . 'font-library/class-font-library-cpt.php'; } if ( ! function_exists( 'generate_premium_updater' ) ) { diff --git a/wp-content/plugins/gp-premium/inc/class-adjacent-posts.php b/wp-content/plugins/gp-premium/inc/class-adjacent-posts.php new file mode 100644 index 00000000..e6927893 --- /dev/null +++ b/wp-content/plugins/gp-premium/inc/class-adjacent-posts.php @@ -0,0 +1,84 @@ +ID; + } + + if ( 'previous-post' === $source ) { + $in_same_term = $options['inSameTerm'] ?? false; + $term_taxonomy = $options['sameTermTaxonomy'] ?? 'category'; + $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy ); + + if ( ! is_object( $previous_post ) ) { + return false; + } + + return $previous_post->ID; + } + + return $id; + } +} + +GeneratePress_Pro_Dynamic_Tags_Adjacent_Posts::get_instance()->init(); diff --git a/wp-content/plugins/gp-premium/inc/class-register-dynamic-tags.php b/wp-content/plugins/gp-premium/inc/class-register-dynamic-tags.php new file mode 100644 index 00000000..b7038ead --- /dev/null +++ b/wp-content/plugins/gp-premium/inc/class-register-dynamic-tags.php @@ -0,0 +1,306 @@ + __( 'Archive Title', 'gp-premium' ), + 'tag' => 'archive_title', + 'type' => 'archive', + 'supports' => [], + 'description' => __( 'Get the title for the current archive being viewed.', 'gp-premium' ), + 'return' => [ $this, 'get_archive_title' ], + ] + ); + + new GenerateBlocks_Register_Dynamic_Tag( + [ + 'title' => __( 'Archive Description', 'gp-premium' ), + 'tag' => 'archive_description', + 'type' => 'archive', + 'supports' => [], + 'description' => __( 'Get the description for the current archive being viewed.', 'gp-premium' ), + 'return' => [ $this, 'get_archive_description' ], + ] + ); + + new GenerateBlocks_Register_Dynamic_Tag( + [ + 'title' => __( 'Term Meta', 'gp-premium' ), + 'tag' => 'term_meta', + 'type' => 'term', + 'supports' => [ 'meta', 'source' ], + 'description' => __( 'Access term meta by key for the specified term. Return value must be a string.', 'gp-premium' ), + 'return' => [ $this, 'get_term_meta' ], + ] + ); + + new GenerateBlocks_Register_Dynamic_Tag( + [ + 'title' => __( 'Current year', 'gp-premium' ), + 'tag' => 'current_year', + 'type' => 'site', + 'supports' => [], + 'return' => [ $this, 'get_current_year' ], + ] + ); + + new GenerateBlocks_Register_Dynamic_Tag( + [ + 'title' => __( 'Previous Posts URL', 'gp-premium' ), + 'tag' => 'previous_posts_page_url', + 'type' => 'post', + 'supports' => [ 'source', 'instant-pagination' ], + 'return' => [ $this, 'get_previous_posts_page_url' ], + ] + ); + + new GenerateBlocks_Register_Dynamic_Tag( + [ + 'title' => __( 'Next Posts URL', 'gp-premium' ), + 'tag' => 'next_posts_page_url', + 'type' => 'post', + 'supports' => [ 'source', 'instant-pagination' ], + 'return' => [ $this, 'get_next_posts_page_url' ], + ] + ); + } + + /** + * Get the archive title. + * + * @param array $options The options. + * @param object $block The block. + * @param object $instance The block instance. + * @return string + */ + public static function get_archive_title( $options, $block, $instance ) { + $output = ''; + $id = $options['id'] ?? 0; + + if ( is_category() ) { + $output = single_cat_title( '', false ); + } elseif ( is_tag() ) { + $output = single_tag_title( '', false ); + } elseif ( is_author() ) { + $output = get_the_author(); + } elseif ( is_post_type_archive() ) { + $output = post_type_archive_title( '', false ); + } elseif ( is_tax() ) { + $output = single_term_title( '', false ); + } elseif ( is_home() ) { + $page = get_option( 'page_for_posts' ) ?? 0; + + if ( $page ) { + $output = get_the_title( $page ); + } else { + $output = __( 'Blog', 'generateblocks-pro' ); + } + } elseif ( is_search() ) { + $output = get_search_query(); + } elseif ( $id ) { + if ( term_exists( (int) $id ) ) { + $term = get_term( $id ); + $output = $term->name; + } elseif ( is_string( $id ) ) { + // Assume it's a post type archive title. + $post_type_obj = get_post_type_object( $id ); + $title = $post_type_obj->labels->name ?? ''; + + if ( $title ) { + /** + * Core Filter. Filters the post type archive title. + * + * @param string $post_type_name Post type 'name' label. + * @param string $post_type Post type. + */ + $output = apply_filters( 'post_type_archive_title', $title, $id ); + } + } + } + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + /** + * Get the archive description. + * + * @param array $options The options. + * @param object $block The block. + * @param object $instance The block instance. + * @return string + */ + public static function get_archive_description( $options, $block, $instance ) { + $output = get_the_archive_description(); + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + /** + * Get the term meta. + * + * @param array $options The options. + * @param array $block The block. + * @param object $instance The block instance. + * @return string + */ + public static function get_term_meta( $options, $block, $instance ) { + $id = GenerateBlocks_Dynamic_Tags::get_id( $options, 'term', $instance ); + + if ( ! $id ) { + return GenerateBlocks_Dynamic_Tag_Callbacks::output( '', $options, $instance ); + } + + $key = $options['key'] ?? ''; + $output = ''; + + if ( empty( $key ) ) { + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + $value = GenerateBlocks_Meta_Handler::get_term_meta( $id, $key, true ); + + if ( ! $value ) { + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + add_filter( 'wp_kses_allowed_html', [ 'GenerateBlocks_Dynamic_Tags', 'expand_allowed_html' ], 10, 2 ); + $output = wp_kses_post( $value ); + remove_filter( 'wp_kses_allowed_html', [ 'GenerateBlocks_Dynamic_Tags', 'expand_allowed_html' ], 10, 2 ); + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + /** + * Get the current year. + * + * @param array $options The options. + * @param array $block The block. + * @param object $instance The block instance. + * + * @return string + */ + public static function get_current_year( $options, $block, $instance ) { + $output = wp_date( 'Y' ); + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + /** + * Get the previous post page URL. + * + * @param array $options The options. + * @param object $block The block. + * @param object $instance The block instance. + * @return string + */ + public static function get_previous_posts_page_url( $options, $block, $instance ) { + $page_key = isset( $instance->context['generateblocks/queryId'] ) ? 'query-' . $instance->context['generateblocks/queryId'] . '-page' : 'query-page'; + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; // phpcs:ignore -- No data processing happening. + $inherit_query = $instance->context['generateblocks/inheritQuery'] ?? false; + $output = ''; + + if ( $inherit_query ) { + global $paged; + + if ( $paged > 1 ) { + $output = previous_posts( false ); + } + } elseif ( 1 !== $page ) { + $output = esc_url( add_query_arg( $page_key, $page - 1 ) ); + } + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + /** + * Get the next post page URL. + * + * @param array $options The options. + * @param object $block The block. + * @param object $instance The block instance. + * @return string + */ + public static function get_next_posts_page_url( $options, $block, $instance ) { + $page_key = isset( $instance->context['generateblocks/queryId'] ) ? 'query-' . $instance->context['generateblocks/queryId'] . '-page' : 'query-page'; + $page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ]; // phpcs:ignore -- No data processing happening. + $args = $instance->context['generateblocks/query'] ?? []; + $inherit_query = $instance->context['generateblocks/inheritQuery'] ?? false; + $per_page = $args['per_page'] ?? apply_filters( 'generateblocks_query_per_page_default', 10, $args ); + $output = ''; + + if ( $inherit_query ) { + global $wp_query, $paged; + + if ( ! $paged ) { + $paged = 1; // phpcs:ignore -- Need to overrite global here. + } + + $next_page = (int) $paged + 1; + + if ( $next_page <= $wp_query->max_num_pages ) { + $output = next_posts( $wp_query->max_num_pages, false ); + } + } else { + $query_data = $instance->context['generateblocks/queryData'] ?? null; + $query_type = $instance->context['generateblocks/queryType'] ?? GenerateBlocks_Block_Query::TYPE_WP_QUERY; + $is_wp_query = GenerateBlocks_Block_Query::TYPE_WP_QUERY === $query_type; + + if ( ! $query_data || ( ! $is_wp_query && ! is_array( $query_data ) ) ) { + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + $next_page = $page + 1; + $custom_query_max_pages = $is_wp_query + ? (int) $query_data->max_num_pages + : ceil( count( $query_data ) / $per_page ); + + if ( $custom_query_max_pages < $next_page ) { + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } + + if ( $custom_query_max_pages && $custom_query_max_pages !== $page ) { + $output = esc_url( add_query_arg( $page_key, $page + 1 ) ); + } + + wp_reset_postdata(); // Restore original Post Data. + } + + return GenerateBlocks_Dynamic_Tag_Callbacks::output( $output, $options, $instance ); + } +} + +GeneratePress_Pro_Dynamic_Tags_Register::get_instance()->init(); diff --git a/wp-content/plugins/gp-premium/inc/deprecated.php b/wp-content/plugins/gp-premium/inc/deprecated.php index 4c713be1..e84e37a8 100644 --- a/wp-content/plugins/gp-premium/inc/deprecated.php +++ b/wp-content/plugins/gp-premium/inc/deprecated.php @@ -716,3 +716,13 @@ if ( ! function_exists( 'generate_hidden_secondary_navigation' ) && function_exi } } } + +if ( ! function_exists( 'generate_package_setup' ) ) { + add_action( 'plugins_loaded', 'generate_package_setup' ); + /** + * Set up our translations + **/ + function generate_package_setup() { + // No longer needed. + } +} diff --git a/wp-content/plugins/gp-premium/library/customizer/controls/class-information-control.php b/wp-content/plugins/gp-premium/library/customizer/controls/class-information-control.php index 3d3adb0a..dc7af1a7 100644 --- a/wp-content/plugins/gp-premium/library/customizer/controls/class-information-control.php +++ b/wp-content/plugins/gp-premium/library/customizer/controls/class-information-control.php @@ -14,6 +14,10 @@ class GeneratePress_Information_Customize_Control extends WP_Customize_Control { public $description = ''; public $notice = ''; + public function enqueue() { + wp_enqueue_style( 'gp-info-control', trailingslashit( plugin_dir_url( __FILE__ ) ) . 'css/information-control.css', false, GP_PREMIUM_VERSION ); + } + public function to_json() { parent::to_json(); $this->json['description'] = $this->description; @@ -23,7 +27,7 @@ class GeneratePress_Information_Customize_Control extends WP_Customize_Control { public function content_template() { ?> <# if ( data.notice ) { #> -
+
<# } #> <# if ( data.label ) { #> diff --git a/wp-content/plugins/gp-premium/library/customizer/controls/css/information-control.css b/wp-content/plugins/gp-premium/library/customizer/controls/css/information-control.css new file mode 100644 index 00000000..4d042817 --- /dev/null +++ b/wp-content/plugins/gp-premium/library/customizer/controls/css/information-control.css @@ -0,0 +1,12 @@ +.gp-info-notice { + background: #fff; + border: 1px solid #c3c4c7; + border-left-width: 4px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + margin: 0; + padding: 1px 12px; +} + +.gp-info-notice-info { + border-left-color: #72aee6; +} diff --git a/wp-content/plugins/gp-premium/readme.txt b/wp-content/plugins/gp-premium/readme.txt index 1c2c884e..7a9dec78 100644 --- a/wp-content/plugins/gp-premium/readme.txt +++ b/wp-content/plugins/gp-premium/readme.txt @@ -3,9 +3,9 @@ Contributors: edge22 Donate link: https://generatepress.com Tags: generatepress Requires at least: 6.1 -Tested up to: 6.6 +Tested up to: 6.8 Requires PHP: 7.2 -Stable tag: 2.5.0 +Stable tag: 2.5.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -27,6 +27,15 @@ In most cases, #1 will work fine and is way easier. == Changelog == += 2.5.2 = +* Fix: Customizer notice placements + += 2.5.1 = +* Feature: Serve new GenerateBlocks 2.0 sites in the Site Library +* Feature: Add more GenerateBlocks 2.0 dynamic tags if GB Pro is not active +* Feature: Add support for Font Library when importing starter sites +* Fix: Missing Elements Display Rules in some configurations + = 2.5.0 = * Feature: Font Library * Feature: Install Google Fonts locally diff --git a/wp-content/plugins/gp-premium/site-library/class-site-library-helper.php b/wp-content/plugins/gp-premium/site-library/class-site-library-helper.php index a9d701c3..04f92320 100644 --- a/wp-content/plugins/gp-premium/site-library/class-site-library-helper.php +++ b/wp-content/plugins/gp-premium/site-library/class-site-library-helper.php @@ -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', ); } diff --git a/wp-content/plugins/gp-premium/site-library/class-site-library-rest.php b/wp-content/plugins/gp-premium/site-library/class-site-library-rest.php index 2f8e9284..abcd7f27 100644 --- a/wp-content/plugins/gp-premium/site-library/class-site-library-rest.php +++ b/wp-content/plugins/gp-premium/site-library/class-site-library-rest.php @@ -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' ); } diff --git a/wp-content/plugins/gp-premium/webpack.config.js b/wp-content/plugins/gp-premium/webpack.config.js index 0672c9bb..363d3086 100644 --- a/wp-content/plugins/gp-premium/webpack.config.js +++ b/wp-content/plugins/gp-premium/webpack.config.js @@ -21,6 +21,7 @@ module.exports = { dashboard: './src/dashboard.js', editor: './src/editor.js', packages: './src/packages.scss', + 'adjacent-posts': './src/adjacent-posts.js', }, output: { ...defaultConfig.output,