All in One SEO Pack - Version 3.3

Version Description

Download this release

Release Info

Developer hallsofmontezuma
Plugin Icon 128x128 All in One SEO Pack
Version 3.3
Comparing to
See all releases

Code changes from version 3.2.10 to 3.3

Files changed (35) hide show
  1. admin/aioseop_module_class.php +7 -7
  2. admin/class-aioseop-helper.php +13 -3
  3. admin/display/general-metaboxes.php +4 -0
  4. aioseop_class.php +240 -305
  5. all_in_one_seo_pack.php +7 -8
  6. css/modules/aioseop_module.css +12 -6
  7. css/modules/aioseop_module.min.css +1 -1
  8. inc/aioseop_functions.php +28 -63
  9. inc/aiosp_common.php +1 -1
  10. inc/compatability/compat-gutenberg.php +0 -68
  11. inc/compatability/php-functions.php +0 -25
  12. inc/{compatability → compatibility}/abstract/aiosep_compatible.php +0 -0
  13. inc/{compatability → compatibility}/abstract/index.php +0 -0
  14. inc/{compatability → compatibility}/compat-init.php +2 -2
  15. inc/{compatability → compatibility}/compat-wpml.php +1 -1
  16. inc/{compatability → compatibility}/gutenberg-chrome.php +1 -1
  17. inc/{compatability → compatibility}/index.php +0 -0
  18. inc/compatibility/php-functions.php +88 -0
  19. inc/general/aioseop-robots-meta.php +379 -0
  20. inc/schema/graphs/graph-organization.php +37 -9
  21. inc/schema/graphs/graph-webpage.php +3 -3
  22. inc/schema/graphs/graph.php +1 -1
  23. inc/schema/schema-builder.php +1 -1
  24. js/{count-chars.js → admin/aioseop-count-chars-old.js} +0 -0
  25. js/{count-chars.min.js → admin/aioseop-count-chars-old.min.js} +0 -0
  26. js/admin/aioseop-count-chars.js +362 -0
  27. js/admin/aioseop-count-chars.min.js +1 -0
  28. js/admin/aioseop-preview-snippet.js +183 -0
  29. js/admin/aioseop-preview-snippet.min.js +1 -0
  30. js/aioseop-helper.js +1 -1
  31. modules/aioseop_importer_exporter.php +1 -1
  32. modules/aioseop_opengraph.php +235 -145
  33. modules/aioseop_sitemap.php +3 -3
  34. public/google-analytics.php +59 -20
  35. readme.txt +4 -3
admin/aioseop_module_class.php CHANGED
@@ -484,7 +484,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
484
  */
485
  function strlen( $string ) {
486
  if ( function_exists( 'mb_strlen' ) ) {
487
- return mb_strlen( $string );
488
  }
489
 
490
  return strlen( $string );
@@ -520,7 +520,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
520
  */
521
  function strpos( $haystack, $needle, $offset = 0 ) {
522
  if ( function_exists( 'mb_strpos' ) ) {
523
- return mb_strpos( $haystack, $needle, $offset );
524
  }
525
 
526
  return strpos( $haystack, $needle, $offset );
@@ -538,7 +538,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
538
  */
539
  function strrpos( $haystack, $needle, $offset = 0 ) {
540
  if ( function_exists( 'mb_strrpos' ) ) {
541
- return mb_strrpos( $haystack, $needle, $offset );
542
  }
543
 
544
  return strrpos( $haystack, $needle, $offset );
@@ -1325,10 +1325,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1325
  */
1326
  function csv_to_array( $csv ) {
1327
  $args = array();
1328
- if ( ! function_exists( 'str_getcsv' ) ) {
1329
  $v = $this->str_getcsv( $csv );
1330
  } else {
1331
- $v = str_getcsv( $csv );
1332
  }
1333
  $size = count( $v );
1334
  if ( is_array( $v ) && isset( $v[0] ) && $size >= 2 ) {
@@ -2101,7 +2101,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2101
  * @since ?
2102
  * @since 2.3.12.3 Add missing wp_enqueue_media.
2103
  * @since 2.9 Switch to admin_enqueue_scripts; both the hook and function name.
2104
- * @since 3.0 Add enqueue footer JS for jQuery UI Compatability. #1850
2105
  *
2106
  * @see 'admin_enqueue_scripts' hook
2107
  * @link https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
@@ -2964,7 +2964,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2964
  if ( ! ( 'opengraph' === $location && in_array( $k, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) ) {
2965
  $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
2966
  }
2967
- $this->options[ $k ] = htmlspecialchars( $this->options[ $k ], ENT_QUOTES );
2968
  break;
2969
  case 'filename':
2970
  $this->options[ $k ] = sanitize_file_name( $this->options[ $k ] );
484
  */
485
  function strlen( $string ) {
486
  if ( function_exists( 'mb_strlen' ) ) {
487
+ return mb_strlen( $string, 'UTF-8' );
488
  }
489
 
490
  return strlen( $string );
520
  */
521
  function strpos( $haystack, $needle, $offset = 0 ) {
522
  if ( function_exists( 'mb_strpos' ) ) {
523
+ return mb_strpos( $haystack, $needle, $offset, 'UTF-8' );
524
  }
525
 
526
  return strpos( $haystack, $needle, $offset );
538
  */
539
  function strrpos( $haystack, $needle, $offset = 0 ) {
540
  if ( function_exists( 'mb_strrpos' ) ) {
541
+ return mb_strrpos( $haystack, $needle, $offset, 'UTF-8' );
542
  }
543
 
544
  return strrpos( $haystack, $needle, $offset );
1325
  */
1326
  function csv_to_array( $csv ) {
1327
  $args = array();
1328
+ if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) {
1329
  $v = $this->str_getcsv( $csv );
1330
  } else {
1331
+ $v = str_getcsv( $csv ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.str_getcsvFound
1332
  }
1333
  $size = count( $v );
1334
  if ( is_array( $v ) && isset( $v[0] ) && $size >= 2 ) {
2101
  * @since ?
2102
  * @since 2.3.12.3 Add missing wp_enqueue_media.
2103
  * @since 2.9 Switch to admin_enqueue_scripts; both the hook and function name.
2104
+ * @since 3.0 Add enqueue footer JS for jQuery UI Compatibility. #1850
2105
  *
2106
  * @see 'admin_enqueue_scripts' hook
2107
  * @link https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
2964
  if ( ! ( 'opengraph' === $location && in_array( $k, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) ) {
2965
  $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
2966
  }
2967
+ $this->options[ $k ] = htmlspecialchars( $this->options[ $k ], ENT_QUOTES, 'UTF-8' );
2968
  break;
2969
  case 'filename':
2970
  $this->options[ $k ] = sanitize_file_name( $this->options[ $k ] );
admin/class-aioseop-helper.php CHANGED
@@ -421,7 +421,9 @@ class AIOSEOP_Helper {
421
  'aiosp_schema_site_represents' => __( 'Select whether your website is primarily for a person or an organization.', 'all-in-one-seo-pack' ),
422
  'aiosp_schema_organization_name' => __( 'Enter your organization or business name.', 'all-in-one-seo-pack' ),
423
  'aiosp_schema_organization_logo' => __( 'Add a logo that represents your organization or business. The image must be in PNG, JPG or GIF format and a minimum size of 112px by 112px. If no image is selected, then the plugin will try to use the logo in the Customizer settings.', 'all-in-one-seo-pack' ),
424
- 'aiosp_schema_person_user' => __( 'Select the primary owner for your site from the list of users. Only users with the role of Author, Editor or Administrator will be listed here.', 'all-in-one-seo-pack' ),
 
 
425
  'aiosp_schema_phone_number' => __( 'Enter the primary phone number your organization or business. You must include the country code and the phone number must use the standard format for your country, for example: 1-888-888-8888.', 'all-in-one-seo-pack' ),
426
  'aiosp_schema_contact_type' => __( 'Select the type of contact for the phone number you have entered.', 'all-in-one-seo-pack' ),
427
 
@@ -478,7 +480,15 @@ class AIOSEOP_Helper {
478
  $pt_obj_taxes = get_object_taxonomies( $v1_pt, 'objects' );
479
  foreach ( $pt_obj_taxes as $k2_slug => $v2_tax_obj ) {
480
  if ( $v2_tax_obj->public ) {
481
- $help_text_macros .= sprintf( '<dt>%%tax_%1$s%%</dt><dd>' . __( 'The title of the %2$s taxonomy that is associated to this %3$s', 'all-in-one-seo-pack' ) . '</dd>', $k2_slug, ucwords( $v2_tax_obj->label ), $name );
 
 
 
 
 
 
 
 
482
  }
483
  }
484
 
@@ -550,7 +560,7 @@ class AIOSEOP_Helper {
550
  'aiosp_bing_verify' => 'https://semperplugins.com/documentation/bing-webmaster-verification/',
551
  'aiosp_pinterest_verify' => 'https://semperplugins.com/documentation/pinterest-site-verification/',
552
  'aiosp_yandex_verify' => 'https://semperplugins.com/documentation/yandex-webmaster-verification/',
553
- 'aiosp_baidu_verify' => 'https://semperplugins.com/documentation/baidu-webmaster-verification/',
554
 
555
  // Google Analytics.
556
  'aiosp_google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
421
  'aiosp_schema_site_represents' => __( 'Select whether your website is primarily for a person or an organization.', 'all-in-one-seo-pack' ),
422
  'aiosp_schema_organization_name' => __( 'Enter your organization or business name.', 'all-in-one-seo-pack' ),
423
  'aiosp_schema_organization_logo' => __( 'Add a logo that represents your organization or business. The image must be in PNG, JPG or GIF format and a minimum size of 112px by 112px. If no image is selected, then the plugin will try to use the logo in the Customizer settings.', 'all-in-one-seo-pack' ),
424
+ 'aiosp_schema_person_user' => __( 'Select the primary owner for your site from the list of users. Only users with the role of Author, Editor or Administrator will be listed here. Alternatively, you can choose Manually Enter to manually enter the site owner\'s name.', 'all-in-one-seo-pack' ),
425
+ 'aiosp_schema_person_manual_name' => __( 'Enter the name of the site owner here.', 'all-in-one-seo-pack' ),
426
+ 'aiosp_schema_person_manual_image' => __( 'Upload or enter the URL for the site owner\'s image or avatar.', 'all-in-one-seo-pack' ),
427
  'aiosp_schema_phone_number' => __( 'Enter the primary phone number your organization or business. You must include the country code and the phone number must use the standard format for your country, for example: 1-888-888-8888.', 'all-in-one-seo-pack' ),
428
  'aiosp_schema_contact_type' => __( 'Select the type of contact for the phone number you have entered.', 'all-in-one-seo-pack' ),
429
 
480
  $pt_obj_taxes = get_object_taxonomies( $v1_pt, 'objects' );
481
  foreach ( $pt_obj_taxes as $k2_slug => $v2_tax_obj ) {
482
  if ( $v2_tax_obj->public ) {
483
+ $help_text_macros .= sprintf(
484
+ '<dt>%%tax_%1$s%%</dt><dd>' .
485
+ /* translators: %2$s and %3$s are placeholders and should not be translated. These are replaced with the name of the taxonomy (%2$s) that is associated with (the name of) a custom post type (%2$s). */
486
+ __( 'The title of the %2$s taxonomy that is associated to this %3$s', 'all-in-one-seo-pack' )
487
+ . '</dd>',
488
+ $k2_slug,
489
+ ucwords( $v2_tax_obj->label ),
490
+ $name
491
+ );
492
  }
493
  }
494
 
560
  'aiosp_bing_verify' => 'https://semperplugins.com/documentation/bing-webmaster-verification/',
561
  'aiosp_pinterest_verify' => 'https://semperplugins.com/documentation/pinterest-site-verification/',
562
  'aiosp_yandex_verify' => 'https://semperplugins.com/documentation/yandex-webmaster-verification/',
563
+ 'aiosp_baidu_verify' => 'https://semperplugins.com/documentation/baidu-webmaster-tools-verification/',
564
 
565
  // Google Analytics.
566
  'aiosp_google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
admin/display/general-metaboxes.php CHANGED
@@ -197,6 +197,10 @@ class aiosp_metaboxes {
197
 
198
  echo '<li>' . __( 'Video SEO Module', 'all-in-one-seo-pack' ) . '</li>';
199
  echo '<li>' . __( 'SEO for Categories, Tags and Custom Taxonomies', 'all-in-one-seo-pack' ) . '</li>';
 
 
 
 
200
  echo '<li>' . __( 'Access to Video Screencasts', 'all-in-one-seo-pack' ) . '</li>';
201
  echo '<li>' . __( 'Access to Premium Support Forums', 'all-in-one-seo-pack' ) . '</li>';
202
  echo '<li>' . __( 'Access to Knowledge Center', 'all-in-one-seo-pack' ) . '</li>';
197
 
198
  echo '<li>' . __( 'Video SEO Module', 'all-in-one-seo-pack' ) . '</li>';
199
  echo '<li>' . __( 'SEO for Categories, Tags and Custom Taxonomies', 'all-in-one-seo-pack' ) . '</li>';
200
+ echo '<li>' . __( 'Social Meta for Categories, Tags and Custom Taxonomies', 'all-in-one-seo-pack' ) . '</li>';
201
+ echo '<li>' . __( 'Advanced Google Analytics tracking', 'all-in-one-seo-pack' ) . '</li>';
202
+ echo '<li>' . __( 'Greater control over display settings', 'all-in-one-seo-pack' ) . '</li>';
203
+ echo '<li>' . __( 'Ad free (no banner adverts)', 'all-in-one-seo-pack' ) . '</li>';
204
  echo '<li>' . __( 'Access to Video Screencasts', 'all-in-one-seo-pack' ) . '</li>';
205
  echo '<li>' . __( 'Access to Premium Support Forums', 'all-in-one-seo-pack' ) . '</li>';
206
  echo '<li>' . __( 'Access to Knowledge Center', 'all-in-one-seo-pack' ) . '</li>';
aioseop_class.php CHANGED
@@ -12,6 +12,7 @@
12
  * Module Base Class
13
  */
14
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
 
15
 
16
  /**
17
  * Class All_in_One_SEO_Pack
@@ -564,6 +565,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
564
  'rhs' => '',
565
  ),
566
  'aiosp_ga_advanced_options' => 'on',
 
 
 
 
 
567
  ),
568
  ),
569
  'ga_link_attribution' => array(
@@ -590,6 +596,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
590
  'rhs' => '',
591
  ),
592
  'aiosp_ga_advanced_options' => 'on',
 
 
 
 
 
593
  ),
594
  ),
595
  'schema_markup' => array(
@@ -611,6 +622,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
611
  ),
612
  ),
613
  'schema_social_profile_links' => array(
 
614
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
615
  'type' => 'textarea',
616
  'cols' => 60,
@@ -620,6 +632,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
620
  ),
621
  ),
622
  'schema_site_represents' => array(
 
623
  'name' => __( 'Person or Organization', 'all-in-one-seo-pack' ),
624
  'type' => 'radio',
625
  'default' => 'organization',
@@ -632,6 +645,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
632
  ),
633
  ),
634
  'schema_organization_name' => array(
 
635
  'name' => __( 'Organization Name', 'all-in-one-seo-pack' ),
636
  'type' => 'text',
637
  'default' => '',
@@ -641,6 +655,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
641
  ),
642
  ),
643
  'schema_organization_logo' => array(
 
644
  'name' => __( 'Organization Logo', 'all-in-one-seo-pack' ),
645
  'type' => 'image',
646
  'condshow' => array(
@@ -650,6 +665,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
650
  ),
651
 
652
  'schema_person_user' => array(
 
653
  'name' => __( 'Person\'s Username', 'all-in-one-seo-pack' ),
654
  'type' => 'select',
655
  'default' => 1,
@@ -659,7 +675,28 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
659
  ),
660
  // Add initial options below.
661
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
  'schema_phone_number' => array(
 
663
  'name' => __( 'Phone Number', 'all-in-one-seo-pack' ),
664
  'type' => 'tel',
665
  'autocomplete' => 'off',
@@ -669,6 +706,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
669
  ),
670
  ),
671
  'schema_contact_type' => array(
 
672
  'name' => __( 'Type of Contact', 'all-in-one-seo-pack' ),
673
  'type' => 'select',
674
  'condshow' => array(
@@ -676,17 +714,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
676
  'aiosp_schema_site_represents' => 'organization',
677
  ),
678
  'initial_options' => array(
 
679
  'none' => __( '-- Select --', 'all-in-one-seo-pack' ),
680
  'customer support' => __( 'Customer Support', 'all-in-one-seo-pack' ),
681
  'tech support' => __( 'Technical Support', 'all-in-one-seo-pack' ),
 
682
  'billing support' => __( 'Billing Support', 'all-in-one-seo-pack' ),
 
683
  'bill payment' => __( 'Bill Payment', 'all-in-one-seo-pack' ),
684
  'sales' => __( 'Sales', 'all-in-one-seo-pack' ),
685
  'reservations' => __( 'Reservations', 'all-in-one-seo-pack' ),
686
  'credit card support' => __( 'Credit Card Support', 'all-in-one-seo-pack' ),
687
  'emergency' => __( 'Emergency', 'all-in-one-seo-pack' ),
 
688
  'baggage tracking' => __( 'Baggage Tracking', 'all-in-one-seo-pack' ),
689
  'roadside assistance' => __( 'Roadside Assistance', 'all-in-one-seo-pack' ),
 
690
  'package tracking' => __( 'Package Tracking', 'all-in-one-seo-pack' ),
691
  ),
692
  ),
@@ -1031,6 +1074,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1031
  'schema_organization_name',
1032
  'schema_organization_logo',
1033
  'schema_person_user',
 
 
1034
  'schema_phone_number',
1035
  'schema_contact_type',
1036
  ),
@@ -1082,19 +1127,35 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1082
  ),
1083
  );
1084
 
1085
- $user_args = array(
1086
- 'role__in' => array(
1087
- 'administrator',
1088
- 'editor',
1089
- 'author',
1090
- ),
1091
- 'orderby' => 'nicename',
1092
- );
1093
- $users = get_users( $user_args );
1094
 
1095
- $this->default_options['schema_person_user']['initial_options'] = array();
1096
- foreach ( $users as $user ) {
1097
- $this->default_options['schema_person_user']['initial_options'][ $user->ID ] = $user->data->user_nicename . ' (' . $user->data->display_name . ')';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1098
  }
1099
 
1100
  if ( AIOSEOPPRO ) {
@@ -1176,7 +1237,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1176
  ) . '...';
1177
  }
1178
  if ( empty( $title_format ) ) {
1179
- $title = '<span id="' . $args['name'] . '_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title ) ) ) . '</span>';
1180
  } else {
1181
  $title_format = $this->get_preview_snippet_title();
1182
  $title = $title_format;
@@ -1344,7 +1405,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1344
  * @return string
1345
  */
1346
  private function get_preview_snippet_title_helper( $title_format ) {
1347
- return '<span id="aiosp_snippet_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title_format ) ) ) . '</span>';
1348
  }
1349
 
1350
  /**
@@ -1590,18 +1651,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1590
  $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
1591
  }
1592
  if ( 'title' === $f || 'description' === $f ) {
1593
- $get_opts[ $field ] = htmlspecialchars( $meta );
1594
  } else {
1595
- $get_opts[ $field ] = htmlspecialchars( stripslashes( $meta ) );
1596
  }
1597
  } else {
1598
  if ( ! is_category() && ! is_tag() && ! is_tax() ) {
1599
  $field = "aiosp_$f";
1600
  $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
1601
  if ( 'title' === $f || 'description' === $f ) {
1602
- $get_opts[ $field ] = htmlspecialchars( $meta );
1603
  } else {
1604
- $get_opts[ $field ] = htmlspecialchars( stripslashes( $meta ) );
1605
  }
1606
  }
1607
  }
@@ -2147,7 +2208,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2147
  * @return string User -readable nice words for a given request.
2148
  */
2149
  function request_as_words( $request ) {
2150
- $request = htmlspecialchars( $request );
2151
  $request = str_replace( '.html', ' ', $request );
2152
  $request = str_replace( '.htm', ' ', $request );
2153
  $request = str_replace( '.', ' ', $request );
@@ -2819,7 +2880,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2819
  function show_page_description() {
2820
  global $aioseop_options;
2821
  if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
2822
- $page = $this->get_page_number();
2823
  if ( ! empty( $page ) && ( $page > 1 ) ) {
2824
  return false;
2825
  }
@@ -2828,26 +2889,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2828
  return true;
2829
  }
2830
 
2831
- /**
2832
- * Get Page Number
2833
- *
2834
- * @since ?
2835
- *
2836
- * @return mixed
2837
- */
2838
- function get_page_number() {
2839
- global $post;
2840
- if ( is_singular() && false === strpos( $post->post_content, '<!--nextpage-->', 0 ) ) {
2841
- return null;
2842
- }
2843
- $page = get_query_var( 'page' );
2844
- if ( empty( $page ) ) {
2845
- $page = get_query_var( 'paged' );
2846
- }
2847
-
2848
- return $page;
2849
- }
2850
-
2851
  /**
2852
  * Get AIOSEOP Description
2853
  *
@@ -2900,12 +2941,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2900
  if ( ! empty( $post ) && post_password_required( $post ) ) {
2901
  return $description;
2902
  }
2903
- if ( ! $description ) {
2904
  if ( empty( $aioseop_options['aiosp_skip_excerpt'] ) ) {
2905
  $description = $post->post_excerpt;
2906
  }
2907
- if ( ! $description && isset( $aioseop_options['aiosp_generate_descriptions'] ) && $aioseop_options['aiosp_generate_descriptions'] ) {
2908
- if ( ! AIOSEOPPRO || ( AIOSEOPPRO && apply_filters( $this->prefix . 'generate_descriptions_from_content', true, $post ) ) ) {
2909
  $content = $post->post_content;
2910
  if ( ! empty( $aioseop_options['aiosp_run_shortcodes'] ) ) {
2911
  $content = aioseop_do_shortcodes( $content );
@@ -2962,7 +3003,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2962
  $len = $this->strlen( $text2 );
2963
  if ( $max < $len ) {
2964
  if ( function_exists( 'mb_strrpos' ) ) {
2965
- $pos = mb_strrpos( $text2, ' ', - ( $len - $max ) );
2966
  if ( false === $pos ) {
2967
  $pos = $max;
2968
  }
@@ -3106,7 +3147,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3106
  */
3107
  function get_paged( $link ) {
3108
  global $wp_rewrite;
3109
- $page = $this->get_page_number();
3110
  $page_name = 'page';
3111
  if ( ! empty( $wp_rewrite ) && ! empty( $wp_rewrite->pagination_base ) ) {
3112
  $page_name = $wp_rewrite->pagination_base;
@@ -3623,31 +3664,76 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3623
  * @param string $hook_suffix
3624
  */
3625
  public function admin_enqueue_scripts( $hook_suffix ) {
 
 
 
 
 
 
 
 
 
3626
  add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 );
3627
  add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 );
3628
 
3629
- // This ensures different JS files are enqueued only at the intended screens. Preventing unnecessary processes.
3630
- $extra_title_len = 0;
3631
  switch ( $hook_suffix ) {
3632
- // Screens `post.php`, `post-new.php`, & `../aioseop_class.php` share the same `count-char.js`.
 
 
 
 
 
 
 
 
 
 
 
3633
  case 'post.php':
3634
  case 'post-new.php':
3635
- // Fall through.
3636
- case 'toplevel_page_' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class':
 
 
 
 
 
 
 
 
 
 
 
3637
  wp_enqueue_script(
3638
- 'aioseop-post-edit-script',
3639
- AIOSEOP_PLUGIN_URL . 'js/count-chars.js',
3640
  array(),
3641
  AIOSEOP_VERSION
3642
  );
 
3643
 
3644
- $localize_post_edit = array(
3645
- 'aiosp_title_extra' => (int) $extra_title_len,
 
 
 
3646
  );
3647
- wp_localize_script( 'aioseop-post-edit-script', 'aioseop_count_chars', $localize_post_edit );
 
 
 
 
 
 
 
 
 
 
 
 
3648
  break;
3649
  }
3650
-
3651
  parent::admin_enqueue_scripts( $hook_suffix );
3652
  }
3653
 
@@ -3909,7 +3995,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3909
  if ( empty( $aioseop_options['aiosp_taxactive'] ) || ! in_array( 'post_tag', $aioseop_options['aiosp_taxactive'] ) ) {
3910
  return false;
3911
  }
3912
- } elseif ( ! in_array( $post_type, $wp_post_types ) && ! is_front_page() && ! is_post_type_archive( $wp_post_types ) && ! is_404() ) {
3913
  return false;
3914
  }
3915
  } else {
@@ -4062,16 +4148,58 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4062
  if ( '1' == $aioseop_options['aiosp_can'] || 'on' == $aioseop_options['aiosp_can'] ) {
4063
  remove_action( 'wp_head', 'rel_canonical' );
4064
  }
4065
- // Analytics.
4066
- if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
4067
- add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
4068
- }
4069
  add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
4070
- add_action( 'amp_post_template_head', array( $this, 'amp_head' ), 11 );
4071
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
4072
  }
4073
  add_filter( 'aioseop_description', array( &$this, 'filter_description' ), 10, 3 );
4074
  add_filter( 'aioseop_title', array( &$this, 'filter_title' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4075
  }
4076
 
4077
  /**
@@ -4146,26 +4274,32 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4146
  * @todo Change void returns to empty string returns.
4147
  *
4148
  * @since 2.3.11.5
 
 
4149
  *
4150
- * @return string|void
4151
  */
4152
  function amp_head() {
4153
  if ( ! $this->is_seo_enabled_for_cpt() ) {
4154
  return;
4155
  }
4156
 
4157
- $post = $this->get_queried_object();
 
 
 
 
 
 
 
 
 
4158
  $description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
4159
 
4160
- // To disable AMP meta description just __return_false on the aioseop_amp_description filter.
4161
- if ( isset( $description ) && false == $description ) {
4162
- return;
4163
- }
4164
-
4165
  global $aioseop_options;
4166
 
4167
  // Handle the description format.
4168
- if ( isset( $description ) && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
4169
  $description = $this->trim_description( $description );
4170
  if ( ! isset( $meta_string ) ) {
4171
  $meta_string = '';
@@ -4182,6 +4316,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4182
  if ( ! empty( $meta_string ) ) {
4183
  echo $meta_string;
4184
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4185
  }
4186
 
4187
  /**
@@ -4189,7 +4339,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4189
  *
4190
  * Checks whether the current CPT should show the SEO tags.
4191
  *
4192
- * @since 2.9
4193
  *
4194
  * @todo Remove this as it is only a simple boolean check.
4195
  *
@@ -4241,19 +4391,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4241
  }
4242
 
4243
  if ( ! $this->is_page_included() ) {
4244
- /**
4245
- * The aioseop_robots_meta filter hook.
4246
- *
4247
- * Can be used to filter the robots meta tag value.
4248
- * e.g. 'noindex, nofollow'
4249
- *
4250
- * @since ?
4251
- *
4252
- * @param string
4253
- * @return string
4254
- */
4255
- $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
4256
- if ( ! empty( $robots_meta ) && 'index,follow' !== $robots_meta ) {
4257
  echo sprintf( '<meta name="robots" content="%s"', esc_attr( $robots_meta ) ) . " />\n";
4258
  }
4259
 
@@ -4371,25 +4513,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4371
  }
4372
  }
4373
 
4374
- if ( get_option( 'blog_public' ) ) {
4375
-
4376
- /**
4377
- * The aioseop_robots_meta filter hook.
4378
- *
4379
- * Can be used to filter the robots meta tag value.
4380
- * e.g. 'noindex, nofollow'
4381
- *
4382
- * @since ?
4383
- *
4384
- * @param string
4385
- * @return string
4386
- */
4387
- $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
4388
 
4389
- if ( ! empty( $robots_meta ) && 'index,follow' !== $robots_meta ) {
4390
- $meta_string .= sprintf( '<meta name="robots" content="%s"', esc_attr( $robots_meta ) ) . " />\n";
4391
- }
4392
  }
 
4393
  // Handle site verification.
4394
  if ( is_front_page() ) {
4395
  foreach (
@@ -4409,7 +4539,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4409
  // Handle extra meta fields.
4410
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
4411
  if ( ! empty( $aioseop_options[ "aiosp_{$meta}_tags" ] ) ) {
4412
- $$meta = html_entity_decode( stripslashes( $aioseop_options[ "aiosp_{$meta}_tags" ] ), ENT_QUOTES );
4413
  } else {
4414
  $$meta = '';
4415
  }
@@ -4465,7 +4595,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4465
  if ( ! apply_filters( 'aioseop_disable_schema', false ) ) {
4466
  // Handle Schema.
4467
  if ( version_compare( PHP_VERSION, '5.5', '>=' ) ) {
4468
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && boolval( $aioseop_options['aiosp_schema_markup'] ) ) {
4469
  $aioseop_schema = new AIOSEOP_Schema_Builder();
4470
  $aioseop_schema->display_json_ld_head_script();
4471
  }
@@ -4652,185 +4782,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4652
  return esc_html( $description );
4653
  }
4654
 
4655
- /**
4656
- * The get_robots_meta() function.
4657
- *
4658
- * Determines and returns the noindex/nofollow values for the robots meta tag string.
4659
- *
4660
- * @since 2.3.5
4661
- * @since 2.3.11.5 Added noindex API filter hook for password protected posts.
4662
- * @since 3.2.0 Refactored function to fix various bugs.
4663
- *
4664
- * @return string
4665
- */
4666
- function get_robots_meta() {
4667
- global $aioseop_options;
4668
- $page_number = $this->get_page_number();
4669
- $post_type = get_post_type();
4670
- $noindex = false;
4671
- $nofollow = false;
4672
- $aiosp_noindex = '';
4673
- $aiosp_nofollow = '';
4674
- $tax_noindex = array();
4675
- $is_static_page = false;
4676
- $is_static_posts_page = false;
4677
- $is_woocommerce_shop_page = false;
4678
-
4679
- if ( isset( $aioseop_options['aiosp_tax_noindex'] ) && ! empty( $aioseop_options['aiosp_tax_noindex'] ) ) {
4680
- $tax_noindex = $aioseop_options['aiosp_tax_noindex'];
4681
- }
4682
-
4683
- if ( is_front_page() && 0 === $page_number ) {
4684
- return $this->get_robots_meta_string( false, false );
4685
- }
4686
-
4687
- if ( is_home() && 0 !== (int) get_option( 'page_for_posts' ) ) {
4688
- $is_static_posts_page = true;
4689
- }
4690
-
4691
- // TODO Use aioseop_is_woocommerce_active() when #2720 is merged.
4692
- if ( class_exists( 'woocommerce' ) && is_shop() ) {
4693
- $is_woocommerce_shop_page = true;
4694
- }
4695
-
4696
- if ( $is_static_posts_page || $is_woocommerce_shop_page ) {
4697
- $post_type = 'page';
4698
- $is_static_page = true;
4699
- }
4700
-
4701
- if (
4702
- ! is_date() &&
4703
- ! is_author() &&
4704
- ! is_search()
4705
- ) {
4706
- $aiosp_noindex = $this->get_noindex_nofollow_meta_value( 'noindex' );
4707
- $aiosp_nofollow = $this->get_noindex_nofollow_meta_value( 'nofollow' );
4708
- }
4709
-
4710
- if ( 'on' === $aiosp_noindex || ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) && $page_number > 1 ) ) {
4711
- $noindex = true;
4712
- }
4713
- if ( 'on' === $aiosp_nofollow || ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) && $page_number > 1 ) ) {
4714
- $nofollow = true;
4715
- }
4716
-
4717
- if (
4718
- is_singular() &&
4719
- $this->is_password_protected() &&
4720
- apply_filters( 'aiosp_noindex_password_posts', false )
4721
- ) {
4722
- $noindex = true;
4723
- }
4724
-
4725
- if ( $noindex && $nofollow ) {
4726
- // Not needed to run subsequent checks if both are true.
4727
- return $this->get_robots_meta_string( $noindex, $nofollow );
4728
- }
4729
-
4730
- if (
4731
- ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) ||
4732
- ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) ||
4733
- ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ||
4734
- ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) ) ||
4735
- ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) ) ||
4736
- ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) ) ||
4737
- ( is_tax() && in_array( get_query_var( 'taxonomy' ), $tax_noindex ) )
4738
- ) {
4739
- $noindex = true;
4740
- }
4741
-
4742
- if (
4743
- is_single() ||
4744
- is_page() ||
4745
- is_attachment() ||
4746
- $this->check_singular() ||
4747
- $is_static_page
4748
- ) {
4749
- if ( '' === $aiosp_noindex &&
4750
- ! empty( $aioseop_options['aiosp_cpostnoindex'] ) &&
4751
- in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] )
4752
- ) {
4753
- $noindex = true;
4754
- }
4755
- if (
4756
- '' === $aiosp_nofollow &&
4757
- ! empty( $aioseop_options['aiosp_cpostnofollow'] ) &&
4758
- in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] )
4759
- ) {
4760
- $nofollow = true;
4761
- }
4762
- }
4763
-
4764
- return $this->get_robots_meta_string( $noindex, $nofollow );
4765
- }
4766
-
4767
- /**
4768
- * The get_noindex_nofollow_meta_value() function.
4769
- *
4770
- * Gets the noindex/nofollow meta value for the requested object.
4771
- *
4772
- * @since 3.2.0
4773
- *
4774
- * @param string $key The requested meta key.
4775
- * @return string
4776
- */
4777
- private function get_noindex_nofollow_meta_value( $key ) {
4778
- $meta = array();
4779
- $meta_key = '_aioseop_' . $key;
4780
- $meta_value = '';
4781
-
4782
- $queried_object = get_queried_object();
4783
- if ( empty( $queried_object ) ) {
4784
- return $meta_value;
4785
- }
4786
-
4787
- // TODO Use $meta_opts when get_current_options() is refactored - #2729.
4788
- if ( property_exists( $queried_object, 'ID' ) ) {
4789
- $meta = get_post_meta( $queried_object->ID );
4790
- }
4791
- if ( property_exists( $queried_object, 'term_id' ) ) {
4792
- $meta = get_term_meta( $queried_object->term_id );
4793
- }
4794
- // TODO Use aioseop_is_woocommerce_active() when #2720 is merged.
4795
- if ( class_exists( 'woocommerce' ) && is_shop() ) {
4796
- $meta = get_post_meta( wc_get_page_id( 'shop' ) );
4797
- }
4798
-
4799
- if ( is_array( $meta ) && array_key_exists( $meta_key, $meta ) ) {
4800
- $meta_value = $meta[ $meta_key ][0];
4801
- }
4802
-
4803
- return $meta_value;
4804
- }
4805
-
4806
-
4807
- /**
4808
- * The get_robots_meta_string() function.
4809
- *
4810
- * Helper function for get_robots_meta().
4811
- *
4812
- * @since 3.2.0
4813
- *
4814
- * @param bool $noindex
4815
- * @param bool $nofollow
4816
- *
4817
- * @return string
4818
- */
4819
- private function get_robots_meta_string( $noindex, $nofollow ) {
4820
- $index_value = 'index';
4821
- $follow_value = 'follow';
4822
-
4823
- if ( $noindex ) {
4824
- $index_value = 'noindex';
4825
- }
4826
-
4827
- if ( $nofollow ) {
4828
- $follow_value = 'nofollow';
4829
- }
4830
-
4831
- return $index_value . ',' . $follow_value;
4832
- }
4833
-
4834
  /**
4835
  * Check Singular
4836
  *
@@ -4853,26 +4804,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4853
  return $is_singular;
4854
  }
4855
 
4856
- /**
4857
- * Is Password Protected
4858
- *
4859
- * Determine if post is password protected.
4860
- *
4861
- * @since 2.3.11.5
4862
- *
4863
- * @return bool
4864
- */
4865
- function is_password_protected() {
4866
- global $post;
4867
-
4868
- if ( ! empty( $post->post_password ) ) {
4869
- return true;
4870
- }
4871
-
4872
- return false;
4873
-
4874
- }
4875
-
4876
  /**
4877
  * Get Previous/Next Links
4878
  *
@@ -4884,7 +4815,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4884
  function get_prev_next_links( $post = null ) {
4885
  $prev = '';
4886
  $next = '';
4887
- $page = $this->get_page_number();
4888
  if ( is_home() || is_archive() || is_paged() ) {
4889
  global $wp_query;
4890
  $max_page = $wp_query->max_num_pages;
@@ -4998,6 +4929,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4998
  * Google Analytics
4999
  *
5000
  * @since ?
 
5001
  *
5002
  * @param $options
5003
  * @param $location
@@ -5005,6 +4937,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5005
  * @return mixed
5006
  */
5007
  function aiosp_google_analytics() {
 
 
 
5008
  new aioseop_google_analytics;
5009
  }
5010
 
@@ -5621,7 +5556,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5621
  public function filter_description( $value, $truncate = false, $ignore_php_version = false ) {
5622
  // TODO: change preg_match to version_compare someday when the reason for this condition is understood better.
5623
  if ( $ignore_php_version || preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
5624
- $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
5625
  }
5626
  // Decode entities.
5627
  $value = $this->html_entity_decode( $value );
@@ -5680,7 +5615,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5680
  ),
5681
  $value
5682
  );
5683
- return html_entity_decode( $value );
5684
  }
