plugin updates

This commit is contained in:
Tony Volpe
2024-09-25 09:45:47 -04:00
parent cc870f301f
commit f6021c7c22
245 changed files with 4835 additions and 4671 deletions
@@ -112,10 +112,6 @@ class WPSEO_Admin_Pages {
if ( in_array( $page, [ WPSEO_Admin::PAGE_IDENTIFIER, 'wpseo_workouts' ], true ) ) {
wp_enqueue_media();
$script_data['media'] = [
'choose_image' => __( 'Use Image', 'wordpress-seo' ),
];
$script_data['userEditUrl'] = add_query_arg( 'user_id', '{user_id}', admin_url( 'user-edit.php' ) );
}
@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
public const CURRENT_RELEASE = '19.0.0';
public const CURRENT_RELEASE = '19.2.0';
/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
public const MINIMUM_SUPPORTED = '19.0.0';
public const MINIMUM_SUPPORTED = '19.2.0';
/**
* Holds the current version.
@@ -721,6 +721,8 @@ class Yoast_Form {
* Media input.
*
* @since 2.0
* @deprecated 23.5
* @codeCoverageIgnore
*
* @param string $variable Option name.
* @param string $label Label message.
@@ -729,6 +731,9 @@ class Yoast_Form {
* @return void
*/
public function media_input( $variable, $label, $attr = [] ) {
_deprecated_function( __METHOD__, 'Yoast SEO 23.5' );
$val = $this->get_field_value( $variable, '' );
$id_value = $this->get_field_value( $variable . '_id', '' );
@@ -749,8 +754,6 @@ class Yoast_Form {
$id_field_id = 'wpseo_' . $var_esc . '_id';
$disabled_attribute = $this->get_disabled_attribute( $variable, $attr );
echo '<span>';
echo '<input',
' class="textinput"',
@@ -760,22 +763,6 @@ class Yoast_Form {
' value="', esc_attr( $val ), '"',
' readonly="readonly"',
' /> ';
echo '<input',
' id="wpseo_', $var_esc, '_button"', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- output escaped before.
' class="wpseo_image_upload_button button"',
' type="button"',
' value="', esc_attr__( 'Upload Image', 'wordpress-seo' ), '"',
' data-target-id="', esc_attr( $id_field_id ), '"',
// phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $disabled_attribute output is hardcoded.
$disabled_attribute,
' /> ';
echo '<input',
' class="wpseo_image_remove_button button"',
' type="button"',
' value="', esc_attr__( 'Clear Image', 'wordpress-seo' ), '"',
// phpcs:ignore WordPress.Security.EscapeOutput -- Reason: $disabled_attribute output is hardcoded.
$disabled_attribute,
' />';
echo '<input',
' type="hidden"',
' id="', esc_attr( $id_field_id ), '"',
@@ -54,7 +54,6 @@ class WPSEO_Metabox_Formatter {
$defaults = [
'author_name' => get_the_author_meta( 'display_name' ),
'sitewide_social_image' => WPSEO_Options::get( 'og_default_image' ),
'translations' => $this->get_translations(),
'keyword_usage' => [],
'title_template' => '',
'metadesc_template' => '',
@@ -68,100 +67,6 @@ class WPSEO_Metabox_Formatter {
'articleTypeOptions' => $schema_types->get_article_type_options(),
],
'twitterCardType' => 'summary_large_image',
'publish_box' => [
'labels' => [
'keyword' => [
'na' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>'
),
'bad' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
),
'ok' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>'
),
'good' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the SEO score. */
__( '%1$sSEO%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-seo-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
),
],
'content' => [
'na' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>'
),
'bad' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
),
'ok' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'OK', 'wordpress-seo' ) . '</strong>'
),
'good' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the readability score. */
__( '%1$sReadability%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-readability-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
),
],
'inclusive-language' => [
'na' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the inclusive language score. */
__( '%1$sInclusive language%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-inclusive-language-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Not available', 'wordpress-seo' ) . '</strong>'
),
'bad' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the inclusive language score. */
__( '%1$sInclusive language%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-inclusive-language-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Needs improvement', 'wordpress-seo' ) . '</strong>'
),
'ok' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the inclusive language score. */
__( '%1$sInclusive language%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-inclusive-language-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Potentially non-inclusive', 'wordpress-seo' ) . '</strong>'
),
'good' => sprintf(
/* translators: %1$s expands to the opening anchor tag, %2$s to the closing anchor tag, %3$s to the inclusive language score. */
__( '%1$sInclusive language%2$s: %3$s', 'wordpress-seo' ),
'<a href="#yoast-inclusive-language-analysis-collapsible-metabox">',
'</a>',
'<strong>' . __( 'Good', 'wordpress-seo' ) . '</strong>'
),
],
],
],
/**
* Filter to determine if the markers should be enabled or not.
*
@@ -183,24 +88,4 @@ class WPSEO_Metabox_Formatter {
$enabled_features = $enabled_features_repo->get_enabled_features()->parse_to_legacy_array();
return array_merge( $defaults, $enabled_features );
}
/**
* Returns Jed compatible YoastSEO.js translations.
*
* @return string[]
*/
private function get_translations() {
$locale = get_user_locale();
$file = WPSEO_PATH . 'languages/wordpress-seo-' . $locale . '.json';
if ( file_exists( $file ) ) {
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents -- Retrieving a local file.
$file = file_get_contents( $file );
if ( is_string( $file ) && $file !== '' ) {
return json_decode( $file, true );
}
}
return [];
}
}
@@ -81,7 +81,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
add_action( 'wp_insert_post', [ $this, 'save_postdata' ] );
add_action( 'edit_attachment', [ $this, 'save_postdata' ] );
add_action( 'add_attachment', [ $this, 'save_postdata' ] );
add_action( 'admin_init', [ $this, 'translate_meta_boxes' ] );
$this->editor = new WPSEO_Metabox_Editor();
$this->editor->register_hooks();
@@ -168,9 +167,14 @@ class WPSEO_Metabox extends WPSEO_Meta {
* IMPORTANT: if you want to add a new string (option) somewhere, make sure you add that array key to
* the main meta box definition array in the class WPSEO_Meta() as well!!!!
*
* @deprecated 23.5
* @codeCoverageIgnore
*
* @return void
*/
public static function translate_meta_boxes() {
_deprecated_function( __METHOD__, 'Yoast SEO 23.5' );
WPSEO_Meta::$meta_fields['general']['title']['title'] = __( 'SEO title', 'wordpress-seo' );
WPSEO_Meta::$meta_fields['general']['metadesc']['title'] = __( 'Meta description', 'wordpress-seo' );
@@ -210,7 +214,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
WPSEO_Meta::$meta_fields['advanced']['redirect']['title'] = __( '301 Redirect', 'wordpress-seo' );
WPSEO_Meta::$meta_fields['advanced']['redirect']['description'] = __( 'The URL that this page should redirect to.', 'wordpress-seo' );
do_action( 'wpseo_tab_translate' );
do_action_deprecated( 'wpseo_tab_translate', [], 'Yoast SEO 23.5', '', 'WPSEO_Metabox::translate_meta_boxes is deprecated.' );
}
/**
@@ -623,31 +627,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
unset( $val, $option, $checked );
}
break;
case 'upload':
$content .= '<input'
. ' id="' . $esc_form_key . '"'
. ' type="text"'
. ' size="36"'
. ' class="' . $class . '"'
. ' name="' . $esc_form_key . '"'
. ' value="' . esc_attr( $meta_value ) . '"' . $aria_describedby
. ' readonly="readonly"'
. ' /> ';
$content .= '<input'
. ' id="' . esc_attr( $esc_form_key ) . '_button"'
. ' class="wpseo_image_upload_button button"'
. ' data-target="' . esc_attr( $esc_form_key ) . '"'
. ' data-target-id="' . esc_attr( $esc_form_key ) . '-id"'
. ' type="button"'
. ' value="' . esc_attr__( 'Upload Image', 'wordpress-seo' ) . '"'
. ' /> ';
$content .= '<input'
. ' class="wpseo_image_remove_button button"'
. ' type="button"'
. ' value="' . esc_attr__( 'Clear Image', 'wordpress-seo' ) . '"'
. ' />';
break;
}
$html = '';
@@ -881,7 +860,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
$plugins_script_data = [
'replaceVars' => [
'no_parent_text' => __( '(no parent)', 'wordpress-seo' ),
'replace_vars' => $this->get_replace_vars(),
'hidden_replace_vars' => $this->get_hidden_replace_vars(),
'recommended_replace_vars' => $this->get_recommended_replace_vars(),
@@ -907,8 +885,6 @@ class WPSEO_Metabox extends WPSEO_Meta {
$woocommerce_seo_active = is_plugin_active( $addon_manager->get_plugin_file( WPSEO_Addon_Manager::WOOCOMMERCE_SLUG ) );
$script_data = [
// @todo replace this translation with JavaScript translations.
'media' => [ 'choose_image' => __( 'Use Image', 'wordpress-seo' ) ],
'metabox' => $this->get_metabox_script_data(),
'userLanguageCode' => WPSEO_Language_Utils::get_language( get_user_locale() ),
'isPost' => true,
@@ -938,13 +914,8 @@ class WPSEO_Metabox extends WPSEO_Meta {
$site_information->set_permalink( $this->get_permalink() );
$script_data = array_merge_recursive( $site_information->get_legacy_site_information(), $script_data );
if ( post_type_supports( get_post_type(), 'thumbnail' ) ) {
if ( ! $is_block_editor && post_type_supports( get_post_type(), 'thumbnail' ) ) {
$asset_manager->enqueue_style( 'featured-image' );
// @todo replace this translation with JavaScript translations.
$script_data['featuredImage'] = [
'featured_image_notice' => __( 'SEO issue: The featured image should be at least 200 by 200 pixels to be picked up by Facebook and other social media sites.', 'wordpress-seo' ),
];
}
$asset_manager->localize_script( $post_edit_handle, 'wpseoScriptData', $script_data );
@@ -109,30 +109,6 @@ class WPSEO_Taxonomy_Fields_Presenter {
}
$field .= '<textarea class="large-text" rows="' . esc_attr( $rows ) . '" id="' . $field_name . '" name="' . $field_name . '"' . $aria_describedby . '>' . esc_textarea( $field_value ) . '</textarea>';
break;
case 'upload':
$field .= '<input'
. ' id="' . $field_name . '"'
. ' type="text"'
. ' size="36"'
. ' name="' . $field_name . '"'
. ' value="' . esc_attr( $field_value ) . '"' . $aria_describedby . ''
. ' readonly="readonly"'
. ' /> ';
$field .= '<input'
. ' id="' . esc_attr( $field_name ) . '_button"'
. ' class="wpseo_image_upload_button button"'
. ' data-target="' . esc_attr( $field_name ) . '"'
. ' data-target-id="hidden_' . esc_attr( $field_name ) . '-id"'
. ' type="button"'
. ' value="' . esc_attr__( 'Upload Image', 'wordpress-seo' ) . '"'
. ' /> ';
$field .= '<input'
. ' id="' . esc_attr( $field_name ) . '_button"'
. ' class="wpseo_image_remove_button button"'
. ' type="button"'
. ' value="' . esc_attr__( 'Clear Image', 'wordpress-seo' ) . '"'
. ' />';
break;
case 'select':
if ( is_array( $options ) && $options !== [] ) {
$field .= '<select name="' . $field_name . '" id="' . $field_name . '"' . $aria_describedby . '>';
@@ -165,7 +165,6 @@ class WPSEO_Taxonomy {
'analysis' => [
'plugins' => [
'replaceVars' => [
'no_parent_text' => __( '(no parent)', 'wordpress-seo' ),
'replace_vars' => $this->get_replace_vars(),
'recommended_replace_vars' => $this->get_recommended_replace_vars(),
'scope' => $this->determine_scope(),
@@ -182,10 +181,6 @@ class WPSEO_Taxonomy {
'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
],
],
'media' => [
// @todo replace this translation with JavaScript translations.
'choose_image' => __( 'Use Image', 'wordpress-seo' ),
],
'metabox' => $this->localize_term_scraper_script( $tag_id ),
'userLanguageCode' => WPSEO_Language_Utils::get_language( get_user_locale() ),
'isTerm' => true,
@@ -316,7 +311,6 @@ class WPSEO_Taxonomy {
*/
public function localize_replace_vars_script() {
return [
'no_parent_text' => __( '(no parent)', 'wordpress-seo' ),
'replace_vars' => $this->get_replace_vars(),
'recommended_replace_vars' => $this->get_recommended_replace_vars(),
'scope' => $this->determine_scope(),
@@ -416,8 +416,8 @@ class WPSEO_Utils {
* @return void
*/
public static function clear_cache() {
if ( function_exists( 'w3tc_pgcache_flush' ) ) {
w3tc_pgcache_flush();
if ( function_exists( 'w3tc_flush_posts' ) ) {
w3tc_flush_posts();
}
elseif ( function_exists( 'wp_cache_clear_cache' ) ) {
wp_cache_clear_cache();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
(()=>{"use strict";const e=window.React;var o,r;function s(){return s=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},s.apply(this,arguments)}const n=window.wp.i18n,a=window.yoast.analysis,c=window.lodash,t=window.yoast.componentsNew,i=window.yoast.styleGuide;function d(e){switch(e){case"loading":return{icon:"loading-spinner",color:i.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:i.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:i.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:i.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:i.colors.$color_ok};default:return{icon:"seo-score-bad",color:i.colors.$color_red}}}const l=window.yoast.propTypes;function u({score:o,label:r,scoreValue:s}){return(0,e.createElement)("div",{className:"yoast-analysis-check"},(0,e.createElement)(t.SvgIcon,{...d(o)}),(0,e.createElement)("span",null," ",r," ",s&&(0,e.createElement)("strong",null,s)))}u.propTypes={score:l.string.isRequired,label:l.string.isRequired,scoreValue:l.string},u.defaultProps={scoreValue:""},window.yoast=window.yoast||{},window.yoast.frontendInspector={getIndicatorForScore:function(e){return(0,c.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,n.__)("Feedback","wordpress-seo"),screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""};case"bad":return{className:"bad",screenReaderText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,n.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,n.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(a.interpreters.scoreToRating(e))},AnalysisCheck:u,YoastIcon:n=>e.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},n),o||(o=e.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),r||(r=e.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"})))}})();
(()=>{"use strict";const e=window.React;var o,r;function s(){return s=Object.assign?Object.assign.bind():function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},s.apply(this,arguments)}const n=window.wp.i18n,a=window.yoast.analysis,t=window.lodash,c=window.yoast.componentsNew,i=window.yoast.styleGuide;function l(e){switch(e){case"loading":return{icon:"loading-spinner",color:i.colors.$color_green_medium_light};case"not-set":return{icon:"seo-score-none",color:i.colors.$color_score_icon};case"noindex":return{icon:"seo-score-none",color:i.colors.$color_noindex};case"good":return{icon:"seo-score-good",color:i.colors.$color_green_medium};case"ok":return{icon:"seo-score-ok",color:i.colors.$color_ok};default:return{icon:"seo-score-bad",color:i.colors.$color_red}}}const d=window.yoast.propTypes;function u({score:o,label:r,scoreValue:s}){return(0,e.createElement)("div",{className:"yoast-analysis-check"},(0,e.createElement)(c.SvgIcon,{...l(o)}),(0,e.createElement)("span",null," ",r," ",s&&(0,e.createElement)("strong",null,s)))}u.propTypes={score:d.string.isRequired,label:d.string.isRequired,scoreValue:d.string},u.defaultProps={scoreValue:""},window.yoast=window.yoast||{},window.yoast.frontendInspector={getIndicatorForScore:function(e){return(0,t.isNil)(e)||(e/=10),function(e){switch(e){case"feedback":return{className:"na",screenReaderText:(0,n.__)("Not available","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Not available","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Not available","wordpress-seo")};case"bad":return{className:"bad",screenReaderText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Needs improvement","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Needs improvement","wordpress-seo")};case"ok":return{className:"ok",screenReaderText:(0,n.__)("OK SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("OK","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Potentially non-inclusive","wordpress-seo")};case"good":return{className:"good",screenReaderText:(0,n.__)("Good SEO score","wordpress-seo"),screenReaderReadabilityText:(0,n.__)("Good","wordpress-seo"),screenReaderInclusiveLanguageText:(0,n.__)("Good","wordpress-seo")};default:return{className:"loading",screenReaderText:"",screenReaderReadabilityText:"",screenReaderInclusiveLanguageText:""}}}(a.interpreters.scoreToRating(e))},AnalysisCheck:u,YoastIcon:n=>e.createElement("svg",s({xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 425 456.27"},n),o||(o=e.createElement("path",{d:"M73 405.26a66.79 66.79 0 0 1-6.54-1.7 64.75 64.75 0 0 1-6.28-2.31c-1-.42-2-.89-3-1.37-1.49-.72-3-1.56-4.77-2.56-1.5-.88-2.71-1.64-3.83-2.39-.9-.61-1.8-1.26-2.68-1.92a70.154 70.154 0 0 1-5.08-4.19 69.21 69.21 0 0 1-8.4-9.17c-.92-1.2-1.68-2.25-2.35-3.24a70.747 70.747 0 0 1-3.44-5.64 68.29 68.29 0 0 1-8.29-32.55V142.13a68.26 68.26 0 0 1 8.29-32.55c1-1.92 2.21-3.82 3.44-5.64s2.55-3.58 4-5.27a69.26 69.26 0 0 1 14.49-13.25C50.37 84.19 52.27 83 54.2 82A67.59 67.59 0 0 1 73 75.09a68.75 68.75 0 0 1 13.75-1.39h169.66L263 55.39H86.75A86.84 86.84 0 0 0 0 142.13v196.09A86.84 86.84 0 0 0 86.75 425h11.32v-18.35H86.75A68.75 68.75 0 0 1 73 405.26zM368.55 60.85l-1.41-.53-6.41 17.18 1.41.53a68.06 68.06 0 0 1 8.66 4c1.93 1 3.82 2.2 5.65 3.43A69.19 69.19 0 0 1 391 98.67c1.4 1.68 2.72 3.46 3.95 5.27s2.39 3.72 3.44 5.64a68.29 68.29 0 0 1 8.29 32.55v264.52H233.55l-.44.76c-3.07 5.37-6.26 10.48-9.49 15.19L222 425h203V142.13a87.2 87.2 0 0 0-56.45-81.28z"})),r||(r=e.createElement("path",{stroke:"#000",strokeMiterlimit:10,strokeWidth:3.81,d:"M119.8 408.28v46c28.49-1.12 50.73-10.6 69.61-29.58 19.45-19.55 36.17-50 52.61-96L363.94 1.9H305l-98.25 272.89-48.86-153h-54l71.7 184.18a75.67 75.67 0 0 1 0 55.12c-7.3 18.68-20.25 40.66-55.79 47.19z"})))}})();
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+18 -12
View File
@@ -5,7 +5,7 @@ License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
Tags: SEO, XML sitemap, Content analysis, Readability, Schema
Tested up to: 6.6
Stable tag: 23.4
Stable tag: 23.5
Requires PHP: 7.2.5
Improve your WordPress SEO: Write better content and have a fully optimized WordPress site using the Yoast SEO plugin.
@@ -32,7 +32,7 @@ Yoast SEO offers comprehensive analysis tools that help elevate your content's S
**Premium Yoast AI features** Get suggestions for your titles and descriptions at the click of a button. The [Yoast AI features](https://yoa.st/51c) save you time and optimize for higher click-through-rates.
* Yoast AI Generate enables users to generate meta descriptions and titles for your pages, blog posts and social posts. Great! Even better, when you also have [Yoast WooCommerce SEO](https://yoa.st/3rh), you can recieve suggestions for product SEO titles and descriptions too! The best part, if you don't like the 5 suggestions, you can generate five more at a click.
* Yoast AI Generate enables users to generate meta descriptions and titles for your pages, blog posts and social posts. Great! Even better, when you also have [Yoast WooCommerce SEO](https://yoa.st/3rh), you can receive suggestions for product SEO titles and descriptions too! The best part, if you don't like the 5 suggestions, you can generate five more at a click.
* Yoast AI Optimize helps you optimize existing content for search engines. Optimize three of the assessments in the Yoast SEO Analysis; Keyphrase in introduction, Keyphrase distribution and Keyphrase density, with easy dismiss or apply options.
@@ -274,6 +274,21 @@ Your question has most likely been answered on our help center: [yoast.com/help/
== Changelog ==
= 23.5 =
Release date: 2024-09-24
Yoast SEO 23.5 brings more enhancements and bugfixes. [Find more information about our software releases and updates here](https://yoa.st/release-24-9-24).
#### Enhancements
* Improves analysis score feedback labels in the publish sections.
* Improves our integration with cache plugins by preventing flushing their cache when not needed.
#### Bugfixes
* Fixes a bug where Arabic keyphrases containing certain function words were not correctly matched.
= 23.4 =
Release date: 2024-09-03
@@ -286,6 +301,7 @@ Yoast SEO 23.4 brings more enhancements and bugfixes. [Find more information abo
* Adds _так_ to the words recognized by the _transition words_ assessment in Russian. Props to @pavelmai83.
* Improves the schema output by following the specification for the _SearchAction_ more strictly.
* Re-enables the script concatenation that was disabled to prevent a bug with WordPress 5.5.
* Improves the look of the Yoast SEO metabox in the block editor by centering it and making it stand out more by using a background color.
#### Bugfixes
@@ -303,15 +319,5 @@ Yoast SEO 23.4 brings more enhancements and bugfixes. [Find more information abo
* Deprecates the `Duplicate_Post_Integration` class.
* Deprecates the `WPSEO_Admin_User_Profile::user_profile()` method and the `admin/views/user-profile.php` file.
= 23.3 =
Release date: 2024-08-20
Yoast SEO 23.3 brings more enhancements and bugfixes. [Find more information about our software releases and updates here](https://yoa.st/release-20-8-24).
#### Other
* This release only contains non-user-facing maintenance changes.
= Earlier versions =
For the changelog of earlier versions, please refer to [the changelog on yoast.com](https://yoa.st/yoast-seo-changelog).
@@ -58,7 +58,10 @@ class Last_Completed_Indexation_Integration implements Integration_Interface {
if ( $count === 0 ) {
$no_index = $this->options_helper->get( 'last_known_no_unindexed', [] );
$no_index[ $indexable_name ] = \time();
\remove_action( 'update_option_wpseo', [ 'WPSEO_Utils', 'clear_cache' ] );
$this->options_helper->set( 'last_known_no_unindexed', $no_index );
\add_action( 'update_option_wpseo', [ 'WPSEO_Utils', 'clear_cache' ] );
}
}
}
@@ -0,0 +1,18 @@
<?php
namespace Yoast\WP\SEO\Conditionals;
/**
* Conditional for the CHECK_REQUIRED_VERSION feature flag.
*/
class Check_Required_Version_Conditional extends Feature_Flag_Conditional {
/**
* Returns the name of the feature flag.
*
* @return string The name of the feature flag.
*/
protected function get_feature_flag() {
return 'CHECK_REQUIRED_VERSION';
}
}
@@ -1 +1 @@
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'a0f12a824e5689dd0faf'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '0499348f9e5ab4c08abf'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => '8c57c34c7e99c4356ae5'));
<?php return array('reduxJsToolkit.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-redux-package'), 'version' => '425acbd30b98c737df6e'), 'analysisReport.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => 'a0f12a824e5689dd0faf'), 'componentsNew.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-i18n', 'wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-react-select', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '898e7a63226507fb9afc'), 'featureFlag.js' => array('dependencies' => array('wp-polyfill'), 'version' => '91e54e3dd01f59a724ae'), 'helpers.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-styled-components-package'), 'version' => 'f38a5f8b9a9ba801e722'), 'replacementVariableEditor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-components', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-draft-js-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '3ef02d0813043f65de66'), 'searchMetadataPreviews.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-i18n', 'wp-polyfill', 'yoast-seo-analysis-package', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '732af9131c98940bc630'), 'socialMetadataForms.js' => array('dependencies' => array('lodash', 'react', 'wp-i18n', 'wp-polyfill', 'yoast-seo-components-new-package', 'yoast-seo-helpers-package', 'yoast-seo-prop-types-package', 'yoast-seo-redux-package', 'yoast-seo-replacement-variable-editor-package', 'yoast-seo-style-guide-package', 'yoast-seo-styled-components-package'), 'version' => '6c538797b828b87a5419'), 'styleGuide.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-helpers-package', 'yoast-seo-styled-components-package'), 'version' => 'a65ddb8de826da5fea4d'), 'uiLibrary.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-polyfill', 'yoast-seo-prop-types-package', 'yoast-seo-redux-js-toolkit-package'), 'version' => '0499348f9e5ab4c08abf'), 'chart.js.js' => array('dependencies' => array('wp-polyfill'), 'version' => '196fb6740f0ef8ce192a'), 'draftJs.js' => array('dependencies' => array('react', 'react-dom', 'wp-polyfill'), 'version' => 'f03ff0ae2ee1cf6bbc54'), 'jed.js' => array('dependencies' => array('wp-polyfill'), 'version' => '28697086e82ae1cd0e88'), 'propTypes.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4c546a0c9e97b70d3fe0'), 'reactHelmet.js' => array('dependencies' => array('react', 'wp-polyfill', 'yoast-seo-prop-types-package'), 'version' => 'b7d9f84f1dc499388f58'), 'redux.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e83451c8529be91b4af7'), 'styledComponents.js' => array('dependencies' => array('react', 'wp-polyfill'), 'version' => 'f030a78c47ee9be46c07'), 'analysis.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill', 'yoast-seo-feature-flag-package'), 'version' => 'ff91ef2a0dffb21796f7'));
@@ -1 +1 @@
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'dcd5887e134799f6ade3'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '4e1ef31d3c8242244a2f'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '469209f8725d57e2dd13'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8e4aac0747a3c7dddf8a'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a6f42ad6f8355317a56c'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd72edcab364d544c2469'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '51437f36b264d43a22db'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ff82c0b2cbb874d38d66'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5afc40a75db2d68cacf2'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a23c2630b045abc90aec'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '081c52437d052c9cad74'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd173d9d977c5b068443b'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ca63950fdd7d6938e7f0'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fb28921dba0da6614c80'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f08d46a7f98fa0b3d579'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '04746196da02bb736987'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c324d67321be4de5dba8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5908ab61bfa52f1abf82'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1b29b34cd8ec54326129'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f57759f2e75aed95a722'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'be3d5afc018c7be19ca5'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa3c53ba0e8c760d56ec'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f48abbda9bf8076db264'));
<?php return array('default.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'dcd5887e134799f6ade3'), 'ar.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '0d834af7f322c207067e'), 'ca.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '469209f8725d57e2dd13'), 'cs.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '8e4aac0747a3c7dddf8a'), 'de.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a6f42ad6f8355317a56c'), 'el.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd72edcab364d544c2469'), 'en.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '51437f36b264d43a22db'), 'es.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ff82c0b2cbb874d38d66'), 'fa.js' => array('dependencies' => array('wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5afc40a75db2d68cacf2'), 'fr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'a23c2630b045abc90aec'), 'he.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '081c52437d052c9cad74'), 'hu.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'd173d9d977c5b068443b'), 'id.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'ca63950fdd7d6938e7f0'), 'it.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'fb28921dba0da6614c80'), 'ja.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f08d46a7f98fa0b3d579'), 'nb.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '04746196da02bb736987'), 'nl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'c324d67321be4de5dba8'), 'pl.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '5908ab61bfa52f1abf82'), 'pt.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => '1b29b34cd8ec54326129'), 'ru.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f57759f2e75aed95a722'), 'sk.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'be3d5afc018c7be19ca5'), 'sv.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'aa3c53ba0e8c760d56ec'), 'tr.js' => array('dependencies' => array('lodash', 'wp-polyfill', 'yoast-seo-analysis-package'), 'version' => 'f48abbda9bf8076db264'));
File diff suppressed because one or more lines are too long
@@ -89,6 +89,7 @@ class Cached_Container extends Container
'yoast\\wp\\seo\\conditionals\\admin\\yoast_admin_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional',
'yoast\\wp\\seo\\conditionals\\admin_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional',
'yoast\\wp\\seo\\conditionals\\attachment_redirections_enabled_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional',
'yoast\\wp\\seo\\conditionals\\check_required_version_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional',
'yoast\\wp\\seo\\conditionals\\deactivating_yoast_seo_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional',
'yoast\\wp\\seo\\conditionals\\development_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional',
'yoast\\wp\\seo\\conditionals\\front_end_conditional' => 'Yoast\\WP\\SEO\\Conditionals\\Front_End_Conditional',
@@ -258,6 +259,7 @@ class Cached_Container extends Container
'yoast\\wp\\seo\\initializers\\crawl_cleanup_permalinks' => 'Yoast\\WP\\SEO\\Initializers\\Crawl_Cleanup_Permalinks',
'yoast\\wp\\seo\\initializers\\disable_core_sitemaps' => 'Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps',
'yoast\\wp\\seo\\initializers\\migration_runner' => 'Yoast\\WP\\SEO\\Initializers\\Migration_Runner',
'yoast\\wp\\seo\\initializers\\plugin_headers' => 'Yoast\\WP\\SEO\\Initializers\\Plugin_Headers',
'yoast\\wp\\seo\\initializers\\woocommerce' => 'Yoast\\WP\\SEO\\Initializers\\Woocommerce',
'yoast\\wp\\seo\\integrations\\academy_integration' => 'Yoast\\WP\\SEO\\Integrations\\Academy_Integration',
'yoast\\wp\\seo\\integrations\\admin\\activation_cleanup_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Activation_Cleanup_Integration',
@@ -265,6 +267,7 @@ class Cached_Container extends Container
'yoast\\wp\\seo\\integrations\\admin\\addon_installation\\installation_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Addon_Installation\\Installation_Integration',
'yoast\\wp\\seo\\integrations\\admin\\admin_columns_cache_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Admin_Columns_Cache_Integration',
'yoast\\wp\\seo\\integrations\\admin\\background_indexing_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration',
'yoast\\wp\\seo\\integrations\\admin\\check_required_version' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version',
'yoast\\wp\\seo\\integrations\\admin\\crawl_settings_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Crawl_Settings_Integration',
'yoast\\wp\\seo\\integrations\\admin\\cron_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Cron_Integration',
'yoast\\wp\\seo\\integrations\\admin\\deactivated_premium_integration' => 'Yoast\\WP\\SEO\\Integrations\\Admin\\Deactivated_Premium_Integration',
@@ -519,6 +522,7 @@ class Cached_Container extends Container
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional' => 'getYoastAdminConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional' => 'getAdminConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional' => 'getAttachmentRedirectionsEnabledConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional' => 'getCheckRequiredVersionConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional' => 'getDeactivatingYoastSeoConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional' => 'getDevelopmentConditionalService',
'Yoast\\WP\\SEO\\Conditionals\\Front_End_Conditional' => 'getFrontEndConditionalService',
@@ -688,6 +692,7 @@ class Cached_Container extends Container
'Yoast\\WP\\SEO\\Initializers\\Crawl_Cleanup_Permalinks' => 'getCrawlCleanupPermalinksService',
'Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps' => 'getDisableCoreSitemapsService',
'Yoast\\WP\\SEO\\Initializers\\Migration_Runner' => 'getMigrationRunnerService',
'Yoast\\WP\\SEO\\Initializers\\Plugin_Headers' => 'getPluginHeadersService',
'Yoast\\WP\\SEO\\Initializers\\Woocommerce' => 'getWoocommerceService',
'Yoast\\WP\\SEO\\Integrations\\Academy_Integration' => 'getAcademyIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Activation_Cleanup_Integration' => 'getActivationCleanupIntegrationService',
@@ -695,6 +700,7 @@ class Cached_Container extends Container
'Yoast\\WP\\SEO\\Integrations\\Admin\\Addon_Installation\\Installation_Integration' => 'getInstallationIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Admin_Columns_Cache_Integration' => 'getAdminColumnsCacheIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration' => 'getBackgroundIndexingIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version' => 'getCheckRequiredVersionService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Crawl_Settings_Integration' => 'getCrawlSettingsIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Cron_Integration' => 'getCronIntegrationService',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Deactivated_Premium_Integration' => 'getDeactivatedPremiumIntegrationService',
@@ -1875,6 +1881,16 @@ class Cached_Container extends Container
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional'] = new \Yoast\WP\SEO\Conditionals\Attachment_Redirections_Enabled_Conditional(${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] : ($this->services['Yoast\\WP\\SEO\\Helpers\\Options_Helper'] = new \Yoast\WP\SEO\Helpers\Options_Helper())) && false ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional' shared autowired service.
*
* @return \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional
*/
protected function getCheckRequiredVersionConditionalService()
{
return $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional();
}
/**
* Gets the public 'Yoast\WP\SEO\Conditionals\Deactivating_Yoast_Seo_Conditional' shared autowired service.
*
@@ -3624,6 +3640,16 @@ class Cached_Container extends Container
return $this->services['Yoast\\WP\\SEO\\Initializers\\Migration_Runner'] = new \Yoast\WP\SEO\Initializers\Migration_Runner(${($_ = isset($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status']) ? $this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] : ($this->services['Yoast\\WP\\SEO\\Config\\Migration_Status'] = new \Yoast\WP\SEO\Config\Migration_Status())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Loader']) ? $this->services['Yoast\\WP\\SEO\\Loader'] : $this->getLoaderService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\Lib\\Migrations\\Adapter']) ? $this->services['Yoast\\WP\\Lib\\Migrations\\Adapter'] : ($this->services['Yoast\\WP\\Lib\\Migrations\\Adapter'] = new \Yoast\WP\Lib\Migrations\Adapter())) && false ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Initializers\Plugin_Headers' shared autowired service.
*
* @return \Yoast\WP\SEO\Initializers\Plugin_Headers
*/
protected function getPluginHeadersService()
{
return $this->services['Yoast\\WP\\SEO\\Initializers\\Plugin_Headers'] = new \Yoast\WP\SEO\Initializers\Plugin_Headers();
}
/**
* Gets the public 'Yoast\WP\SEO\Initializers\Woocommerce' shared autowired service.
*
@@ -3694,6 +3720,16 @@ class Cached_Container extends Container
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration'] = new \Yoast\WP\SEO\Integrations\Admin\Background_Indexing_Integration(${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Indexing_Complete_Action'] : $this->getIndexableIndexingCompleteActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexing_Helper'] : $this->getIndexingHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper']) ? $this->services['Yoast\\WP\\SEO\\Helpers\\Indexable_Helper'] : $this->getIndexableHelperService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Yoast_Admin_And_Dashboard_Conditional'] = new \Yoast\WP\SEO\Conditionals\Yoast_Admin_And_Dashboard_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Get_Request_Conditional'] = new \Yoast\WP\SEO\Conditionals\Get_Request_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\WP_CRON_Enabled_Conditional'] = new \Yoast\WP\SEO\Conditionals\WP_CRON_Enabled_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_General_Indexation_Action'] : $this->getIndexableGeneralIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Indexation_Action'] : $this->getIndexablePostIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Post_Type_Archive_Indexation_Action'] : $this->getIndexablePostTypeArchiveIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Indexable_Term_Indexation_Action'] : $this->getIndexableTermIndexationActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Post_Link_Indexing_Action'] : $this->getPostLinkIndexingActionService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action']) ? $this->services['Yoast\\WP\\SEO\\Actions\\Indexing\\Term_Link_Indexing_Action'] : $this->getTermLinkIndexingActionService()) && false ?: '_'});
}
/**
* Gets the public 'Yoast\WP\SEO\Integrations\Admin\Check_Required_Version' shared autowired service.
*
* @return \Yoast\WP\SEO\Integrations\Admin\Check_Required_Version
*/
protected function getCheckRequiredVersionService()
{
return $this->services['Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version'] = new \Yoast\WP\SEO\Integrations\Admin\Check_Required_Version();
}
/**
* Gets the public 'Yoast\WP\SEO\Integrations\Admin\Crawl_Settings_Integration' shared autowired service.
*
@@ -4103,7 +4139,7 @@ class Cached_Container extends Container
*/
protected function getFeatureFlagIntegrationService()
{
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
return $this->services['Yoast\\WP\\SEO\\Integrations\\Feature_Flag_Integration'] = new \Yoast\WP\SEO\Integrations\Feature_Flag_Integration(${($_ = isset($this->services['WPSEO_Admin_Asset_Manager']) ? $this->services['WPSEO_Admin_Asset_Manager'] : $this->getWPSEOAdminAssetManagerService()) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Addon_Installation_Conditional'] = new \Yoast\WP\SEO\Conditionals\Addon_Installation_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional'] = new \Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\New_Settings_Ui_Conditional'] = new \Yoast\WP\SEO\Conditionals\New_Settings_Ui_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Text_Formality_Conditional'] = new \Yoast\WP\SEO\Conditionals\Text_Formality_Conditional())) && false ?: '_'}, ${($_ = isset($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional']) ? $this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] : ($this->services['Yoast\\WP\\SEO\\Conditionals\\Updated_Importer_Framework_Conditional'] = new \Yoast\WP\SEO\Conditionals\Updated_Importer_Framework_Conditional())) && false ?: '_'});
}
/**
@@ -4867,6 +4903,7 @@ class Cached_Container extends Container
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Crawl_Cleanup_Permalinks');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Migration_Runner');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Plugin_Headers');
$instance->register_initializer('Yoast\\WP\\SEO\\Initializers\\Woocommerce');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Academy_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Activation_Cleanup_Integration');
@@ -4874,6 +4911,7 @@ class Cached_Container extends Container
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Addon_Installation\\Installation_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Admin_Columns_Cache_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Crawl_Settings_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Cron_Integration');
$instance->register_integration('Yoast\\WP\\SEO\\Integrations\\Admin\\Deactivated_Premium_Integration');
@@ -0,0 +1,34 @@
<?php
namespace Yoast\WP\SEO\Initializers;
use Yoast\WP\SEO\Conditionals\No_Conditionals;
/**
* Adds custom headers to the list of plugin headers to read.
*/
class Plugin_Headers implements Initializer_Interface {
use No_Conditionals;
/**
* Hooks into the list of the plugin headers.
*
* @return void
*/
public function initialize() {
\add_filter( 'extra_plugin_headers', [ $this, 'add_requires_yoast_seo_header' ] );
}
/**
* Add the `Requires Yoast SEO` header to the list of headers.
*
* @param array<string> $headers The headers.
*
* @return array<string> The updated headers.
*/
public function add_requires_yoast_seo_header( $headers ) {
$headers[] = 'Requires Yoast SEO';
return $headers;
}
}
@@ -0,0 +1,140 @@
<?php
namespace Yoast\WP\SEO\Integrations\Admin;
use Plugin_Upgrader;
use WP_Error;
use WP_Upgrader;
use Yoast\WP\SEO\Conditionals\Check_Required_Version_Conditional;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* The Check_Required_Version class.
*
* This class checks if the required version of Yoast SEO is installed.
* It also adds the `Requires Yoast SEO` header to the list of headers and updates the comparison table for the plugin overwrite.
*/
class Check_Required_Version implements Integration_Interface {
/**
* Initializes the integration.
*
* @return void
*/
public function register_hooks() {
\add_filter( 'upgrader_source_selection', [ $this, 'check_required_version' ], 10, 3 );
\add_filter( 'install_plugin_overwrite_comparison', [ $this, 'update_comparison_table' ], 10, 3 );
}
/**
* Returns the conditionals based on which this loadable should be active.
*
* @return string[] The conditionals based on which this loadable should be active.
*/
public static function get_conditionals() {
return [ Check_Required_Version_Conditional::class ];
}
/**
* Checks if the required version of Yoast SEO is installed.
*
* The code is partly inspired by Plugin_Upgrader::check_package() in wp-admin/includes/class-plugin-upgrader.php.
*
* @param string $source File source location.
* @param string $remote_source Remote file source location.
* @param WP_Upgrader $upgrader WP_Upgrader instance.
*
* @return string|WP_Error The source location or a WP_Error object if the required version is not installed.
*/
public function check_required_version( $source, $remote_source = null, $upgrader = null ) {
global $wp_filesystem;
// Bail out early if we are not installing/upgrading a plugin.
if ( ! $upgrader instanceof Plugin_Upgrader ) {
return $source;
}
$info = [];
if ( \is_wp_error( $source ) ) {
return $source;
}
$working_directory = \str_replace( $wp_filesystem->wp_content_dir(), \trailingslashit( \WP_CONTENT_DIR ), $source );
if ( ! \is_dir( $working_directory ) ) { // Confidence check, if the above fails, let's not prevent installation.
return $source;
}
// Check that the folder contains at least 1 valid plugin.
$files = \glob( $working_directory . '*.php' );
if ( $files ) {
foreach ( $files as $file ) {
$info = \get_plugin_data( $file, false, false );
if ( ! empty( $info['Name'] ) ) {
break;
}
}
}
$requires_yoast_seo = ! empty( $info['Requires Yoast SEO'] ) ? $info['Requires Yoast SEO'] : false;
if ( ! $this->check_requirement( $requires_yoast_seo ) ) {
$error = \sprintf(
/* translators: 1: Current Yoast SEO version, 2: Version required by the uploaded plugin. */
\__( 'The Yoast SEO version on your site is %1$s, however the uploaded plugin requires %2$s.', 'wordpress-seo' ),
\WPSEO_VERSION,
\esc_html( $requires_yoast_seo )
);
return new WP_Error(
'incompatible_yoast_seo_required_version',
\__( 'The package could not be installed because it\'s not supported by the currently installed Yoast SEO version.', 'wordpress-seo' ),
$error
);
}
return $source;
}
/**
* Update the comparison table for the plugin installation when overwriting an existing plugin.
*
* @param string $table The output table with Name, Version, Author, RequiresWP, and RequiresPHP info.
* @param array<string> $current_plugin_data Array with current plugin data.
* @param array<string> $new_plugin_data Array with uploaded plugin data.
*
* @return string The updated comparison table.
*/
public function update_comparison_table( $table, $current_plugin_data, $new_plugin_data ) {
$requires_yoast_seo_current = ! empty( $current_plugin_data['Requires Yoast SEO'] ) ? $current_plugin_data['Requires Yoast SEO'] : false;
$requires_yoast_seo_new = ! empty( $new_plugin_data['Requires Yoast SEO'] ) ? $new_plugin_data['Requires Yoast SEO'] : false;
if ( $requires_yoast_seo_current !== false || $requires_yoast_seo_new !== false ) {
$new_row = \sprintf(
'<tr><td class="name-label">%1$s</td><td>%2$s</td><td>%3$s</td></tr>',
\__( 'Required Yoast SEO version', 'wordpress-seo' ),
( $requires_yoast_seo_current !== false ) ? \esc_html( $requires_yoast_seo_current ) : '-',
( $requires_yoast_seo_new !== false ) ? \esc_html( $requires_yoast_seo_new ) : '-'
);
$table = \str_replace( '</tbody>', $new_row . '</tbody>', $table );
}
return $table;
}
/**
* Check whether the required Yoast SEO version is installed.
*
* @param string|bool $required_version The required version.
*
* @return bool Whether the required version is installed, or no version is required.
*/
private function check_requirement( $required_version ) {
if ( $required_version === false ) {
return true;
}
return \version_compare( \WPSEO_VERSION, $required_version . '-RC0', '>=' );
}
}
@@ -388,7 +388,6 @@ class Elementor implements Integration_Interface {
$plugins_script_data = [
'replaceVars' => [
'no_parent_text' => \__( '(no parent)', 'wordpress-seo' ),
'replace_vars' => $this->get_replace_vars(),
'recommended_replace_vars' => $this->get_recommended_replace_vars(),
'hidden_replace_vars' => $this->get_hidden_replace_vars(),
@@ -414,7 +413,6 @@ class Elementor implements Integration_Interface {
$permalink = $this->get_permalink();
$script_data = [
'media' => [ 'choose_image' => \__( 'Use Image', 'wordpress-seo' ) ],
'metabox' => $this->get_metabox_script_data( $permalink ),
'userLanguageCode' => WPSEO_Language_Utils::get_language( \get_user_locale() ),
'isPost' => true,
@@ -441,14 +439,6 @@ class Elementor implements Integration_Interface {
$site_information->set_permalink( $permalink );
$script_data = \array_merge_recursive( $site_information->get_legacy_site_information(), $script_data );
if ( \post_type_supports( $this->get_metabox_post()->post_type, 'thumbnail' ) ) {
$this->asset_manager->enqueue_style( 'featured-image' );
$script_data['featuredImage'] = [
'featured_image_notice' => \__( 'SEO issue: The featured image should be at least 200 by 200 pixels to be picked up by Facebook and other social media sites.', 'wordpress-seo' ),
];
}
$this->asset_manager->localize_script( 'elementor', 'wpseoScriptData', $script_data );
$this->asset_manager->enqueue_user_language_script();
}
+1 -1
View File
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08::getLoader();
return ComposerAutoloaderInit4546fa5ed1c769f4a490834c8204549f::getLoader();
@@ -545,6 +545,7 @@ return array(
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional' => $baseDir . '/src/conditionals/admin/yoast-admin-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional' => $baseDir . '/src/conditionals/admin-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional' => $baseDir . '/src/conditionals/attachment-redirections-enabled-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional' => $baseDir . '/src/conditionals/check-required-version-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Conditional' => $baseDir . '/src/conditionals/conditional-interface.php',
'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional' => $baseDir . '/src/conditionals/deactivating-yoast-seo-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional' => $baseDir . '/src/conditionals/development-conditional.php',
@@ -783,6 +784,7 @@ return array(
'Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps' => $baseDir . '/src/initializers/disable-core-sitemaps.php',
'Yoast\\WP\\SEO\\Initializers\\Initializer_Interface' => $baseDir . '/src/initializers/initializer-interface.php',
'Yoast\\WP\\SEO\\Initializers\\Migration_Runner' => $baseDir . '/src/initializers/migration-runner.php',
'Yoast\\WP\\SEO\\Initializers\\Plugin_Headers' => $baseDir . '/src/initializers/plugin-headers.php',
'Yoast\\WP\\SEO\\Initializers\\Woocommerce' => $baseDir . '/src/initializers/woocommerce.php',
'Yoast\\WP\\SEO\\Integrations\\Abstract_Exclude_Post_Type' => $baseDir . '/src/integrations/abstract-exclude-post-type.php',
'Yoast\\WP\\SEO\\Integrations\\Academy_Integration' => $baseDir . '/src/integrations/academy-integration.php',
@@ -791,6 +793,7 @@ return array(
'Yoast\\WP\\SEO\\Integrations\\Admin\\Addon_Installation\\Installation_Integration' => $baseDir . '/src/integrations/admin/addon-installation/installation-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Admin_Columns_Cache_Integration' => $baseDir . '/src/integrations/admin/admin-columns-cache-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration' => $baseDir . '/src/integrations/admin/background-indexing-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version' => $baseDir . '/src/integrations/admin/check-required-version.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Crawl_Settings_Integration' => $baseDir . '/src/integrations/admin/crawl-settings-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Cron_Integration' => $baseDir . '/src/integrations/admin/cron-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Deactivated_Premium_Integration' => $baseDir . '/src/integrations/admin/deactivated-premium-integration.php',
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08
class ComposerAutoloaderInit4546fa5ed1c769f4a490834c8204549f
{
private static $loader;
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit4546fa5ed1c769f4a490834c8204549f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit4546fa5ed1c769f4a490834c8204549f', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit539c838c762ab459bb7cfb10d25ade08::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit4546fa5ed1c769f4a490834c8204549f::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -53,12 +53,12 @@ class ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit539c838c762ab459bb7cfb10d25ade08::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit4546fa5ed1c769f4a490834c8204549f::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire539c838c762ab459bb7cfb10d25ade08($fileIdentifier, $file);
composerRequire4546fa5ed1c769f4a490834c8204549f($fileIdentifier, $file);
}
return $loader;
@@ -70,7 +70,7 @@ class ComposerAutoloaderInit539c838c762ab459bb7cfb10d25ade08
* @param string $file
* @return void
*/
function composerRequire539c838c762ab459bb7cfb10d25ade08($fileIdentifier, $file)
function composerRequire4546fa5ed1c769f4a490834c8204549f($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit539c838c762ab459bb7cfb10d25ade08
class ComposerStaticInit4546fa5ed1c769f4a490834c8204549f
{
public static $files = array (
'81db02b30f563b92907e271b66bd7559' => __DIR__ . '/..' . '/yoast/whip/src/Facades/wordpress.php',
@@ -572,6 +572,7 @@ class ComposerStaticInit539c838c762ab459bb7cfb10d25ade08
'Yoast\\WP\\SEO\\Conditionals\\Admin\\Yoast_Admin_Conditional' => __DIR__ . '/../..' . '/src/conditionals/admin/yoast-admin-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Admin_Conditional' => __DIR__ . '/../..' . '/src/conditionals/admin-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Attachment_Redirections_Enabled_Conditional' => __DIR__ . '/../..' . '/src/conditionals/attachment-redirections-enabled-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Check_Required_Version_Conditional' => __DIR__ . '/../..' . '/src/conditionals/check-required-version-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Conditional' => __DIR__ . '/../..' . '/src/conditionals/conditional-interface.php',
'Yoast\\WP\\SEO\\Conditionals\\Deactivating_Yoast_Seo_Conditional' => __DIR__ . '/../..' . '/src/conditionals/deactivating-yoast-seo-conditional.php',
'Yoast\\WP\\SEO\\Conditionals\\Development_Conditional' => __DIR__ . '/../..' . '/src/conditionals/development-conditional.php',
@@ -810,6 +811,7 @@ class ComposerStaticInit539c838c762ab459bb7cfb10d25ade08
'Yoast\\WP\\SEO\\Initializers\\Disable_Core_Sitemaps' => __DIR__ . '/../..' . '/src/initializers/disable-core-sitemaps.php',
'Yoast\\WP\\SEO\\Initializers\\Initializer_Interface' => __DIR__ . '/../..' . '/src/initializers/initializer-interface.php',
'Yoast\\WP\\SEO\\Initializers\\Migration_Runner' => __DIR__ . '/../..' . '/src/initializers/migration-runner.php',
'Yoast\\WP\\SEO\\Initializers\\Plugin_Headers' => __DIR__ . '/../..' . '/src/initializers/plugin-headers.php',
'Yoast\\WP\\SEO\\Initializers\\Woocommerce' => __DIR__ . '/../..' . '/src/initializers/woocommerce.php',
'Yoast\\WP\\SEO\\Integrations\\Abstract_Exclude_Post_Type' => __DIR__ . '/../..' . '/src/integrations/abstract-exclude-post-type.php',
'Yoast\\WP\\SEO\\Integrations\\Academy_Integration' => __DIR__ . '/../..' . '/src/integrations/academy-integration.php',
@@ -818,6 +820,7 @@ class ComposerStaticInit539c838c762ab459bb7cfb10d25ade08
'Yoast\\WP\\SEO\\Integrations\\Admin\\Addon_Installation\\Installation_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/addon-installation/installation-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Admin_Columns_Cache_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/admin-columns-cache-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Background_Indexing_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/background-indexing-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Check_Required_Version' => __DIR__ . '/../..' . '/src/integrations/admin/check-required-version.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Crawl_Settings_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/crawl-settings-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Cron_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/cron-integration.php',
'Yoast\\WP\\SEO\\Integrations\\Admin\\Deactivated_Premium_Integration' => __DIR__ . '/../..' . '/src/integrations/admin/deactivated-premium-integration.php',
@@ -1142,9 +1145,9 @@ class ComposerStaticInit539c838c762ab459bb7cfb10d25ade08
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit539c838c762ab459bb7cfb10d25ade08::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit539c838c762ab459bb7cfb10d25ade08::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit539c838c762ab459bb7cfb10d25ade08::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit4546fa5ed1c769f4a490834c8204549f::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4546fa5ed1c769f4a490834c8204549f::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4546fa5ed1c769f4a490834c8204549f::$classMap;
}, null, ClassLoader::class);
}
@@ -5,7 +5,7 @@
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '60f4bf28ece5b0e4a3a1e1335be8f444471c3591',
'reference' => '00936e3ced9960965fd9f738e3915b2ac47db966',
'name' => 'yoast/wordpress-seo',
'dev' => false,
),
@@ -34,7 +34,7 @@
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '60f4bf28ece5b0e4a3a1e1335be8f444471c3591',
'reference' => '00936e3ced9960965fd9f738e3915b2ac47db966',
'dev_requirement' => false,
),
),
@@ -15,7 +15,7 @@ if ( ! function_exists( 'add_filter' ) ) {
* {@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.4' );
define( 'WPSEO_VERSION', '23.5' );
if ( ! defined( 'WPSEO_PATH' ) ) {
@@ -35,7 +35,7 @@ define( 'YOAST_VENDOR_DEFINE_PREFIX', 'YOASTSEO_VENDOR__' );
define( 'YOAST_VENDOR_PREFIX_DIRECTORY', 'vendor_prefixed' );
define( 'YOAST_SEO_PHP_REQUIRED', '7.2.5' );
define( 'YOAST_SEO_WP_TESTED', '6.6.1' );
define( 'YOAST_SEO_WP_TESTED', '6.6.2' );
define( 'YOAST_SEO_WP_REQUIRED', '6.4' );
if ( ! defined( 'WPSEO_NAMESPACES' ) ) {

Some files were not shown because too many files have changed in this diff Show More