Yoast SEO - Version 7.4

Version Description

Download this release

Release Info

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

Code changes from version 7.3 to 7.4

Files changed (62) hide show
  1. admin/class-add-keyword-modal.php +61 -0
  2. admin/class-admin-asset-dev-server-location.php +1 -0
  3. admin/class-admin-asset-manager.php +8 -0
  4. admin/class-admin-init.php +2 -2
  5. admin/class-admin.php +2 -0
  6. admin/class-database-proxy.php +72 -12
  7. admin/class-meta-storage.php +7 -8
  8. admin/class-premium-benefits-list.php +53 -0
  9. admin/class-unsupported-php-message.php +2 -2
  10. admin/class-yoast-modal.php +98 -0
  11. admin/config-ui/components/class-component-configuration-choices.php +17 -6
  12. admin/links/class-link-storage.php +7 -8
  13. admin/links/class-link-watcher.php +3 -2
  14. admin/metabox/class-metabox-add-keyword-tab.php +31 -31
  15. admin/onpage/class-onpage.php +5 -1
  16. css/dist/{admin-global-730-rtl.min.css → admin-global-740-rtl.min.css} +1 -1
  17. css/dist/{admin-global-730.min.css → admin-global-740.min.css} +1 -1
  18. css/dist/{adminbar-730-rtl.min.css → adminbar-740-rtl.min.css} +0 -0
  19. css/dist/{adminbar-730.min.css → adminbar-740.min.css} +0 -0
  20. css/dist/{alerts-730-rtl.min.css → alerts-740-rtl.min.css} +0 -0
  21. css/dist/{alerts-730.min.css → alerts-740.min.css} +0 -0
  22. css/dist/{dashboard-730-rtl.min.css → dashboard-740-rtl.min.css} +0 -0
  23. css/dist/{dashboard-730.min.css → dashboard-740.min.css} +0 -0
  24. css/dist/{edit-page-730-rtl.min.css → edit-page-740-rtl.min.css} +0 -0
  25. css/dist/{edit-page-730.min.css → edit-page-740.min.css} +0 -0
  26. css/dist/{featured-image-730-rtl.min.css → featured-image-740-rtl.min.css} +0 -0
  27. css/dist/{featured-image-730.min.css → featured-image-740.min.css} +0 -0
  28. css/dist/{filter-explanation-730-rtl.min.css → filter-explanation-740-rtl.min.css} +0 -0
  29. css/dist/{filter-explanation-730.min.css → filter-explanation-740.min.css} +0 -0
  30. css/dist/{inside-editor-730-rtl.min.css → inside-editor-740-rtl.min.css} +0 -0
  31. css/dist/{inside-editor-730.min.css → inside-editor-740.min.css} +0 -0
  32. css/dist/{metabox-730-rtl.min.css → metabox-740-rtl.min.css} +0 -0
  33. css/dist/{metabox-730.min.css → metabox-740.min.css} +0 -0
  34. css/dist/{metabox-primary-category-730-rtl.min.css → metabox-primary-category-740-rtl.min.css} +0 -0
  35. css/dist/{metabox-primary-category-730.min.css → metabox-primary-category-740.min.css} +0 -0
  36. css/dist/{snippet-730-rtl.min.css → snippet-740-rtl.min.css} +0 -0
  37. css/dist/{snippet-730.min.css → snippet-740.min.css} +0 -0
  38. css/dist/{toggle-switch-730-rtl.min.css → toggle-switch-740-rtl.min.css} +0 -0
  39. css/dist/{toggle-switch-730.min.css → toggle-switch-740.min.css} +0 -0
  40. css/dist/{wpseo-dismissible-730-rtl.min.css → wpseo-dismissible-740-rtl.min.css} +0 -0
  41. css/dist/{wpseo-dismissible-730.min.css → wpseo-dismissible-740.min.css} +0 -0
  42. css/dist/{yoast-components-730-rtl.min.css → yoast-components-740-rtl.min.css} +0 -0
  43. css/dist/{yoast-components-730.min.css → yoast-components-740.min.css} +0 -0
  44. css/dist/{yoast-extensions-730-rtl.min.css → yoast-extensions-740-rtl.min.css} +0 -0
  45. css/dist/{yoast-extensions-730.min.css → yoast-extensions-740.min.css} +0 -0
  46. css/dist/{yst_plugin_tools-730-rtl.min.css → yst_plugin_tools-740-rtl.min.css} +0 -0
  47. css/dist/{yst_plugin_tools-730.min.css → yst_plugin_tools-740.min.css} +0 -0
  48. css/dist/{yst_seo_score-730-rtl.min.css → yst_seo_score-740-rtl.min.css} +0 -0
  49. css/dist/{yst_seo_score-730.min.css → yst_seo_score-740.min.css} +0 -0
  50. frontend/class-frontend.php +5 -2
  51. frontend/class-opengraph-image.php +227 -172
  52. frontend/class-opengraph.php +19 -29
  53. frontend/class-twitter.php +6 -1
  54. inc/class-post-type.php +1 -0
  55. inc/class-upgrade.php +27 -0
  56. inc/class-wpseo-content-images.php +168 -0
  57. inc/class-wpseo-image-utils.php +267 -0
  58. inc/class-wpseo-meta.php +1 -0
  59. inc/sitemaps/class-sitemap-image-parser.php +4 -4
  60. js/dist/{commons-730.min.js → commons-740.min.js} +6 -6
  61. js/dist/configuration-wizard-730.min.js +0 -24
  62. js/dist/configuration-wizard-740.min.js +12 -0
admin/class-add-keyword-modal.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package WPSEO\Admin
4
+ */
5
+
6
+ /**
7
+ * Class to print out the translatable strings for the Add Keyword modal.
8
+ */
9
+ class WPSEO_Add_Keyword_Modal {
10
+
11
+ /**
12
+ * Returns the translations for the Add Keyword modal.
13
+ *
14
+ * These strings are not escaped because they're meant to be used with React
15
+ * which already takes care of that. If used in PHP, they should be escaped.
16
+ *
17
+ * @return array Translated text strings for the Add Keyword modal.
18
+ */
19
+ public function get_translations() {
20
+ return array(
21
+ 'title' => __( 'Want to add more than one keyword?', 'wordpress-seo' ),
22
+ 'intro' => sprintf(
23
+ /* translators: %1$s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
24
+ __( 'Great news: you can, with %1$s!', 'wordpress-seo' ),
25
+ '{{link}}Yoast SEO Premium{{/link}}'
26
+ ),
27
+ 'link' => WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ),
28
+ 'other' => sprintf(
29
+ /* translators: %s expands to 'Yoast SEO Premium'. */
30
+ __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium'
31
+ ),
32
+ 'buylink' => WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ),
33
+ 'buy' => sprintf(
34
+ /* translators: %s expands to 'Yoast SEO Premium'. */
35
+ __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium'
36
+ ),
37
+ 'small' => __( '1 year free updates and upgrades included!', 'wordpress-seo' ),
38
+ 'a11yNotice.opensInNewTab' => __( '(Opens in a new browser tab)', 'wordpress-seo' ),
39
+ );
40
+ }
41
+
42
+ /**
43
+ * Pass tanslations to JS for the Add Keyword modal component.
44
+ *
45
+ * @return array Translated text strings for the Add Keyword modal component.
46
+ */
47
+ public function get_translations_for_js() {
48
+ $translations = $this->get_translations();
49
+ return array(
50
+ 'locale' => WPSEO_Utils::get_user_locale(),
51
+ 'intl' => $translations,
52
+ );
53
+ }
54
+
55
+ /**
56
+ * Prints the localized Add Keyword modal translations for JS.
57
+ */
58
+ public function enqueue_translations() {
59
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastAddKeywordModalL10n', $this->get_translations_for_js() );
60
+ }
61
+ }
admin/class-admin-asset-dev-server-location.php CHANGED
@@ -22,6 +22,7 @@ final class WPSEO_Admin_Asset_Dev_Server_Location implements WPSEO_Admin_Asset_L
22
  'wp-seo-metabox',
23
  'wp-seo-post-scraper',
24
  'wp-seo-term-scraper',
 
25
  );
26
 
27
  /**
22
  'wp-seo-metabox',
23
  'wp-seo-post-scraper',
24
  'wp-seo-term-scraper',
25
+ 'wp-seo-modal',
26
  );
27
 
28
  /**
admin/class-admin-asset-manager.php CHANGED
@@ -191,6 +191,14 @@ class WPSEO_Admin_Asset_Manager {
191
  self::PREFIX . 'babel-polyfill',
192
  ),
193
  ),
 
 
 
 
 
 
 
 
194
  array(
195
  'name' => 'help-center',
196
  'src' => 'wp-seo-help-center-' . $flat_version,
191
  self::PREFIX . 'babel-polyfill',
192
  ),
193
  ),
194
+ array(
195
+ 'name' => 'yoast-modal',
196
+ 'src' => 'wp-seo-modal-' . $flat_version,
197
+ 'deps' => array(
198
+ 'jquery',
199
+ self::PREFIX . 'react-dependencies',
200
+ ),
201
+ ),
202
  array(
203
  'name' => 'help-center',
204
  'src' => 'wp-seo-help-center-' . $flat_version,
admin/class-admin-init.php CHANGED
@@ -422,8 +422,8 @@ class WPSEO_Admin_Init {
422
  __( '%1$sAction is needed%2$s: As of version %3$s, due to be released on %4$s, Yoast SEO will no longer work with PHP %5$s. Unfortunately, your site is running on PHP %5$s right now, so action is needed. Thankfully, you can update your PHP yourself.', 'wordpress-seo' ),
423
  '<strong>',
424
  '</strong>',
425
- '7.5',
426
- date_i18n( get_option( 'date_format' ), strtotime( '15-05-2018' ) ),
427
  '5.2'
428
  );
429
 
422
  __( '%1$sAction is needed%2$s: As of version %3$s, due to be released on %4$s, Yoast SEO will no longer work with PHP %5$s. Unfortunately, your site is running on PHP %5$s right now, so action is needed. Thankfully, you can update your PHP yourself.', 'wordpress-seo' ),
423
  '<strong>',
424
  '</strong>',
425
+ '7.7',
426
+ date_i18n( get_option( 'date_format' ), strtotime( '11-06-2018' ) ),
427
  '5.2'
428
  );
429
 
admin/class-admin.php CHANGED
@@ -89,6 +89,8 @@ class WPSEO_Admin {
89
  $this->check_php_version();
90
  $this->initialize_cornerstone_content();
91
 
 
 
92
  $integrations[] = new WPSEO_Yoast_Columns();
93
  $integrations[] = new WPSEO_License_Page_Manager();
94
  $integrations[] = new WPSEO_Statistic_Integration();
89
  $this->check_php_version();
90
  $this->initialize_cornerstone_content();
91
 
92
+ new Yoast_Modal();
93
+
94
  $integrations[] = new WPSEO_Yoast_Columns();
95
  $integrations[] = new WPSEO_License_Page_Manager();
96
  $integrations[] = new WPSEO_Statistic_Integration();
admin/class-database-proxy.php CHANGED
@@ -16,6 +16,9 @@ class WPSEO_Database_Proxy {
16
  /** @var bool */
17
  protected $suppress_errors = true;
18
 
 
 
 
19
  /** @var bool */
20
  protected $last_suppressed_state;
21
 
@@ -23,16 +26,28 @@ class WPSEO_Database_Proxy {
23
  protected $database;
24
 
25
  /**
26
- * Sets the class attributes.
27
  *
28
- * @param wpdb $database The database object.
29
- * @param string $table_name The table name that is represented.
30
- * @param bool $suppress_errors Should the errors be suppressed.
 
31
  */
32
- public function __construct( $database, $table_name, $suppress_errors = true ) {
33
- $this->table_name = $table_name;
34
- $this->suppress_errors = (bool) $suppress_errors;
35
- $this->database = $database;
 
 
 
 
 
 
 
 
 
 
 
36
  }
37
 
38
  /**
@@ -183,11 +198,56 @@ class WPSEO_Database_Proxy {
183
  }
184
 
185
  /**
186
- * Returns the set table name.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  *
188
- * @return string
189
  */
190
- protected function get_table_name() {
191
- return $this->table_name;
 
 
 
 
192
  }
193
  }
