Yoast SEO - Version 11.1

Version Description

Download this release

Release Info

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

Code changes from version 11.0 to 11.1

Files changed (284) hide show
  1. admin/ajax.php +6 -6
  2. admin/ajax/class-recalculate-scores-ajax.php +7 -7
  3. admin/ajax/class-shortcode-filter.php +4 -4
  4. admin/ajax/class-yoast-dismissable-notice.php +4 -4
  5. admin/ajax/class-yoast-onpage-ajax.php +4 -4
  6. admin/ajax/class-yoast-plugin-conflict-ajax.php +7 -7
  7. admin/class-add-keyword-modal.php +1 -1
  8. admin/class-admin-asset-manager.php +8 -3
  9. admin/class-admin-init.php +14 -19
  10. admin/class-admin.php +16 -12
  11. admin/class-bulk-description-editor-list-table.php +3 -3
  12. admin/class-bulk-editor-list-table.php +21 -18
  13. admin/class-bulk-title-editor-list-table.php +4 -4
  14. admin/class-config.php +35 -7
  15. admin/class-customizer.php +11 -11
  16. admin/class-database-proxy.php +1 -1
  17. admin/class-export.php +5 -5
  18. admin/class-extensions.php +20 -20
  19. admin/class-gutenberg-compatibility.php +2 -2
  20. admin/class-help-center-item.php +1 -1
  21. admin/class-help-center.php +1 -1
  22. admin/class-keyword-synonyms-modal.php +1 -1
  23. admin/class-license-page-manager.php +1 -1
  24. admin/class-meta-columns.php +1 -1
  25. admin/class-meta-storage.php +1 -1
  26. admin/class-multiple-keywords-modal.php +1 -1
  27. admin/class-my-yoast-proxy.php +2 -2
  28. admin/class-option-tab.php +1 -1
  29. admin/class-option-tabs-formatter.php +1 -1
  30. admin/class-option-tabs.php +7 -7
  31. admin/class-paper-presenter.php +1 -1
  32. admin/class-plugin-compatibility.php +1 -1
  33. admin/class-plugin-conflict.php +1 -1
  34. admin/class-premium-popup.php +4 -4
  35. admin/class-primary-term-admin.php +6 -6
  36. admin/class-product-upsell-notice.php +2 -10
  37. admin/class-recalculate-scores.php +2 -2
  38. admin/class-social-admin.php +1 -1
  39. admin/class-yoast-alerts.php +14 -14
  40. admin/class-yoast-columns.php +1 -1
  41. admin/class-yoast-dashboard-widget.php +12 -5
  42. admin/class-yoast-form.php +10 -10
  43. admin/class-yoast-network-admin.php +1 -1
  44. admin/class-yoast-notification-center.php +61 -33
  45. admin/class-yoast-notification.php +16 -16
  46. admin/class-yoast-plugin-conflict.php +15 -15
  47. admin/config-ui/class-configuration-components.php +2 -2
  48. admin/config-ui/class-configuration-endpoint.php +3 -3
  49. admin/config-ui/class-configuration-options-adapter.php +10 -10
  50. admin/config-ui/class-configuration-service.php +10 -10
  51. admin/config-ui/class-configuration-storage.php +9 -9
  52. admin/config-ui/class-configuration-structure.php +1 -1
  53. admin/config-ui/class-configuration-translations.php +2 -2
  54. admin/config-ui/components/class-component-connect-google-search-console.php +5 -5
  55. admin/config-ui/components/class-component-mailchimp-signup.php +2 -2
  56. admin/config-ui/components/class-component-suggestions.php +1 -1
  57. admin/config-ui/components/interface-component.php +2 -2
  58. admin/config-ui/factories/class-factory-post-type.php +2 -2
  59. admin/config-ui/fields/class-field-choice-post-type.php +3 -3
  60. admin/config-ui/fields/class-field-choice.php +2 -2
  61. admin/config-ui/fields/class-field-company-logo.php +1 -1
  62. admin/config-ui/fields/class-field-company-name.php +1 -1
  63. admin/config-ui/fields/class-field-company-or-person.php +1 -1
  64. admin/config-ui/fields/class-field-connect-google-search-console.php +2 -2
  65. admin/config-ui/fields/class-field-environment.php +2 -2
  66. admin/config-ui/fields/class-field-google-search-console-intro.php +1 -1
  67. admin/config-ui/fields/class-field-mailchimp-signup.php +3 -3
  68. admin/config-ui/fields/class-field-multiple-authors.php +1 -1
  69. admin/config-ui/fields/class-field-person.php +1 -1
  70. admin/config-ui/fields/class-field-post-type-visibility.php +1 -1
  71. admin/config-ui/fields/class-field-profile-url-facebook.php +2 -2
  72. admin/config-ui/fields/class-field-profile-url-instagram.php +2 -2
  73. admin/config-ui/fields/class-field-profile-url-linkedin.php +2 -2
  74. admin/config-ui/fields/class-field-profile-url-myspace.php +2 -2
  75. admin/config-ui/fields/class-field-profile-url-pinterest.php +2 -2
  76. admin/config-ui/fields/class-field-profile-url-twitter.php +2 -2
  77. admin/config-ui/fields/class-field-profile-url-youtube.php +2 -2
  78. admin/config-ui/fields/class-field-separator.php +2 -2
  79. admin/config-ui/fields/class-field-site-name.php +2 -2
  80. admin/config-ui/fields/class-field-site-type.php +2 -2
  81. admin/config-ui/fields/class-field-success-message.php +1 -1
  82. admin/config-ui/fields/class-field-suggestions.php +2 -2
  83. admin/config-ui/fields/class-field-title-intro.php +1 -1
  84. admin/config-ui/fields/class-field-upsell-configuration-service.php +1 -1
  85. admin/config-ui/fields/class-field-upsell-site-review.php +1 -1
  86. admin/config-ui/fields/class-field.php +8 -8
  87. admin/filters/class-abstract-post-filter.php +2 -2
  88. admin/filters/class-cornerstone-filter.php +1 -1
  89. admin/formatter/class-metabox-formatter.php +4 -4
  90. admin/formatter/class-post-metabox-formatter.php +5 -5
  91. admin/formatter/class-term-metabox-formatter.php +5 -5
  92. admin/formatter/interface-metabox-formatter.php +1 -1
  93. admin/google_search_console/class-gsc-ajax.php +5 -5
  94. admin/google_search_console/class-gsc-bulk-action.php +7 -7
  95. admin/google_search_console/class-gsc-category-filters.php +17 -15
  96. admin/google_search_console/class-gsc-config.php +1 -1
  97. admin/google_search_console/class-gsc-count.php +8 -8
  98. admin/google_search_console/class-gsc-issue.php +4 -4
  99. admin/google_search_console/class-gsc-issues.php +8 -8
  100. admin/google_search_console/class-gsc-mapper.php +5 -5
  101. admin/google_search_console/class-gsc-marker.php +8 -8
  102. admin/google_search_console/class-gsc-platform-tabs.php +6 -6
  103. admin/google_search_console/class-gsc-service.php +10 -10
  104. admin/google_search_console/class-gsc-settings.php +9 -9
  105. admin/google_search_console/class-gsc-table.php +21 -21
  106. admin/google_search_console/class-gsc.php +6 -10
  107. admin/import/class-import-detector.php +1 -1
  108. admin/import/class-import-plugin.php +1 -1
  109. admin/import/class-import-settings.php +2 -2
  110. admin/import/class-import-status.php +1 -1
  111. admin/import/plugins/class-abstract-plugin-importer.php +1 -1
  112. admin/import/plugins/class-import-headspace.php +1 -1
  113. admin/import/plugins/class-import-jetpack.php +1 -1
  114. admin/import/plugins/class-import-seopressor.php +1 -1
  115. admin/import/plugins/class-import-wpseo.php +1 -1
  116. admin/import/plugins/class-importers.php +1 -1
  117. admin/links/class-link-column-count.php +1 -1
  118. admin/links/class-link-columns.php +1 -1
  119. admin/links/class-link-compatibility-notifier.php +1 -1
  120. admin/links/class-link-filter.php +2 -2
  121. admin/links/class-link-notifier.php +2 -2
  122. admin/links/class-link-reindex-dashboard.php +2 -2
  123. admin/links/class-link-reindex-post-endpoint.php +1 -1
  124. admin/links/class-link-reindex-post-service.php +1 -1
  125. admin/links/class-link-type-classifier.php +3 -3
  126. admin/metabox/class-metabox-analysis-readability.php +1 -1
  127. admin/metabox/class-metabox-analysis-seo.php +1 -1
  128. admin/metabox/class-metabox.php +6 -6
  129. admin/metabox/interface-metabox-analysis.php +1 -1
  130. admin/notifiers/class-post-type-archive-notification-handler.php +4 -4
  131. admin/onpage/class-onpage-option.php +4 -4
  132. admin/onpage/class-onpage-request.php +1 -1
  133. admin/recalculate/class-recalculate-posts.php +4 -4
  134. admin/recalculate/class-recalculate-terms.php +4 -4
  135. admin/recalculate/class-recalculate.php +5 -5
  136. admin/roles/class-abstract-role-manager.php +1 -1
  137. admin/services/class-indexable-post-provider.php +1 -1
  138. admin/statistics/class-statistics-integration.php +1 -1
  139. admin/statistics/class-statistics-service.php +4 -4
  140. admin/taxonomy/class-taxonomy-content-fields.php +2 -2
  141. admin/taxonomy/class-taxonomy-fields-presenter.php +6 -6
  142. admin/taxonomy/class-taxonomy-fields.php +5 -5
  143. admin/taxonomy/class-taxonomy-settings-fields.php +3 -3
  144. admin/taxonomy/class-taxonomy-social-fields.php +7 -7
  145. admin/tracking/class-tracking.php +2 -2
  146. admin/views/class-view-utils.php +1 -1
  147. admin/views/class-yoast-input-select.php +3 -3
  148. admin/views/licenses.php +48 -50
  149. admin/views/paper-collapsible.php +1 -1
  150. admin/views/partial-alerts-template.php +1 -1
  151. admin/views/tabs/dashboard/webmaster-tools.php +2 -2
  152. admin/views/tabs/metas/paper-content/general/knowledge-graph.php +2 -2
  153. admin/views/tabs/metas/paper-content/post-type-content.php +1 -1
  154. admin/views/tabs/metas/paper-content/taxonomy-content.php +1 -1
  155. admin/views/tool-import-export.php +2 -2
  156. admin/watchers/class-slug-change-watcher.php +1 -1
  157. css/dist/{admin-global-1100-rtl.min.css → admin-global-1110-rtl.min.css} +0 -0
  158. css/dist/{admin-global-1100.min.css → admin-global-1110.min.css} +0 -0
  159. css/dist/{adminbar-1100-rtl.min.css → adminbar-1110-rtl.min.css} +0 -0
  160. css/dist/{adminbar-1100.min.css → adminbar-1110.min.css} +0 -0
  161. css/dist/alerts-1100-rtl.min.css +0 -1
  162. css/dist/alerts-1100.min.css +0 -1
  163. css/dist/alerts-1110-rtl.min.css +1 -0
  164. css/dist/alerts-1110.min.css +1 -0
  165. css/dist/{dashboard-1100-rtl.min.css → dashboard-1110-rtl.min.css} +0 -0
  166. css/dist/{dashboard-1100.min.css → dashboard-1110.min.css} +0 -0
  167. css/dist/{edit-page-1100-rtl.min.css → edit-page-1110-rtl.min.css} +0 -0
  168. css/dist/{edit-page-1100.min.css → edit-page-1110.min.css} +0 -0
  169. css/dist/{featured-image-1100-rtl.min.css → featured-image-1110-rtl.min.css} +0 -0
  170. css/dist/{featured-image-1100.min.css → featured-image-1110.min.css} +0 -0
  171. css/dist/{filter-explanation-1100-rtl.min.css → filter-explanation-1110-rtl.min.css} +0 -0
  172. css/dist/{filter-explanation-1100.min.css → filter-explanation-1110.min.css} +0 -0
  173. css/dist/{inside-editor-1100-rtl.min.css → inside-editor-1110-rtl.min.css} +0 -0
  174. css/dist/{inside-editor-1100.min.css → inside-editor-1110.min.css} +0 -0
  175. css/dist/metabox-1100-rtl.min.css +0 -1
  176. css/dist/metabox-1100.min.css +0 -1
  177. css/dist/metabox-1110-rtl.min.css +1 -0
  178. css/dist/metabox-1110.min.css +1 -0
  179. css/dist/{metabox-primary-category-1100-rtl.min.css → metabox-primary-category-1110-rtl.min.css} +0 -0
  180. css/dist/{metabox-primary-category-1100.min.css → metabox-primary-category-1110.min.css} +0 -0
  181. css/dist/{search-appearance-1100-rtl.min.css → search-appearance-1110-rtl.min.css} +0 -0
  182. css/dist/{search-appearance-1100.min.css → search-appearance-1110.min.css} +0 -0
  183. css/dist/structured-data-blocks-1100-rtl.min.css +0 -1
  184. css/dist/structured-data-blocks-1100.min.css +0 -1
  185. css/dist/structured-data-blocks-1110-rtl.min.css +1 -0
  186. css/dist/structured-data-blocks-1110.min.css +1 -0
  187. css/dist/{toggle-switch-1100-rtl.min.css → toggle-switch-1110-rtl.min.css} +0 -0
  188. css/dist/{toggle-switch-1100.min.css → toggle-switch-1110.min.css} +0 -0
  189. css/dist/{wpseo-dismissible-1100-rtl.min.css → wpseo-dismissible-1110-rtl.min.css} +0 -0
  190. css/dist/{wpseo-dismissible-1100.min.css → wpseo-dismissible-1110.min.css} +0 -0
  191. css/dist/yoast-components-1100-rtl.min.css +0 -1
  192. css/dist/yoast-components-1100.min.css +0 -1
  193. css/dist/yoast-components-1110-rtl.min.css +1 -0
  194. css/dist/yoast-components-1110.min.css +1 -0
  195. css/dist/{yoast-extensions-1100-rtl.min.css → yoast-extensions-1110-rtl.min.css} +0 -0
  196. css/dist/{yoast-extensions-1100.min.css → yoast-extensions-1110.min.css} +0 -0
  197. css/dist/{yst_plugin_tools-1100-rtl.min.css → yst_plugin_tools-1110-rtl.min.css} +0 -0
  198. css/dist/{yst_plugin_tools-1100.min.css → yst_plugin_tools-1110.min.css} +0 -0
  199. css/dist/{yst_seo_score-1100-rtl.min.css → yst_seo_score-1110-rtl.min.css} +0 -0
  200. css/dist/{yst_seo_score-1100.min.css → yst_seo_score-1110.min.css} +0 -0
  201. deprecated/admin/config-ui/fields/class-field-profile-url-googleplus.php +1 -1
  202. deprecated/class-wpseo-option-permalinks.php +3 -3
  203. frontend/class-breadcrumbs.php +3 -3
  204. frontend/class-frontend.php +1 -1
  205. frontend/class-opengraph-image.php +4 -3
  206. frontend/class-opengraph-oembed.php +2 -2
  207. frontend/class-opengraph.php +2 -2
  208. frontend/class-remove-reply-to-com.php +1 -1
  209. frontend/class-twitter.php +35 -35
  210. frontend/class-woocommerce-shop-page.php +1 -1
  211. frontend/schema/class-schema-context.php +2 -2
  212. frontend/schema/class-schema-image.php +152 -0
  213. frontend/schema/class-schema-organization.php +2 -6
  214. frontend/schema/class-schema-person.php +6 -8
  215. frontend/schema/class-schema-webpage.php +4 -7
  216. images/brushstroke_background.svg +1 -0
  217. images/local_assistant.svg +1 -0
  218. inc/class-addon-manager.php +1 -1
  219. inc/class-my-yoast-api-request.php +3 -3
  220. inc/class-rewrite.php +4 -3
  221. inc/class-upgrade.php +29 -11
  222. inc/class-wpseo-admin-bar-menu.php +1 -1
  223. inc/class-wpseo-content-images.php +1 -1
  224. inc/class-wpseo-custom-fields.php +5 -3
  225. inc/class-wpseo-custom-taxonomies.php +4 -2
  226. inc/class-wpseo-endpoint-factory.php +22 -8
  227. inc/class-wpseo-image-utils.php +13 -12
  228. inc/class-wpseo-meta.php +86 -84
  229. inc/class-wpseo-primary-term.php +4 -4
  230. inc/class-wpseo-rank.php +9 -9
  231. inc/class-wpseo-replace-vars.php +30 -22
  232. inc/class-wpseo-replacement-variable.php +10 -4
  233. inc/class-wpseo-shortlinker.php +2 -1
  234. inc/class-wpseo-statistics.php +3 -3
  235. inc/class-wpseo-utils.php +35 -29
  236. inc/class-wpseo-validator.php +1 -1
  237. inc/endpoints/class-myyoast-connect.php +4 -4
  238. inc/exceptions/class-invalid-argument-exception.php +1 -1
  239. inc/exceptions/class-invalid-indexable-exception.php +1 -1
  240. inc/exceptions/class-myyoast-authentication-exception.php +1 -1
  241. inc/exceptions/class-myyoast-bad-request-exception.php +1 -1
  242. inc/exceptions/class-myyoast-invalid-json-exception.php +1 -1
  243. inc/exceptions/class-rest-request-exception.php +1 -1
  244. inc/indexables/class-indexable.php +10 -4
  245. inc/indexables/class-object-type.php +13 -5
  246. inc/indexables/class-post-indexable.php +5 -3
  247. inc/indexables/class-post-object-type.php +1 -1
  248. inc/indexables/class-term-indexable.php +5 -3
  249. inc/indexables/class-term-object-type.php +1 -1
  250. inc/indexables/validators/class-endpoint-validator.php +1 -1
  251. inc/indexables/validators/class-keyword-validator.php +1 -1
  252. inc/indexables/validators/class-link-validator.php +1 -1
  253. inc/indexables/validators/class-meta-values-validator.php +1 -1
  254. inc/indexables/validators/class-object-type-validator.php +1 -1
  255. inc/indexables/validators/class-opengraph-validator.php +1 -1
  256. inc/indexables/validators/class-robots-validator.php +4 -2
  257. inc/indexables/validators/class-twitter-validator.php +1 -1
  258. inc/interface-wpseo-wordpress-integration.php +2 -2
  259. inc/options/class-wpseo-option-ms.php +44 -32
  260. inc/options/class-wpseo-option-social.php +34 -23
  261. inc/options/class-wpseo-option-titles.php +47 -34
  262. inc/options/class-wpseo-option-wpseo.php +13 -12
  263. inc/options/class-wpseo-option.php +60 -54
  264. inc/options/class-wpseo-options.php +25 -25
  265. inc/options/class-wpseo-taxonomy-meta.php +49 -34
  266. inc/sitemaps/class-author-sitemap-provider.php +1 -1
  267. inc/sitemaps/class-post-type-sitemap-provider.php +8 -8
  268. inc/sitemaps/class-sitemap-cache-data.php +11 -8
  269. inc/sitemaps/class-sitemap-image-parser.php +7 -7
  270. inc/sitemaps/class-sitemap-timezone.php +9 -8
  271. inc/sitemaps/class-sitemaps-admin.php +6 -6
  272. inc/sitemaps/class-sitemaps-cache-validator.php +11 -12
  273. inc/sitemaps/class-sitemaps-cache.php +4 -4
  274. inc/sitemaps/class-sitemaps-renderer.php +6 -6
  275. inc/sitemaps/class-sitemaps-router.php +1 -1
  276. inc/sitemaps/class-sitemaps.php +5 -5
  277. inc/sitemaps/class-taxonomy-sitemap-provider.php +4 -4
  278. inc/sitemaps/interface-sitemap-cache-data.php +5 -5
  279. inc/sitemaps/interface-sitemap-provider.php +1 -1
  280. inc/structured-data-blocks/class-faq-block.php +3 -2
  281. inc/structured-data-blocks/class-how-to-block.php +3 -2
  282. inc/wpseo-functions.php +13 -10
  283. inc/wpseo-non-ajax-functions.php +3 -3
  284. js/dist/analysis-1100.min.js +0 -14