5685
 
5686
  /**
12
  * Module Base Class
13
  */
14
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
15
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/general/aioseop-robots-meta.php' ); // Include the module base class.
16
 
17
  /**
18
  * Class All_in_One_SEO_Pack
565
  'rhs' => '',
566
  ),
567
  'aiosp_ga_advanced_options' => 'on',
568
+ 'aiosp_gtm_container_id' => array(
569
+ 'lhs' => 'aiosp_gtm_container_id',
570
+ 'op' => '==',
571
+ 'rhs' => '',
572
+ ),
573
  ),
574
  ),
575
  'ga_link_attribution' => array(
596
  'rhs' => '',
597
  ),
598
  'aiosp_ga_advanced_options' => 'on',
599
+ 'aiosp_gtm_container_id' => array(
600
+ 'lhs' => 'aiosp_gtm_container_id',
601
+ 'op' => '==',
602
+ 'rhs' => '',
603
+ ),
604
  ),
605
  ),
606
  'schema_markup' => array(
622
  ),
623
  ),
624
  'schema_social_profile_links' => array(
625
+ /* translators: This is a setting where users can add links to their social media profiles. These are then output as schema.org markup. */
626
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
627
  'type' => 'textarea',
628
  'cols' => 60,
632
  ),
633
  ),
634
  'schema_site_represents' => array(
635
+ /* translators: This is a setting where users can indicate whether their website represents a person or organization. This is used for our schema.org markup. */
636
  'name' => __( 'Person or Organization', 'all-in-one-seo-pack' ),
637
  'type' => 'radio',
638
  'default' => 'organization',
645
  ),
646
  ),
647
  'schema_organization_name' => array(
648
+ /* translators: This is a setting where users can enter the name of their organization. This is used for our schema.org markup. */
649
  'name' => __( 'Organization Name', 'all-in-one-seo-pack' ),
650
  'type' => 'text',
651
  'default' => '',
655
  ),
656
  ),
657
  'schema_organization_logo' => array(
658
+ /* translators: This is a setting where users can upload and select a logo for their organization. This is used for our schema.org markup. */
659
  'name' => __( 'Organization Logo', 'all-in-one-seo-pack' ),
660
  'type' => 'image',
661
  'condshow' => array(
665
  ),
666
 
667
  'schema_person_user' => array(
668
+ /* translators: This is a dropdown setting where users can select the username of the person that the website is for. The profile from that user is then used for our schema.org markup.*/
669
  'name' => __( 'Person\'s Username', 'all-in-one-seo-pack' ),
670
  'type' => 'select',
671
  'default' => 1,
675
  ),
676
  // Add initial options below.
677
  ),
678
+ 'schema_person_manual_name' => array(
679
+ /* translators: Option shown when 'Manually Enter' is selected in Person's Username. Users use this to enter the Person's name for schema Person. */
680
+ 'name' => __( 'Person\'s Name', 'all-in-one-seo-pack' ),
681
+ 'type' => 'text',
682
+ 'condshow' => array(
683
+ 'aiosp_schema_markup' => 1,
684
+ 'aiosp_schema_site_represents' => 'person',
685
+ 'aiosp_schema_person_user' => '-1',
686
+ ),
687
+ ),
688
+ 'schema_person_manual_image' => array(
689
+ /* translators: Option shown when 'Manually Enter' is selected in Person's Username. Users use this to enter the Person's image for schema Person. */
690
+ 'name' => __( 'Person\'s Image', 'all-in-one-seo-pack' ),
691
+ 'type' => 'image',
692
+ 'condshow' => array(
693
+ 'aiosp_schema_markup' => 1,
694
+ 'aiosp_schema_site_represents' => 'person',
695
+ 'aiosp_schema_person_user' => '-1',
696
+ ),
697
+ ),
698
  'schema_phone_number' => array(
699
+ /* translators: This is a setting where users can enter a phone number for their organization. This is used for our schema.org markup. */
700
  'name' => __( 'Phone Number', 'all-in-one-seo-pack' ),
701
  'type' => 'tel',
702
  'autocomplete' => 'off',
706
  ),
707
  ),
708
  'schema_contact_type' => array(
709
+ /* translators: This is a setting where users have to indicate what contact/department their phone number connects to (e.g. "Sales" or "Customer Support"). This is used for our schema.org markup. */
710
  'name' => __( 'Type of Contact', 'all-in-one-seo-pack' ),
711
  'type' => 'select',
712
  'condshow' => array(
714
  'aiosp_schema_site_represents' => 'organization',
715
  ),
716
  'initial_options' => array(
717
+ /* translators: This is the placeholder we use in one of our dropdowns when no value has been selected yet. */
718
  'none' => __( '-- Select --', 'all-in-one-seo-pack' ),
719
  'customer support' => __( 'Customer Support', 'all-in-one-seo-pack' ),
720
  'tech support' => __( 'Technical Support', 'all-in-one-seo-pack' ),
721
+ /* translators: This is the support department of a business that handles all billing related enquiries. */
722
  'billing support' => __( 'Billing Support', 'all-in-one-seo-pack' ),
723
+ /* translators: This is the department of a business that handles payments of bills. */
724
  'bill payment' => __( 'Bill Payment', 'all-in-one-seo-pack' ),
725
  'sales' => __( 'Sales', 'all-in-one-seo-pack' ),
726
  'reservations' => __( 'Reservations', 'all-in-one-seo-pack' ),
727
  'credit card support' => __( 'Credit Card Support', 'all-in-one-seo-pack' ),
728
  'emergency' => __( 'Emergency', 'all-in-one-seo-pack' ),
729
+ /* translators: This is the department that handles baggage enquiries when e.g. baggage is lost or missing. */
730
  'baggage tracking' => __( 'Baggage Tracking', 'all-in-one-seo-pack' ),
731
  'roadside assistance' => __( 'Roadside Assistance', 'all-in-one-seo-pack' ),
732
+ /* translators: This refers to the department of a package courier that handles enquiries when e.g. a package has not been delivered or is missing. */
733
  'package tracking' => __( 'Package Tracking', 'all-in-one-seo-pack' ),
734
  ),
735
  ),
1074
  'schema_organization_name',
1075
  'schema_organization_logo',
1076
  'schema_person_user',
1077
+ 'schema_person_manual_name',
1078
+ 'schema_person_manual_image',
1079
  'schema_phone_number',
1080
  'schema_contact_type',
1081
  ),
1127
  ),
1128
  );
1129
 
1130
+ global $pagenow;
1131
+ if ( 'admin.php' === $pagenow ) {
1132
+ // Person's Username setting.
1133
+ $this->default_options['schema_person_user']['initial_options'] = array(
1134
+ 0 => __( '- Select -', 'all-in-one-seo-pack' ),
1135
+ -1 => __( 'Manually Enter', 'all-in-one-seo-pack' ),
1136
+ );
 
 
1137
 
1138
+ global $wpdb;
1139
+ $user_count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users" );
1140
+ if ( 50 < $user_count ) {
1141
+ $this->default_options['schema_person_user']['initial_options'] = array(
1142
+ -1 => __( 'Manually Enter', 'all-in-one-seo-pack' ),
1143
+ );
1144
+ } else {
1145
+ $user_args = array(
1146
+ 'role__in' => array(
1147
+ 'administrator',
1148
+ 'editor',
1149
+ 'author',
1150
+ ),
1151
+ 'orderby' => 'nicename',
1152
+ );
1153
+ $users = get_users( $user_args );
1154
+
1155
+ foreach ( $users as $user ) {
1156
+ $this->default_options['schema_person_user']['initial_options'][ $user->ID ] = $user->data->user_nicename . ' (' . $user->data->display_name . ')';
1157
+ }
1158
+ }
1159
  }
1160
 
1161
  if ( AIOSEOPPRO ) {
1237
  ) . '...';
1238
  }
1239
  if ( empty( $title_format ) ) {
1240
+ $title = '<span id="' . $args['name'] . '_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title, ENT_COMPAT, 'UTF-8' ) ) ) . '</span>';
1241
  } else {
1242
  $title_format = $this->get_preview_snippet_title();
1243
  $title = $title_format;
1405
  * @return string
1406
  */
1407
  private function get_preview_snippet_title_helper( $title_format ) {
1408
+ return '<span id="aiosp_snippet_title">' . esc_attr( wp_strip_all_tags( html_entity_decode( $title_format, ENT_COMPAT, 'UTF-8' ) ) ) . '</span>';
1409
  }
1410
 
1411
  /**
1651
  $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
1652
  }
1653
  if ( 'title' === $f || 'description' === $f ) {
1654
+ $get_opts[ $field ] = htmlspecialchars( $meta, ENT_COMPAT, 'UTF-8' );
1655
  } else {
1656
+ $get_opts[ $field ] = htmlspecialchars( stripslashes( $meta ), ENT_COMPAT, 'UTF-8' );
1657
  }
1658
  } else {
1659
  if ( ! is_category() && ! is_tag() && ! is_tax() ) {
1660
  $field = "aiosp_$f";
1661
  $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
1662
  if ( 'title' === $f || 'description' === $f ) {
1663
+ $get_opts[ $field ] = htmlspecialchars( $meta, ENT_COMPAT, 'UTF-8' );
1664
  } else {
1665
+ $get_opts[ $field ] = htmlspecialchars( stripslashes( $meta ), ENT_COMPAT, 'UTF-8' );
1666
  }
1667
  }
1668
  }
2208
  * @return string User -readable nice words for a given request.
2209
  */
2210
  function request_as_words( $request ) {
2211
+ $request = htmlspecialchars( $request, ENT_COMPAT, 'UTF-8' );
2212
  $request = str_replace( '.html', ' ', $request );
2213
  $request = str_replace( '.htm', ' ', $request );
2214
  $request = str_replace( '.', ' ', $request );
2880
  function show_page_description() {
2881
  global $aioseop_options;
2882
  if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
2883
+ $page = aioseop_get_page_number();
2884
  if ( ! empty( $page ) && ( $page > 1 ) ) {
2885
  return false;
2886
  }
2889
  return true;
2890
  }
2891
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2892
  /**
2893
  * Get AIOSEOP Description
2894
  *
2941
  if ( ! empty( $post ) && post_password_required( $post ) ) {
2942
  return $description;
2943
  }
2944
+ if ( ! $description && ! empty( $aioseop_options['aiosp_generate_descriptions'] ) ) {
2945
  if ( empty( $aioseop_options['aiosp_skip_excerpt'] ) ) {
2946
  $description = $post->post_excerpt;
2947
  }
2948
+ if ( ! $description ) {
2949
+ if ( ! AIOSEOPPRO || ( AIOSEOPPRO && apply_filters( 'aiosp_generate_descriptions_from_content', true, $post ) ) ) {
2950
  $content = $post->post_content;
2951
  if ( ! empty( $aioseop_options['aiosp_run_shortcodes'] ) ) {
2952
  $content = aioseop_do_shortcodes( $content );
3003
  $len = $this->strlen( $text2 );
3004
  if ( $max < $len ) {
3005
  if ( function_exists( 'mb_strrpos' ) ) {
3006
+ $pos = mb_strrpos( $text2, ' ', - ( $len - $max ), 'UTF-8' );
3007
  if ( false === $pos ) {
3008
  $pos = $max;
3009
  }
3147
  */
3148
  function get_paged( $link ) {
3149
  global $wp_rewrite;
3150
+ $page = aioseop_get_page_number();
3151
  $page_name = 'page';
3152
  if ( ! empty( $wp_rewrite ) && ! empty( $wp_rewrite->pagination_base ) ) {
3153
  $page_name = $wp_rewrite->pagination_base;
3664
  * @param string $hook_suffix
3665
  */
3666
  public function admin_enqueue_scripts( $hook_suffix ) {
3667
+ global $current_screen;
3668
+ global $aioseop_options;
3669
+ $current_screen = get_current_screen();
3670
+ $is_gutenberg = 'false';
3671
+
3672
+ if ( method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor() ) {
3673
+ $is_gutenberg = 'true';
3674
+ }
3675
+
3676
  add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 );
3677
  add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 );
3678
 
3679
+ $count_chars_data = array();
 
3680
  switch ( $hook_suffix ) {
3681
+ case 'term.php':
3682
+ // Legacy code for taxonomy terms until we refactor all title format related code.
3683
+ $count_chars_data['aiosp_title_extra'] = 0;
3684
+ wp_enqueue_script(
3685
+ 'aioseop-count-chars-old',
3686
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars-old.js',
3687
+ array(),
3688
+ AIOSEOP_VERSION,
3689
+ true
3690
+ );
3691
+ wp_localize_script( 'aioseop-count-chars-old', 'aioseop_count_chars', $count_chars_data );
3692
+ break;
3693
  case 'post.php':
3694
  case 'post-new.php':
3695
+ $title_format = $this->get_preview_snippet_title();
3696
+ $extra_title_length = strlen( preg_replace( '/<span.*\/span>/', '', $title_format ) );
3697
+
3698
+ $snippet_preview_data = array(
3699
+ 'isGutenberg' => $is_gutenberg,
3700
+ 'autogenerateDescriptions' => $aioseop_options['aiosp_generate_descriptions'],
3701
+ 'skipExcerpt' => $aioseop_options['aiosp_skip_excerpt'],
3702
+ );
3703
+
3704
+ $count_chars_data['extraTitleLength'] = $extra_title_length;
3705
+ $count_chars_data['isGutenberg'] = $is_gutenberg;
3706
+ $count_chars_data['autogenerateDescriptions'] = $aioseop_options['aiosp_generate_descriptions'];
3707
+
3708
  wp_enqueue_script(
3709
+ 'aioseop-preview-snippet',
3710
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-preview-snippet.js',
3711
  array(),
3712
  AIOSEOP_VERSION
3713
  );
3714
+ wp_localize_script( 'aioseop-preview-snippet', 'aioseop_preview_snippet', $snippet_preview_data );
3715
 
3716
+ wp_enqueue_script(
3717
+ 'xregexp',
3718
+ 'https://cdn.jsdelivr.net/npm/xregexp@3.2.0',
3719
+ array(),
3720
+ '3.2.0'
3721
  );
3722
+ // No break required.
3723
+ case 'toplevel_page_' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class':
3724
+ $count_chars_data['pluginDirName'] = AIOSEOP_PLUGIN_DIRNAME;
3725
+ $count_chars_data['currentPage'] = $hook_suffix;
3726
+
3727
+ wp_enqueue_script(
3728
+ 'aioseop-count-chars',
3729
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars.js',
3730
+ array(),
3731
+ AIOSEOP_VERSION,
3732
+ true
3733
+ );
3734
+ wp_localize_script( 'aioseop-count-chars', 'aioseopCharacterCounter', $count_chars_data );
3735
  break;
3736
  }
 
3737
  parent::admin_enqueue_scripts( $hook_suffix );
3738
  }
3739
 
3995
  if ( empty( $aioseop_options['aiosp_taxactive'] ) || ! in_array( 'post_tag', $aioseop_options['aiosp_taxactive'] ) ) {
3996
  return false;
3997
  }
3998
+ } elseif ( ! in_array( $post_type, $wp_post_types ) && ! is_front_page() && ! is_post_type_archive( $wp_post_types ) && ! is_404() && ! is_search() ) {
3999
  return false;
4000
  }
4001
  } else {
4148
  if ( '1' == $aioseop_options['aiosp_can'] || 'on' == $aioseop_options['aiosp_can'] ) {
4149
  remove_action( 'wp_head', 'rel_canonical' );
4150
  }
4151
+ add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
 
 
 
4152
  add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
 
4153
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
4154
  }