16
  /** @var bool */
17
  protected $suppress_errors = true;
18
 
19
+ /** @var bool */
20
+ protected $is_multisite_table = false;
21
+
22
  /** @var bool */
23
  protected $last_suppressed_state;
24
 
26
  protected $database;
27
 
28
  /**
29
+ * Sets the class attributes and registers the table.
30
  *
31
+ * @param wpdb $database The database object.
32
+ * @param string $table_name The table name that is represented.
33
+ * @param bool $suppress_errors Should the errors be suppressed.
34
+ * @param bool $is_multisite_table Should the table be global in multisite.
35
  */
36
+ public function __construct( $database, $table_name, $suppress_errors = true, $is_multisite_table = false ) {
37
+ $this->table_name = $table_name;
38
+ $this->suppress_errors = (bool) $suppress_errors;
39
+ $this->is_multisite_table = (bool) $is_multisite_table;
40
+ $this->database = $database;
41
+
42
+ // If the table prefix was provided, strip it as it's handled automatically.
43
+ $table_prefix = $this->get_table_prefix();
44
+ if ( strpos( $this->table_name, $table_prefix ) === 0 ) {
45
+ $this->table_prefix = substr( $this->table_name, strlen( $table_prefix ) );
46
+ }
47
+
48
+ if ( ! $this->is_table_registered() ) {
49
+ $this->register_table();
50
+ }
51
  }
52
 
53
  /**
198
  }
199
 
200
  /**
201
+ * Returns the full table name.
202
+ *
203
+ * @return string Full table name including prefix.
204
+ */
205
+ public function get_table_name() {
206
+ return $this->get_table_prefix() . $this->table_name;
207
+ }
208
+
209
+ /**
210
+ * Returns the prefix to use for the table.
211
+ *
212
+ * @return string The table prefix depending on the database context.
213
+ */
214
+ protected function get_table_prefix() {
215
+ if ( $this->is_multisite_table ) {
216
+ return $this->database->base_prefix;
217
+ }
218
+
219
+ return $this->database->get_blog_prefix();
220
+ }
221
+
222
+ /**
223
+ * Registers the table with WordPress.
224
+ *
225
+ * @return void
226
+ */
227
+ protected function register_table() {
228
+ $table_name = $this->table_name;
229
+ $full_table_name = $this->get_table_name();
230
+
231
+ $this->database->$table_name = $full_table_name;
232
+
233
+ if ( $this->is_multisite_table ) {
234
+ $this->database->ms_global_tables[] = $table_name;
235
+ return;
236
+ }
237
+
238
+ $this->database->tables[] = $table_name;
239
+ }
240
+
241
+ /**
242
+ * Checks if the table has been registered with WordPress.
243
  *
244
+ * @return bool True if the table is registered, false otherwise.
245
  */
246
+ protected function is_table_registered() {
247
+ if ( $this->is_multisite_table ) {
248
+ return in_array( $this->table_name, $this->database->ms_global_tables, true );
249
+ }
250
+
251
+ return in_array( $this->table_name, $this->database->tables, true );
252
  }
253
  }
admin/class-meta-storage.php CHANGED
@@ -15,21 +15,20 @@ class WPSEO_Meta_Storage implements WPSEO_Installable {
15
  /** @var WPSEO_Database_Proxy */
16
  protected $database_proxy;
17
 
18
- /** @var null|string */
19
  protected $table_prefix;
20
 
21
  /**
22
- * Sets the table prefix.
23
  *
24
- * @param string $table_prefix Optional. The prefix to use for the table.
25
  */
26
  public function __construct( $table_prefix = null ) {
27
- if ( null === $table_prefix ) {
28
- $table_prefix = $GLOBALS['wpdb']->get_blog_prefix();
29
  }
30
 
31
- $this->table_prefix = $table_prefix;
32
- $this->database_proxy = new WPSEO_Database_Proxy( $GLOBALS['wpdb'], $this->get_table_name(), true );
33
  }
34
 
35
  /**
@@ -38,7 +37,7 @@ class WPSEO_Meta_Storage implements WPSEO_Installable {
38
  * @return string The table name.
39
  */
40
  public function get_table_name() {
41
- return $this->table_prefix . self::TABLE_NAME;
42
  }
43
 
44
  /**
15
  /** @var WPSEO_Database_Proxy */
16
  protected $database_proxy;
17
 
18
+ /** @var null|string Deprecated. */
19
  protected $table_prefix;
20
 
21
  /**
22
+ * Initializes the database table.
23
  *
24
+ * @param string $table_prefix Optional. Deprecated argument.
25
  */
26
  public function __construct( $table_prefix = null ) {
27
+ if ( $table_prefix !== null ) {
28
+ _deprecated_argument( __METHOD__, 'WPSEO 7.4' );
29
  }
30
 
31
+ $this->database_proxy = new WPSEO_Database_Proxy( $GLOBALS['wpdb'], self::TABLE_NAME, true );
 
32
  }
33
 
34
  /**
37
  * @return string The table name.
38
  */
39
  public function get_table_name() {
40
+ return $this->database_proxy->get_table_name();
41
  }
42
 
43
  /**
admin/class-premium-benefits-list.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package WPSEO\Admin
4
+ */
5
+
6
+ /**
7
+ * Class to print out a list of Premium benefits.
8
+ */
9
+ class WPSEO_Premium_Benefits_List {
10
+
11
+ /**
12
+ * Returns the translations for the Premium benefits list.
13
+ *
14
+ * @return array Translated text strings for the Premium benefits list.
15
+ */
16
+ public function get_translations() {
17
+ return array(
18
+ sprintf(
19
+ /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
20
+ __( '%1$sNo more dead links%2$s: easy redirect manager', 'wordpress-seo' ),
21
+ '<strong>', '</strong>'
22
+ ),
23
+ '<strong>' . __( 'Superfast internal links suggestions', 'wordpress-seo' ) . '</strong>',
24
+ sprintf(
25
+ /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
26
+ __( '%1$sSocial media preview%2$s: Facebook & Twitter', 'wordpress-seo' ),
27
+ '<strong>', '</strong>'
28
+ ),
29
+ '<strong>' . __( '24/7 support', 'wordpress-seo' ) . '</strong>',
30
+ '<strong>' . __( 'No ads!', 'wordpress-seo' ) . '</strong>',
31
+ );
32
+ }
33
+
34
+ /**
35
+ * Pass tanslations to JS for the Add Keyword JS component Premium benefits list.
36
+ *
37
+ * @return array Translated text strings for the Premium benefits list component.
38
+ */
39
+ public function get_translations_for_js() {
40
+ $translations = $this->get_translations();
41
+ return array(
42
+ 'locale' => WPSEO_Utils::get_user_locale(),
43
+ 'intl' => $translations,
44
+ );
45
+ }
46
+
47
+ /**
48
+ * Prints the localized Premium benefits translations for JS.
49
+ */
50
+ public function enqueue_translations() {
51
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'admin-global-script', 'yoastPremiumBenefitsL10n', $this->get_translations_for_js() );
52
+ }
53
+ }
admin/class-unsupported-php-message.php CHANGED
@@ -25,8 +25,8 @@ class WPSEO_Unsupported_PHP_Message implements Whip_Message {
25
  __( '%1$sAction is needed%2$s: As of version %3$s, due to be released on %4$s, Yoast SEO will no longer work with PHP %5$s. Unfortunately, your site is running on PHP %5$s right now, so action is needed. Thankfully, you can update your PHP yourself.', 'wordpress-seo' ),
26
  '<strong>',
27
  '</strong>',
28
- '7.5',
29
- date_i18n( get_option( 'date_format' ), strtotime( '15-05-2018' ) ),
30
  '5.2'
31
  )
32
  ) . '<br />';
25
  __( '%1$sAction is needed%2$s: As of version %3$s, due to be released on %4$s, Yoast SEO will no longer work with PHP %5$s. Unfortunately, your site is running on PHP %5$s right now, so action is needed. Thankfully, you can update your PHP yourself.', 'wordpress-seo' ),
26
  '<strong>',
27
  '</strong>',
28
+ '7.7',
29
+ date_i18n( get_option( 'date_format' ), strtotime( '11-06-2018' ) ),
30
  '5.2'
31
  )
32
  ) . '<br />';
admin/class-yoast-modal.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package WPSEO\Admin
4
+ */
5
+
6
+ /**
7
+ * Class to implement a React modal.
8
+ */
9
+ class Yoast_Modal {
10
+
11
+ /** @var array The modal configuration. */
12
+ private static $config = array();
13
+
14
+ /**
15
+ * Class constructor.
16
+ */
17
+ public function __construct() {
18
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_assets' ) );
19
+ add_action( 'admin_footer', array( $this, 'print_localized_config' ) );
20
+ }
21
+
22
+ /**
23
+ * Enqueues the assets needed for the modal.
24
+ */
25
+ public function enqueue_assets() {
26
+ $asset_manager = new WPSEO_Admin_Asset_Manager();
27
+ $asset_manager->enqueue_script( 'yoast-modal' );
28
+ }
29
+
30
+ /**
31
+ * Prints the modals configuration.
32
+ */
33
+ public function print_localized_config() {
34
+ $config = self::$config;
35
+ wp_localize_script( WPSEO_Admin_Asset_Manager::PREFIX . 'yoast-modal', 'yoastModalConfig', $config );
36
+ }
37
+
38
+ /**
39
+ * Adds a single modal configuration to the modals configuration.
40
+ *
41
+ * @param array $args The modal configuration arguments.
42
+ */
43
+ public static function add( $args ) {
44
+ $defaults = self::get_defaults();
45
+
46
+ $single = array_replace_recursive( $defaults, $args );
47
+ self::$config[] = $single;
48
+ }
49
+
50
+ /**
51
+ * Gets the modals configuration.
52
+ */
53
+ public function get_config() {
54
+ return self::$config;
55
+ }
56
+
57
+ /**
58
+ * Gets the default configuration for a modal.
59
+ *
60
+ * @return array {
61
+ * The modal default configuration.
62
+ *
63
+ * @type string $mountHook Any CSS query selector to target an element that will be replaced
64
+ * by the modal open button.
65
+ * @type string $appElement Element the modal will hide with `aria-hidden`. For better
66
+ * accessibility, set it to the most general wrapper and don't use body.
67
+ * @type string $openButtonIcon Optional. Icon for the open button.
68
+ * @type array $intl Locale and labels for the modal main elements. If omitted, the related
69
+ * elements will not be used. Only exception is `modalAriaLabel` which is
70
+ * required by the React modal component.
71
+ * @type array $classes Optional. CSS classes for the modal buttons.
72
+ * @type string $content The name of the React component to use as the modal content.
73
+ * }
74
+ */
75
+ public static function get_defaults() {
76
+ $config = array(
77
+ 'mountHook' => '',
78
+ 'appElement' => '#wpwrap',
79
+ 'openButtonIcon' => '',
80
+ 'intl' => array(
81
+ 'locale' => WPSEO_Utils::get_user_locale(),
82
+ 'open' => __( 'Open', 'wordpress-seo' ),
83
+ 'modalAriaLabel' => null,
84
+ 'heading' => null,
85
+ 'closeIconButton' => __( 'Close', 'wordpress-seo' ),
86
+ 'closeButton' => null,
87
+ ),
88
+ 'classes' => array(
89
+ 'openButton' => '',
90
+ 'closeIconButton' => '',
91
+ 'closeButton' => '',
92
+ ),
93
+ 'content' => null,
94
+ );
95
+
96
+ return $config;
97
+ }
98
+ }
admin/config-ui/components/class-component-configuration-choices.php CHANGED
@@ -53,17 +53,28 @@ class WPSEO_Config_Component_Configuration_Choices implements WPSEO_Config_Compo
53
  ),
54
  plugin_dir_url( WPSEO_FILE ) . '/images/Yoast_SEO_Icon.svg'