admin/ajax.php CHANGED
@@ -16,7 +16,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
16
  */
17
 
18
  /**
19
- * Convenience function to JSON encode and echo results and then die
20
  *
21
  * @param array $results Results array for encoding.
22
  */
@@ -87,7 +87,7 @@ function wpseo_dismiss_tagline_notice() {
87
  add_action( 'wp_ajax_wpseo_dismiss_tagline_notice', 'wpseo_dismiss_tagline_notice' );
88
 
89
  /**
90
- * Used in the editor to replace vars for the snippet preview
91
  */
92
  function wpseo_ajax_replace_vars() {
93
  global $post;
@@ -124,7 +124,7 @@ function wpseo_save_description() {
124
  add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' );
125
 
126
  /**
127
- * Save titles & descriptions
128
  *
129
  * @param string $what Type of item to save (title, description).
130
  */
@@ -246,7 +246,7 @@ function wpseo_save_all_descriptions() {
246
  add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' );
247
 
248
  /**
249
- * Utility function to save values
250
  *
251
  * @param string $what Type of item so save.
252
  */
@@ -270,7 +270,7 @@ function wpseo_save_all( $what ) {
270
  }
271
 
272
  /**
273
- * Insert a new value
274
  *
275
  * @param string $what Item type (such as title).
276
  * @param int $post_id Post ID.
@@ -366,7 +366,7 @@ new Yoast_Dismissable_Notice_Ajax( 'recalculate', Yoast_Dismissable_Notice_Ajax:
366
  /* ********************* DEPRECATED FUNCTIONS ********************* */
367
 
368
  /**
369
- * Removes stopword from the sample permalink that is generated in an AJAX request
370
  *
371
  * @deprecated 6.3
372
  * @codeCoverageIgnore
16
  */
17
 
18
  /**
19
+ * Convenience function to JSON encode and echo results and then die.
20
  *
21
  * @param array $results Results array for encoding.
22
  */
87
  add_action( 'wp_ajax_wpseo_dismiss_tagline_notice', 'wpseo_dismiss_tagline_notice' );
88
 
89
  /**
90
+ * Used in the editor to replace vars for the snippet preview.
91
  */
92
  function wpseo_ajax_replace_vars() {
93
  global $post;
124
  add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' );
125
 
126
  /**
127
+ * Save titles & descriptions.
128
  *
129
  * @param string $what Type of item to save (title, description).
130
  */
246
  add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' );
247
 
248
  /**
249
+ * Utility function to save values.
250
  *
251
  * @param string $what Type of item so save.
252
  */
270
  }
271
 
272
  /**
273
+ * Insert a new value.
274
  *
275
  * @param string $what Item type (such as title).
276
  * @param int $post_id Post ID.
366
  /* ********************* DEPRECATED FUNCTIONS ********************* */
367
 
368
  /**
369
+ * Removes stopword from the sample permalink that is generated in an AJAX request.
370
  *
371
  * @deprecated 6.3
372
  * @codeCoverageIgnore
admin/ajax/class-recalculate-scores-ajax.php CHANGED
@@ -6,14 +6,14 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Recalculate_Scores
10
  *
11
- * This class handles the SEO score recalculation for all posts with a filled focus keyword
12
  */
13
  class WPSEO_Recalculate_Scores_Ajax {
14
 
15
  /**
16
- * Initialize the AJAX hooks
17
  */
18
  public function __construct() {
19
  add_action( 'wp_ajax_wpseo_recalculate_scores', array( $this, 'recalculate_scores' ) );
@@ -38,7 +38,7 @@ class WPSEO_Recalculate_Scores_Ajax {
38
  }
39
 
40
  /**
41
- * Start recalculation
42
  */
43
  public function recalculate_scores() {
44
  check_ajax_referer( 'wpseo_recalculate', 'nonce' );
@@ -57,7 +57,7 @@ class WPSEO_Recalculate_Scores_Ajax {
57
  }
58
 
59
  /**
60
- * Saves the new linkdex score for given post
61
  */
62
  public function save_score() {
63
  check_ajax_referer( 'wpseo_recalculate', 'nonce' );
@@ -88,7 +88,7 @@ class WPSEO_Recalculate_Scores_Ajax {
88
  }
89
 
90
  /**
91
- * Gets the total number of posts
92
  *
93
  * @return int
94
  */
@@ -106,7 +106,7 @@ class WPSEO_Recalculate_Scores_Ajax {
106
  }
107
 
108
  /**
109
- * Get the total number of terms
110
  *
111
  * @return int
112
  */
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Recalculate_Scores.
10
  *
11
+ * This class handles the SEO score recalculation for all posts with a filled focus keyword.
12
  */
13
  class WPSEO_Recalculate_Scores_Ajax {
14
 
15
  /**
16
+ * Initialize the AJAX hooks.
17
  */
18
  public function __construct() {
19
  add_action( 'wp_ajax_wpseo_recalculate_scores', array( $this, 'recalculate_scores' ) );
38
  }
39
 
40
  /**
41
+ * Start recalculation.
42
  */
43
  public function recalculate_scores() {
44
  check_ajax_referer( 'wpseo_recalculate', 'nonce' );
57
  }
58
 
59
  /**
60
+ * Saves the new linkdex score for given post.
61
  */
62
  public function save_score() {
63
  check_ajax_referer( 'wpseo_recalculate', 'nonce' );
88
  }
89
 
90
  /**
91
+ * Gets the total number of posts.
92
  *
93
  * @return int
94
  */
106
  }
107
 
108
  /**
109
+ * Get the total number of terms.
110
  *
111
  * @return int
112
  */
admin/ajax/class-shortcode-filter.php CHANGED
@@ -6,21 +6,21 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Shortcode_Filter
10
  *
11
- * Used for parsing WP shortcodes with AJAX
12
  */
13
  class WPSEO_Shortcode_Filter {
14
 
15
  /**
16
- * Initialize the AJAX hooks
17
  */
18
  public function __construct() {
19
  add_action( 'wp_ajax_wpseo_filter_shortcodes', array( $this, 'do_filter' ) );
20
  }
21
 
22
  /**
23
- * Parse the shortcodes
24
  */
25
  public function do_filter() {
26
  check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' );
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Shortcode_Filter.
10
  *
11
+ * Used for parsing WP shortcodes with AJAX.
12
  */
13
  class WPSEO_Shortcode_Filter {
14
 
15
  /**
16
+ * Initialize the AJAX hooks.
17
  */
18
  public function __construct() {
19
  add_action( 'wp_ajax_wpseo_filter_shortcodes', array( $this, 'do_filter' ) );
20
  }
21
 
22
  /**
23
+ * Parse the shortcodes.
24
  */
25
  public function do_filter() {
26
  check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' );
admin/ajax/class-yoast-dismissable-notice.php CHANGED
@@ -6,8 +6,8 @@
6
  */
7
 
8
  /**
9
- * This class will catch the request to dismiss the target notice (set by notice_name) and will store the dismiss status as an user meta
10
- * in the database
11
  */
12
  class Yoast_Dismissable_Notice_Ajax {
13
 
@@ -48,7 +48,7 @@ class Yoast_Dismissable_Notice_Ajax {
48
  private $notice_type;
49
 
50
  /**
51
- * Initialize the hooks for the AJAX request
52
  *
53
  * @param string $notice_name The name for the hook to catch the notice.
54
  * @param string $notice_type The notice type.
@@ -61,7 +61,7 @@ class Yoast_Dismissable_Notice_Ajax {
61
  }
62
 
63
  /**
64
- * Handles the dismiss notice request
65
  */
66
  public function dismiss_notice() {
67
  check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );
6
  */
7
 
8
  /**
9
+ * This class will catch the request to dismiss the target notice (set by notice_name)
10
+ * and will store the dismiss status as an user meta in the database.
11
  */
12
  class Yoast_Dismissable_Notice_Ajax {
13
 
48
  private $notice_type;
49
 
50
  /**
51
+ * Initialize the hooks for the AJAX request.
52
  *
53
  * @param string $notice_name The name for the hook to catch the notice.
54
  * @param string $notice_type The notice type.
61
  }
62
 
63
  /**
64
+ * Handles the dismiss notice request.
65
  */
66
  public function dismiss_notice() {
67
  check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );
admin/ajax/class-yoast-onpage-ajax.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class Yoast_OnPage_Ajax
10
  *
11
  * This class will catch the request to dismiss the Ryte notice and will store
12
  * the dismiss status as an user meta in the database.
@@ -14,14 +14,14 @@
14
  class Yoast_OnPage_Ajax {
15
 
16
  /**
17
- * Initialize the hooks for the AJAX request
18
  */
19
  public function __construct() {
20
  add_action( 'wp_ajax_wpseo_dismiss_onpageorg', array( $this, 'dismiss_notice' ) );
21
  }
22
 
23
  /**
24
- * Handles the dismiss notice request
25
  */
26
  public function dismiss_notice() {
27
  check_ajax_referer( 'wpseo-dismiss-onpageorg' );
@@ -32,7 +32,7 @@ class Yoast_OnPage_Ajax {
32
  }
33
 
34
  /**
35
- * Storing the dismissed value as an user option in the database
36
  */
37
  private function save_dismissed() {
38
  update_user_meta( get_current_user_id(), WPSEO_OnPage::USER_META_KEY, 1 );
6
  */
7
 
8
  /**
9
+ * Class Yoast_OnPage_Ajax.
10
  *
11
  * This class will catch the request to dismiss the Ryte notice and will store
12
  * the dismiss status as an user meta in the database.
14
  class Yoast_OnPage_Ajax {
15
 
16
  /**
17
+ * Initialize the hooks for the AJAX request.
18
  */
19
  public function __construct() {
20
  add_action( 'wp_ajax_wpseo_dismiss_onpageorg', array( $this, 'dismiss_notice' ) );
21
  }
22
 
23
  /**
24
+ * Handles the dismiss notice request.
25
  */
26
  public function dismiss_notice() {
27
  check_ajax_referer( 'wpseo-dismiss-onpageorg' );
32
  }
33
 
34
  /**
35
+ * Storing the dismissed value as an user option in the database.
36
  */
37
  private function save_dismissed() {
38
  update_user_meta( get_current_user_id(), WPSEO_OnPage::USER_META_KEY, 1 );
admin/ajax/class-yoast-plugin-conflict-ajax.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class Yoast_Plugin_Conflict_Ajax
10
  */
11
  class Yoast_Plugin_Conflict_Ajax {
12
 
@@ -21,14 +21,14 @@ class Yoast_Plugin_Conflict_Ajax {
21
  private $dismissed_conflicts = array();
22
 
23
  /**
24
- * Initialize the hooks for the AJAX request
25
  */
26
  public function __construct() {
27
  add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', array( $this, 'dismiss_notice' ) );
28
  }
29
 
30
  /**
31
- * Handles the dismiss notice request
32
  */
33
  public function dismiss_notice() {
34
  check_ajax_referer( 'dismiss-plugin-conflict' );
@@ -45,7 +45,7 @@ class Yoast_Plugin_Conflict_Ajax {
45
  }
46
 
47
  /**
48
- * Getting the user option from the database
49
  *
50
  * @return bool|array
51
  */
@@ -71,7 +71,7 @@ class Yoast_Plugin_Conflict_Ajax {
71
  }
72
 
73
  /**
74
- * Storing the conflicting plugins as an user option in the database
75
  *
76
  * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap).
77
  */
@@ -84,7 +84,7 @@ class Yoast_Plugin_Conflict_Ajax {
84
  }
85
 
86
  /**
87
- * Loop through the plugins to compare them with the already stored dismissed plugin conflicts
88
  *
89
  * @param array $posted_plugins Plugin set to check.
90
  */
@@ -95,7 +95,7 @@ class Yoast_Plugin_Conflict_Ajax {
95
  }
96
 
97
  /**
98
- * Check if plugin is already dismissed, if not store it in the array that will be saved later
99
  *
100
  * @param string $posted_plugin Plugin to check against dismissed conflicts.
101
  */
6
  */
7
 
8
  /**
9
+ * Class Yoast_Plugin_Conflict_Ajax.
10
  */
11
  class Yoast_Plugin_Conflict_Ajax {
12
 
21
  private $dismissed_conflicts = array();
22
 
23
  /**
24
+ * Initialize the hooks for the AJAX request.
25
  */
26
  public function __construct() {
27
  add_action( 'wp_ajax_wpseo_dismiss_plugin_conflict', array( $this, 'dismiss_notice' ) );
28
  }
29
 
30
  /**
31
+ * Handles the dismiss notice request.
32
  */
33
  public function dismiss_notice() {
34
  check_ajax_referer( 'dismiss-plugin-conflict' );
45
  }
46
 
47
  /**
48
+ * Getting the user option from the database.
49
  *
50
  * @return bool|array
51
  */
71
  }
72
 
73
  /**
74
+ * Storing the conflicting plugins as an user option in the database.
75
  *
76
  * @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap).
77
  */
84
  }
85
 
86
  /**
87
+ * Loop through the plugins to compare them with the already stored dismissed plugin conflicts.
88
  *
89
  * @param array $posted_plugins Plugin set to check.
90
  */
95
  }
96
 
97
  /**
98
+ * Check if plugin is already dismissed, if not store it in the array that will be saved later.
99
  *
100
  * @param string $posted_plugin Plugin to check against dismissed conflicts.
101
  */
admin/class-add-keyword-modal.php CHANGED
@@ -36,7 +36,7 @@ class WPSEO_Add_Keyword_Modal {
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
- 'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
+ 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
admin/class-admin-asset-manager.php CHANGED
@@ -6,7 +6,10 @@
6
  */
7
 
8
  /**
9
- * This class registers all the necessary styles and scripts. Also has methods for the enqueing of scripts and styles. It automatically adds a prefix to the handle.
 
 
 
10
  */
11
  class WPSEO_Admin_Asset_Manager {
12
 
@@ -140,7 +143,7 @@ class WPSEO_Admin_Asset_Manager {
140
  }
141
 
142
  /**
143
- * Flattens a version number for use in a filename
144
  *
145
  * @param string $version The original version number.
146
  *
@@ -515,6 +518,8 @@ class WPSEO_Admin_Asset_Manager {
515
  'wp-i18n',
516
  'wp-components',
517
  'wp-data',
 
 
518
  self::PREFIX . 'commons',
519
  ),
520
  ),
@@ -658,7 +663,7 @@ class WPSEO_Admin_Asset_Manager {
658
  *
659
  * @todo Data format is not self-documenting. Needs explanation inline. R.
660
  *
661
- * @return array styles that need to be registered.
662
  */
663
  protected function styles_to_be_registered() {
664
  $flat_version = $this->flatten_version( WPSEO_VERSION );
6
  */
7
 
8
  /**
9
+ * This class registers all the necessary styles and scripts.
10
+ *
11
+ * Also has methods for the enqueing of scripts and styles.
12
+ * It automatically adds a prefix to the handle.
13
  */
14
  class WPSEO_Admin_Asset_Manager {
15
 
143
  }
144
 
145
  /**
146
+ * Flattens a version number for use in a filename.
147
  *
148
  * @param string $version The original version number.
149
  *
518
  'wp-i18n',
519
  'wp-components',
520
  'wp-data',
521
+ self::PREFIX . 'analysis',
522
+ self::PREFIX . 'components',
523
  self::PREFIX . 'commons',
524
  ),
525
  ),
663
  *
664
  * @todo Data format is not self-documenting. Needs explanation inline. R.
665
  *
666
+ * @return array Styles that need to be registered.
667
  */
668
  protected function styles_to_be_registered() {
669
  $flat_version = $this->flatten_version( WPSEO_VERSION );
admin/class-admin-init.php CHANGED
@@ -25,7 +25,7 @@ class WPSEO_Admin_Init {
25
  private $asset_manager;
26
 
27
  /**
28
- * Class constructor
29
  */
30
  public function __construct() {
31
  $GLOBALS['wpseo_admin'] = new WPSEO_Admin();
@@ -93,7 +93,7 @@ class WPSEO_Admin_Init {
93
  }
94
 
95
  /**
96
- * Notify about the default tagline if the user hasn't changed it
97
  */
98
  public function tagline_notice() {
99
  $query_args = array(
@@ -117,16 +117,11 @@ class WPSEO_Admin_Init {
117
  $tagline_notification = new Yoast_Notification( $info_message, $notification_options );
118
 
119
  $notification_center = Yoast_Notification_Center::get();
120
- if ( $this->has_default_tagline() ) {
121
- $notification_center->add_notification( $tagline_notification );
122
- }
123
- else {
124
- $notification_center->remove_notification( $tagline_notification );
125
- }
126
  }
127
 
128
  /**
129
- * Add an alert if the blog is not publicly visible
130
  */
131
  public function blog_public_notice() {
132
 
@@ -157,7 +152,7 @@ class WPSEO_Admin_Init {
157
  }
158
 
159
  /**
160
- * Display notice to disable comment pagination
161
  */
162
  public function page_comments_notice() {
163
 
@@ -189,7 +184,7 @@ class WPSEO_Admin_Init {
189
  }
190
 
191
  /**
192
- * Returns whether or not the site has the default tagline
193
  *
194
  * @return bool
195
  */
@@ -205,7 +200,7 @@ class WPSEO_Admin_Init {
205
  }
206
 
207
  /**
208
- * Show alert when the permalink doesn't contain %postname%
209
  */
210
  public function permalink_notice() {
211
 
@@ -237,7 +232,7 @@ class WPSEO_Admin_Init {
237
  }
238
 
239
  /**
240
- * Are page comments enabled
241
  *
242
  * @return bool
243
  */
@@ -263,7 +258,7 @@ class WPSEO_Admin_Init {
263
  }
264
 
265
  /**
266
- * Build compatibility problem notification
267
  *
268
  * @return Yoast_Notification
269
  */
@@ -362,7 +357,7 @@ class WPSEO_Admin_Init {
362
  }
363
 
364
  /**
365
- * Build Yoast SEO compatibility problem notification
366
  *
367
  * @param string $name The plugin name to use for the unique ID.
368
  * @param array $plugin The plugin to retrieve the data from.
@@ -437,7 +432,7 @@ class WPSEO_Admin_Init {
437
  }
438
 
439
  /**
440
- * Check if the user has dismissed the given notice (by $notice_name)
441
  *
442
  * @param string $notice_name The name of the notice that might be dismissed.
443
  *
@@ -584,7 +579,7 @@ class WPSEO_Admin_Init {
584
  }
585
 
586
  /**
587
- * See if we should start our XML Sitemaps Admin class
588
  */
589
  private function load_xml_sitemaps_admin() {
590
  if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) {
@@ -593,7 +588,7 @@ class WPSEO_Admin_Init {
593
  }
594
 
595
  /**
596
- * Check if the site is set to be publicly visible
597
  *
598
  * @return bool
599
  */
@@ -653,7 +648,7 @@ class WPSEO_Admin_Init {
653
  }
654
 
655
  /**
656
- * Check if the permalink uses %postname%
657
  *
658
  * @return bool
659
  */
25
  private $asset_manager;
26
 
27
  /**
28
+ * Class constructor.
29
  */
30
  public function __construct() {
31
  $GLOBALS['wpseo_admin'] = new WPSEO_Admin();
93
  }
94
 
95
  /**
96
+ * Notify about the default tagline if the user hasn't changed it.
97
  */
98
  public function tagline_notice() {
99
  $query_args = array(
117
  $tagline_notification = new Yoast_Notification( $info_message, $notification_options );
118
 
119
  $notification_center = Yoast_Notification_Center::get();
120
+ $notification_center->remove_notification( $tagline_notification );
 
 
 
 
 
121
  }
122
 
123
  /**
124
+ * Add an alert if the blog is not publicly visible.
125
  */
126
  public function blog_public_notice() {
127
 
152
  }
153
 
154
  /**
155
+ * Display notice to disable comment pagination.
156
  */
157
  public function page_comments_notice() {
158
 
184
  }
185
 
186
  /**
187
+ * Returns whether or not the site has the default tagline.
188
  *
189
  * @return bool
190
  */
200
  }
201
 
202
  /**
203
+ * Show alert when the permalink doesn't contain %postname%.
204
  */
205
  public function permalink_notice() {
206
 
232
  }
233
 
234
  /**
235
+ * Are page comments enabled.
236
  *
237
  * @return bool
238
  */
258
  }
259
 
260
  /**
261
+ * Build compatibility problem notification.
262
  *
263
  * @return Yoast_Notification
264
  */
357
  }
358
 
359
  /**
360
+ * Build Yoast SEO compatibility problem notification.
361
  *
362
  * @param string $name The plugin name to use for the unique ID.
363
  * @param array $plugin The plugin to retrieve the data from.
432
  }
433
 
434
  /**
435
+ * Check if the user has dismissed the given notice (by $notice_name).
436
  *
437
  * @param string $notice_name The name of the notice that might be dismissed.
438
  *
579
  }
580
 
581
  /**
582
+ * See if we should start our XML Sitemaps Admin class.
583
  */
584
  private function load_xml_sitemaps_admin() {
585
  if ( WPSEO_Options::get( 'enable_xml_sitemap', false ) ) {
588
  }
589
 
590
  /**
591
+ * Check if the site is set to be publicly visible.
592
  *
593
  * @return bool
594
  */
648
  }
649
 
650
  /**
651
+ * Check if the permalink uses %postname%.
652
  *
653
  * @return bool
654
  */
admin/class-admin.php CHANGED
@@ -49,16 +49,6 @@ class WPSEO_Admin {
49
  add_filter( 'wpseo_accessible_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) );
50
  }
51
 
52
- $this->admin_features = array(
53
- // Google Search Console.
54
- 'google_search_console' => new WPSEO_GSC(),
55
- 'dashboard_widget' => new Yoast_Dashboard_Widget(),
56
- );
57
-
58
- if ( WPSEO_Metabox::is_post_overview( $pagenow ) || WPSEO_Metabox::is_post_edit( $pagenow ) ) {
59
- $this->admin_features['primary_category'] = new WPSEO_Primary_Term_Admin();
60
- }
61
-
62
  if ( filter_input( INPUT_GET, 'page' ) === 'wpseo_tools' && filter_input( INPUT_GET, 'tool' ) === null ) {
63
  new WPSEO_Recalculate_Scores();
64
  }
@@ -100,6 +90,15 @@ class WPSEO_Admin {
100
  $integrations[] = new Yoast_Network_Admin();
101
  }
102
 
 
 
 
 
 
 
 
 
 
103
  $integrations[] = new WPSEO_Yoast_Columns();
104
  $integrations[] = new WPSEO_License_Page_Manager();
105
  $integrations[] = new WPSEO_Statistic_Integration();
@@ -110,8 +109,13 @@ class WPSEO_Admin {
110
  $integrations[] = new WPSEO_MyYoast_Proxy();
111
  $integrations[] = new WPSEO_MyYoast_Route();
112
  $integrations[] = new WPSEO_Schema_Person_Upgrade_Notification();
113
- $integrations[] = $this->admin_features['google_search_console'];
114
- $integrations = array_merge( $integrations, $this->initialize_seo_links(), $this->initialize_cornerstone_content() );
 
 
 
 
 
115
 
116
  /** @var WPSEO_WordPress_Integration $integration */
117
  foreach ( $integrations as $integration ) {
49
  add_filter( 'wpseo_accessible_post_types', array( 'WPSEO_Post_Type', 'filter_attachment_post_type' ) );
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
52
  if ( filter_input( INPUT_GET, 'page' ) === 'wpseo_tools' && filter_input( INPUT_GET, 'tool' ) === null ) {
53
  new WPSEO_Recalculate_Scores();
54
  }
90
  $integrations[] = new Yoast_Network_Admin();
91
  }
92
 
93
+ $this->admin_features = array(
94
+ 'google_search_console' => new WPSEO_GSC(),
95
+ 'dashboard_widget' => new Yoast_Dashboard_Widget(),
96
+ );
97
+
98
+ if ( WPSEO_Metabox::is_post_overview( $pagenow ) || WPSEO_Metabox::is_post_edit( $pagenow ) ) {
99
+ $this->admin_features['primary_category'] = new WPSEO_Primary_Term_Admin();
100
+ }
101
+
102
  $integrations[] = new WPSEO_Yoast_Columns();
103
  $integrations[] = new WPSEO_License_Page_Manager();
104
  $integrations[] = new WPSEO_Statistic_Integration();
109
  $integrations[] = new WPSEO_MyYoast_Proxy();
110
  $integrations[] = new WPSEO_MyYoast_Route();
111
  $integrations[] = new WPSEO_Schema_Person_Upgrade_Notification();
112
+
113
+ $integrations = array_merge(
114
+ $integrations,
115
+ $this->get_admin_features(),
116
+ $this->initialize_seo_links(),
117
+ $this->initialize_cornerstone_content()
118
+ );
119
 
120
  /** @var WPSEO_WordPress_Integration $integration */
121
  foreach ( $integrations as $integration ) {
admin/class-bulk-description-editor-list-table.php CHANGED
@@ -19,7 +19,7 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
19
  protected $page_type = 'description';
20
 
21
  /**
22
- * Settings with are used in __construct
23
  *
24
  * @var array
25
  */
@@ -37,7 +37,7 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
37
  protected $target_db_field = 'metadesc';
38
 
39
  /**
40
- * The columns shown on the table
41
  *
42
  * @return array
43
  */
@@ -51,7 +51,7 @@ class WPSEO_Bulk_Description_List_Table extends WPSEO_Bulk_List_Table {
51
  }
52
 
53
  /**
54
- * Parse the metadescription
55
  *
56
  * @param string $column_name Column name.
57
  * @param object $record Data object.
19
  protected $page_type = 'description';
20
 
21
  /**
22
+ * Settings with are used in __construct.
23
  *
24
  * @var array
25
  */
37
  protected $target_db_field = 'metadesc';
38
 
39
  /**
40
+ * The columns shown on the table.
41
  *
42
  * @return array
43
  */
51
  }
52
 
53
  /**
54
+ * Parse the metadescription.
55
  *
56
  * @param string $column_name Column name.
57
  * @param object $record Data object.
admin/class-bulk-editor-list-table.php CHANGED
@@ -12,7 +12,7 @@
12
  class WPSEO_Bulk_List_Table extends WP_List_Table {
13
 
14
  /**
15
- * The nonce that was passed with the request
16
  *
17
  * @var string
18
  */
@@ -40,35 +40,35 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
40
  protected $meta_data = array();
41
 
42
  /**
43
- * The current requested page_url
44
  *
45
  * @var string
46
  */
47
  private $request_url = '';
48
 
49
  /**
50
- * The current page (depending on $_GET['paged']) if current tab is for current page_type, else it will be 1
51
  *
52
  * @var integer
53
  */
54
  private $current_page;
55
 
56
  /**
57
- * The current post filter, if is used (depending on $_GET['post_type_filter'])
58
  *
59
  * @var string
60
  */
61
  private $current_filter;
62
 
63
  /**
64
- * The current post status, if is used (depending on $_GET['post_status'])
65
  *
66
  * @var string
67
  */
68
  private $current_status;
69
 
70
  /**
71
- * The current sorting, if used (depending on $_GET['order'] and $_GET['orderby'])
72
  *
73
  * @var string
74
  */
@@ -83,7 +83,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
83
 
84
  /**
85
  * Based on the page_type ($this->page_type) there will be constructed an url part, for subpages and
86
- * navigation
87
  *
88
  * @var string
89
  */
@@ -109,7 +109,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
109
  protected $input_fields = array();
110
 
111
  /**
112
- * Class constructor
113
  *
114
  * @param array $args The arguments.
115
  */
@@ -186,7 +186,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
186
  }
187
 
188
  /**
189
- * Will shown the navigation for the table like pagenavigation and pagefilter;
190
  *
191
  * @param string $which Table nav location (such as top).
192
  */
@@ -232,7 +232,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
232
  * This function takes into account the post types in which the current user can
233
  * edit all posts, and the ones the current user can only edit his/her own.
234
  *
235
- * @return string $subquery The subquery, which should always be used in $wpdb->prepare(), passing the current user_id in as the first parameter.
 
236
  */
237
  public function get_base_subquery() {
238
  global $wpdb;
@@ -428,7 +429,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
428
  }
429
 
430
  /**
431
- * Sets the correct pagenumber and pageurl for the navigation
432
  */
433
  public function prepare_page_navigation() {
434
 
@@ -472,7 +473,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
472
  }
473
 
474
  /**
475
- * Preparing the requested pagerows and setting the needed variables
476
  */
477
  public function prepare_items() {
478
 
@@ -496,7 +497,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
496
  }
497
 
498
  /**
499
- * Getting the columns for first row
500
  *
501
  * @return array
502
  */
@@ -505,7 +506,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
505
  }
506
 
507
  /**
508
- * Setting the column headers
509
  */
510
  protected function set_column_headers() {
511
  $columns = $this->get_columns();
@@ -515,7 +516,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
515
  }
516
 
517
  /**
518
- * Counting total items
519
  *
520
  * @param string $subquery SQL FROM part.
521
  * @param string $all_states SQL IN part.
@@ -537,7 +538,7 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
537
  }
538
 
539
  /**
540
- * Getting the post_type_clause filter
541
  *
542
  * @return string
543
  */
@@ -623,7 +624,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
623
  }
624
 
625
  /**
626
- * Heavily restricts the possible columns by which a user can order the table in the bulk editor, thereby preventing a possible CSRF vulnerability.
 
627
  *
628
  * @param string $orderby The column by which we want to order.
629
  *
@@ -644,7 +646,8 @@ class WPSEO_Bulk_List_Table extends WP_List_Table {
644
  }
645
 
646
  /**
647
- * Makes sure the order clause is always ASC or DESC for the bulk editor table, thereby preventing a possible CSRF vulnerability.
 
648
  *
649
  * @param string $order Whether we want to sort ascending or descending.
650
  *
12
  class WPSEO_Bulk_List_Table extends WP_List_Table {
13
 
14
  /**
15
+ * The nonce that was passed with the request.
16
  *
17
  * @var string
18
  */
40
  protected $meta_data = array();
41
 
42
  /**
43
+ * The current requested page_url.
44
  *
45
  * @var string
46
  */
47
  private $request_url = '';
48
 
49
  /**
50
+ * The current page (depending on $_GET['paged']) if current tab is for current page_type, else it will be 1.
51
  *
52
  * @var integer
53
  */
54
  private $current_page;
55
 
56
  /**
57
+ * The current post filter, if is used (depending on $_GET['post_type_filter']).
58
  *
59
  * @var string
60
  */
61
  private $current_filter;
62
 
63
  /**
64
+ * The current post status, if is used (depending on $_GET['post_status']).
65
  *
66
  * @var string
67
  */
68
  private $current_status;
69
 
70
  /**
71
+ * The current sorting, if used (depending on $_GET['order'] and $_GET['orderby']).
72
  *
73
  * @var string
74
  */
83
 
84
  /**
85
  * Based on the page_type ($this->page_type) there will be constructed an url part, for subpages and
86
+ * navigation.
87
  *
88
  * @var string
89
  */
109
  protected $input_fields = array();
110
 
111
  /**
112
+ * Class constructor.
113
  *
114
  * @param array $args The arguments.
115
  */
186
  }
187
 
188
  /**
189
+ * Will shown the navigation for the table like pagenavigation and pagefilter.
190
  *
191
  * @param string $which Table nav location (such as top).
192
  */
232
  * This function takes into account the post types in which the current user can
233
  * edit all posts, and the ones the current user can only edit his/her own.
234
  *
235
+ * @return string The subquery, which should always be used in $wpdb->prepare(),
236
+ * passing the current user_id in as the first parameter.
237
  */
238
  public function get_base_subquery() {
239
  global $wpdb;
429
  }
430
 
431
  /**
432
+ * Sets the correct pagenumber and pageurl for the navigation.
433
  */
434
  public function prepare_page_navigation() {
435
 
473
  }
474
 
475
  /**
476
+ * Preparing the requested pagerows and setting the needed variables.
477
  */
478
  public function prepare_items() {
479
 
497
  }
498
 
499
  /**
500
+ * Getting the columns for first row.
501
  *
502
  * @return array
503
  */
506
  }
507
 
508
  /**
509
+ * Setting the column headers.
510
  */
511
  protected function set_column_headers() {
512
  $columns = $this->get_columns();
516
  }
517
 
518
  /**
519
+ * Counting total items.
520
  *
521
  * @param string $subquery SQL FROM part.
522
  * @param string $all_states SQL IN part.
538
  }
539
 
540
  /**
541
+ * Getting the post_type_clause filter.
542
  *
543
  * @return string
544
  */
624
  }
625
 
626
  /**
627
+ * Heavily restricts the possible columns by which a user can order the table
628
+ * in the bulk editor, thereby preventing a possible CSRF vulnerability.
629
  *
630
  * @param string $orderby The column by which we want to order.
631
  *
646
  }
647
 
648
  /**
649
+ * Makes sure the order clause is always ASC or DESC for the bulk editor table,
650
+ * thereby preventing a possible CSRF vulnerability.
651
  *
652
  * @param string $order Whether we want to sort ascending or descending.
653
  *
admin/class-bulk-title-editor-list-table.php CHANGED
@@ -12,7 +12,7 @@
12
  class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
13
 
14
  /**
15
- * Current type for this class will be title
16
  *
17
  * @var string
18
  */
@@ -20,7 +20,7 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
20
 
21
 
22
  /**
23
- * Settings with are used in __construct
24
  *
25
  * @var array
26
  */
@@ -38,7 +38,7 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
38
  protected $target_db_field = 'title';
39
 
40
  /**
41
- * The columns shown on the table
42
  *
43
  * @return array
44
  */
@@ -55,7 +55,7 @@ class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
55
  }
56
 
57
  /**
58
- * Parse the title columns
59
  *
60
  * @param string $column_name Column name.
61
  * @param object $record Data object.
12
  class WPSEO_Bulk_Title_Editor_List_Table extends WPSEO_Bulk_List_Table {
13
 
14
  /**
15
+ * Current type for this class will be title.
16
  *
17
  * @var string
18
  */
20
 
21
 
22
  /**
23
+ * Settings with are used in __construct.
24
  *
25
  * @var array
26
  */
38
  protected $target_db_field = 'title';
39
 
40
  /**
41
+ * The columns shown on the table.
42
  *
43
  * @return array
44
  */
55
  }
56
 
57
  /**
58
+ * Parse the title columns.
59
  *
60
  * @param string $column_name Column name.
61
  * @param object $record Data object.
admin/class-config.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Admin_Pages
10
  *
11
  * Class with functionality for the Yoast SEO admin pages.
12
  */
@@ -27,7 +27,7 @@ class WPSEO_Admin_Pages {
27
  private $asset_manager;
28
 
29
  /**
30
- * Class constructor, which basically only hooks the init function on the init hook
31
  */
32
  public function __construct() {
33
  add_action( 'init', array( $this, 'init' ), 20 );
@@ -35,7 +35,7 @@ class WPSEO_Admin_Pages {
35
  }
36
 
37
  /**
38
- * Make sure the needed scripts are loaded for admin pages
39
  */
40
  public function init() {
41
  if ( filter_input( INPUT_GET, 'wpseo_reset_defaults' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo_reset_defaults' ) && current_user_can( 'manage_options' ) ) {
@@ -71,10 +71,7 @@ class WPSEO_Admin_Pages {
71
 
72
  if ( $page === 'wpseo_titles' ) {
73
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'search-appearance', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );
74
- wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'search-appearance', 'wpseoSearchAppearance', array(
75
- 'isRtl' => is_rtl(),
76
- 'userEditUrl' => add_query_arg( 'user_id', '{user_id}', admin_url( 'user-edit.php' ) ),
77
- ) );
78
  $this->asset_manager->enqueue_script( 'search-appearance' );
79
  $this->asset_manager->enqueue_style( 'search-appearance' );
80
  /**
@@ -134,6 +131,37 @@ class WPSEO_Admin_Pages {
134
  );
135
  }
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  /**
138
  * Enqueues and handles all the tool dependencies.
139
  */
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Admin_Pages.
10
  *
11
  * Class with functionality for the Yoast SEO admin pages.
12
  */
27
  private $asset_manager;
28
 
29
  /**
30
+ * Class constructor, which basically only hooks the init function on the init hook.
31
  */
32
  public function __construct() {
33
  add_action( 'init', array( $this, 'init' ), 20 );
35
  }
36
 
37
  /**
38
+ * Make sure the needed scripts are loaded for admin pages.
39
  */
40
  public function init() {
41
  if ( filter_input( INPUT_GET, 'wpseo_reset_defaults' ) && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), 'wpseo_reset_defaults' ) && current_user_can( 'manage_options' ) ) {
71
 
72
  if ( $page === 'wpseo_titles' ) {
73
  wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'search-appearance', 'wpseoReplaceVarsL10n', $this->localize_replace_vars_script() );
74
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'search-appearance', 'wpseoSearchAppearance', $this->localize_search_appearance_script() );
 
 
 
75
  $this->asset_manager->enqueue_script( 'search-appearance' );
76
  $this->asset_manager->enqueue_style( 'search-appearance' );
77
  /**
131
  );
132
  }
133
 
134
+ /**
135
+ * Retrieves some variables that are needed for the search appearance in JS.
136
+ *
137
+ * @return array The search appearance variables.
138
+ */
139
+ public function localize_search_appearance_script() {
140
+ return array(
141
+ 'isRtl' => is_rtl(),
142
+ 'userEditUrl' => add_query_arg( 'user_id', '{user_id}', admin_url( 'user-edit.php' ) ),
143
+ 'brushstrokeBackgroundURL' => plugins_url( 'images/brushstroke_background.svg', WPSEO_FILE ),
144
+ 'showLocalSEOUpsell' => $this->should_show_local_seo_upsell(),
145
+ 'localSEOUpsellURL' => WPSEO_Shortlinker::get( 'https://yoa.st/3mp' ),
146
+ );
147
+ }
148
+
149
+ /**
150
+ * Determines whether the Local SEO upsell should be shown.
151
+ *
152
+ * The Local SEO upsell should:
153
+ * - Only be shown in Free, not when Premium is active.
154
+ * - Not be shown when Local SEO is active.
155
+ *
156
+ * @return bool Whether the Local SEO upsell should be shown.
157
+ */
158
+ private function should_show_local_seo_upsell() {
159
+ $addon_manager = new WPSEO_Addon_Manager();
160
+
161
+ return ! WPSEO_Utils::is_yoast_seo_premium() &&
162
+ ! $addon_manager->has_valid_subscription( WPSEO_Addon_Manager::LOCAL_SLUG );
163
+ }
164
+
165
  /**
166
  * Enqueues and handles all the tool dependencies.
167
  */
admin/class-customizer.php CHANGED
@@ -54,7 +54,7 @@ class WPSEO_Customizer {
54
  }
55
 
56
  /**
57
- * Function to support WordPress Customizer
58
  *
59
  * @param WP_Customize_Manager $wp_customize Manager class instance.
60
  */
@@ -76,7 +76,7 @@ class WPSEO_Customizer {
76
  }
77
 
78
  /**
79
- * Add the breadcrumbs section to the customizer
80
  */
81
  private function breadcrumbs_section() {
82
  $section_args = array(
@@ -90,7 +90,7 @@ class WPSEO_Customizer {
90
  }
91
 
92
  /**
93
- * Returns whether or not the breadcrumbs are active
94
  *
95
  * @return bool
96
  */
@@ -99,7 +99,7 @@ class WPSEO_Customizer {
99
  }
100
 
101
  /**
102
- * Adds the breadcrumbs remove blog checkbox
103
  */
104
  private function breadcrumbs_blog_remove_setting() {
105
  $index = 'breadcrumbs-display-blog-page';
@@ -113,7 +113,7 @@ class WPSEO_Customizer {
113
  }
114
 
115
  /**
116
- * Returns whether or not to show the breadcrumbs blog remove option
117
  *
118
  * @return bool
119
  */
@@ -122,7 +122,7 @@ class WPSEO_Customizer {
122
  }
123
 
124
  /**
125
- * Adds the breadcrumbs separator text field
126
  */
127
  private function breadcrumbs_separator_setting() {
128
  $index = 'breadcrumbs-sep';
@@ -135,7 +135,7 @@ class WPSEO_Customizer {
135
  }
136
 
137
  /**
138
- * Adds the breadcrumbs home anchor text field
139
  */
140
  private function breadcrumbs_home_setting() {
141
  $index = 'breadcrumbs-home';
@@ -147,7 +147,7 @@ class WPSEO_Customizer {
147
  }
148
 
149
  /**
150
- * Adds the breadcrumbs prefix text field
151
  */
152
  private function breadcrumbs_prefix_setting() {
153
  $index = 'breadcrumbs-prefix';
@@ -159,7 +159,7 @@ class WPSEO_Customizer {
159
  }
160
 
161
  /**
162
- * Adds the breadcrumbs archive prefix text field
163
  */
164
  private function breadcrumbs_archiveprefix_setting() {
165
  $index = 'breadcrumbs-archiveprefix';
@@ -171,7 +171,7 @@ class WPSEO_Customizer {
171
  }
172
 
173
  /**
174
- * Adds the breadcrumbs search prefix text field
175
  */
176
  private function breadcrumbs_searchprefix_setting() {
177
  $index = 'breadcrumbs-searchprefix';
@@ -183,7 +183,7 @@ class WPSEO_Customizer {
183
  }
184
 
185
  /**
186
- * Adds the breadcrumb 404 prefix text field
187
  */
188
  private function breadcrumbs_404_setting() {
189
  $index = 'breadcrumbs-404crumb';
54
  }
55
 
56
  /**
57
+ * Function to support WordPress Customizer.
58
  *
59
  * @param WP_Customize_Manager $wp_customize Manager class instance.
60
  */
76
  }
77
 
78
  /**
79
+ * Add the breadcrumbs section to the customizer.
80
  */
81
  private function breadcrumbs_section() {
82
  $section_args = array(
90
  }
91
 
92
  /**
93
+ * Returns whether or not the breadcrumbs are active.
94
  *
95
  * @return bool
96
  */
99
  }
100
 
101
  /**
102
+ * Adds the breadcrumbs remove blog checkbox.
103
  */
104
  private function breadcrumbs_blog_remove_setting() {
105
  $index = 'breadcrumbs-display-blog-page';
113
  }
114
 
115
  /**
116
+ * Returns whether or not to show the breadcrumbs blog remove option.
117
  *
118
  * @return bool
119
  */
122
  }
123
 
124
  /**
125
+ * Adds the breadcrumbs separator text field.
126
  */
127
  private function breadcrumbs_separator_setting() {
128
  $index = 'breadcrumbs-sep';
135
  }
136
 
137
  /**
138
+ * Adds the breadcrumbs home anchor text field.
139
  */
140
  private function breadcrumbs_home_setting() {
141
  $index = 'breadcrumbs-home';
147
  }
148
 
149
  /**
150
+ * Adds the breadcrumbs prefix text field.
151
  */
152
  private function breadcrumbs_prefix_setting() {
153
  $index = 'breadcrumbs-prefix';
159
  }
160
 
161
  /**
162
+ * Adds the breadcrumbs archive prefix text field.
163
  */
164
  private function breadcrumbs_archiveprefix_setting() {
165
  $index = 'breadcrumbs-archiveprefix';
171
  }
172
 
173
  /**
174
+ * Adds the breadcrumbs search prefix text field.
175
  */
176
  private function breadcrumbs_searchprefix_setting() {
177
  $index = 'breadcrumbs-searchprefix';
183
  }
184
 
185
  /**
186
+ * Adds the breadcrumb 404 prefix text field.
187
  */
188
  private function breadcrumbs_404_setting() {
189
  $index = 'breadcrumbs-404crumb';
admin/class-database-proxy.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Represents the proxy for communicating with the database
10
  */
11
  class WPSEO_Database_Proxy {
12
 
6
  */
7
 
8
  /**
9
+ * Represents the proxy for communicating with the database.
10
  */
11
  class WPSEO_Database_Proxy {
12
 
admin/class-export.php CHANGED
@@ -6,9 +6,9 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Export
10
  *
11
- * Class with functionality to export the WP SEO settings
12
  */
13
  class WPSEO_Export {
14
 
@@ -113,7 +113,7 @@ class WPSEO_Export {
113
  }
114
 
115
  /**
116
- * Writes a line to the export
117
  *
118
  * @param string $line Line string.
119
  * @param boolean $newline_first Boolean flag whether to prepend with new line.
@@ -126,7 +126,7 @@ class WPSEO_Export {
126
  }
127
 
128
  /**
129
- * Writes an entire option group to the export
130
  *
131
  * @param string $opt_group Option group name.
132
  */
@@ -154,7 +154,7 @@ class WPSEO_Export {
154
  }
155
 
156
  /**
157
- * Writes a settings line to the export
158
  *
159
  * @param string $key Key string.
160
  * @param string $val Value string.
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Export.
10
  *
11
+ * Class with functionality to export the WP SEO settings.
12
  */
13
  class WPSEO_Export {
14
 
113
  }
114
 
115
  /**
116
+ * Writes a line to the export.
117
  *
118
  * @param string $line Line string.
119
  * @param boolean $newline_first Boolean flag whether to prepend with new line.
126
  }
127
 
128
  /**
129
+ * Writes an entire option group to the export.
130
  *
131
  * @param string $opt_group Option group name.
132
  */
154
  }
155
 
156
  /**
157
+ * Writes a settings line to the export.
158
  *
159
  * @param string $key Key string.
160
  * @param string $val Value string.
admin/class-extensions.php CHANGED
@@ -17,34 +17,34 @@ class WPSEO_Extensions {
17
  */
18
  protected $extensions = array(
19
  'Yoast SEO Premium' => array(
20
- 'slug' => 'yoast-seo-premium',
21
- 'identifier' => 'wordpress-seo-premium',
22
- 'classname' => 'WPSEO_Premium',
23
- 'my-yoast-slug' => WPSEO_Addon_Manager::PREMIUM_SLUG,
24
  ),
25
  'News SEO' => array(
26
- 'slug' => 'news-seo',
27
- 'identifier' => 'wpseo-news',
28
- 'classname' => 'WPSEO_News',
29
- 'my-yoast-slug' => WPSEO_Addon_Manager::NEWS_SLUG,
30
  ),
31
  'Yoast WooCommerce SEO' => array(
32
- 'slug' => 'woocommerce-yoast-seo',
33
- 'identifier' => 'wpseo-woocommerce',
34
- 'classname' => 'Yoast_WooCommerce_SEO',
35
- 'my-yoast-slug' => WPSEO_Addon_Manager::WOOCOMMERCE_SLUG,
36
  ),
37
  'Video SEO' => array(
38
- 'slug' => 'video-seo-for-wordpress',
39
- 'identifier' => 'wpseo-video',
40
- 'classname' => 'WPSEO_Video_Sitemap',
41
- 'my-yoast-slug' => WPSEO_Addon_Manager::VIDEO_SLUG,
42
  ),
43
  'Local SEO' => array(
44
- 'slug' => 'local-seo-for-wordpress',
45
- 'identifier' => 'wpseo-local',
46
- 'classname' => 'WPSEO_Local_Core',
47
- 'my-yoast-slug' => WPSEO_Addon_Manager::LOCAL_SLUG,
48
  ),
49
  );
50
 
17
  */
18
  protected $extensions = array(
19
  'Yoast SEO Premium' => array(
20
+ 'slug' => 'yoast-seo-premium',
21
+ 'identifier' => 'wordpress-seo-premium',
22
+ 'classname' => 'WPSEO_Premium',
23
+ 'my-yoast-slug' => WPSEO_Addon_Manager::PREMIUM_SLUG,
24
  ),
25
  'News SEO' => array(
26
+ 'slug' => 'news-seo',
27
+ 'identifier' => 'wpseo-news',
28
+ 'classname' => 'WPSEO_News',
29
+ 'my-yoast-slug' => WPSEO_Addon_Manager::NEWS_SLUG,
30
  ),
31
  'Yoast WooCommerce SEO' => array(
32
+ 'slug' => 'woocommerce-yoast-seo',
33
+ 'identifier' => 'wpseo-woocommerce',
34
+ 'classname' => 'Yoast_WooCommerce_SEO',
35
+ 'my-yoast-slug' => WPSEO_Addon_Manager::WOOCOMMERCE_SLUG,
36
  ),
37
  'Video SEO' => array(
38
+ 'slug' => 'video-seo-for-wordpress',
39
+ 'identifier' => 'wpseo-video',
40
+ 'classname' => 'WPSEO_Video_Sitemap',
41
+ 'my-yoast-slug' => WPSEO_Addon_Manager::VIDEO_SLUG,
42
  ),
43
  'Local SEO' => array(
44
+ 'slug' => 'local-seo-for-wordpress',
45
+ 'identifier' => 'wpseo-local',
46
+ 'classname' => 'WPSEO_Local_Core',
47
+ 'my-yoast-slug' => WPSEO_Addon_Manager::LOCAL_SLUG,
48
  ),
49
  );
50
 
admin/class-gutenberg-compatibility.php CHANGED
@@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
15
  *
16
  * @var string
17
  */
18
- const CURRENT_RELEASE = '5.4.0';
19
 
20
  /**
21
  * The minimally supported version of Gutenberg by the plugin.
22
  *
23
  * @var string
24
  */
25
- const MINIMUM_SUPPORTED = '5.4.0';
26
 
27
  /**
28
  * @var string
15
  *
16
  * @var string
17
  */
18
+ const CURRENT_RELEASE = '5.5.0';
19
 
20
  /**
21
  * The minimally supported version of Gutenberg by the plugin.
22
  *
23
  * @var string
24
  */
25
+ const MINIMUM_SUPPORTED = '5.5.0';
26
 
27
  /**
28
  * @var string
admin/class-help-center-item.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Help_Center_Item
10
  */
11
  class WPSEO_Help_Center_Item {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Help_Center_Item.
10
  */
11
  class WPSEO_Help_Center_Item {
12
 
admin/class-help-center.php CHANGED
@@ -238,7 +238,7 @@ class WPSEO_Help_Center {
238
  *
239
  * %s is replaced with <code>%s</code> and replaced again in the javascript with the actual variable.
240
  *
241
- * @return array Translated text strings for the help center.
242
  */
243
  public static function get_translated_texts() {
244
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
238
  *
239
  * %s is replaced with <code>%s</code> and replaced again in the javascript with the actual variable.
240
  *
241
+ * @return array Translated text strings for the help center.
242
  */
243
  public static function get_translated_texts() {
244
  // Esc_html is not needed because React already handles HTML in the (translations of) these strings.
admin/class-keyword-synonyms-modal.php CHANGED
@@ -36,7 +36,7 @@ class WPSEO_Keyword_Synonyms_Modal {
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
- 'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
+ 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
admin/class-license-page-manager.php CHANGED
@@ -187,7 +187,7 @@ class WPSEO_License_Page_Manager implements WPSEO_WordPress_Integration {
187
  }
188
 
189
  /**
190
- * Creates an instance of Yoast_Notification
191
  *
192
  * @param string $product_name The product to create the notification for.
193
  *
187
  }
188
 
189
  /**
190
+ * Creates an instance of Yoast_Notification.
191
  *
192
  * @param string $product_name The product to create the notification for.
193
  *
admin/class-meta-columns.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Meta_Columns
10
  */
11
  class WPSEO_Meta_Columns {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Meta_Columns.
10
  */
11
  class WPSEO_Meta_Columns {
12
 
admin/class-meta-storage.php CHANGED
@@ -89,7 +89,7 @@ class WPSEO_Meta_Storage implements WPSEO_Installable {
89
  }
90
 
91
  /**
92
- * Updates the incoming link count
93
  *
94
  * @param array $post_ids The posts to update the incoming link count for.
95
  * @param WPSEO_Link_Storage $storage The link storage object.
89
  }
90
 
91
  /**
92
+ * Updates the incoming link count.
93
  *
94
  * @param array $post_ids The posts to update the incoming link count for.
95
  * @param WPSEO_Link_Storage $storage The link storage object.
admin/class-multiple-keywords-modal.php CHANGED
@@ -36,7 +36,7 @@ class WPSEO_Multiple_Keywords_Modal {
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
- 'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
36
  __( 'Get %s', 'wordpress-seo' ),
37
  'Yoast SEO Premium'
38
  ),
39
+ 'small' => __( '1 year free support and updates included!', 'wordpress-seo' ),
40
  'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
41
  );
42
  }
admin/class-my-yoast-proxy.php CHANGED
@@ -144,7 +144,7 @@ class WPSEO_MyYoast_Proxy implements WPSEO_WordPress_Integration {
144
  /**
145
  * Tries to load the given url.
146
  *
147
- * @see https://php.net/manual/en/function.readfile.php
148
  *
149
  * @codeCoverageIgnore
150
  *
@@ -185,7 +185,7 @@ class WPSEO_MyYoast_Proxy implements WPSEO_WordPress_Integration {
185
  *
186
  * @codeCoverageIgnore
187
  *
188
- * @see https://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
189
  *
190
  * @return bool True when the PHP configuration allows for url loading via readfile.
191
  */
144
  /**
145
  * Tries to load the given url.
146
  *
147
+ * @link https://php.net/manual/en/function.readfile.php
148
  *
149
  * @codeCoverageIgnore
150
  *
185
  *
186
  * @codeCoverageIgnore
187
  *
188
+ * @link https://php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
189
  *
190
  * @return bool True when the PHP configuration allows for url loading via readfile.
191
  */
admin/class-option-tab.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Option_Tab
10
  */
11
  class WPSEO_Option_Tab {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Option_Tab.
10
  */
11
  class WPSEO_Option_Tab {
12
 
admin/class-option-tabs-formatter.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Option_Tabs_Formatter
10
  */
11
  class WPSEO_Option_Tabs_Formatter {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Option_Tabs_Formatter.
10
  */
11
  class WPSEO_Option_Tabs_Formatter {
12
 
admin/class-option-tabs.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Option_Tabs
10
  */
11
  class WPSEO_Option_Tabs {
12
 
@@ -47,7 +47,7 @@ class WPSEO_Option_Tabs {
47
  }
48
 
49
  /**
50
- * Get the base
51
  *
52
  * @return string
53
  */
@@ -56,7 +56,7 @@ class WPSEO_Option_Tabs {
56
  }
57
 
58
  /**
59
- * Add a tab
60
  *
61
  * @param WPSEO_Option_Tab $tab Tab to add.
62
  *
@@ -69,7 +69,7 @@ class WPSEO_Option_Tabs {
69
  }
70
 
71
  /**
72
- * Get active tab
73
  *
74
  * @return null|WPSEO_Option_Tab Get the active tab.
75
  */
@@ -90,7 +90,7 @@ class WPSEO_Option_Tabs {
90
  }
91
 
92
  /**
93
- * Is the tab the active tab
94
  *
95
  * @param WPSEO_Option_Tab $tab Tab to check for active tab.
96
  *
@@ -101,7 +101,7 @@ class WPSEO_Option_Tabs {
101
  }
102
 
103
  /**
104
- * Get all tabs
105
  *
106
  * @return WPSEO_Option_Tab[]
107
  */
@@ -110,7 +110,7 @@ class WPSEO_Option_Tabs {
110
  }
111
 
112
  /**
113
- * Display the tabs
114
  *
115
  * @param Yoast_Form $yform Yoast Form needed in the views.
116
  */
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Option_Tabs.
10
  */
11
  class WPSEO_Option_Tabs {
12
 
47
  }
48
 
49
  /**
50
+ * Get the base.
51
  *
52
  * @return string
53
  */
56
  }
57
 
58
  /**
59
+ * Add a tab.
60
  *
61
  * @param WPSEO_Option_Tab $tab Tab to add.
62
  *
69
  }
70
 
71
  /**
72
+ * Get active tab.
73
  *
74
  * @return null|WPSEO_Option_Tab Get the active tab.
75
  */
90
  }
91
 
92
  /**
93
+ * Is the tab the active tab.
94
  *
95
  * @param WPSEO_Option_Tab $tab Tab to check for active tab.
96
  *
101
  }
102
 
103
  /**
104
+ * Get all tabs.
105
  *
106
  * @return WPSEO_Option_Tab[]
107
  */
110
  }
111
 
112
  /**
113
+ * Display the tabs.
114
  *
115
  * @param Yoast_Form $yform Yoast Form needed in the views.
116
  */
admin/class-paper-presenter.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_presenter_paper
10
  */
11
  class WPSEO_Paper_Presenter {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_presenter_paper.
10
  */
11
  class WPSEO_Paper_Presenter {
12
 
admin/class-plugin-compatibility.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Plugin_Compatibility
10
  */
11
  class WPSEO_Plugin_Compatibility {
12
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Plugin_Compatibility.
10
  */
11
  class WPSEO_Plugin_Compatibility {
12
 
admin/class-plugin-conflict.php CHANGED
@@ -106,7 +106,7 @@ class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
106
  );
107
 
108
  /**
109
- * Overrides instance to set with this class as class
110
  *
111
  * @param string $class_name Optional class name.
112
  *
106
  );
107
 
108
  /**
109
+ * Overrides instance to set with this class as class.
110
  *
111
  * @param string $class_name Optional class name.
112
  *
admin/class-premium-popup.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Premium_popup
10
  */
11
  class WPSEO_Premium_Popup {
12
 
@@ -25,14 +25,14 @@ class WPSEO_Premium_Popup {
25
  private $heading_level = '';
26
 
27
  /**
28
- * The title of the popup
29
  *
30
  * @var String
31
  */
32
  private $title = '';
33
 
34
  /**
35
- * The content of the popup
36
  *
37
  * @var String
38
  */
@@ -85,7 +85,7 @@ class WPSEO_Premium_Popup {
85
  if ( $popup ) {
86
  $classes = ' hidden';
87
  }
88
- $micro_copy = __( '1 year free updates and upgrades included!', 'wordpress-seo' );
89
 
90
  $popup = <<<EO_POPUP
91
  <div id="wpseo-{$this->identifier}-popup" class="wpseo-premium-popup wp-clearfix$classes">
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Premium_popup.
10
  */
11
  class WPSEO_Premium_Popup {
12
 
25
  private $heading_level = '';
26
 
27
  /**
28
+ * The title of the popup.
29
  *
30
  * @var String
31
  */
32
  private $title = '';
33
 
34
  /**
35
+ * The content of the popup.
36
  *
37
  * @var String
38
  */
85
  if ( $popup ) {
86
  $classes = ' hidden';
87
  }
88
+ $micro_copy = __( '1 year free support and updates included!', 'wordpress-seo' );
89
 
90
  $popup = <<<EO_POPUP
91
  <div id="wpseo-{$this->identifier}-popup" class="wpseo-premium-popup wp-clearfix$classes">
admin/class-primary-term-admin.php CHANGED
@@ -8,12 +8,12 @@
8
  /**
9
  * Adds the UI to change the primary term for a post.
10
  */
11
- class WPSEO_Primary_Term_Admin {
12
 
13
  /**
14
  * Constructor.
15
  */
16
- public function __construct() {
17
  add_filter( 'wpseo_content_meta_section_content', array( $this, 'add_input_fields' ) );
18
 
19
  add_action( 'admin_footer', array( $this, 'wp_footer' ), 10 );
@@ -107,7 +107,7 @@ class WPSEO_Primary_Term_Admin {
107
  }
108
 
109
  /**
110
- * Enqueues all the assets needed for the primary term interface
111
  *
112
  * @return void
113
  */
@@ -138,7 +138,7 @@ class WPSEO_Primary_Term_Admin {
138
  }
139
 
140
  /**
141
- * Saves all selected primary terms
142
  *
143
  * @param int $post_id Post ID to save primary terms for.
144
  */
@@ -156,7 +156,7 @@ class WPSEO_Primary_Term_Admin {
156
  }
157
 
158
  /**
159
- * Gets the id of the primary term
160
  *
161
  * @param string $taxonomy_name Taxonomy name for the term.
162
  *
@@ -169,7 +169,7 @@ class WPSEO_Primary_Term_Admin {
169
  }
170
 
171
  /**
172
- * Returns all the taxonomies for which the primary term selection is enabled
173
  *
174
  * @param int $post_id Default current post ID.
175
  * @return array
8
  /**
9
  * Adds the UI to change the primary term for a post.
10
  */
11
+ class WPSEO_Primary_Term_Admin implements WPSEO_WordPress_Integration {
12
 
13
  /**
14
  * Constructor.
15
  */
16
+ public function register_hooks() {
17
  add_filter( 'wpseo_content_meta_section_content', array( $this, 'add_input_fields' ) );
18
 
19
  add_action( 'admin_footer', array( $this, 'wp_footer' ), 10 );
107
  }
108
 
109
  /**
110
+ * Enqueues all the assets needed for the primary term interface.
111
  *
112
  * @return void
113
  */
138
  }
139
 
140
  /**
141
+ * Saves all selected primary terms.
142
  *
143
  * @param int $post_id Post ID to save primary terms for.
144
  */
156
  }
157
 
158
  /**
159
+ * Gets the id of the primary term.
160
  *
161
  * @param string $taxonomy_name Taxonomy name for the term.
162
  *
169
  }
170
 
171
  /**
172
+ * Returns all the taxonomies for which the primary term selection is enabled.
173
  *
174
  * @param int $post_id Default current post ID.
175
  * @return array
admin/class-product-upsell-notice.php CHANGED
@@ -36,15 +36,7 @@ class WPSEO_Product_Upsell_Notice {
36
  * Checks if the notice should be added or removed.
37
  */
38
  public function initialize() {
39
- if ( $this->is_notice_dismissed() ) {
40
- $this->remove_notification();
41
-
42
- return;
43
- }
44
-
45
- if ( $this->should_add_notification() ) {
46
- $this->add_notification();
47
- }
48
  }
49
 
50
  /**
@@ -194,7 +186,7 @@ class WPSEO_Product_Upsell_Notice {
194
  }
195
 
196
  /**
197
- * Returns the set options
198
  *
199
  * @return mixed|void
200
  */
36
  * Checks if the notice should be added or removed.
37
  */
38
  public function initialize() {
39
+ $this->remove_notification();
 
 
 
 
 
 
 
 
40
  }
41
 
42
  /**
186
  }
187
 
188
  /**
189
+ * Returns the set options.
190
  *
191
  * @return mixed|void
192
  */
admin/class-recalculate-scores.php CHANGED
@@ -6,9 +6,9 @@
6
  */
7
 
8
  /**
9
- * Class WPSEO_Recalculate_Scores
10
  *
11
- * This class handles the SEO score recalculation for all posts with a filled focus keyword
12
  */
13
  class WPSEO_Recalculate_Scores {
14
 
6
  */
7
 
8
  /**
9
+ * Class WPSEO_Recalculate_Scores.
10
  *
11
+ * This class handles the SEO score recalculation for all posts with a filled focus keyword.
12
  */
13
  class WPSEO_Recalculate_Scores {
14
 
admin/class-social-admin.php CHANGED
@@ -194,7 +194,7 @@ class WPSEO_Social_Admin extends WPSEO_Metabox {
194
  *
195
  * @param array $field_defs Array of metaboxes to save.
196
  *
197
- * @return array
198
  */
199
  public function save_meta_boxes( $field_defs ) {
200
  if ( ! isset( $_POST['yoast_free_metabox_social_nonce'] ) || ! wp_verify_nonce( $_POST['yoast_free_metabox_social_nonce'], 'yoast_free_metabox_social' ) ) {
194
  *
195
  * @param array $field_defs Array of metaboxes to save.
196
  *
197
+ * @return array
198
  */
199
  public function save_meta_boxes( $field_defs ) {
200
  if ( ! isset( $_POST['yoast_free_metabox_social_nonce'] ) || ! wp_verify_nonce( $_POST['yoast_free_metabox_social_nonce'], 'yoast_free_metabox_social' ) ) {
admin/class-yoast-alerts.php CHANGED
@@ -6,7 +6,7 @@
6
  */
7
 
8
  /**
9
- * Class Yoast_Alerts
10
  */
11
  class Yoast_Alerts {
12
 
@@ -91,7 +91,7 @@ class Yoast_Alerts {
91
  }
92
 
93
  /**
94
- * Enqueue assets
95
  */
96
  public function enqueue_assets() {
97
 
@@ -100,7 +100,7 @@ class Yoast_Alerts {
100
  }
101
 
102
  /**
103
- * Handle ajax request to dismiss an alert
104
  */
105
  public function ajax_dismiss_alert() {
106
 
@@ -116,7 +116,7 @@ class Yoast_Alerts {
116
  }
117
 
118
  /**
119
- * Handle ajax request to restore an alert
120
  */
121
  public function ajax_restore_alert() {
122
 
@@ -132,7 +132,7 @@ class Yoast_Alerts {
132
  }
133
 
134
  /**
135
- * Create AJAX response data
136
  *
137
  * @param string $type Alert type.
138
  */
@@ -148,7 +148,7 @@ class Yoast_Alerts {
148
  }
149
 
150
  /**
151
- * Get the HTML to return in the AJAX request
152
  *
153
  * @param string $type Alert type.
154
  *
@@ -181,7 +181,7 @@ class Yoast_Alerts {
181
  }
182
 
183
  /**
184
- * Extract the Yoast Notification from the AJAX request
185
  *
186
  * @return null|Yoast_Notification
187
  */
@@ -194,7 +194,7 @@ class Yoast_Alerts {
194
  }
195
 
196
  /**
197
- * Show the alerts overview page
198
  */
199
  public static function show_overview_page() {
200
 
@@ -205,7 +205,7 @@ class Yoast_Alerts {
205
  }
206
 
207
  /**
208
- * Collect the alerts and group them together
209
  */
210
  public static function collect_alerts() {
211
 
@@ -224,7 +224,7 @@ class Yoast_Alerts {
224
  }
225
 
226
  /**
227
- * Get the variables needed in the views
228
  *
229
  * @return array
230
  */
@@ -249,7 +249,7 @@ class Yoast_Alerts {
249
  }
250
 
251
  /**
252
- * Get the number of active alerts
253
  *
254
  * @return int
255
  */
@@ -259,7 +259,7 @@ class Yoast_Alerts {
259
  }
260
 
261
  /**
262
- * Filter out any non-errors
263
  *
264
  * @param Yoast_Notification $notification Notification to test.
265
  *
@@ -271,7 +271,7 @@ class Yoast_Alerts {
271
  }
272
 
273
  /**
274
- * Filter out any non-warnings
275
  *
276
  * @param Yoast_Notification $notification Notification to test.
277
  *
@@ -283,7 +283,7 @@ class Yoast_Alerts {
283
  }
284
 
285
  /**
286
- * Filter out any dismissed notifications
287
  *
288
  * @param Yoast_Notification $notification Notification to test.
289
  *
6
  */
7
 
8
  /**
9
+ * Class Yoast_Alerts.
10
  */
11
  class Yoast_Alerts {
12
 
91
  }
92
 
93
  /**
94
+ * Enqueue assets.
95
  */
96
  public function enqueue_assets() {
97
 
100
  }
101
 
102
  /**
103
+ * Handle ajax request to dismiss an alert.
104
  */
105
  public function ajax_dismiss_alert() {
106
 
116
  }
117