4155
  add_filter( 'aioseop_description', array( &$this, 'filter_description' ), 10, 3 );
4156
  add_filter( 'aioseop_title', array( &$this, 'filter_title' ) );
4157
+
4158
+ // Plugin compatibility hooks.
4159
+ // AMP.
4160
+ $this->add_hooks_amp();
4161
+
4162
+ // TODO Move WooCommerce hooks here from __construct().
4163
+ }
4164
+
4165
+ /**
4166
+ * Add Hooks for AMP.
4167
+ *
4168
+ * @since 3.3.0
4169
+ */
4170
+ protected function add_hooks_amp() {
4171
+ if ( is_admin() ) {
4172
+ return;
4173
+ }
4174
+ global $aioseop_options;
4175
+
4176
+ // Add AIOSEOP's output to AMP.
4177
+ add_action( 'amp_post_template_head', array( $this, 'amp_head' ), 11 );
4178
+
4179
+ /**
4180
+ * AIOSEOP AMP Schema Enable/Disable
4181
+ *
4182
+ * Allows or prevents the use of schema on AMP generated posts/pages.
4183
+ *
4184
+ * @since 3.3.0
4185
+ *
4186
+ * @param bool $var True to enable, and false to disable.
4187
+ */
4188
+ $use_schema = apply_filters( 'aioseop_amp_schema', true );
4189
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && (bool) $aioseop_options['aiosp_schema_markup'] && $use_schema ) {
4190
+ // Removes AMP's Schema data to prevent any conflicts/duplications with AIOSEOP's.
4191
+ add_action( 'amp_post_template_head', array( $this, 'remove_hooks_amp_schema' ), 9 );
4192
+ }
4193
+ }
4194
+
4195
+ /**
4196
+ * Remove Hooks with AMP's Schema.
4197
+ *
4198
+ * @since 3.3.0
4199
+ */
4200
+ public function remove_hooks_amp_schema() {
4201
+ // Remove AMP Schema hook used for outputting data.
4202
+ remove_action( 'amp_post_template_head', 'amp_print_schemaorg_metadata' );
4203
  }
4204
 
4205
  /**
4274
  * @todo Change void returns to empty string returns.
4275
  *
4276
  * @since 2.3.11.5
4277
+ * @since 3.3.0 Fix loose comparator reading empty string in $description as false and returning. #2875
4278
+ * @since 3.3.0 Add Schema to AMP. #506
4279
  *
4280
+ * @return void
4281
  */
4282
  function amp_head() {
4283
  if ( ! $this->is_seo_enabled_for_cpt() ) {
4284
  return;
4285
  }
4286
 
4287
+ $post = $this->get_queried_object();
4288
+ /**
4289
+ * AIOSEOP AMP Description.
4290
+ *
4291
+ * To disable AMP meta description just __return_false on the aioseop_amp_description filter.
4292
+ *
4293
+ * @since ?
4294
+ *
4295
+ * @param string $post_description
4296
+ */
4297
  $description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
4298
 
 
 
 
 
 
4299
  global $aioseop_options;
4300
 
4301
  // Handle the description format.
4302
+ if ( isset( $description ) && false !== $description && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
4303
  $description = $this->trim_description( $description );
4304
  if ( ! isset( $meta_string ) ) {
4305
  $meta_string = '';
4316
  if ( ! empty( $meta_string ) ) {
4317
  echo $meta_string;
4318
  }
4319
+
4320
+ // Handle Schema.
4321
+ /**
4322
+ * AIOSEOP AMP Schema Enable/Disable
4323
+ *
4324
+ * Allows or prevents the use of schema on AMP generated posts/pages. Use __return_false to disable.
4325
+ *
4326
+ * @since 3.3.0
4327
+ *
4328
+ * @param bool $var True to enable, and false to disable.
4329
+ */
4330
+ $use_schema = apply_filters( 'aioseop_amp_schema', true );
4331
+ if ( $use_schema && ! empty( $aioseop_options['aiosp_schema_markup'] ) && (bool) $aioseop_options['aiosp_schema_markup'] ) {
4332
+ $aioseop_schema = new AIOSEOP_Schema_Builder();
4333
+ $aioseop_schema->display_json_ld_head_script();
4334
+ }
4335
  }
4336
 
4337
  /**
4339
  *
4340
  * Checks whether the current CPT should show the SEO tags.
4341
  *
4342
+ * @since 2.9.0
4343
  *
4344
  * @todo Remove this as it is only a simple boolean check.
4345
  *
4391
  }
4392
 
4393
  if ( ! $this->is_page_included() ) {
4394
+
4395
+ $aioseop_robots_meta = new AIOSEOP_Robots_Meta();
4396
+ $robots_meta = $aioseop_robots_meta->get_robots_meta();
4397
+
4398
+ if ( ! empty( $robots_meta ) ) {
 
 
 
 
 
 
 
 
4399
  echo sprintf( '<meta name="robots" content="%s"', esc_attr( $robots_meta ) ) . " />\n";
4400
  }
4401
 
4513
  }
4514
  }
4515
 
4516
+ $aioseop_robots_meta = new AIOSEOP_Robots_Meta();
4517
+ $robots_meta = $aioseop_robots_meta->get_robots_meta();
 
 
 
 
 
 
 
 
 
 
 
 
4518
 
4519
+ if ( ! empty( $robots_meta ) ) {
4520
+ $meta_string .= $robots_meta;
 
4521
  }
4522
+
4523
  // Handle site verification.
4524
  if ( is_front_page() ) {
4525
  foreach (
4539
  // Handle extra meta fields.
4540
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
4541
  if ( ! empty( $aioseop_options[ "aiosp_{$meta}_tags" ] ) ) {
4542
+ $$meta = html_entity_decode( stripslashes( $aioseop_options[ "aiosp_{$meta}_tags" ] ), ENT_QUOTES, 'UTF-8' );
4543
  } else {
4544
  $$meta = '';
4545
  }
4595
  if ( ! apply_filters( 'aioseop_disable_schema', false ) ) {
4596
  // Handle Schema.
4597
  if ( version_compare( PHP_VERSION, '5.5', '>=' ) ) {
4598
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && boolval( $aioseop_options['aiosp_schema_markup'] ) ) { // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.boolvalFound
4599
  $aioseop_schema = new AIOSEOP_Schema_Builder();
4600
  $aioseop_schema->display_json_ld_head_script();
4601
  }
4782
  return esc_html( $description );
4783
  }
4784
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4785
  /**
4786
  * Check Singular
4787
  *
4804
  return $is_singular;
4805
  }
4806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4807
  /**
4808
  * Get Previous/Next Links
4809
  *
4815
  function get_prev_next_links( $post = null ) {
4816
  $prev = '';
4817
  $next = '';
4818
+ $page = aioseop_get_page_number();
4819
  if ( is_home() || is_archive() || is_paged() ) {
4820
  global $wp_query;
4821
  $max_page = $wp_query->max_num_pages;
4929
  * Google Analytics
4930
  *
4931
  * @since ?
4932
+ * @since 3.3.0 Added support for Google Analytics.
4933
  *
4934
  * @param $options
4935
  * @param $location
4937
  * @return mixed
4938
  */
4939
  function aiosp_google_analytics() {
4940
+ if ( AIOSEOPPRO ) {
4941
+ new AIOSEOP_Pro_Google_Tag_Manager;
4942
+ }
4943
  new aioseop_google_analytics;
4944
  }
4945
 
5556
  public function filter_description( $value, $truncate = false, $ignore_php_version = false ) {
5557
  // TODO: change preg_match to version_compare someday when the reason for this condition is understood better.
5558
  if ( $ignore_php_version || preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
5559
+ $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ), ENT_COMPAT, 'UTF-8' );
5560
  }
5561
  // Decode entities.
5562
  $value = $this->html_entity_decode( $value );
5615
  ),
5616
  $value
5617
  );
5618
+ return html_entity_decode( $value, ENT_COMPAT, 'UTF-8' );
5619
  }
5620
 
5621
  /**
all_in_one_seo_pack.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
-
3
  /*
4
  Plugin Name: All In One SEO Pack
5
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
  Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
7
- Version: 3.2.10
8
  Author: Michael Torbert
9
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
10
  Text Domain: all-in-one-seo-pack
@@ -32,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
32
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
- * @version 3.2.10
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
@@ -46,7 +45,7 @@ if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
46
  }
47
  }
48
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
49
- define( 'AIOSEOP_VERSION', '3.2.10' );
50
  }
51
 
52
  /*
@@ -446,9 +445,9 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
446
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
447
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
448
  require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
449
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/abstract/aiosep_compatible.php' );
450
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-init.php' );
451
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/php-functions.php' );
452
  require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
453
  require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
454
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
@@ -486,7 +485,7 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
486
 
487
  // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
488
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
489
- if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
490
  remove_action( 'init', array( $aiosp, 'add_hooks' ) );
491
  add_action( 'admin_init', 'aioseop_scan_post_header' );
492
  // if the action doesn't run -- pdb.
1
  <?php
 
2
  /*
3
  Plugin Name: All In One SEO Pack
4
  Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
  Description: Out-of-the-box SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 50 million downloads since 2007.
6
+ Version: 3.3
7
  Author: Michael Torbert
8
  Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
  Text Domain: all-in-one-seo-pack
31
  * The original WordPress SEO plugin.
32
  *
33
  * @package All-in-One-SEO-Pack
34
+ * @version 3.3
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
45
  }
46
  }
47
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
48
+ define( 'AIOSEOP_VERSION', '3.3' );
49
  }
50
 
51
  /*
445
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
446
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
447
  require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
448
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatibility/abstract/aiosep_compatible.php' );
449
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatibility/compat-init.php' );
450
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatibility/php-functions.php' );
451
  require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
452
  require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
453
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
485
 
486
  // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
487
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
488
+ if ( wp_doing_ajax() && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
489
  remove_action( 'init', array( $aiosp, 'add_hooks' ) );
490
  add_action( 'admin_init', 'aioseop_scan_post_header' );
491
  // if the action doesn't run -- pdb.
css/modules/aioseop_module.css CHANGED
@@ -125,8 +125,9 @@
125
  .aioseop input[type="text"],
126
  .aioseop input[type="url"] {
127
  color: #515151;
128
- min-height: 35px;
129
- padding: 10px;
 
130
  font-size: 14px;
131
  width: 95%;
132
  max-width: 600px;
@@ -1105,7 +1106,13 @@ table.aioseop_table th {
1105
  }
1106
 
1107
  .aioseop_input input[type="checkbox"]:before {
 
 
 
 
 
1108
  margin: -3px 0 0 -5px;
 
1109
  color: white;
1110
  }
1111
 
@@ -1531,16 +1538,15 @@ div#aioseop_snippet > div > span {
1531
  border: 0;
1532
  }
1533
 
1534
- /* the good, the bad and the ugly character counts */
1535
- .aioseop_count_good {
1536
  color: #515151 !important;
1537
  background-color: #eee !important;
1538
  }
1539
- .aioseop_count_bad {
1540
  color: #515151 !important;
1541
  background-color: #ff0 !important;
1542
  }
1543
- .aioseop_count_ugly {
1544
  color: #fff !important;
1545
  background-color: #f00 !important;
1546
  }
125
  .aioseop input[type="text"],
126
  .aioseop input[type="url"] {
127
  color: #515151;
128
+ min-height: 40px;
129
+ padding-top: 5px;
130
+ padding-bottom: 5px;
131
  font-size: 14px;
132
  width: 95%;
133
  max-width: 600px;
1106
  }
1107
 
1108
  .aioseop_input input[type="checkbox"]:before {
1109
+ float: left;
1110
+ display: inline-block;
1111
+ vertical-align: middle;
1112
+ width: 16px;
1113
+ content: "\f147";
1114
  margin: -3px 0 0 -5px;
1115
+ font: normal 21px/1 dashicons;
1116
  color: white;
1117
  }
1118
 
1538
  border: 0;
1539
  }
1540
 
1541
+ .aioseop_count_chars_below_treshold {
 
1542
  color: #515151 !important;
1543
  background-color: #eee !important;
1544
  }
1545
+ .aioseop_count_chars_near_treshold {
1546
  color: #515151 !important;
1547
  background-color: #ff0 !important;
1548
  }
1549
+ .aioseop_count_chars_past_treshold {
1550
  color: #fff !important;
1551
  background-color: #f00 !important;
1552
  }
