Yoast SEO - Version 9.5

Version Description

Download this release

Release Info

Developer Yoast
Plugin Icon 128x128 Yoast SEO
Version 9.5
Comparing to
See all releases

Code changes from version 9.4 to 9.5

Files changed (121) hide show
  1. admin/capabilities/class-capability-manager-integration.php +7 -7
  2. admin/class-add-keyword-modal.php +1 -1
  3. admin/class-admin-asset-manager.php +15 -5
  4. admin/class-admin-asset-yoast-components-l10n.php +1 -1
  5. admin/class-admin-init.php +9 -13
  6. admin/class-config.php +1 -2
  7. admin/class-help-center.php +7 -3
  8. admin/class-keyword-synonyms-modal.php +1 -1
  9. admin/class-meta-columns.php +1 -1
  10. admin/class-multiple-keywords-modal.php +1 -1
  11. admin/class-premium-upsell-admin-block.php +3 -3
  12. admin/class-recalibration-beta.php +1 -1
  13. admin/class-yoast-dashboard-widget.php +1 -0
  14. admin/class-yoast-network-admin.php +4 -2
  15. admin/class-yoast-notification-center.php +7 -5
  16. admin/config-ui/class-configuration-options-adapter.php +5 -4
  17. admin/config-ui/class-configuration-page.php +1 -1
  18. admin/config-ui/class-configuration-service.php +1 -1
  19. admin/config-ui/class-configuration-structure.php +56 -30
  20. admin/config-ui/fields/class-field-company-or-person.php +1 -2
  21. admin/config-ui/fields/class-field-environment.php +1 -3
  22. admin/config-ui/fields/class-field-google-search-console-intro.php +1 -2
  23. admin/config-ui/fields/class-field-multiple-authors.php +4 -4
  24. admin/config-ui/fields/class-field-post-type-visibility.php +1 -3
  25. admin/config-ui/fields/class-field-social-profiles-intro.php +1 -3
  26. admin/config-ui/fields/class-field-success-message.php +7 -8
  27. admin/config-ui/fields/class-field-title-intro.php +1 -5
  28. admin/courses-overview.php +49 -0
  29. admin/endpoints/class-endpoint-file-size.php +3 -2
  30. admin/filters/class-abstract-post-filter.php +8 -6
  31. admin/filters/class-cornerstone-filter.php +2 -1
  32. admin/formatter/class-metabox-formatter.php +8 -6
  33. admin/formatter/class-term-metabox-formatter.php +1 -1
  34. admin/google_search_console/class-gsc-table.php +4 -2
  35. admin/google_search_console/class-gsc.php +4 -2
  36. admin/google_search_console/views/gsc-display.php +3 -2
  37. admin/links/class-link-column-count.php +2 -1
  38. admin/links/class-link-factory.php +4 -4
  39. admin/links/class-link-reindex-dashboard.php +4 -2
  40. admin/links/class-link-storage.php +2 -1
  41. admin/menu/class-admin-menu.php +1 -0
  42. admin/menu/class-menu.php +4 -0
  43. admin/menu/class-replacevar-editor.php +2 -1
  44. admin/menu/class-replacevar-field.php +7 -6
  45. admin/metabox/class-metabox.php +26 -15
  46. admin/notifiers/class-recalibration-beta.php +2 -2
  47. admin/onpage/class-onpage-request.php +3 -2
  48. admin/onpage/class-onpage.php +1 -1
  49. admin/pages/courses.php +23 -0
  50. admin/services/class-file-size.php +1 -2
  51. admin/taxonomy/class-taxonomy-metabox.php +30 -25
  52. admin/taxonomy/class-taxonomy-social-fields.php +17 -9
  53. admin/taxonomy/class-taxonomy.php +22 -8
  54. admin/views/js-templates-primary-term.php +9 -6
  55. admin/views/licenses.php +1 -1
  56. admin/views/paper-collapsible.php +2 -1
  57. admin/views/sidebar.php +1 -1
  58. admin/views/tabs/metas/paper-content/author-archive-settings.php +10 -0
  59. admin/views/tabs/metas/paper-content/breadcrumbs-content.php +7 -2
  60. admin/views/tabs/metas/paper-content/date-archives-settings.php +4 -4
  61. admin/views/tabs/metas/paper-content/general/knowledge-graph.php +3 -2
  62. admin/views/tabs/metas/paper-content/media-content.php +5 -4
  63. admin/views/tool-bulk-editor.php +16 -6
  64. admin/views/tool-file-editor.php +5 -2
  65. admin/views/tool-import-export.php +5 -2
  66. css/dist/{admin-global-940-rtl.min.css → admin-global-950-rtl.min.css} +0 -0
  67. css/dist/{admin-global-940.min.css → admin-global-950.min.css} +0 -0
  68. css/dist/{adminbar-940-rtl.min.css → adminbar-950-rtl.min.css} +0 -0
  69. css/dist/{adminbar-940.min.css → adminbar-950.min.css} +0 -0
  70. css/dist/alerts-940-rtl.min.css +0 -1
  71. css/dist/alerts-940.min.css +0 -1
  72. css/dist/alerts-950-rtl.min.css +1 -0
  73. css/dist/alerts-950.min.css +1 -0
  74. css/dist/{dashboard-940-rtl.min.css → dashboard-950-rtl.min.css} +0 -0
  75. css/dist/{dashboard-940.min.css → dashboard-950.min.css} +0 -0
  76. css/dist/{edit-page-940-rtl.min.css → edit-page-950-rtl.min.css} +0 -0
  77. css/dist/{edit-page-940.min.css → edit-page-950.min.css} +0 -0
  78. css/dist/{featured-image-940-rtl.min.css → featured-image-950-rtl.min.css} +0 -0
  79. css/dist/{featured-image-940.min.css → featured-image-950.min.css} +0 -0
  80. css/dist/{filter-explanation-940-rtl.min.css → filter-explanation-950-rtl.min.css} +0 -0
  81. css/dist/{filter-explanation-940.min.css → filter-explanation-950.min.css} +0 -0
  82. css/dist/{inside-editor-940-rtl.min.css → inside-editor-950-rtl.min.css} +0 -0
  83. css/dist/{inside-editor-940.min.css → inside-editor-950.min.css} +0 -0
  84. css/dist/{metabox-940-rtl.min.css → metabox-950-rtl.min.css} +0 -0
  85. css/dist/{metabox-940.min.css → metabox-950.min.css} +0 -0
  86. css/dist/{metabox-primary-category-940-rtl.min.css → metabox-primary-category-950-rtl.min.css} +0 -0
  87. css/dist/{metabox-primary-category-940.min.css → metabox-primary-category-950.min.css} +0 -0
  88. css/dist/{search-appearance-940-rtl.min.css → search-appearance-950-rtl.min.css} +0 -0
  89. css/dist/{search-appearance-940.min.css → search-appearance-950.min.css} +0 -0
  90. css/dist/{structured-data-blocks-940-rtl.min.css → structured-data-blocks-950-rtl.min.css} +0 -0
  91. css/dist/{structured-data-blocks-940.min.css → structured-data-blocks-950.min.css} +0 -0
  92. css/dist/{toggle-switch-940-rtl.min.css → toggle-switch-950-rtl.min.css} +0 -0
  93. css/dist/{toggle-switch-940.min.css → toggle-switch-950.min.css} +0 -0
  94. css/dist/{wpseo-dismissible-940-rtl.min.css → wpseo-dismissible-950-rtl.min.css} +0 -0
  95. css/dist/{wpseo-dismissible-940.min.css → wpseo-dismissible-950.min.css} +0 -0
  96. css/dist/yoast-components-940-rtl.min.css +0 -1
  97. css/dist/yoast-components-940.min.css +0 -1
  98. css/dist/yoast-components-950-rtl.min.css +1 -0
  99. css/dist/yoast-components-950.min.css +1 -0
  100. css/dist/{yoast-extensions-940-rtl.min.css → yoast-extensions-950-rtl.min.css} +0 -0
  101. css/dist/{yoast-extensions-940.min.css → yoast-extensions-950.min.css} +0 -0
  102. css/dist/{yst_plugin_tools-940-rtl.min.css → yst_plugin_tools-950-rtl.min.css} +0 -0
  103. css/dist/{yst_plugin_tools-940.min.css → yst_plugin_tools-950.min.css} +0 -0
  104. css/dist/{yst_seo_score-940-rtl.min.css → yst_seo_score-950-rtl.min.css} +0 -0
  105. css/dist/{yst_seo_score-940.min.css → yst_seo_score-950.min.css} +0 -0
  106. frontend/class-twitter.php +15 -7
  107. images/sample_course_card_header.png +0 -0
  108. inc/class-upgrade.php +2 -1
  109. inc/class-wpseo-admin-bar-menu.php +127 -117
  110. inc/class-wpseo-meta.php +5 -3
  111. inc/class-wpseo-replace-vars.php +11 -10
  112. inc/class-wpseo-utils.php +8 -4
  113. inc/options/class-wpseo-option-titles.php +2 -4
  114. inc/options/class-wpseo-taxonomy-meta.php +4 -2
  115. inc/sitemaps/class-author-sitemap-provider.php +7 -6
  116. inc/sitemaps/class-post-type-sitemap-provider.php +41 -26
  117. inc/sitemaps/class-sitemaps-router.php +10 -3
  118. inc/sitemaps/class-sitemaps.php +2 -2
  119. inc/structured-data-blocks/class-faq-block.php +4 -3
  120. inc/structured-data-blocks/class-how-to-block.php +4 -3
  121. js/dist/analysis-940.min.js +0 -21
admin/capabilities/class-capability-manager-integration.php CHANGED
@@ -62,15 +62,15 @@ class WPSEO_Capability_Manager_Integration implements WPSEO_WordPress_Integratio
62
  if ( ! function_exists( 'members_register_cap_group' ) ) {
63
  return;
64
  }
 
65
  // Register the yoast group.
66
- members_register_cap_group( 'wordpress-seo',
67
- array(
68
- 'label' => esc_html__( 'Yoast SEO', 'wordpress-seo' ),
69
- 'caps' => $this->get_capabilities(),
70
- 'icon' => 'dashicons-admin-plugins',
71
- 'diff_added' => true,
72
- )
73
  );
 
74
  }
75
 
76
  /**
62
  if ( ! function_exists( 'members_register_cap_group' ) ) {
63
  return;
64
  }
65
+
66
  // Register the yoast group.
67
+ $args = array(
68
+ 'label' => esc_html__( 'Yoast SEO', 'wordpress-seo' ),
69
+ 'caps' => $this->get_capabilities(),
70
+ 'icon' => 'dashicons-admin-plugins',
71
+ 'diff_added' => true,
 
 
72
  );
73
+ members_register_cap_group( 'wordpress-seo', $args );
74
  }
75
 
76
  /**
admin/class-add-keyword-modal.php CHANGED
@@ -49,7 +49,7 @@ class WPSEO_Add_Keyword_Modal {
49
  public function get_translations_for_js() {
50
  $translations = $this->get_translations();
51
  return array(
52
- 'locale' => WPSEO_Utils::get_user_locale(),
53
  'intl' => $translations,
54
  );
55
  }
49
  public function get_translations_for_js() {
50
  $translations = $this->get_translations();
51
  return array(
52
+ 'locale' => WPSEO_Language_Utils::get_user_locale(),
53
  'intl' => $translations,
54
  );
55
  }
admin/class-admin-asset-manager.php CHANGED
@@ -109,9 +109,9 @@ class WPSEO_Admin_Asset_Manager {
109
  }
110
 
111
  /**
112
- * Registers all the styles it recieves.
113
  *
114
- * @param array $styles Styles that need to be registerd.
115
  */
