plugin updates

This commit is contained in:
Tony Volpe
2024-11-20 22:40:39 -05:00
parent 0238f0c4ca
commit 3362947c6e
434 changed files with 13405 additions and 9202 deletions

View File

@@ -250,7 +250,7 @@ class WPSEO_Admin_Init {
* @return void
*/
private function load_xml_sitemaps_admin() {
if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) {
if ( WPSEO_Options::get( 'enable_xml_sitemap', false, [ 'wpseo' ] ) ) {
new WPSEO_Sitemaps_Admin();
}
}

View File

@@ -43,15 +43,11 @@ class WPSEO_Admin {
WPSEO_Options::maybe_set_multisite_defaults( false );
}
if ( WPSEO_Options::get( 'stripcategorybase' ) === true ) {
add_action( 'created_category', [ $this, 'schedule_rewrite_flush' ] );
add_action( 'edited_category', [ $this, 'schedule_rewrite_flush' ] );
add_action( 'delete_category', [ $this, 'schedule_rewrite_flush' ] );
}
add_action( 'created_category', [ $this, 'schedule_rewrite_flush' ] );
add_action( 'edited_category', [ $this, 'schedule_rewrite_flush' ] );
add_action( 'delete_category', [ $this, 'schedule_rewrite_flush' ] );
if ( WPSEO_Options::get( 'disable-attachment' ) === true ) {
add_filter( 'wpseo_accessible_post_types', [ 'WPSEO_Post_Type', 'filter_attachment_post_type' ] );
}
add_filter( 'wpseo_accessible_post_types', [ 'WPSEO_Post_Type', 'filter_attachment_post_type' ] );
add_filter( 'plugin_action_links_' . WPSEO_BASENAME, [ $this, 'add_action_link' ], 10, 2 );
add_filter( 'network_admin_plugin_action_links_' . WPSEO_BASENAME, [ $this, 'add_action_link' ], 10, 2 );
@@ -75,8 +71,6 @@ class WPSEO_Admin {
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
}
$this->set_upsell_notice();
$this->initialize_cornerstone_content();
if ( WPSEO_Utils::is_plugin_network_active() ) {
@@ -119,6 +113,10 @@ class WPSEO_Admin {
* @return void
*/
public function schedule_rewrite_flush() {
if ( WPSEO_Options::get( 'stripcategorybase' ) !== true ) {
return;
}
// Bail if this is a multisite installation and the site has been switched.
if ( is_multisite() && ms_is_switched() ) {
return;
@@ -367,17 +365,6 @@ class WPSEO_Admin {
);
}
/**
* Sets the upsell notice.
*
* @return void
*/
protected function set_upsell_notice() {
$upsell = new WPSEO_Product_Upsell_Notice();
$upsell->dismiss_notice_listener();
$upsell->initialize();
}
/**
* Whether we are on the admin dashboard page.
*

View File

@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
public const CURRENT_RELEASE = '19.5.0';
public const CURRENT_RELEASE = '19.6.1';
/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
public const MINIMUM_SUPPORTED = '19.5.0';
public const MINIMUM_SUPPORTED = '19.6.1';
/**
* Holds the current version.

View File

@@ -61,7 +61,7 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration
add_action( 'restrict_manage_posts', [ $this, 'render_hidden_input' ] );
}
if ( $this->is_filter_active() && $this->get_explanation() !== null ) {
if ( $this->is_filter_active() ) {
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_explanation_assets' ] );
}
}
@@ -83,13 +83,19 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration
* @return void
*/
public function enqueue_explanation_assets() {
$explanation = $this->get_explanation();
if ( $explanation === null ) {
return;
}
$asset_manager = new WPSEO_Admin_Asset_Manager();
$asset_manager->enqueue_script( 'filter-explanation' );
$asset_manager->enqueue_style( 'filter-explanation' );
$asset_manager->localize_script(
'filter-explanation',
'yoastFilterExplanation',
[ 'text' => $this->get_explanation() ]
[ 'text' => $explanation ]
);
}

View File

@@ -82,8 +82,8 @@ class WPSEO_Metabox extends WPSEO_Meta {
$this->editor = new WPSEO_Metabox_Editor();
$this->editor->register_hooks();
$this->social_is_enabled = WPSEO_Options::get( 'opengraph', false ) || WPSEO_Options::get( 'twitter', false );
$this->is_advanced_metadata_enabled = WPSEO_Capability_Utils::current_user_can( 'wpseo_edit_advanced_metadata' ) || WPSEO_Options::get( 'disableadvanced_meta' ) === false;
$this->social_is_enabled = WPSEO_Options::get( 'opengraph', false, [ 'wpseo_social' ] ) || WPSEO_Options::get( 'twitter', false, [ 'wpseo_social' ] );
$this->is_advanced_metadata_enabled = WPSEO_Capability_Utils::current_user_can( 'wpseo_edit_advanced_metadata' ) || WPSEO_Options::get( 'disableadvanced_meta', null, [ 'wpseo' ] ) === false;
$this->seo_analysis = new WPSEO_Metabox_Analysis_SEO();
$this->readability_analysis = new WPSEO_Metabox_Analysis_Readability();

View File

@@ -21,8 +21,8 @@ $yoast_seo_i18n_title = __( 'Problems', 'wordpress-seo' );
$yoast_seo_i18n_issues = __( 'We have detected the following issues that affect the SEO of your site.', 'wordpress-seo' );
$yoast_seo_i18n_no_issues = __( 'Good job! We could detect no serious SEO problems.', 'wordpress-seo' );
$yoast_seo_i18n_muted_issues_title = sprintf(
/* translators: %d expands the amount of hidden problems. */
_n( 'You have %d hidden problem:', 'You have %d hidden problems:', $yoast_seo_dismissed_total, 'wordpress-seo' ),
/* translators: %d expands the amount of hidden notifications. */
_n( 'You have %d hidden notification:', 'You have %d hidden notifications:', $yoast_seo_dismissed_total, 'wordpress-seo' ),
$yoast_seo_dismissed_total
);