css/modules/aioseop_module.min.css CHANGED
@@ -1 +1 @@
1
- .all-in-one-seo_page_aiosp_opengraph #wpbody-content,[class*=all-in-one-seo-pack] #wpbody-content{min-width:900px}.form-table.aioseop{clear:none}.form-table.aioseop td{vertical-align:top;padding:16px 0 10px 0;line-height:20px;font-size:12px}.form-table.aioseop th{width:200px;padding:10px 0 12px 9px}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:left;float:left;max-width:30px;min-width:20px;padding-top:2px;outline:0;color:#888;font-family:sans-serif;line-height:1.4em}.aioseop_help_text_link span{font-size:14px}.aioseop_help_text_link:before{content:"\f223";font-size:22px;font-family:dashicons;vertical-align:middle;margin-right:4px}#aioseop-support .aioseop_metabox_text,#aioseop-support a{font-size:14px;color:#000;text-decoration:none}.aioseop_meta_box_help>label{position:absolute;margin-left:8px}.aioseop_help_text_link img{width:40px;float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:right;text-align:right;min-width:56px;max-width:90px;text-decoration:none;height:15px;padding-top:1px;position:relative}.aioseop_meta_box_help span{vertical-align:middle}.aioseop_tabs .aioseop_meta_box_help,.aioseop_tabs .aioseop_meta_box_help:active{margin-top:10px}.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active{margin-bottom:20px}.aioseop_label{color:#5f5f5f;font-weight:600;line-height:19px;display:inline-block;float:left;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:2px 0;width:81%;min-width:120px;max-width:250px;cursor:default;font-size:13.5px}.aioseop_option_div{max-height:360px;min-height:37px;width:95%;overflow-y:auto}.aioseop_overflowed{border:1px solid #e1e1e1}.aioseop input[type=text],.aioseop input[type=url]{color:#515151;min-height:35px;padding:10px;font-size:14px;width:95%;max-width:600px}.aioseop textarea{color:#515151;padding:10px;margin:1px;font-size:14px;line-height:25px;width:95%;max-width:600px;min-height:36px}.aioseop input,.aioseop textarea{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop input:focus,.aioseop textarea:focus{box-shadow:0 0 0 1px #007cba}.aioseop textarea::-webkit-scrollbar{width:12px}.aioseop textarea::-webkit-scrollbar-track{background:#f1f1f1}.aioseop textarea::-webkit-scrollbar-thumb{background:#aeaeae}.aioseop textarea::-webkit-scrollbar-thumb:hover{background:#888}.aioseop_help_text_div{text-align:left;width:100%;margin:0}.aioseop_help_text{font-size:12px;float:left;clear:left;color:#797979;line-height:15px;font-style:italic}.aioseop_head_tagline{color:#5f5f5f;font-size:13px}.aioseop_head_nav{float:left;font-size:18px;margin:0 0 16px 0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;background-color:#fff;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;color:#000;font-weight:700;text-shadow:#fff 0 1px 0;text-decoration:none}.aioseop_head_nav_tab.aioseop_head_nav_active{opacity:1;margin-bottom:-1px;border-width:1px}.aioseop_head_nav_tab:first-child{margin-left:0}.aioseop_head_nav_tab:hover{opacity:1}.aioseop_header{float:left;clear:left}.aioseop_advert{padding:10px;margin-bottom:30px;border:1px solid #ddd;height:200px;width:423px}.aioseop_nopad{padding-left:0;padding-top:0}.aioseop_nopad_all{padding:0;height:220px;width:445px;margin-bottom:20px;border:none}.aioseop_adverts{float:right}.wincherad{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;margin-bottom:0;border:none}#wincher21{background-image:url(../../modules/images/banner21.jpg)}#wincher22{background-image:url(../../modules/images/banner22.jpg)}.aioseop_content{min-width:760px;clear:left}.aioseop_options_wrapper .hndle{font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:400;min-height:18px;padding:7px 10px;margin:0;line-height:1}.aioseop_options_wrapper .submit input.button-primary{margin-bottom:5px}#aiosp_feature_manager_metabox.postbox{margin-top:20px;float:left}.aioseop_advert p{margin:25px 0 25px 0}.aioseop_options_wrapper .postarea{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.aioseop_advert h3{padding:0;margin-top:6px}.aioseop_metabox_text p{margin:0;width:101%}.aioseop_sidebar{width:457px;margin-left:10px}.aioseop_metabox_text{margin-bottom:0}.aioseop_metabox_wrapper{padding:0}.aioseop_metabox_text :last-child{margin:0}.aioseop_metabox_feature{margin-top:20px}.aioseop_translations{margin-top:15px}.aioseop_option_label{float:left;margin:0;padding-top:3px;padding-bottom:3px;width:37%;min-width:150px;max-width:360px;min-height:30px}.aioseop_metabox_text h2{font-size:30px;padding:0;font-weight:700;line-height:29px}#aioseop-about{width:443px;margin-bottom:20px}#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2{font-size:13px}.aioseop_sidebar #mc-embedded-subscribe-form{margin:0 0 10px 0;background:#fff;padding:10px 10px;border:1px solid #ddd}#aioseop-about .aioseop_metabox_text ul{list-style-type:disc;padding-left:15px}.aioseop input[readonly]{background-color:#eee;margin:5px 1px 5px 1px!important}.aioseop_settings_left{float:left;padding:0;margin:0;width:100%}body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}#aioseop_top_button{margin-top:5px;height:30px}#aioseop-list #mce-EMAIL{margin-top:5px;width:250px}.aioseop_top{margin:10px 10px 0 0}.aioseop_top #aioseop-list{margin-bottom:0}.aioseop_top #aioseop-list.postbox.closed{overflow:hidden}.aioseop_right_sidebar{float:right;margin-top:55px}#aiosp_settings_form .button-primary.hidden{display:none}form#edittag div#aiosp_menulabel_wrapper,form#edittag div#aiosp_sitemap_exclude_wrapper,form#edittag div#aiosp_titleatr_wrapper{display:none}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>#aioseop_top_button{height:5px;position:absolute;top:0;width:97%}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>.aioseop_settings_left{margin-top:10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin-top:30px}div#aiosp_feature_manager_metabox .inside{padding:8px}div.aioseop_feature{position:relative;display:inline-block;float:left;vertical-align:top;width:240px;height:288px;margin:8px;border:1px solid #dedede;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;padding:10px 0;-webkit-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-webkit-transition-duration:.4s;-moz-transition-duration:.4s}.aioseop_feature .flag{float:right;margin-right:-7px;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px 6px 5px;position:relative}.aioseop_feature .flag:before{border-color:#d23d46 #d23d46 #d23d46 transparent;border-style:solid;border-width:14px 4px 15px 10px;content:"";left:-14px;position:absolute;top:0}.aioseop_feature .flag:after{border-color:#892026 transparent transparent;border-style:solid;border-width:6px 6px 6px 0;bottom:-12px;content:"";position:absolute;right:0}.aioseop_feature .flag.pro{display:none}#aioseop_coming_soon .free.flag,.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag{display:none}#aioseop_coming_soon .flag.pro{display:block;margin-top:-30px}.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro{display:none}.aioseop_feature h3{font-size:17px;margin:0;padding:0 10px 5px 10px;font-weight:400;font-style:normal;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.aioseop_feature p{line-height:150%;font-size:12px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin-bottom:20px;color:#666;padding:0 10px}.aioseop_feature p.aioseop_desc{min-height:80px}.aioseop_feature .feature_button{float:right;display:inline-block;position:relative;margin:0 10px 10px 0;min-width:80px;text-align:center}.aioseop_feature .feature_button:before{content:"Activate"}.aioseop_feature .active.feature_button:before{content:"Deactivate"}div.aioseop_feature .aioseop_featured_image{min-height:100px;background-repeat:no-repeat;display:block;margin:0 auto;width:133px}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Standard.png)}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}.All_in_One_SEO_Pack_Sitemap>form>.wrap>.form-table,.All_in_One_SEO_Pack_Video_Sitemap>form>.wrap>.form-table{max-width:500px;clear:none}.aioseop_follow_button{min-height:50px;background-repeat:no-repeat;display:inline-block;width:100px;background-size:auto 50px!important;margin-right:0}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-standard.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-standard.png)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx){div.aioseop_feature .aioseop_featured_image{background-size:auto 100px!important}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Retina.png)}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Retina.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-retina.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-retina.png)}}.aioseop_options{width:100%;margin:18px 0 10px 0}.aioseop_wrapper{width:100%;padding-left:5px}.aioseop_input{clear:left;width:98%;padding:5px 1%;display:inline-block}.aioseop_option_input{float:left;width:61%;margin:0;padding-left:1px;min-width:160px}#aiosp_sitemap_addl_pages_metabox .aioseop_options,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options{width:97%;margin:5px}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper{display:block;width:100%;float:none;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input{display:block;width:100%}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper{padding:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label{width:70%;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label{height:30px!important}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date{height:36px}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type{margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary{margin-left:0!important}#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div{position:absolute;width:auto;margin:5px 0 10px 0}#aiosp_sitemap_addl_pages_metabox table.aioseop_table,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 5px 10px}.selectize-control.aioseop-exclude-terms{position:static;width:95%;max-width:600px}.selectize-input{padding:10px 0 10px 10px!important;border:1px solid #8d96a0!important}table.aioseop_table tr:nth-child(odd){background-color:#eee}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd){background-color:rgba(238,238,238,.5)}table.aioseop_table td{width:23%}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{width:80%;max-width:800px;display:block;border-top:1px solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{width:18%;border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info{margin-top:10px;border:1px solid #dfdfdf;width:80%;max-width:800px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th{background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);padding:5px;border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item{display:inline-block;width:30%;vertical-align:top}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even){font-weight:700}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd){width:70%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}table.aioseop_table td,table.aioseop_table th{padding:3px}.aioseop_no_label .aioseop_option_input,.aioseop_top_label .aioseop_option_input{width:100%}#aiosp_settings_form .postbox{margin:20px 0 0 0}.aioseop_settings_left .postbox{float:left;width:100%}.aioseop_option_setting_label{min-height:35px;display:inline-block;white-space:nowrap;overflow:hidden;padding-left:1px;max-width:229px;min-width:160px;width:33%}.aioseop_settings_left .postbox .inside{padding:0;margin:0;clear:right}#aiosp_robots_rules{clear:left;margin-left:20px;max-width:1072px}#aiosp_robots_default_metabox .aioseop_wrapper{width:31%;min-width:165px;display:inline-block;max-width:265px}#aiosp_robots_default_metabox .aioseop_help_text_div{position:absolute;margin:5px 0 10px 0}#aiosp_robots_default_metabox .aioseop_option_input{width:94%;min-width:94%}#aiosp_robots_default_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 0 10px 0}#aiosp_robots_default_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}#aiosp_robots_default_metabox table.aioseop_table td:first-child{white-space:nowrap}.aioseop.aioseop_options.aiosp_robots_settings h3{margin:1.5em .6em .3em}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:left;width:92%;max-width:100%}#aiosp_sitemap_status_metabox .handlediv.button-link{display:none}#aiosp_sitemap_status_metabox.closed .inside{display:block}.aioseop_top_label{width:96%;margin:0 10px}.aioseop_hidden_type{margin:0;padding:0;height:0}#aiosp_title_metabox #aiosp_force_rewrites_wrapper{display:none;height:0}.aioseop_module.error.below-h2{padding:5px 0;margin:0 477px 15px 0!important}#aioseop_opengraph_settings .inside{margin:0}#aioseop_opengraph_settings_image_wrapper img{width:auto;height:75px}#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label{max-width:160px;min-width:100px;width:30%}.aioseop_input input[type=checkbox],.aioseop_input input[type=radio]{border:1.25px solid #6c7781;vertical-align:text-bottom;margin-top:8px}.aioseop_input input[type=checkbox]:before{margin:-3px 0 0 -5px;color:#fff}.aioseop_input input[type=radio]{border-radius:8px}.aioseop_input input[type=radio]:before{content:none!important}.aioseop_input input[type=checkbox]:checked,.aioseop_input input[type=radio]:checked{background:#11a0d2}#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div{max-height:initial}#aiosp{width:auto}.aioseop_input.aioseop_top_label .aioseop_option_input{margin:0 0 10px 0}.aiosp_file_editor_settings>.aioseop_textarea_type .aioseop_option_div{max-height:none}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{max-height:none}.aioseop_option_input .widefat td{vertical-align:middle}.entry-row.robots.quirks{font-weight:700;opacity:1}.entry-row.robots{opacity:.8}.entry-row.robots.invalid{opacity:1;font-weight:700}.invalid .entry_label{font-weight:700}.aioseop .aioseop_option_input tbody{background:#fcfcfc}.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody{background:0 0}.entry-row.robots div{height:20px;vertical-align:middle;width:90%;margin:0 0 4px 0}.robots img{margin:0 0 0 2px;opacity:.6}.aioseop_option_docs{width:98%;display:none;border:1px solid #d3d3d3;margin-top:20px;padding:1%;background-color:#eee}.aioseop_option_docs h3{background:0 0}div.aioseop_notice{position:relative}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;right:10px}.aioseop_error_notice{color:red;font-weight:700}.aioseop_input select{border-radius:4px;border:1px solid #8d96a0}.aioseop_help_text ul{margin:15px 0 0 20px}.aioseop_help_text ul li{line-height:20px;margin:0}.aioseop_sidebar #side-sortables{width:98%}.aioseop_header_tabs.hide,.aioseop_tabs.hide{display:block!important}.aioseop_header_tabs li a.aioseop_header_tab{font-size:14px;line-height:37px;text-decoration:none;cursor:pointer;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none!important;padding:0 .5em!important;color:#5f5f5f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_tab{padding:10px}.aioseop_loading{background-image:url(../../images/activity.gif);display:inline-block;width:24px;height:24px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs.ui-widget-content{background:0 0!important}.aioseop_tab.ui-widget-content{border:1px solid #aaa!important}.aioseop_tab.ui-widget-content a.aioseop_help_text_link{color:#757575!important}.aioseop_tabs.ui-widget{font-size:13px!important;border:none!important}.aioseop_tabs .ui-widget-header{border:none!important;background:0 0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.aioseop_tabs ul{margin-left:.2em!important}.aioseop_tabs .ui-tabs .ui-tabs-panel{border-width:inherit!important}.aioseop_tabs .ui-state-default,.aioseop_tabs .ui-widget-content .ui-state-default,.aioseop_tabs .ui-widget-header .ui-state-default{background-image:none!important}.aioseop_tabs .ui-state-active a{font-weight:700!important}.aiosp_delete{background-image:url(../../images/delete.png);display:inline-block;width:16px;height:16px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:477px}.aioseop_tabs_div{margin-top:10px}#aiosp_settings_form ul.sfwd_debug_settings li strong{display:block;float:left;text-align:right;background-color:#ddd;margin-right:8px;padding:1px 8px 1px 1px;overflow:auto;width:200px;min-height:16px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong{background-color:#ccc}#aiosp_settings_form ul.sfwd_debug_settings li{clear:left;margin:0;padding:0;background-color:#eee;overflow:auto;max-width:75%;min-width:800px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n){background-color:#ddd}div.sfwd_debug_mail_sent{background-color:#080;border:1px solid #0a0;margin:10px 0 10px 0;width:598px;color:#fff;text-align:center}div.sfwd_debug_error{background-color:red;color:#fff;border:1px solid #a00;margin:10px 0 10px 0;width:598px;text-align:center;font-weight:bolder}#aiosp_performance_status_wrapper .aioseop_option_div{max-height:420px}#aioseop_coming_soon,#aioseop_coming_soon2{padding-top:40px;text-align:center;height:258px;font-size:16px}.MRL{margin-left:20px!important;margin-bottom:10px!important}.postbox-container .aioseop_option_div{width:100%}.postbox-container .aioseop_option_div input[type=text],.postbox-container .aioseop_option_div textarea{width:99%;max-width:900px}.postbox-container .aioseop_option_label{max-width:none;height:auto!important}.postbox-container .aioseop_wrapper{padding:0}.postbox-container .aioseop_input{width:100%;margin-bottom:10px;padding:0}.postbox-container .aioseop_option_input{width:63%;padding:0}.postbox-container div#aiosp_upgrade_wrapper{float:none;width:auto;margin:0;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input{display:block;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input{float:none;width:auto;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div{width:auto;min-height:0;padding:10px 0}.aioseop_tabs .aioseop_options{margin:0}#aioseop_opengraph_settings .aioseop_options{clear:both;margin-top:35px}div#aiosp_snippet_wrapper{border-radius:4px;border:1px solid #8d96a0;clear:both;padding:10px 10px 0;width:auto;margin:0 1px 15px}#aiosp_snippet_wrapper>.aioseop_input:first-child{margin-bottom:0}div#aiosp_snippet_wrapper .aioseop_option_label{height:auto!important}#aiosp_snippet_wrapper>.aioseop_input:first-child .aioseop_option_label{padding:0;min-height:inherit}div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input{margin:0;width:99%}div#aioseop_snippet{font-family:arial,sans-serif;font-size:13px}div#aioseop_snippet>h3{margin:10px 0 5px;font-size:18px;border:0;background:inherit;font-weight:400}div#aioseop_snippet>h3>a{color:#12c;text-decoration:none;cursor:pointer}div#aioseop_snippet>div{color:#545454;max-width:48em}div#aioseop_snippet>div>div{display:block;margin-bottom:1px}div#aioseop_snippet>div>div>cite{color:#00852b;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_good{color:#515151!important;background-color:#eee!important}.aioseop_count_bad{color:#515151!important;background-color:#ff0!important}.aioseop_count_ugly{color:#fff!important;background-color:red!important}textarea.robots-text{color:#000;background-color:#eee;height:100%;margin:0 0 0 10px}div#aiosp_sitemap_status_metabox .toggle-indicator{display:none}.required.email{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_options_wrapper .ui-sortable-handle span{font-size:16px;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#000}.aioseop_file_upload{border:none!important}.aioseop_upload_image_button{float:left;margin:0 0 5px 0!important}.aioseop_delete_files_button{margin:0 5px 10px 0!important}.aioseop_rename_files_button{margin:0 0 10px 0!important}.aioseop_reset_settings_button,.aioseop_update_options_button{margin:10px 0 0 0!important}#aiosp_robots_default_metabox .aioseop_option_label{margin-left:10px}#aiosp_robots_default_metabox .add-edit-rule{margin-left:5px}#aiosp_file_editor_htaccess_metabox{margin:0!important}.aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value]{background-color:#0e7bbe;background-image:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div{background-color:#fff;padding:15px;border:1px solid #8d96a0;border-radius:4px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2190 ';padding-right:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-title{clear:both;text-align:center;font-weight:700;padding:10px 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar{border:1px solid #007cba;border-collapse:collapse}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead{background-color:#f1f1f1;border-bottom:1px solid #8d96a0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td,body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead th{width:2rem;height:2rem;text-align:center}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a{text-decoration:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a:hover{border:1px solid #8d96a0;padding:5px 7px}
1
+ .all-in-one-seo_page_aiosp_opengraph #wpbody-content,[class*=all-in-one-seo-pack] #wpbody-content{min-width:900px}.form-table.aioseop{clear:none}.form-table.aioseop td{vertical-align:top;padding:16px 0 10px 0;line-height:20px;font-size:12px}.form-table.aioseop th{width:200px;padding:10px 0 12px 9px}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:left;float:left;max-width:30px;min-width:20px;padding-top:2px;outline:0;color:#888;font-family:sans-serif;line-height:1.4em}.aioseop_help_text_link span{font-size:14px}.aioseop_help_text_link:before{content:"\f223";font-size:22px;font-family:dashicons;vertical-align:middle;margin-right:4px}#aioseop-support .aioseop_metabox_text,#aioseop-support a{font-size:14px;color:#000;text-decoration:none}.aioseop_meta_box_help>label{position:absolute;margin-left:8px}.aioseop_help_text_link img{width:40px;float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:right;text-align:right;min-width:56px;max-width:90px;text-decoration:none;height:15px;padding-top:1px;position:relative}.aioseop_meta_box_help span{vertical-align:middle}.aioseop_tabs .aioseop_meta_box_help,.aioseop_tabs .aioseop_meta_box_help:active{margin-top:10px}.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help,.aioseop_tabs #aioseop_opengraph_settings .aioseop_meta_box_help:active{margin-bottom:20px}.aioseop_label{color:#5f5f5f;font-weight:600;line-height:19px;display:inline-block;float:left;text-align:left;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;padding:2px 0;width:81%;min-width:120px;max-width:250px;cursor:default;font-size:13.5px}.aioseop_option_div{max-height:360px;min-height:37px;width:95%;overflow-y:auto}.aioseop_overflowed{border:1px solid #e1e1e1}.aioseop input[type=text],.aioseop input[type=url]{color:#515151;min-height:35px;padding:10px;font-size:14px;width:95%;max-width:600px}.aioseop textarea{color:#515151;padding:10px;margin:1px;font-size:14px;line-height:25px;width:95%;max-width:600px;min-height:36px}.aioseop input,.aioseop textarea{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop input:focus,.aioseop textarea:focus{box-shadow:0 0 0 1px #007cba}.aioseop textarea::-webkit-scrollbar{width:12px}.aioseop textarea::-webkit-scrollbar-track{background:#f1f1f1}.aioseop textarea::-webkit-scrollbar-thumb{background:#aeaeae}.aioseop textarea::-webkit-scrollbar-thumb:hover{background:#888}.aioseop_help_text_div{text-align:left;width:100%;margin:0}.aioseop_help_text{font-size:12px;float:left;clear:left;color:#797979;line-height:15px;font-style:italic}.aioseop_head_tagline{color:#5f5f5f;font-size:13px}.aioseop_head_nav{float:left;font-size:18px;margin:0 0 16px 0;font-family:HelveticaNeue-Light,"Helvetica Neue Light","Helvetica Neue",sans-serif;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;background-color:#fff;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;color:#000;font-weight:700;text-shadow:#fff 0 1px 0;text-decoration:none}.aioseop_head_nav_tab.aioseop_head_nav_active{opacity:1;margin-bottom:-1px;border-width:1px}.aioseop_head_nav_tab:first-child{margin-left:0}.aioseop_head_nav_tab:hover{opacity:1}.aioseop_header{float:left;clear:left}.aioseop_advert{padding:10px;margin-bottom:30px;border:1px solid #ddd;height:200px;width:423px}.aioseop_nopad{padding-left:0;padding-top:0}.aioseop_nopad_all{padding:0;height:220px;width:445px;margin-bottom:20px;border:none}.aioseop_adverts{float:right}.wincherad{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;margin-bottom:0;border:none}#wincher21{background-image:url(../../modules/images/banner21.jpg)}#wincher22{background-image:url(../../modules/images/banner22.jpg)}.aioseop_content{min-width:760px;clear:left}.aioseop_options_wrapper .hndle{font-size:15px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-weight:400;min-height:18px;padding:7px 10px;margin:0;line-height:1}.aioseop_options_wrapper .submit input.button-primary{margin-bottom:5px}#aiosp_feature_manager_metabox.postbox{margin-top:20px;float:left}.aioseop_advert p{margin:25px 0 25px 0}.aioseop_options_wrapper .postarea{border-color:#dfdfdf;-moz-box-shadow:inset 0 1px 0 #fff;-webkit-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.aioseop_advert h3{padding:0;margin-top:6px}.aioseop_metabox_text p{margin:0;width:101%}.aioseop_sidebar{width:457px;margin-left:10px}.aioseop_metabox_text{margin-bottom:0}.aioseop_metabox_wrapper{padding:0}.aioseop_metabox_text :last-child{margin:0}.aioseop_metabox_feature{margin-top:20px}.aioseop_translations{margin-top:15px}.aioseop_option_label{float:left;margin:0;padding-top:3px;padding-bottom:3px;width:37%;min-width:150px;max-width:360px;min-height:30px}.aioseop_metabox_text h2{font-size:30px;padding:0;font-weight:700;line-height:29px}#aioseop-about{width:443px;margin-bottom:20px}#aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2{font-size:13px}.aioseop_sidebar #mc-embedded-subscribe-form{margin:0 0 10px 0;background:#fff;padding:10px 10px;border:1px solid #ddd}#aioseop-about .aioseop_metabox_text ul{list-style-type:disc;padding-left:15px}.aioseop input[readonly]{background-color:#eee;margin:5px 1px 5px 1px!important}.aioseop_settings_left{float:left;padding:0;margin:0;width:100%}body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left{margin-top:20px}#aioseop_top_button{margin-top:5px;height:30px}#aioseop-list #mce-EMAIL{margin-top:5px;width:250px}.aioseop_top{margin:10px 10px 0 0}.aioseop_top #aioseop-list{margin-bottom:0}.aioseop_top #aioseop-list.postbox.closed{overflow:hidden}.aioseop_right_sidebar{float:right;margin-top:55px}#aiosp_settings_form .button-primary.hidden{display:none}form#edittag div#aiosp_menulabel_wrapper,form#edittag div#aiosp_sitemap_exclude_wrapper,form#edittag div#aiosp_titleatr_wrapper{display:none}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>#aioseop_top_button{height:5px;position:absolute;top:0;width:97%}.All_in_One_SEO_Pack_Feature_Manager>#aiosp_settings_form>.aioseop_settings_left{margin-top:10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin-top:30px}div#aiosp_feature_manager_metabox .inside{padding:8px}div.aioseop_feature{position:relative;display:inline-block;float:left;vertical-align:top;width:240px;height:288px;margin:8px;border:1px solid #dedede;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;padding:10px 0;-webkit-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-moz-box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 0 #fff,inset 0 0 20px rgba(0,0,0,.05),0 1px 2px rgba(0,0,0,.1);-webkit-transition-duration:.4s;-moz-transition-duration:.4s}.aioseop_feature .flag{float:right;margin-right:-7px;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px 6px 5px;position:relative}.aioseop_feature .flag:before{border-color:#d23d46 #d23d46 #d23d46 transparent;border-style:solid;border-width:14px 4px 15px 10px;content:"";left:-14px;position:absolute;top:0}.aioseop_feature .flag:after{border-color:#892026 transparent transparent;border-style:solid;border-width:6px 6px 6px 0;bottom:-12px;content:"";position:absolute;right:0}.aioseop_feature .flag.pro{display:none}#aioseop_coming_soon .free.flag,.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag{display:none}#aioseop_coming_soon .flag.pro{display:block;margin-top:-30px}.all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro{display:none}.aioseop_feature h3{font-size:17px;margin:0;padding:0 10px 5px 10px;font-weight:400;font-style:normal;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.aioseop_feature p{line-height:150%;font-size:12px;font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin-bottom:20px;color:#666;padding:0 10px}.aioseop_feature p.aioseop_desc{min-height:80px}.aioseop_feature .feature_button{float:right;display:inline-block;position:relative;margin:0 10px 10px 0;min-width:80px;text-align:center}.aioseop_feature .feature_button:before{content:"Activate"}.aioseop_feature .active.feature_button:before{content:"Deactivate"}div.aioseop_feature .aioseop_featured_image{min-height:100px;background-repeat:no-repeat;display:block;margin:0 auto;width:133px}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Standard.png)}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Standard.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Standard.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Standard.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Standard.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Standard.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Standard.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Standard.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-Color-Standard.png)}.All_in_One_SEO_Pack_Sitemap>form>.wrap>.form-table,.All_in_One_SEO_Pack_Video_Sitemap>form>.wrap>.form-table{max-width:500px;clear:none}.aioseop_follow_button{min-height:50px;background-repeat:no-repeat;display:inline-block;width:100px;background-size:auto 50px!important;margin-right:0}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-standard.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-standard.png)}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min--moz-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5),only screen and (min-resolution:1.5dppx){div.aioseop_feature .aioseop_featured_image{background-size:auto 100px!important}div.aioseop_feature .aioseop_featured_image.active{background-image:url(../../modules/images/Default-Color-Retina.png)}div.aioseop_feature .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image{background-image:url(../../modules/images/XMLSitemaps-BW-Retina.png)}div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/XMLSitemaps-Color-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image{background-image:url(../../modules/images/VideoSitemap-BW-Retina.png)}div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active{background-image:url(../../modules/images/VideoSitemap-Color-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image{background-image:url(../../modules/images/SocialMeta-BW-Retina.png)}div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active{background-image:url(../../modules/images/SocialMeta-Color-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image,div.aioseop_feature#aioseop_robots .aioseop_featured_image{background-image:url(../../modules/images/Robots-BW-Retina.png)}div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active,div.aioseop_feature#aioseop_robots .aioseop_featured_image.active{background-image:url(../../modules/images/Robots-Color-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image{background-image:url(../../modules/images/FileEditor-BW-Retina.png)}div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active{background-image:url(../../modules/images/FileEditor-Color-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image{background-image:url(../../modules/images/ImporterExporter-BW-Retina.png)}div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active{background-image:url(../../modules/images/ImporterExporter-Color-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image{background-image:url(../../modules/images/Performance-BW-Retina.png)}div.aioseop_feature#aioseop_performance .aioseop_featured_image.active{background-image:url(../../modules/images/Performance-Color-Retina.png)}div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image{background-image:url(../../modules/images/Default-BW-Retina.png)}.aioseop_facebook_follow{background-image:url(../../modules/images/facebook-follow-retina.png)}.aioseop_twitter_follow{background-image:url(../../modules/images/twitter-follow-retina.png)}}.aioseop_options{width:100%;margin:18px 0 10px 0}.aioseop_wrapper{width:100%;padding-left:5px}.aioseop_input{clear:left;width:98%;padding:5px 1%;display:inline-block}.aioseop_option_input{float:left;width:61%;margin:0;padding-left:1px;min-width:160px}#aiosp_sitemap_addl_pages_metabox .aioseop_options,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options{width:97%;margin:5px}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper{display:block;width:100%;float:none;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input{display:block;width:100%}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper{padding:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label{width:70%;margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label{height:30px!important}#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date{height:36px}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type{margin:0}#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary{margin-left:0!important}#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div{position:absolute;width:auto;margin:5px 0 10px 0}#aiosp_sitemap_addl_pages_metabox table.aioseop_table,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 5px 10px}.selectize-control.aioseop-exclude-terms{position:static;width:95%;max-width:600px}.selectize-input{padding:10px 0 10px 10px!important;border:1px solid #8d96a0!important}table.aioseop_table tr:nth-child(odd){background-color:#eee}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd){background-color:rgba(238,238,238,.5)}table.aioseop_table td{width:23%}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{width:80%;max-width:800px;display:block;border-top:1px solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{width:18%;border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info{margin-top:10px;border:1px solid #dfdfdf;width:80%;max-width:800px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th{background:#f1f1f1;background-image:-webkit-gradient(linear,left bottom,left top,from(#ececec),to(#f9f9f9));background-image:-webkit-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-moz-linear-gradient(bottom,#ececec,#f9f9f9);background-image:-o-linear-gradient(bottom,#ececec,#f9f9f9);background-image:linear-gradient(to top,#ececec,#f9f9f9);padding:5px;border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;-moz-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:1px solid #dfdfdf;border-bottom:1px solid #dfdfdf}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item{display:inline-block;width:30%;vertical-align:top}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even){font-weight:700}#aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd){width:70%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}table.aioseop_table td,table.aioseop_table th{padding:3px}.aioseop_no_label .aioseop_option_input,.aioseop_top_label .aioseop_option_input{width:100%}#aiosp_settings_form .postbox{margin:20px 0 0 0}.aioseop_settings_left .postbox{float:left;width:100%}.aioseop_option_setting_label{min-height:35px;display:inline-block;white-space:nowrap;overflow:hidden;padding-left:1px;max-width:229px;min-width:160px;width:33%}.aioseop_settings_left .postbox .inside{padding:0;margin:0;clear:right}#aiosp_robots_rules{clear:left;margin-left:20px;max-width:1072px}#aiosp_robots_default_metabox .aioseop_wrapper{width:31%;min-width:165px;display:inline-block;max-width:265px}#aiosp_robots_default_metabox .aioseop_help_text_div{position:absolute;margin:5px 0 10px 0}#aiosp_robots_default_metabox .aioseop_option_input{width:94%;min-width:94%}#aiosp_robots_default_metabox table.aioseop_table{width:96%;border:1px solid #ccc;margin:5px 0 10px 0}#aiosp_robots_default_metabox table.aioseop_table td{width:auto;max-width:50%;padding-left:2%;padding-right:2%}#aiosp_robots_default_metabox table.aioseop_table td:first-child{white-space:nowrap}.aioseop.aioseop_options.aiosp_robots_settings h3{margin:1.5em .6em .3em}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:left;width:92%;max-width:100%}#aiosp_sitemap_status_metabox .handlediv.button-link{display:none}#aiosp_sitemap_status_metabox.closed .inside{display:block}.aioseop_top_label{width:96%;margin:0 10px}.aioseop_hidden_type{margin:0;padding:0;height:0}#aiosp_title_metabox #aiosp_force_rewrites_wrapper{display:none;height:0}.aioseop_module.error.below-h2{padding:5px 0;margin:0 477px 15px 0!important}#aioseop_opengraph_settings .inside{margin:0}#aioseop_opengraph_settings_image_wrapper img{width:auto;height:75px}#aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label{max-width:160px;min-width:100px;width:30%}.aioseop_input input[type=checkbox],.aioseop_input input[type=radio]{border:1.25px solid #6c7781;vertical-align:text-bottom;margin-top:8px}.aioseop_input input[type=checkbox]:before{margin:-3px 0 0 -5px;color:#fff}.aioseop_input input[type=radio]{border-radius:8px}.aioseop_input input[type=radio]:before{content:none!important}.aioseop_input input[type=checkbox]:checked,.aioseop_input input[type=radio]:checked{background:#11a0d2}#aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div{max-height:initial}#aiosp{width:auto}.aioseop_input.aioseop_top_label .aioseop_option_input{margin:0 0 10px 0}.aiosp_file_editor_settings>.aioseop_textarea_type .aioseop_option_div{max-height:none}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{max-height:none}.aioseop_option_input .widefat td{vertical-align:middle}.entry-row.robots.quirks{font-weight:700;opacity:1}.entry-row.robots{opacity:.8}.entry-row.robots.invalid{opacity:1;font-weight:700}.invalid .entry_label{font-weight:700}.aioseop .aioseop_option_input tbody{background:#fcfcfc}.All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody{background:0 0}.entry-row.robots div{height:20px;vertical-align:middle;width:90%;margin:0 0 4px 0}.robots img{margin:0 0 0 2px;opacity:.6}.aioseop_option_docs{width:98%;display:none;border:1px solid #d3d3d3;margin-top:20px;padding:1%;background-color:#eee}.aioseop_option_docs h3{background:0 0}div.aioseop_notice{position:relative}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;right:10px}.aioseop_error_notice{color:red;font-weight:700}.aioseop_input select{border-radius:4px;border:1px solid #8d96a0}.aioseop_help_text ul{margin:15px 0 0 20px}.aioseop_help_text ul li{line-height:20px;margin:0}.aioseop_sidebar #side-sortables{width:98%}.aioseop_header_tabs.hide,.aioseop_tabs.hide{display:block!important}.aioseop_header_tabs li a.aioseop_header_tab{font-size:14px;line-height:37px;text-decoration:none;cursor:pointer;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-bottom:none!important;padding:0 .5em!important;color:#5f5f5f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_tab{padding:10px}.aioseop_loading{background-image:url(../../images/activity.gif);display:inline-block;width:24px;height:24px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs.ui-widget-content{background:0 0!important}.aioseop_tab.ui-widget-content{border:1px solid #aaa!important}.aioseop_tab.ui-widget-content a.aioseop_help_text_link{color:#757575!important}.aioseop_tabs.ui-widget{font-size:13px!important;border:none!important}.aioseop_tabs .ui-widget-header{border:none!important;background:0 0!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}.aioseop_tabs ul{margin-left:.2em!important}.aioseop_tabs .ui-tabs .ui-tabs-panel{border-width:inherit!important}.aioseop_tabs .ui-state-default,.aioseop_tabs .ui-widget-content .ui-state-default,.aioseop_tabs .ui-widget-header .ui-state-default{background-image:none!important}.aioseop_tabs .ui-state-active a{font-weight:700!important}.aiosp_delete{background-image:url(../../images/delete.png);display:inline-block;width:16px;height:16px;margin:0;padding:0;vertical-align:bottom}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:477px}.aioseop_tabs_div{margin-top:10px}#aiosp_settings_form ul.sfwd_debug_settings li strong{display:block;float:left;text-align:right;background-color:#ddd;margin-right:8px;padding:1px 8px 1px 1px;overflow:auto;width:200px;min-height:16px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong{background-color:#ccc}#aiosp_settings_form ul.sfwd_debug_settings li{clear:left;margin:0;padding:0;background-color:#eee;overflow:auto;max-width:75%;min-width:800px}#aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n){background-color:#ddd}div.sfwd_debug_mail_sent{background-color:#080;border:1px solid #0a0;margin:10px 0 10px 0;width:598px;color:#fff;text-align:center}div.sfwd_debug_error{background-color:red;color:#fff;border:1px solid #a00;margin:10px 0 10px 0;width:598px;text-align:center;font-weight:bolder}#aiosp_performance_status_wrapper .aioseop_option_div{max-height:420px}#aioseop_coming_soon,#aioseop_coming_soon2{padding-top:40px;text-align:center;height:258px;font-size:16px}.MRL{margin-left:20px!important;margin-bottom:10px!important}.postbox-container .aioseop_option_div{width:100%}.postbox-container .aioseop_option_div input[type=text],.postbox-container .aioseop_option_div textarea{width:99%;max-width:900px}.postbox-container .aioseop_option_label{max-width:none;height:auto!important}.postbox-container .aioseop_wrapper{padding:0}.postbox-container .aioseop_input{width:100%;margin-bottom:10px;padding:0}.postbox-container .aioseop_option_input{width:63%;padding:0}.postbox-container div#aiosp_upgrade_wrapper{float:none;width:auto;margin:0;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input{display:block;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input{float:none;width:auto;padding:0}.postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div{width:auto;min-height:0;padding:10px 0}.aioseop_tabs .aioseop_options{margin:0}#aioseop_opengraph_settings .aioseop_options{clear:both;margin-top:35px}div#aiosp_snippet_wrapper{border-radius:4px;border:1px solid #8d96a0;clear:both;padding:10px 10px 0;width:auto;margin:0 1px 15px}#aiosp_snippet_wrapper>.aioseop_input:first-child{margin-bottom:0}div#aiosp_snippet_wrapper .aioseop_option_label{height:auto!important}#aiosp_snippet_wrapper>.aioseop_input:first-child .aioseop_option_label{padding:0;min-height:inherit}div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input{margin:0;width:99%}div#aioseop_snippet{font-family:arial,sans-serif;font-size:13px}div#aioseop_snippet>h3{margin:10px 0 5px;font-size:18px;border:0;background:inherit;font-weight:400}div#aioseop_snippet>h3>a{color:#12c;text-decoration:none;cursor:pointer}div#aioseop_snippet>div{color:#545454;max-width:48em}div#aioseop_snippet>div>div{display:block;margin-bottom:1px}div#aioseop_snippet>div>div>cite{color:#00852b;font-style:normal}div#aioseop_snippet>div>span{margin:0;padding:0;border:0}.aioseop_count_chars_below_treshold{color:#515151!important;background-color:#eee!important}.aioseop_count_chars_near_treshold{color:#515151!important;background-color:#ff0!important}.aioseop_count_chars_past_treshold{color:#fff!important;background-color:red!important}textarea.robots-text{color:#000;background-color:#eee;height:100%;margin:0 0 0 10px}div#aiosp_sitemap_status_metabox .toggle-indicator{display:none}.required.email{border-radius:4px;border:1px solid #8d96a0;margin:1px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif!important}.aioseop_options_wrapper .ui-sortable-handle span{font-size:16px;font-weight:600;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;color:#000}.aioseop_file_upload{border:none!important}.aioseop_upload_image_button{float:left;margin:0 0 5px 0!important}.aioseop_delete_files_button{margin:0 5px 10px 0!important}.aioseop_rename_files_button{margin:0 0 10px 0!important}.aioseop_reset_settings_button,.aioseop_update_options_button{margin:10px 0 0 0!important}#aiosp_robots_default_metabox .aioseop_option_label{margin-left:10px}#aiosp_robots_default_metabox .add-edit-rule{margin-left:5px}#aiosp_file_editor_htaccess_metabox{margin:0!important}.aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value]{background-color:#0e7bbe;background-image:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div{background-color:#fff;padding:15px;border:1px solid #8d96a0;border-radius:4px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2190 ';padding-right:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-title{clear:both;text-align:center;font-weight:700;padding:10px 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar{border:1px solid #007cba;border-collapse:collapse}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead{background-color:#f1f1f1;border-bottom:1px solid #8d96a0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td,body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar thead th{width:2rem;height:2rem;text-align:center}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a{text-decoration:none}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div table.ui-datepicker-calendar td a:hover{border:1px solid #8d96a0;padding:5px 7px}
inc/aioseop_functions.php CHANGED
@@ -1076,68 +1076,6 @@ if ( ! function_exists( 'aiosp_log' ) ) {
1076
  }
