Skip to content

Commit

Permalink
Merge branch 'release/23.8' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobattocchi committed Oct 28, 2024
2 parents a42aa9a + eb20137 commit 050de70
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 39 deletions.
4 changes: 2 additions & 2 deletions admin/class-gutenberg-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
public const CURRENT_RELEASE = '19.4.0';
public const CURRENT_RELEASE = '19.5.0';

/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
public const MINIMUM_SUPPORTED = '19.4.0';
public const MINIMUM_SUPPORTED = '19.5.0';

/**
* Holds the current version.
Expand Down
43 changes: 9 additions & 34 deletions admin/metabox/class-metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ public function __construct() {
}

add_action( 'add_meta_boxes', [ $this, 'add_meta_box' ] );
// Enqueue metabox assets for the block editor.
add_action( 'enqueue_block_assets', [ $this, 'enqueue' ] );
// Enqueue metabox assets for other editors.
add_action( 'admin_enqueue_scripts', [ $this, 'maybe_enqueue_assets_non_block_editor' ] );

add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_post_overview_assets' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );
add_action( 'wp_insert_post', [ $this, 'save_postdata' ] );
add_action( 'edit_attachment', [ $this, 'save_postdata' ] );
add_action( 'add_attachment', [ $this, 'save_postdata' ] );
Expand Down Expand Up @@ -804,51 +799,31 @@ public function is_meta_value_disabled( $key ) {
}

/**
* Enqueues assets for the post overview page.
* Enqueues all the needed JS and CSS.
*
* @todo [JRF => whomever] Create css/metabox-mp6.css file and add it to the below allowed colors array when done.
*
* @return void
*/
public function enqueue_post_overview_assets() {
public function enqueue() {
global $pagenow;

$asset_manager = new WPSEO_Admin_Asset_Manager();

$is_editor = self::is_post_overview( $pagenow ) || self::is_post_edit( $pagenow );

if ( self::is_post_overview( $pagenow ) ) {
$asset_manager->enqueue_style( 'edit-page' );
$asset_manager->enqueue_script( 'edit-page' );
}
}

/**
* Checks to make sure the current editor used is not the block editor to enqueue all needed assets.
* If it is the block editor the assets are already enqueued in the `enqueue_block_assets` action.
*
* @return void
*/
public function maybe_enqueue_assets_non_block_editor() {
global $pagenow;

if ( ( self::is_post_edit( $pagenow ) === false && apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) === false ) || WP_Screen::get()->is_block_editor() ) {
return;
}

$this->enqueue();
}

/**
* Enqueues all the needed JS and CSS.
*
* @todo [JRF => whomever] Create css/metabox-mp6.css file and add it to the below allowed colors array when done.
*
* @return void
*/
public function enqueue() {
if ( $this->display_metabox() === false ) {
/* Filter 'wpseo_always_register_metaboxes_on_admin' documented in wpseo-main.php */
if ( ( $is_editor === false && apply_filters( 'wpseo_always_register_metaboxes_on_admin', false ) === false ) || $this->display_metabox() === false ) {
return;
}

$asset_manager = new WPSEO_Admin_Asset_Manager();

$post_id = get_queried_object_id();
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
if ( empty( $post_id ) && isset( $_GET['post'] ) && is_string( $_GET['post'] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"webpack-bundle-analyzer": "^4.9.1"
},
"yoast": {
"pluginVersion": "23.8-RC2"
"pluginVersion": "23.8-RC3"
},
"version": "0.0.0"
}
2 changes: 1 addition & 1 deletion wp-seo-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* {@internal Nobody should be able to overrule the real version number as this can cause
* serious issues with the options, so no if ( ! defined() ).}}
*/
define( 'WPSEO_VERSION', '23.8-RC2' );
define( 'WPSEO_VERSION', '23.8-RC3' );


if ( ! defined( 'WPSEO_PATH' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion wp-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @wordpress-plugin
* Plugin Name: Yoast SEO
* Version: 23.8-RC2
* Version: 23.8-RC3
* Plugin URI: https://yoa.st/1uj
* Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
* Author: Team Yoast
Expand Down

0 comments on commit 050de70

Please sign in to comment.