55
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  $field->add_choice(
57
  sprintf(
58
  /* translators: %s expands to 'Yoast SEO'. */
59
  __( 'Let us set up %s for you', 'wordpress-seo' ), 'Yoast SEO'
60
  ),
61
- sprintf(
62
- /* translators: %1$s expands to 'Yoast SEO', %2$s expands to 'Yoast SEO Premium'. */
63
- __( 'While we strive to make setting up %1$s as easy as possible, we understand it can still be daunting. If you would rather have us set up %1$s for you (and get a copy of %2$s in the process), order a %1$s configuration service and sit back while we configure your site.', 'wordpress-seo' ),
64
- 'Yoast SEO',
65
- 'Yoast SEO Premium'
66
- ),
67
  array(
68
  'type' => 'secondary',
69
  'label' => __( 'Configuration service', 'wordpress-seo' ),
53
  ),
54
  plugin_dir_url( WPSEO_FILE ) . '/images/Yoast_SEO_Icon.svg'
55
  );
56
+
57
+ $configuration_service_text = sprintf(
58
+ /* translators: %1$s expands to 'Yoast SEO', %2$s expands to 'Yoast SEO Premium'. */
59
+ __( 'While we strive to make setting up %1$s as easy as possible, we understand it can still be daunting. If you would rather have us set up %1$s for you (and get a copy of %2$s in the process), order a %1$s configuration service and sit back while we configure your site.', 'wordpress-seo' ),
60
+ 'Yoast SEO',
61
+ 'Yoast SEO Premium'
62
+ );
63
+
64
+ if ( WPSEO_Utils::is_yoast_seo_premium() ) {
65
+ $configuration_service_text = sprintf(
66
+ /* translators: %1$s expands to 'Yoast SEO Premium'. */
67
+ __( 'While we strive to make setting up %1$s as easy as possible, we understand it can still be daunting. If you would rather have us set up %1$s for you, order a %1$s configuration service and sit back while we configure your site.', 'wordpress-seo' ),
68
+ 'Yoast SEO Premium'
69
+ );
70
+ }
71
+
72
  $field->add_choice(
73
  sprintf(
74
  /* translators: %s expands to 'Yoast SEO'. */
75
  __( 'Let us set up %s for you', 'wordpress-seo' ), 'Yoast SEO'
76
  ),
77
+ $configuration_service_text,
 
 
 
 
 
78
  array(
79
  'type' => 'secondary',
80
  'label' => __( 'Configuration service', 'wordpress-seo' ),
admin/links/class-link-storage.php CHANGED
@@ -15,21 +15,20 @@ class WPSEO_Link_Storage implements WPSEO_Installable {
15
  /** @var WPSEO_Database_Proxy */
16
  protected $database_proxy;
17
 
18
- /** @var null|string */
19
  protected $table_prefix;
20
 
21
  /**
22
- * Sets the table prefix.
23
  *
24
- * @param string $table_prefix Optional. The prefix to use for the table.
25
  */
26
  public function __construct( $table_prefix = null ) {
27
- if ( null === $table_prefix ) {
28
- $table_prefix = $GLOBALS['wpdb']->get_blog_prefix();
29
  }
30
 
31
- $this->table_prefix = $table_prefix;
32
- $this->database_proxy = new WPSEO_Database_Proxy( $GLOBALS['wpdb'], $this->get_table_name(), true );
33
  }
34
 
35
  /**
@@ -38,7 +37,7 @@ class WPSEO_Link_Storage implements WPSEO_Installable {
38
  * @return string The table name.
39
  */
40
  public function get_table_name() {
41
- return $this->table_prefix . self::TABLE_NAME;
42
  }
43
 
44
  /**
15
  /** @var WPSEO_Database_Proxy */
16
  protected $database_proxy;
17
 
18
+ /** @var null|string Deprecated. */
19
  protected $table_prefix;
20
 
21
  /**
22
+ * Initializes the database table.
23
  *
24
+ * @param string $table_prefix Optional. Deprecated argument.
25
  */
26
  public function __construct( $table_prefix = null ) {
27
+ if ( $table_prefix !== null ) {
28
+ _deprecated_argument( __METHOD__, 'WPSEO 7.4' );
29
  }
30
 
31
+ $this->database_proxy = new WPSEO_Database_Proxy( $GLOBALS['wpdb'], self::TABLE_NAME, true );
 
32
  }
33
 
34
  /**
37
  * @return string The table name.
38
  */
39
  public function get_table_name() {
40
+ return $this->database_proxy->get_table_name();
41
  }
42
 
43
  /**
admin/links/class-link-watcher.php CHANGED
@@ -50,8 +50,9 @@ class WPSEO_Link_Watcher {
50
  return;
51
  }
52
 
53
- // When the post status is auto-draft.
54
- if ( $post->post_status === 'auto-draft' ) {
 
55
  return;
56
  }
57
 
50
  return;
51
  }
52
 
53
+ $post_statuses_to_skip = array( 'auto-draft', 'trash' );
54
+
55
+ if ( in_array( $post->post_status, $post_statuses_to_skip, true ) ) {
56
  return;
57
  }
58
 
admin/metabox/class-metabox-add-keyword-tab.php CHANGED
@@ -6,20 +6,46 @@
6
  */
7
 
8
  /**
9
- * Tab to add a keyword to analyze
10
  */
11
  class WPSEO_Metabox_Add_Keyword_Tab implements WPSEO_Metabox_Tab {
12
 
13
  /**
14
- * Returns a button because a link is inappropriate here
15
  *
16
  * @return string
17
  */
18
  public function link() {
19
 
20
- // Ensure thickbox is enqueued.
21
- add_thickbox();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
 
 
 
 
 
 
 
 
23
  ob_start();
24
  ?>
25
  <li class="wpseo-tab-add-keyword">
@@ -28,38 +54,12 @@ class WPSEO_Metabox_Add_Keyword_Tab implements WPSEO_Metabox_Tab {
28
  <?php esc_html_e( 'Add keyword', 'wordpress-seo' ); ?>
29
  </button>
30
  </li>
31
-
32
  <?php
33
- $popup_title = __( 'Want to add more than one keyword?', 'wordpress-seo' );
34
- /* translators: %1$s expands to a 'Yoast SEO Premium' text linked to the yoast.com website. */
35
- $popup_content = '<p>' . sprintf( __( 'Great news: you can, with %1$s!', 'wordpress-seo' ),
36
- '<a href="' . WPSEO_Shortlinker::get( 'https://yoa.st/pe-premium-page' ) . '">Yoast SEO Premium</a>'
37
- ) . '</p>';
38
- $popup_content .= '<p>' . sprintf(
39
- /* translators: %s expands to 'Yoast SEO Premium'. */
40
- __( 'Other benefits of %s for you:', 'wordpress-seo' ), 'Yoast SEO Premium'
41
- ) . '</p>';
42
- $popup_content .= '<ul>';
43
- $popup_content .= '<li>' . sprintf(
44
- /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
45
- __( '%1$sNo more dead links%2$s: easy redirect manager', 'wordpress-seo' ), '<strong>', '</strong>'
46
- ) . '</li>';
47
- $popup_content .= '<li><strong>' . __( 'Superfast internal links suggestions', 'wordpress-seo' ) . '</strong></li>';
48
- $popup_content .= '<li>' . sprintf(
49
- /* translators: %1$s expands to a 'strong' start tag, %2$s to a 'strong' end tag. */
50
- __( '%1$sSocial media preview%2$s: Facebook &amp; Twitter', 'wordpress-seo' ), '<strong>', '</strong>'
51
- ) . '</li>';
52
- $popup_content .= '<li><strong>' . __( '24/7 support', 'wordpress-seo' ) . '</strong></li>';
53
- $popup_content .= '<li><strong>' . __( 'No ads!', 'wordpress-seo' ) . '</strong></li>';
54
- $popup_content .= '</ul>';
55
- $premium_popup = new WPSEO_Premium_Popup( 'add-keyword', 'h1', $popup_title, $popup_content, WPSEO_Shortlinker::get( 'https://yoa.st/add-keywords-popup' ) );
56
- echo $premium_popup->get_premium_message();
57
-
58
  return ob_get_clean();
59
  }
60
 
61
  /**
62
- * Returns an empty string because this tab has no content
63
  *
64
  * @return string
65
  */
6
  */
7
 
8
  /**
9
+ * Tab to add a keyword to analyze.
10
  */
11
  class WPSEO_Metabox_Add_Keyword_Tab implements WPSEO_Metabox_Tab {
12
 
13
  /**
14
+ * Returns a button because a link is inappropriate here.
15
  *
16
  * @return string
17
  */
18
  public function link() {
19
 
20
+ if ( ! WPSEO_UTILS::is_yoast_seo_premium() ) {
21
+ $add_keyword_modal_config = array(
22
+ 'mountHook' => '.wpseo-tab-add-keyword',
23
+ 'openButtonIcon' => 'plus',
24
+ 'intl' => array(
25
+ 'open' => __( 'Add keyword', 'wordpress-seo' ),
26
+ 'modalAriaLabel' => sprintf(
27
+ /* translators: %s expands to 'Yoast SEO Premium'. */
28
+ __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium'
29
+ ),
30
+ 'heading' => sprintf(
31
+ /* translators: %s expands to 'Yoast SEO Premium'. */
32
+ __( 'Get %s now!', 'wordpress-seo' ), 'Yoast SEO Premium'
33
+ ),
34
+ ),
35
+ 'classes' => array(
36
+ 'openButton' => 'wpseo-add-keyword button button-link',
37
+ ),
38
+ 'content' => 'AddKeyword',
39
+ );
40
 
41
+ $translations = new WPSEO_Add_Keyword_Modal;
42
+ $translations->enqueue_translations();
43
+ $benefits = new WPSEO_Premium_Benefits_List;
44
+ $benefits->enqueue_translations();
45
+ Yoast_Modal::add( $add_keyword_modal_config );
46
+ }
47
+
48
+ // Keep the default Add Keyword button for Premium. On free it's replaced by React.
49
  ob_start();
50
  ?>
51
  <li class="wpseo-tab-add-keyword">
54
  <?php esc_html_e( 'Add keyword', 'wordpress-seo' ); ?>
55
  </button>
56
  </li>
 
57
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  return ob_get_clean();
59
  }
60
 
61
  /**
62
+ * Returns an empty string because this tab has no content.
63
  *
64
  * @return string
65
  */
admin/onpage/class-onpage.php CHANGED
@@ -102,7 +102,11 @@ class WPSEO_OnPage implements WPSEO_WordPress_Integration {
102
  *
103
  * @return array Enriched list of schedules.
104
  */
105
- public function add_weekly_schedule( array $schedules ) {
 
 
 
 
106
  $schedules['weekly'] = array(
107
  'interval' => WEEK_IN_SECONDS,
108
  'display' => __( 'Once Weekly', 'wordpress-seo' ),
102
  *
103
  * @return array Enriched list of schedules.
104
  */
105
+ public function add_weekly_schedule( $schedules ) {
106
+ if ( ! is_array( $schedules ) ) {
107
+ $schedules = array();
108
+ }
109
+
110
  $schedules['weekly'] = array(
111
  'interval' => WEEK_IN_SECONDS,
112
  'display' => __( 'Once Weekly', 'wordpress-seo' ),
css/dist/{admin-global-730-rtl.min.css → admin-global-740-rtl.min.css} RENAMED
@@ -1 +1 @@
1
- .wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 2px -3px 0;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}.yoast-tooltip{position:relative}.yoast-tooltip::after,.yoast-tooltip::before{display:none;position:absolute;opacity:0;pointer-events:none}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{z-index:1000000;padding:6px 8px 5px;border-radius:3px;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.45454545 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{z-index:1000001;width:0;height:0;border:5px solid transparent;color:rgba(0,0,0,.8);content:"\00a0"}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;left:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;left:50%;bottom:-5px;margin-left:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-sw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{left:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;left:50%;bottom:auto;margin-left:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-nw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-w::after{left:100%;bottom:50%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;right:-5px;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;right:100%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;left:-5px;bottom:50%;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:250px;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{left:auto;right:50%;-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{left:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-left:4.5px}}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.yoast-measure{max-width:600px}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 0 0 10px;font-size:14px;font-weight:600}.wpseo-premium-popup-title{margin:1em 0!important;padding:0!important;font-size:1.3em!important;font-weight:600!important}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;right:0;width:100%;height:100%}.yoast-settings{margin-bottom:2em;padding-right:220px}.yoast-settings h2{margin-bottom:0;margin-right:-220px}.yoast-settings label{display:inline-block;width:200px;margin-left:6px;margin-right:-220px;padding-top:4px;padding-left:10px;color:#23282d;font-size:14px;font-weight:600;line-height:1.3;vertical-align:top}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio,.yoast-settings fieldset,.yoast-settings input[type=text],.yoast-settings label,.yoast-settings select,.yoast-settings textarea{margin-top:2em;margin-bottom:.5em}.yoast-settings__textarea--medium{width:100%;max-width:600px}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio{position:relative;top:1px;vertical-align:top}.yoast-settings__group--checkbox,.yoast-settings__group--radio{padding-top:1em}.yoast-settings__group--checkbox .yoast-settings__checkbox,.yoast-settings__group--radio .yoast-settings__radio{margin:0 0 10px 4px}.yoast-settings__checkbox+label,.yoast-settings__radio+label{width:auto;max-width:calc(100% - 25px);margin-left:0;margin-right:0;padding:0}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{margin-top:0;margin-bottom:10px;font-weight:400}.yoast-settings legend{color:#23282d;font-size:14px;font-weight:600}.yoast-settings .description{margin-top:0;font-size:14px}td .wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-right:5px;border-radius:50%;background:#888;line-height:16px;margin-top:3px}.fixed th.column-wpseo-linked,.fixed th.column-wpseo-links,.fixed th.column-wpseo-score,.fixed th.column-wpseo-score-readability{width:3em;padding:0}th.column-wpseo-linked a,th.column-wpseo-links a,th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{display:inline-block;overflow:visible;padding:8px 0;vertical-align:middle}th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{padding:8px 11px}.column-wpseo-links .yoast-tooltip-multiline::after{width:999px;max-width:160px}.column-wpseo-linked .yoast-tooltip-multiline::after{width:999px;max-width:170px}.yoast-column-header-has-tooltip{position:relative}.manage-column .yoast-column-header-has-tooltip:before{display:inline-block;width:20px;height:20px;padding:0;color:#444;vertical-align:top;text-decoration:none!important;content:""}.manage-column .yoast-linked-to:before{background:url(../../images/link-out-icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-linked-from:before{background:url(../../images/link-in-icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-column-seo-score:before{background:url(../../images/Yoast_SEO_negative_icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-column-readability:before{background:url(../../images/readability-icon.svg) 100% 0 no-repeat;background-size:20px}td.column-wpseo-linked,td.column-wpseo-links{word-wrap:normal}#screen-meta .yoast-column-header-has-tooltip .screen-reader-text{visibility:visible;position:static;width:auto;height:auto}@media screen and (max-width:782px){.yoast-settings{padding-right:0}.yoast-settings h2{margin-right:0}.yoast-settings label{width:auto;margin-left:0;margin-right:0;padding:0}.yoast .yoast-settings__radio,.yoast-settings__radio+label{margin-bottom:1em}.yoast-settings__checkbox+label,.yoast-settings__radio+label{max-width:calc(100% - 35px);padding-top:8px}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{padding-top:4px}.yoast-settings input[type=text],.yoast-settings select,.yoast-settings textarea{display:block;box-sizing:border-box;width:100%;max-width:none;margin-top:0;margin-bottom:0;padding:7px 10px;line-height:1.5}}#yoast-help-center-container{margin:16px 0 24px}.react-tabs__tab-panel{max-width:900px;margin:0 auto}.react-tabs__tab-panel li{max-width:none!important}.yoast-help-center-open #sidebar-container{display:none}.contact-premium-support{text-align:center}.contact-premium-support__content{margin:0 auto 1.5em;font-size:.9375rem;line-height:1.4}.contact-premium-support__content:nth-child(2){max-width:610px}.contact-premium-support__content:nth-child(3){max-width:560px}.contact-premium-support .contact-premium-support__button{margin-bottom:48px}.wpseo-premium-description{margin-top:.5em}.wpseo-premium-advantages-list{padding-right:1.5em;list-style:disc}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.help-button-inline .yoast_help.yoast-help-button{margin-top:-4px}.yoast-section .yoast_help.yoast-help-button{float:left;margin-top:-44px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-left:6px}.yoast_help .yoast-help-icon::before{position:absolute;top:0;right:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus .yoast-help-icon::before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;clear:both;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .yoast-help-panel{max-width:600px!important}.copy-home-meta-description .yoast-help-panel{max-width:400px!important}
1
+ .wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 2px -3px 0;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}.yoast-tooltip{position:relative}.yoast-tooltip::after,.yoast-tooltip::before{display:none;position:absolute;opacity:0;pointer-events:none}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{z-index:1000000;padding:6px 8px 5px;border-radius:3px;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.45454545 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{z-index:1000001;width:0;height:0;border:5px solid transparent;color:rgba(0,0,0,.8);content:"\00a0"}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;left:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;left:50%;bottom:-5px;margin-left:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-sw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{left:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;left:50%;bottom:auto;margin-left:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{left:auto;right:50%;margin-right:-15px}.yoast-tooltip-nw::after{margin-left:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-w::after{left:100%;bottom:50%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;right:-5px;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;right:100%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;left:-5px;bottom:50%;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:250px;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{left:auto;right:50%;-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{left:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-left:4.5px}}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.yoast-measure{max-width:600px}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 0 0 10px;font-size:14px;font-weight:600}.wpseo-premium-popup-title{margin:1em 0!important;padding:0!important;font-size:1.3em!important;font-weight:600!important}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;right:0;width:100%;height:100%}.yoast-settings{margin-bottom:2em;padding-right:220px}.yoast-settings h2{margin-bottom:0;margin-right:-220px}.yoast-settings label{display:inline-block;width:200px;margin-left:6px;margin-right:-220px;padding-top:4px;padding-left:10px;color:#23282d;font-size:14px;font-weight:600;line-height:1.3;vertical-align:top}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio,.yoast-settings fieldset,.yoast-settings input[type=text],.yoast-settings label,.yoast-settings select,.yoast-settings textarea{margin-top:2em;margin-bottom:.5em}.yoast-settings__textarea--medium{width:100%;max-width:600px}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio{position:relative;top:1px;vertical-align:top}.yoast-settings__group--checkbox,.yoast-settings__group--radio{padding-top:1em}.yoast-settings__group--checkbox .yoast-settings__checkbox,.yoast-settings__group--radio .yoast-settings__radio{margin:0 0 10px 4px}.yoast-settings__checkbox+label,.yoast-settings__radio+label{width:auto;max-width:calc(100% - 25px);margin-left:0;margin-right:0;padding:0}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{margin-top:0;margin-bottom:10px;font-weight:400}.yoast-settings legend{color:#23282d;font-size:14px;font-weight:600}.yoast-settings .description{margin-top:0;font-size:14px}td .wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-right:5px;border-radius:50%;background:#888;line-height:16px;margin-top:3px}.fixed th.column-wpseo-linked,.fixed th.column-wpseo-links,.fixed th.column-wpseo-score,.fixed th.column-wpseo-score-readability{width:3em;padding:0}th.column-wpseo-linked a,th.column-wpseo-links a,th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{display:inline-block;overflow:visible;padding:8px 0;vertical-align:middle}th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{padding:8px 11px}.column-wpseo-links .yoast-tooltip-multiline::after{width:999px;max-width:160px}.column-wpseo-linked .yoast-tooltip-multiline::after{width:999px;max-width:170px}.yoast-column-header-has-tooltip{position:relative}.manage-column .yoast-column-header-has-tooltip:before{display:inline-block;width:20px;height:20px;padding:0;color:#444;vertical-align:top;text-decoration:none!important;content:""}.manage-column .yoast-linked-to:before{background:url(../../images/link-out-icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-linked-from:before{background:url(../../images/link-in-icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-column-seo-score:before{background:url(../../images/Yoast_SEO_negative_icon.svg) 100% 0 no-repeat;background-size:20px}.manage-column .yoast-column-readability:before{background:url(../../images/readability-icon.svg) 100% 0 no-repeat;background-size:20px}td.column-wpseo-linked,td.column-wpseo-links{word-wrap:normal}#screen-meta .yoast-column-header-has-tooltip .screen-reader-text{visibility:visible;position:static;width:auto;height:auto}@media screen and (max-width:782px){.yoast-settings{padding-right:0}.yoast-settings h2{margin-right:0}.yoast-settings label{width:auto;margin-left:0;margin-right:0;padding:0}.yoast .yoast-settings__radio,.yoast-settings__radio+label{margin-bottom:1em}.yoast-settings__checkbox+label,.yoast-settings__radio+label{max-width:calc(100% - 35px);padding-top:8px}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{padding-top:4px}.yoast-settings input[type=text],.yoast-settings select,.yoast-settings textarea{display:block;box-sizing:border-box;width:100%;max-width:none;margin-top:0;margin-bottom:0;padding:7px 10px;line-height:1.5}}#yoast-help-center-container{margin:16px 0 24px}.react-tabs__tab-panel{max-width:900px;margin:0 auto}.react-tabs__tab-panel li{max-width:none!important}.yoast-help-center-open #sidebar-container{display:none}.contact-premium-support{text-align:center}.contact-premium-support__content{margin:0 auto 1.5em;font-size:.9375rem;line-height:1.4}.contact-premium-support__content:nth-child(2){max-width:610px}.contact-premium-support__content:nth-child(3){max-width:560px}.contact-premium-support .contact-premium-support__button{margin-bottom:48px}.wpseo-premium-description{margin-top:.5em}.wpseo-premium-advantages-list{padding-right:1.5em;list-style:disc}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.help-button-inline .yoast_help.yoast-help-button{margin-top:-4px}.yoast-section .yoast_help.yoast-help-button{float:left;margin-top:-44px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-left:6px}.yoast_help .yoast-help-icon::before{position:absolute;top:0;right:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus .yoast-help-icon::before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;clear:both;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .yoast-help-panel{max-width:600px!important}.copy-home-meta-description .yoast-help-panel{max-width:400px!important}.yoast-modal_is-open{overflow:hidden}
css/dist/{admin-global-730.min.css → admin-global-740.min.css} RENAMED
@@ -1 +1 @@
1
- .wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 0 -3px 2px;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}.yoast-tooltip{position:relative}.yoast-tooltip::after,.yoast-tooltip::before{display:none;position:absolute;opacity:0;pointer-events:none}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{z-index:1000000;padding:6px 8px 5px;border-radius:3px;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.45454545 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{z-index:1000001;width:0;height:0;border:5px solid transparent;color:rgba(0,0,0,.8);content:"\00a0"}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;right:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-sw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{right:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-nw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-w::after{right:100%;bottom:50%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;left:100%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:250px;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{right:auto;left:50%;-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{right:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-right:4.5px}}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.yoast-measure{max-width:600px}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 10px 0 0;font-size:14px;font-weight:600}.wpseo-premium-popup-title{margin:1em 0!important;padding:0!important;font-size:1.3em!important;font-weight:600!important}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%}.yoast-settings{margin-bottom:2em;padding-left:220px}.yoast-settings h2{margin-bottom:0;margin-left:-220px}.yoast-settings label{display:inline-block;width:200px;margin-right:6px;margin-left:-220px;padding-top:4px;padding-right:10px;color:#23282d;font-size:14px;font-weight:600;line-height:1.3;vertical-align:top}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio,.yoast-settings fieldset,.yoast-settings input[type=text],.yoast-settings label,.yoast-settings select,.yoast-settings textarea{margin-top:2em;margin-bottom:.5em}.yoast-settings__textarea--medium{width:100%;max-width:600px}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio{position:relative;top:1px;vertical-align:top}.yoast-settings__group--checkbox,.yoast-settings__group--radio{padding-top:1em}.yoast-settings__group--checkbox .yoast-settings__checkbox,.yoast-settings__group--radio .yoast-settings__radio{margin:0 4px 10px 0}.yoast-settings__checkbox+label,.yoast-settings__radio+label{width:auto;max-width:calc(100% - 25px);margin-right:0;margin-left:0;padding:0}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{margin-top:0;margin-bottom:10px;font-weight:400}.yoast-settings legend{color:#23282d;font-size:14px;font-weight:600}.yoast-settings .description{margin-top:0;font-size:14px}td .wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-left:5px;border-radius:50%;background:#888;line-height:16px;margin-top:3px}.fixed th.column-wpseo-linked,.fixed th.column-wpseo-links,.fixed th.column-wpseo-score,.fixed th.column-wpseo-score-readability{width:3em;padding:0}th.column-wpseo-linked a,th.column-wpseo-links a,th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{display:inline-block;overflow:visible;padding:8px 0;vertical-align:middle}th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{padding:8px 11px}.column-wpseo-links .yoast-tooltip-multiline::after{width:999px;max-width:160px}.column-wpseo-linked .yoast-tooltip-multiline::after{width:999px;max-width:170px}.yoast-column-header-has-tooltip{position:relative}.manage-column .yoast-column-header-has-tooltip:before{display:inline-block;width:20px;height:20px;padding:0;color:#444;vertical-align:top;text-decoration:none!important;content:""}.manage-column .yoast-linked-to:before{background:url(../../images/link-out-icon.svg) no-repeat;background-size:20px}.manage-column .yoast-linked-from:before{background:url(../../images/link-in-icon.svg) no-repeat;background-size:20px}.manage-column .yoast-column-seo-score:before{background:url(../../images/Yoast_SEO_negative_icon.svg) no-repeat;background-size:20px}.manage-column .yoast-column-readability:before{background:url(../../images/readability-icon.svg) no-repeat;background-size:20px}td.column-wpseo-linked,td.column-wpseo-links{word-wrap:normal}#screen-meta .yoast-column-header-has-tooltip .screen-reader-text{visibility:visible;position:static;width:auto;height:auto}@media screen and (max-width:782px){.yoast-settings{padding-left:0}.yoast-settings h2{margin-left:0}.yoast-settings label{width:auto;margin-right:0;margin-left:0;padding:0}.yoast .yoast-settings__radio,.yoast-settings__radio+label{margin-bottom:1em}.yoast-settings__checkbox+label,.yoast-settings__radio+label{max-width:calc(100% - 35px);padding-top:8px}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{padding-top:4px}.yoast-settings input[type=text],.yoast-settings select,.yoast-settings textarea{display:block;box-sizing:border-box;width:100%;max-width:none;margin-top:0;margin-bottom:0;padding:7px 10px;line-height:1.5}}#yoast-help-center-container{margin:16px 0 24px}.react-tabs__tab-panel{max-width:900px;margin:0 auto}.react-tabs__tab-panel li{max-width:none!important}.yoast-help-center-open #sidebar-container{display:none}.contact-premium-support{text-align:center}.contact-premium-support__content{margin:0 auto 1.5em;font-size:.9375rem;line-height:1.4}.contact-premium-support__content:nth-child(2){max-width:610px}.contact-premium-support__content:nth-child(3){max-width:560px}.contact-premium-support .contact-premium-support__button{margin-bottom:48px}.wpseo-premium-description{margin-top:.5em}.wpseo-premium-advantages-list{padding-left:1.5em;list-style:disc}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.help-button-inline .yoast_help.yoast-help-button{margin-top:-4px}.yoast-section .yoast_help.yoast-help-button{float:right;margin-top:-44px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-right:6px}.yoast_help .yoast-help-icon::before{position:absolute;top:0;left:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus .yoast-help-icon::before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;clear:both;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .yoast-help-panel{max-width:600px!important}.copy-home-meta-description .yoast-help-panel{max-width:400px!important}
1
+ .wpseo-premium-indicator{display:inline-block;width:1px;height:1px}#adminmenu .wpseo-premium-indicator{margin:-2px 0 -3px 2px;color:inherit}.wpseo-premium-indicator svg{display:none;width:auto;height:100%}.yoast-tooltip{position:relative}.yoast-tooltip::after,.yoast-tooltip::before{display:none;position:absolute;opacity:0;pointer-events:none}button.yoast-tooltip{overflow:visible}.yoast-tooltip::after{z-index:1000000;padding:6px 8px 5px;border-radius:3px;color:#fff;background:rgba(0,0,0,.8);text-shadow:none;font:normal normal 11px/1.45454545 Helvetica,arial,nimbussansl,liberationsans,freesans,clean,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-align:center;white-space:pre;text-decoration:none;letter-spacing:normal;text-transform:none;word-wrap:break-word;content:attr(aria-label);-webkit-font-smoothing:subpixel-antialiased}.yoast-tooltip-alt::after{content:attr(data-label)}.yoast-tooltip::before{z-index:1000001;width:0;height:0;border:5px solid transparent;color:rgba(0,0,0,.8);content:"\00a0"}@keyframes yoast-tooltip-appear{from{opacity:0}to{opacity:1}}.yoast-tooltip:active::after,.yoast-tooltip:active::before,.yoast-tooltip:focus::after,.yoast-tooltip:focus::before,.yoast-tooltip:hover::after,.yoast-tooltip:hover::before{display:inline-block;text-decoration:none;animation-name:yoast-tooltip-appear;animation-duration:.1s;animation-timing-function:ease-in;animation-delay:.4s;animation-fill-mode:forwards}.yoast-tooltip-no-delay:active::after,.yoast-tooltip-no-delay:active::before,.yoast-tooltip-no-delay:focus::after,.yoast-tooltip-no-delay:focus::before,.yoast-tooltip-no-delay:hover::after,.yoast-tooltip-no-delay:hover::before{opacity:1;animation:none}.yoast-tooltip-multiline:active::after,.yoast-tooltip-multiline:focus::after,.yoast-tooltip-multiline:hover::after{display:table-cell}.yoast-tooltip-s::after,.yoast-tooltip-se::after,.yoast-tooltip-sw::after{top:100%;right:50%;margin-top:5px}.yoast-tooltip-s::before,.yoast-tooltip-se::before,.yoast-tooltip-sw::before{top:auto;right:50%;bottom:-5px;margin-right:-5px;border-bottom-color:rgba(0,0,0,.8)}.yoast-tooltip-se::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-sw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-ne::after,.yoast-tooltip-nw::after{right:50%;bottom:100%;margin-bottom:5px}.yoast-tooltip-n::before,.yoast-tooltip-ne::before,.yoast-tooltip-nw::before{top:-5px;right:50%;bottom:auto;margin-right:-5px;border-top-color:rgba(0,0,0,.8)}.yoast-tooltip-ne::after{right:auto;left:50%;margin-left:-15px}.yoast-tooltip-nw::after{margin-right:-15px}.yoast-tooltip-n::after,.yoast-tooltip-s::after{-ms-transform:translateX(50%);transform:translateX(50%)}.yoast-tooltip-w::after{right:100%;bottom:50%;margin-right:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-w::before{top:50%;bottom:50%;left:-5px;margin-top:-5px;border-left-color:rgba(0,0,0,.8)}.yoast-tooltip-e::after{bottom:50%;left:100%;margin-left:5px;-ms-transform:translateY(50%);transform:translateY(50%)}.yoast-tooltip-e::before{top:50%;right:-5px;bottom:50%;margin-top:-5px;border-right-color:rgba(0,0,0,.8)}.yoast-tooltip-multiline::after{width:250px;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:250px;border-collapse:separate;white-space:pre-line;word-wrap:normal;word-break:break-word}.yoast-tooltip-multiline.yoast-tooltip-n::after,.yoast-tooltip-multiline.yoast-tooltip-s::after{right:auto;left:50%;-ms-transform:translateX(-50%);transform:translateX(-50%)}.yoast-tooltip-multiline.yoast-tooltip-e::after,.yoast-tooltip-multiline.yoast-tooltip-w::after{right:100%}@media screen and (min-width:0\0){.yoast-tooltip-multiline::after{width:250px}}.yoast-tooltip-sticky::after,.yoast-tooltip-sticky::before{display:inline-block}.yoast-tooltip-sticky.yoast-tooltip-multiline::after{display:table-cell}@media only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min--moz-device-pixel-ratio:2),only screen and (-moz-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2),only screen and (min-resolution:192dpi),only screen and (min-resolution:2dppx){.yoast-tooltip-w::after{margin-right:4.5px}}.yoast-tooltip.yoast-tooltip-hidden::after,.yoast-tooltip.yoast-tooltip-hidden::before{display:none}.yoast-measure{max-width:600px}#TB_window .wpseo_content_wrapper p{font-size:14px;font-style:normal}#TB_window .wpseo_content_wrapper label{margin:0 10px 0 0;font-size:14px;font-weight:600}.wpseo-premium-popup-title{margin:1em 0!important;padding:0!important;font-size:1.3em!important;font-weight:600!important}.wpseo-premium-popup-icon{margin:10px}.edit-tags-php .column-description img{max-width:100%;height:auto}.select2-search__field{margin:0}.select2-results__option,.select2-search--inline,.select2-selection__choice{margin-bottom:0}.select2-container .select2-search--inline .select2-search__field{margin-top:6px!important;line-height:inherit}.yoast-label-strong{font-weight:600}.yoast-video-container-max-width{max-width:560px}.yoast-video-container{overflow:hidden;position:relative;height:0;padding-bottom:56.25%}.yoast-video-container iframe{position:absolute;top:0;left:0;width:100%;height:100%}.yoast-settings{margin-bottom:2em;padding-left:220px}.yoast-settings h2{margin-bottom:0;margin-left:-220px}.yoast-settings label{display:inline-block;width:200px;margin-right:6px;margin-left:-220px;padding-top:4px;padding-right:10px;color:#23282d;font-size:14px;font-weight:600;line-height:1.3;vertical-align:top}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio,.yoast-settings fieldset,.yoast-settings input[type=text],.yoast-settings label,.yoast-settings select,.yoast-settings textarea{margin-top:2em;margin-bottom:.5em}.yoast-settings__textarea--medium{width:100%;max-width:600px}.yoast .yoast-settings__checkbox,.yoast .yoast-settings__radio{position:relative;top:1px;vertical-align:top}.yoast-settings__group--checkbox,.yoast-settings__group--radio{padding-top:1em}.yoast-settings__group--checkbox .yoast-settings__checkbox,.yoast-settings__group--radio .yoast-settings__radio{margin:0 4px 10px 0}.yoast-settings__checkbox+label,.yoast-settings__radio+label{width:auto;max-width:calc(100% - 25px);margin-right:0;margin-left:0;padding:0}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{margin-top:0;margin-bottom:10px;font-weight:400}.yoast-settings legend{color:#23282d;font-size:14px;font-weight:600}.yoast-settings .description{margin-top:0;font-size:14px}td .wpseo-score-icon{display:inline-block;width:12px;height:12px;margin-left:5px;border-radius:50%;background:#888;line-height:16px;margin-top:3px}.fixed th.column-wpseo-linked,.fixed th.column-wpseo-links,.fixed th.column-wpseo-score,.fixed th.column-wpseo-score-readability{width:3em;padding:0}th.column-wpseo-linked a,th.column-wpseo-links a,th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{display:inline-block;overflow:visible;padding:8px 0;vertical-align:middle}th.column-wpseo-score .yoast-tooltip,th.column-wpseo-score-readability .yoast-tooltip{padding:8px 11px}.column-wpseo-links .yoast-tooltip-multiline::after{width:999px;max-width:160px}.column-wpseo-linked .yoast-tooltip-multiline::after{width:999px;max-width:170px}.yoast-column-header-has-tooltip{position:relative}.manage-column .yoast-column-header-has-tooltip:before{display:inline-block;width:20px;height:20px;padding:0;color:#444;vertical-align:top;text-decoration:none!important;content:""}.manage-column .yoast-linked-to:before{background:url(../../images/link-out-icon.svg) no-repeat;background-size:20px}.manage-column .yoast-linked-from:before{background:url(../../images/link-in-icon.svg) no-repeat;background-size:20px}.manage-column .yoast-column-seo-score:before{background:url(../../images/Yoast_SEO_negative_icon.svg) no-repeat;background-size:20px}.manage-column .yoast-column-readability:before{background:url(../../images/readability-icon.svg) no-repeat;background-size:20px}td.column-wpseo-linked,td.column-wpseo-links{word-wrap:normal}#screen-meta .yoast-column-header-has-tooltip .screen-reader-text{visibility:visible;position:static;width:auto;height:auto}@media screen and (max-width:782px){.yoast-settings{padding-left:0}.yoast-settings h2{margin-left:0}.yoast-settings label{width:auto;margin-right:0;margin-left:0;padding:0}.yoast .yoast-settings__radio,.yoast-settings__radio+label{margin-bottom:1em}.yoast-settings__checkbox+label,.yoast-settings__radio+label{max-width:calc(100% - 35px);padding-top:8px}.yoast-settings__group--checkbox .yoast-settings__checkbox+label,.yoast-settings__group--radio .yoast-settings__radio+label{padding-top:4px}.yoast-settings input[type=text],.yoast-settings select,.yoast-settings textarea{display:block;box-sizing:border-box;width:100%;max-width:none;margin-top:0;margin-bottom:0;padding:7px 10px;line-height:1.5}}#yoast-help-center-container{margin:16px 0 24px}.react-tabs__tab-panel{max-width:900px;margin:0 auto}.react-tabs__tab-panel li{max-width:none!important}.yoast-help-center-open #sidebar-container{display:none}.contact-premium-support{text-align:center}.contact-premium-support__content{margin:0 auto 1.5em;font-size:.9375rem;line-height:1.4}.contact-premium-support__content:nth-child(2){max-width:610px}.contact-premium-support__content:nth-child(3){max-width:560px}.contact-premium-support .contact-premium-support__button{margin-bottom:48px}.wpseo-premium-description{margin-top:.5em}.wpseo-premium-advantages-list{padding-left:1.5em;list-style:disc}.yoast_help.yoast-help-button{overflow:visible;position:relative;width:20px;height:20px;margin:0;padding:0;border:0;outline:0;color:#72777c;background:0 0;box-shadow:none;vertical-align:top;cursor:pointer}.help-button-inline .yoast_help.yoast-help-button{margin-top:-4px}.yoast-section .yoast_help.yoast-help-button{float:right;margin-top:-44px}.wpseo-admin-page .yoast_help.yoast-help-button{margin-right:6px}.yoast_help .yoast-help-icon::before{position:absolute;top:0;left:0;padding:4px;content:"\f223"}.yoast_help.yoast-help-button:focus,.yoast_help.yoast-help-button:hover{color:#0073aa}.assessment-results__mark:focus,.yoast_help.yoast-help-button:focus .yoast-help-icon::before{border-radius:100%;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}.yoast-help-panel{display:none;clear:both;max-width:30em!important;padding:0 0 1em;font-weight:400;white-space:normal}.wpseo-admin-page .yoast-help-panel{max-width:600px!important}.copy-home-meta-description .yoast-help-panel{max-width:400px!important}.yoast-modal_is-open{overflow:hidden}
css/dist/{adminbar-730-rtl.min.css → adminbar-740-rtl.min.css} RENAMED
File without changes
css/dist/{adminbar-730.min.css → adminbar-740.min.css} RENAMED
File without changes
css/dist/{alerts-730-rtl.min.css → alerts-740-rtl.min.css} RENAMED
File without changes
css/dist/{alerts-730.min.css → alerts-740.min.css} RENAMED
File without changes
css/dist/{dashboard-730-rtl.min.css → dashboard-740-rtl.min.css} RENAMED
File without changes
css/dist/{dashboard-730.min.css → dashboard-740.min.css} RENAMED
File without changes
css/dist/{edit-page-730-rtl.min.css → edit-page-740-rtl.min.css} RENAMED
File without changes
css/dist/{edit-page-730.min.css → edit-page-740.min.css} RENAMED
File without changes
css/dist/{featured-image-730-rtl.min.css → featured-image-740-rtl.min.css} RENAMED
File without changes
css/dist/{featured-image-730.min.css → featured-image-740.min.css} RENAMED
File without changes
css/dist/{filter-explanation-730-rtl.min.css → filter-explanation-740-rtl.min.css} RENAMED
File without changes
css/dist/{filter-explanation-730.min.css → filter-explanation-740.min.css} RENAMED
File without changes
css/dist/{inside-editor-730-rtl.min.css → inside-editor-740-rtl.min.css} RENAMED
File without changes
css/dist/{inside-editor-730.min.css → inside-editor-740.min.css} RENAMED
File without changes
css/dist/{metabox-730-rtl.min.css → metabox-740-rtl.min.css} RENAMED
File without changes
css/dist/{metabox-730.min.css → metabox-740.min.css} RENAMED
File without changes
css/dist/{metabox-primary-category-730-rtl.min.css → metabox-primary-category-740-rtl.min.css} RENAMED
File without changes
css/dist/{metabox-primary-category-730.min.css → metabox-primary-category-740.min.css} RENAMED
File without changes
css/dist/{snippet-730-rtl.min.css → snippet-740-rtl.min.css} RENAMED
File without changes
css/dist/{snippet-730.min.css → snippet-740.min.css} RENAMED
File without changes
css/dist/{toggle-switch-730-rtl.min.css → toggle-switch-740-rtl.min.css} RENAMED
File without changes
css/dist/{toggle-switch-730.min.css → toggle-switch-740.min.css} RENAMED
File without changes
css/dist/{wpseo-dismissible-730-rtl.min.css → wpseo-dismissible-740-rtl.min.css} RENAMED
File without changes
css/dist/{wpseo-dismissible-730.min.css → wpseo-dismissible-740.min.css} RENAMED
File without changes
css/dist/{yoast-components-730-rtl.min.css → yoast-components-740-rtl.min.css} RENAMED
File without changes
css/dist/{yoast-components-730.min.css → yoast-components-740.min.css} RENAMED
File without changes
css/dist/{yoast-extensions-730-rtl.min.css → yoast-extensions-740-rtl.min.css} RENAMED
File without changes
css/dist/{yoast-extensions-730.min.css → yoast-extensions-740.min.css} RENAMED
File without changes
css/dist/{yst_plugin_tools-730-rtl.min.css → yst_plugin_tools-740-rtl.min.css} RENAMED
File without changes
css/dist/{yst_plugin_tools-730.min.css → yst_plugin_tools-740.min.css} RENAMED
File without changes
css/dist/{yst_seo_score-730-rtl.min.css → yst_seo_score-740-rtl.min.css} RENAMED
File without changes
css/dist/{yst_seo_score-730.min.css → yst_seo_score-740.min.css} RENAMED
File without changes
frontend/class-frontend.php CHANGED
@@ -1237,13 +1237,16 @@ class WPSEO_Frontend {
1237
  }
1238
  elseif ( $this->frontend_page_type->is_simple_page() ) {
1239
  $post = get_post( $this->frontend_page_type->get_simple_page_id() );
1240
- $post_type = $post->post_type;
1241
 
1242
  if ( ( $metadesc === '' && $post_type !== '' ) && WPSEO_Options::get( 'metadesc-' . $post_type, '' ) !== '' ) {
1243
  $template = WPSEO_Options::get( 'metadesc-' . $post_type );
1244
  $term = $post;
1245
  }
1246
- $metadesc_override = $this->get_seo_meta_value( 'metadesc', $post->ID );
 
 
 
1247
  }
1248
  else {
1249
  if ( is_search() ) {
1237
  }
1238
  elseif ( $this->frontend_page_type->is_simple_page() ) {
1239
  $post = get_post( $this->frontend_page_type->get_simple_page_id() );
1240
+ $post_type = isset( $post->post_type ) ? $post->post_type : '';
1241
 
1242
  if ( ( $metadesc === '' && $post_type !== '' ) && WPSEO_Options::get( 'metadesc-' . $post_type, '' ) !== '' ) {
1243
  $template = WPSEO_Options::get( 'metadesc-' . $post_type );
1244
  $term = $post;
1245
  }
1246
+
1247
+ if ( is_object( $post ) ) {
1248
+ $metadesc_override = $this->get_seo_meta_value( 'metadesc', $post->ID );
1249
+ }
1250
  }
1251
  else {
1252
  if ( is_search() ) {
frontend/class-opengraph-image.php CHANGED
@@ -9,176 +9,220 @@
9
  * Class WPSEO_OpenGraph_Image
10
  */
11
  class WPSEO_OpenGraph_Image {
 
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  /**
14
- * @var array $images Holds the images that have been put out as OG image.
 
 
15
  */
16
- private $images = array();
 
 
 
 
 
17
 
18
  /**
19
- * @todo This needs to be refactored since we only hold one set of dimensions for multiple images. R.
20
- * @var array $dimensions Holds image dimensions, if determined.
 
21
  */
22
- protected $dimensions = array();
 
 
 
 
 
 
 
23
 
24
  /**
25
  * Constructor.
26
  *
27
- * @param string|boolean $image Optional image URL.
 
28
  */
29
- public function __construct( $image = false ) {
30
- // If an image was not supplied or could not be added.
31
- if ( empty( $image ) || ! $this->add_image( $image ) ) {
32
- $this->set_images();
 
 
 
 
 
 
33
  }
 
 
 
 
 
 
 
 
34
  }
35
 
36
  /**
37
- * Return the images array.
38
- *
39
- * @return array
40
  */
41
- public function get_images() {
42
- return $this->images;
 
 
 
43
  }
44
 
45
  /**
46
- * Return the dimensions array.
47
  *
48
- * @return array
 
 
49
  */
50
- public function get_dimensions() {
51
- return $this->dimensions;
 
 
 
 
52
  }
53
 
54
  /**
55
- * Display an OpenGraph image tag.
56
  *
57
- * @param string $img Source URL to the image.
58
  *
59
- * @return bool
60
  */
61
- public function add_image( $img ) {
62
-
63
- $original = trim( $img );
64
-
65
- // Filter: 'wpseo_opengraph_image' - Allow changing the OpenGraph image.
66
- $img = trim( apply_filters( 'wpseo_opengraph_image', $img ) );
67
-
68
- if ( $original !== $img ) {
69
- $this->dimensions = array();
70
- }
71
 
72
- if ( empty( $img ) ) {
73
- return false;
 
74
  }
 
75
 
76
- if ( WPSEO_Utils::is_url_relative( $img ) === true ) {
77
- $img = $this->get_relative_path( $img );
78
- }
79
-
80
- if ( in_array( $img, $this->images, true ) ) {
81
- return false;
82
- }
83
- array_push( $this->images, $img );
84
-
85
- return true;
86
  }
87
 
88
  /**
89
- * Check if page is front page or singular and call the corresponding functions. If not, call get_default_image.
 
 
90
  */
91
- private function set_images() {
 
 
92
 
 
 
 
 
 
 
 
 
93
  /**
94
- * Filter: wpseo_add_opengraph_images - Allow developers to add images to the OpenGraph tags.
95
  *
96
- * @api WPSEO_OpenGraph_Image The current object.
97
  */
98
- do_action( 'wpseo_add_opengraph_images', $this );
99
-
100
- if ( is_front_page() ) {
101
- $this->get_front_page_image();
102
- }
103
- elseif ( is_home() ) { // Posts page, which won't be caught by is_singular() below.
104
- $this->get_posts_page_image();
105
  }
106
 
107
- $frontend_page_type = new WPSEO_Frontend_Page_Type();
108
- if ( $frontend_page_type->is_simple_page() ) {
109
- $this->get_singular_image( $frontend_page_type->get_simple_page_id() );
110
  }
111
 
112
- if ( is_category() || is_tax() || is_tag() ) {
113
- $this->get_opengraph_image_taxonomy();
114
  }
115
 
116
- /**
117
- * Filter: wpseo_add_opengraph_additional_images - Allows to add additional images to the OpenGraph tags.
118
- *
119
- * @api WPSEO_OpenGraph_Image The current object.
120
- */
121
- do_action( 'wpseo_add_opengraph_additional_images', $this );
122
-
123
- $this->get_default_image();
124
  }
125
 
126
  /**
127
  * If the frontpage image exists, call add_image.
128
  */
129
- private function get_front_page_image() {
130
- if ( WPSEO_Options::get( 'og_frontpage_image', '' ) !== '' ) {
131
- $this->add_image( WPSEO_Options::get( 'og_frontpage_image' ) );
 
132
  }
 
 
133
  }
134
 
135
  /**
136
  * Get the images of the posts page.
 
 
137
  */
138
- private function get_posts_page_image() {
139
-
140
  $post_id = get_option( 'page_for_posts' );
141
 
142
- if ( $this->get_opengraph_image_post( $post_id ) ) {
 
143
  return;
144
  }
145
 
146
- if ( $this->get_featured_image( $post_id ) ) {
147
- return;
148
- }
149
  }
150
 
151
  /**
152
  * Get the images of the singular post.
153
  *
154
  * @param null|int $post_id The post id to get the images for.
 
 
155
  */
156
- private function get_singular_image( $post_id = null ) {
157
  if ( $post_id === null ) {
158
- $post_id = get_the_ID();
159
- }
160
-
161
- if ( $this->get_opengraph_image_post( $post_id ) ) {
162
- return;
163
  }
164
 
165
- if ( $this->get_attachment_page_image( $post_id ) ) {
 
166
  return;
167
  }
168
 
169
- if ( $this->get_featured_image( $post_id ) ) {
 
170
  return;
171
  }
172
 
173
- $this->get_content_images( get_post( $post_id ) );
174
  }
175
 
176
  /**
177
  * Get default image and call add_image.
178
  */
179
- private function get_default_image() {
180
- if ( count( $this->images ) === 0 && WPSEO_Options::get( 'og_default_image', '' ) !== '' ) {
181
- $this->add_image( WPSEO_Options::get( 'og_default_image' ) );
182
  }
183
  }
184
 
@@ -186,28 +230,18 @@ class WPSEO_OpenGraph_Image {
186
  * If opengraph-image is set, call add_image and return true.
187
  *
188
  * @param int $post_id Optional post ID to use.
189
- *
190
- * @return bool
191
  */
192
- private function get_opengraph_image_post( $post_id = 0 ) {
193
- $ogimg = WPSEO_Meta::get_value( 'opengraph-image', $post_id );
194
- if ( $ogimg !== '' ) {
195
- $this->add_image( $ogimg );
196
-
197
- return true;
198
- }
199
-
200
- return false;
201
  }
202
 
203
  /**
204
  * Check if taxonomy has an image and add this image.
205
  */
206
- private function get_opengraph_image_taxonomy() {
207
- $ogimg = WPSEO_Taxonomy_Meta::get_meta_without_term( 'opengraph-image' );
208
- if ( $ogimg !== '' ) {
209
- $this->add_image( $ogimg );
210
- }
211
  }
212
 
213
  /**
@@ -215,108 +249,129 @@ class WPSEO_OpenGraph_Image {
215
  *
216
  * @param int $post_id The post ID.
217
  *
218
- * @return bool
219
  */
220
- private function get_featured_image( $post_id ) {
221
-
222
  if ( has_post_thumbnail( $post_id ) ) {
223
- /**
224
- * Filter: 'wpseo_opengraph_image_size' - Allow changing the image size used for OpenGraph sharing.
225
- *
226
- * @api string $unsigned Size string.
227
- */
228
- $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), apply_filters( 'wpseo_opengraph_image_size', 'original' ) );
229
-
230
- if ( $this->check_featured_image_size( $thumb ) ) {
231
-
232
- $this->dimensions['width'] = $thumb[1];
233
- $this->dimensions['height'] = $thumb[2];
234
-
235
- return $this->add_image( $thumb[0] );
236
- }
237
  }
238
-
239
- return false;
240
  }
241
 
242
  /**
243
- * If this is an attachment page, call add_image with the attachment and return true.
244
  *
245
- * @param int $post_id The post ID.
246
- *
247
- * @return bool
248
  */
249
- private function get_attachment_page_image( $post_id ) {
250
- if ( get_post_type( $post_id ) === 'attachment' ) {
251
- $mime_type = get_post_mime_type( $post_id );
252
- switch ( $mime_type ) {
253
- case 'image/jpeg':
254
- case 'image/png':
255
- case 'image/gif':
256
- return $this->add_image( wp_get_attachment_url( $post_id ) );
257
- }
258
  }
259
-
260
- return false;
261
  }
262
 
263
  /**
264
- * Filter: 'wpseo_pre_analysis_post_content' - Allow filtering the content before analysis.
265
- *
266
- * @api string $post_content The Post content string.
267
  *
268
  * @param object $post The post object.
 
 
269
  */
270
- private function get_content_images( $post ) {
271
- $content = apply_filters( 'wpseo_pre_analysis_post_content', $post->post_content, $post );
272
-
273
- if ( preg_match_all( '`<img [^>]+>`', $content, $matches ) ) {
274
- foreach ( $matches[0] as $img ) {
275
- if ( preg_match( '`src=(["\'])(.*?)\1`', $img, $match ) ) {
276
- $this->add_image( $match[2] );
277
- }
 
 
 
 
 
 
 
278
  }
279
  }
280
  }
281
 
282
  /**
283
- * Check size of featured image. If image is too small, return false, else return true.
284
  *
285
- * @param array $img_data Image info from wp_get_attachment_image_src: url, width, height, icon.
286
  *
287
- * @return bool
288
  */
289
- private function check_featured_image_size( $img_data ) {
290
-
291
- if ( ! is_array( $img_data ) ) {
292
- return false;
293
  }
294
 
295
- // Get the width and height of the image.
296
- if ( $img_data[1] < 200 || $img_data[2] < 200 ) {
297
- return false;
 
298
  }
299
 
300
- return true;
301
  }
302
 
303
  /**
304
- * Get the relative path of the image.
305
  *
306
- * @param array $img Image data array.
307
  *
308
- * @return bool|string
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  */
310
- private function get_relative_path( $img ) {
311
- if ( $img[0] !== '/' ) {
312
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  }
314
 
315
- // If it's a relative URL, it's relative to the domain, not necessarily to the WordPress install, we
316
- // want to preserve domain name and URL scheme (http / https) though.
317
- $parsed_url = wp_parse_url( home_url() );
318
- $img = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $img;
 
 
319
 
320
- return $img;
321
  }
322
  }
9
  * Class WPSEO_OpenGraph_Image
10
  */
11
  class WPSEO_OpenGraph_Image {
12
+ /**
13
+ * Holds the images that have been put out as OG image.
14
+ *
15
+ * @var array
16
+ */
17
+ protected $images = array();
18
+
19
+ /**
20
+ * Holds the WPSEO_OpenGraph instance, so we can call og_tag.
21
+ *
22
+ * @var WPSEO_OpenGraph
23
+ */
24
+ private $opengraph;
25
 
26
  /**
27
+ * Image tags that we output for each image.
28
+ *
29
+ * @var array
30
  */
31
+ private $image_tags = array(
32
+ 'width' => 'width',
33
+ 'height' => 'height',
34
+ 'alt' => 'alt',
35
+ 'mime-type' => 'type',
36
+ );
37
 
38
  /**
39
+ * The parameters we have for Facebook images.
40
+ *
41
+ * @var array
42
  */
43
+ private $image_params = array(
44
+ 'min_width' => 200,
45
+ 'max_width' => 2000,
46
+ 'min_height' => 200,
47
+ 'max_height' => 2000,
48
+ 'min_ratio' => 1,
49
+ 'max_ratio' => 3,
50
+ );
51
 
52
  /**
53
  * Constructor.
54
  *
55
+ * @param null|string $image Optional. The Image to use.
56
+ * @param WPSEO_OpenGraph $opengraph Optional. The OpenGraph object.
57
  */
58
+ public function __construct( $image = null, WPSEO_OpenGraph $opengraph = null ) {
59
+ if ( $opengraph === null ) {
60
+ global $wpseo_og;
61
+
62
+ // Use the global if available.
63
+ if ( empty( $wpseo_og ) ) {
64
+ $wpseo_og = new WPSEO_OpenGraph();
65
+ }
66
+
67
+ $opengraph = $wpseo_og;
68
  }
69
+
70
+ $this->opengraph = $opengraph;
71
+
72
+ if ( ! empty( $image ) && is_string( $image ) ) {
73
+ $this->add_image_by_url( $image );
74
+ }
75
+
76
+ $this->set_images();
77
  }
78
 
79
  /**
80
+ * Outputs the images.
 
 
81
  */
82
+ public function show() {
83
+ foreach ( $this->get_images() as $image => $image_meta ) {
84
+ $this->og_image_tag( $image );
85
+ $this->show_image_meta( $image_meta );
86
+ }
87
  }
88
 
89
  /**
90
+ * Output the image metadata.
91
  *
92
+ * @param array $image_meta Image meta data to output.
93
+ *
94
+ * @return void
95
  */
96
+ private function show_image_meta( $image_meta ) {
97
+ foreach ( $this->image_tags as $key => $value ) {
98
+ if ( ! empty( $image_meta[ $key ] ) ) {
99
+ $this->opengraph->og_tag( 'og:image:' . $key, $image_meta[ $key ] );
100
+ }
101
+ }
102
  }
103
 
104
  /**
105
+ * Outputs an image tag based on whether it's https or not.
106
  *
107
+ * @param string $image_url The image URL.
108
  *
109
+ * @return void
110
  */
111
+ private function og_image_tag( $image_url ) {
112
+ $this->opengraph->og_tag( 'og:image', esc_url( $image_url ) );
 
 
 
 
 
 
 
 
113
 
114
+ // Add secure URL if detected. Not all services implement this, so the regular one also needs to be rendered.
115
+ if ( strpos( $image_url, 'https://' ) === 0 ) {
116
+ $this->opengraph->og_tag( 'og:image:secure_url', esc_url( $image_url ) );
117
  }
118
+ }
119
 
120
+ /**
121
+ * Return the images array.
122
+ *
123
+ * @return array
124
+ */
125
+ public function get_images() {
126
+ return $this->images;
 
 
 
127
  }
128
 
129
  /**
130
+ * Check whether we have images or not.
131
+ *
132
+ * @return bool True if we have images, false if we don't.
133
  */
134
+ public function has_images() {
135
+ return ! empty( $this->images );
136
+ }
137
 
138
+ /**
139
+ * Display an OpenGraph image tag.
140
+ *
141
+ * @param array $attachment Attachment array.
142
+ *
143
+ * @return void
144
+ */
145
+ public function add_image( $attachment ) {
146
  /**
147
+ * Filter: 'wpseo_opengraph_image' - Allow changing the OpenGraph image.
148
  *
149
+ * @api string - The URL of the OpenGraph image.
150
  */
151
+ $image_url = trim( apply_filters( 'wpseo_opengraph_image', $attachment['url'] ) );
152
+ if ( empty( $image_url ) ) {
153
+ return;
 
 
 
 
154
  }
155
 
156
+ if ( WPSEO_Utils::is_url_relative( $image_url ) === true ) {
157
+ $image_url = WPSEO_Image_Utils::get_relative_path( $image_url );
 
158
  }
159
 
160
+ if ( array_key_exists( $image_url, $this->images ) ) {
161
+ return;
162
  }
163
 
164
+ $this->images[ $image_url ] = $attachment;
 
 
 
 
 
 
 
165
  }
166
 
167
  /**
168
  * If the frontpage image exists, call add_image.
169
  */
170
+ private function set_front_page_image() {
171
+ // If no frontpage image is found, don't add anything.
172
+ if ( WPSEO_Options::get( 'og_frontpage_image', '' ) === '' ) {
173
+ return;
174
  }
175
+
176
+ $this->add_image_by_url( WPSEO_Options::get( 'og_frontpage_image' ) );
177
  }
178
 
179
  /**
180
  * Get the images of the posts page.
181
+ *
182
+ * @return void
183
  */
184
+ private function set_posts_page_image() {
 
185
  $post_id = get_option( 'page_for_posts' );
186
 
187
+ $this->set_image_post_meta( $post_id );
188
+ if ( $this->has_images() ) {
189
  return;
190
  }
191
 
192
+ $this->set_featured_image( $post_id );
 
 
193
  }
194
 
195
  /**
196
  * Get the images of the singular post.
197
  *
198
  * @param null|int $post_id The post id to get the images for.
199
+ *
200
+ * @return void
201
  */
202
+ private function set_singular_image( $post_id = null ) {
203
  if ( $post_id === null ) {
204
+ $post_id = get_queried_object_id();
 
 
 
 
205
  }
206
 
207
+ $this->set_image_post_meta( $post_id );
208
+ if ( $this->has_images() ) {
209
  return;
210
  }
211
 
212
+ $this->set_featured_image( $post_id );
213
+ if ( $this->has_images() ) {
214
  return;
215
  }
216
 
217
+ $this->add_content_images( get_post( $post_id ) );
218
  }
219
 
220
  /**
221
  * Get default image and call add_image.
222
  */
223
+ private function maybe_set_default_image() {
224
+ if ( ! $this->has_images() && WPSEO_Options::get( 'og_default_image', '' ) !== '' ) {
225
+ $this->add_image_by_url( WPSEO_Options::get( 'og_default_image' ) );
226
  }
227
  }
228
 
230
  * If opengraph-image is set, call add_image and return true.
231
  *
232
  * @param int $post_id Optional post ID to use.
 
 
233
  */
234
+ private function set_image_post_meta( $post_id = 0 ) {
235
+ $image_url = WPSEO_Meta::get_value( 'opengraph-image', $post_id );
236
+ $this->add_image_by_url( $image_url );
 
 
 
 
 
 
237
  }
238
 
239
  /**
240
  * Check if taxonomy has an image and add this image.
241
  */
242
+ private function set_taxonomy_image() {
243
+ $image_url = WPSEO_Taxonomy_Meta::get_meta_without_term( 'opengraph-image' );
244
+ $this->add_image_by_url( $image_url );
 
 
245
  }
246
 
247
  /**
249
  *
250
  * @param int $post_id The post ID.
251
  *
252
+ * @return void
253
  */
254
+ private function set_featured_image( $post_id ) {
 
255
  if ( has_post_thumbnail( $post_id ) ) {
256
+ $attachment_id = get_post_thumbnail_id( $post_id );
257
+ $this->add_image_by_id( $attachment_id );
 
 
 
 
 
 
 
 
 
 
 
 
258
  }
 
 
259
  }
260
 
261
  /**
262
+ * If this is an attachment page, call add_image with the attachment.
263
  *
264
+ * @return void
 
 
265
  */
266
+ private function set_attachment_page_image() {
267
+ $post_id = get_queried_object_id();
268
+ if ( wp_attachment_is_image( $post_id ) ) {
269
+ $this->add_image_by_id( $post_id );
 
 
 
 
 
270
  }
 
 
271
  }
272
 
273
  /**
274
+ * Retrieve images from the post content.
 
 
275
  *
276
  * @param object $post The post object.
277
+ *
278
+ * @return void
279
  */
280
+ private function add_content_images( $post ) {
281
+ $image_finder = new WPSEO_Content_Images();
282
+ $images = $image_finder->get_images( $post->ID, $post );
283
+
284
+ if ( ! is_array( $images ) || $images === array() ) {
285
+ return;
286
+ }
287
+
288
+ foreach ( $images as $image_url => $attachment_id ) {
289
+ if ( $attachment_id !== 0 ) {
290
+ $this->add_image_by_id( $attachment_id );
291
+ }
292
+
293
+ if ( $attachment_id === 0 ) {
294
+ $this->add_image_by_url( $image_url );
295
  }
296
  }
297
  }
298
 
299
  /**
300
+ * Adds an image based on a given URL, and attempts to be smart about it.
301
  *
302
+ * @param string $url The given URL.
303
  *
304
+ * @return void
305
  */
306
+ protected function add_image_by_url( $url ) {
307
+ if ( empty( $url ) ) {
308
+ return;
 
309
  }
310
 
311
+ $attachment_id = WPSEO_Image_Utils::get_attachment_by_url( $url );
312
+ if ( $attachment_id > 0 ) {
313
+ $this->add_image_by_id( $attachment_id );
314
+ return;
315
  }
316
 
317
+ $this->add_image( array( 'url' => $url ) );
318
  }
319
 
320
  /**
321
+ * Adds an image to the list by attachment ID.
322
  *
323
+ * @param int $attachment_id The attachment ID to add.
324
  *
325
+ * @return void
326
+ */
327
+ protected function add_image_by_id( $attachment_id ) {
328
+ if ( ! WPSEO_Image_Utils::has_usable_dimensions( $attachment_id, $this->image_params ) ) {
329
+ return;
330
+ }
331
+
332
+ $attachment = WPSEO_Image_Utils::get_optimal_variation( $attachment_id );
333
+ if ( $attachment ) {
334
+ $this->add_image( $attachment );
335
+ }
336
+ }
337
+
338
+ /**
339
+ * Sets the images based on the page type.
340
  */
341
+ private function set_images() {
342
+ /**
343
+ * Filter: wpseo_add_opengraph_images - Allow developers to add images to the OpenGraph tags.
344
+ *
345
+ * @api WPSEO_OpenGraph_Image The current object.
346
+ */
347
+ do_action( 'wpseo_add_opengraph_images', $this );
348
+
349
+ switch ( true ) {
350
+ case is_front_page():
351
+ $this->set_front_page_image();
352
+ break;
353
+ case is_home():
354
+ $this->set_posts_page_image();
355
+ break;
356
+ case is_attachment():
357
+ $this->set_attachment_page_image();
358
+ break;
359
+ case is_singular():
360
+ $this->set_singular_image();
361
+ break;
362
+ case is_category():
363
+ case is_tag():
364
+ case is_tax():
365
+ $this->set_taxonomy_image();
366
  }
367
 
368
+ /**
369
+ * Filter: wpseo_add_opengraph_additional_images - Allows to add additional images to the OpenGraph tags.
370
+ *
371
+ * @api WPSEO_OpenGraph_Image The current object.
372
+ */
373
+ do_action( 'wpseo_add_opengraph_additional_images', $this );
374
 
375
+ $this->maybe_set_default_image();
376
  }
377
  }
frontend/class-opengraph.php CHANGED
@@ -531,37 +531,13 @@ class WPSEO_OpenGraph {
531
  /**
532
  * Create new WPSEO_OpenGraph_Image class and get the images to set the og:image.
533
  *
534
- * @param string|boolean $image Optional image URL.
535
- */
536
- public function image( $image = false ) {
537
- $opengraph_images = new WPSEO_OpenGraph_Image( $image );
538
-
539
- foreach ( $opengraph_images->get_images() as $img ) {
540
- $this->og_tag( 'og:image', esc_url( $img ) );
541
-
542
- if ( 0 === strpos( $img, 'https://' ) ) {
543
- $this->og_tag( 'og:image:secure_url', esc_url( $img ) );
544
- }
545
- }
546
-
547
- $dimensions = $opengraph_images->get_dimensions();
548
-
549
- if ( ! empty( $dimensions['width'] ) ) {
550
- $this->og_tag( 'og:image:width', absint( $dimensions['width'] ) );
551
- }
552
-
553
- if ( ! empty( $dimensions['height'] ) ) {
554
- $this->og_tag( 'og:image:height', absint( $dimensions['height'] ) );
555
- }
556
- }
557
-
558
- /**
559
- * Fallback method for plugins using image_output.
560
  *
561
- * @param string $image Image URL.
562
  */
563
- public function image_output( $image ) {
564
- $this->image( $image );
 
565
  }
566
 
567
  /**
@@ -779,4 +755,18 @@ class WPSEO_OpenGraph {
779
  }
780
  }
781
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
782
  } /* End of class */
531
  /**
532
  * Create new WPSEO_OpenGraph_Image class and get the images to set the og:image.
533
  *
534
+ * @param string|bool $image Optional. Image URL.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  *
536
+ * @return void
537
  */
538
+ public function image( $image = false ) {
539
+ $opengraph_image = new WPSEO_OpenGraph_Image( $image, $this );
540
+ $opengraph_image->show();
541
  }
542
 
543
  /**
755
  }
756
  }
757
 
758
+ /**
759
+ * Fallback method for plugins using image_output.
760
+ *
761
+ * @param string|bool $image Image URL.
762
+ *
763
+ * @deprecated 7.4
764
+ * @codeCoverageIgnore
765
+ */
766
+ public function image_output( $image = false ) {
767
+ _deprecated_function( 'WPSEO_OpenGraph::image_output', '7.4', 'WPSEO_OpenGraph::image' );
768
+
769
+ $this->image( $image );
770
+ }
771
+
772
  } /* End of class */
frontend/class-twitter.php CHANGED
@@ -621,7 +621,12 @@ class WPSEO_Twitter {
621
  * Displays the authors Twitter account.
622
  */
623
  protected function author() {
624
- $twitter = ltrim( trim( get_the_author_meta( 'twitter', get_post()->post_author ) ), '@' );
 
 
 
 
 
625
  /**
626
  * Filter: 'wpseo_twitter_creator_account' - Allow changing the Twitter account as output in the Twitter card by Yoast SEO
627
  *
621
  * Displays the authors Twitter account.
622
  */
623
  protected function author() {
624
+ $post = get_post();
625
+
626
+ $twitter = null;
627
+ if ( is_object( $post ) ) {
628
+ $twitter = ltrim( trim( get_the_author_meta( 'twitter', $post->post_author ) ), '@' );
629
+ }
630
  /**
631
  * Filter: 'wpseo_twitter_creator_account' - Allow changing the Twitter account as output in the Twitter card by Yoast SEO
632
  *
inc/class-post-type.php CHANGED
@@ -19,6 +19,7 @@ class WPSEO_Post_Type {
19
  */
20
  public static function get_accessible_post_types() {
21
  $post_types = get_post_types( array( 'public' => true ) );
 
22
 
23
  /**
24
  * Filter: 'wpseo_accessible_post_types' - Allow changing the accessible post types.
19
  */
20
  public static function get_accessible_post_types() {
21
  $post_types = get_post_types( array( 'public' => true ) );
22
+ $post_types = array_filter( $post_types, 'is_post_type_viewable' );
23
 
24
  /**
25
  * Filter: 'wpseo_accessible_post_types' - Allow changing the accessible post types.
inc/class-upgrade.php CHANGED
@@ -103,6 +103,10 @@ class WPSEO_Upgrade {
103
  $this->upgrade_73();
104
  }
105
 
 
 
 
 
106
  // Since 3.7.
107
  $upsell_notice = new WPSEO_Product_Upsell_Notice();
108
  $upsell_notice->set_upgrade_notice();
@@ -543,6 +547,29 @@ class WPSEO_Upgrade {
543
  delete_option( 'whip_dismiss_timestamp' );
544
  }
545
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
  /**
547
  * Retrieves the option value directly from the database.
548
  *
103
  $this->upgrade_73();
104
  }
105
 
106
+ if ( version_compare( $version, '7.4-RC0', '<' ) ) {
107
+ $this->upgrade_74();
108
+ }
109
+
110
  // Since 3.7.
111
  $upsell_notice = new WPSEO_Product_Upsell_Notice();
112
  $upsell_notice->set_upgrade_notice();
547
  delete_option( 'whip_dismiss_timestamp' );
548
  }
549
 
550
+ /**
551
+ * Performs the 7.4 upgrade.
552
+ *
553
+ * @return void
554
+ */
555
+ private function upgrade_74() {
556
+ $this->remove_sitemap_validators();
557
+ }
558
+
559
+ /**
560
+ * Removes all sitemap validators.
561
+ *
562
+ * This should be executed on every upgrade routine until we have removed the sitemap caching in the database.
563
+ *
564
+ * @return void
565
+ */
566
+ private function remove_sitemap_validators() {
567
+ global $wpdb;
568
+
569
+ // Remove all sitemap validators.
570
+ $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name LIKE 'wpseo_sitemap%validator%'" );
571
+ }
572
+
573
  /**
574
  * Retrieves the option value directly from the database.
575
  *
inc/class-wpseo-content-images.php ADDED
@@ -0,0 +1,168 @@