1077
  }
1078
 
1079
- if ( ! function_exists( 'parse_ini_string' ) ) {
1080
- /**
1081
- * Parse INI String
1082
- *
1083
- * Parse_ini_string() doesn't exist pre PHP 5.3.
1084
- *
1085
- * @since ?
1086
- *
1087
- * @param $string
1088
- * @param $process_sections
1089
- * @return array|bool
1090
- */
1091
- function parse_ini_string( $string, $process_sections ) {
1092
-
1093
- if ( ! class_exists( 'parse_ini_filter' ) ) {
1094
-
1095
- /**
1096
- * Class parse_ini_filter
1097
- *
1098
- * Define our filter class.
1099
- */
1100
- // @codingStandardsIgnoreStart
1101
- class parse_ini_filter extends php_user_filter {
1102
- // @codingStandardsIgnoreEnd
1103
- /**
1104
- * Buffer
1105
- *
1106
- * @since ?
1107
- *
1108
- * @var string $buf
1109
- */
1110
- static $buf = '';
1111
-
1112
- /**
1113
- * The actual filter for parsing.
1114
- *
1115
- * @param $in
1116
- * @param $out
1117
- * @param $consumed
1118
- * @param $closing
1119
- *
1120
- * @return int
1121
- */
1122
- function filter( $in, $out, &$consumed, $closing ) {
1123
- $bucket = stream_bucket_new( fopen( 'php://memory', 'wb' ), self::$buf );
1124
- stream_bucket_append( $out, $bucket );
1125
-
1126
- return PSFS_PASS_ON;
1127
- }
1128
- }
1129
-
1130
- // Register our filter with PHP.
1131
- if ( ! stream_filter_register( 'parse_ini', 'parse_ini_filter' ) ) {
1132
- return false;
1133
- }
1134
- }
1135
- parse_ini_filter::$buf = $string;
1136
-
1137
- return parse_ini_file( 'php://filter/read=parse_ini/resource=php://memory', $process_sections );
1138
- }
1139
- }
1140
-
1141
  /**
1142
  * AIOSEOP Update User Visibility Notice
1143
  *
@@ -1403,7 +1341,34 @@ if ( ! function_exists( 'aioseop_is_woocommerce_active' ) ) {
1403
  }
1404
 
1405
  /**
1406
- * Gets the major version of a sementic plugin version.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1407
  *
1408
  * @since 3.2.8
1409
  *
1076
  }
1077
  }
1078
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1079
  /**
1080
  * AIOSEOP Update User Visibility Notice
1081
  *
1341
  }
1342
 
1343
  /**
1344
+ * The aioseop_get_page_number() function.
1345
+ *
1346
+ * Returns the number of the current page.
1347
+ * This can be used to determine if we're on a paginated page for example.
1348
+ *
1349
+ * @since ?
1350
+ * @since 3.2.0
1351
+ *
1352
+ * @return int $page_number
1353
+ */
1354
+ if ( ! function_exists( 'aioseop_get_page_number' ) ) {
1355
+ function aioseop_get_page_number() {
1356
+ global $post;
1357
+ if ( is_singular() && false === strpos( $post->post_content, '<!--nextpage-->', 0 ) ) {
1358
+ return null;
1359
+ }
1360
+
1361
+ // 'page' has to be used to determine the pagination number on a static front page.
1362
+ $page_number = get_query_var( 'page' );
1363
+ if ( empty( $page_number ) ) {
1364
+ $page_number = get_query_var( 'paged' );
1365
+ }
1366
+
1367
+ return $page_number;
1368
+ }
1369
+ }
1370
+
1371
+ /** Gets the major version of a sementic plugin version.
1372
  *
1373
  * @since 3.2.8
1374
  *
inc/aiosp_common.php CHANGED
@@ -202,7 +202,7 @@ class aiosp_common {
202
  * @return bool
203
  */
204
  public static function is_url_valid( $url ) {
205
- return filter_var( filter_var( $url, FILTER_SANITIZE_URL ), FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED ) !== false;
206
  }
207
 
208
  /**
202
  * @return bool
203
  */
204
  public static function is_url_valid( $url ) {
205
+ return filter_var( filter_var( $url, FILTER_SANITIZE_URL ), FILTER_VALIDATE_URL ) !== false;
206
  }
207
 