116
  public function register_styles( $styles ) {
117
  foreach ( $styles as $style ) {
@@ -270,8 +270,8 @@ class WPSEO_Admin_Asset_Manager {
270
  */
271
  protected function scripts_to_be_registered() {
272
  $select2_language = 'en';
273
- $user_locale = WPSEO_Utils::get_user_locale();
274
- $language = WPSEO_Utils::get_language( $user_locale );
275
 
276
  if ( file_exists( WPSEO_PATH . "js/dist/select2/i18n/{$user_locale}.js" ) ) {
277
  $select2_language = $user_locale; // Chinese and some others use full locale.
@@ -288,7 +288,7 @@ class WPSEO_Admin_Asset_Manager {
288
  // Load webpack-commons for bundle support.
289
  'src' => 'commons-' . $flat_version,
290
  'deps' => array(
291
- 'wp-polyfill'
292
  ),
293
  ),
294
  array(
@@ -593,6 +593,16 @@ class WPSEO_Admin_Asset_Manager {
593
  'wp-element',
594
  ),
595
  ),
 
 
 
 
 
 
 
 
 
 
596
  );
597
  }
598
 
109
  }
110
 
111
  /**
112
+ * Registers all the styles it receives.
113
  *
114
+ * @param array $styles Styles that need to be registered.
115
  */
116
  public function register_styles( $styles ) {
117
  foreach ( $styles as $style ) {
270
  */
271
  protected function scripts_to_be_registered() {
272
  $select2_language = 'en';
273
+ $user_locale = WPSEO_Language_Utils::get_user_locale();
274
+ $language = WPSEO_Language_Utils::get_language( $user_locale );
275
 
276
  if ( file_exists( WPSEO_PATH . "js/dist/select2/i18n/{$user_locale}.js" ) ) {
277
  $select2_language = $user_locale; // Chinese and some others use full locale.
288
  // Load webpack-commons for bundle support.
289
  'src' => 'commons-' . $flat_version,
290
  'deps' => array(
291
+ 'wp-polyfill',
292
  ),
293
  ),
294
  array(
593
  'wp-element',
594
  ),
595
  ),
596
+ array(
597
+ 'name' => 'courses-overview',
598
+ 'src' => 'wp-seo-courses-overview-' . $flat_version,
599
+ 'deps' => array(
600
+ 'wp-element',
601
+ 'wp-i18n',
602
+ self::PREFIX . 'styled-components',
603
+ self::PREFIX . 'components',
604
+ ),
605
+ ),
606
  );
607
  }
608
 
admin/class-admin-asset-yoast-components-l10n.php CHANGED
@@ -30,7 +30,7 @@ final class WPSEO_Admin_Asset_Yoast_Components_L10n {
30
  * @return object The translations in a Jed format for JS files.
31
  */
32
  protected function get_translations( $component ) {
33
- $locale = WPSEO_Utils::get_user_locale();
34
 
35
  $file = plugin_dir_path( WPSEO_FILE ) . 'languages/' . $component . '-' . $locale . '.json';
36
  if ( file_exists( $file ) ) {
30
  * @return object The translations in a Jed format for JS files.
31
  */
32
  protected function get_translations( $component ) {
33
+ $locale = WPSEO_Language_Utils::get_user_locale();
34
 
35
  $file = plugin_dir_path( WPSEO_FILE ) . 'languages/' . $component . '-' . $locale . '.json';
36
  if ( file_exists( $file ) ) {
admin/class-admin-init.php CHANGED
@@ -96,12 +96,8 @@ class WPSEO_Admin_Init {
96
  * Notify about the default tagline if the user hasn't changed it
97
  */
98
  public function tagline_notice() {
99
-
100
- $current_url = ( is_ssl() ? 'https://' : 'http://' );
101
- $current_url .= sanitize_text_field( $_SERVER['SERVER_NAME'] ) . sanitize_text_field( $_SERVER['REQUEST_URI'] );
102
  $query_args = array(
103
  'autofocus[control]' => 'blogdescription',
104
- 'url' => urlencode( $current_url ),
105
  );
106
  $customize_url = add_query_arg( $query_args, wp_customize_url() );
107
 
@@ -617,39 +613,39 @@ class WPSEO_Admin_Init {
617
 
618
  // WordPress hooks that have been deprecated since a Yoast SEO version.
619
  $deprecated_filters = array(
620
- 'wpseo_metadesc_length' => array(
621
  'version' => '3.0',
622
  'alternative' => 'javascript',
623
  ),
624
- 'wpseo_metadesc_length_reason' => array(
625
  'version' => '3.0',
626
  'alternative' => 'javascript',
627
  ),
628
- 'wpseo_body_length_score' => array(
629
  'version' => '3.0',
630
  'alternative' => 'javascript',
631
  ),
632
- 'wpseo_linkdex_results' => array(
633
  'version' => '3.0',
634
  'alternative' => 'javascript',
635
  ),
636
- 'wpseo_snippet' => array(
637
  'version' => '3.0',
638
  'alternative' => 'javascript',
639
  ),
640
- 'wp_seo_get_bc_title' => array(
641
  'version' => '5.8',
642
  'alternative' => 'wpseo_breadcrumb_single_link_info',
643
  ),
644
- 'wpseo_metakey' => array(
645
  'version' => '6.3',
646
  'alternative' => null,
647
  ),
648
- 'wpseo_metakeywords' => array(
649
  'version' => '6.3',
650
  'alternative' => null,
651
  ),
652
- 'wpseo_stopwords' => array(
653
  'version' => '7.0',
654
  'alternative' => null,
655
  ),
96
  * Notify about the default tagline if the user hasn't changed it
97
  */
98
  public function tagline_notice() {
 
 
 
99
  $query_args = array(
100
  'autofocus[control]' => 'blogdescription',
 
101
  );
102
  $customize_url = add_query_arg( $query_args, wp_customize_url() );
103
 
613
 
614
  // WordPress hooks that have been deprecated since a Yoast SEO version.
615
  $deprecated_filters = array(
616
+ 'wpseo_metadesc_length' => array(
617
  'version' => '3.0',
618
  'alternative' => 'javascript',
619
  ),
620
+ 'wpseo_metadesc_length_reason' => array(
621
  'version' => '3.0',
622
  'alternative' => 'javascript',
623
  ),
624
+ 'wpseo_body_length_score' => array(
625
  'version' => '3.0',
626
  'alternative' => 'javascript',
627
  ),
628
+ 'wpseo_linkdex_results' => array(
629
  'version' => '3.0',
630
  'alternative' => 'javascript',
631
  ),
632
+ 'wpseo_snippet' => array(
633
  'version' => '3.0',
634
  'alternative' => 'javascript',
635
  ),
636
+ 'wp_seo_get_bc_title' => array(
637
  'version' => '5.8',
638
  'alternative' => 'wpseo_breadcrumb_single_link_info',
639
  ),
640
+ 'wpseo_metakey' => array(
641
  'version' => '6.3',
642
  'alternative' => null,
643
  ),
644
+ 'wpseo_metakeywords' => array(
645
  'version' => '6.3',
646
  'alternative' => null,
647
  ),
648
+ 'wpseo_stopwords' => array(
649
  'version' => '7.0',
650
  'alternative' => null,
651
  ),
admin/class-config.php CHANGED
@@ -45,7 +45,6 @@ class WPSEO_Admin_Pages {
45
  add_action( 'admin_enqueue_scripts', array( $this, 'config_page_styles' ) );
46
  }
47
 
48
-
49
  /**
50
  * Loads the required styles for the config page.
51
  */
@@ -86,7 +85,7 @@ class WPSEO_Admin_Pages {
86
  wp_enqueue_script( 'dashboard' );
87
  wp_enqueue_script( 'thickbox' );
88
 
89
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-script', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );
90
 
91
  if ( in_array( $page, array( 'wpseo_social', WPSEO_Admin::PAGE_IDENTIFIER, 'wpseo_titles' ), true ) ) {
92
  wp_enqueue_media();
45
  add_action( 'admin_enqueue_scripts', array( $this, 'config_page_styles' ) );
46
  }
47
 
 
48
  /**
49
  * Loads the required styles for the config page.
50
  */
85
  wp_enqueue_script( 'dashboard' );
86
  wp_enqueue_script( 'thickbox' );
87
 
88
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-script', 'wpseoSelect2Locale', WPSEO_Language_Utils::get_language( WPSEO_Language_Utils::get_user_locale() ) );
89
 
90
  if ( in_array( $page, array( 'wpseo_social', WPSEO_Admin::PAGE_IDENTIFIER, 'wpseo_titles' ), true ) ) {
91
  wp_enqueue_media();
admin/class-help-center.php CHANGED
@@ -205,13 +205,17 @@ class WPSEO_Help_Center {
205
  $popup_content .= '<li>' . sprintf(
206
  // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
207
  /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
208
- __( '%1$sNo more dead links%2$s: easy redirect manager', 'wordpress-seo' ), '', ''
 
 
209
  ) . '</li>';
210
  $popup_content .= '<li>' . __( 'Superfast internal links suggestions', 'wordpress-seo' ) . '</li>';
211
  $popup_content .= '<li>' . sprintf(
212
  // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
213
  /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
214
- __( '%1$sSocial media preview%2$s: Facebook &amp; Twitter', 'wordpress-seo' ), '', ''
 
 
215
  ) . '</li>';
216
  $popup_content .= '<li>' . __( '24/7 support', 'wordpress-seo' ) . '</li>';
217
  $popup_content .= '<li>' . __( 'No ads!', 'wordpress-seo' ) . '</li>';
@@ -238,7 +242,7 @@ class WPSEO_Help_Center {
238
  public static function get_translated_texts() {
239
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
240
  return array(
241
- 'locale' => WPSEO_Utils::get_user_locale(),
242
  'videoTutorial' => __( 'Video tutorial', 'wordpress-seo' ),
243
  'knowledgeBase' => __( 'Knowledge base', 'wordpress-seo' ),
244
  'getSupport' => __( 'Get support', 'wordpress-seo' ),
205
  $popup_content .= '<li>' . sprintf(
206
  // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
207
  /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
208
+ __( '%1$sNo more dead links%2$s: easy redirect manager', 'wordpress-seo' ),
209
+ '',
210
+ ''
211
  ) . '</li>';
212
  $popup_content .= '<li>' . __( 'Superfast internal links suggestions', 'wordpress-seo' ) . '</li>';
213
  $popup_content .= '<li>' . sprintf(
214
  // We don't use strong text here, but we do use it in the "Add keyword" popup, this is just to have the same translatable strings.
215
  /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
216
+ __( '%1$sSocial media preview%2$s: Facebook &amp; Twitter', 'wordpress-seo' ),
217
+ '',
218
+ ''
219
  ) . '</li>';
220
  $popup_content .= '<li>' . __( '24/7 support', 'wordpress-seo' ) . '</li>';
221
  $popup_content .= '<li>' . __( 'No ads!', 'wordpress-seo' ) . '</li>';
242
  public static function get_translated_texts() {
243
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
244
  return array(
245
+ 'locale' => WPSEO_Language_Utils::get_user_locale(),
246
  'videoTutorial' => __( 'Video tutorial', 'wordpress-seo' ),
247
  'knowledgeBase' => __( 'Knowledge base', 'wordpress-seo' ),
248
  'getSupport' => __( 'Get support', 'wordpress-seo' ),
admin/class-keyword-synonyms-modal.php CHANGED
@@ -50,7 +50,7 @@ class WPSEO_Keyword_Synonyms_Modal {
50
  $translations = $this->get_translations();
51
 
52
  return array(
53
- 'locale' => WPSEO_Utils::get_user_locale(),
54
  'intl' => $translations,
55
  );
56
  }
50
  $translations = $this->get_translations();
51
 
52
  return array(
53
+ 'locale' => WPSEO_Language_Utils::get_user_locale(),
54
  'intl' => $translations,
55
  );
56
  }
admin/class-meta-columns.php CHANGED
@@ -75,7 +75,7 @@ class WPSEO_Meta_Columns {
75
  $added_columns['wpseo-metadesc'] = __( 'Meta Desc.', 'wordpress-seo' );
76
 
77
  if ( $this->analysis_seo->is_enabled() ) {
78
- $added_columns['wpseo-focuskw'] = __( 'Focus KW', 'wordpress-seo' );
79
  }
80
 
81
  return array_merge( $columns, $added_columns );
75
  $added_columns['wpseo-metadesc'] = __( 'Meta Desc.', 'wordpress-seo' );
76
 
77
  if ( $this->analysis_seo->is_enabled() ) {
78
+ $added_columns['wpseo-focuskw'] = __( 'Keyphrase', 'wordpress-seo' );
79
  }
80
 
81
  return array_merge( $columns, $added_columns );
admin/class-multiple-keywords-modal.php CHANGED
@@ -50,7 +50,7 @@ class WPSEO_Multiple_Keywords_Modal {
50
  $translations = $this->get_translations();
51
 
52
  return array(
53
- 'locale' => WPSEO_Utils::get_user_locale(),
54
  'intl' => $translations,
55
  );
56
  }
50
  $translations = $this->get_translations();
51
 
52
  return array(
53
+ 'locale' => WPSEO_Language_Utils::get_user_locale(),
54
  'intl' => $translations,
55
  );
56
  }
admin/class-premium-upsell-admin-block.php CHANGED
@@ -65,9 +65,9 @@ class WPSEO_Premium_Upsell_Admin_Block {
65
  '<span aria-hidden="true" class="yoast-button-upsell__caret"></span>';
66
 
67
  $upgrade_button = sprintf(
68
- '<a id="wpseo-%1$s-popup-button" class="yoast-button-upsell" href="%2$s" target="_blank" rel="noreferrer noopener">%3$s</a>',
69
  $this->identifier,
70
- $url,
71
  $button_text
72
  );
73
 
@@ -89,7 +89,7 @@ class WPSEO_Premium_Upsell_Admin_Block {
89
  '</h2>';
90
  echo '<ul class="' . esc_attr( $class . '--motivation' ) . '">' . $arguments_html . '</ul>';
91
 
92
- echo '<p><a href="' . esc_url( $url ) . '" target="_blank">' . $upgrade_button . '</a><br />';
93
  echo '</div>';
94
 
95
  echo '</div>';
65
  '<span aria-hidden="true" class="yoast-button-upsell__caret"></span>';
66
 
67
  $upgrade_button = sprintf(
68
+ '<a id="wpseo-%1$s-popup-button" class="yoast-button-upsell" href="%2$s" target="_blank">%3$s</a>',
69
  $this->identifier,
70
+ esc_url( $url ),
71
  $button_text
72
  );
73
 
89
  '</h2>';
90
  echo '<ul class="' . esc_attr( $class . '--motivation' ) . '">' . $arguments_html . '</ul>';
91
 
92
+ echo '<p>' . $upgrade_button . '</p>';
93
  echo '</div>';
94
 
95
  echo '</div>';
admin/class-recalibration-beta.php CHANGED
@@ -177,7 +177,7 @@ class WPSEO_Recalibration_Beta implements WPSEO_WordPress_Integration {
177
  )
178
  );
179
 
180
- $this->set_mailinglist_subscription();
181
  }
182
  catch ( Requests_Exception_HTTP $e ) {
183
  // Intentionally left blank. @todo We should offer this to a logger.
177
  )
178
  );
179
 
180
+ $this->set_mailinglist_subscription();
181
  }
182
  catch ( Requests_Exception_HTTP $e ) {
183
  // Intentionally left blank. @todo We should offer this to a logger.
admin/class-yoast-dashboard-widget.php CHANGED
@@ -126,6 +126,7 @@ class Yoast_Dashboard_Widget {
126
  __( 'Indexability check by %1$s', 'wordpress-seo' ),
127
  'Ryte'
128
  ),
 
129
  'ryte_fetch' => __( 'Fetch the current status', 'wordpress-seo' ),
130
  'ryte_analyze' => __( 'Analyze entire site', 'wordpress-seo' ),
131
  'ryte_fetch_url' => esc_attr( add_query_arg( 'wpseo-redo-onpage', '1' ) ) . '#wpseo-dashboard-overview',
126
  __( 'Indexability check by %1$s', 'wordpress-seo' ),
127
  'Ryte'
128
  ),
129
+ 'ryteEnabled' => ( WPSEO_Options::get( 'onpage_indexability' ) === true ),
130
  'ryte_fetch' => __( 'Fetch the current status', 'wordpress-seo' ),
131
  'ryte_analyze' => __( 'Analyze entire site', 'wordpress-seo' ),
132
  'ryte_fetch_url' => esc_attr( add_query_arg( 'wpseo-redo-onpage', '1' ) ) . '#wpseo-dashboard-overview',
admin/class-yoast-network-admin.php CHANGED
@@ -39,10 +39,12 @@ class Yoast_Network_Admin implements WPSEO_WordPress_Integration, WPSEO_WordPres
39
  $choices['-'] = __( 'None', 'wordpress-seo' );
40
  }
41
 
42
- $sites = get_sites( array(
43
  'deleted' => 0,
44
  'network_id' => get_current_network_id(),
45
- ) );
 
 
46
  foreach ( $sites as $site ) {
47
  $site_name = $site->domain . $site->path;
48
  if ( $show_title ) {
39
  $choices['-'] = __( 'None', 'wordpress-seo' );
40
  }
41
 
42
+ $criteria = array(
43
  'deleted' => 0,
44
  'network_id' => get_current_network_id(),
45
+ );
46
+ $sites = get_sites( $criteria );
47
+
48
  foreach ( $sites as $site ) {
49
  $site_name = $site->domain . $site->path;
50
  if ( $show_title ) {
admin/class-yoast-notification-center.php CHANGED
@@ -76,10 +76,11 @@ class Yoast_Notification_Center {
76
  if ( false === ( $notification instanceof Yoast_Notification ) ) {
77
 
78
  // Permit legacy.
79
- $notification = new Yoast_Notification( '', array(
80
  'id' => $notification_id,
81
  'dismissal_key' => $notification_id,
82
- ) );
 
83
  }
84
 
85
  if ( self::maybe_dismiss_notification( $notification ) ) {
@@ -546,7 +547,8 @@ class Yoast_Notification_Center {
546
  private static function get_user_input( $key ) {
547
 
548
  $filter_input_type = INPUT_GET;
549
- if ( 'POST' === strtoupper( $_SERVER['REQUEST_METHOD'] ) ) {
 
550
  $filter_input_type = INPUT_POST;
551
  }
552
 
@@ -554,9 +556,9 @@ class Yoast_Notification_Center {
554
  }
555
 
556
  /**
557
- * Retrieve the notifications from storage
558
  *
559
- * @return array Yoast_Notification[] Notifications
560
  */
561
  private function retrieve_notifications_from_storage() {
562
 
76
  if ( false === ( $notification instanceof Yoast_Notification ) ) {
77
 
78
  // Permit legacy.
79
+ $options = array(
80
  'id' => $notification_id,
81
  'dismissal_key' => $notification_id,
82
+ );
83
+ $notification = new Yoast_Notification( '', $options );
84
  }
85
 
86
  if ( self::maybe_dismiss_notification( $notification ) ) {
547
  private static function get_user_input( $key ) {
548
 
549
  $filter_input_type = INPUT_GET;
550
+
551
+ if ( isset( $_SERVER['REQUEST_METHOD'] ) && 'POST' === strtoupper( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ) ) {
552
  $filter_input_type = INPUT_POST;
553
  }
554
 
556
  }
557
 
558
  /**
559
+ * Retrieve the notifications from storage.
560
  *
561
+ * @return array|void Yoast_Notification[] Notifications.
562
  */
563
  private function retrieve_notifications_from_storage() {
564
 
admin/config-ui/class-configuration-options-adapter.php CHANGED
@@ -72,10 +72,11 @@ class WPSEO_Configuration_Options_Adapter {
72
  throw new InvalidArgumentException( 'Custom option must be callable.' );
73
  }
74
 
75
- $this->add_lookup( $class_name, self::OPTION_TYPE_CUSTOM, array(
76
- $callback_get,
77
- $callback_set,
78
- ) );
 
79
  }
80
 
81
  /**
72
  throw new InvalidArgumentException( 'Custom option must be callable.' );
73
  }
74
 
75
+ $this->add_lookup(
76
+ $class_name,
77
+ self::OPTION_TYPE_CUSTOM,
78
+ array( $callback_get, $callback_set )
79
+ );
80
  }
81
 
82
  /**
admin/config-ui/class-configuration-page.php CHANGED
@@ -265,7 +265,7 @@ class WPSEO_Configuration_Page {
265
  public function get_translations() {
266
  _deprecated_function( __METHOD__, 'WPSEO 4.9', 'WPSEO_' );
267
 
268
- $translations = new WPSEO_Configuration_Translations( WPSEO_Utils::get_user_locale() );
269
 
270
  return $translations->retrieve();
271
  }
265
  public function get_translations() {
266
  _deprecated_function( __METHOD__, 'WPSEO 4.9', 'WPSEO_' );
267
 
268
+ $translations = new WPSEO_Configuration_Translations( WPSEO_Language_Utils::get_user_locale() );
269
 
270
  return $translations->retrieve();
271
  }
admin/config-ui/class-configuration-service.php CHANGED
@@ -45,7 +45,7 @@ class WPSEO_Configuration_Service {
45
  $this->set_components( new WPSEO_Configuration_Components() );
46
  $this->set_endpoint( new WPSEO_Configuration_Endpoint() );
47
  $this->set_structure( new WPSEO_Configuration_Structure() );
48
- $this->set_translations( new WPSEO_Configuration_Translations( WPSEO_Utils::get_user_locale() ) );
49
  }
50
 
51
  /**
45
  $this->set_components( new WPSEO_Configuration_Components() );
46
  $this->set_endpoint( new WPSEO_Configuration_Endpoint() );
47
  $this->set_structure( new WPSEO_Configuration_Structure() );
48
+ $this->set_translations( new WPSEO_Configuration_Translations( WPSEO_Language_Utils::get_user_locale() ) );
49
  }
50
 
51
  /**
admin/config-ui/class-configuration-structure.php CHANGED
@@ -14,23 +14,25 @@ class WPSEO_Configuration_Structure {
14
  protected $steps = array();
15
 
16
  /**
17
- * WPSEO_Configuration_Structure constructor.
 
 
 
 
 
18
  */
19
- public function initialize() {
20
- $this->add_step( 'intro', __( 'Welcome!', 'wordpress-seo' ), array(
21
- 'configurationChoices',
22
- ), false, true );
23
-
24
- $this->add_step( 'environment_type', __( 'Environment', 'wordpress-seo' ), array( 'environment_type' ) );
25
- $this->add_step( 'siteType', __( 'Site type', 'wordpress-seo' ), array( 'siteType' ) );
26
- $this->add_step( 'publishingEntity', __( 'Company or person', 'wordpress-seo' ), array(
27
  'publishingEntity',
28
  'publishingEntityType',
29
  'publishingEntityCompanyName',
30
  'publishingEntityCompanyLogo',
31
  'publishingEntityPersonName',
32
- ) );
33
- $this->add_step( 'profileUrls', __( 'Social profiles', 'wordpress-seo' ), array(
34
  'socialProfilesIntro',
35
  'profileUrlFacebook',
36
  'profileUrlTwitter',
@@ -40,7 +42,36 @@ class WPSEO_Configuration_Structure {
40
  'profileUrlPinterest',
41
  'profileUrlYouTube',
42
  'profileUrlGooglePlus',
43
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  $fields = array( 'postTypeVisibility' );
46
 
@@ -50,26 +81,21 @@ class WPSEO_Configuration_Structure {
50
  }
51
  $this->add_step( 'postTypeVisibility', __( 'Search engine visibility', 'wordpress-seo' ), $fields );
52
 
53
- $this->add_step( 'multipleAuthors', __( 'Multiple authors', 'wordpress-seo' ), array( 'multipleAuthors' ) );
54
- $this->add_step( 'connectGoogleSearchConsole', __( 'Google Search Console', 'wordpress-seo' ), array(
55
- 'googleSearchConsoleIntro',
 
 
 
56
  'connectGoogleSearchConsole',
57
- ) );
58
- $this->add_step( 'titleTemplate', __( 'Title settings', 'wordpress-seo' ), array(
59
- 'titleIntro',
60
- 'siteName',
61
- 'separator',
62
- ) );
63
 
64
- $this->add_step( 'newsletter', __( 'Newsletter', 'wordpress-seo' ), array(
65
- 'mailchimpSignup',
66
- ), true, true );
67
- $this->add_step( 'suggestions', __( 'You might like', 'wordpress-seo' ), array(
68
- 'suggestions',
69
- ), true, true );
70
- $this->add_step( 'success', __( 'Success!', 'wordpress-seo' ), array(
71
- 'successMessage',
72
- ), true, true );
73
  }
74
 
75
  /**
14
  protected $steps = array();
15
 
16
  /**
17
+ * List of fields for each configuration step.
18
+ *
19
+ * This list does not include the fields for the 'postTypeVisibility'
20
+ * step as that list will be generated on the fly.
21
+ *
22
+ * @var array
23
  */
24
+ private $fields = array(
25
+ 'intro' => array( 'configurationChoices' ),
26
+ 'environment_type' => array( 'environment_type' ),
27
+ 'siteType' => array( 'siteType' ),
28
+ 'publishingEntity' => array(
 
 
 
29
  'publishingEntity',
30
  'publishingEntityType',
31
  'publishingEntityCompanyName',
32
  'publishingEntityCompanyLogo',
33
  'publishingEntityPersonName',
34
+ ),
35
+ 'profileUrls' => array(
36
  'socialProfilesIntro',
37
  'profileUrlFacebook',
38
  'profileUrlTwitter',
42
  'profileUrlPinterest',
43
  'profileUrlYouTube',
44
  'profileUrlGooglePlus',
45
+ ),
46
+ 'multipleAuthors' => array( 'multipleAuthors' ),
47
+ 'connectGoogleSearchConsole' => array(
48
+ 'googleSearchConsoleIntro',
49
+ 'connectGoogleSearchConsole',
50
+ ),
51
+ 'titleTemplate' => array(
52
+ 'titleIntro',
53
+ 'siteName',
54
+ 'separator',
55
+ ),
56
+ 'newsletter' => array( 'mailchimpSignup' ),
57
+ 'suggestions' => array( 'suggestions' ),
58
+ 'success' => array( 'successMessage' ),
59
+ );
60
+
61
+ /**
62
+ * WPSEO_Configuration_Structure constructor.
63
+ */
64
+ public function initialize() {
65
+ $this->add_step( 'intro', __( 'Welcome!', 'wordpress-seo' ), $this->fields['intro'], false, true );
66
+
67
+ $this->add_step( 'environment_type', __( 'Environment', 'wordpress-seo' ), $this->fields['environment_type'] );
68
+ $this->add_step( 'siteType', __( 'Site type', 'wordpress-seo' ), $this->fields['siteType'] );
69
+ $this->add_step(
70
+ 'publishingEntity',
71
+ __( 'Company or person', 'wordpress-seo' ),
72
+ $this->fields['publishingEntity']
73
+ );
74
+ $this->add_step( 'profileUrls', __( 'Social profiles', 'wordpress-seo' ), $this->fields['profileUrls'] );
75
 
76
  $fields = array( 'postTypeVisibility' );
77
 
81
  }
82
  $this->add_step( 'postTypeVisibility', __( 'Search engine visibility', 'wordpress-seo' ), $fields );
83
 
84
+ $this->add_step(
85
+ 'multipleAuthors',
86
+ __( 'Multiple authors', 'wordpress-seo' ),
87
+ $this->fields['multipleAuthors']
88
+ );
89
+ $this->add_step(
90
  'connectGoogleSearchConsole',
91
+ __( 'Google Search Console', 'wordpress-seo' ),
92
+ $this->fields['connectGoogleSearchConsole']
93
+ );
94
+ $this->add_step( 'titleTemplate', __( 'Title settings', 'wordpress-seo' ), $this->fields['titleTemplate'] );
 
 
95
 
96
+ $this->add_step( 'newsletter', __( 'Newsletter', 'wordpress-seo' ), $this->fields['newsletter'], true, true );
97
+ $this->add_step( 'suggestions', __( 'You might like', 'wordpress-seo' ), $this->fields['suggestions'], true, true );
98
+ $this->add_step( 'success', __( 'Success!', 'wordpress-seo' ), $this->fields['success'], true, true );
 
 
 
 
 
 
99
  }
100
 
101
  /**
admin/config-ui/fields/class-field-company-or-person.php CHANGED
@@ -18,8 +18,7 @@ class WPSEO_Config_Field_Company_Or_Person extends WPSEO_Config_Field_Choice {
18
 
19
  $this->set_property( 'label', __( 'Does your site represent a person or company?', 'wordpress-seo' ) );
20
 
21
- $this->set_property( 'description', __( 'This information will be used in Google\'s Knowledge Graph Card, the big
22
- block of information you see on the right side of the search results.', 'wordpress-seo' ) );
23
 
24
  $this->add_choice( 'company', __( 'Company', 'wordpress-seo' ) );
25
  $this->add_choice( 'person', __( 'Person', 'wordpress-seo' ) );
18
 
19
  $this->set_property( 'label', __( 'Does your site represent a person or company?', 'wordpress-seo' ) );
20
 
21
+ $this->set_property( 'description', __( 'This information will be used in Google\'s Knowledge Graph Card, the big block of information you see on the right side of the search results.', 'wordpress-seo' ) );
 
22
 
23
  $this->add_choice( 'company', __( 'Company', 'wordpress-seo' ) );
24
  $this->add_choice( 'person', __( 'Person', 'wordpress-seo' ) );
admin/config-ui/fields/class-field-environment.php CHANGED
@@ -18,9 +18,7 @@ class WPSEO_Config_Field_Environment extends WPSEO_Config_Field_Choice {
18
 
19
  $this->set_property( 'label', __( 'Please specify if your site is under construction or already active.', 'wordpress-seo' ) );
20
 
21
- $this->set_property( 'description', __( 'Choose under construction if you want to keep the site out of the index
22
- of search engines. Don\'t forget to activate it once you\'re ready to
23
- publish your site.', 'wordpress-seo' ) );
24
 
25
  $this->add_choice( 'production', __( 'Option A: My site is live and ready to be indexed', 'wordpress-seo' ) );
26
  $this->add_choice( 'staging', __( 'Option B: My site is under construction and should not be indexed', 'wordpress-seo' ) );
18
 
19
  $this->set_property( 'label', __( 'Please specify if your site is under construction or already active.', 'wordpress-seo' ) );
20
 
21
+ $this->set_property( 'description', __( 'Choose under construction if you want to keep the site out of the index of search engines. Don\'t forget to activate it once you\'re ready to publish your site.', 'wordpress-seo' ) );
 
 
22
 
23
  $this->add_choice( 'production', __( 'Option A: My site is live and ready to be indexed', 'wordpress-seo' ) );
24
  $this->add_choice( 'staging', __( 'Option B: My site is under construction and should not be indexed', 'wordpress-seo' ) );
admin/config-ui/fields/class-field-google-search-console-intro.php CHANGED
@@ -25,8 +25,7 @@ class WPSEO_Config_Field_Google_Search_Console_Intro extends WPSEO_Config_Field
25
  '</a>'
26
  );
27
 
28
- $disclaimer =
29
- __( 'Note: we don\'t store your data in any way and don\'t have full access to your account. Your privacy is safe with us.', 'wordpress-seo' );
30
 
31
  $html = '<p>' . $html . '</p><small>' . esc_html( $disclaimer ) . '</small>';
32
 
25
  '</a>'
26
  );
27
 
28
+ $disclaimer = __( 'Note: we don\'t store your data in any way and don\'t have full access to your account. Your privacy is safe with us.', 'wordpress-seo' );
 
29
 
30
  $html = '<p>' . $html . '</p><small>' . esc_html( $disclaimer ) . '</small>';
31
 
admin/config-ui/fields/class-field-multiple-authors.php CHANGED
@@ -18,8 +18,7 @@ class WPSEO_Config_Field_Multiple_Authors extends WPSEO_Config_Field_Choice {
18
 
19
  $this->set_property( 'label', __( 'Does, or will, your site have multiple authors?', 'wordpress-seo' ) );
20
 
21
- $this->set_property( 'description', __( 'If you choose no, your author archives will be deactivated to prevent
22
- duplicate content issues.', 'wordpress-seo' ) );
23
 
24
  $this->add_choice( 'yes', __( 'Yes', 'wordpress-seo' ) );
25
  $this->add_choice( 'no', __( 'No', 'wordpress-seo' ) );
@@ -51,10 +50,11 @@ class WPSEO_Config_Field_Multiple_Authors extends WPSEO_Config_Field_Choice {
51
 
52
  if ( ! isset( $value ) || is_null( $value ) ) {
53
  // If there are more than one users with level > 1 default to multiple authors.
54
- $users = get_users( array(
55
  'fields' => 'IDs',
56
  'who' => 'authors',
57
- ) );
 
58
 
59
  $value = count( $users ) > 1;
60
  }
18
 
19
  $this->set_property( 'label', __( 'Does, or will, your site have multiple authors?', 'wordpress-seo' ) );
20
 
21
+ $this->set_property( 'description', __( 'If you choose no, your author archives will be deactivated to prevent duplicate content issues.', 'wordpress-seo' ) );
 
22
 
23
  $this->add_choice( 'yes', __( 'Yes', 'wordpress-seo' ) );
24
  $this->add_choice( 'no', __( 'No', 'wordpress-seo' ) );
50
 
51
  if ( ! isset( $value ) || is_null( $value ) ) {
52
  // If there are more than one users with level > 1 default to multiple authors.
53
+ $user_criteria = array(
54
  'fields' => 'IDs',
55
  'who' => 'authors',
56
+ );
57
+ $users = get_users( $user_criteria );
58
 
59
  $value = count( $users ) > 1;
60
  }
admin/config-ui/fields/class-field-post-type-visibility.php CHANGED
@@ -16,9 +16,7 @@ class WPSEO_Config_Field_Post_Type_Visibility extends WPSEO_Config_Field {
16
  public function __construct() {
17
  parent::__construct( 'postTypeVisibility', 'HTML' );
18
 
19
- $copy = __( 'Please specify what content types you would like to appear in search engines.
20
- If you do not know the differences between these, it\'s best to choose the
21
- default settings.', 'wordpress-seo' );
22
 
23
  $html = '<p>' . esc_html( $copy ) . '</p><br/>';
24
 
16
  public function __construct() {
17
  parent::__construct( 'postTypeVisibility', 'HTML' );
18
 
19
+ $copy = __( 'Please specify what content types you would like to appear in search engines. If you do not know the differences between these, it\'s best to choose the default settings.', 'wordpress-seo' );
 
 
20
 
21
  $html = '<p>' . esc_html( $copy ) . '</p><br/>';
22
 
admin/config-ui/fields/class-field-social-profiles-intro.php CHANGED
@@ -18,9 +18,7 @@ class WPSEO_Config_Field_Social_Profiles_Intro extends WPSEO_Config_Field {
18
 
19
  $intro_text = sprintf(
20
  /* translators: %1$s is the plugin name, %2$s is a link opening tag, %3$s is a link closing tag. */
21
- __( '%1$s can tell search engines about your social media profiles.
22
- These will be used in Google\'s Knowledge Graph. There are additional
23
- sharing options in the %1$s Social settings. %2$sRead more%3$s about these options.', 'wordpress-seo' ),
24
  'Yoast SEO',
25
  '<a target="_blank" rel="noopener noreferrer" href="' . WPSEO_Shortlinker::get( 'https://yoa.st/1ey' ) . '">',
26
  '</a>'
18
 
19
  $intro_text = sprintf(
20
  /* translators: %1$s is the plugin name, %2$s is a link opening tag, %3$s is a link closing tag. */
21
+ __( '%1$s can tell search engines about your social media profiles. These will be used in Google\'s Knowledge Graph. There are additional sharing options in the %1$s Social settings. %2$sRead more%3$s about these options.', 'wordpress-seo' ),
 
 
22
  'Yoast SEO',
23
  '<a target="_blank" rel="noopener noreferrer" href="' . WPSEO_Shortlinker::get( 'https://yoa.st/1ey' ) . '">',
24
  '</a>'
admin/config-ui/fields/class-field-success-message.php CHANGED
@@ -24,14 +24,13 @@ class WPSEO_Config_Field_Success_Message extends WPSEO_Config_Field {
24
 
25
  $this->set_property( 'title', __( 'You\'ve done it!', 'wordpress-seo' ) );
26
  $this->set_property( 'message', $success_message );
27
- $this->set_property( 'video', array(
28
- 'url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-screencast' ),
29
- 'title' => sprintf(
30
- /* translators: %1$s expands to Yoast SEO. */
31
- __( '%1$s video tutorial', 'wordpress-seo' ),
32
- 'Yoast SEO'
33
- ),
34
- )
35
  );
 
36
  }
37
  }
24
 
25
  $this->set_property( 'title', __( 'You\'ve done it!', 'wordpress-seo' ) );
26
  $this->set_property( 'message', $success_message );
27
+
28
+ /* translators: %1$s expands to Yoast SEO. */
29
+ $video_title = __( '%1$s video tutorial', 'wordpress-seo' );
30
+ $video_args = array(
31
+ 'url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-screencast' ),
32
+ 'title' => sprintf( $video_title, 'Yoast SEO' ),
 
 
33
  );
34
+ $this->set_property( 'video', $video_args );
35
  }
36
  }
admin/config-ui/fields/class-field-title-intro.php CHANGED
@@ -16,11 +16,7 @@ class WPSEO_Config_Field_Title_Intro extends WPSEO_Config_Field {
16
  public function __construct() {
17
  parent::__construct( 'titleIntro', 'HTML' );
18
 
19
- $html = __( 'On this page, you can change the name of your site and choose which
20
- separator to use. The separator will display, for instance, between your
21
- post title and site name. Symbols are shown in the size they\'ll appear in
22
- the search results. Choose the one that fits your brand best or takes up
23
- the least space in the snippets.', 'wordpress-seo' );
24
 
25
  $html = '<p>' . esc_html( $html ) . '</p>';
26
 
16
  public function __construct() {
17
  parent::__construct( 'titleIntro', 'HTML' );
18
 
19
+ $html = __( 'On this page, you can change the name of your site and choose which separator to use. The separator will display, for instance, between your post title and site name. Symbols are shown in the size they\'ll appear in the search results. Choose the one that fits your brand best or takes up the least space in the snippets.', 'wordpress-seo' );
 
 
 
 
20
 
21
  $html = '<p>' . esc_html( $html ) . '</p>';
22
 
admin/courses-overview.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WPSEO plugin file.
4
+ *
5
+ * @package WPSEO\Admin
6
+ */
7
+
8
+ /**
9
+ * This class handles enqueuing the required JS files for the courses overview.
10
+ */
11
+ class WPSEO_Courses_Overview implements WPSEO_WordPress_Integration {
12
+
13
+ /**
14
+ * Registers all hooks to WordPress.
15
+ *
16
+ * @return void
17
+ */
18
+ public function register_hooks() {
19
+ global $pagenow;
20
+ $current_page = filter_input( INPUT_GET, 'page' );
21
+
22
+ if ( $pagenow === 'admin.php' && $current_page === 'wpseo_courses' ) {
23
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Returns the Yoast SEO version the user currently is using.
29
+ *
30
+ * @return string The version: Free or Premium.
31
+ */
32
+ private function get_version() {
33
+ if ( WPSEO_Utils::is_yoast_seo_premium() ) {
34
+ return 'premium';
35
+ }
36
+
37
+ return 'free';
38
+ }
39
+
40
+ /**
41
+ * Enqueue the relevant script.
42
+ *
43
+ * @return void
44
+ */
45
+ public function enqueue_scripts() {
46
+ wp_enqueue_script( WPSEO_Admin_Asset_Manager::PREFIX . 'courses-overview' );
47
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'courses-overview', 'wpseoCoursesOverviewL10n', array( 'version' => $this->get_version(), 'isRtl' => is_rtl() ) );
48
+ }
49
+ }
admin/endpoints/class-endpoint-file-size.php CHANGED
@@ -35,7 +35,7 @@ class WPSEO_Endpoint_File_Size implements WPSEO_Endpoint {
35
  * @return void
36
  */
37
  public function register() {
38
- register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_SINGULAR, array(
39
  'methods' => 'GET',
40
  'args' => array(
41
  'url' => array(
@@ -52,7 +52,8 @@ class WPSEO_Endpoint_File_Size implements WPSEO_Endpoint {
52
  $this,
53
  'can_retrieve_data',
54
  ),
55
- ) );
 
56
  }
57
 
58
  /**
35
  * @return void
36
  */
37
  public function register() {
38
+ $route_args = array(
39
  'methods' => 'GET',
40
  'args' => array(
41
  'url' => array(
52
  $this,
53
  'can_retrieve_data',
54
  ),
55
+ );
56
+ register_rest_route( self::REST_NAMESPACE, self::ENDPOINT_SINGULAR, $route_args );
57
  }
58
 
59
  /**
admin/filters/class-abstract-post-filter.php CHANGED
@@ -129,10 +129,12 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration
129
  * @return string The url to activate this filter.
130
  */
131
  protected function get_filter_url() {
132
- return add_query_arg( array(
133
  self::FILTER_QUERY_ARG => $this->get_query_val(),
134
  'post_type' => $this->get_current_post_type(),
135
- ), 'edit.php' );
 
 
136
  }
137
 
138
  /**
@@ -151,11 +153,11 @@ abstract class WPSEO_Abstract_Post_Filter implements WPSEO_WordPress_Integration
151
  * @return string The current post type.
152
  */
153
  protected function get_current_post_type() {
154
- return filter_input(
155
- INPUT_GET, 'post_type', FILTER_DEFAULT, array(
156
- 'options' => array( 'default' => 'post' ),
157
- )
158
  );
 
 
159
  }
160
 
161
  /**
129
  * @return string The url to activate this filter.
130
  */
131
  protected function get_filter_url() {
132
+ $query_args = array(
133
  self::FILTER_QUERY_ARG => $this->get_query_val(),
134
  'post_type' => $this->get_current_post_type(),
135
+ );
136
+
137
+ return add_query_arg( $query_args, 'edit.php' );
138
  }
139
 
140
  /**
153
  * @return string The current post type.
154
  */
155
  protected function get_current_post_type() {
156
+ $filter_options = array(
157
+ 'options' => array( 'default' => 'post' ),
 
 
158
  );
159
+
160
+ return filter_input( INPUT_GET, 'post_type', FILTER_DEFAULT, $filter_options );
161
  }
162
 
163
  /**
admin/filters/class-cornerstone-filter.php CHANGED
@@ -115,7 +115,8 @@ class WPSEO_Cornerstone_Filter extends WPSEO_Abstract_Post_Filter {
115
  global $wpdb;
116
 
117
  return (int) $wpdb->get_var(
118
- $wpdb->prepare( '
 
119
  SELECT COUNT( 1 )
120
  FROM ' . $wpdb->postmeta . '
121
  WHERE post_id IN( SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type = %s ) &&
115
  global $wpdb;
116
 
117
  return (int) $wpdb->get_var(
118
+ $wpdb->prepare(
119
+ '
120
  SELECT COUNT( 1 )
121
  FROM ' . $wpdb->postmeta . '
122
  WHERE post_id IN( SELECT ID FROM ' . $wpdb->posts . ' WHERE post_type = %s ) &&
admin/formatter/class-metabox-formatter.php CHANGED
@@ -55,7 +55,7 @@ class WPSEO_Metabox_Formatter {
55
  'keywordTab' => __( 'Keyphrase:', 'wordpress-seo' ),
56
  'removeKeyword' => __( 'Remove keyphrase', 'wordpress-seo' ),
57
  'contentLocale' => get_locale(),
58
- 'userLocale' => WPSEO_Utils::get_user_locale(),
59
  'translations' => $this->get_translations(),
60
  'keyword_usage' => array(),
61
  'title_template' => '',
@@ -66,7 +66,7 @@ class WPSEO_Metabox_Formatter {
66
  'intl' => $this->get_content_analysis_component_translations(),
67
  'isRtl' => is_rtl(),
68
  'addKeywordUpsell' => $this->get_add_keyword_upsell_translations(),
69
- 'wordFormRecognitionActive' => ( WPSEO_Utils::get_language( get_locale() ) === 'en' ),
70
  'recalibrationBetaActive' => WPSEO_Recalibration_Beta::is_enabled(),
71
 
72
  /**
@@ -158,7 +158,7 @@ class WPSEO_Metabox_Formatter {
158
  private function get_content_analysis_component_translations() {
159
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
160
  return array(
161
- 'locale' => WPSEO_Utils::get_user_locale(),
162
  'content-analysis.language-notice-link' => __( 'Change language', 'wordpress-seo' ),
163
  'content-analysis.errors' => __( 'Errors', 'wordpress-seo' ),
164
  'content-analysis.problems' => __( 'Problems', 'wordpress-seo' ),
@@ -193,12 +193,14 @@ class WPSEO_Metabox_Formatter {
193
  'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
194
  'other' => sprintf(
195
  /* translators: %s expands to 'Yoast SEO Premium'. */
196
- __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium'
 
197
  ),
198
  'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
199
  'buy' => sprintf(
200
  /* translators: %s expands to 'Yoast SEO Premium'. */
201
- __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium'
 
202
  ),
203
  'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
204
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
@@ -211,7 +213,7 @@ class WPSEO_Metabox_Formatter {
211
  * @return array
212
  */
213
  private function get_translations() {
214
- $locale = WPSEO_Utils::get_user_locale();
215
 
216
  $file = plugin_dir_path( WPSEO_FILE ) . 'languages/wordpress-seo-' . $locale . '.json';
217
  if ( file_exists( $file ) ) {
55
  'keywordTab' => __( 'Keyphrase:', 'wordpress-seo' ),
56
  'removeKeyword' => __( 'Remove keyphrase', 'wordpress-seo' ),
57
  'contentLocale' => get_locale(),
58
+ 'userLocale' => WPSEO_Language_Utils::get_user_locale(),
59
  'translations' => $this->get_translations(),
60
  'keyword_usage' => array(),
61
  'title_template' => '',
66
  'intl' => $this->get_content_analysis_component_translations(),
67
  'isRtl' => is_rtl(),
68
  'addKeywordUpsell' => $this->get_add_keyword_upsell_translations(),
69
+ 'wordFormRecognitionActive' => ( WPSEO_Language_Utils::get_language( get_locale() ) === 'en' ),
70
  'recalibrationBetaActive' => WPSEO_Recalibration_Beta::is_enabled(),
71
 
72
  /**
158
  private function get_content_analysis_component_translations() {
159
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
160
  return array(
161
+ 'locale' => WPSEO_Language_Utils::get_user_locale(),
162
  'content-analysis.language-notice-link' => __( 'Change language', 'wordpress-seo' ),
163
  'content-analysis.errors' => __( 'Errors', 'wordpress-seo' ),
164
  'content-analysis.problems' => __( 'Problems', 'wordpress-seo' ),
193
  'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
194
  'other' => sprintf(
195
  /* translators: %s expands to 'Yoast SEO Premium'. */
196
+ __( 'Other benefits of %s for you:', 'wordpress-seo' ),
197
+ 'Yoast SEO Premium'
198
  ),
199
  'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
200
  'buy' => sprintf(
201
  /* translators: %s expands to 'Yoast SEO Premium'. */
202
+ __( 'Get %s', 'wordpress-seo' ),
203
+ 'Yoast SEO Premium'
204
  ),
205
  'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
206
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
213
  * @return array
214
  */
215
  private function get_translations() {
216
+ $locale = WPSEO_Language_Utils::get_user_locale();
217
 
218
  $file = plugin_dir_path( WPSEO_FILE ) . 'languages/wordpress-seo-' . $locale . '.json';
219
  if ( file_exists( $file ) ) {
admin/formatter/class-term-metabox-formatter.php CHANGED
@@ -44,7 +44,7 @@ class WPSEO_Term_Metabox_Formatter implements WPSEO_Metabox_Formatter_Interface
44
  public function get_values() {
45
  $values = array();
46
 
47
- // Todo: a column needs to be added on the termpages to add a filter for the keyword, so this can be used in the focus kw doubles.
48
  if ( is_object( $this->term ) && property_exists( $this->term, 'taxonomy' ) ) {
49
  $values = array(
50
  'search_url' => $this->search_url(),
44
  public function get_values() {
45
  $values = array();
46
 
47
+ // Todo: a column needs to be added on the termpages to add a filter for the keyword, so this can be used in the focus keyphrase doubles.
48
  if ( is_object( $this->term ) && property_exists( $this->term, 'taxonomy' ) ) {
49
  $values = array(
50
  'search_url' => $this->search_url(),
admin/google_search_console/class-gsc-table.php CHANGED
@@ -239,11 +239,13 @@ class WPSEO_GSC_Table extends WP_List_Table {
239
  * @param int $posts_per_page Number of items per page.
240
  */
241
  private function set_pagination( $total_items, $posts_per_page ) {
242
- $this->set_pagination_args( array(
243
  'total_items' => $total_items,
244
  'total_pages' => ceil( ( $total_items / $posts_per_page ) ),
245
  'per_page' => $posts_per_page,
246
- ) );
 
 
247
  }
248
 
249
  /**
239
  * @param int $posts_per_page Number of items per page.
240
  */
241
  private function set_pagination( $total_items, $posts_per_page ) {
242
+ $pagination_args = array(
243
  'total_items' => $total_items,
244
  'total_pages' => ceil( ( $total_items / $posts_per_page ) ),
245
  'per_page' => $posts_per_page,
246
+ );
247
+
248
+ $this->set_pagination_args( $pagination_args );
249
  }
250
 
251
  /**
admin/google_search_console/class-gsc.php CHANGED
@@ -144,11 +144,13 @@ class WPSEO_GSC {
144
  $asset_manager = new WPSEO_Admin_Asset_Manager();
145
  $asset_manager->enqueue_script( 'admin-gsc' );
146
  $asset_manager->enqueue_style( 'metabox-css' );
147
- add_screen_option( 'per_page', array(
 
148
  'label' => __( 'Crawl errors per page', 'wordpress-seo' ),
149
  'default' => 50,
150
  'option' => 'errors_per_page',
151
- ) );
 
152
  }
153
 
154
  /**
144
  $asset_manager = new WPSEO_Admin_Asset_Manager();
145
  $asset_manager->enqueue_script( 'admin-gsc' );
146
  $asset_manager->enqueue_style( 'metabox-css' );
147
+
148
+ $screen_options = array(
149
  'label' => __( 'Crawl errors per page', 'wordpress-seo' ),
150
  'default' => 50,
151
  'option' => 'errors_per_page',
152
+ );
153
+ add_screen_option( 'per_page', $screen_options );
154
  }
155
 
156
  /**
admin/google_search_console/views/gsc-display.php CHANGED
@@ -107,12 +107,13 @@ switch ( $platform_tabs->current_tab() ) {
107
  default:
108
  $form_action_url = add_query_arg( 'page', esc_attr( filter_input( INPUT_GET, 'page' ) ) );
109
 
110
- get_current_screen()->set_screen_reader_content( array(
111
  // There are no views links in this screen, so no need for the views heading.
112
  'heading_views' => null,
113
  'heading_pagination' => __( 'Crawl issues list navigation', 'wordpress-seo' ),
114
  'heading_list' => __( 'Crawl issues list', 'wordpress-seo' ),
115
- ) );
 
116
 
117
  // Open <form>.
118
  echo "<form id='wpseo-crawl-issues-table-form' action='" . esc_url( $form_action_url ) . "' method='post'>\n";
107
  default:
108
  $form_action_url = add_query_arg( 'page', esc_attr( filter_input( INPUT_GET, 'page' ) ) );
109
 
110
+ $screen_reader_content = array(
111
  // There are no views links in this screen, so no need for the views heading.
112
  'heading_views' => null,
113
  'heading_pagination' => __( 'Crawl issues list navigation', 'wordpress-seo' ),
114
  'heading_list' => __( 'Crawl issues list', 'wordpress-seo' ),
115
+ );
116
+ get_current_screen()->set_screen_reader_content( $screen_reader_content );
117
 
118
  // Open <form>.
119
  echo "<form id='wpseo-crawl-issues-table-form' action='" . esc_url( $form_action_url ) . "' method='post'>\n";
admin/links/class-link-column-count.php CHANGED
@@ -56,7 +56,8 @@ class WPSEO_Link_Column_Count {
56
  $storage = new WPSEO_Meta_Storage();
57
 
58
  $results = $wpdb->get_results(
59
- $wpdb->prepare( '
 
60
  SELECT internal_link_count, incoming_link_count, object_id
61
  FROM ' . $storage->get_table_name() . '
62
  WHERE object_id IN (' . implode( ',', array_fill( 0, count( $post_ids ), '%d' ) ) . ')',
56
  $storage = new WPSEO_Meta_Storage();
57
 
58
  $results = $wpdb->get_results(
59
+ $wpdb->prepare(
60
+ '
61
  SELECT internal_link_count, incoming_link_count, object_id
62
  FROM ' . $storage->get_table_name() . '
63
  WHERE object_id IN (' . implode( ',', array_fill( 0, count( $post_ids ), '%d' ) ) . ')',
admin/links/class-link-factory.php CHANGED
@@ -42,10 +42,10 @@ class WPSEO_Link_Factory {
42
  */
43
  public function build( array $extracted_links ) {
44
  $extracted_links = array_map( array( $this, 'build_link' ), $extracted_links );
45
- $filtered_links = array_filter( $extracted_links, array(
46
- $this->filter,
47
- 'internal_link_with_fragment_filter',
48
- ) );
49
 
50
  return $filtered_links;
51
  }
42
  */
43
  public function build( array $extracted_links ) {
44
  $extracted_links = array_map( array( $this, 'build_link' ), $extracted_links );
45
+ $filtered_links = array_filter(
46
+ $extracted_links,
47
+ array( $this->filter, 'internal_link_with_fragment_filter' )
48
+ );
49
 
50
  return $filtered_links;
51
  }
admin/links/class-link-reindex-dashboard.php CHANGED
@@ -82,7 +82,8 @@ class WPSEO_Link_Reindex_Dashboard {
82
  $blocks = array();
83
 
84
  if ( ! $this->has_unprocessed() ) {
85
- $inner_text = sprintf( '<p>%s</p>',
 
86
  esc_html__( 'All your texts are already counted, there is no need to count them again.', 'wordpress-seo' )
87
  );
88
  }
@@ -99,7 +100,8 @@ class WPSEO_Link_Reindex_Dashboard {
99
  $inner_text .= sprintf( '<p>%s</p>', $progress );
100
  }
101
 
102
- $blocks[] = sprintf( '<div><p>%s</p>%s</div>',
 
103
  esc_html__( 'Counting links in your texts', 'wordpress-seo' ),
104
  $inner_text
105
  );
82
  $blocks = array();
83
 
84
  if ( ! $this->has_unprocessed() ) {
85
+ $inner_text = sprintf(
86
+ '<p>%s</p>',
87
  esc_html__( 'All your texts are already counted, there is no need to count them again.', 'wordpress-seo' )
88
  );
89
  }
100
  $inner_text .= sprintf( '<p>%s</p>', $progress );
101
  }
102
 
103
+ $blocks[] = sprintf(
104
+ '<div><p>%s</p>%s</div>',
105
  esc_html__( 'Counting links in your texts', 'wordpress-seo' ),
106
  $inner_text
107
  );
admin/links/class-link-storage.php CHANGED
@@ -72,7 +72,8 @@ class WPSEO_Link_Storage implements WPSEO_Installable {
72
  global $wpdb;
73
 
74
  $results = $this->database_proxy->get_results(
75
- $wpdb->prepare( '
 
76
  SELECT url, post_id, target_post_id, type
77
  FROM ' . $this->get_table_name() . '
78
  WHERE post_id = %d',
72
  global $wpdb;
73
 
74
  $results = $this->database_proxy->get_results(
75
+ $wpdb->prepare(
76
+ '
77
  SELECT url, post_id, target_post_id, type
78
  FROM ' . $this->get_table_name() . '
79
  WHERE post_id = %d',
admin/menu/class-admin-menu.php CHANGED
@@ -96,6 +96,7 @@ class WPSEO_Admin_Menu extends WPSEO_Base_Menu {
96
  $this->get_submenu_page( __( 'Social', 'wordpress-seo' ), 'wpseo_social' ),
97
  $this->get_submenu_page( __( 'Tools', 'wordpress-seo' ), 'wpseo_tools' ),
98
  $this->get_submenu_page( $this->get_license_page_title(), 'wpseo_licenses' ),
 
99
  );
100
 
101
  /**
96
  $this->get_submenu_page( __( 'Social', 'wordpress-seo' ), 'wpseo_social' ),
97
  $this->get_submenu_page( __( 'Tools', 'wordpress-seo' ), 'wpseo_tools' ),
98
  $this->get_submenu_page( $this->get_license_page_title(), 'wpseo_licenses' ),
99
+ $this->get_submenu_page( __( 'Courses', 'wordpress-seo' ), 'wpseo_courses' ),
100
  );
101
 
102
  /**
admin/menu/class-menu.php CHANGED
@@ -77,6 +77,10 @@ class WPSEO_Menu implements WPSEO_WordPress_Integration {
77
  require_once WPSEO_PATH . 'admin/pages/licenses.php';
78
  break;
79
 
 
 
 
 
80
  case 'wpseo_files':
81
  require_once WPSEO_PATH . 'admin/views/tool-file-editor.php';
82
  break;
77
  require_once WPSEO_PATH . 'admin/pages/licenses.php';
78
  break;
79
 
80
+ case 'wpseo_courses':
81
+ require_once WPSEO_PATH . 'admin/pages/courses.php';
82
+ break;
83
+
84
  case 'wpseo_files':
85
  require_once WPSEO_PATH . 'admin/views/tool-file-editor.php';
86
  break;
admin/menu/class-replacevar-editor.php CHANGED
@@ -72,7 +72,8 @@ class WPSEO_Replacevar_Editor {
72
  $this->yform->hidden( $this->arguments['title'], $this->arguments['title'] );
73
  $this->yform->hidden( $this->arguments['description'], $this->arguments['description'] );
74
 
75
- printf( '<div
 
76
  data-react-replacevar-editor
77
  data-react-replacevar-title-field-id="%1$s"
78
  data-react-replacevar-metadesc-field-id="%2$s"
72
  $this->yform->hidden( $this->arguments['title'], $this->arguments['title'] );
73
  $this->yform->hidden( $this->arguments['description'], $this->arguments['description'] );
74
 
75
+ printf(
76
+ '<div
77
  data-react-replacevar-editor
78
  data-react-replacevar-title-field-id="%1$s"
79
  data-react-replacevar-metadesc-field-id="%2$s"
admin/menu/class-replacevar-field.php CHANGED
@@ -61,12 +61,13 @@ class WPSEO_Replacevar_Field {
61
  public function render() {
62
  $this->yform->hidden( $this->field_id, $this->field_id );
63
 
64
- printf( '<div
65
- data-react-replacevar-field
66
- data-react-replacevar-field-id="%1$s"
67
- data-react-replacevar-field-label="%2$s"
68
- data-react-replacevar-page-type-recommended="%3$s"
69
- data-react-replacevar-page-type-specific="%4$s"></div>',
 
70
  esc_attr( $this->field_id ),
71
  esc_attr( $this->label ),
72
  esc_attr( $this->page_type_recommended ),
61
  public function render() {
62
  $this->yform->hidden( $this->field_id, $this->field_id );
63
 
64
+ printf(
65
+ '<div
66
+ data-react-replacevar-field
67
+ data-react-replacevar-field-id="%1$s"
68
+ data-react-replacevar-field-label="%2$s"
69
+ data-react-replacevar-page-type-recommended="%3$s"
70
+ data-react-replacevar-page-type-specific="%4$s"></div>',
71
  esc_attr( $this->field_id ),
72
  esc_attr( $this->label ),
73
  esc_attr( $this->page_type_recommended ),
admin/metabox/class-metabox.php CHANGED
@@ -193,12 +193,15 @@ class WPSEO_Metabox extends WPSEO_Meta {
193
  $tab_registered = true;
194
  }
195
 
196
- add_meta_box( 'wpseo_meta', $product_title, array(
197
- $this,
198
- 'meta_box',
199
- ), $post_type, 'normal', apply_filters( 'wpseo_metabox_prio', 'high' ), array(
200
- '__block_editor_compatible_meta_box' => true,
201
- ) );
 
 
 
202
  }
203
  }
204
 
@@ -305,8 +308,11 @@ class WPSEO_Metabox extends WPSEO_Meta {
305
  public function meta_box() {
306
  $content_sections = $this->get_content_sections();
307
 
308
- $helpcenter_tab = new WPSEO_Option_Tab( 'metabox', __( 'Meta box', 'wordpress-seo' ),
309
- array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-screencast' ) ) );
 
 
 
310
 
311
  $help_center = new WPSEO_Help_Center( '', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
312
  $help_center->localize_data();
@@ -411,9 +417,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
411
  'advanced',
412
  $content,
413
  __( 'Advanced', 'wordpress-seo' ),
414
- array(
415
- 'single' => true,
416
- )
417
  );
418
 
419
  return new WPSEO_Metabox_Tab_Section(
@@ -433,7 +437,8 @@ class WPSEO_Metabox extends WPSEO_Meta {
433
  * @return string
434
  */
435
  private function get_buy_premium_link() {
436
- return sprintf( '<div class="%1$s"><a target="_blank" rel="noopener noreferrer" href="%2$s"><span class="dashicons dashicons-star-filled wpseo-buy-premium"></span>%3$s</a></div>',
 
437
  'wpseo-metabox-buy-premium',
438
  esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/3g6' ) ),
439
  __( 'Go Premium', 'wordpress-seo' )
@@ -819,11 +824,17 @@ class WPSEO_Metabox extends WPSEO_Meta {
819
 
820
  $analysis_worker_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ) );
821
  $used_keywords_assessment_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ), 'used-keywords-assessment' );
822
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'post-scraper', 'wpseoAnalysisWorkerL10n', array(
 
823
  'url' => $analysis_worker_location->get_url( $analysis_worker_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
824
  'keywords_assessment_url' => $used_keywords_assessment_location->get_url( $used_keywords_assessment_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
825
  'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
826
- ) );
 
 
 
 
 
827
 
828
  /**
829
  * Remove the emoji script as it is incompatible with both React and any
@@ -835,7 +846,7 @@ class WPSEO_Metabox extends WPSEO_Meta {
835
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'shortcode-plugin', 'wpseoShortcodePluginL10n', $this->localize_shortcode_plugin_script() );
836
 
837
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Utils::get_admin_l10n() );
838
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );
839
 
840
  if ( post_type_supports( get_post_type(), 'thumbnail' ) ) {
841
  $asset_manager->enqueue_style( 'featured-image' );
193
  $tab_registered = true;
194
  }
195
 
196
+ add_meta_box(
197
+ 'wpseo_meta',
198
+ $product_title,
199
+ array( $this, 'meta_box' ),
200
+ $post_type,
201
+ 'normal',
202
+ apply_filters( 'wpseo_metabox_prio', 'high' ),
203
+ array( '__block_editor_compatible_meta_box' => true )
204
+ );
205
  }
206
  }
207
 
308
  public function meta_box() {
309
  $content_sections = $this->get_content_sections();
310
 
311
+ $helpcenter_tab = new WPSEO_Option_Tab(
312
+ 'metabox',
313
+ __( 'Meta box', 'wordpress-seo' ),
314
+ array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-screencast' ) )
315
+ );
316
 
317
  $help_center = new WPSEO_Help_Center( '', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
318
  $help_center->localize_data();
417
  'advanced',
418
  $content,
419
  __( 'Advanced', 'wordpress-seo' ),
420
+ array( 'single' => true )
 
 
421
  );
422
 
423
  return new WPSEO_Metabox_Tab_Section(
437
  * @return string
438
  */
439
  private function get_buy_premium_link() {
440
+ return sprintf(
441
+ '<div class="%1$s"><a target="_blank" rel="noopener noreferrer" href="%2$s"><span class="dashicons dashicons-star-filled wpseo-buy-premium"></span>%3$s</a></div>',
442
  'wpseo-metabox-buy-premium',
443
  esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/3g6' ) ),
444
  __( 'Go Premium', 'wordpress-seo' )
824
 
825
  $analysis_worker_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ) );
826
  $used_keywords_assessment_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ), 'used-keywords-assessment' );
827
+
828
+ $localization_data = array(
829
  'url' => $analysis_worker_location->get_url( $analysis_worker_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
830
  'keywords_assessment_url' => $used_keywords_assessment_location->get_url( $used_keywords_assessment_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
831
  'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
832
+ );
833
+ wp_localize_script(
834
+ WPSEO_Admin_Asset_Manager::PREFIX . 'post-scraper',
835
+ 'wpseoAnalysisWorkerL10n',
836
+ $localization_data
837
+ );
838
 
839
  /**
840
  * Remove the emoji script as it is incompatible with both React and any
846
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'shortcode-plugin', 'wpseoShortcodePluginL10n', $this->localize_shortcode_plugin_script() );
847
 
848
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Utils::get_admin_l10n() );
849
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Language_Utils::get_language( WPSEO_Language_Utils::get_user_locale() ) );
850
 
851
  if ( post_type_supports( get_post_type(), 'thumbnail' ) ) {
852
  $asset_manager->enqueue_style( 'featured-image' );
admin/notifiers/class-recalibration-beta.php CHANGED
@@ -70,9 +70,9 @@ class WPSEO_Recalibration_Beta_Notification implements WPSEO_WordPress_Integrati
70
  * @codeCoverageIgnore
71
  */
72
  protected function get_notification() {
73
- $message = sprintf(
 
74
  esc_html__(
75
- /* translators: 1: link opening tag to the features page, 2: link closing tag, 3: Link to KB article, 4: expands to Yoast SEO */
76
  'We\'d love for you to try our new and improved %4$s analysis! Use the toggle on the %1$sFeatures tab%2$s in your %4$s settings. %3$sRead more about the new analysis%2$s.',
77
  'wordpress-seo'
78
  ),
70
  * @codeCoverageIgnore
71
  */
72
  protected function get_notification() {
73
+ $message = sprintf(
74
+ /* translators: 1: link opening tag to the features page, 2: link closing tag, 3: Link to KB article, 4: expands to Yoast SEO */
75
  esc_html__(
 
76
  'We\'d love for you to try our new and improved %4$s analysis! Use the toggle on the %1$sFeatures tab%2$s in your %4$s settings. %3$sRead more about the new analysis%2$s.',
77
  'wordpress-seo'
78
  ),
admin/onpage/class-onpage-request.php CHANGED
@@ -27,11 +27,12 @@ class WPSEO_OnPage_Request {
27
  * @throws Exception The error message that can be used to show to the user.
28
  */
29
  protected function get_remote( $target_url, $parameters = array() ) {
30
- $parameters = array_merge( array(
31
  'url' => $target_url,
32
  'wp_version' => $GLOBALS['wp_version'],
33
  'yseo_version' => WPSEO_VERSION,
34
- ), $parameters );
 
35
 
36
  $url = add_query_arg( $parameters, $this->onpage_endpoint );
37
 
27
  * @throws Exception The error message that can be used to show to the user.
28
  */
29
  protected function get_remote( $target_url, $parameters = array() ) {
30
+ $defaults = array(
31
  'url' => $target_url,
32
  'wp_version' => $GLOBALS['wp_version'],
33
  'yseo_version' => WPSEO_VERSION,
34
+ );
35
+ $parameters = array_merge( $defaults, $parameters );
36
 
37
  $url = add_query_arg( $parameters, $this->onpage_endpoint );
38
 
admin/onpage/class-onpage.php CHANGED
@@ -71,7 +71,7 @@ class WPSEO_OnPage implements WPSEO_WordPress_Integration {
71
  * @return bool True if this functionality can be used.
72
  */
73
  public static function is_active() {
74
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX === true ) {
75
  return false;
76
  }
77
 
71
  * @return bool True if this functionality can be used.
72
  */
73
  public static function is_active() {
74
+ if ( wp_doing_ajax() ) {
75
  return false;
76
  }
77
 
admin/pages/courses.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WPSEO plugin file.
4
+ *
5
+ * @package WPSEO\Admin
6
+ * @since 9.4.0.
7
+ */
8
+
9
+ if ( ! defined( 'WPSEO_VERSION' ) ) {
10
+ header( 'Status: 403 Forbidden' );
11
+ header( 'HTTP/1.1 403 Forbidden' );
12
+ exit();
13
+ }
14
+
15
+ ?>
16
+ <div class="wrap yoast">
17
+ <h1 id="wpseo-title"><?php echo esc_html( get_admin_page_title() ); ?></h1>
18
+ <?php
19
+
20
+ echo "<div id='yoast-courses-overview'></div>";
21
+
22
+ ?>
23
+ </div>
admin/services/class-file-size.php CHANGED
@@ -19,7 +19,7 @@ class WPSEO_File_Size_Service {
19
  */
20
  public function get( WP_REST_Request $request ) {
21
  try {
22
- $file_url = $this->get_file_url( $request );
23
 
24
  return new WP_REST_Response(
25
  array(
@@ -103,5 +103,4 @@ class WPSEO_File_Size_Service {
103
  )
104
  );
105
  }
106
-
107
  }
19
  */
20
  public function get( WP_REST_Request $request ) {
21
  try {
22
+ $file_url = $this->get_file_url( $request );
23
 
24
  return new WP_REST_Response(
25
  array(
103
  )
104
  );
105
  }
 
106
  }
admin/taxonomy/class-taxonomy-metabox.php CHANGED
@@ -66,8 +66,11 @@ class WPSEO_Taxonomy_Metabox {
66
 
67
  echo '<div class="inside">';
68
 
69
- $helpcenter_tab = new WPSEO_Option_Tab( 'tax-metabox', __( 'Meta box', 'wordpress-seo' ),
70
- array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-taxonomy-screencast' ) ) );
 
 
 
71
 
72
  $helpcenter = new WPSEO_Help_Center( 'tax-metabox', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
73
  $helpcenter->localize_data();
@@ -240,7 +243,8 @@ class WPSEO_Taxonomy_Metabox {
240
  * @return string
241
  */
242
  private function get_buy_premium_link() {
243
- return sprintf( "<div class='%s'><a href='#wpseo-meta-section-premium' class='wpseo-meta-section-link'><span class='dashicons dashicons-star-filled wpseo-buy-premium'></span>%s</a></div>",
 
244
  'wpseo-metabox-buy-premium',
245
  __( 'Go Premium', 'wordpress-seo' )
246
  );
@@ -252,29 +256,30 @@ class WPSEO_Taxonomy_Metabox {
252
  * @return WPSEO_Metabox_Section
253
  */
254
  private function get_buy_premium_section() {
255
- $content = sprintf( "<div class='wpseo-premium-description'>
256
- %s
257
- <ul class='wpseo-premium-advantages-list'>
258
- <li>
259
- <strong>%s</strong> - %s
260
- </li>
261
- <li>
262
- <strong>%s</strong> - %s
263
- </li>
264
- <li>
265
- <strong>%s</strong> - %s
266
- </li>
267
- <li>
268
- <strong>%s</strong> - %s
269
- </li>
270
- </ul>
271
-
272
- <a target='_blank' id='wpseo-buy-premium-popup-button' class='button button-buy-premium wpseo-metabox-go-to' href='%s'>
273
  %s
274
- </a>
275
-
276
- <p><a target='_blank' class='wpseo-metabox-go-to' href='%s'>%s</a></p>
277
- </div>",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  /* translators: %1$s expands to Yoast SEO Premium. */
279
  sprintf( __( 'You\'re not getting the benefits of %1$s yet. If you had %1$s, you could use its awesome features:', 'wordpress-seo' ), 'Yoast SEO Premium' ),
280
  __( 'Redirect manager', 'wordpress-seo' ),
66
 
67
  echo '<div class="inside">';
68
 
69
+ $helpcenter_tab = new WPSEO_Option_Tab(
70
+ 'tax-metabox',
71
+ __( 'Meta box', 'wordpress-seo' ),
72
+ array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/metabox-taxonomy-screencast' ) )
73
+ );
74
 
75
  $helpcenter = new WPSEO_Help_Center( 'tax-metabox', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
76
  $helpcenter->localize_data();
243
  * @return string
244
  */
245
  private function get_buy_premium_link() {
246
+ return sprintf(
247
+ "<div class='%s'><a href='#wpseo-meta-section-premium' class='wpseo-meta-section-link'><span class='dashicons dashicons-star-filled wpseo-buy-premium'></span>%s</a></div>",
248
  'wpseo-metabox-buy-premium',
249
  __( 'Go Premium', 'wordpress-seo' )
250
  );
256
  * @return WPSEO_Metabox_Section
257
  */
258
  private function get_buy_premium_section() {
259
+ $content = sprintf(
260
+ "<div class='wpseo-premium-description'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  %s
262
+ <ul class='wpseo-premium-advantages-list'>
263
+ <li>
264
+ <strong>%s</strong> - %s
265
+ </li>
266
+ <li>
267
+ <strong>%s</strong> - %s
268
+ </li>
269
+ <li>
270
+ <strong>%s</strong> - %s
271
+ </li>
272
+ <li>
273
+ <strong>%s</strong> - %s
274
+ </li>
275
+ </ul>
276
+
277
+ <a target='_blank' id='wpseo-buy-premium-popup-button' class='button button-buy-premium wpseo-metabox-go-to' href='%s'>
278
+ %s
279
+ </a>
280
+
281
+ <p><a target='_blank' class='wpseo-metabox-go-to' href='%s'>%s</a></p>
282
+ </div>",
283
  /* translators: %1$s expands to Yoast SEO Premium. */
284
  sprintf( __( 'You\'re not getting the benefits of %1$s yet. If you had %1$s, you could use its awesome features:', 'wordpress-seo' ), 'Yoast SEO Premium' ),
285
  __( 'Redirect manager', 'wordpress-seo' ),
admin/taxonomy/class-taxonomy-social-fields.php CHANGED
@@ -97,16 +97,24 @@ class WPSEO_Taxonomy_Social_Fields extends WPSEO_Taxonomy_Fields {
97
  * @return array
98
  */
99
  private function get_social_networks() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  $social_networks = array(
101
- // Source: https://developers.facebook.com/docs/sharing/best-practices#images.
102
- 'opengraph' => $this->social_network( 'opengraph', __( 'Facebook', 'wordpress-seo' ), sprintf(
103
- /* translators: %1$s expands to the image recommended width, %2$s to its height. */
104
- __( '%1$s by %2$s', 'wordpress-seo' ), '1200', '630'
105
- ) ),
106
- 'twitter' => $this->social_network( 'twitter', __( 'Twitter', 'wordpress-seo' ), sprintf(
107
- /* translators: %1$s expands to the image recommended width, %2$s to its height. */
108
- __( '%1$s by %2$s', 'wordpress-seo' ), '1024', '512'
109
- ) ),
110
  );
111
 
112
  return $this->filter_social_networks( $social_networks );
97
  * @return array
98
  */
99
  private function get_social_networks() {
100
+ // Source: https://developers.facebook.com/docs/sharing/best-practices#images.
101
+ $fb_image_size = sprintf(
102
+ /* translators: %1$s expands to the image recommended width, %2$s to its height. */
103
+ __( '%1$s by %2$s', 'wordpress-seo' ),
104
+ '1200',
105
+ '630'
106
+ );
107
+
108
+ $twitter_image_size = sprintf(
109
+ /* translators: %1$s expands to the image recommended width, %2$s to its height. */
110
+ __( '%1$s by %2$s', 'wordpress-seo' ),
111
+ '1024',
112
+ '512'
113
+ );
114
+
115
  $social_networks = array(
116
+ 'opengraph' => $this->social_network( 'opengraph', __( 'Facebook', 'wordpress-seo' ), $fb_image_size ),
117
+ 'twitter' => $this->social_network( 'twitter', __( 'Twitter', 'wordpress-seo' ), $twitter_image_size ),
 
 
 
 
 
 
 
118
  );
119
 
120
  return $this->filter_social_networks( $social_networks );
admin/taxonomy/class-taxonomy.php CHANGED
@@ -110,11 +110,23 @@ class WPSEO_Taxonomy {
110
 
111
  $analysis_worker_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ) );
112
  $used_keywords_assessment_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ), 'used-keywords-assessment' );
113
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper', 'wpseoAnalysisWorkerL10n', array(
114
- 'url' => $analysis_worker_location->get_url( $analysis_worker_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
115
- 'keywords_assessment_url' => $used_keywords_assessment_location->get_url( $used_keywords_assessment_location->get_asset(), WPSEO_Admin_Asset::TYPE_JS ),
 
 
 
 
 
 
 
116
  'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
117
- ) );
 
 
 
 
 
118
 
119
  /**
120
  * Remove the emoji script as it is incompatible with both React and any
@@ -123,14 +135,16 @@ class WPSEO_Taxonomy {
123
  remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
124
 
125
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );
126
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Utils::get_language( WPSEO_Utils::get_user_locale() ) );
127
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Utils::get_admin_l10n() );
128
 
129
  $asset_manager->enqueue_script( 'admin-media' );
130
 
131
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media', 'wpseoMediaL10n', array(
132
- 'choose_image' => __( 'Use Image', 'wordpress-seo' ),
133
- ) );
 
 
134
  }
135
 
136
  if ( self::is_term_overview( $pagenow ) ) {
110
 
111
  $analysis_worker_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ) );
112
  $used_keywords_assessment_location = new WPSEO_Admin_Asset_Analysis_Worker_Location( $asset_manager->flatten_version( WPSEO_VERSION ), 'used-keywords-assessment' );
113
+
114
+ $localization_data = array(
115
+ 'url' => $analysis_worker_location->get_url(
116
+ $analysis_worker_location->get_asset(),
117
+ WPSEO_Admin_Asset::TYPE_JS
118
+ ),
119
+ 'keywords_assessment_url' => $used_keywords_assessment_location->get_url(
120
+ $used_keywords_assessment_location->get_asset(),
121
+ WPSEO_Admin_Asset::TYPE_JS
122
+ ),
123
  'log_level' => WPSEO_Utils::get_analysis_worker_log_level(),
124
+ );
125
+ wp_localize_script(
126
+ WPSEO_Admin_Asset_Manager::PREFIX . 'term-scraper',
127
+ 'wpseoAnalysisWorkerL10n',
128
+ $localization_data
129
+ );
130
 
131
  /**
132
  * Remove the emoji script as it is incompatible with both React and any
135
  remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
136
 
137
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'replacevar-plugin', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );
138
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoSelect2Locale', WPSEO_Language_Utils::get_language( WPSEO_Language_Utils::get_user_locale() ) );
139
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'metabox', 'wpseoAdminL10n', WPSEO_Utils::get_admin_l10n() );
140
 
141
  $asset_manager->enqueue_script( 'admin-media' );
142
 
143
+ wp_localize_script(
144
+ WPSEO_Admin_Asset_Manager::PREFIX . 'admin-media',
145
+ 'wpseoMediaL10n',
146
+ array( 'choose_image' => __( 'Use Image', 'wordpress-seo' ) )
147
+ );
148
  }
149
 
150
  if ( self::is_term_overview( $pagenow ) ) {
admin/views/js-templates-primary-term.php CHANGED
@@ -14,14 +14,17 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
14
 
15
  <script type="text/html" id="tmpl-primary-term-ui">
16
  <?php
 
 
 
 
 
 
 
 
17
  printf(
18
  '<button type="button" class="wpseo-make-primary-term" aria-label="%1$s">%2$s</button>',
19
- esc_attr( sprintf(
20
- /* translators: accessibility text. %1$s expands to the term title, %2$s to the taxonomy title. */
21
- __( 'Make %1$s primary %2$s', 'wordpress-seo' ),
22
- '{{data.term}}',
23
- '{{data.taxonomy.title}}'
24
- ) ),
25
  esc_html__( 'Make primary', 'wordpress-seo' )
26
  );
27
  ?>
14
 
15
  <script type="text/html" id="tmpl-primary-term-ui">
16
  <?php
17
+ /* translators: accessibility text. %1$s expands to the term title, %2$s to the taxonomy title. */
18
+ $yoast_free_js_button_label = __( 'Make %1$s primary %2$s', 'wordpress-seo' );
19
+ $yoast_free_js_button_label = sprintf(
20
+ $yoast_free_js_button_label,
21
+ '{{data.term}}',
22
+ '{{data.taxonomy.title}}'
23
+ );
24
+
25
  printf(
26
  '<button type="button" class="wpseo-make-primary-term" aria-label="%1$s">%2$s</button>',
27
+ esc_attr( $yoast_free_js_button_label ),
 
 
 
 
 
28
  esc_html__( 'Make primary', 'wordpress-seo' )
29
  );
30
  ?>
admin/views/licenses.php CHANGED
@@ -207,7 +207,7 @@ $new_tab_message = '<span class="screen-reader-text">' . esc_html__( '(O
207
  );
208
  echo $new_tab_message;
209
  ?>
210
- </a>
211
  <?php endif; ?>
212
  <?php if ( ! $extensions->is_activated( 'wordpress-seo-premium' ) ) { ?>
213
  <p><small class="yoast-money-back-guarantee"><?php esc_html_e( 'Comes with our 30-day no questions asked money back guarantee', 'wordpress-seo' ); ?></small></p>
207
  );
208
  echo $new_tab_message;
209
  ?>
210
+ </a>
211
  <?php endif; ?>
212
  <?php if ( ! $extensions->is_activated( 'wordpress-seo-premium' ) ) { ?>
213
  <p><small class="yoast-money-back-guarantee"><?php esc_html_e( 'Comes with our 30-day no questions asked money back guarantee', 'wordpress-seo' ); ?></small></p>
admin/views/paper-collapsible.php CHANGED
@@ -18,8 +18,9 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
18
  header( 'HTTP/1.1 403 Forbidden' );
19
  exit();
20
  }
 
21
  ?>
22
- <div class="paper tab-block" <?php if ( $paper_id ) { echo 'id="' . esc_attr( 'wpseo-' . $paper_id ) . '""'; } ?>>
23
 
24
  <?php
25
  if ( ! empty( $title ) ) {
18
  header( 'HTTP/1.1 403 Forbidden' );
19
  exit();
20
  }
21
+
22
  ?>
23
+ <div class="paper tab-block"<?php echo ( $paper_id ) ? ' id="' . esc_attr( 'wpseo-' . $paper_id ) . '"' : ''; ?>>
24
 
25
  <?php
26
  if ( ! empty( $title ) ) {
admin/views/sidebar.php CHANGED
@@ -125,7 +125,7 @@ $new_tab_message = WPSEO_Admin_Utils::get_new_tab_message();
125
  </div>
126
  </div>
127
  <div class="yoast-sidebar__section">
128
- <strong><?php esc_html_e( 'Remove these ads?', 'wordpress-seo' ) ?></strong>
129
  <p>
130
  <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jy' ); ?>" target="_blank">
131
  <?php
125
  </div>
126
  </div>
127
  <div class="yoast-sidebar__section">
128
+ <strong><?php esc_html_e( 'Remove these ads?', 'wordpress-seo' ); ?></strong>
129
  <p>
130
  <a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/jy' ); ?>" target="_blank">
131
  <?php
admin/views/tabs/metas/paper-content/author-archive-settings.php CHANGED
@@ -41,6 +41,11 @@ $yform->index_switch(
41
  $author_archives_help->get_button_html() . $author_archives_help->get_panel_html()
42
  );
43
 
 
 
 
 
 
44
  $author_archives_no_posts_help = new WPSEO_Admin_Help_Panel(
45
  'noindex-author-noposts-wpseo',
46
  esc_html__( 'Help on the authors without posts archive search results setting', 'wordpress-seo' ),
@@ -59,6 +64,11 @@ $yform->index_switch(
59
  $author_archives_no_posts_help->get_button_html() . $author_archives_no_posts_help->get_panel_html()
60
  );
61
 
 
 
 
 
 
62
  $recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
63
  $editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
64
  $editor = new WPSEO_Replacevar_Editor(
41
  $author_archives_help->get_button_html() . $author_archives_help->get_panel_html()
42
  );
43
 
44
+ ?>
45
+
46
+ <div id='noindex-author-noposts-wpseo-container'>
47
+ <?php
48
+
49
  $author_archives_no_posts_help = new WPSEO_Admin_Help_Panel(
50
  'noindex-author-noposts-wpseo',
51
  esc_html__( 'Help on the authors without posts archive search results setting', 'wordpress-seo' ),
64
  $author_archives_no_posts_help->get_button_html() . $author_archives_no_posts_help->get_panel_html()
65
  );
66
 
67
+ ?>
68
+ </div>
69
+
70
+ <?php
71
+
72
  $recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
73
  $editor_specific_replace_vars = new WPSEO_Admin_Editor_Specific_Replace_Vars();
74
  $editor = new WPSEO_Replacevar_Editor(
admin/views/tabs/metas/paper-content/breadcrumbs-content.php CHANGED
@@ -26,10 +26,15 @@ if ( get_option( 'show_on_front' ) === 'page' && get_option( 'page_for_posts' )
26
  $yform->show_hide_switch( 'breadcrumbs-display-blog-page', __( 'Show Blog page', 'wordpress-seo' ) );
27
  }
28
 
29
- $yform->toggle_switch( 'breadcrumbs-boldlast', array(
30
  'on' => __( 'Bold', 'wordpress-seo' ),
31
  'off' => __( 'Regular', 'wordpress-seo' ),
32
- ), __( 'Bold the last page', 'wordpress-seo' ) );
 
 
 
 
 
33
 
34
  echo '<br/><br/>';
35
 
26
  $yform->show_hide_switch( 'breadcrumbs-display-blog-page', __( 'Show Blog page', 'wordpress-seo' ) );
27
  }
28
 
29
+ $yoast_free_breadcrumb_bold_texts = array(
30
  'on' => __( 'Bold', 'wordpress-seo' ),
31
  'off' => __( 'Regular', 'wordpress-seo' ),
32
+ );
33
+ $yform->toggle_switch(
34
+ 'breadcrumbs-boldlast',
35
+ $yoast_free_breadcrumb_bold_texts,
36
+ __( 'Bold the last page', 'wordpress-seo' )
37
+ );
38
 
39
  echo '<br/><br/>';
40
 
admin/views/tabs/metas/paper-content/date-archives-settings.php CHANGED
@@ -25,10 +25,10 @@ $yform->toggle_switch(
25
  'noindex-archive-wpseo',
26
  esc_html__( 'Help on the date archives search results setting', 'wordpress-seo' ),
27
  sprintf(
28
- /* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
29
- esc_html__( 'Not showing the date archives in the search results technically means those will have a %1$s robots meta. %2$sMore info on the search results settings%3$s.', 'wordpress-seo' ),
30
- '<code>noindex</code>',
31
- '<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/show-x' ) ) . '" target="_blank" rel="noopener noreferrer">',
32
  '</a>'
33
  )
34
  );
25
  'noindex-archive-wpseo',
26
  esc_html__( 'Help on the date archives search results setting', 'wordpress-seo' ),
27
  sprintf(
28
+ /* translators: 1: expands to <code>noindex</code>; 2: link open tag; 3: link close tag. */
29
+ esc_html__( 'Not showing the date archives in the search results technically means those will have a %1$s robots meta. %2$sMore info on the search results settings%3$s.', 'wordpress-seo' ),
30
+ '<code>noindex</code>',
31
+ '<a href="' . esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/show-x' ) ) . '" target="_blank" rel="noopener noreferrer">',
32
  '</a>'
33
  )
34
  );
admin/views/tabs/metas/paper-content/general/knowledge-graph.php CHANGED
@@ -23,11 +23,12 @@ $knowledge_graph_help = new WPSEO_Admin_Help_Panel(
23
  <h2 class="help-button-inline"><?php echo esc_html__( 'Knowledge Graph', 'wordpress-seo' ) . $knowledge_graph_help->get_button_html(); ?></h2>
24
  <?php
25
  echo $knowledge_graph_help->get_panel_html();
26
- $yform->select( 'company_or_person', __( 'Company or person', 'wordpress-seo' ), array(
27
  '' => __( 'Choose whether you\'re a company or person', 'wordpress-seo' ),
28
  'company' => __( 'Company', 'wordpress-seo' ),
29
  'person' => __( 'Person', 'wordpress-seo' ),
30
- ) );
 
31
  ?>
32
  <div id="knowledge-graph-company">
33
  <h3><?php esc_html_e( 'Company', 'wordpress-seo' ); ?></h3>
23
  <h2 class="help-button-inline"><?php echo esc_html__( 'Knowledge Graph', 'wordpress-seo' ) . $knowledge_graph_help->get_button_html(); ?></h2>
24
  <?php
25
  echo $knowledge_graph_help->get_panel_html();
26
+ $yoast_free_kg_select_options = array(
27
  '' => __( 'Choose whether you\'re a company or person', 'wordpress-seo' ),
28
  'company' => __( 'Company', 'wordpress-seo' ),
29
  'person' => __( 'Person', 'wordpress-seo' ),
30
+ );
31
+ $yform->select( 'company_or_person', __( 'Company or person', 'wordpress-seo' ), $yoast_free_kg_select_options );
32
  ?>
33
  <div id="knowledge-graph-company">
34
  <h3><?php esc_html_e( 'Company', 'wordpress-seo' ); ?></h3>
admin/views/tabs/metas/paper-content/media-content.php CHANGED
@@ -15,12 +15,13 @@ $view_utils = new Yoast_View_Utils();
15
  <p><strong><?php esc_html_e( 'We recommend you set this to Yes.', 'wordpress-seo' ); ?></strong></p>
16
  <?php
17
 
 
 
 
 
18
  $yform->toggle_switch(
19
  'disable-attachment',
20
- array(
21
- 'on' => __( 'Yes', 'wordpress-seo' ),
22
- 'off' => __( 'No', 'wordpress-seo' ),
23
- ),
24
  __( 'Redirect attachment URLs to the attachment itself?', 'wordpress-seo' )
25
  );
26
 
15
  <p><strong><?php esc_html_e( 'We recommend you set this to Yes.', 'wordpress-seo' ); ?></strong></p>
16
  <?php
17
 
18
+ $yoast_free_disable_attachments_texts = array(
19
+ 'on' => __( 'Yes', 'wordpress-seo' ),
20
+ 'off' => __( 'No', 'wordpress-seo' ),
21
+ );
22
  $yform->toggle_switch(
23
  'disable-attachment',
24
+ $yoast_free_disable_attachments_texts,
 
 
 
25
  __( 'Redirect attachment URLs to the attachment itself?', 'wordpress-seo' )
26
  );
27
 
admin/views/tool-bulk-editor.php CHANGED
@@ -15,11 +15,12 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
15
  $wpseo_bulk_titles_table = new WPSEO_Bulk_Title_Editor_List_Table();
16
  $wpseo_bulk_description_table = new WPSEO_Bulk_Description_List_Table();
17
 
18
- get_current_screen()->set_screen_reader_content( array(
19
  'heading_views' => __( 'Filter posts list', 'wordpress-seo' ),
20
  'heading_pagination' => __( 'Posts list navigation', 'wordpress-seo' ),
21
  'heading_list' => __( 'Posts list', 'wordpress-seo' ),
22
- ) );
 
23
 
24
  // If type is empty, fill it with value of first tab (title).
25
  $_GET['type'] = ( ! empty( $_GET['type'] ) ) ? $_GET['type'] : 'title';
@@ -34,11 +35,20 @@ if ( ! empty( $_REQUEST['_wp_http_referer'] ) ) {
34
  */
35
  function wpseo_render_help_center() {
36
  $tabs = new WPSEO_Option_Tabs( '', '' );
37
- $tabs->add_tab( new WPSEO_Option_Tab( 'title', __( 'Bulk editor', 'wordpress-seo' ),
38
- array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) ) ) );
39
 
40
- $tabs->add_tab( new WPSEO_Option_Tab( 'description', __( 'Bulk editor', 'wordpress-seo' ),
41
- array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) ) ) );
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  $helpcenter = new WPSEO_Help_Center( '', $tabs, WPSEO_Utils::is_yoast_seo_premium() );
44
  $helpcenter->localize_data();
15
  $wpseo_bulk_titles_table = new WPSEO_Bulk_Title_Editor_List_Table();
16
  $wpseo_bulk_description_table = new WPSEO_Bulk_Description_List_Table();
17
 
18
+ $yoast_free_screen_reader_content = array(
19
  'heading_views' => __( 'Filter posts list', 'wordpress-seo' ),
20
  'heading_pagination' => __( 'Posts list navigation', 'wordpress-seo' ),
21
  'heading_list' => __( 'Posts list', 'wordpress-seo' ),
22
+ );
23
+ get_current_screen()->set_screen_reader_content( $yoast_free_screen_reader_content );
24
 
25
  // If type is empty, fill it with value of first tab (title).
26
  $_GET['type'] = ( ! empty( $_GET['type'] ) ) ? $_GET['type'] : 'title';
35
  */
36
  function wpseo_render_help_center() {
37
  $tabs = new WPSEO_Option_Tabs( '', '' );
 
 
38
 
39
+ $bulk_editor_tab_title = new WPSEO_Option_Tab(
40
+ 'title',
41
+ __( 'Bulk editor', 'wordpress-seo' ),
42
+ array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) )
43
+ );
44
+ $tabs->add_tab( $bulk_editor_tab_title );
45
+
46
+ $bulk_editor_tab_description = new WPSEO_Option_Tab(
47
+ 'description',
48
+ __( 'Bulk editor', 'wordpress-seo' ),
49
+ array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) )
50
+ );
51
+ $tabs->add_tab( $bulk_editor_tab_description );
52
 
53
  $helpcenter = new WPSEO_Help_Center( '', $tabs, WPSEO_Utils::is_yoast_seo_premium() );
54
  $helpcenter->localize_data();
admin/views/tool-file-editor.php CHANGED
@@ -97,8 +97,11 @@ if ( isset( $msg ) && ! empty( $msg ) ) {
97
  echo '<div id="message" class="notice notice-success"><p>', esc_html( $msg ), '</p></div>';
98
  }
99
 
100
- $helpcenter_tab = new WPSEO_Option_Tab( 'bulk-editor', __( 'Bulk editor', 'wordpress-seo' ),
101
- array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-file-editor' ) ) );
 
 
 
102
 
103
  $helpcenter = new WPSEO_Help_Center( 'bulk-editor', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
104
  $helpcenter->localize_data();
97
  echo '<div id="message" class="notice notice-success"><p>', esc_html( $msg ), '</p></div>';
98
  }
99
 
100
+ $helpcenter_tab = new WPSEO_Option_Tab(
101
+ 'bulk-editor',
102
+ __( 'Bulk editor', 'wordpress-seo' ),
103
+ array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-file-editor' ) )
104
+ );
105
 
106
  $helpcenter = new WPSEO_Help_Center( 'bulk-editor', $helpcenter_tab, WPSEO_Utils::is_yoast_seo_premium() );
107
  $helpcenter->localize_data();
admin/views/tool-import-export.php CHANGED
@@ -117,8 +117,11 @@ foreach ( $tabs as $identifier => $tab ) {
117
  if ( ! empty( $tab['screencast_video_url'] ) ) {
118