| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | * @wordpress-plugin |
| 11 | 11 | * Plugin Name: Parse.ly |
| 12 | 12 | * Plugin URI: https://docs.parse.ly/wordpress |
| 13 | 13 | * Description: This plugin makes it a snap to add Parse.ly tracking code and metadata to your WordPress blog. |
| 14 | - * Version: 3.23.3 | |
| 14 | + * Version: 3.24.3 | |
| 15 | 15 | * Author: Parse.ly |
| 16 | 16 | * Author URI: https://www.parse.ly |
| 17 | 17 | * Text Domain: wp-parsely |
| 18 | 18 | * License: GPL-2.0-or-later |
| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | * License: GPL-2.0-or-later |
| 19 | 19 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 20 | 20 | * GitHub Plugin URI: https://github.com/Parsely/wp-parsely |
| 21 | 21 | * Requires PHP: 7.4 |
| 22 | - * Requires WP: 6.0.0 | |
| 22 | + * Requires WP: 6.1.0 | |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | declare(strict_types=1); |
| 26 | 26 | |
| @@ -49,9 +49,9 @@ | ||
| 49 | 49 | if ( class_exists( Parsely::class ) ) { |
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | -const PARSELY_VERSION = '3.23.3'; | |
| 53 | +const PARSELY_VERSION = '3.24.3'; | |
| 54 | 54 | const PARSELY_FILE = __FILE__; |
| 55 | 55 | const PARSELY_DATA_SCHEMA_VERSION = '1'; |
| 56 | 56 | const PARSELY_CACHE_GROUP = 'wp-parsely'; |
| 57 | 57 | |
| @@ -118,9 +118,9 @@ | ||
| 118 | 118 | ( new Site_Health( $parsely ) )->run(); |
| 119 | 119 | ( new Dashboard_Widget( $parsely ) )->run(); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | -add_action( 'admin_init', __NAMESPACE__ . '\\create_engagement_boost_changeset_post' ); | |
| 122 | +add_action( 'load-toplevel_page_parsely-dashboard-page', __NAMESPACE__ . '\\create_engagement_boost_changeset_post' ); | |
| 123 | 123 | /** |
| 124 | 124 | * Creates a predefined changeset post in order to make the Engagement Boost |
| 125 | 125 | * preview work for non-administrator user roles. |
| 126 | 126 | * |
| @@ -132,11 +132,13 @@ | ||
| 132 | 132 | * `class-wp-customize-manager.php` and prevents preview, displaying "-1". |
| 133 | 133 | * |
| 134 | 134 | * By creating a predefined changeset post with a known UUID that we use in |
| 135 | 135 | * `iFrameSrc()`, we guarantee that the preview will work for all authorized |
| 136 | - * user roles. | |
| 136 | + * user roles. The preview only appears on the Engagement Boost page, so the | |
| 137 | + * post is created when that page loads. | |
| 137 | 138 | * |
| 138 | 139 | * @since 3.20.7 |
| 140 | + * @since 3.24.3 Runs only when the Engagement Boost page loads. | |
| 139 | 141 | */ |
| 140 | 142 | function create_engagement_boost_changeset_post(): void { |
| 141 | 143 | if ( ! function_exists( 'post_exists' ) ) { |
| 142 | 144 | return; |
| @@ -224,8 +226,22 @@ | ||
| 224 | 226 | function init_content_helper_editor_sidebar(): void { |
| 225 | 227 | $GLOBALS['parsely_editor_sidebar']->run(); |
| 226 | 228 | } |
| 227 | 229 | |
| 230 | +add_action( 'enqueue_block_assets', __NAMESPACE__ . '\\init_content_helper_canvas_styles' ); | |
| 231 | +/** | |
| 232 | + * Inserts the PCH Editor Sidebar styles that need to reach the Editor canvas. | |
| 233 | + * | |
| 234 | + * @since 3.24.0 | |
| 235 | + */ | |
| 236 | +function init_content_helper_canvas_styles(): void { | |
| 237 | + if ( ! isset( $GLOBALS['parsely_editor_sidebar'] ) ) { | |
| 238 | + return; | |
| 239 | + } | |
| 240 | + | |
| 241 | + $GLOBALS['parsely_editor_sidebar']->run_canvas_styles(); | |
| 242 | +} | |
| 243 | + | |
| 228 | 244 | add_action( 'admin_init', __NAMESPACE__ . '\\parsely_content_helper_editor_sidebar_features' ); |
| 229 | 245 | add_action( 'rest_api_init', __NAMESPACE__ . '\\parsely_content_helper_editor_sidebar_features' ); |
| 230 | 246 | /** |
| 231 | 247 | * Initializes the PCH Editor Sidebar features. |
| @@ -313,9 +329,9 @@ | ||
| 313 | 329 | // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_posts_get_posts |
| 314 | 330 | $smart_links_without_status = get_posts( |
| 315 | 331 | array( |
| 316 | 332 | 'post_type' => 'parsely_smart_link', |
| 317 | - 'posts_per_page' => -1, | |
| 333 | + 'posts_per_page' => -1, // phpcs:ignore WordPressVIPMinimum.Performance.NoPaging.posts_per_page_posts_per_page | |
| 318 | 334 | 'fields' => 'ids', |
| 319 | 335 | // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query |
| 320 | 336 | 'tax_query' => array( |
| 321 | 337 | array( |