208
  /**
inc/compatability/compat-gutenberg.php DELETED
@@ -1,68 +0,0 @@
1
- <?php
2
- /**
3
- * The compat-gutenberg.php file.
4
- *
5
- * Contains compatibility fixes for the Gutenberg editor.
6
- *
7
- * @package All_in_One_SEO_Pack
8
- *
9
- * @since 3.2.8
10
- */
11
-
12
- /**
13
- * The gutenberg_fix_metabox() function.
14
- *
15
- * Change height of a specific CSS class to fix an issue in Chrome 77 with Gutenberg.
16
- *
17
- * @see https://github.com/WordPress/gutenberg/issues/17406
18
- * @link https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2914
19
- *
20
- * @since 3.2.8
21
- *
22
- * @return void
23
- */
24
- function aioseop_gutenberg_fix_metabox() {
25
- if ( false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'Chrome/77.' ) ) {
26
- add_action( 'admin_head', 'aioseop_swap_css' );
27
- }
28
- }
29
-
30
- /**
31
- * Swaps the CSS depending on PHP version
32
- *
33
- * @since 3.2.9
34
- *
35
- * @return void
36
- */
37
- function aioseop_swap_css() {
38
- global $wp_version;
39
-
40
- // Fix should be included in WP v5.3.
41
- if ( ! version_compare( $wp_version, '5.0', '>=' ) && version_compare( $wp_version, '5.3', '<' ) ) {
42
- return;
43
- }
44
-
45
- // CSS class renamed from 'editor' to 'block-editor' in WP v5.2.
46
- if ( version_compare( $wp_version, '5.2', '<' ) ) {
47
- aioseop_gutenberg_fix_metabox_helper( 'editor-writing-flow' );
48
- } elseif ( version_compare( $wp_version, '5.2', '>=' ) ) {
49
- aioseop_gutenberg_fix_metabox_helper( 'block-editor-writing-flow' );
50
- }
51
- }
52
-
53
- /**
54
- * The gutenberg_fix_metabox_helper() function.
55
- *
56
- * Overrides a Gutenberg CSS class using inline CSS.
57
- * Helper method of gutenberg_fix_metabox().
58
- *
59
- * @since 3.2.8
60
- *
61
- * @param string $class_name
62
- * @return void
63
- */
64
- function aioseop_gutenberg_fix_metabox_helper( $class_name ) {
65
- echo '<style>.' . $class_name . ' { height: auto; }</style>';
66
- }
67
-
68
- aioseop_gutenberg_fix_metabox();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/compatability/php-functions.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
- /**
3
- * Compatibility functions for PHP.
4
- *
5
- * @package All_in_One_SEO_Pack
6
- */
7
-
8
- if ( ! function_exists( 'array_column' ) ) {
9
- /**
10
- * Array Column PHP 5 >= 5.5.0, PHP 7
11
- *
12
- * Return the values from a single column in the input array.
13
- *
14
- * Pre-5.5 replacement/drop-in.
15
- *
16
- * @since 3.2
17
- *
18
- * @param array $input
19
- * @param string $column_key
20
- * @return array
21
- */
22
- function array_column( $input, $column_key ) {
23
- return array_combine( array_keys( $input ), wp_list_pluck( $input, $column_key ) );
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/{compatability → compatibility}/abstract/aiosep_compatible.php RENAMED
File without changes
inc/{compatability → compatibility}/abstract/index.php RENAMED
File without changes
inc/{compatability → compatibility}/compat-init.php RENAMED
@@ -152,8 +152,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
152
  * @since 2.3.12.3 WPML compatibility loaded.
153
  */
154
  public function load_compatibility_classes() {
155
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/gutenberg-chrome.php' );
156
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
157
  // Evaluate classes and push them into array.
158
  $target = new All_in_One_SEO_Pack_Wpml;
159
  if ( $target->exists() ) {
152
  * @since 2.3.12.3 WPML compatibility loaded.
153
  */
154
  public function load_compatibility_classes() {
155
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatibility/gutenberg-chrome.php' );
156
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatibility/compat-wpml.php' ); // Load classes.
157
  // Evaluate classes and push them into array.
158
  $target = new All_in_One_SEO_Pack_Wpml;
159
  if ( $target->exists() ) {
inc/{compatability → compatibility}/compat-wpml.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Compatability with WPML (WordPress Multilingual)
4
  *
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
1
  <?php
2
  /**
3
+ * Compatibility with WPML (WordPress Multilingual)
4
  *
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
inc/{compatability → compatibility}/gutenberg-chrome.php RENAMED
@@ -20,7 +20,7 @@ aioseop_chrome_fix_overlapping_metabox();
20
  * @return void
21
  */
22
  function aioseop_chrome_fix_overlapping_metabox() {
23
- if( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
24
  return;
25
  }
26
 
20
  * @return void
21
  */
22
  function aioseop_chrome_fix_overlapping_metabox() {
23
+ if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
24
  return;
25
  }
26
 
inc/{compatability → compatibility}/index.php RENAMED
File without changes
inc/compatibility/php-functions.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Compatibility functions for PHP.
4
+ *
5
+ * @package All_in_One_SEO_Pack
6
+ */
7
+
8
+ if ( ! function_exists( 'array_column' ) ) {
9
+ /**
10
+ * Array Column PHP 5 >= 5.5.0, PHP 7
11
+ *
12
+ * Return the values from a single column in the input array.
13
+ *
14
+ * Pre-5.5 replacement/drop-in.
15
+ *
16
+ * @since 3.2
17
+ *
18
+ * @param array $input
19
+ * @param string $column_key
20
+ * @return array
21
+ */
22
+ function array_column( $input, $column_key ) {
23
+ return array_combine( array_keys( $input ), wp_list_pluck( $input, $column_key ) );
24
+ }
25
+ }
26
+
27
+ if ( ! function_exists( 'parse_ini_string' ) ) {
28
+ /**
29
+ * Parse INI String
30
+ *
31
+ * Parse_ini_string() doesn't exist pre PHP 5.3.
32
+ *
33
+ * @since ?
34
+ * @since Moved from inc/aioseop_functions.php to inc/compatibility/php-functions.php
35
+ *
36
+ * @param string $string
37
+ * @param bool $process_sections
38
+ * @return array|bool
39
+ */
40
+ function parse_ini_string( $string, $process_sections ) {
41
+ if ( ! class_exists( 'parse_ini_filter' ) ) {
42
+
43
+ /**
44
+ * Class parse_ini_filter
45
+ *
46
+ * Define our filter class.
47
+ */
48
+ // @codingStandardsIgnoreStart
49
+ class parse_ini_filter extends php_user_filter
50
+ {
51
+ // @codingStandardsIgnoreEnd
52
+ /**
53
+ * Buffer
54
+ *
55
+ * @since ?
56
+ *
57
+ * @var string $buf
58
+ */
59
+ static $buf = '';
60
+
61
+ /**
62
+ * The actual filter for parsing.
63
+ *
64
+ * @param $in
65
+ * @param $out
66
+ * @param $consumed
67
+ * @param $closing
68
+ *
69
+ * @return int
70
+ */
71
+ function filter( $in, $out, &$consumed, $closing ) {
72
+ $bucket = stream_bucket_new( fopen( 'php://memory', 'wb' ), self::$buf );
73
+ stream_bucket_append( $out, $bucket );
74
+
75
+ return PSFS_PASS_ON;
76
+ }
77
+ }
78
+
79
+ // Register our filter with PHP.
80
+ if ( ! stream_filter_register( 'parse_ini', 'parse_ini_filter' ) ) {
81
+ return false;
82
+ }
83
+ }
84
+ parse_ini_filter::$buf = $string;
85
+
86
+ return parse_ini_file( 'php://filter/read=parse_ini/resource=php://memory', $process_sections );
87
+ }
88
+ }
inc/general/aioseop-robots-meta.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The aioseop-robots-meta.php file.
4
+ *
5
+ * Includes all code for the robots meta tag.
6
+ *
7
+ * @package All-in-One-SEO-Pack
8
+ */
9
+
10
+ /**
11
+ * The AIOSEOP_Robots_Meta class.
12
+ *
13
+ * @since 3.3.0 Moved code to its own dedicated file and class.
14
+ */
15
+ class AIOSEOP_Robots_Meta {
16
+
17
+ /**
18
+ * The get_robots_meta() function.
19
+ *
20
+ * Returns the noindex & nofollow value for the robots meta tag string.
21
+ *
22
+ * @since 2.3.5
23
+ * @since 2.3.11.5 Added noindex API filter hook for password protected posts.
24
+ * @since 3.2.0 Full refactoring.
25
+ * @since 3.2.4 Bug fixes.
26
+ * @since 3.3.0 Move conditional checks to dedicated functions.
27
+ *
28
+ * @return string
29
+ */
30
+ public function get_robots_meta() {
31
+ $post_type = get_post_type();
32
+ $page_number = aioseop_get_page_number();
33
+
34
+ $noindex = false;
35
+ $nofollow = false;
36
+ $post_meta_noindex = '';
37
+ $post_meta_nofollow = '';
38
+
39
+ if ( ! get_option( 'blog_public' ) ) {
40
+ return '';
41
+ }
42
+
43
+ if ( is_front_page() && 0 === $page_number ) {
44
+ return $this->get_robots_meta_helper( false, false );
45
+ }
46
+
47
+ if ( $this->is_static_page() ) {
48
+ $post_type = 'page';
49
+ }
50
+
51
+ if ( $this->has_post_meta() ) {
52
+ $post_meta_noindex = $this->get_meta_value( 'noindex' );
53
+ $post_meta_nofollow = $this->get_meta_value( 'nofollow' );
54
+ }
55
+
56
+ if ( 'on' === $post_meta_noindex ||
57
+ $this->is_noindexed_paginated_page( $page_number ) ||
58
+ $this->is_noindexed_password_protected_post() ||
59
+ $this->is_noindexed_tax() ||
60
+ $this->is_noindexed_singular( $post_type, $post_meta_noindex )
61
+ ) {
62
+ $noindex = true;
63
+ }
64
+
65
+ if ( 'on' === $post_meta_nofollow || $this->is_nofollowed_paginated_page( $page_number ) || $this->is_nofollowed_singular( $post_type, $post_meta_nofollow ) ) {
66
+ $nofollow = true;
67
+ }
68
+
69
+ return $this->get_robots_meta_helper( $noindex, $nofollow );
70
+ }
71
+
72
+ /**
73
+ * The get_robots_meta_helper() function.
74
+ *
75
+ * Helper function for get_robots_meta().
76
+ *
77
+ * @since 3.2.0
78
+ *
79
+ * @param bool $noindex
80
+ * @param bool $nofollow
81
+ *
82
+ * @return string
83
+ */
84
+ private function get_robots_meta_helper( $noindex, $nofollow ) {
85
+ $index_value = 'index';
86
+ $follow_value = 'follow';
87
+
88
+ if ( $noindex ) {
89
+ $index_value = 'noindex';
90
+ }
91
+
92
+ if ( $nofollow ) {
93
+ $follow_value = 'nofollow';
94
+ }
95
+
96
+ $robots_meta_value = sprintf( '%1$s,%2$s', $index_value, $follow_value );
97
+
98
+ /**
99
+ * The aioseop_robots_meta() filter hook.
100
+ *
101
+ * Allows users to filter the robots meta tag value.
102
+ *
103
+ * @since ?
104
+ * @since 3.3.0 Moved to dedicated class file.
105
+ *
106
+ * @param string $robots_meta_value
107
+ */
108
+ $robots_meta_value = apply_filters( 'aioseop_robots_meta', $robots_meta_value );
109
+
110
+ if ( 'index,follow' === $robots_meta_value ) {
111
+ return '';
112
+ }
113
+ return sprintf( '<meta name="robots" content="%s"', esc_attr( $robots_meta_value ) ) . " />\n";
114
+ }
115
+
116
+ /**
117
+ * The get_meta_value() function.
118
+ *
119
+ * Returns the noindex or nofollow meta value for the requested page.
120
+ * TODO Use $meta_opts when get_current_options() is refactored - #2729.
121
+ *
122
+ * @since 3.2.0
123
+ *
124
+ * @param string $key The requested meta key.
125
+ * @return string
126
+ */
127
+ private function get_meta_value( $key ) {
128
+ $requested_page = get_queried_object();
129
+ $meta = array();
130
+ $meta_value = '';
131
+
132
+ if ( property_exists( $requested_page, 'ID' ) ) {
133
+ $meta = get_post_meta( $requested_page->ID );
134
+ }
135
+
136
+ if ( property_exists( $requested_page, 'term_id' ) ) {
137
+ $meta = get_term_meta( $requested_page->term_id );
138
+ }
139
+
140
+ if ( $this->is_woocommerce_shop_page() ) {
141
+ $meta = get_post_meta( wc_get_page_id( 'shop' ) );
142
+ }
143
+
144
+ if ( is_array( $meta ) && array_key_exists( '_aioseop_' . $key, $meta ) ) {
145
+ $meta_value = $meta[ '_aioseop_' . $key ][0];
146
+ }
147
+
148
+ return $meta_value;
149
+ }
150
+
151
+ /**
152
+ * The is_static_page() function.
153
+ *
154
+ * Checks whether the current page is a static_page.
155
+ *
156
+ * @since 3.3.0
157
+ *
158
+ * @return bool
159
+ */
160
+ private function is_static_page() {
161
+ if ( $this->is_static_posts_page() || $this->is_woocommerce_shop_page() ) {
162
+ return true;
163
+ }
164
+ return false;
165
+ }
166
+
167
+ /**
168
+ * The is_static_posts_page() function.
169
+ *
170
+ * Checks whether the current page is the static posts page.
171
+ *
172
+ * @since 3.3.0
173
+ *
174
+ * @return bool
175
+ */
176
+ private function is_static_posts_page() {
177
+ if ( is_home() && 0 !== (int) get_option( 'page_for_posts' ) ) {
178
+ return true;
179
+ }
180
+ return false;
181
+ }
182
+
183
+ /**
184
+ * The is_woocommerce_shop_page() function.
185
+ *
186
+ * Checks whether the current page is the WooCommerce shop page.
187
+ *
188
+ * @since 3.3.0
189
+ *
190
+ * @return bool
191
+ */
192
+ private function is_woocommerce_shop_page() {
193
+ if ( aioseop_is_woocommerce_active() && is_shop() ) {
194
+ return true;
195
+ }
196
+ return false;
197
+ }
198
+
199
+ /**
200
+ * The has_post_meta() function.
201
+ *
202
+ * Checks whether the current page can have post meta.
203
+ *
204
+ * @since 3.3.0
205
+ *
206
+ * @return bool
207
+ */
208
+ private function has_post_meta() {
209
+ if ( ! is_date() &&
210
+ ! is_author() &&
211
+ ! is_search() &&
212
+ ! is_404()
213
+ ) {
214
+ return true;
215
+ }
216
+ return false;
217
+ }
218
+
219
+ /**
220
+ * The is_noindexed_paginated_page() function.
221
+ *
222
+ * Checks whether the current page is paginated and should be noindexed.
223
+ *
224
+ * @since 3.3.0
225
+ *
226
+ * @param int $page_number
227
+ * @return bool
228
+ */
229
+ private function is_noindexed_paginated_page( $page_number ) {
230
+ global $aioseop_options;
231
+ if ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) && 1 < $page_number ) {
232
+ return true;
233
+ }
234
+ return false;
235
+ }
236
+
237
+ /**
238
+ * The is_nofollowed_paginated_page() function.
239
+ *
240
+ * Checks whether the current page is paginated and should be nofollowed.
241
+ *
242
+ * @since 3.3.0
243
+ *
244
+ * @param int $page_number
245
+ * @return bool
246
+ */
247
+ private function is_nofollowed_paginated_page( $page_number ) {
248
+ global $aioseop_options;
249
+ if ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) && 1 < $page_number ) {
250
+ return true;
251
+ }
252
+ return false;
253
+ }
254
+
255
+ /**
256
+ * The is_noindexed_password_protected_post() function.
257
+ *
258
+ * Checks whether the current page is password protected and should be noindexed.
259
+ *
260
+ * @since 3.3.0
261
+ *
262
+ * @return bool
263
+ */
264
+ private function is_noindexed_password_protected_post() {
265
+ if ( is_singular() &&
266
+ $this->is_password_protected()
267
+ && apply_filters( 'post_meta_noindex_password_posts', false )
268
+ ) {
269
+ return true;
270
+ }
271
+ return false;
272
+ }
273
+
274
+ /**
275
+ * The is_noindexed_tax() function.
276
+ *
277
+ * Checks whether the current page is tax term or archive page and should be noindexed.
278
+ *
279
+ * @since 3.3.0
280
+ *
281
+ * @return bool
282
+ */
283
+ private function is_noindexed_tax() {
284
+ global $aioseop_options;
285
+ if (
286
+ ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) ||
287
+ ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) ||
288
+ ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ||
289
+ ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) ) ||
290
+ ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) ) ||
291
+ ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) ) ||
292
+ ( is_tax() && in_array( get_query_var( 'taxonomy' ), $this->get_noindexed_taxonomies() ) )
293
+ ) {
294
+ return true;
295
+ }
296
+ return false;
297
+ }
298
+
299
+ /**
300
+ * The get_noindexed_taxonomies() function.
301
+ *
302
+ * Returns a list of sitewide noindexed taxonomies.
303
+ *
304
+ * @since 3.3.0
305
+ *
306
+ * @return array
307
+ */
308
+ private function get_noindexed_taxonomies() {
309
+ global $aioseop_options;
310
+ if ( isset( $aioseop_options['aiosp_tax_noindex'] ) && ! empty( $aioseop_options['aiosp_tax_noindex'] ) ) {
311
+ return $aioseop_options['aiosp_tax_noindex'];
312
+ }
313
+ return array();
314
+ }
315
+
316
+ /**
317
+ * The is_noindexed_singular() function.
318
+ *
319
+ * Checks whether the current page is singular and should be noindexed.
320
+ *
321
+ * @since 3.3.0
322
+ *
323
+ * @param string $post_type
324
+ * @param string $post_meta_noindex
325
+ *
326
+ * @return bool
327
+ */
328
+ private function is_noindexed_singular( $post_type, $post_meta_noindex ) {
329
+ global $aioseop_options;
330
+ if ( is_singular() && '' === $post_meta_noindex &&
331
+ ! empty( $aioseop_options['aiosp_cpostnoindex'] ) &&
332
+ in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] )
333
+ ) {
334
+ return true;
335
+ }
336
+ return false;
337
+ }
338
+
339
+ /**
340
+ * The is_nofollowed_singular() function.
341
+ *
342
+ * Checks whether the current page is singular and should be nofollowed.
343
+ *
344
+ * @since 3.3.0
345
+ *
346
+ * @param string $post_type
347
+ * @param string $post_meta_follow
348
+ *
349
+ * @return bool
350
+ */
351
+ private function is_nofollowed_singular( $post_type, $post_meta_follow ) {
352
+ global $aioseop_options;
353
+ if ( is_singular() && '' === $post_meta_follow &&
354
+ ! empty( $aioseop_options['aiosp_cpostnofollow'] ) &&
355
+ in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] )
356
+ ) {
357
+ return true;
358
+ }
359
+ return false;
360
+ }
361
+
362
+ /**
363
+ * The is_password_protected() function.
364
+ *
365
+ * Determine if the current post is password protected.
366
+ *
367
+ * @since 2.3.11.5
368
+ * @since 3.3.0 Moved to aioseop-robots-meta.php.
369
+ *
370
+ * @return bool
371
+ */
372
+ function is_password_protected() {
373
+ global $post;
374
+ if ( ! empty( $post->post_password ) ) {
375
+ return true;
376
+ }
377
+ return false;
378
+ }
379
+ }
inc/schema/graphs/graph-organization.php CHANGED
@@ -58,17 +58,45 @@ class AIOSEOP_Graph_Organization extends AIOSEOP_Graph {
58
  // Site represents Organization or Person.
59
  if ( 'person' === $aioseop_options['aiosp_schema_site_represents'] ) {
60
  $person_id = intval( $aioseop_options['aiosp_schema_person_user'] );
 
 
 
 
 
 
61
 
62
- $rtn_data['@type'] = array( 'Person', $this->slug );
63
- $rtn_data['@id'] = home_url() . '/#person';
64
- $rtn_data['name'] = get_the_author_meta( 'display_name', $person_id );
65
- $rtn_data['sameAs'] = $this->get_user_social_profile_links( $person_id );
66
 
67
- // Handle Logo/Image.
68
- $image_schema = $this->prepare_image( $this->get_user_image_data( $person_id ), home_url() . '/#personlogo' );
69
- if ( $image_schema ) {
70
- $rtn_data['image'] = $image_schema;
71
- $rtn_data['logo'] = array( '@id' => home_url() . '/#personlogo' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  }
73
  } else {
74
  // Get Name from General > Schema Settings > Organization Name, and fallback on WP's Site Name.
58
  // Site represents Organization or Person.
59
  if ( 'person' === $aioseop_options['aiosp_schema_site_represents'] ) {
60
  $person_id = intval( $aioseop_options['aiosp_schema_person_user'] );
61
+ // If no user is selected, then use first admin available.
62
+ if ( 0 === $person_id ) {
63
+ $args = array(
64
+ 'role' => 'administrator',
65
+ );
66
+ $users = get_users( $args );
67
 
68
+ if ( ! empty( $users ) ) {
69
+ $person_id = $users[0]->ID;
70
+ }
71
+ }
72
 
73
+ $rtn_data['@type'] = array( 'Person', $this->slug );
74
+ $rtn_data['@id'] = home_url() . '/#person';
75
+
76
+ if ( -1 === $person_id ) {
77
+ // Manually added Person's name.
78
+ $rtn_data['name'] = $aioseop_options['aiosp_schema_person_manual_name'];
79
+
80
+ // Handle Logo/Image.
81
+ $image_data = wp_parse_args( array( 'url' => $aioseop_options['aiosp_schema_person_manual_image'] ), $this->get_image_data_defaults() );
82
+ $image_schema = $this->prepare_image( $image_data, home_url() . '/#personlogo' );
83
+ if ( $image_schema ) {
84
+ $rtn_data['image'] = $image_schema;
85
+ $rtn_data['logo'] = array( '@id' => home_url() . '/#personlogo' );
86
+ }
87
+ } else {
88
+ // User's Display Name.
89
+ $rtn_data['name'] = get_the_author_meta( 'display_name', $person_id );
90
+
91
+ // Social links from user profile.
92
+ $rtn_data['sameAs'] = $this->get_user_social_profile_links( $person_id );
93
+
94
+ // Handle Logo/Image for retrieving gravatar and image schema.
95
+ $image_schema = $this->prepare_image( $this->get_user_image_data( $person_id ), home_url() . '/#personlogo' );
96
+ if ( $image_schema ) {
97
+ $rtn_data['image'] = $image_schema;
98
+ $rtn_data['logo'] = array( '@id' => home_url() . '/#personlogo' );
99
+ }
100
  }
101
  } else {
102
  // Get Name from General > Schema Settings > Organization Name, and fallback on WP's Site Name.
inc/schema/graphs/graph-webpage.php CHANGED
@@ -89,15 +89,15 @@ class AIOSEOP_Graph_WebPage extends AIOSEOP_Graph_Creativework {
89
  if ( is_year() ) {
90
  $current_url = get_year_link( false );
91
  /* translators: Yearly archive title. %s: Year */
92
- $current_name = sprintf( __( 'Year: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'Y', 'yearly archives date format', 'all-in-one-seo-pack' ) ) );
93
  } elseif ( is_month() ) {
94
  $current_url = get_month_link( false, false );
95
  /* translators: Monthly archive title. %s: Month name and year */
96
- $current_name = sprintf( __( 'Month: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'all-in-one-seo-pack' ) ) );
97
  } else {
98
  $current_url = get_day_link( false, false, false );
99
  /* translators: Daily archive title. %s: Date */
100
- $current_name = sprintf( __( 'Day: %s', 'all-in-one-seo-pack' ), get_the_date( _x( 'F j, Y', 'daily archives date format', 'all-in-one-seo-pack' ) ) );
101
  }
102
  } elseif ( is_author() ) {
103
  $user_id = intval( $post->post_author );
89
  if ( is_year() ) {
90
  $current_url = get_year_link( false );
91
  /* translators: Yearly archive title. %s: Year */
92
+ $current_name = sprintf( __( 'Year: %s', 'all-in-one-seo-pack' ), get_the_date( 'Y' ) );
93
  } elseif ( is_month() ) {
94
  $current_url = get_month_link( false, false );
95
  /* translators: Monthly archive title. %s: Month name and year */
96
+ $current_name = sprintf( __( 'Month: %s', 'all-in-one-seo-pack' ), get_the_date( 'F Y' ) );
97
  } else {
98
  $current_url = get_day_link( false, false, false );
99
  /* translators: Daily archive title. %s: Date */
100
+ $current_name = sprintf( __( 'Day: %s', 'all-in-one-seo-pack' ), get_the_date( 'F j, Y' ) );
101
  }
102
  } elseif ( is_author() ) {
103
  $user_id = intval( $post->post_author );
inc/schema/graphs/graph.php CHANGED
@@ -152,7 +152,7 @@ abstract class AIOSEOP_Graph {
152
 
153
  // Encode to json string, and remove string type around shortcodes.
154
  if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
155
- $schema_data = wp_json_encode( (object) $schema_data, JSON_UNESCAPED_SLASHES );
156
  } else {
157
  // PHP <= 5.3 compatibility.
158
  $schema_data = wp_json_encode( (object) $schema_data );
152
 
153
  // Encode to json string, and remove string type around shortcodes.
154
  if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
155
+ $schema_data = wp_json_encode( (object) $schema_data, JSON_UNESCAPED_SLASHES ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.json_unescaped_slashesFound
156
  } else {
157
  // PHP <= 5.3 compatibility.
158
  $schema_data = wp_json_encode( (object) $schema_data );
inc/schema/schema-builder.php CHANGED
@@ -158,7 +158,7 @@ class AIOSEOP_Schema_Builder {
158
 
159
  // Encode to json string, and remove string type around shortcodes.
160
  if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
161
- $layout = wp_json_encode( (object) $layout, JSON_UNESCAPED_SLASHES );
162
  } else {
163
  // PHP <= 5.3 compatibility.
164
  $layout = wp_json_encode( (object) $layout );
158
 
159
  // Encode to json string, and remove string type around shortcodes.
160
  if ( version_compare( PHP_VERSION, '5.4', '>=' ) ) {
161
+ $layout = wp_json_encode( (object) $layout, JSON_UNESCAPED_SLASHES ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.json_unescaped_slashesFound
162
  } else {
163
  // PHP <= 5.3 compatibility.
164
  $layout = wp_json_encode( (object) $layout );
js/{count-chars.js → admin/aioseop-count-chars-old.js} RENAMED
File without changes
js/{count-chars.min.js → admin/aioseop-count-chars-old.min.js} RENAMED
File without changes
js/admin/aioseop-count-chars.js ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Counts characters of the title and description fields.
3
+ *
4
+ * @since 2.9.2
5
+ * @since 3.2.0 Moved to its own file.
6
+ * @since 3.3.0 Full refactoring.
7
+ */
8
+
9
+ $(function () { // eslint-disable-line max-statements
10
+
11
+ "use strict";
12
+
13
+ let isGutenberg;
14
+ let autogenerateDescriptions;
15
+ let extraTitleLength;
16
+ let pluginDirName;
17
+ let currentPage;
18
+ let inputField;
19
+ let counterField;
20
+ let fieldSize;
21
+ let timeout = 0;
22
+
23
+ if ('undefined' !== typeof aioseopCharacterCounter) {
24
+ isGutenberg = aioseopCharacterCounter.isGutenberg;
25
+ autogenerateDescriptions = aioseopCharacterCounter.autogenerateDescriptions;
26
+ extraTitleLength = +aioseopCharacterCounter.extraTitleLength;
27
+ pluginDirName = aioseopCharacterCounter.pluginDirName;
28
+ currentPage = aioseopCharacterCounter.currentPage;
29
+ }
30
+ else if ('undefined' !== typeof aioseopOGCharacterCounter) {
31
+ pluginDirName = aioseopOGCharacterCounter.pluginDirName;
32
+ currentPage = aioseopOGCharacterCounter.currentPage;
33
+ }
34
+ aioseopAddEventListeners();
35
+ // Fire once on page load.
36
+ aioseopCountChars();
37
+
38
+ /**
39
+ * Adds the relevant event listeners.
40
+ *
41
+ * @since 3.3.0
42
+ *
43
+ * @return void
44
+ */
45
+ function aioseopAddEventListeners() {
46
+ aioseopAddGeneralListener();
47
+
48
+ if (!aioseopIsEditPage()) {
49
+ return;
50
+ }
51
+
52
+ if ('false' === isGutenberg) {
53
+ aioseopAddClassicEditorListener();
54
+ } else {
55
+ aioseopAddGutenbergEditorListener();
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Adds the general/shared events listeners.
61
+ *
62
+ * @since 3.3.0
63
+ *
64
+ * @return void
65
+ */
66
+ function aioseopAddGeneralListener() {
67
+ $('.aioseop_count_chars').on('keyup', function () {
68
+ aioseopCountChars();
69
+ });
70
+ }
71
+
72
+ /**
73
+ * Adds the event listeners for the Classic Editor.
74
+ *
75
+ * @since 3.3.0
76
+ *
77
+ * @return void
78
+ */
79
+ function aioseopAddClassicEditorListener() {
80
+ setTimeout(function () {
81
+ tinymce.editors[0].on('KeyUp', function () {
82
+ aioseopCountChars();
83
+ });
84
+ }, 1000);
85
+
86
+ $('#title, #excerpt').on('keyup', function () {
87
+ aioseopCountChars();
88
+ });
89
+ }
90
+
91
+ /**
92
+ * Adds the event listener for the Gutenberg Editor.
93
+ *
94
+ * @since 3.3.0
95
+ *
96
+ * @return void
97
+ */
98
+ function aioseopAddGutenbergEditorListener() {
99
+ window._wpLoadBlockEditor.then(function () {
100
+ setTimeout(function () {
101
+ // https://developer.wordpress.org/block-editor/packages/packages-data/
102
+ wp.data.subscribe(function () {
103
+ clearTimeout(timeout);
104
+ timeout = setTimeout(function () {
105
+ aioseopCountChars();
106
+ }, 200);
107
+ });
108
+ });
109
+ });
110
+ }
111
+
112
+ /**
113
+ * Get the character count for all fields on the Edit page.
114
+ *
115
+ * @since 3.3.0
116
+ *
117
+ * @return void
118
+ */
119
+ function aioseopCountChars() {
120
+ let countCharsFields;
121
+ switch (currentPage) {
122
+ case 'toplevel_page_all-in-one-seo-packp/aioseop_class':
123
+ case 'aiosp_opengraph_description': {
124
+ countCharsFields = [
125
+ aioseopDefineTitleField,
126
+ aioseopDefineDescriptionField
127
+ ];
128
+ break;
129
+ }
130
+ default: {
131
+ countCharsFields = [
132
+ aioseopDefineTitleField,
133
+ aioseopDefineDescriptionField,
134
+ aioseopDefineOGTitleField,
135
+ aioseopDefineOGDescriptionField
136
+ ];
137
+ break;
138
+ }
139
+ }
140
+
141
+ countCharsFields.forEach(function (defineField) {
142
+ defineField();
143
+ aioseopCountCharsHelper();
144
+ });
145
+ }
146
+
147
+ /**
148
+ * Counts the characters of a certain field and shows this on the front-end.
149
+ *
150
+ * @since 3.3.0
151
+ *
152
+ * @return void
153
+ */
154
+ function aioseopCountCharsHelper() {
155
+ let extra = 0;
156
+
157
+ if ('undefined' !== typeof inputField.attr('size')) {
158
+ fieldSize = +inputField.attr('size');
159
+ } else {
160
+ fieldSize = +inputField.attr('rows') * +inputField.attr('cols');
161
+ }
162
+
163
+ if (('aiosp_title' === inputField.attr('name')) && ('undefined' !== typeof extraTitleLength)) {
164
+ extra = extraTitleLength;
165
+ }
166
+
167
+ if (0 === +inputField.length) {
168
+ aioseopChangeCountBackground();
169
+ return;
170
+ }
171
+
172
+ counterField.val(+inputField.val().length + extra);
173
+
174
+ aioseopCheckIfAutogenerated();
175
+ aioseopChangeCountBackground();
176
+ }
177
+
178
+ /**
179
+ * Checks if the title or description is autogenerated and, if so, counts the characters of the preview snippet.
180
+ *
181
+ * @since 3.3.0
182
+ */
183
+ function aioseopCheckIfAutogenerated() {
184
+ if (
185
+ (!aioseopIsEditPage()) ||
186
+ (('on' !== autogenerateDescriptions) && ('aiosp_description' === inputField.attr('name'))) ||
187
+ (('on' !== autogenerateDescriptions) && ('aioseop_opengraph_settings_desc' === inputField.attr('name'))) ||
188
+ 0 !== +inputField.val().length
189
+ ) {
190
+ return;
191
+ }
192
+
193
+ let descriptionField;
194
+ switch (inputField.attr('name')) {
195
+ case 'aiosp_title':
196
+ case 'aioseop_opengraph_settings_title':
197
+ counterField.val(+$('#aiosp_snippet_title').parent()[0].innerText.length);
198
+ break;
199
+ default:
200
+ descriptionField = $('[name=aiosp_description]')[0].placeholder;
201
+ counterField.val(+descriptionField.length);
202
+ if (' ...' === descriptionField.slice(descriptionField.length - 4)) {
203
+ counterField.val(descriptionField.length - 4);
204
+ }
205
+ break;
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Changes the background colour of the character counter field based on the amount of characters.
211
+ *
212
+ * @since 3.3.0
213
+ *
214
+ * @return void
215
+ */
216
+ function aioseopChangeCountBackground() {
217
+ if (+counterField.val() > +fieldSize) {
218
+ counterField.removeClass().addClass('aioseop_count_chars_past_treshold');
219
+ return;
220
+ }
221
+
222
+ switch (inputField.attr('name')) {
223
+ case 'aiosp_title':
224
+ case 'aiosp_home_title':
225
+ aioseopChangeCountBackgroundHelper(6);
226
+ break;
227
+ case 'aioseop_opengraph_settings_title':
228
+ case 'aiosp_opengraph_hometitle':
229
+ aioseopChangeCountBackgroundHelper(40);
230
+ break;
231
+ case 'aioseop_opengraph_settings_desc':
232
+ case 'aiosp_opengraph_description':
233
+ aioseopChangeCountBackgroundHelper(145);
234
+ break;
235
+ default:
236
+ aioseopChangeCountBackgroundHelper(10);
237
+ break;
238
+ }
239
+ }
240
+
241
+ /**
242
+ * Helper function for aioseopChangeCountBackground().
243
+ *
244
+ * @since 3.3.0
245
+ *
246
+ * @param int characterTreshold The amount of characters that have to be deducted from the field size to set the treshold.
247
+ * @return void
248
+ */
249
+ function aioseopChangeCountBackgroundHelper(characterTreshold) {
250
+ if (+counterField.val() > (+fieldSize - +characterTreshold)) {
251
+ counterField.removeClass().addClass('aioseop_count_chars_near_treshold');
252
+ } else {
253
+ counterField.removeClass().addClass('aioseop_count_chars_below_treshold');
254
+ }
255
+ }
256
+
257
+ /**
258
+ * Sets the current input field and counter field based on the title field.
259
+ *
260
+ * @since 3.3.0
261
+ *
262
+ * @return void
263
+ */
264
+ function aioseopDefineTitleField() {
265
+ let titleField;
266
+ switch (currentPage) {
267
+ case 'toplevel_page_' + pluginDirName + '/aioseop_class': {
268
+ titleField = 'aiosp_home_title';
269
+ break;
270
+ }
271
+ case 'all-in-one-seo_page_aiosp_opengraph': {
272
+ titleField = 'aiosp_opengraph_hometitle';
273
+ break;
274
+ }
275
+ default: {
276
+ titleField = 'aiosp_title';
277
+ break;
278
+ }
279
+ }
280
+ aioseopDefineFieldHelper(titleField);
281
+ }
282
+
283
+ /**
284
+ * Sets the current input field and counter field based on the Open Graph title field.
285
+ *
286
+ * @since 3.3.0
287
+ *
288
+ * @return void
289
+ */
290
+ function aioseopDefineOGTitleField() {
291
+ aioseopDefineFieldHelper('aioseop_opengraph_settings_title');
292
+ }
293
+
294
+ /**
295
+ * Sets the current input field and counter field based on the Open Graph description field.
296
+ *
297
+ * @since 3.3.0
298
+ *
299
+ * @return void
300
+ */
301
+ function aioseopDefineOGDescriptionField() {
302
+ let descriptionField;
303
+ switch (currentPage) {
304
+ case 'toplevel_page_' + pluginDirName + '/aioseop_class': {
305
+ descriptionField = 'aiosp_home_description';
306
+ break;
307
+ }
308
+ case 'all-in-one-seo_page_aiosp_opengraph': {
309
+ descriptionField = 'aiosp_opengraph_description';
310
+ break;
311
+ }
312
+ default: {
313
+ descriptionField = 'aiosp_description';
314
+ break;
315
+ }
316
+ }
317
+
318
+ aioseopDefineFieldHelper(descriptionField);
319
+ }
320
+
321
+ /**
322
+ * Sets the current input field and counter field based on the description field.
323
+ *
324
+ * @since 3.3.0
325
+ *
326
+ * @return void
327
+ */
328
+ function aioseopDefineDescriptionField() {
329
+ aioseopDefineFieldHelper('aioseop_opengraph_settings_desc');
330
+ }
331
+
332
+ /**
333
+ * Helper function. Sets the current input field and counter field.
334
+ *
335
+ * @since 3.3.0
336
+ *
337
+ * @param string fieldName The name of the current field.
338
+ */
339
+ function aioseopDefineFieldHelper(fieldName) {
340
+ inputField = $('[name="' + fieldName + '"]');
341
+ counterField = inputField.parent().find('[name="' + inputField.attr('data-length-field') + '"]');
342
+ }
343
+
344
+ /**
345
+ * Checks whether the current page is the Edit page.
346
+ *
347
+ * @since 3.3.0
348
+ *
349
+ * @return bool Whether the current page is the Edit page.
350
+ */
351
+ function aioseopIsEditPage() {
352
+ if (
353
+ ('post.php' !== currentPage) &&
354
+ ('post-new.php' !== currentPage) &&
355
+ ('term.php' !== currentPage)
356
+ ) {
357
+ return false;
358
+ }
359
+ return true;
360
+ }
361
+
362
+ });
js/admin/aioseop-count-chars.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var pluginDirName,currentPage;if("undefined"!=typeof aioseopCharacterCounter){var aioseopCharacterCounterIsGutenberg=aioseopCharacterCounter.isGutenberg,aioseopCharacterCounterAutogenerateDescriptions=aioseopCharacterCounter.autogenerateDescriptions,extraTitleLength=+aioseopCharacterCounter.extraTitleLength;currentPage=aioseopCharacterCounter.currentPage,pluginDirName=aioseopCharacterCounter.pluginDirName}else"undefined"!=typeof aioseopOGCharacterCounter&&(pluginDirName=aioseopOGCharacterCounter.pluginDirName,currentPage=aioseopOGCharacterCounter.currentPage);$(function(){"use strict";var a,t,o,e=0;function n(){var e;switch(currentPage){case"toplevel_page_all-in-one-seo-packp/aioseop_class":case"aiosp_opengraph_description":e=[p,l];break;default:e=[p,l,c,u]}for(var a=0;a<e.length;a++)e[a](),r()}function r(){var e=0;o=void 0!==a.attr("size")?+a.attr("size"):+a.attr("rows")*+a.attr("cols"),"aiosp_title"===a.attr("name")&&void 0!==extraTitleLength&&(e=extraTitleLength),0!=+a.length&&(t.val(+a.val().length+e),function(){if(!g()||"on"!==aioseopCharacterCounterAutogenerateDescriptions&&"aiosp_description"===a.attr("name")||"on"!==aioseopCharacterCounterAutogenerateDescriptions&&"aioseop_opengraph_settings_desc"===a.attr("name")||0!=+a.val().length)return;switch(a.attr("name")){case"aiosp_title":case"aioseop_opengraph_settings_title":t.val(+$("#aiosp_snippet_title").parent()[0].innerText.length);break;default:var e=$("[name=aiosp_description]")[0].placeholder;t.val(+e.length)," ..."===e.slice(e.length-4)&&t.val(e.length-4)}}()),i()}function i(){if(+t.val()>+o)t.removeClass().addClass("aioseop_count_chars_past_treshold");else switch(a.attr("name")){case"aiosp_title":case"aiosp_home_title":s(6);break;case"aioseop_opengraph_settings_title":case"aiosp_opengraph_hometitle":s(40);break;case"aioseop_opengraph_settings_desc":case"aiosp_opengraph_description":s(145);break;default:s(10)}}function s(e){+t.val()>+o-+e?t.removeClass().addClass("aioseop_count_chars_near_treshold"):t.removeClass().addClass("aioseop_count_chars_below_treshold")}function p(){var e;switch(currentPage){case"toplevel_page_"+pluginDirName+"/aioseop_class":e="aiosp_home_title";break;case"all-in-one-seo_page_aiosp_opengraph":e="aiosp_opengraph_hometitle";break;default:e="aiosp_title"}_(e)}function c(){_("aioseop_opengraph_settings_title")}function u(){var e;switch(currentPage){case"toplevel_page_"+pluginDirName+"/aioseop_class":e="aiosp_home_description";break;case"all-in-one-seo_page_aiosp_opengraph":e="aiosp_opengraph_description";break;default:e="aiosp_description"}_(e)}function l(){_("aioseop_opengraph_settings_desc")}function _(e){a=$('[name="'+e+'"]'),t=a.parent().find('[name="'+a.attr("data-length-field")+'"]')}function g(){return"post.php"===currentPage||"post-new.php"===currentPage||"term.php"===currentPage}!function(){if($(".aioseop_count_chars").on("keyup",function(){n()}),!g())return;"false"===aioseopCharacterCounterIsGutenberg?(setTimeout(function(){tinymce.editors[0].on("KeyUp",function(){n()})},1e3),$("#title, #excerpt").on("keyup",function(){n()})):window._wpLoadBlockEditor.then(function(){setTimeout(function(){wp.data.subscribe(function(){clearTimeout(e),e=setTimeout(function(){n()},200)})})})}(),n()});
js/admin/aioseop-preview-snippet.js ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handles the Preview Snippet on the Edit screen.
3
+ *
4
+ * @since 3.3.0
5
+ *
6
+ * @package all-in-one-seo-pack
7
+ * @package xregexp
8
+ */
9
+
10
+ $(function () {
11
+
12
+ "use strict";
13
+
14
+ let docTitle = '';
15
+ let snippetTitle = $('#aiosp_snippet_title');
16
+ let snippetDescription = $('#aioseop_snippet_description');
17
+ let aioseopTitle = $('input[name="aiosp_title"]');
18
+ let aioseopDescription = $('textarea[name="aiosp_description"]');
19
+ let timeout = 0;
20
+ let isGutenberg = aioseop_preview_snippet.isGutenberg;
21
+ let autogenerateDescriptions = aioseop_preview_snippet.autogenerateDescriptions;
22
+ let skipExcerpt = aioseop_preview_snippet.skipExcerpt;
23
+
24
+ aioseopUpdateMetabox();
25
+
26
+ /**
27
+ * The aioseopUpdateMetabox() function.
28
+ *
29
+ * Updates the preview snippet and input field placeholders in the meta box when a change happens.
30
+ *
31
+ * @since 3.3.0
32
+ */
33
+ function aioseopUpdateMetabox() {
34
+ let inputFields = [aioseopTitle, aioseopDescription];
35
+
36
+ if ('false' === isGutenberg) {
37
+ docTitle = $('#title');
38
+ let postExcerpt = $('#excerpt');
39
+
40
+ inputFields.push(docTitle, postExcerpt);
41
+
42
+ setTimeout(function () {
43
+ tinymce.editors[0].on('KeyUp', function () {
44
+ aioseopUpdatePreviewSnippet();
45
+ });
46
+ }, 1000);
47
+ }
48
+ else {
49
+ window._wpLoadBlockEditor.then(function () {
50
+ setTimeout(function () {
51
+ // https://developer.wordpress.org/block-editor/packages/packages-data/
52
+ wp.data.subscribe(function () {
53
+ clearTimeout(timeout);
54
+ // This is needed because the code otherwise is triggered dozens of times.
55
+ timeout = setTimeout(function () {
56
+ aioseopUpdatePreviewSnippet();
57
+ }, 200);
58
+ });
59
+ });
60
+ });
61
+ }
62
+
63
+ inputFields.forEach(addEvent);
64
+ function addEvent(item) {
65
+ item.on('input', function () {
66
+ aioseopUpdatePreviewSnippet();
67
+ });
68
+ }
69
+
70
+ //Run once on page load.
71
+ timeout = setTimeout(function () {
72
+ aioseopUpdatePreviewSnippet();
73
+ }, 1000);
74
+ }
75
+
76
+ /**
77
+ * AIOSEOP Update Preview Snippet
78
+ *
79
+ * @uses wp.data.select().getEditedPostAttribute()
80
+ * @link https://developer.wordpress.org/block-editor/data/data-core-editor/#getEditedPostAttribute
81
+ *
82
+ * @since 3.3
83
+ */
84
+ function aioseopUpdatePreviewSnippet() {
85
+ let postTitle = '';
86
+ let postContent = '';
87
+ let postExcerpt = '';
88
+
89
+ if ('false' === isGutenberg) {
90
+ postTitle = aioseopStripMarkup($.trim($('#title').val()));
91
+ postContent = aioseopShortenDescription($('#content_ifr').contents().find('body')[0].innerHTML);
92
+ postExcerpt = aioseopShortenDescription($.trim($('#excerpt').val()));
93
+ }
94
+ else {
95
+ postTitle = aioseopStripMarkup($.trim($('#post-title-0').val()));
96
+ postContent = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('content'));
97
+ postExcerpt = aioseopShortenDescription(wp.data.select('core/editor').getEditedPostAttribute('excerpt'));
98
+ }
99
+
100
+ let metaboxTitle = aioseopStripMarkup($.trim($('input[name="aiosp_title').val()));
101
+ let metaboxDescription = aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val()));
102
+
103
+ snippetTitle.text(postTitle);
104
+ aioseopTitle.attr('placeholder', postTitle);
105
+
106
+ if ('' !== metaboxTitle) {
107
+ snippetTitle.text(metaboxTitle);
108
+ }
109
+
110
+ if ('on' === autogenerateDescriptions) {
111
+ snippetDescription.text(postContent);
112
+ aioseopDescription.attr('placeholder', postContent);
113
+
114
+ if ('on' !== skipExcerpt & '' !== postExcerpt) {
115
+ snippetDescription.text(postExcerpt);
116
+ aioseopDescription.attr('placeholder', postExcerpt);
117
+ }
118
+ } else {
119
+ snippetDescription.text("");
120
+ aioseopDescription.attr('placeholder', "");
121
+ }
122
+
123
+ if ('' !== metaboxDescription) {
124
+ snippetDescription.text(metaboxDescription);
125
+ aioseopDescription.attr('placeholder', metaboxDescription);
126
+ }
127
+ }
128
+
129
+ /**
130
+ * The aioseopShortenDescription() function.
131
+ *
132
+ * Shortens the description to max. 160 characters without truncation.
133
+ *
134
+ * @since 3.3.0
135
+ *
136
+ * @param string description
137
+ */
138
+ function aioseopShortenDescription(description) {
139
+ description = aioseopStripMarkup(description);
140
+ if (160 < description.length) {
141
+ let excessLength = description.length - 160;
142
+ let regex = new XRegExp("[^\\pZ\\pP]*.{" + excessLength + "}$");
143
+ description = XRegExp.replace(description, regex, '');
144
+ description = description + " ...";
145
+ }
146
+ return description;
147
+ }
148
+
149
+ /**
150
+ * The aioseopStripMarkup() function.
151
+ *
152
+ * Strips all editor markup from a string.
153
+ *
154
+ * @since 3.3.0
155
+ *
156
+ * @param string content
157
+ * @return string
158
+ */
159
+ function aioseopStripMarkup(content) {
160
+ // Remove all HTML tags.
161
+ content = content.replace(/(<[^ >][^>]*>)?/gm, '');
162
+ // Remove all line breaks.
163
+ content = content.replace(/\s\s+/g, ' ');
164
+ return aioseopDecodeHtmlEntities(content.trim());
165
+ }
166
+
167
+ /**
168
+ * The aioseopDecodeHtmlEntities() function.
169
+ *
170
+ * Decodes HTML entities to characters.
171
+ *
172
+ * @since 3.3.0
173
+ *
174
+ * @param string encodedString
175
+ * @return string
176
+ */
177
+ function aioseopDecodeHtmlEntities(encodedString) {
178
+ let textArea = document.createElement('textarea');
179
+ textArea.innerHTML = encodedString;
180
+ return textArea.value;
181
+ }
182
+
183
+ });
js/admin/aioseop-preview-snippet.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var docTitle="",snippetTitle="",snippetDescription="",aioseopTitle="",aioseopDescription="",aioseopPreviewTimeout=0,aioseopPreviewIsGutenberg=aioseop_preview_snippet.isGutenberg,aioseopPreviewAutogenerateDescriptions=aioseop_preview_snippet.autogenerateDescriptions,skipExcerpt=aioseop_preview_snippet.skipExcerpt;function aioseopUpdateMetabox(){var e=[aioseopTitle,aioseopDescription];if("false"===aioseopPreviewIsGutenberg){docTitle=$("#title");var i=$("#excerpt");e.push(docTitle,i),setTimeout(function(){tinymce.editors[0].on("KeyUp",function(){aioseopUpdatePreviewSnippet()})},1e3)}else window._wpLoadBlockEditor.then(function(){setTimeout(function(){wp.data.subscribe(function(){clearTimeout(aioseopPreviewTimeout),aioseopPreviewTimeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},200)})})});e.forEach(function(e){e.on("input",function(){aioseopUpdatePreviewSnippet()})}),aioseopPreviewTimeout=setTimeout(function(){aioseopUpdatePreviewSnippet()},1e3)}function aioseopUpdatePreviewSnippet(){var e="",i="",t="";t="false"===aioseopPreviewIsGutenberg?(e=aioseopStripMarkup($.trim($("#title").val())),i=aioseopShortenDescription($("#content_ifr").contents().find("body")[0].innerHTML),aioseopShortenDescription($.trim($("#excerpt").val()))):(e=aioseopStripMarkup($.trim($("#post-title-0").val())),i=aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("content")),aioseopShortenDescription(wp.data.select("core/editor").getEditedPostAttribute("excerpt")));var o=aioseopStripMarkup($.trim($('input[name="aiosp_title').val())),p=aioseopStripMarkup($.trim($('textarea[name="aiosp_description"]').val()));snippetTitle.text(e),aioseopTitle.attr("placeholder",e),""!==o&&snippetTitle.text(o),"on"===aioseopPreviewAutogenerateDescriptions?(snippetDescription.text(i),aioseopDescription.attr("placeholder",i),"on"!==skipExcerpt&""!==t&&(snippetDescription.text(t),aioseopDescription.attr("placeholder",t))):(snippetDescription.text(""),aioseopDescription.attr("placeholder","")),""!==p&&(snippetDescription.text(p),aioseopDescription.attr("placeholder",p))}function aioseopShortenDescription(e){if(160<(e=aioseopStripMarkup(e)).length){var i=e.length-160,t=new XRegExp("[^\\pZ\\pP]*.{"+i+"}$");e=XRegExp.replace(e,t,""),e+=" ..."}return e}function aioseopStripMarkup(e){return aioseopDecodeHtmlEntities((e=(e=e.replace(/(<[^ >][^>]*>)?/gm,"")).replace(/\s\s+/g," ")).trim())}function aioseopDecodeHtmlEntities(e){var i=document.createElement("textarea");return i.innerHTML=e,i.value}$(function(){"use strict";snippetTitle=$("#aiosp_snippet_title"),snippetDescription=$("#aioseop_snippet_description"),aioseopTitle=$('input[name="aiosp_title"]'),aioseopDescription=$('textarea[name="aiosp_description"]'),aioseopUpdateMetabox()});
js/aioseop-helper.js CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * Use for JavaScript compatability by using anonymous functions; which
3
  * are loaded into the footer.
4
  *
5
  * @summary AIOSEOP Footer JS
1
  /**
2
+ * Use for JavaScript compatibility by using anonymous functions; which
3
  * are loaded into the footer.
4
  *
5
  * @summary AIOSEOP Footer JS
modules/aioseop_importer_exporter.php CHANGED
@@ -358,7 +358,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
358
  function parse_ini_advanced( $string ) {
359
  return $this->recursive_parse(
360
  $this->parse_ini_helper(
361
- parse_ini_string( $string, true )
362
  )
363
  );
364
  }
358
  function parse_ini_advanced( $string ) {
359
  return $this->recursive_parse(
360
  $this->parse_ini_helper(
361
+ parse_ini_string( $string, true ) // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.parse_ini_stringFound
362
  )
363
  );
364
  }
modules/aioseop_opengraph.php CHANGED
@@ -109,14 +109,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
109
  add_action( 'wp', array( $this, 'type_setup' ) );
110
  }
111
 
112
- if ( ! is_admin() || defined( 'DOING_AJAX' ) || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
113
  $this->do_opengraph();
114
  }
115
  // Set variables after WordPress load.
116
  add_action( 'init', array( &$this, 'init' ), 999999 );
117
  // Avoid having duplicate meta tags.
118
  add_filter( 'jetpack_enable_open_graph', '__return_false' );
119
- add_filter( $this->prefix . 'meta', array( $this, 'handle_meta_tag' ), 10, 5 );
120
  // Force refresh of Facebook cache.
121
  add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
122
  add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
@@ -129,62 +128,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
129
  $this->init();
130
  }
131
 
132
- /**
133
- * Process meta tags for specific idiosyncrasies.
134
- *
135
- * @since 3.0
136
- *
137
- * @param string $value The value that is proposed to be shown in the tag.
138
- * @param string $network The social network.
139
- * @param string $meta_tag The meta tag without the network name prefixed.
140
- * @param string $network_meta_tag The meta tag with the network name prefixed. This is not always $network:$meta_tag.
141
- * @param array $extra_params Extra parameters that might be required to process the meta tag.
142
- *
143
- * @return string The final value that will be shown.
144
- */
145
- function handle_meta_tag( $value, $network, $meta_tag, $network_meta_tag, $extra_params ) {
146
- switch ( $meta_tag ) {
147
- case 'type':
148
- // @issue 1013 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013 ).
149
- if ( 'blog' === $value ) {
150
- $value = 'website';
151
- }
152
- break;
153
- }
154
-
155
- /**
156
- * Disables truncation of meta tags. Return true to shortcircuit and disable truncation.
157
- *
158
- * @since 3.0
159
- *
160
- * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808
161
- * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296
162
- * @link https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html
163
- *
164
- * @param bool The value that is proposed to be shown in the tag.
165
- * @param string $network The social network.
166
- * @param string $meta_tag The meta tag without the network name prefixed.
167
- * @param string $network_meta_tag The meta tag with the network name prefixed. This is not always $network:$meta_tag.
168
- * @param array $extra_params Extra parameters that might be required to process the meta tag.
169
- */
170
- if ( true === apply_filters( $this->prefix . 'disable_meta_tag_truncation', false, $network, $meta_tag, $network_meta_tag ) ) {
171
- return $value;
172
- }
173
-
174
- if ( isset( $extra_params['auto_generate_desc'] ) && $extra_params['auto_generate_desc'] ) {
175
- switch ( $network_meta_tag ) {
176
- case 'twitter:title':
177
- $value = trim( $this->substr( $value, 0, 70 ) );
178
- break;
179
- case 'og:description':
180
- case 'twitter:description':
181
- $value = trim( $this->substr( $value, 0, 200 ) );
182
- break;
183
- }
184
- }
185
- return $value;
186
- }
187
-
188
  /**
189
  * Sets the terms defaults after a new term is created.
190
  *
@@ -1105,7 +1048,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1105
 
1106
  if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
1107
  $first_page = false;
1108
- if ( $aiosp->get_page_number() < 2 ) {
1109
  $first_page = true;
1110
  }
1111
  } else {
@@ -1127,9 +1070,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1127
  }
1128
  }
1129
  if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
1130
- $thumbnail = $this->options['aiosp_opengraph_homeimage'];
1131
  } else {
1132
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1133
  }
1134
 
1135
  /* If Use AIOSEO Title and Desc Selected */
@@ -1383,9 +1326,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1383
  $sitename = strip_tags( esc_attr( $sitename ) );
1384
  $description = strip_tags( esc_attr( $description ) );
1385
 
1386
- if ( empty( $thumbnail ) && ! empty( $image ) ) {
1387
- $thumbnail = $image;
1388
- }
 
 
1389
 
1390
  // Add user supplied default image.
1391
  if ( empty( $thumbnail ) ) {
@@ -1394,8 +1339,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1394
  } else {
1395
  $img_type = $this->options['aiosp_opengraph_defimg'];
1396
  if ( ! empty( $post ) ) {
1397
- // Customize the type of image per post/post_type.
1398
- $img_type = apply_filters( $this->prefix . 'default_image_type', $img_type, $post, $type );
 
 
 
 
 
 
1399
  }
1400
  switch ( $img_type ) {
1401
  case 'featured':
@@ -1434,8 +1385,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1434
  if ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) {
1435
  $thumbnail = $this->options['aiosp_opengraph_dimg'];
1436
  if ( ! empty( $post ) ) {
1437
- // Customize the default image per post/post_type.
1438
- $thumbnail = apply_filters( $this->prefix . 'default_image', $thumbnail, $post, $type );
 
 
 
 
 
 
1439
  }
1440
  }
1441
 
@@ -1444,6 +1401,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1444
  $thumbnail = set_url_scheme( $thumbnail );
1445
  }
1446
 
 
 
 
1447
  $width = '';
1448
  $height = '';
1449
  if ( ! empty( $thumbnail ) ) {
@@ -1461,6 +1421,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1461
  }
1462
  }
1463
 
 
1464
  if ( ! empty( $video ) ) {
1465
  if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1466
  $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
@@ -1470,7 +1431,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1470
  }
1471
  }
1472
 
1473
- $card = 'summary';
 
 
 
 
 
 
1474
  if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1475
  $card = $this->options['aiosp_opengraph_defcard'];
1476
  }
@@ -1484,10 +1451,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1484
  $card = 'summary_large_image';
1485
  }
1486
 
1487
- $site = '';
1488
- $domain = '';
1489
- $creator = '';
1490
-
1491
  if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1492
  $site = $this->options['aiosp_opengraph_twitter_site'];
1493
  $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
@@ -1502,60 +1465,55 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1502
  $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1503
  }
1504
 
1505
- if ( ! empty( $thumbnail ) ) {
1506
- $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1507
- }
1508
-
1509
  if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1510
  // Set Twitter image from custom.
1511
  $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
 
 
1512
  }
1513
 
1514
- // Apply last filters.
1515
- $description = apply_filters( 'aioseop_description', $description );
1516
-
1517
  $meta = array(
1518
  'facebook' => array(
1519
- 'type' => 'og:type',
1520
- 'title' => 'og:title',
1521
- 'description' => 'og:description',
1522
- 'url' => 'og:url',
1523
- 'sitename' => 'og:site_name',
1524
- 'thumbnail' => 'og:image',
1525
- 'width' => 'og:image:width',
1526
- 'height' => 'og:image:height',
1527
- 'video' => 'og:video',
1528
- 'videowidth' => 'og:video:width',
1529
- 'videoheight' => 'og:video:height',
1530
- 'key' => 'fb:admins',
1531
- 'appid' => 'fb:app_id',
1532
- 'section' => 'article:section',
1533
- 'tag' => 'article:tag',
1534
- 'published_time' => 'article:published_time',
1535
- 'modified_time' => 'article:modified_time',
1536
- 'publisher' => 'article:publisher',
1537
- 'author' => 'article:author',
1538
  ),
1539
  'twitter' => array(
1540
- 'card' => 'twitter:card',
1541
- 'site' => 'twitter:site',
1542
- 'creator' => 'twitter:creator',
1543
- 'domain' => 'twitter:domain',
1544
- 'title' => 'twitter:title',
1545
- 'description' => 'twitter:description',
1546
- 'twitter_thumbnail' => 'twitter:image',
1547
  ),
1548
  );
1549
 
1550
  // Issue #1848 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1848 ).
1551
  // Issue #2867 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2867 ).
1552
  if ( is_ssl() ) {
1553
- $meta['facebook'] += array( 'thumbnail_1' => 'og:image:secure_url' );
1554
- $thumbnail_1 = $thumbnail;
1555
- $meta['facebook'] += array( 'video_1' => 'og:video:secure_url' );
1556
- $video_1 = $video;
1557
  }
1558
 
 
1559
  $tags = array(
1560
  'facebook' => array(
1561
  'name' => 'property',
@@ -1567,45 +1525,50 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1567
  ),
1568
  );
1569
 
1570
- foreach ( $meta as $t => $data ) {
1571
- foreach ( $data as $k => $v ) {
1572
- if ( empty( $$k ) ) {
1573
- $$k = '';
1574
- }
1575
- $filtered_value = $$k;
1576
 
 
 
 
 
 
1577
  /**
1578
  * Process meta tags for their idiosyncracies.
1579
  *
 
 
1580
  * @since 3.0
 
1581
  *
1582
- * @param string $filtered_value The value that is proposed to be shown in the tag.
1583
- * @param string $t The social network.
1584
- * @param string $k The meta tag without the network name prefixed.
1585
- * @param string $v The meta tag with the network name prefixed. This is not always $network:$meta_tag.
1586
- * @param array $extra_params Extra parameters that might be required to process the meta tag.
1587
  */
1588
- $filtered_value = apply_filters( $this->prefix . 'meta', $filtered_value, $t, $k, $v, $extra_params );
 
1589
  if ( ! empty( $filtered_value ) ) {
1590
  if ( ! is_array( $filtered_value ) ) {
1591
  $filtered_value = array( $filtered_value );
1592
  }
1593
 
1594
  /**
1595
- * This is to accomodate multiple fb:admins on separate lines.
1596
  *
1597
  * @TODO Eventually we'll want to put this in its own function so things like images work too.
1598
  */
1599
- if ( 'key' === $k ) {
1600
  $fbadmins = explode( ',', str_replace( ' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1601
  foreach ( $fbadmins as $fbadmin ) {
1602
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
1603
  }
1604
  } else {
1605
  // For everything else.
1606
  foreach ( $filtered_value as $f ) {
1607
  // #1363: use esc_attr( $f ) instead of htmlspecialchars_decode( $f, ENT_QUOTES )
1608
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . esc_attr( $f ) . '" />' . "\n";
1609
  }
1610
  }
1611
  }
@@ -1613,6 +1576,117 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1613
  }
1614
  }
1615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1616
  /**
1617
  * Do / adds opengraph properties to meta.
1618
  *
@@ -1627,7 +1701,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1627
  ) {
1628
  add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1629
  }
1630
- if ( ! defined( 'DOING_AJAX' ) ) {
1631
  add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1632
  // Add social meta to AMP plugin.
1633
  if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true ) {
@@ -1810,24 +1884,40 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1810
  * @param string $hook_suffix
1811
  */
1812
  public function admin_enqueue_scripts( $hook_suffix ) {
1813
- wp_enqueue_script(
1814
- 'aioseop-opengraph-script',
1815
- AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_opengraph.js',
1816
- array(),
1817
- AIOSEOP_VERSION
1818
- );
1819
-
1820
- wp_enqueue_script(
1821
- 'aioseop-post-edit-script',
1822
- AIOSEOP_PLUGIN_URL . 'js/count-chars.js',
1823
- array(),
1824
- AIOSEOP_VERSION
1825
- );
1826
-
1827
- $localize_post_edit = array(
1828
- 'aiosp_title_extra' => 0,
1829
- );
1830
- wp_localize_script( 'aioseop-post-edit-script', 'aioseop_count_chars', $localize_post_edit );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1831
 
1832
  // Dev note: If certain JS files need to be restricted to select screens, then follow concept
1833
  // used in `All_in_One_SEO_Pack::admin_enqueue_scripts()` (v2.9.1); which uses the `$hook_suffix`
109
  add_action( 'wp', array( $this, 'type_setup' ) );
110
  }
111
 
112
+ if ( ! is_admin() || wp_doing_ajax() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
113
  $this->do_opengraph();
114
  }
115
  // Set variables after WordPress load.
116
  add_action( 'init', array( &$this, 'init' ), 999999 );
117
  // Avoid having duplicate meta tags.
118
  add_filter( 'jetpack_enable_open_graph', '__return_false' );
 
119
  // Force refresh of Facebook cache.
120
  add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
121
  add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
128
  $this->init();
129
  }
130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  /**
132
  * Sets the terms defaults after a new term is created.
133
  *
1048
 
1049
  if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
1050
  $first_page = false;
1051
+ if ( 2 > aioseop_get_page_number() ) {
1052
  $first_page = true;
1053
  }
1054
  } else {
1070
  }
1071
  }
1072
  if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
1073
+ $image = $this->options['aiosp_opengraph_homeimage'];
1074
  } else {
1075
+ $image = $this->options['aiosp_opengraph_dimg'];
1076
  }
1077
 
1078
  /* If Use AIOSEO Title and Desc Selected */
1326
  $sitename = strip_tags( esc_attr( $sitename ) );
1327
  $description = strip_tags( esc_attr( $description ) );
1328
 
1329
+ // Apply last filters.
1330
+ $description = apply_filters( 'aioseop_description', $description );
1331
+
1332
+ /* *** HANDLE IMAGES *** */
1333
+ $thumbnail = $image;
1334
 
1335
  // Add user supplied default image.
1336
  if ( empty( $thumbnail ) ) {
1339
  } else {
1340
  $img_type = $this->options['aiosp_opengraph_defimg'];
1341
  if ( ! empty( $post ) ) {
1342
+ /**
1343
+ * Customize the type of image per post/post_type.
1344
+ *
1345
+ * @param string $img_type Type of image source.
1346
+ * @param WP_Post $post The global post.
1347
+ * @param string $type The OG Type.
1348
+ */
1349
+ $img_type = apply_filters( 'aiosp_opengraph_default_image_type', $img_type, $post, $type );
1350
  }
1351
  switch ( $img_type ) {
1352
  case 'featured':
1385
  if ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) {
1386
  $thumbnail = $this->options['aiosp_opengraph_dimg'];
1387
  if ( ! empty( $post ) ) {
1388
+ /**
1389
+ * Customize the default image per post/post_type.
1390
+ *
1391
+ * @param string $thumbnail The image URL.
1392
+ * @param WP_Post $post The global post.
1393
+ * @param string $type The OG Type.
1394
+ */
1395
+ $thumbnail = apply_filters( 'aiosp_opengraph_default_image', $thumbnail, $post, $type );
1396
  }
1397
  }
1398
 
1401
  $thumbnail = set_url_scheme( $thumbnail );
1402
  }
1403
 
1404
+ /* *** HANDLE IMAGE DIMENSIONS *** */
1405
+
1406
+ // TODO When Image ID is available, use meta data for image dimensions.
1407
  $width = '';
1408
  $height = '';
1409
  if ( ! empty( $thumbnail ) ) {
1421
  }
1422
  }
1423
 
1424
+ /* *** HANDLE VIDEO *** */
1425
  if ( ! empty( $video ) ) {
1426
  if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1427
  $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
1431
  }
1432
  }
1433
 
1434
+ /* *** HANDLE TWITTER CARD *** */
1435
+ $card = 'summary';
1436
+ $site = '';
1437
+ $domain = '';
1438
+ $creator = '';
1439
+ $twitter_thumbnail = '';
1440
+
1441
  if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1442
  $card = $this->options['aiosp_opengraph_defcard'];
1443
  }
1451
  $card = 'summary_large_image';
1452
  }
1453
 
 
 
 
 
1454
  if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1455
  $site = $this->options['aiosp_opengraph_twitter_site'];
1456
  $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
1465
  $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1466
  }
1467
 
 
 
 
 
1468
  if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1469
  // Set Twitter image from custom.
1470
  $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1471
+ } elseif ( ! empty( $thumbnail ) ) {
1472
+ $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1473
  }
1474
 
1475
+ /* *** COLLECT DATA *** */
 
 
1476
  $meta = array(
1477
  'facebook' => array(
1478
+ 'og:type' => $type,
1479
+ 'og:title' => $title,
1480
+ 'og:description' => $description,
1481
+ 'og:url' => $url,
1482
+ 'og:site_name' => $sitename,
1483
+ 'og:image' => $thumbnail,
1484
+ 'og:image:width' => $width,
1485
+ 'og:image:height' => $height,
1486
+ 'og:video' => isset( $video ) ? $video : '',
1487
+ 'og:video:width' => isset( $videowidth ) ? $videowidth : '',
1488
+ 'og:video:height' => isset( $videoheight ) ? $videoheight : '',
1489
+ 'fb:admins' => $key,
1490
+ 'fb:app_id' => $appid,
1491
+ 'article:section' => isset( $section ) ? $section : '',
1492
+ 'article:tag' => $tag,
1493
+ 'article:published_time' => isset( $published_time ) ? $published_time : '',
1494
+ 'article:modified_time' => isset( $modified_time ) ? $modified_time : '',
1495
+ 'article:publisher' => isset( $publisher ) ? $publisher : '',
1496
+ 'article:author' => isset( $author ) ? $author : '',
1497
  ),
1498
  'twitter' => array(
1499
+ 'twitter:card' => $card,
1500
+ 'twitter:site' => $site,
1501
+ 'twitter:creator' => $creator,
1502
+ 'twitter:domain' => $domain,
1503
+ 'twitter:title' => $title,
1504
+ 'twitter:description' => $description,
1505
+ 'twitter:image' => $twitter_thumbnail,
1506
  ),
1507
  );
1508
 
1509
  // Issue #1848 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1848 ).
1510
  // Issue #2867 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2867 ).
1511
  if ( is_ssl() ) {
1512
+ $meta['facebook'] += array( 'og:image:secure_url' => $thumbnail );
1513
+ $meta['facebook'] += array( 'og:video:secure_url' => $video );
 
 
1514
  }
1515
 
1516
+ /* *** RENDER DATA *** */
1517
  $tags = array(
1518
  'facebook' => array(
1519
  'name' => 'property',
1525
  ),
1526
  );
1527
 
1528
+ // TODO Remove when `$tmp_meta_slug` is removed from 'aiosp_opengraph_meta' filter.
1529
+ $meta_keys = $this->get_reference_meta_keys();
 
 
 
 
1530
 
1531
+ foreach ( $meta as $k1_social_network => $v1_data ) {
1532
+ foreach ( $v1_data as $k2_meta_tag => $v2_meta_value ) {
1533
+ $filtered_value = $this->handle_meta_tag( $v2_meta_value, $k1_social_network, $k2_meta_tag, $extra_params );
1534
+
1535
+ $tmp_meta_slug = $meta_keys[ $k1_social_network ][ $k2_meta_tag ];
1536
  /**
1537
  * Process meta tags for their idiosyncracies.
1538
  *
1539
+ * @todo Remove `$tmp_meta_slug` and remove `$meta_keys`.
1540
+ *
1541
  * @since 3.0
1542
+ * @since 3.3 Change variable names for readability.
1543
  *
1544
+ * @param string $filtered_value The value that is proposed to be shown in the tag.
1545
+ * @param string $k1_social_network The social network.
1546
+ * @param string $tmp_meta_slug The meta tag without the network name prefixed.
1547
+ * @param string $k2_meta_tag The meta tag with the network name prefixed. This is not always $network:$meta_tag.
1548
+ * @param array $extra_params Extra parameters that might be required to process the meta tag.
1549
  */
1550
+ $filtered_value = apply_filters( 'aiosp_opengraph_meta', $filtered_value, $k1_social_network, $tmp_meta_slug, $k2_meta_tag, $extra_params );
1551
+
1552
  if ( ! empty( $filtered_value ) ) {
1553
  if ( ! is_array( $filtered_value ) ) {
1554
  $filtered_value = array( $filtered_value );
1555
  }
1556
 
1557
  /**
1558
+ * This is to accommodate multiple fb:admins on separate lines.
1559
  *
1560
  * @TODO Eventually we'll want to put this in its own function so things like images work too.
1561
  */
1562
+ if ( 'fb:admins' === $k2_meta_tag ) {
1563
  $fbadmins = explode( ',', str_replace( ' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1564
  foreach ( $fbadmins as $fbadmin ) {
1565
+ echo '<meta ' . $tags[ $k1_social_network ]['name'] . '="' . $k2_meta_tag . '" ' . $tags[ $k1_social_network ]['value'] . '="' . $fbadmin . '" />' . "\n";
1566
  }
1567
  } else {
1568
  // For everything else.
1569
  foreach ( $filtered_value as $f ) {
1570
  // #1363: use esc_attr( $f ) instead of htmlspecialchars_decode( $f, ENT_QUOTES )
1571
+ echo '<meta ' . $tags[ $k1_social_network ]['name'] . '="' . $k2_meta_tag . '" ' . $tags[ $k1_social_network ]['value'] . '="' . esc_attr( $f ) . '" />' . "\n";
1572
  }
1573
  }
1574
  }
1576
  }
1577
  }
1578
 
1579
+ /**
1580
+ * Process meta tags for specific idiosyncrasies.
1581
+ *
1582
+ * @since 3.0
1583
+ *
1584
+ * @param string $value The value that is proposed to be shown in the tag.
1585
+ * @param string $network The social network.
1586
+ * @param string $meta_tag The meta tag without the network name prefixed.
1587
+ * @param array $extra_params Extra parameters that might be required to process the meta tag.
1588
+ * @return string The final value that will be shown.
1589
+ */
1590
+ function handle_meta_tag( $value, $network, $meta_tag, $extra_params ) {
1591
+ switch ( $meta_tag ) {
1592
+ case 'type':
1593
+ // @issue 1013 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1013 ).
1594
+ if ( 'blog' === $value ) {
1595
+ $value = 'website';
1596
+ }
1597
+ break;
1598
+ }
1599
+
1600
+ // TODO Remove when `$tmp_meta_slug` is removed from 'aiosp_opengraph_disable_meta_tag_truncation' filter.
1601
+ $meta_keys = $this->get_reference_meta_keys();
1602
+
1603
+ $tmp_meta_slug = $meta_keys[ $network ][ $meta_tag ];
1604
+
1605
+ /**
1606
+ * Disables truncation of meta tags. Return true to shortcircuit and disable truncation.
1607
+ *
1608
+ * @todo Remove `$tmp_meta_slug` and remove `$meta_keys`.
1609
+ *
1610
+ * @since 3.0
1611
+ *
1612
+ * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/808
1613
+ * @issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/2296
1614
+ * @link https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/markup.html
1615
+ *
1616
+ * @param bool The value that is proposed to be shown in the tag.
1617
+ * @param string $network The social network.
1618
+ * @param string $tmp_meta_slug The meta tag without the network name prefixed.
1619
+ * @param string $meta_tag The meta tag with the network name prefixed. This is not always $network:$meta_tag.
1620
+ */
1621
+ if ( true === apply_filters( $this->prefix . 'disable_meta_tag_truncation', false, $network, $tmp_meta_slug, $meta_tag ) ) {
1622
+ return $value;
1623
+ }
1624
+
1625
+ if ( isset( $extra_params['auto_generate_desc'] ) && $extra_params['auto_generate_desc'] ) {
1626
+ switch ( $meta_tag ) {
1627
+ case 'twitter:title':
1628
+ $value = trim( $this->substr( $value, 0, 70 ) );
1629
+ break;
1630
+ case 'og:description':
1631
+ case 'twitter:description':
1632
+ $value = trim( $this->substr( $value, 0, 200 ) );
1633
+ break;
1634
+ }
1635
+ }
1636
+
1637
+ return $value;
1638
+ }
1639
+
1640
+ /**
1641
+ * Get Reference Meta Keys Array.
1642
+ *
1643
+ * TODO Remove when `$tmp_meta_slug` is removed from 'aiosp_opengraph_disable_meta_tag_truncation' & 'aiosp_opengraph_meta' filter.
1644
+ *
1645
+ * @since 3.3
1646
+ *
1647
+ * @return array
1648
+ */
1649
+ private function get_reference_meta_keys() {
1650
+ $meta_keys = array(
1651
+ 'facebook' => array(
1652
+ 'og:type' => 'type',
1653
+ 'og:title' => 'title',
1654
+ 'og:description' => 'description',
1655
+ 'og:url' => 'url',
1656
+ 'og:site_name' => 'sitename',
1657
+ 'og:image' => 'thumbnail',
1658
+ 'og:image:width' => 'width',
1659
+ 'og:image:height' => 'height',
1660
+ 'og:video' => 'video',
1661
+ 'og:video:width' => 'videowidth',
1662
+ 'og:video:height' => 'videoheight',
1663
+ 'fb:admins' => 'key',
1664
+ 'fb:app_id' => 'appid',
1665
+ 'article:section' => 'section',
1666
+ 'article:tag' => 'tag',
1667
+ 'article:published_time' => 'published_time',
1668
+ 'article:modified_time' => 'modified_time',
1669
+ 'article:publisher' => 'publisher',
1670
+ 'article:author' => 'author',
1671
+ ),
1672
+ 'twitter' => array(
1673
+ 'twitter:card' => 'card',
1674
+ 'twitter:site' => 'site',
1675
+ 'twitter:creator' => 'creator',
1676
+ 'twitter:domain' => 'domain',
1677
+ 'twitter:title' => 'title',
1678
+ 'twitter:description' => 'description',
1679
+ 'twitter:image' => 'twitter_thumbnail',
1680
+ ),
1681
+ );
1682
+ if ( is_ssl() ) {
1683
+ $meta_keys['facebook'] += array( 'og:image:secure_url' => 'thumbnail_1' );
1684
+ $meta_keys['facebook'] += array( 'og:video:secure_url' => 'video_1' );
1685
+ }
1686
+
1687
+ return $meta_keys;
1688
+ }
1689
+
1690
  /**
1691
  * Do / adds opengraph properties to meta.
1692
  *
1701
  ) {
1702
  add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1703
  }
1704
+ if ( ! wp_doing_ajax() ) {
1705
  add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1706
  // Add social meta to AMP plugin.
1707
  if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true ) {
1884
  * @param string $hook_suffix
1885
  */
1886
  public function admin_enqueue_scripts( $hook_suffix ) {
1887
+ switch ( $hook_suffix ) {
1888
+ case 'term.php':
1889
+ // Legacy code for taxonomy terms until we refactor all title format related code.
1890
+ $count_chars_data['aiosp_title_extra'] = 0;
1891
+ wp_enqueue_script(
1892
+ 'aioseop-count-chars-old',
1893
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars-old.js',
1894
+ array(),
1895
+ AIOSEOP_VERSION,
1896
+ true
1897
+ );
1898
+ break;
1899
+ default:
1900
+ wp_enqueue_script(
1901
+ 'aioseop-opengraph-script',
1902
+ AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_opengraph.js',
1903
+ array(),
1904
+ AIOSEOP_VERSION
1905
+ );
1906
+
1907
+ wp_enqueue_script(
1908
+ 'aioseop-count-chars',
1909
+ AIOSEOP_PLUGIN_URL . 'js/admin/aioseop-count-chars.js',
1910
+ array(),
1911
+ AIOSEOP_VERSION
1912
+ );
1913
+
1914
+ $count_chars_data = array(
1915
+ 'pluginDirName' => AIOSEOP_PLUGIN_DIRNAME,
1916
+ 'currentPage' => $hook_suffix,
1917
+ );
1918
+ wp_localize_script( 'aioseop-count-chars', 'aioseopOGCharacterCounter', $count_chars_data );
1919
+ break;
1920
+ }
1921
 
1922
  // Dev note: If certain JS files need to be restricted to select screens, then follow concept
1923
  // used in `All_in_One_SEO_Pack::admin_enqueue_scripts()` (v2.9.1); which uses the `$hook_suffix`
modules/aioseop_sitemap.php CHANGED
@@ -4312,7 +4312,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4312
  // remove the query string.
4313
  $url = strtok( $url, '?' );
4314
  // make the url XML-safe.
4315
- $url = htmlspecialchars( $url );
4316
  // Make the url absolute, if its relative.
4317
  $url = aiosp_common::absolutize_url( $url );
4318
  return apply_filters( 'aioseop_clean_url', $url );
@@ -4620,7 +4620,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4620
  }
4621
 
4622
  $homepage_url = get_site_url() . '/';
4623
- $homepage_index = array_search( $homepage_url, array_column( $links, 'loc' ) );
4624
 
4625
  if ( ! $homepage_url ) {
4626
  return $links;
@@ -4652,7 +4652,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4652
  }
4653
 
4654
  $shop_page_url = get_permalink( wc_get_page_id( 'shop' ) );
4655
- $shop_page_index = array_search( $shop_page_url, array_column( $links, 'loc' ) );
4656
 
4657
  if ( ! $shop_page_index ) {
4658
  return $links;
4312
  // remove the query string.
4313
  $url = strtok( $url, '?' );
4314
  // make the url XML-safe.
4315
+ $url = htmlspecialchars( $url, ENT_COMPAT, 'UTF-8' );
4316
  // Make the url absolute, if its relative.
4317
  $url = aiosp_common::absolutize_url( $url );
4318
  return apply_filters( 'aioseop_clean_url', $url );
4620
  }
4621
 
4622
  $homepage_url = get_site_url() . '/';
4623
+ $homepage_index = array_search( $homepage_url, array_column( $links, 'loc' ) ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.array_columnFound
4624
 
4625
  if ( ! $homepage_url ) {
4626
  return $links;
4652
  }
4653
 
4654
  $shop_page_url = get_permalink( wc_get_page_id( 'shop' ) );
4655
+ $shop_page_index = array_search( $shop_page_url, array_column( $links, 'loc' ) ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctions.array_columnFound
4656
 
4657
  if ( ! $shop_page_index ) {
4658
  return $links;
public/google-analytics.php CHANGED
@@ -9,6 +9,11 @@
9
  if ( ! class_exists( 'aioseop_google_analytics' ) ) {
10
 
11
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
 
 
 
 
 
12
  /**
13
  * Google Analytics module.
14
  * TODO: Rather than extending the module base class, we should find a better way
@@ -42,6 +47,7 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
42
  *
43
  * @since 2.3.9.2
44
  * @since 2.3.14 Refactored to work with autotrack.js.
 
45
  *
46
  * @link https://github.com/googleanalytics/autotrack
47
  *
@@ -50,6 +56,11 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
50
  */
51
  public function google_analytics() {
52
  global $aioseop_options;
 
 
 
 
 
53
  // Exclude tracking for users?
54
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] )
55
  && ! empty( $aioseop_options['aiosp_ga_exclude_users'] )
@@ -66,28 +77,27 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
66
  }
67
  }
68
  }
69
- if ( ! empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
70
- ob_start();
71
- $analytics = $this->universal_analytics();
72
- echo $analytics;
73
- if ( apply_filters(
74
- 'aioseop_ga_enable_autotrack',
75
- ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && $aioseop_options['aiosp_ga_track_outbound_links'],
76
- $aioseop_options
77
- ) ) {
78
- $autotrack = apply_filters(
79
- 'aiosp_google_autotrack',
80
- AIOSEOP_PLUGIN_URL . 'public/js/vendor/autotrack.js'
81
- );
82
- ?><script async src="<?php echo $autotrack; ?>"></script>
83
- <?php
84
- // Requested indent #921.
85
- }
86
- $analytics = ob_get_clean();
87
  }
 
 
88
  echo apply_filters( 'aiosp_google_analytics', $analytics );
89
  do_action( 'after_aiosp_google_analytics' );
90
-
91
  }
92
 
93
  /**
@@ -163,7 +173,36 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
163
  }
164
  }
165
  $extra_options = apply_filters( 'aioseop_ga_extra_options', $extra_options, $aioseop_options );
166
- $js_options = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  foreach ( array( 'cookie_domain', 'allow_linker' ) as $opts ) {
168
  if ( ! empty( $$opts ) ) {
169
  $js_options[] = $$opts;
9
  if ( ! class_exists( 'aioseop_google_analytics' ) ) {
10
 
11
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
12
+
13
+ if ( AIOSEOPPRO ) {
14
+ require_once( AIOSEOP_PLUGIN_DIR . 'pro/aioseop_google_tag_manager.php' );
15
+ }
16
+
17
  /**
18
  * Google Analytics module.
19
  * TODO: Rather than extending the module base class, we should find a better way
47
  *
48
  * @since 2.3.9.2
49
  * @since 2.3.14 Refactored to work with autotrack.js.
50
+ * @since 3.3.0 Don't run if Google Analytics ID is blank.
51
  *
52
  * @link https://github.com/googleanalytics/autotrack
53
  *
56
  */
57
  public function google_analytics() {
58
  global $aioseop_options;
59
+
60
+ if ( empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
61
+ return;
62
+ }
63
+
64
  // Exclude tracking for users?
65
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] )
66
  && ! empty( $aioseop_options['aiosp_ga_exclude_users'] )
77
  }
78
  }
79
  }
80
+
81
+ ob_start();
82
+ $analytics = $this->universal_analytics();
83
+ echo $analytics;
84
+ if ( apply_filters(
85
+ 'aioseop_ga_enable_autotrack',
86
+ ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && $aioseop_options['aiosp_ga_track_outbound_links'],
87
+ $aioseop_options
88
+ ) ) {
89
+ $autotrack = apply_filters(
90
+ 'aiosp_google_autotrack',
91
+ AIOSEOP_PLUGIN_URL . 'public/js/vendor/autotrack.js'
92
+ );
93
+ ?><script async src="<?php echo $autotrack; ?>"></script>
94
+ <?php
95
+ // Requested indent #921.
 
 
96
  }
97
+ $analytics = ob_get_clean();
98
+
99
  echo apply_filters( 'aiosp_google_analytics', $analytics );
100
  do_action( 'after_aiosp_google_analytics' );
 
101
  }
102
 
103
  /**
173
  }
174
  }
175
  $extra_options = apply_filters( 'aioseop_ga_extra_options', $extra_options, $aioseop_options );
176
+
177
+ /**
178
+ * Internal filter. Don't output certain GA features if Google Tag Manager is active.
179
+ *
180
+ * @since 3.3.0
181
+ */
182
+ if ( apply_filters( 'aioseop_pro_gtm_enabled', __return_false() ) ) {
183
+ $options_to_remove = array(
184
+ "ga('require', 'ec');",
185
+ "ga('require', 'outboundLinkTracker');",
186
+ "ga('require', 'outboundFormTracker');",
187
+ "ga('require', 'eventTracker');",
188
+ "ga('require', 'urlChangeTracker');",
189
+ "ga('require', 'pageVisibilityTracker');",
190
+ "ga('require', 'mediaQueryTracker');",
191
+ "ga('require', 'impressionTracker');",
192
+ "ga('require', 'maxScrollTracker');",
193
+ "ga('require', 'socialWidgetTracker');",
194
+ "ga('require', 'cleanUrlTracker');",
195
+ );
196
+ foreach ( $options_to_remove as $option ) {
197
+ $index = array_search( $option, $extra_options, true );
198
+ if ( $index ) {
199
+ unset( $extra_options[ $index ] );
200
+ }
201
+ continue;
202
+ }
203
+ }
204
+
205
+ $js_options = array();
206
  foreach ( array( 'cookie_domain', 'allow_linker' ) as $opts ) {
207
  if ( ! empty( $$opts ) ) {
208
  $js_options[] = $$opts;
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === All in One SEO Pack ===
2
  Contributors: hallsofmontezuma, semperplugins, wpsmort, arnaudbroes
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
- Requires at least: 4.7
5
- Tested up to: 5.2
6
- Stable tag: 3.2.10
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
@@ -23,6 +23,7 @@ First created in 2007, see why AIOSEO is one of the all time most downloaded plu
23
 
24
  * XML Sitemap support - submit your sitemap to Google and Bing and improve your SEO
25
  * Image XML Sitemap submitted to Google and Bing to improve your Image SEO
 
26
  * Google AMP support (Accelerated Mobile Pages)
27
  * Google Analytics support
28
  * Schema.org Markup
1
  === All in One SEO Pack ===
2
  Contributors: hallsofmontezuma, semperplugins, wpsmort, arnaudbroes
3
  Tags: SEO, Google Search Console, XML Sitemap, meta description, meta title, noindex
4
+ Requires at least: 4.9
5
+ Tested up to: 5.3
6
+ Stable tag: 3.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
23
 
24
  * XML Sitemap support - submit your sitemap to Google and Bing and improve your SEO
25
  * Image XML Sitemap submitted to Google and Bing to improve your Image SEO
26
+ * RSS Sitemap
27
  * Google AMP support (Accelerated Mobile Pages)
28
  * Google Analytics support
29
  * Schema.org Markup