All in One SEO Pack - Version 3.2.9

Version Description

Download this release

Release Info

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

Code changes from version 3.2.3 to 3.2.9

Files changed (42) hide show
  1. admin/aioseop_module_class.php +135 -106
  2. admin/aioseop_module_manager.php +2 -2
  3. admin/class-aioseop-helper.php +3 -3
  4. admin/class-aioseop-notices.php +2 -2
  5. admin/display/credits-content.php +21 -5
  6. admin/display/dashboard_widget.php +2 -1
  7. admin/display/general-metaboxes.php +1 -0
  8. admin/display/menu.php +1 -1
  9. admin/display/notices/blog-visibility-notice.php +0 -1
  10. admin/display/notices/review-plugin-notice.php +1 -0
  11. admin/display/welcome-content.php +1 -0
  12. admin/display/welcome.php +3 -1
  13. admin/meta_import.php +8 -7
  14. aioseop-init.php +2 -0
  15. aioseop_class.php +326 -260
  16. all_in_one_seo_pack.php +8 -7
  17. css/aiosp_admin.min.css +1 -1
  18. {inc/extlib → css/font-icons}/index.php +0 -1
  19. css/modules/aioseop_module-rtl.css +21 -1
  20. css/modules/aioseop_module-rtl.min.css +1 -1
  21. css/modules/aioseop_module.css +65 -1
  22. css/modules/aioseop_module.min.css +1 -1
  23. inc/aioseop_functions.php +64 -32
  24. inc/aioseop_updates_class.php +21 -14
  25. inc/aiosp_common.php +6 -6
  26. inc/compatability/compat-gutenberg.php +68 -0
  27. inc/compatability/compat-init.php +9 -2
  28. inc/compatability/compat-wpml.php +2 -2
  29. inc/extlib/OAuth.php +0 -939
  30. inc/schema/graphs/graph-organization.php +8 -4
  31. inc/schema/graphs/graph.php +16 -2
  32. inc/schema/schema-builder.php +8 -1
  33. inc/translations.php +6 -5
  34. modules/aioseop_feature_manager.php +7 -3
  35. modules/aioseop_file_editor.php +1 -1
  36. modules/aioseop_importer_exporter.php +26 -27
  37. modules/aioseop_opengraph.php +69 -52
  38. modules/aioseop_performance.php +66 -26
  39. modules/aioseop_sitemap.php +40 -36
  40. public/front.php +14 -2
  41. public/google-analytics.php +6 -2
  42. readme.txt +1 -1
admin/aioseop_module_class.php CHANGED
@@ -316,7 +316,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
316
  * @return bool
317
  */
318
  function update_class_option( $option_data, $option_name = false ) {
319
- if ( $option_name == false ) {
320
  $option_name = $this->get_option_name();
321
  }
322
  if ( $this->store_option || $option_name == $this->parent_option ) {
@@ -393,11 +393,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
393
 
394
  function convert_case( $str, $mode = 'upper' ) {
395
  static $charset = null;
396
- if ( $charset == null ) {
397
  $charset = get_bloginfo( 'charset' );
398
  }
399
  $str = (string) $str;
400
- if ( $mode == 'title' ) {
401
  if ( function_exists( 'mb_convert_case' ) ) {
402
  return mb_convert_case( $str, MB_CASE_TITLE, $charset );
403
  } else {
@@ -405,22 +405,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
405
  }
406
  }
407
 
408
- if ( $charset == 'UTF-8' ) {
409
  // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
410
  global $UTF8_TABLES;
411
  include_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_UTF8.php' );
412
  if ( is_array( $UTF8_TABLES ) ) {
413
- if ( $mode == 'upper' ) {
414
  return strtr( $str, $UTF8_TABLES['strtoupper'] );
415
  }
416
- if ( $mode == 'lower' ) {
417
  return strtr( $str, $UTF8_TABLES['strtolower'] );
418
  }
419
  }
420
  // phpcs:enable
421
  }
422
 
423
- if ( $mode == 'upper' ) {
424
  if ( function_exists( 'mb_strtoupper' ) ) {
425
  return mb_strtoupper( $str, $charset );
426
  } else {
@@ -428,7 +428,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
428
  }
429
  }
430
 
431
- if ( $mode == 'lower' ) {
432
  if ( function_exists( 'mb_strtolower' ) ) {
433
  return mb_strtolower( $str, $charset );
434
  } else {
@@ -591,7 +591,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
591
  if ( is_array( $output ) ) {
592
  $output[ $t ][] = $v;
593
  }
594
- } elseif ( $v || $v === '0' ) {
595
  $output = (string) $v;
596
  }
597
  }
@@ -608,7 +608,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
608
  $output['@attributes'] = $a;
609
  }
610
  foreach ( $output as $t => $v ) {
611
- if ( is_array( $v ) && count( $v ) == 1 && $t != '@attributes' ) {
612
  $output[ $t ] = $v[0];
613
  }
614
  }
@@ -729,7 +729,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
729
  if ( $cont ) {
730
  $regex .= '|';
731
  }
732
- $cont = 1;
733
  $regex .= preg_quote( trim( $l ), $quote );
734
  }
735
  }
@@ -1035,7 +1035,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1035
  * @param $location
1036
  */
1037
  function display_tabs( $location ) {
1038
- if ( ( $location != null ) && isset( $locations[ $location ]['tabs'] ) ) {
1039
  // TODO Fix undefined variable.
1040
  $tabs = $locations['location']['tabs'];
1041
  } else {
@@ -1174,7 +1174,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1174
  foreach ( $post_custom_fields as $field_name => $field ) {
1175
  if ( ( $this->strpos( $field_name, $prefix ) === 0 ) && $field[0] ) {
1176
  $has_data = true;
1177
- $data .= $field_name . " = '" . $field[0] . "'\n";
1178
  }
1179
  }
1180
  }
@@ -1182,8 +1182,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1182
  $has_data = true;
1183
  }
1184
 
1185
- if ( $has_data != null ) {
1186
- $post_info = "\n[post_data]\n\n";
1187
  $post_info .= "post_title = '" . $title . "'\n";
1188
  $post_info .= "post_guid = '" . $guid . "'\n";
1189
  $post_info .= "post_date = '" . $date . "'\n";
@@ -1218,16 +1218,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1218
  }
1219
  if ( ! empty( $exporter_choices ) && is_array( $exporter_choices ) ) {
1220
  foreach ( $exporter_choices as $ex ) {
1221
- if ( $ex == 1 ) {
1222
  $general_settings = true;
1223
  }
1224
- if ( $ex == 2 && isset( $_REQUEST['aiosp_importer_exporter_export_post_types'] ) ) {
1225
  $post_types = $_REQUEST['aiosp_importer_exporter_export_post_types'];
1226
  }
1227
  }
1228
  }
1229
 
1230
- if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
1231
  $buf .= $this->post_data_export(
1232
  '_aioseop',
1233
  array(
@@ -1241,10 +1241,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1241
  /* Add all active settings to settings file */
1242
  $name = $this->get_option_name();
1243
  $options = $this->get_class_option();
1244
- if ( ! empty( $options ) && $general_settings != null ) {
1245
  $buf .= "\n[$name]\n\n";
1246
  foreach ( $options as $key => $value ) {
1247
- if ( ( $name == $this->parent_option ) && ( $key == 'modules' ) ) {
1248
  continue;
1249
  } // don't re-export all module settings -- pdb
1250
  if ( is_array( $value ) ) {
@@ -1464,17 +1464,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1464
  return false;
1465
  }
1466
  if ( ( $offset > 0 ) || ( $maxlen >= 0 ) ) {
1467
- if ( $maxlen === 0 ) {
1468
  return '';
1469
  }
1470
- if ( $offset < 0 ) {
1471
  $offset = 0;
1472
  }
1473
  $file = $wpfs->get_contents( $filename );
1474
  if ( ! is_string( $file ) || empty( $file ) ) {
1475
  return $file;
1476
  }
1477
- if ( $maxlen < 0 ) {
1478
  return $this->substr( $file, $offset );
1479
  } else {
1480
  return $this->substr( $file, $offset, $maxlen );
@@ -1498,10 +1498,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1498
  */
1499
  function save_file( $filename, $contents ) {
1500
  /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1501
- $failed_str = sprintf( __( 'Failed to write file %s!', 'all-in-one-seo-pack' ) . "\n", $filename );
1502
  /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1503
  $readonly_str = sprintf( __( 'File %s isn\'t writable!', 'all-in-one-seo-pack' ) . "\n", $filename );
1504
- $wpfs = $this->get_filesystem_object();
 
1505
  if ( is_object( $wpfs ) ) {
1506
  $file_exists = $wpfs->exists( $filename );
1507
  if ( ! $file_exists || $wpfs->is_writable( $filename ) ) {
@@ -1592,7 +1593,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1592
  $opt = $prefix . $opt;
1593
  $file = ABSPATH . $file;
1594
  $contents = $this->load_file( $file );
1595
- if ( $contents !== false ) {
1596
  $options[ $opt ] = $contents;
1597
  }
1598
  }
@@ -1646,7 +1647,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1646
 
1647
  global $aioseop_options, $wp_query, $aioseop_opengraph;
1648
 
1649
- if ( $p === null ) {
1650
  global $post;
1651
  } else {
1652
  $post = $p;
@@ -1659,7 +1660,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1659
  $post = get_post( $post );
1660
  }
1661
  if ( is_object( $post ) && function_exists( 'get_post_thumbnail_id' ) ) {
1662
- if ( $post->post_type == 'attachment' ) {
1663
  $post_thumbnail_id = $post->ID;
1664
  } else {
1665
  $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
@@ -1686,7 +1687,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1686
  }
1687
 
1688
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1689
- $image = $this->get_the_image_by_meta_key(
1690
  array(
1691
  'post_id' => $post->ID,
1692
  'meta_key' => explode( ',', $meta_key ),
@@ -1701,7 +1702,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1701
  }
1702
  }
1703
 
1704
- if ( ! $post->post_modified_gmt != '' ) {
1705
  $wp_query = new WP_Query(
1706
  array(
1707
  'p' => $post_id,
@@ -1709,14 +1710,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1709
  )
1710
  );
1711
  }
1712
- if ( $post->post_type == 'page' ) {
1713
  $wp_query->is_page = true;
1714
- } elseif ( $post->post_type == 'attachment' ) {
1715
  $wp_query->is_attachment = true;
1716
  } else {
1717
  $wp_query->is_single = true;
1718
  }
1719
- if ( get_option( 'show_on_front' ) == 'page' && $post->ID == get_option( 'page_for_posts' ) ) {
1720
  $wp_query->is_home = true;
1721
  }
1722
  $args['options']['type'] = 'html';
@@ -1780,7 +1781,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1780
  $legacy = array();
1781
  foreach ( $img as $k => $v ) {
1782
  $v['link'] = set_url_scheme( $v['link'] );
1783
- if ( $v['type'] == 'featured' ) {
1784
  $legacy[ $v['link'] ] = 1;
1785
  } else {
1786
  $legacy[ $v['link'] ] = $v['id'];
@@ -1800,7 +1801,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1800
  */
1801
  function get_the_image( $options = null, $p = null ) {
1802
 
1803
- if ( $p === null ) {
1804
  global $post;
1805
  } else {
1806
  $post = $p;
@@ -1887,7 +1888,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1887
  */
1888
  function get_the_image_by_post_thumbnail( $p = null ) {
1889
 
1890
- if ( $p === null ) {
1891
  global $post;
1892
  } else {
1893
  $post = $p;
@@ -1923,7 +1924,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1923
  */
1924
  function get_the_image_by_attachment( $p = null ) {
1925
 
1926
- if ( $p === null ) {
1927
  global $post;
1928
  } else {
1929
  $post = $p;
@@ -1955,7 +1956,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1955
 
1956
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1957
  foreach ( $attachments as $id => $attachment ) {
1958
- if ( ++ $i == 1 ) {
1959
  $size = apply_filters( 'aioseop_attachment_size', 'large' );
1960
  $image = wp_get_attachment_image_src( $id, $size );
1961
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
@@ -1978,7 +1979,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1978
  * @return bool
1979
  */
1980
  function get_the_image_by_scan( $p = null ) {
1981
- if ( $p === null ) {
1982
  global $post;
1983
  } else {
1984
  $post = $p;
@@ -2013,8 +2014,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2013
  if ( empty( $screen ) ) {
2014
  $bail = true;
2015
  }
2016
- if ( $bail != true ) {
2017
- if ( ( $screen->base != 'post' ) && ( $screen->base != 'term' ) && ( $screen->base != 'edit-tags' ) && ( $screen->base != 'toplevel_page_shopp-products' ) ) {
2018
  $bail = true;
2019
  }
2020
  }
@@ -2024,21 +2025,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2024
  return;
2025
  }
2026
  $this->form = 'post';
2027
- if ( $screen->base == 'term' || $screen->base == 'edit-tags' ) {
2028
  $this->form = 'edittag';
2029
  }
2030
- if ( $screen->base == 'toplevel_page_shopp-products' ) {
2031
  $this->form = 'product';
2032
  }
2033
  $this->form = apply_filters( $prefix . 'set_form_on_enqueue', $this->form, $screen );
2034
  foreach ( $this->locations as $k => $v ) {
2035
- if ( $v['type'] === 'metabox' && isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2036
  $enqueue_scripts = false;
2037
- $enqueue_scripts = ( ( ( $screen->base == 'toplevel_page_shopp-products' ) && in_array( 'shopp_product', $v['display'] ) ) )
2038
- || in_array( $screen->post_type, $v['display'] )
2039
- || $screen->base == 'edit-category'
2040
- || $screen->base == 'edit-post_tag'
2041
- || $screen->base == 'term';
 
 
 
 
2042
  $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
2043
  if ( $enqueue_scripts ) {
2044
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
@@ -2251,7 +2256,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2251
  $url = esc_url( admin_url( 'admin.php?page=' . $hookname ) );
2252
  }
2253
 
2254
- if ( $this->locations === null ) {
2255
  array_unshift(
2256
  $links,
2257
  array(
@@ -2264,8 +2269,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2264
  );
2265
  } else {
2266
  foreach ( $this->locations as $k => $v ) {
2267
- if ( $v['type'] === 'settings' ) {
2268
- if ( $k === 'default' ) {
2269
  array_unshift(
2270
  $links,
2271
  array(
@@ -2336,7 +2341,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2336
  } else {
2337
  $name = $this->name;
2338
  }
2339
- if ( $this->locations === null ) {
2340
  $hookname = add_submenu_page(
2341
  $parent_slug,
2342
  $name,
@@ -2353,8 +2358,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2353
  return true;
2354
  }
2355
  foreach ( $this->locations as $k => $v ) {
2356
- if ( $v['type'] === 'settings' ) {
2357
- if ( $k === 'default' ) {
2358
  if ( ! empty( $this->menu_name ) ) {
2359
  $name = $this->menu_name;
2360
  } else {
@@ -2390,7 +2395,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2390
  );
2391
  }
2392
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2393
- } elseif ( $v['type'] === 'metabox' ) {
2394
  // hack -- make sure this runs anyhow, for now -- pdb.
2395
  $this->setting_options( $k );
2396
  $this->toggle_save_post_hooks( true );
@@ -2410,7 +2415,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2410
  }
2411
  if ( false !== strpos( $posttype, 'edit-' ) ) {
2412
  // Metabox priority/context on edit taxonomy screen.
2413
- $v['context'] = 'advanced';
2414
  $v['priority'] = 'default';
2415
  }
2416
 
@@ -2491,9 +2496,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2491
  */
2492
  function save_post_data( $post_id ) {
2493
  $this->toggle_save_post_hooks( false );
2494
- if ( $this->locations !== null ) {
2495
  foreach ( $this->locations as $k => $v ) {
2496
- if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
2497
  $opts = $this->default_options( $k );
2498
  $options = array();
2499
  foreach ( $opts as $l => $o ) {
@@ -2521,9 +2526,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2521
  */
2522
  function do_multi_input( $args ) {
2523
  $options = $args['options'];
2524
- $value = $args['value'];
2525
- $name = $args['name'];
2526
- $attr = $args['attr'];
2527
 
2528
  $buf1 = '';
2529
  $type = $options['type'];
@@ -2536,7 +2541,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2536
  'selected' => 'selected ',
2537
  );
2538
 
2539
- if ( ( $type === 'radio' ) || ( $type === 'checkbox' ) ) {
2540
  $strings = array(
2541
  'block' => "%s\n",
2542
  'group' => "\t<b>%s</b><br>\n%s\n",
@@ -2627,12 +2632,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2627
  static $n = 0;
2628
 
2629
  $options = $args['options'];
2630
- $value = $args['value'];
2631
- $name = $args['name'];
2632
- $attr = $args['attr'];
2633
- $prefix = isset( $args['prefix'] ) ? $args['prefix'] : '';
2634
 
2635
- if ( $options['type'] == 'custom' ) {
2636
  return apply_filters( "{$prefix}output_option", '', $args );
2637
  }
2638
  if ( in_array(
@@ -2657,9 +2662,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2657
  $onload = '';
2658
  if ( ! empty( $options['count'] ) ) {
2659
  $n ++;
2660
- $classes = isset( $options['class'] ) ? $options['class'] : '';
2661
  $classes .= ' aioseop_count_chars';
2662
- $attr .= " class='{$classes}' data-length-field='{$prefix}length$n'";
2663
  }
2664
  if ( isset( $opts['id'] ) ) {
2665
  $attr .= " id=\"{$opts['id']}\" ";
@@ -2669,16 +2674,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2669
  }
2670
  switch ( $options['type'] ) {
2671
  case 'multiselect':
2672
- $attr .= ' MULTIPLE';
2673
  $args['attr'] = $attr;
2674
- $args['name'] = $name = "{$name}[]";
 
2675
  // fall through.
2676
  case 'select':
2677
  $buf .= $this->do_multi_input( $args );
2678
  break;
2679
  case 'multicheckbox':
2680
- $args['name'] = $name = "{$name}[]";
2681
- $args['options']['type'] = $options['type'] = 'checkbox';
 
 
2682
  // fall through.
2683
  case 'radio':
2684
  $buf .= $this->do_multi_input( $args );
@@ -2692,7 +2700,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2692
  case 'textarea':
2693
  // #1363: prevent characters like ampersand in title and description (in social meta module) from getting changed to &amp;
2694
  if ( in_array( $name, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) {
2695
- $value = htmlspecialchars_decode( $value, ENT_QUOTES );
2696
  }
2697
  $buf .= "<textarea name='$name' $attr>$value</textarea>";
2698
  break;
@@ -2712,6 +2720,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2712
  'class' => true,
2713
  'placeholder' => true,
2714
  );
 
2715
  $buf .= wp_kses( $value, $allowed_tags );
2716
  break;
2717
  case 'esc_html':
@@ -2762,22 +2771,24 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2762
  * @return string
2763
  */
2764
  function get_option_row( $name, $opts, $args ) {
2765
- $label_text = $input_attr = $id_attr = '';
 
 
2766
 
2767
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/class-aioseop-helper.php' );
2768
  $info = new AIOSEOP_Helper( get_class( $this ) );
2769
 
2770
  $align = 'right';
2771
- if ( $opts['label'] == 'top' ) {
2772
  $align = 'left';
2773
  }
2774
  if ( isset( $opts['id'] ) ) {
2775
  $id_attr .= " id=\"{$opts['id']}_div\" ";
2776
  }
2777
- if ( $opts['label'] != 'none' ) {
2778
  $tmp_help_text = $info->get_help_text( $name );
2779
  if ( isset( $tmp_help_text ) && ! empty( $tmp_help_text ) ) {
2780
- $display_help = '<a class="aioseop_help_text_link" style="cursor: help;" title="%s"></a><label class="aioseop_label textinput">%s</label>';
2781
  $help_text = sprintf( $display_help, $info->get_help_text( $name ), $opts['name'] );
2782
  } else {
2783
  $help_text = $opts['name'];
@@ -2790,7 +2801,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2790
  } else {
2791
  $input_attr .= ' aioseop_no_label ';
2792
  }
2793
- if ( $opts['label'] == 'top' ) {
2794
  $label_text .= "</div><div class='aioseop_input aioseop_top_label'>";
2795
  }
2796
  $input_attr .= " aioseop_{$opts['type']}_type";
@@ -2807,9 +2818,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2807
  */
2808
  function display_options( $location = null, $meta_args = null ) {
2809
  static $location_settings = array();
 
2810
  $defaults = null;
2811
  $prefix = $this->get_prefix( $location );
2812
  $help_link = '';
 
2813
  if ( is_array( $meta_args['args'] ) && ! empty( $meta_args['args']['default_options'] ) ) {
2814
  $defaults = $meta_args['args']['default_options'];
2815
  }
@@ -2862,7 +2875,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2862
  foreach ( $args as $name => $opts ) {
2863
  // List of valid element attributes.
2864
  $attr_list = array( 'class', 'style', 'readonly', 'disabled', 'size', 'placeholder', 'autocomplete' );
2865
- if ( $opts['type'] == 'textarea' ) {
2866
  $attr_list = array_merge( $attr_list, array( 'rows', 'cols' ) );
2867
  }
2868
 
@@ -2878,10 +2891,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2878
  if ( isset( $current_options[ $name ] ) ) {
2879
  $opt = $current_options[ $name ];
2880
  }
2881
- if ( $opts['label'] == 'none' && $opts['type'] == 'submit' && $opts['save'] == false ) {
2882
  $opt = $opts['name'];
2883
  }
2884
- if ( $opts['type'] == 'html' && empty( $opt ) && $opts['save'] == false ) {
2885
  $opt = $opts['default'];
2886
  }
2887
 
@@ -2918,9 +2931,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2918
  function sanitize_domain( $domain ) {
2919
  $domain = trim( $domain );
2920
  $domain = $this->strtolower( $domain );
2921
- if ( $this->strpos( $domain, 'http://' ) === 0 ) {
2922
  $domain = $this->substr( $domain, 7 );
2923
- } elseif ( $this->strpos( $domain, 'https://' ) === 0 ) {
2924
  $domain = $this->substr( $domain, 8 );
2925
  }
2926
  $domain = untrailingslashit( $domain );
@@ -2993,7 +3006,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2993
  * @param bool $delete
2994
  */
2995
  function reset_options( $location = null, $delete = false ) {
2996
- if ( $delete === true ) {
2997
  $this->delete_class_option( $delete );
2998
  $this->options = array();
2999
  }
@@ -3016,8 +3029,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3016
  */
3017
  function handle_settings_updates( $location = null ) {
3018
  $message = '';
3019
- if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
3020
- ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) || ! empty( $_POST['Submit'] ) ) )
 
 
 
 
 
 
 
 
3021
  ) {
3022
  $nonce = $_POST['nonce-aioseop'];
3023
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
@@ -3060,7 +3081,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3060
  * @param null $location
3061
  */
3062
  function display_settings_page( $location = null ) {
3063
- if ( $location != null ) {
3064
  $location_info = $this->locations[ $location ];
3065
  }
3066
  $name = null;
@@ -3134,7 +3155,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3134
  );
3135
  $submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
3136
  foreach ( $submit_options as $k => $s ) {
3137
- if ( $s['type'] == 'submit' && $k != 'Submit' ) {
3138
  continue;
3139
  }
3140
  $class = '';
@@ -3155,7 +3176,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3155
  <div class="aioseop_options_wrapper aioseop_settings_left">
3156
  <?php
3157
  $opts = $this->get_class_option();
3158
- if ( $opts !== false ) {
3159
  $this->options = $opts;
3160
  }
3161
  if ( is_array( $this->layout ) ) {
@@ -3234,7 +3255,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3234
  * @return
3235
  */
3236
  function get_prefix( $location = null ) {
3237
- if ( ( $location != null ) && isset( $this->locations[ $location ]['prefix'] ) ) {
3238
  return $this->locations[ $location ]['prefix'];
3239
  }
3240
 
@@ -3249,12 +3270,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3249
  * @return array
3250
  */
3251
  function setting_options( $location = null, $defaults = null ) {
3252
- if ( $defaults === null ) {
3253
  $defaults = $this->default_options;
3254
  }
3255
  $prefix = $this->get_prefix( $location );
3256
  $opts = array();
3257
- if ( $location == null || $this->locations[ $location ]['options'] === null ) {
3258
  $options = $defaults;
3259
  } else {
3260
  $options = array();
@@ -3285,7 +3306,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3285
  if ( ! isset( $v['initial_options'] ) ) {
3286
  $v['initial_options'] = $v['default'];
3287
  }
3288
- if ( $v['type'] == 'custom' && ( ! isset( $v['nowrap'] ) ) ) {
3289
  $v['nowrap'] = true;
3290
  } elseif ( ! isset( $v['nowrap'] ) ) {
3291
  $v['nowrap'] = null;
@@ -3299,7 +3320,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3299
  }
3300
  $this->script_data['condshow'][ $prefix . $k ] = $v['condshow'];
3301
  }
3302
- if ( $v['type'] == 'submit' ) {
3303
  if ( ! isset( $v['save'] ) ) {
3304
  $v['save'] = false;
3305
  }
@@ -3314,7 +3335,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3314
  $v['label'] = null;
3315
  }
3316
  }
3317
- if ( $v['type'] == 'hidden' ) {
3318
  if ( ! isset( $v['label'] ) ) {
3319
  $v['label'] = 'none';
3320
  }
@@ -3322,10 +3343,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3322
  $v['prefix'] = false;
3323
  }
3324
  }
3325
- if ( ( $v['type'] == 'text' ) && ( ! isset( $v['size'] ) ) ) {
3326
  $v['size'] = 57;
3327
  }
3328
- if ( $v['type'] == 'textarea' ) {
3329
  if ( ! isset( $v['cols'] ) ) {
3330
  $v['cols'] = 57;
3331
  }
@@ -3392,14 +3413,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3392
  } else {
3393
  $type = $this->locations[ $location ]['type'];
3394
  }
3395
- if ( $type === 'settings' ) {
3396
  $get_opts = $this->get_class_option();
3397
- } elseif ( $type == 'metabox' ) {
3398
- if ( $post == null ) {
3399
  global $post;
3400
  }
3401
 
3402
- if ( ( isset( $_GET['taxonomy'] ) && isset( $_GET['tag_ID'] ) ) || is_category() || is_tag() || is_tax() ) {
 
 
 
 
 
 
 
 
3403
  $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
3404
  $term_id = $term_id ? $term_id : get_queried_object()->term_id;
3405
  if ( AIOSEOPPRO ) {
@@ -3434,15 +3463,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
3434
  * @param null $defaults
3435
  */
3436
  function update_options( $opts = array(), $location = null, $defaults = null ) {
3437
- if ( $location === null ) {
3438
  $type = 'settings';
3439
  } else {
3440
  $type = $this->locations[ $location ][ $type ];
3441
  }
3442
- if ( $type === 'settings' ) {
3443
  $get_opts = $this->get_class_option();
3444
  }
3445
- if ( $get_opts === false ) {
3446
  $get_opts = $this->default_options( $location, $defaults );
3447
  } else {
3448
  $this->setting_options( $location, $defaults );
316
  * @return bool
317
  */
318
  function update_class_option( $option_data, $option_name = false ) {
319
+ if ( false == $option_name ) {
320
  $option_name = $this->get_option_name();
321
  }
322
  if ( $this->store_option || $option_name == $this->parent_option ) {
393
 
394
  function convert_case( $str, $mode = 'upper' ) {
395
  static $charset = null;
396
+ if ( null == $charset ) {
397
  $charset = get_bloginfo( 'charset' );
398
  }
399
  $str = (string) $str;
400
+ if ( 'title' == $mode ) {
401
  if ( function_exists( 'mb_convert_case' ) ) {
402
  return mb_convert_case( $str, MB_CASE_TITLE, $charset );
403
  } else {
405
  }
406
  }
407
 
408
+ if ( 'UTF-8' == $charset ) {
409
  // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
410
  global $UTF8_TABLES;
411
  include_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_UTF8.php' );
412
  if ( is_array( $UTF8_TABLES ) ) {
413
+ if ( 'upper' == $mode ) {
414
  return strtr( $str, $UTF8_TABLES['strtoupper'] );
415
  }
416
+ if ( 'lower' == $mode ) {
417
  return strtr( $str, $UTF8_TABLES['strtolower'] );
418
  }
419
  }
420
  // phpcs:enable
421
  }
422
 
423
+ if ( 'upper' == $mode ) {
424
  if ( function_exists( 'mb_strtoupper' ) ) {
425
  return mb_strtoupper( $str, $charset );
426
  } else {
428
  }
429
  }
430
 
431
+ if ( 'lower' == $mode ) {
432
  if ( function_exists( 'mb_strtolower' ) ) {
433
  return mb_strtolower( $str, $charset );
434
  } else {
591
  if ( is_array( $output ) ) {
592
  $output[ $t ][] = $v;
593
  }
594
+ } elseif ( $v || '0' === $v ) {
595
  $output = (string) $v;
596
  }
597
  }
608
  $output['@attributes'] = $a;
609
  }
610
  foreach ( $output as $t => $v ) {
611
+ if ( is_array( $v ) && 1 == count( $v ) && '@attributes' != $t ) {
612
  $output[ $t ] = $v[0];
613
  }
614
  }
729
  if ( $cont ) {
730
  $regex .= '|';
731
  }
732
+ $cont = 1;
733
  $regex .= preg_quote( trim( $l ), $quote );
734
  }
735
  }
1035
  * @param $location
1036
  */
1037
  function display_tabs( $location ) {
1038
+ if ( ( null != $location ) && isset( $locations[ $location ]['tabs'] ) ) {
1039
  // TODO Fix undefined variable.
1040
  $tabs = $locations['location']['tabs'];
1041
  } else {
1174
  foreach ( $post_custom_fields as $field_name => $field ) {
1175
  if ( ( $this->strpos( $field_name, $prefix ) === 0 ) && $field[0] ) {
1176
  $has_data = true;
1177
+ $data .= $field_name . " = '" . $field[0] . "'\n";
1178
  }
1179
  }
1180
  }
1182
  $has_data = true;
1183
  }
1184
 
1185
+ if ( null != $has_data ) {
1186
+ $post_info = "\n[post_data]\n\n";
1187
  $post_info .= "post_title = '" . $title . "'\n";
1188
  $post_info .= "post_guid = '" . $guid . "'\n";
1189
  $post_info .= "post_date = '" . $date . "'\n";
1218
  }
1219
  if ( ! empty( $exporter_choices ) && is_array( $exporter_choices ) ) {
1220
  foreach ( $exporter_choices as $ex ) {
1221
+ if ( 1 == $ex ) {
1222
  $general_settings = true;
1223
  }
1224
+ if ( 2 == $ex && isset( $_REQUEST['aiosp_importer_exporter_export_post_types'] ) ) {
1225
  $post_types = $_REQUEST['aiosp_importer_exporter_export_post_types'];
1226
  }
1227
  }
1228
  }
1229
 
1230
+ if ( ( null != $post_types ) && ( $this === $aiosp ) ) {
1231
  $buf .= $this->post_data_export(
1232
  '_aioseop',
1233
  array(
1241
  /* Add all active settings to settings file */
1242
  $name = $this->get_option_name();
1243
  $options = $this->get_class_option();
1244
+ if ( ! empty( $options ) && null != $general_settings ) {
1245
  $buf .= "\n[$name]\n\n";
1246
  foreach ( $options as $key => $value ) {
1247
+ if ( ( $name == $this->parent_option ) && ( 'modules' == $key ) ) {
1248
  continue;
1249
  } // don't re-export all module settings -- pdb
1250
  if ( is_array( $value ) ) {
1464
  return false;
1465
  }
1466
  if ( ( $offset > 0 ) || ( $maxlen >= 0 ) ) {
1467
+ if ( 0 === $maxlen ) {
1468
  return '';
1469
  }
1470
+ if ( 0 > $offset ) {
1471
  $offset = 0;
1472
  }
1473
  $file = $wpfs->get_contents( $filename );
1474
  if ( ! is_string( $file ) || empty( $file ) ) {
1475
  return $file;
1476
  }
1477
+ if ( 0 > $maxlen ) {
1478
  return $this->substr( $file, $offset );
1479
  } else {
1480
  return $this->substr( $file, $offset, $maxlen );
1498
  */
1499
  function save_file( $filename, $contents ) {
1500
  /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1501
+ $failed_str = sprintf( __( 'Failed to write file %s!', 'all-in-one-seo-pack' ) . "\n", $filename );
1502
  /* translators: %s is a placeholder and will be replaced with the name of the relevant file. */
1503
  $readonly_str = sprintf( __( 'File %s isn\'t writable!', 'all-in-one-seo-pack' ) . "\n", $filename );
1504
+
1505
+ $wpfs = $this->get_filesystem_object();
1506
  if ( is_object( $wpfs ) ) {
1507
  $file_exists = $wpfs->exists( $filename );
1508
  if ( ! $file_exists || $wpfs->is_writable( $filename ) ) {
1593
  $opt = $prefix . $opt;
1594
  $file = ABSPATH . $file;
1595
  $contents = $this->load_file( $file );
1596
+ if ( false !== $contents ) {
1597
  $options[ $opt ] = $contents;
1598
  }
1599
  }
1647
 
1648
  global $aioseop_options, $wp_query, $aioseop_opengraph;
1649
 
1650
+ if ( null === $p ) {
1651
  global $post;
1652
  } else {
1653
  $post = $p;
1660
  $post = get_post( $post );
1661
  }
1662
  if ( is_object( $post ) && function_exists( 'get_post_thumbnail_id' ) ) {
1663
+ if ( 'attachment' == $post->post_type ) {
1664
  $post_thumbnail_id = $post->ID;
1665
  } else {
1666
  $post_thumbnail_id = get_post_thumbnail_id( $post->ID );
1687
  }
1688
 
1689
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1690
+ $image = $this->get_the_image_by_meta_key(
1691
  array(
1692
  'post_id' => $post->ID,
1693
  'meta_key' => explode( ',', $meta_key ),
1702
  }
1703
  }
1704
 
1705
+ if ( '' != ! $post->post_modified_gmt ) {
1706
  $wp_query = new WP_Query(
1707
  array(
1708
  'p' => $post_id,
1710
  )
1711
  );
1712
  }
1713
+ if ( 'page' == $post->post_type ) {
1714
  $wp_query->is_page = true;
1715
+ } elseif ( 'attachment' == $post->post_type ) {
1716
  $wp_query->is_attachment = true;
1717
  } else {
1718
  $wp_query->is_single = true;
1719
  }
1720
+ if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == $post->ID ) {
1721
  $wp_query->is_home = true;
1722
  }
1723
  $args['options']['type'] = 'html';
1781
  $legacy = array();
1782
  foreach ( $img as $k => $v ) {
1783
  $v['link'] = set_url_scheme( $v['link'] );
1784
+ if ( 'featured' == $v['type'] ) {
1785
  $legacy[ $v['link'] ] = 1;
1786
  } else {
1787
  $legacy[ $v['link'] ] = $v['id'];
1801
  */
1802
  function get_the_image( $options = null, $p = null ) {
1803
 
1804
+ if ( null === $p ) {
1805
  global $post;
1806
  } else {
1807
  $post = $p;
1888
  */
1889
  function get_the_image_by_post_thumbnail( $p = null ) {
1890
 
1891
+ if ( null === $p ) {
1892
  global $post;
1893
  } else {
1894
  $post = $p;
1924
  */
1925
  function get_the_image_by_attachment( $p = null ) {
1926
 
1927
+ if ( null === $p ) {
1928
  global $post;
1929
  } else {
1930
  $post = $p;
1956
 
1957
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1958
  foreach ( $attachments as $id => $attachment ) {
1959
+ if ( 1 == ++ $i ) {
1960
  $size = apply_filters( 'aioseop_attachment_size', 'large' );
1961
  $image = wp_get_attachment_image_src( $id, $size );
1962
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1979
  * @return bool
1980
  */
1981
  function get_the_image_by_scan( $p = null ) {
1982
+ if ( null === $p ) {
1983
  global $post;
1984
  } else {
1985
  $post = $p;
2014
  if ( empty( $screen ) ) {
2015
  $bail = true;
2016
  }
2017
+ if ( true != $bail ) {
2018
+ if ( ( 'post' != $screen->base ) && ( 'term' != $screen->base ) && ( 'edit-tags' != $screen->base ) && ( 'toplevel_page_shopp-products' != $screen->base ) ) {
2019
  $bail = true;
2020
  }
2021
  }
2025
  return;
2026
  }
2027
  $this->form = 'post';
2028
+ if ( 'term' == $screen->base || 'edit-tags' == $screen->base ) {
2029
  $this->form = 'edittag';
2030
  }
2031
+ if ( 'toplevel_page_shopp-products' == $screen->base ) {
2032
  $this->form = 'product';
2033
  }
2034
  $this->form = apply_filters( $prefix . 'set_form_on_enqueue', $this->form, $screen );
2035
  foreach ( $this->locations as $k => $v ) {
2036
+ if ( 'metabox' === $v['type'] && isset( $v['display'] ) && ! empty( $v['display'] ) ) {
2037
  $enqueue_scripts = false;
2038
+ $enqueue_scripts =
2039
+ (
2040
+ ( 'toplevel_page_shopp-products' == $screen->base ) &&
2041
+ in_array( 'shopp_product', $v['display'] )
2042
+ ) ||
2043
+ in_array( $screen->post_type, $v['display'] ) ||
2044
+ 'edit-category' == $screen->base ||
2045
+ 'edit-post_tag' == $screen->base ||
2046
+ 'term' == $screen->base;
2047
  $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
2048
  if ( $enqueue_scripts ) {
2049
  add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
2256
  $url = esc_url( admin_url( 'admin.php?page=' . $hookname ) );
2257
  }
2258
 
2259
+ if ( null === $this->locations ) {
2260
  array_unshift(
2261
  $links,
2262
  array(
2269
  );
2270
  } else {
2271
  foreach ( $this->locations as $k => $v ) {
2272
+ if ( 'settings' === $v['type'] ) {
2273
+ if ( 'default' === $k ) {
2274
  array_unshift(
2275
  $links,
2276
  array(
2341
  } else {
2342
  $name = $this->name;
2343
  }
2344
+ if ( null === $this->locations ) {
2345
  $hookname = add_submenu_page(
2346
  $parent_slug,
2347
  $name,
2358
  return true;
2359
  }
2360
  foreach ( $this->locations as $k => $v ) {
2361
+ if ( 'settings' === $v['type'] ) {
2362
+ if ( 'default' === $k ) {
2363
  if ( ! empty( $this->menu_name ) ) {
2364
  $name = $this->menu_name;
2365
  } else {
2395
  );
2396
  }
2397
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2398
+ } elseif ( 'metabox' === $v['type'] ) {
2399
  // hack -- make sure this runs anyhow, for now -- pdb.
2400
  $this->setting_options( $k );
2401
  $this->toggle_save_post_hooks( true );
2415
  }
2416
  if ( false !== strpos( $posttype, 'edit-' ) ) {
2417
  // Metabox priority/context on edit taxonomy screen.
2418
+ $v['context'] = 'advanced';
2419
  $v['priority'] = 'default';
2420
  }
2421
 
2496
  */
2497
  function save_post_data( $post_id ) {
2498
  $this->toggle_save_post_hooks( false );
2499
+ if ( null !== $this->locations ) {
2500
  foreach ( $this->locations as $k => $v ) {
2501
+ if ( isset( $v['type'] ) && ( 'metabox' === $v['type'] ) ) {
2502
  $opts = $this->default_options( $k );
2503
  $options = array();
2504
  foreach ( $opts as $l => $o ) {
2526
  */
2527
  function do_multi_input( $args ) {
2528
  $options = $args['options'];
2529
+ $value = $args['value'];
2530
+ $name = $args['name'];
2531
+ $attr = $args['attr'];
2532
 
2533
  $buf1 = '';
2534
  $type = $options['type'];
2541
  'selected' => 'selected ',
2542
  );
2543
 
2544
+ if ( ( 'radio' === $type ) || ( 'checkbox' === $type ) ) {
2545
  $strings = array(
2546
  'block' => "%s\n",
2547
  'group' => "\t<b>%s</b><br>\n%s\n",
2632
  static $n = 0;
2633
 
2634
  $options = $args['options'];
2635
+ $value = $args['value'];
2636
+ $name = $args['name'];
2637
+ $attr = $args['attr'];
2638
+ $prefix = isset( $args['prefix'] ) ? $args['prefix'] : '';
2639
 
2640
+ if ( 'custom' == $options['type'] ) {
2641
  return apply_filters( "{$prefix}output_option", '', $args );
2642
  }
2643
  if ( in_array(
2662
  $onload = '';
2663
  if ( ! empty( $options['count'] ) ) {
2664
  $n ++;
2665
+ $classes = isset( $options['class'] ) ? $options['class'] : '';
2666
  $classes .= ' aioseop_count_chars';
2667
+ $attr .= " class='{$classes}' data-length-field='{$prefix}length$n'";
2668
  }
2669
  if ( isset( $opts['id'] ) ) {
2670
  $attr .= " id=\"{$opts['id']}\" ";
2674
  }
2675
  switch ( $options['type'] ) {
2676
  case 'multiselect':
2677
+ $attr .= ' MULTIPLE';
2678
  $args['attr'] = $attr;
2679
+ $name = "{$name}[]";
2680
+ $args['name'] = $name;
2681
  // fall through.
2682
  case 'select':
2683
  $buf .= $this->do_multi_input( $args );
2684
  break;
2685
  case 'multicheckbox':
2686
+ $name = "{$name}[]";
2687
+ $args['name'] = $name;
2688
+ $args['options']['type'] = 'checkbox';
2689
+ $options['type'] = 'checkbox';
2690
  // fall through.
2691
  case 'radio':
2692
  $buf .= $this->do_multi_input( $args );
2700
  case 'textarea':
2701
  // #1363: prevent characters like ampersand in title and description (in social meta module) from getting changed to &amp;
2702
  if ( in_array( $name, array( 'aiosp_opengraph_hometitle', 'aiosp_opengraph_description' ), true ) ) {
2703
+ $value = htmlspecialchars_decode( $value, ENT_QUOTES );
2704
  }
2705
  $buf .= "<textarea name='$name' $attr>$value</textarea>";
2706
  break;
2720
  'class' => true,
2721
  'placeholder' => true,
2722
  );
2723
+
2724
  $buf .= wp_kses( $value, $allowed_tags );
2725
  break;
2726
  case 'esc_html':
2771
  * @return string
2772
  */
2773
  function get_option_row( $name, $opts, $args ) {
2774
+ $label_text = '';
2775
+ $input_attr = '';
2776
+ $id_attr = '';
2777
 
2778
  require_once( AIOSEOP_PLUGIN_DIR . 'admin/class-aioseop-helper.php' );
2779
  $info = new AIOSEOP_Helper( get_class( $this ) );
2780
 
2781
  $align = 'right';
2782
+ if ( 'top' == $opts['label'] ) {
2783
  $align = 'left';
2784
  }
2785
  if ( isset( $opts['id'] ) ) {
2786
  $id_attr .= " id=\"{$opts['id']}_div\" ";
2787
  }
2788
+ if ( 'none' != $opts['label'] ) {
2789
  $tmp_help_text = $info->get_help_text( $name );
2790
  if ( isset( $tmp_help_text ) && ! empty( $tmp_help_text ) ) {
2791
+ $display_help = '<a tabindex="0" class="aioseop_help_text_link" style="cursor: help;" title="<h4 aria-hidden>%2$s:</h4> %1$s"></a><label class="aioseop_label textinput">%2$s</label>';
2792
  $help_text = sprintf( $display_help, $info->get_help_text( $name ), $opts['name'] );
2793
  } else {
2794
  $help_text = $opts['name'];
2801
  } else {
2802
  $input_attr .= ' aioseop_no_label ';
2803
  }
2804
+ if ( 'top' == $opts['label'] ) {
2805
  $label_text .= "</div><div class='aioseop_input aioseop_top_label'>";
2806
  }
2807
  $input_attr .= " aioseop_{$opts['type']}_type";
2818
  */
2819
  function display_options( $location = null, $meta_args = null ) {
2820
  static $location_settings = array();
2821
+
2822
  $defaults = null;
2823
  $prefix = $this->get_prefix( $location );
2824
  $help_link = '';
2825
+
2826
  if ( is_array( $meta_args['args'] ) && ! empty( $meta_args['args']['default_options'] ) ) {
2827
  $defaults = $meta_args['args']['default_options'];
2828
  }
2875
  foreach ( $args as $name => $opts ) {
2876
  // List of valid element attributes.
2877
  $attr_list = array( 'class', 'style', 'readonly', 'disabled', 'size', 'placeholder', 'autocomplete' );
2878
+ if ( 'textarea' == $opts['type'] ) {
2879
  $attr_list = array_merge( $attr_list, array( 'rows', 'cols' ) );
2880
  }
2881
 
2891
  if ( isset( $current_options[ $name ] ) ) {
2892
  $opt = $current_options[ $name ];
2893
  }
2894
+ if ( 'none' == $opts['label'] && 'submit' == $opts['type'] && false == $opts['save'] ) {
2895
  $opt = $opts['name'];
2896
  }
2897
+ if ( 'html' == $opts['type'] && empty( $opt ) && false == $opts['save'] ) {
2898
  $opt = $opts['default'];
2899
  }
2900
 
2931
  function sanitize_domain( $domain ) {
2932
  $domain = trim( $domain );
2933
  $domain = $this->strtolower( $domain );
2934
+ if ( 0 === $this->strpos( $domain, 'http://' ) ) {
2935
  $domain = $this->substr( $domain, 7 );
2936
+ } elseif ( 0 === $this->strpos( $domain, 'https://' ) ) {
2937
  $domain = $this->substr( $domain, 8 );
2938
  }
2939
  $domain = untrailingslashit( $domain );
3006
  * @param bool $delete
3007
  */
3008
  function reset_options( $location = null, $delete = false ) {
3009
+ if ( true === $delete ) {
3010
  $this->delete_class_option( $delete );
3011
  $this->options = array();
3012
  }
3029
  */
3030
  function handle_settings_updates( $location = null ) {
3031
  $message = '';
3032
+ if (
3033
+ (
3034
+ isset( $_POST['action'] ) &&
3035
+ 'aiosp_update_module' == $_POST['action'] &&
3036
+ (
3037
+ isset( $_POST['Submit_Default'] ) ||
3038
+ isset( $_POST['Submit_All_Default'] ) ||
3039
+ ! empty( $_POST['Submit'] )
3040
+ )
3041
+ )
3042
  ) {
3043
  $nonce = $_POST['nonce-aioseop'];
3044
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
3081
  * @param null $location
3082
  */
3083
  function display_settings_page( $location = null ) {
3084
+ if ( null != $location ) {
3085
  $location_info = $this->locations[ $location ];
3086
  }
3087
  $name = null;
3155
  );
3156
  $submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
3157
  foreach ( $submit_options as $k => $s ) {
3158
+ if ( 'submit' == $s['type'] && 'Submit' != $k ) {
3159
  continue;
3160
  }
3161
  $class = '';
3176
  <div class="aioseop_options_wrapper aioseop_settings_left">
3177
  <?php
3178
  $opts = $this->get_class_option();
3179
+ if ( false !== $opts ) {
3180
  $this->options = $opts;
3181
  }
3182
  if ( is_array( $this->layout ) ) {
3255
  * @return
3256
  */
3257
  function get_prefix( $location = null ) {
3258
+ if ( ( null != $location ) && isset( $this->locations[ $location ]['prefix'] ) ) {
3259
  return $this->locations[ $location ]['prefix'];
3260
  }
3261
 
3270
  * @return array
3271
  */
3272
  function setting_options( $location = null, $defaults = null ) {
3273
+ if ( null === $defaults ) {
3274
  $defaults = $this->default_options;
3275
  }
3276
  $prefix = $this->get_prefix( $location );
3277
  $opts = array();
3278
+ if ( null == $location || null === $this->locations[ $location ]['options'] ) {
3279
  $options = $defaults;
3280
  } else {
3281
  $options = array();
3306
  if ( ! isset( $v['initial_options'] ) ) {
3307
  $v['initial_options'] = $v['default'];
3308
  }
3309
+ if ( 'custom' == $v['type'] && ( ! isset( $v['nowrap'] ) ) ) {
3310
  $v['nowrap'] = true;
3311
  } elseif ( ! isset( $v['nowrap'] ) ) {
3312
  $v['nowrap'] = null;
3320
  }
3321
  $this->script_data['condshow'][ $prefix . $k ] = $v['condshow'];
3322
  }
3323
+ if ( 'submit' == $v['type'] ) {
3324
  if ( ! isset( $v['save'] ) ) {
3325
  $v['save'] = false;
3326
  }
3335
  $v['label'] = null;
3336
  }
3337
  }
3338
+ if ( 'hidden' == $v['type'] ) {
3339
  if ( ! isset( $v['label'] ) ) {
3340
  $v['label'] = 'none';
3341
  }
3343
  $v['prefix'] = false;
3344
  }
3345
  }
3346
+ if ( ( 'text' == $v['type'] ) && ( ! isset( $v['size'] ) ) ) {
3347
  $v['size'] = 57;
3348
  }
3349
+ if ( 'textarea' == $v['type'] ) {
3350
  if ( ! isset( $v['cols'] ) ) {
3351
  $v['cols'] = 57;
3352
  }
3413
  } else {
3414
  $type = $this->locations[ $location ]['type'];
3415
  }
3416
+ if ( 'settings' === $type ) {
3417
  $get_opts = $this->get_class_option();
3418
+ } elseif ( 'metabox' == $type ) {
3419
+ if ( null == $post ) {
3420
  global $post;
3421
  }
3422
 
3423
+ if (
3424
+ (
3425
+ isset( $_GET['taxonomy'] ) &&
3426
+ isset( $_GET['tag_ID'] )
3427
+ ) ||
3428
+ is_category() ||
3429
+ is_tag() ||
3430
+ is_tax()
3431
+ ) {
3432
  $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
3433
  $term_id = $term_id ? $term_id : get_queried_object()->term_id;
3434
  if ( AIOSEOPPRO ) {
3463
  * @param null $defaults
3464
  */
3465
  function update_options( $opts = array(), $location = null, $defaults = null ) {
3466
+ if ( null === $location ) {
3467
  $type = 'settings';
3468
  } else {
3469
  $type = $this->locations[ $location ][ $type ];
3470
  }
3471
+ if ( 'settings' === $type ) {
3472
  $get_opts = $this->get_class_option();
3473
  }
3474
+ if ( false === $get_opts ) {
3475
  $get_opts = $this->default_options( $location, $defaults );
3476
  } else {
3477
  $this->setting_options( $location, $defaults );
admin/aioseop_module_manager.php CHANGED
@@ -203,7 +203,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
203
  */
204
  function load_module( $mod ) {
205
  static $feature_options = null;
206
- static $feature_prefix = null;
207
  if ( ! is_array( $this->modules ) ) {
208
  return false;
209
  }
@@ -229,7 +229,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
229
  // using $_REQUEST does not work because even if the parameter is set in $_POST or $_GET, it does not percolate to $_REQUEST.
230
  $is_module_page = ( isset( $_GET['page'] ) && trailingslashit( AIOSEOP_PLUGIN_DIRNAME ) . 'modules/aioseop_feature_manager.php' === $_GET['page'] ) || ( isset( $_POST['page'] ) && trailingslashit( AIOSEOP_PLUGIN_DIRNAME ) . 'modules/aioseop_feature_manager.php' === $_POST['page'] );
231
  }
232
- $fm_page = $this->module_settings_update && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) && $is_module_page;
233
  if ( $fm_page && ! $this->settings_reset ) {
234
  if ( isset( $_POST[ "aiosp_feature_manager_enable_$mod" ] ) ) {
235
  $mod_enable = $_POST[ "aiosp_feature_manager_enable_$mod" ];
203
  */
204
  function load_module( $mod ) {
205
  static $feature_options = null;
206
+ static $feature_prefix = null;
207
  if ( ! is_array( $this->modules ) ) {
208
  return false;
209
  }
229
  // using $_REQUEST does not work because even if the parameter is set in $_POST or $_GET, it does not percolate to $_REQUEST.
230
  $is_module_page = ( isset( $_GET['page'] ) && trailingslashit( AIOSEOP_PLUGIN_DIRNAME ) . 'modules/aioseop_feature_manager.php' === $_GET['page'] ) || ( isset( $_POST['page'] ) && trailingslashit( AIOSEOP_PLUGIN_DIRNAME ) . 'modules/aioseop_feature_manager.php' === $_POST['page'] );
231
  }
232
+ $fm_page = $this->module_settings_update && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) && $is_module_page;
233
  if ( $fm_page && ! $this->settings_reset ) {
234
  if ( isset( $_POST[ "aiosp_feature_manager_enable_$mod" ] ) ) {
235
  $mod_enable = $_POST[ "aiosp_feature_manager_enable_$mod" ];
admin/class-aioseop-helper.php CHANGED
@@ -401,7 +401,7 @@ class AIOSEOP_Helper {
401
  'aiosp_yandex_verify' => __( 'Enter your verification code here to verify your site with Yandex Webmaster Tools.', 'all-in-one-seo-pack' ),
402
  'aiosp_baidu_verify' => __( 'Enter your verification code here to verify your site with Baidu Webmaster Tools.', 'all-in-one-seo-pack' ),
403
 
404
- // Google Settings.
405
 
406
  'aiosp_google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
407
  'aiosp_ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
@@ -504,7 +504,7 @@ class AIOSEOP_Helper {
504
  '<dt>%post_year%</dt>' .
505
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ), $name ) . '</dd>' .
506
  '<dt>%post_month%</dt>' .
507
- '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ), $name ) . '</dd>' .
508
 
509
  $rtn_help_text[ 'aiosp_' . $v1_pt . '_title_format' ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' ) . '<dl>' . $help_text_macros . '</dl>' . '<br /><a href="https://semperplugins.com/documentation/custom-post-type-settings/#custom-titles" target="_blank">' . __( 'Click here for documentation on this setting', 'all-in-one-seo-pack' ) . '</a>';
510
  }
@@ -552,7 +552,7 @@ class AIOSEOP_Helper {
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 Settings.
556
  'aiosp_google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
557
  'aiosp_ga_advanced_options' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
558
  'aiosp_ga_domain' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#tracking-domain',
401
  'aiosp_yandex_verify' => __( 'Enter your verification code here to verify your site with Yandex Webmaster Tools.', 'all-in-one-seo-pack' ),
402
  'aiosp_baidu_verify' => __( 'Enter your verification code here to verify your site with Baidu Webmaster Tools.', 'all-in-one-seo-pack' ),
403
 
404
+ // Google Analytics.
405
 
406
  'aiosp_google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
407
  'aiosp_ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
504
  '<dt>%post_year%</dt>' .
505
  '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'year', 'all-in-one-seo-pack' ), $name ) . '</dd>' .
506
  '<dt>%post_month%</dt>' .
507
+ '<dd>' . sprintf( __( 'The %1$s when the %2$s was published (localized)', 'all-in-one-seo-pack' ), __( 'month', 'all-in-one-seo-pack' ), $name ) . '</dd>';
508
 
509
  $rtn_help_text[ 'aiosp_' . $v1_pt . '_title_format' ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' ) . '<dl>' . $help_text_macros . '</dl>' . '<br /><a href="https://semperplugins.com/documentation/custom-post-type-settings/#custom-titles" target="_blank">' . __( 'Click here for documentation on this setting', 'all-in-one-seo-pack' ) . '</a>';
510
  }
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/',
557
  'aiosp_ga_advanced_options' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
558
  'aiosp_ga_domain' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/#tracking-domain',
admin/class-aioseop-notices.php CHANGED
@@ -547,9 +547,9 @@ if ( ! class_exists( 'AIOSEOP_Notices' ) ) {
547
  update_user_meta( $current_user_id, 'aioseop_notice_display_time_' . $slug, $display_time );
548
  }
549
 
550
- $this->notices[ $slug ]['time_set'] = $time_set;
551
  $this->notices[ $slug ]['time_start'] = $display_time;
552
- $this->active_notices[ $slug ] = $display_time;
553
 
554
  return true;
555
  }
547
  update_user_meta( $current_user_id, 'aioseop_notice_display_time_' . $slug, $display_time );
548
  }
549
 
550
+ $this->notices[ $slug ]['time_set'] = $time_set;
551
  $this->notices[ $slug ]['time_start'] = $display_time;
552
+ $this->active_notices[ $slug ] = $display_time;
553
 
554
  return true;
555
  }
admin/display/credits-content.php CHANGED
@@ -9,12 +9,13 @@
9
  * @package All_in_One_SEO_Pack
10
  * @since ?
11
  */
 
12
  ?>
13
  <div class="wrap credits-wrap">
14
 
15
  <p class="about-description">
16
  <?php
17
- /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
18
  printf( __( '%s is created by a worldwide network of friendly folks like these.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
19
  ?>
20
  </p>
@@ -24,7 +25,12 @@
24
  <li class="wp-person" id="wp-person-michaeltorbert">
25
  <a class="web" href="https://twitter.com/michaeltorbert" target="_blank"><img alt="" class="gravatar" src="https://s.gravatar.com/avatar/f41419cf5cfdbb071a8d591ac9976bf3?s=60">
26
  Michael Torbert</a>
27
- <span class="title"><?php _e( 'Project Lead', 'all-in-one-seo-pack' ); ?></span>
 
 
 
 
 
28
  </li>
29
  <li class="wp-person" id="wp-person-stevemortiboy">
30
  <a class="web" target="_blank" href="https://twitter.com/wpsmort"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/40e33d813c16a63500675d851b0cbf3a?s=60">
@@ -59,11 +65,16 @@
59
 
60
  </ul>
61
 
62
- <h3 class="wp-people-group">&#x1f31f;<?php _e( 'Recent Rockstar Contributors', 'all-in-one-seo-pack' ); ?>&#x1f31f;</h3>
 
 
 
 
 
63
  <ul class="wp-people-group " id="wp-people-group-rockstars">
64
  <li>
65
  <?php
66
- /* translators: '%1$s' and '%2$s' are used as placeholders and turn the text in between into a clickable link */
67
  printf(
68
  __( 'Want to see your name and picture here as a community developer? %1$sClick here%2$s to open an issue on GitHub to report a bug, request a feature or find an issue and submit code!', 'all-in-one-seo-pack' ),
69
  '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">',
@@ -129,7 +140,12 @@
129
  </li>
130
  </ul>
131
 
132
- <h3 class="wp-people-group dashicons-before dashicons-translation"><?php printf( _e( 'Translation contributors and translation editors', 'all-in-one-seo-pack' ), '1.2' ); ?></h3>
 
 
 
 
 
133
  <p class="wp-credits-list">
134
  <a href="https://profiles.wordpress.org/pierrelannoy/" target="_blank">Pierre Lannoy</a>,
135
  <a href="https://profiles.wordpress.org/sonjanyc/" target="_blank">Sonja Leix</a>,
9
  * @package All_in_One_SEO_Pack
10
  * @since ?
11
  */
12
+
13
  ?>
14
  <div class="wrap credits-wrap">
15
 
16
  <p class="about-description">
17
  <?php
18
+ /* translators: %s is a placeholder so it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
19
  printf( __( '%s is created by a worldwide network of friendly folks like these.', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
20
  ?>
21
  </p>
25
  <li class="wp-person" id="wp-person-michaeltorbert">
26
  <a class="web" href="https://twitter.com/michaeltorbert" target="_blank"><img alt="" class="gravatar" src="https://s.gravatar.com/avatar/f41419cf5cfdbb071a8d591ac9976bf3?s=60">
27
  Michael Torbert</a>
28
+ <span class="title">
29
+ <?php
30
+ /* translators: This is our CEO and founder Michael Torbert who oversees everything that is related to All in One SEO Pack. Feel free to use a different term if this doesn't translate well. */
31
+ _e( 'Project Lead', 'all-in-one-seo-pack' );
32
+ ?>
33
+ </span>
34
  </li>
35
  <li class="wp-person" id="wp-person-stevemortiboy">
36
  <a class="web" target="_blank" href="https://twitter.com/wpsmort"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/40e33d813c16a63500675d851b0cbf3a?s=60">
65
 
66
  </ul>
67
 
68
+ <h3 class="wp-people-group">&#x1f31f;
69
+ <?php
70
+ /* translators: These are people who made an awesome contribution to All in One SEO Pack. Feel free to replace "Rockstar" with whatever works best in your language. */
71
+ _e( 'Recent Rockstar Contributors', 'all-in-one-seo-pack' );
72
+ ?>
73
+ &#x1f31f;</h3>
74
  <ul class="wp-people-group " id="wp-people-group-rockstars">
75
  <li>
76
  <?php
77
+ /* translators: %1$s and %2$s are used as placeholders and should not be transalted. These are used to transform the text in between them into a clickable link. */
78
  printf(
79
  __( 'Want to see your name and picture here as a community developer? %1$sClick here%2$s to open an issue on GitHub to report a bug, request a feature or find an issue and submit code!', 'all-in-one-seo-pack' ),
80
  '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">',
140
  </li>
141
  </ul>
142
 
143
+ <h3 class="wp-people-group dashicons-before dashicons-translation">
144
+ <?php
145
+ /* translators: In this context, "translation contributors" are translators who submit strings on translate.wordpress.org and "translation editors" are those who proofread and approve them (also known as PTEs - Project Translation Editors).*/
146
+ printf( _e( 'Translation contributors and translation editors', 'all-in-one-seo-pack' ), '1.2' );
147
+ ?>
148
+ </h3>
149
  <p class="wp-credits-list">
150
  <a href="https://profiles.wordpress.org/pierrelannoy/" target="_blank">Pierre Lannoy</a>,
151
  <a href="https://profiles.wordpress.org/sonjanyc/" target="_blank">Sonja Leix</a>,
admin/display/dashboard_widget.php CHANGED
@@ -85,7 +85,8 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
85
 
86
  include_once( ABSPATH . WPINC . '/feed.php' );
87
 
88
- if ( false === ( $rss_items = get_transient( 'aioseop_feed' ) ) ) {
 
89
 
90
  $rss = fetch_feed( 'https://www.semperplugins.com/feed/' );
91
  if ( is_wp_error( $rss ) ) {
85
 
86
  include_once( ABSPATH . WPINC . '/feed.php' );
87
 
88
+ $rss_items = get_transient( 'aioseop_feed' );
89
+ if ( false === $rss_items ) {
90
 
91
  $rss = fetch_feed( 'https://www.semperplugins.com/feed/' );
92
  if ( is_wp_error( $rss ) ) {
admin/display/general-metaboxes.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package All_in_One_SEO_Pack
6
  * @since 2.3.3
7
  */
 
8
  // @codingStandardsIgnoreStart
9
  class aiosp_metaboxes {
10
  // @codingStandardsIgnoreEnd
5
  * @package All_in_One_SEO_Pack
6
  * @since 2.3.3
7
  */
8
+
9
  // @codingStandardsIgnoreStart
10
  class aiosp_metaboxes {
11
  // @codingStandardsIgnoreEnd
admin/display/menu.php CHANGED
@@ -44,7 +44,7 @@ class AIOSEOPAdminMenus {
44
  */
45
  function add_pro_submenu() {
46
  global $submenu;
47
- $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_menu';
48
  $upgrade_text = __( 'Upgrade to Pro', 'all-in-one-seo-pack' );
49
  $submenu[ AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class.php' ][] = array(
50
  "<span class='upgrade_menu_link'>$upgrade_text</span>",
44
  */
45
  function add_pro_submenu() {
46
  global $submenu;
47
+ $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_menu';
48
  $upgrade_text = __( 'Upgrade to Pro', 'all-in-one-seo-pack' );
49
  $submenu[ AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class.php' ][] = array(
50
  "<span class='upgrade_menu_link'>$upgrade_text</span>",
admin/display/notices/blog-visibility-notice.php CHANGED
@@ -7,7 +7,6 @@
7
  * @subpackage AIOSEOP_Notices
8
  */
9
 
10
-
11
  /**
12
  * Notice - Blog Visibility
13
  *
7
  * @subpackage AIOSEOP_Notices
8
  */
9
 
 
10
  /**
11
  * Notice - Blog Visibility
12
  *
admin/display/notices/review-plugin-notice.php CHANGED
@@ -6,6 +6,7 @@
6
  * @package All-in-One-SEO-Pack
7
  * @subpackage AIOSEOP_Notices
8
  */
 
9
  /**
10
  * Notice - Review Plugin
11
  *
6
  * @package All-in-One-SEO-Pack
7
  * @subpackage AIOSEOP_Notices
8
  */
9
+
10
  /**
11
  * Notice - Review Plugin
12
  *
admin/display/welcome-content.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
 
8
  ?>
9
  <div class="welcome-panel">
10
  <div class="welcome-panel-content">
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
8
+
9
  ?>
10
  <div class="welcome-panel">
11
  <div class="welcome-panel-content">
admin/display/welcome.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
 
8
  if ( ! class_exists( 'aioseop_welcome' ) ) {
9
 
10
  /**
@@ -105,7 +106,8 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
105
  return;
106
  }
107
 
108
- if ( ( AIOSEOP_VERSION === $seen ) || ( true !== $activate ) ) {
 
109
  return;
110
  }
111
 
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
8
+
9
  if ( ! class_exists( 'aioseop_welcome' ) ) {
10
 
11
  /**
106
  return;
107
  }
108
 
109
+ // Compare the major versions so we don't show the welcome screen on minor versions.
110
+ if ( ( get_major_version( AIOSEOP_VERSION ) === get_major_version( $seen ) ) || ( true !== $activate ) ) {
111
  return;
112
  }
113
 
admin/meta_import.php CHANGED
@@ -5,6 +5,7 @@
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
 
8
  if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
9
 
10
  /**
@@ -48,9 +49,9 @@ if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
48
  echo '<div class="notice notice-warning row-title is-dismissible yst_notice"><p>', sprintf( esc_html__( 'The plugin Yoast SEO has been detected. Do you want to %1$simport its settings%2$s into %3$s', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>', AIOSEOP_PLUGIN_NAME ), '</p></div>';
49
 
50
  }
51
-
52
  echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %1$simport its settings%2$s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $yoasturl ) ), '</a>' ), '</p></div>';
53
-
54
  }
55
 
56
  public function show_deactivate_notice() {
@@ -99,13 +100,13 @@ function aiosp_seometa_action() {
99
  }
100
 
101
  if ( empty( $_REQUEST['platform_old'] ) ) {
102
- printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, you can\'t do that. Please choose a platform and then click Analyze or Convert.' ) );
103
 
104
  return;
105
  }
106
 
107
  if ( 'All in One SEO Pack' === $_REQUEST['platform_old'] ) {
108
- printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, you can\'t do that. Please choose a platform and then click Analyze or Convert.' ) );
109
 
110
  return;
111
  }
@@ -118,7 +119,7 @@ function aiosp_seometa_action() {
118
 
119
  $response = aiosp_seometa_post_meta_analyze( $_REQUEST['platform_old'], 'All in One SEO Pack' );
120
  if ( is_wp_error( $response ) ) {
121
- printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, something went wrong. Please try again' ) );
122
 
123
  return;
124
  }
@@ -141,7 +142,7 @@ function aiosp_seometa_action() {
141
 
142
  $result = aiosp_seometa_post_meta_convert( stripslashes( $_REQUEST['platform_old'] ), 'All in One SEO Pack' );
143
  if ( is_wp_error( $result ) ) {
144
- printf( '<p>%s</p>', __( 'Sorry, something went wrong. Please try again' ) );
145
 
146
  return;
147
  }
@@ -178,7 +179,7 @@ function aiosp_seometa_admin() {
178
 
179
  <p>
180
  <span class="description">
181
- <strong><?php printf( __( 'Please Note: ' ) ); ?></strong>
182
  <?php
183
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
184
  printf(
5
  * @package All_in_One_SEO_Pack
6
  * @since ?
7
  */
8
+
9
  if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
10
 
11
  /**
49
  echo '<div class="notice notice-warning row-title is-dismissible yst_notice"><p>', sprintf( esc_html__( 'The plugin Yoast SEO has been detected. Do you want to %1$simport its settings%2$s into %3$s', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>', AIOSEOP_PLUGIN_NAME ), '</p></div>';
50
 
51
  }
52
+ // phpcs:disable WordPress.WP.I18n
53
  echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %1$simport its settings%2$s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $yoasturl ) ), '</a>' ), '</p></div>';
54
+ // phpcs:enable
55
  }
56
 
57
  public function show_deactivate_notice() {
100
  }
101
 
102
  if ( empty( $_REQUEST['platform_old'] ) ) {
103
+ printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, you can\'t do that. Please choose a platform and then click Analyze or Convert.', 'all-in-one-seo-pack' ) );
104
 
105
  return;
106
  }
107
 
108
  if ( 'All in One SEO Pack' === $_REQUEST['platform_old'] ) {
109
+ printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, you can\'t do that. Please choose a platform and then click Analyze or Convert.', 'all-in-one-seo-pack' ) );
110
 
111
  return;
112
  }
119
 
120
  $response = aiosp_seometa_post_meta_analyze( $_REQUEST['platform_old'], 'All in One SEO Pack' );
121
  if ( is_wp_error( $response ) ) {
122
+ printf( '<div class="error"><p>%s</p></div>', __( 'Sorry, something went wrong. Please try again', 'all-in-one-seo-pack' ) );
123
 
124
  return;
125
  }
142
 
143
  $result = aiosp_seometa_post_meta_convert( stripslashes( $_REQUEST['platform_old'] ), 'All in One SEO Pack' );
144
  if ( is_wp_error( $result ) ) {
145
+ printf( '<p>%s</p>', __( 'Sorry, something went wrong. Please try again', 'all-in-one-seo-pack' ) );
146
 
147
  return;
148
  }
179
 
180
  <p>
181
  <span class="description">
182
+ <strong><?php printf( __( 'Please Note: ', 'all-in-one-seo-pack' ) ); ?></strong>
183
  <?php
184
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
185
  printf(
aioseop-init.php CHANGED
@@ -2,6 +2,8 @@
2
  /**
3
  * We'll eventually put stuff in here from the main plugin file.
4
  *
 
 
5
  * @package All_in_One_SEO_Pack
6
  * @since 2.3.6
7
  */
2
  /**
3
  * We'll eventually put stuff in here from the main plugin file.
4
  *
5
+ * phpcs:disable Squiz.Commenting.FileComment.SpacingAfterComment
6
+ *
7
  * @package All_in_One_SEO_Pack
8
  * @since 2.3.6
9
  */
aioseop_class.php CHANGED
@@ -217,7 +217,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
217
  $this->do_log = false;
218
  }
219
  /* translators: This is a header for the General Settings menu. %s is a placeholder and is replaced with the name of the plugin. */
220
- $this->name = sprintf( __( '%s Plugin Options', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
221
  /* translators: This is the main menu of the plugin. */
222
  $this->menu_name = __( 'General Settings', 'all-in-one-seo-pack' );
223
 
@@ -231,12 +231,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
231
  $this->default_options = array(
232
  'license_key' => array(
233
  /* translators: This is a setting where users can enter their license code for All in One SEO Pack Pro. */
234
- 'name' => __( 'License Key:', 'all-in-one-seo-pack' ),
235
  'type' => 'text',
236
  ),
237
  'home_title' => array(
238
  /* translators: This is a setting where users can enter the title for their homepage. */
239
- 'name' => __( 'Home Title:', 'all-in-one-seo-pack' ),
240
  'default' => null,
241
  'type' => 'text',
242
  'sanitize' => 'text',
@@ -247,7 +247,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
247
  ),
248
  'home_description' => array(
249
  /* translators: This is a setting where users can enter the description for their homepage. */
250
- 'name' => __( 'Home Description:', 'all-in-one-seo-pack' ),
251
  'default' => '',
252
  'type' => 'textarea',
253
  'sanitize' => 'text',
@@ -258,7 +258,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
258
  ),
259
  'togglekeywords' => array(
260
  /* translators: This is a setting where users can enable the use of meta keywords for their website. */
261
- 'name' => __( 'Use Keywords:', 'all-in-one-seo-pack' ),
262
  'default' => 1,
263
  'type' => 'radio',
264
  'initial_options' => array(
@@ -270,7 +270,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
270
  ),
271
  'home_keywords' => array(
272
  /* translators: This is a setting where users can enter meta keywords for their homepage. */
273
- 'name' => __( 'Home Keywords (comma separated):', 'all-in-one-seo-pack' ),
274
  'default' => null,
275
  'type' => 'textarea',
276
  'sanitize' => 'text',
@@ -291,18 +291,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
291
  ),
292
  'can' => array(
293
  /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. */
294
- 'name' => __( 'Canonical URLs:', 'all-in-one-seo-pack' ),
295
  'default' => 1,
296
  ),
297
  'no_paged_canonical_links' => array(
298
  /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. Enabling this setting means the plugin will use the URL of the first page as the canonical URL for all subsequent paginated pages. */
299
- 'name' => __( 'No Pagination for Canonical URLs:', 'all-in-one-seo-pack' ),
300
  'default' => 0,
301
  'condshow' => array( 'aiosp_can' => 'on' ),
302
  ),
303
  'force_rewrites' => array(
304
  /* translators: This is the name of a setting. Enabling this option forces the plugin to use output buffering to ensure that the title tag will be rewritten. */
305
- 'name' => __( 'Force Rewrites:', 'all-in-one-seo-pack' ),
306
  'default' => 1,
307
  'type' => 'hidden',
308
  'prefix' => $this->prefix,
@@ -313,7 +313,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
313
  ),
314
  'use_original_title' => array(
315
  /* translators: This is the name of a setting. Enabling this option forces the plugin to use the wp_title() function to fetch the title tag. */
316
- 'name' => __( 'Use Original Title:', 'all-in-one-seo-pack' ),
317
  'type' => 'radio',
318
  'default' => 0,
319
  'initial_options' => array(
@@ -323,56 +323,56 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
323
  ),
324
  'home_page_title_format' => array(
325
  /* translators: This is a setting where users can enter the title format for the homepage. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
326
- 'name' => __( 'Home Page Title Format:', 'all-in-one-seo-pack' ),
327
  'type' => 'text',
328
  'default' => '%page_title%',
329
  ),
330
  'page_title_format' => array(
331
 
332
  /* translators: This is a setting where users can enter the title format for Pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
333
- 'name' => __( 'Page Title Format:', 'all-in-one-seo-pack' ),
334
  'type' => 'text',
335
  'default' => '%page_title% | %site_title%',
336
  ),
337
  'post_title_format' => array(
338
  /* translators: This is a setting where users can enter the title format for Posts. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
339
- 'name' => __( 'Post Title Format:', 'all-in-one-seo-pack' ),
340
  'type' => 'text',
341
  'default' => '%post_title% | %site_title%',
342
  ),
343
  'category_title_format' => array(
344
  /* translators: This is a setting where users can enter the title format for categories. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
345
- 'name' => __( 'Category Title Format:', 'all-in-one-seo-pack' ),
346
  'type' => 'text',
347
  'default' => '%category_title% | %site_title%',
348
  ),
349
  'archive_title_format' => array(
350
  /* translators: This is a setting where users can enter the title format for archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
351
- 'name' => __( 'Archive Title Format:', 'all-in-one-seo-pack' ),
352
  'type' => 'text',
353
  'default' => '%archive_title% | %site_title%',
354
  ),
355
  'date_title_format' => array(
356
  /* translators: This is a setting where users can enter the title format for date archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
357
- 'name' => __( 'Date Archive Title Format:', 'all-in-one-seo-pack' ),
358
  'type' => 'text',
359
  'default' => '%date% | %site_title%',
360
  ),
361
  'author_title_format' => array(
362
  /* translators: This is a setting where users can enter the title format for author archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
363
- 'name' => __( 'Author Archive Title Format:', 'all-in-one-seo-pack' ),
364
  'type' => 'text',
365
  'default' => '%author% | %site_title%',
366
  ),
367
  'tag_title_format' => array(
368
  /* translators: This is a setting where users can enter the title format for tag archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
369
- 'name' => __( 'Tag Title Format:', 'all-in-one-seo-pack' ),
370
  'type' => 'text',
371
  'default' => '%tag% | %site_title%',
372
  ),
373
  'search_title_format' => array(
374
  /* translators: This is a setting where users can enter the title format for the search page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
375
- 'name' => __( 'Search Title Format:', 'all-in-one-seo-pack' ),
376
  'type' => 'text',
377
  'default' => '%search% | %site_title%',
378
  ),
@@ -384,82 +384,82 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
384
  ),
385
  '404_title_format' => array(
386
  /* translators: This is a setting where users can enter the title format for the 404 page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
387
- 'name' => __( '404 Title Format:', 'all-in-one-seo-pack' ),
388
  'type' => 'text',
389
  'default' => __( 'Nothing found for %request_words%', 'all-in-one-seo-pack' ),
390
  ),
391
  'paged_format' => array(
392
  /* translators: This is a setting where users can enter the title format for paginated pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
393
- 'name' => __( 'Paged Format:', 'all-in-one-seo-pack' ),
394
  'type' => 'text',
395
  'default' => sprintf( ' - %s %%page%%', __( 'Part', 'all-in-one-seo-pack' ) ),
396
  ),
397
  'cpostactive' => array(
398
  /* translators: This is a setting where users can indicate which post types they want to use All in One SEO Pack with. */
399
- 'name' => __( 'SEO on only these Content Types:', 'all-in-one-seo-pack' ),
400
  'type' => 'multicheckbox',
401
  'default' => array( 'post', 'page' ),
402
  ),
403
  'taxactive' => array(
404
  /* translators: This is a setting where users can indicate which taxonomies they want to use All in One SEO Pack with. */
405
- 'name' => __( 'SEO on only these taxonomies:', 'all-in-one-seo-pack' ),
406
  'type' => 'multicheckbox',
407
  'default' => array( 'category', 'post_tag' ),
408
  ),
409
  'cpostnoindex' => array(
410
  /* translators: This is a setting where users can indicate which post types they want to NOINDEX by default. NOINDEX is a value of the HTML robots meta tag that asks search engines not to index the page. */
411
- 'name' => __( 'Default to NOINDEX:', 'all-in-one-seo-pack' ),
412
  'type' => 'multicheckbox',
413
  'default' => array(),
414
  ),
415
  'cpostnofollow' => array(
416
  /* translators: This is a setting where users can indicate which post types they want to NOFOLLOW by default. NOFOLLOW is a value of the HTML robots meta tag that asks search engines not to follow any links on the page. */
417
- 'name' => __( 'Default to NOFOLLOW:', 'all-in-one-seo-pack' ),
418
  'type' => 'multicheckbox',
419
  'default' => array(),
420
  ),
421
  'posttypecolumns' => array(
422
  /* translators: This is a setting where users can indicate for which post types they want to enable columns. Columns are added to the All Posts, All Pages, etc. list pages and allow users to quick-edit their title and description - https://semperplugins.com/documentation/display-settings/#show-column-labels-for-custom-post-types. */
423
- 'name' => __( 'Show Column Labels for Custom Post Types:', 'all-in-one-seo-pack' ),
424
  'type' => 'multicheckbox',
425
  'default' => array( 'post', 'page' ),
426
  ),
427
  'google_verify' => array(
428
- 'name' => 'Google Search Console:',
429
  'default' => '',
430
  'type' => 'text',
431
  ),
432
  'bing_verify' => array(
433
- 'name' => 'Bing Webmaster Tools:',
434
  'default' => '',
435
  'type' => 'text',
436
  ),
437
  'pinterest_verify' => array(
438
  /* translators: This is a setting where users can add their Pinterest website verification code. */
439
- 'name' => __( 'Pinterest Site Verification:', 'all-in-one-seo-pack' ),
440
  'default' => '',
441
  'type' => 'text',
442
  ),
443
  'yandex_verify' => array(
444
- 'name' => 'Yandex Webmaster Tools:',
445
  'default' => '',
446
  'type' => 'text',
447
  ),
448
  'baidu_verify' => array(
449
- 'name' => 'Baidu Webmaster Tools:',
450
  'default' => '',
451
  'type' => 'text',
452
  ),
453
  'google_analytics_id' => array(
454
  /* translators: This is a setting where users can add their Google Analytics verification code. Leave this in English if there is no translation for "Google Analytics". */
455
- 'name' => __( 'Google Analytics ID:', 'all-in-one-seo-pack' ),
456
  'default' => null,
457
  'type' => 'text',
458
  'placeholder' => 'UA-########-#',
459
  ),
460
  'ga_advanced_options' => array(
461
  /* translators: This is a setting users can enable to display more advanced options for Google Analytics. */
462
- 'name' => __( 'Advanced Analytics Options:', 'all-in-one-seo-pack' ),
463
  'default' => 'on',
464
  'type' => 'radio',
465
  'initial_options' => array(
@@ -476,7 +476,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
476
  ),
477
  'ga_domain' => array(
478
  /* translators: This is a setting which allows users to set the cookie domain for their Google Analytics tracking code. */
479
- 'name' => __( 'Tracking Domain:', 'all-in-one-seo-pack' ),
480
  'type' => 'text',
481
  'condshow' => array(
482
  'aiosp_google_analytics_id' => array(
@@ -489,7 +489,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
489
  ),
490
  'ga_multi_domain' => array(
491
  /* translators: This is a setting which allows users to enable Google Analytics tracking for multiple domain names. */
492
- 'name' => __( 'Track Multiple Domains:', 'all-in-one-seo-pack' ),
493
  'default' => 0,
494
  'condshow' => array(
495
  'aiosp_google_analytics_id' => array(
@@ -502,7 +502,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
502
  ),
503
  'ga_addl_domains' => array(
504
  /* translators: This is a setting which allows users to enter additional domain names used for Google Analytics cross-domain tracking - https://support.google.com/analytics/answer/1034342?hl=en.*/
505
- 'name' => __( 'Additional Domains:', 'all-in-one-seo-pack' ),
506
  'type' => 'textarea',
507
  'condshow' => array(
508
  'aiosp_google_analytics_id' => array(
@@ -516,7 +516,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
516
  ),
517
  'ga_anonymize_ip' => array(
518
  /* translators: This is a setting which tells Google Analytics not to track and store the IP addresses of website visitors. This is required to be compliant with the GDPR for example. */
519
- 'name' => __( 'Anonymize IP Addresses:', 'all-in-one-seo-pack' ),
520
  'type' => 'checkbox',
521
  'condshow' => array(
522
  'aiosp_google_analytics_id' => array(
@@ -529,7 +529,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
529
  ),
530
  'ga_display_advertising' => array(
531
  /* translators: This is a setting that enables a collection of Google Analytics features so you can, for example, create segments based on demographic and interest data. */
532
- 'name' => __( 'Display Advertiser Tracking:', 'all-in-one-seo-pack' ),
533
  'type' => 'checkbox',
534
  'condshow' => array(
535
  'aiosp_google_analytics_id' => array(
@@ -542,7 +542,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
542
  ),
543
  'ga_exclude_users' => array(
544
  /* translators: This is a setting that allows you to exclude certain WordPress user roles, e.g. Administrators, from Google Analytics tracking. */
545
- 'name' => __( 'Exclude Users From Tracking:', 'all-in-one-seo-pack' ),
546
  'type' => 'multicheckbox',
547
  'condshow' => array(
548
  'aiosp_google_analytics_id' => array(
@@ -555,7 +555,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
555
  ),
556
  'ga_track_outbound_links' => array(
557
  /* translators: This is a setting that enables tracking of outbound/external links by Google Analytics. */
558
- 'name' => __( 'Track Outbound Links:', 'all-in-one-seo-pack' ),
559
  'default' => 0,
560
  'condshow' => array(
561
  'aiosp_google_analytics_id' => array(
@@ -568,7 +568,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
568
  ),
569
  'ga_link_attribution' => array(
570
  /* translators: This is a setting for Google Analytics that allows you to tag your pages to implement enhanced link-tracking. */
571
- 'name' => __( 'Enhanced Link Attribution:', 'all-in-one-seo-pack' ),
572
  'default' => 0,
573
  'condshow' => array(
574
  'aiosp_google_analytics_id' => array(
@@ -581,7 +581,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
581
  ),
582
  'ga_enhanced_ecommerce' => array(
583
  /* translators: This is a setting which tells Google Analytics to track your customers' path to purchase on your e-commerce website. */
584
- 'name' => __( 'Enhanced Ecommerce:', 'all-in-one-seo-pack' ),
585
  'default' => 0,
586
  'condshow' => array(
587
  'aiosp_google_analytics_id' => array(
@@ -596,7 +596,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
596
  /* translators: This is a setting that outputs basic Schema.org markup, also known as structured data, into the source code of each page. */
597
  'name' => __( 'Use Schema.org Markup', 'all-in-one-seo-pack' ),
598
  'type' => 'radio',
599
- 'default' => 0,
600
  'initial_options' => array(
601
  1 => __( 'Enabled', 'all-in-one-seo-pack' ),
602
  0 => __( 'Disabled', 'all-in-one-seo-pack' ),
@@ -605,13 +605,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
605
  // TODO Change `schema_search_results_page` to `schema_add_search_results_page`. Requires modifying double arrow alignment.
606
  'schema_search_results_page' => array(
607
  /* translators: This is a setting users can enable to add the basic markup code to their source code that is needed for Google to generate a Sitelinks Search Box - https://developers.google.com/search/docs/data-types/sitelinks-searchbox.*/
608
- 'name' => __( 'Display Sitelinks Search Box:', 'all-in-one-seo-pack' ),
609
  'condshow' => array(
610
  'aiosp_schema_markup' => 1,
611
  ),
612
  ),
613
  'schema_social_profile_links' => array(
614
- 'name' => __( 'Social Profile Links:', 'all-in-one-seo-pack' ),
615
  'type' => 'textarea',
616
  'cols' => 60,
617
  'rows' => 5,
@@ -620,7 +620,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',
626
  'initial_options' => array(
@@ -632,7 +632,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' => '',
638
  'condshow' => array(
@@ -641,7 +641,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(
647
  'aiosp_schema_markup' => 1,
@@ -650,7 +650,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,
656
  'condshow' => array(
@@ -660,7 +660,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
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',
666
  'condshow' => array(
@@ -669,7 +669,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(
675
  'aiosp_schema_markup' => 1,
@@ -692,142 +692,142 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
692
  ),
693
  'use_categories' => array(
694
  /* translators: This is the name of a setting. By enabling it, the plugin will use the categories of the relevant post as meta keywords in addition to any user-specified keywords. */
695
- 'name' => __( 'Use Categories for META keywords:', 'all-in-one-seo-pack' ),
696
  'default' => 0,
697
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
698
  ),
699
  'use_tags_as_keywords' => array(
700
  /* translators: This is the name of a setting. By enabling it, the plugin will use the tags of the relevant post as meta keywords in addition to any user-specified keywords. */
701
- 'name' => __( 'Use Tags for META keywords:', 'all-in-one-seo-pack' ),
702
  'default' => 1,
703
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
704
  ),
705
  'dynamic_postspage_keywords' => array(
706
  /* translators: This a setting that allows you to dynamically output meta keywords on archive pages based on the keywords from the posts that are displayed by the archive page. */
707
- 'name' => __( 'Dynamically Generate Keywords for Posts Page/Archives:', 'all-in-one-seo-pack' ),
708
  'default' => 1,
709
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
710
  ),
711
  'category_noindex' => array(
712
  /* translators: This is a global setting that allows you to NOINDEX all your categories. */
713
- 'name' => __( 'Use noindex for Categories:', 'all-in-one-seo-pack' ),
714
  'default' => 1,
715
  ),
716
  'archive_date_noindex' => array(
717
  /* translators: This is a global setting that allows you to NOINDEX all your date archive pages. */
718
- 'name' => __( 'Use noindex for Date Archives:', 'all-in-one-seo-pack' ),
719
  'default' => 1,
720
  ),
721
  'archive_author_noindex' => array(
722
  /* translators: This is a global setting that allows you to NOINDEX all your author archive pages. */
723
- 'name' => __( 'Use noindex for Author Archives:', 'all-in-one-seo-pack' ),
724
  'default' => 1,
725
  ),
726
  'tags_noindex' => array(
727
  /* translators: This is a global setting that allows you to NOINDEX all your tag archive pages. */
728
- 'name' => __( 'Use noindex for Tag Archives:', 'all-in-one-seo-pack' ),
729
  'default' => 0,
730
  ),
731
  'search_noindex' => array(
732
  /* translators: This is a setting that allows you to NOINDEX your search results page. */
733
- 'name' => __( 'Use noindex for the Search page:', 'all-in-one-seo-pack' ),
734
  'default' => 0,
735
  ),
736
  '404_noindex' => array(
737
  /* translators: This is a setting that allows you to NOINDEX your 404 Not Found page. */
738
- 'name' => __( 'Use noindex for the 404 page:', 'all-in-one-seo-pack' ),
739
  'default' => 0,
740
  ),
741
  'tax_noindex' => array(
742
  /* translators: This is a global setting that allows you to NOINDEX specific taxonomies. */
743
- 'name' => __( 'Use noindex for Taxonomy Archives:', 'all-in-one-seo-pack' ),
744
  'type' => 'multicheckbox',
745
  'default' => array(),
746
  ),
747
  'paginated_noindex' => array(
748
  /* translators: This is a global setting that allows you to NOINDEX all your paginated content (page 2 and higher). */
749
- 'name' => __( 'Use noindex for paginated pages/posts:', 'all-in-one-seo-pack' ),
750
  'default' => 0,
751
  ),
752
  'paginated_nofollow' => array(
753
  /* translators: This is a global setting that allows you to NOFOLLOW all your paginated content. */
754
- 'name' => __( 'Use nofollow for paginated pages/posts:', 'all-in-one-seo-pack' ),
755
  'default' => 0,
756
  ),
757
  'generate_descriptions' => array(
758
  /* translators: This is a setting that allows the plugin to automatically populate the meta description tag based on the excerpt or content of the post/page.*/
759
- 'name' => __( 'Autogenerate Descriptions:', 'all-in-one-seo-pack' ),
760
  'default' => 0,
761
  ),
762
  'skip_excerpt' => array(
763
  /* translators: This is the name of a setting. By enabling it, the plugin will use the content of the post/page to automatically populate the meta description tag, instead of the excerpt. */
764
- 'name' => __( 'Use Content For Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
765
  'default' => 0,
766
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
767
  ),
768
  'run_shortcodes' => array(
769
  /* translators: This is a setting that enables the plugin to execute shortcodes in the autogenerated descriptions. Shortcodes allow people to execute code inside WordPress posts, pages, and widgets without writing any code directly. */
770
- 'name' => __( 'Run Shortcodes In Autogenerated Descriptions:', 'all-in-one-seo-pack' ),
771
  'default' => 0,
772
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
773
  ),
774
  'hide_paginated_descriptions' => array(
775
  /* translators: This is a setting that, if enabled, removes the meta description for paginated content (page 2 and higher). */
776
- 'name' => __( 'Remove Descriptions For Paginated Pages:', 'all-in-one-seo-pack' ),
777
  'default' => 0,
778
  ),
779
  'dont_truncate_descriptions' => array(
780
  /* translators: This is a setting that makes sure the plugin does not truncate the meta description tag if it is longer than what All in One SEO Pack recommends. */
781
- 'name' => __( 'Never Shorten Long Descriptions:', 'all-in-one-seo-pack' ),
782
  'default' => 0,
783
  ),
784
  'unprotect_meta' => array(
785
  /* translators: This is a setting that allows users to unprotect internal postmeta fields for use with XML-RPC. */
786
- 'name' => __( 'Unprotect Post Meta Fields:', 'all-in-one-seo-pack' ),
787
  'default' => 0,
788
  ),
789
  'redirect_attachement_parent' => array(
790
  /* translators: This is the name of a setting. By enabling it, the plugin will redirect attachment page requests to the post parent, or in other words, the post/page where the media is embedded. */
791
- 'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack' ),
792
  'default' => 0,
793
  ),
794
  'ex_pages' => array(
795
  /* translators: This is a textarea setting where users can enter a list of pages that All in One SEO Pack should not affect. */
796
- 'name' => __( 'Exclude Pages:', 'all-in-one-seo-pack' ),
797
  'type' => 'textarea',
798
  'default' => '',
799
  ),
800
  'post_meta_tags' => array(
801
  /* translators: This is a setting that allows users to ouput additional code, such as references to stylesheets or JavaScript libraries, into the HEAD section of each post. */
802
- 'name' => __( 'Additional Post Headers:', 'all-in-one-seo-pack' ),
803
  'type' => 'textarea',
804
  'default' => '',
805
  'sanitize' => 'default',
806
  ),
807
  'page_meta_tags' => array(
808
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of each page. */
809
- 'name' => __( 'Additional Page Headers:', 'all-in-one-seo-pack' ),
810
  'type' => 'textarea',
811
  'default' => '',
812
  'sanitize' => 'default',
813
  ),
814
  'front_meta_tags' => array(
815
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the frontpage/homepage. */
816
- 'name' => __( 'Additional Front Page Headers:', 'all-in-one-seo-pack' ),
817
  'type' => 'textarea',
818
  'default' => '',
819
  'sanitize' => 'default',
820
  ),
821
  'home_meta_tags' => array(
822
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the static Posts page (see Settings > Reading). */
823
- 'name' => __( 'Additional Posts Page Headers:', 'all-in-one-seo-pack' ),
824
  'type' => 'textarea',
825
  'default' => '',
826
  'sanitize' => 'default',
827
  ),
828
  'do_log' => array(
829
  /* translators: This is a setting that enables All in One SEO Pack to log important events to help with debugging. */
830
- 'name' => __( 'Log important events:', 'all-in-one-seo-pack' ),
831
  'default' => null,
832
  ),
833
 
@@ -1004,7 +1004,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1004
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify', 'yandex_verify', 'baidu_verify' ),
1005
  ),
1006
  'google' => array(
1007
- 'name' => __( 'Google Settings', 'all-in-one-seo-pack' ),
1008
  'help_link' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
1009
  'options' => array(
1010
  'google_analytics_id',
@@ -1090,7 +1090,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
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 ) {
@@ -1154,14 +1154,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1154
  $args['options']['nowrap'] = false;
1155
  $args['options']['save'] = false;
1156
  $info = $this->get_page_snippet_info();
1157
- $title = $info['title'];
1158
- $description = $info['description'];
1159
- $keywords = $info['keywords'];
1160
- $url = $info['url'];
1161
- $title_format = $info['title_format'];
1162
- $category = $info['category'];
1163
- $w = $info['w'];
1164
- $p = $info['p'];
1165
 
1166
  if ( $this->strlen( $title ) > 70 ) {
1167
  $title = $this->trim_excerpt_without_filters(
@@ -1182,8 +1182,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1182
  $title = $title_format;
1183
  }
1184
 
1185
- $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
1186
- $buf = $this->get_option_row( $args['name'], $args['options'], $args );
1187
 
1188
  return $buf;
1189
  }
@@ -1230,7 +1230,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1230
  if ( false !== strpos( $title_format, '%blog_title%', 0 ) ) {
1231
  $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
1232
  }
1233
- $title_format = $this->apply_cf_fields( $title_format );
1234
  if ( false !== strpos( $title_format, '%post_title%', 0 ) ) {
1235
  $title_format = str_replace( '%post_title%', $this->get_preview_snippet_title_helper( $title ), $title_format );
1236
  }
@@ -1362,9 +1362,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1362
  return $info;
1363
  }
1364
  global $post, $aioseop_options, $wp_query;
1365
- $title = $url = $description = $term = $category = '';
1366
- $p = $post;
1367
- $w = $wp_query;
 
 
 
 
1368
  if ( ! is_object( $post ) ) {
1369
  $post = $this->get_queried_object();
1370
  }
@@ -1396,9 +1400,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1396
  $this->is_front_page = false;
1397
  }
1398
  if ( 'page' === get_option( 'show_on_front' ) ) {
1399
- if ( is_page() && $post->ID == get_option( 'page_on_front' ) ) {
1400
  $this->is_front_page = true;
1401
- } elseif ( $post->ID == get_option( 'page_for_posts' ) ) {
1402
  $wp_query->is_home = true;
1403
  }
1404
  }
@@ -1460,7 +1464,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1460
  }
1461
  $description = $this->internationalize( $description );
1462
  }
1463
- if ( $this->is_front_page == true ) {
1464
  // $title_format = $aioseop_options['aiosp_home_page_title_format'];
1465
  $title_format = ''; // Not sure why this needs to be this way, but we should extract all this out to figure out what's going on.
1466
  }
@@ -1685,7 +1689,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1685
  if ( is_front_page() ) {
1686
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1687
  global $post;
1688
- if ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) ) {
1689
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1690
  if ( ! $title ) {
1691
  $title = $this->internationalize( $post->post_title );
@@ -1712,34 +1716,36 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1712
  // #1616 - Avoid trying to get property of non-object when no posts are present on the homepage.
1713
  global $post;
1714
 
1715
- if ( $post === null ) {
1716
  $post_id = get_option( 'page_on_front' );
1717
  } else {
1718
  $post_id = $post->ID;
1719
  }
1720
 
1721
- if ( is_post_type_archive() && is_post_type_archive( 'product' ) && $post_id = wc_get_page_id( 'shop' ) && $post = get_post( $post_id ) ) {
1722
-
1723
- if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1724
- $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1725
- }
1726
- // $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1727
- if ( ! $title ) {
1728
- $title = $this->internationalize( get_post_meta( $post_id, '_aioseop_title', true ) );
1729
- } // This is/was causing the first product to come through.
1730
- if ( ! $title ) {
1731
- $title = $this->internationalize( $post->post_title );
1732
- }
1733
- if ( ! $title ) {
1734
- $title = $this->internationalize( $this->get_original_title( '', false ) );
1735
- }
1736
-
1737
- $title = $this->apply_page_title_format( $title, $post );
1738
- $title = $this->paged_title( $title );
1739
- $title = apply_filters( 'aioseop_title_page', $title );
1740
 
1741
- return $title;
 
 
1742
 
 
 
1743
  }
1744
 
1745
  // this is returned for woo.
@@ -1765,7 +1771,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1765
  if ( null === $post ) {
1766
  return false;
1767
  }
1768
- if ( $this->is_static_front_page() && ( $home_title = $this->internationalize( $aioseop_options['aiosp_home_title'] ) ) ) {
 
 
1769
  if ( ! empty( $aioseop_options['aiosp_home_page_title_format'] ) ) {
1770
  $home_title = $this->apply_page_title_format( $home_title, $post, $aioseop_options['aiosp_home_page_title_format'] );
1771
  }
@@ -1802,20 +1810,24 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1802
 
1803
  return $title;
1804
  }
1805
- } elseif ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
1806
- // Too far down? -mrt.
1807
- $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1808
- if ( ! $title ) {
1809
- $title = $this->internationalize( $post->post_title );
1810
- }
1811
- if ( ! $title ) {
1812
- $title = $this->internationalize( $this->get_original_title( '', false ) );
1813
- }
1814
- $title = $this->apply_page_title_format( $title, $post );
1815
- $title = $this->paged_title( $title );
1816
- $title = apply_filters( 'aioseop_title_page', $title );
 
 
 
1817
 
1818
- return $title;
 
1819
  } elseif ( is_single() || $this->check_singular() ) {
1820
  // We're not in the loop :(.
1821
  if ( null === $post ) {
@@ -1843,7 +1855,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1843
 
1844
  return apply_filters( 'aioseop_title_single', $title );
1845
  } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
1846
- $search = esc_attr( stripslashes( $s ) );
1847
  $title_format = $aioseop_options['aiosp_search_title_format'];
1848
  $title = str_replace( '%site_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1849
  if ( false !== strpos( $title, '%blog_title%', 0 ) ) {
@@ -1863,7 +1875,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1863
  return $title;
1864
  } elseif ( is_tag() ) {
1865
  global $utw;
1866
- $tag = $tag_description = '';
 
1867
  if ( $utw ) {
1868
  $tags = $utw->GetCurrentTagSet();
1869
  $tag = $tags[0]->tag;
@@ -2048,7 +2061,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2048
  if ( false !== $has_filter ) {
2049
  add_filter( 'wp_title', array( $this, 'wp_title' ), $has_filter );
2050
  }
2051
- if ( $title && ( $title = trim( $title ) ) ) {
 
2052
  return trim( $title );
2053
  }
2054
  }
@@ -2064,7 +2078,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2064
  $title = $this->internationalize( single_post_title( '', false ) );
2065
  } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
2066
  $search = esc_attr( stripslashes( $s ) );
2067
- $title = $search;
2068
  } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
2069
  $category_name = $this->ucwords( $this->internationalize( single_cat_title( '', false ) ) );
2070
  $title = $category_name;
@@ -2085,11 +2099,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2085
  }
2086
  } elseif ( is_author() ) {
2087
  $author = get_userdata( get_query_var( 'author' ) );
2088
- if ( $author === false ) {
2089
  global $wp_query;
2090
  $author = $wp_query->get_queried_object();
2091
  }
2092
- if ( $author !== false ) {
2093
  $title = $author->display_name;
2094
  }
2095
  } elseif ( is_day() ) {
@@ -2161,7 +2175,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2161
  */
2162
  function apply_page_title_format( $title, $p = null, $title_format = '' ) {
2163
  global $aioseop_options;
2164
- if ( $p === null ) {
2165
  global $post;
2166
  } else {
2167
  $post = $p;
@@ -2214,7 +2228,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2214
  if ( false !== strpos( $new_title, "%{$type}_title%", 0 ) ) {
2215
  $new_title = str_replace( "%{$type}_title%", $title, $new_title );
2216
  }
2217
- if ( $type == 'post' ) {
2218
  if ( false !== strpos( $new_title, '%category%', 0 ) ) {
2219
  $new_title = str_replace( '%category%', $category, $new_title );
2220
  }
@@ -2372,7 +2386,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2372
  * @return string
2373
  */
2374
  function apply_post_title_format( $title, $category = '', $p = null ) {
2375
- if ( $p === null ) {
2376
  global $post;
2377
  } else {
2378
  $post = $p;
@@ -2393,7 +2407,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2393
  */
2394
  function get_post_title_format( $title_type = 'post', $p = null ) {
2395
  global $aioseop_options;
2396
- if ( ( $title_type != 'post' ) && ( $title_type != 'archive' ) ) {
2397
  return false;
2398
  }
2399
  $title_format = "%{$title_type}_title% | %site_title%";
@@ -2403,18 +2417,17 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2403
 
2404
  if ( ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
2405
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
2406
- if (
2407
- (
2408
- ( $title_type == 'archive' ) &&
2409
- is_post_type_archive( $wp_post_types ) &&
2410
- $prefix = "aiosp_{$title_type}_"
2411
- ) ||
2412
- (
2413
- ( $title_type == 'post' ) &&
2414
- $this->is_singular( $wp_post_types, $p ) &&
2415
- $prefix = 'aiosp_'
2416
- )
2417
- ) {
2418
  $post_type = get_post_type( $p );
2419
 
2420
  if ( ! empty( $aioseop_options[ "{$prefix}{$post_type}_title_format" ] ) ) {
@@ -2452,11 +2465,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2452
  */
2453
  function is_static_posts_page() {
2454
  static $is_posts_page = null;
2455
- if ( $is_posts_page !== null ) {
2456
  return $is_posts_page;
2457
  }
2458
  $post = $this->get_queried_object();
2459
- $is_posts_page = ( get_option( 'show_on_front' ) == 'page' && is_home() && ! empty( $post ) && $post->ID == get_option( 'page_for_posts' ) );
2460
 
2461
  return $is_posts_page;
2462
  }
@@ -2469,11 +2482,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2469
  * @return bool|null
2470
  */
2471
  function is_static_front_page() {
2472
- if ( isset( $this->is_front_page ) && $this->is_front_page !== null ) {
2473
  return $this->is_front_page;
2474
  }
2475
  $post = $this->get_queried_object();
2476
- $this->is_front_page = ( get_option( 'show_on_front' ) == 'page' && is_page() && ! empty( $post ) && $post->ID == get_option( 'page_on_front' ) );
2477
 
2478
  return $this->is_front_page;
2479
  }
@@ -2743,16 +2756,20 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2743
  $description = '';
2744
  if ( is_author() && $this->show_page_description() ) {
2745
  $description = $this->internationalize( get_the_author_meta( 'description' ) );
2746
- } elseif ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
2747
- // $description = $this->get_post_description( $post );
2748
- // $description = $this->apply_cf_fields( $description );
2749
- if ( ! ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ) {
2750
- $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2751
- } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2752
- // $description = $this->get_aioseop_description( $post );
2753
- $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2754
- } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2755
- $description = $this->get_aioseop_description( $post );
 
 
 
 
2756
  }
2757
  } elseif ( is_front_page() ) {
2758
  $description = $this->get_aioseop_description( $post );
@@ -2769,7 +2786,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2769
  }
2770
 
2771
  // #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
2772
- $screen = is_admin() ? get_current_screen() : null;
2773
  $ignore_php_version = $screen && isset( $screen->id ) && 'post' === $screen->id;
2774
 
2775
  $truncate = false;
@@ -2985,11 +3002,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2985
  if ( $query->is_404 || $query->is_search ) {
2986
  return false;
2987
  }
2988
- $link = '';
2989
  // this boolean will determine if any additional parameters will be added to the final link or not.
2990
  // this is especially useful in issues such as #491.
2991
  $add_query_params = false;
2992
- $haspost = false;
 
2993
  if ( ! empty( $query->posts ) ) {
2994
  $haspost = count( $query->posts ) > 0;
2995
  }
@@ -3010,8 +3028,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3010
  return false;
3011
  }
3012
  $add_query_params = true;
3013
- } elseif ( $query->is_home && ( get_option( 'show_on_front' ) == 'page' ) && ( $pageid = get_option( 'page_for_posts' ) ) ) {
3014
- $link = aioseop_get_permalink( $pageid );
 
 
 
3015
  } elseif ( is_front_page() || ( $query->is_home && ( get_option( 'show_on_front' ) != 'page' || ! get_option( 'page_for_posts' ) ) ) ) {
3016
  if ( function_exists( 'icl_get_home_url' ) ) {
3017
  $link = icl_get_home_url();
@@ -3035,13 +3056,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3035
  $link = get_tag_link( $tag->term_id );
3036
  }
3037
  } elseif ( $query->is_day && $haspost ) {
3038
- $link = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
3039
  $add_query_params = true;
3040
  } elseif ( $query->is_month && $haspost ) {
3041
- $link = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
3042
  $add_query_params = true;
3043
  } elseif ( $query->is_year && $haspost ) {
3044
- $link = get_year_link( get_query_var( 'year' ) );
3045
  $add_query_params = true;
3046
  } elseif ( $query->is_tax && $haspost ) {
3047
  $taxonomy = get_query_var( 'taxonomy' );
@@ -3049,8 +3070,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3049
  if ( ! empty( $term ) ) {
3050
  $link = get_term_link( $term, $taxonomy );
3051
  }
3052
- } elseif ( $query->is_archive && function_exists( 'get_post_type_archive_link' ) && ( $post_type = get_query_var( 'post_type' ) ) ) {
3053
- if ( is_array( $post_type ) ) {
 
3054
  $post_type = reset( $post_type );
3055
  }
3056
  $link = get_post_type_archive_link( $post_type );
@@ -3090,7 +3112,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3090
  $page_name = $wp_rewrite->pagination_base;
3091
  }
3092
  if ( ! empty( $page ) && $page > 1 ) {
3093
- if ( $page == get_query_var( 'page' ) ) {
3094
  if ( get_query_var( 'p' ) ) {
3095
  // non-pretty urls.
3096
  $link = add_query_arg( 'page', $page, $link );
@@ -3122,7 +3144,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3122
  global $aioseop_options;
3123
  global $aioseop_keywords;
3124
  global $post;
3125
- $opts = $this->meta_opts;
 
 
3126
  if ( ( is_front_page() && $aioseop_options['aiosp_home_keywords'] && ! $this->is_static_posts_page() ) || $this->is_static_front_page() ) {
3127
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
3128
  $keywords = $this->get_all_keywords();
@@ -3131,7 +3155,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3131
  }
3132
  } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
3133
  $keywords = stripslashes( $this->internationalize( $opts['aiosp_keywords'] ) ); // And if option = use page set keywords instead of keywords from recent posts.
3134
- } elseif ( ( $blog_page = aiosp_common::get_blog_page( $post ) ) && empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) ) {
3135
  $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, '_aioseop_keywords', true ) ) );
3136
  } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
3137
  $keywords = '';
@@ -3509,9 +3533,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3509
  $field = $p . '_title_format';
3510
  $name = $post_objs[ $p ]->labels->singular_name;
3511
  if ( ! isset( $this->default_options[ $field ] ) ) {
3512
- $this->default_options[ $field ] = array(
3513
  /* translators: The title format is the template that is used to format the title for each post of a certain post type (Posts, Pages, etc.). */
3514
- 'name' => "$name " . __( 'Title Format:', 'all-in-one-seo-pack' ) . "<br />($p)",
3515
  'type' => 'text',
3516
  'default' => '%post_title% | %site_title%',
3517
  'condshow' => array(
@@ -3636,13 +3660,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3636
  * @return mixed
3637
  */
3638
  function filter_submit( $submit ) {
3639
- $submit['Submit_Default'] = array(
3640
  'type' => 'submit',
3641
  'class' => 'aioseop_reset_settings_button button-secondary',
3642
  /* translators: This is the text of a button that allows users to reset the General Settings to their default values. */
3643
  'value' => __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3644
  );
3645
- $submit['Submit_All_Default'] = array(
3646
  'type' => 'submit',
3647
  'class' => 'aioseop_reset_settings_button button-secondary',
3648
  /* translators: This is the text of a button that allows users to reset all settings across the entire plugin to their default values. */
@@ -3666,7 +3690,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3666
  if ( AIOSEOPPRO ) {
3667
  global $aioseop_update_checker;
3668
  }
3669
- if ( $delete === true ) {
3670
 
3671
  if ( AIOSEOPPRO ) {
3672
  $license_key = '';
@@ -3687,7 +3711,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3687
 
3688
  if ( AIOSEOPPRO ) {
3689
  foreach ( $default_options as $k => $v ) {
3690
- if ( $k != 'aiosp_license_key' ) {
3691
  $this->options[ $k ] = $v;
3692
  }
3693
  }
@@ -3712,7 +3736,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3712
  * @return mixed
3713
  */
3714
  function filter_settings( $settings, $location, $current ) {
3715
- if ( $location == null ) {
3716
  $prefix = $this->prefix;
3717
 
3718
  foreach ( array( 'seopostcol', 'seocustptcol', 'debug_info', 'max_words_excerpt' ) as $opt ) {
@@ -3725,7 +3749,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3725
  $settings['aiosp_license_key']['size'] = 38;
3726
  }
3727
  }
3728
- } elseif ( $location == 'aiosp' ) {
3729
  global $post, $aioseop_sitemap;
3730
  $prefix = $this->get_prefix( $location ) . $location . '_';
3731
  if ( ! empty( $post ) ) {
@@ -3752,9 +3776,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3752
  global $post;
3753
  $info = $this->get_page_snippet_info();
3754
 
3755
- $title = $info['title'];
3756
  $description = $info['description'];
3757
- $keywords = $info['keywords'];
3758
 
3759
  $settings[ "{$prefix}title" ]['placeholder'] = $this->html_entity_decode( $title );
3760
  $settings[ "{$prefix}description" ]['placeholder'] = $this->html_entity_decode( $description );
@@ -3795,23 +3819,23 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3795
  * @return mixed
3796
  */
3797
  function filter_options( $options, $location ) {
3798
- if ( $location == 'aiosp' ) {
3799
  global $post;
3800
  if ( ! empty( $post ) ) {
3801
  $prefix = $this->prefix;
3802
  $post_type = get_post_type( $post );
3803
  foreach ( array( 'noindex', 'nofollow' ) as $no ) {
3804
  if ( empty( $this->options[ 'aiosp_cpost' . $no ] ) || ( ! in_array( $post_type, $this->options[ 'aiosp_cpost' . $no ] ) ) ) {
3805
- if ( isset( $options[ "{$prefix}{$no}" ] ) && ( $options[ "{$prefix}{$no}" ] != 'on' ) ) {
3806
  unset( $options[ "{$prefix}{$no}" ] );
3807
  }
3808
  }
3809
  }
3810
  }
3811
  }
3812
- if ( $location == null ) {
3813
  $prefix = $this->prefix;
3814
- if ( isset( $options[ "{$prefix}use_original_title" ] ) && ( $options[ "{$prefix}use_original_title" ] === '' ) ) {
3815
  $options[ "{$prefix}use_original_title" ] = 0;
3816
  }
3817
  }
@@ -3850,6 +3874,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3850
  * Checks whether All in One SEO Pack is enabled for this page.
3851
  *
3852
  * @since ?
 
3853
  *
3854
  * @return bool
3855
  */
@@ -3899,31 +3924,21 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3899
 
3900
  $this->meta_opts = $this->get_current_options( array(), 'aiosp' );
3901
 
3902
- $aiosp_disable = $aiosp_disable_analytics = false;
3903
 
3904
  if ( ! empty( $this->meta_opts ) ) {
3905
  if ( isset( $this->meta_opts['aiosp_disable'] ) ) {
3906
  $aiosp_disable = $this->meta_opts['aiosp_disable'];
3907
  }
3908
- if ( isset( $this->meta_opts['aiosp_disable_analytics'] ) ) {
3909
- $aiosp_disable_analytics = $this->meta_opts['aiosp_disable_analytics'];
3910
- }
3911
  }
3912
 
3913
  $aiosp_disable = apply_filters( 'aiosp_disable', $aiosp_disable ); // API filter to disable AIOSEOP.
3914
 
3915
  if ( $aiosp_disable ) {
3916
- if ( ! $aiosp_disable_analytics ) {
3917
- if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
3918
- remove_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
3919
- add_action( 'wp_head', array( $this, 'aiosp_google_analytics' ) );
3920
- }
3921
- }
3922
-
3923
  return false;
3924
  }
3925
 
3926
- if ( ! empty( $this->meta_opts ) && $this->meta_opts['aiosp_disable'] == true ) {
3927
  return false;
3928
  }
3929
 
@@ -4044,7 +4059,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4044
  add_action( 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array( $aioseop_update_checker, 'add_plugin_row' ) );
4045
  }
4046
  } else {
4047
- if ( $aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on' ) {
4048
  remove_action( 'wp_head', 'rel_canonical' );
4049
  }
4050
  // Analytics.
@@ -4108,7 +4123,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4108
  global $wp_query;
4109
  if ( is_attachment() ) {
4110
 
4111
- $url = $this->aiosp_mrt_get_url( $wp_query );
4112
  $unique_desc = '';
4113
  if ( $url ) {
4114
  $matches = array();
@@ -4139,7 +4154,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4139
  return;
4140
  }
4141
 
4142
- $post = $this->get_queried_object();
4143
  $description = apply_filters( 'aioseop_amp_description', $this->get_main_description( $post ) ); // Get the description.
4144
 
4145
  // To disable AMP meta description just __return_false on the aioseop_amp_description filter.
@@ -4161,7 +4176,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4161
  if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
4162
  $desc_attr = '';
4163
  }
4164
- $desc_attr = apply_filters( 'aioseop_amp_description_attributes', $desc_attr );
4165
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
4166
  }
4167
  if ( ! empty( $meta_string ) ) {
@@ -4185,6 +4200,31 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4185
  return empty( $post_type ) || in_array( get_post_type(), $aioseop_options['aiosp_cpostactive'], true );
4186
  }
4187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4188
  /**
4189
  * WP Head
4190
  *
@@ -4201,7 +4241,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4201
  }
4202
 
4203
  if ( ! $this->is_page_included() ) {
4204
-
4205
  /**
4206
  * The aioseop_robots_meta filter hook.
4207
  *
@@ -4214,9 +4253,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4214
  * @return string
4215
  */
4216
  $robots_meta = apply_filters( 'aioseop_robots_meta', $this->get_robots_meta() );
4217
-
4218
  if ( ! empty( $robots_meta ) && 'index,follow' !== $robots_meta ) {
4219
- printf( '<meta name="robots" content="%s"', esc_attr( $robots_meta ) ) . " >\n";
4220
  }
4221
 
4222
  if ( ! empty( $old_wp_query ) ) {
@@ -4225,6 +4263,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4225
  unset( $old_wp_query );
4226
  }
4227
 
 
 
 
 
 
4228
  return;
4229
  }
4230
 
@@ -4275,14 +4318,20 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4275
 
4276
  // This outputs robots meta tags and custom canonical URl on WooCommerce product archive page.
4277
  // See Github issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/755.
4278
- if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
4279
- global $posts;
4280
- $opts = $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
4281
- $posts = array();
4282
- $posts[] = $post;
 
 
 
 
 
 
4283
  }
4284
 
4285
- $posts = $save_posts;
4286
  // Handle the description format.
4287
  // We are not going to mandate that post description needs to be present because the content could be derived from a custom field too.
4288
  if ( ! ( is_front_page() && is_paged() ) ) {
@@ -4307,7 +4356,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4307
  if ( isset( $aioseop_options['aiosp_togglekeywords'] ) ) {
4308
  $togglekeywords = $aioseop_options['aiosp_togglekeywords'];
4309
  }
4310
- if ( $togglekeywords == 0 && ! ( is_front_page() && is_paged() ) ) {
4311
  $keywords = $this->get_main_keywords();
4312
  $keywords = $this->apply_cf_fields( $keywords );
4313
  $keywords = apply_filters( 'aioseop_keywords', $keywords );
@@ -4316,8 +4365,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4316
  if ( isset( $meta_string ) ) {
4317
  $meta_string .= "\n";
4318
  }
4319
- $keywords = wp_filter_nohtml_kses( str_replace( '"', '', $keywords ) );
4320
- $key_attr = apply_filters( 'aioseop_keywords_attributes', '' );
4321
  $meta_string .= sprintf( "<meta name=\"keywords\" %s content=\"%s\" />\n", $key_attr, $keywords );
4322
  }
4323
  }
@@ -4400,14 +4449,32 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4400
  if ( ! empty( $next ) ) {
4401
  $meta_string .= '<link rel="next" href="' . esc_url( $next ) . "\" />\n";
4402
  }
4403
- if ( $meta_string != null ) {
4404
  echo "$meta_string\n";
4405
  }
4406
 
4407
- // Handle Schema.
4408
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && (bool) $aioseop_options['aiosp_schema_markup'] ) {
4409
- $aioseop_schema = new AIOSEOP_Schema_Builder();
4410
- $aioseop_schema->display_json_ld_head_script();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4411
  }
4412
 
4413
  // Handle canonical links.
@@ -4582,7 +4649,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4582
  */
4583
  do_action( 'aioseop_after_apply_description_format' );
4584
 
4585
- return $description;
4586
  }
4587
 
4588
  /**
@@ -4598,22 +4665,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4598
  */
4599
  function get_robots_meta() {
4600
  global $aioseop_options;
4601
- $page_number = $this->get_page_number();
4602
- $post_type = get_post_type();
4603
- $noindex = false;
4604
- $nofollow = false;
4605
- $aiosp_noindex = '';
4606
- $aiosp_nofollow = '';
4607
- $tax_noindex = array();
4608
- $is_static_page = false;
4609
- $is_static_posts_page = false;
4610
  $is_woocommerce_shop_page = false;
4611
 
4612
  if ( isset( $aioseop_options['aiosp_tax_noindex'] ) && ! empty( $aioseop_options['aiosp_tax_noindex'] ) ) {
4613
  $tax_noindex = $aioseop_options['aiosp_tax_noindex'];
4614
  }
4615
 
4616
- if ( is_front_page() ) {
4617
  return $this->get_robots_meta_string( false, false );
4618
  }
4619
 
@@ -4627,7 +4694,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4627
  }
4628
 
4629
  if ( $is_static_posts_page || $is_woocommerce_shop_page ) {
4630
- $post_type = 'page';
4631
  $is_static_page = true;
4632
  }
4633
 
@@ -4636,18 +4703,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4636
  ! is_author() &&
4637
  ! is_search()
4638
  ) {
4639
- $aiosp_noindex = $this->get_noindex_nofollow_meta_value( 'noindex' );
4640
  $aiosp_nofollow = $this->get_noindex_nofollow_meta_value( 'nofollow' );
4641
  }
4642
 
4643
- if ( 'on' === $aiosp_noindex ||
4644
- ( is_singular() && ! empty( $aioseop_options['aiosp_paginated_noindex'] ) && $page_number > 1 )
4645
- ) {
4646
  $noindex = true;
4647
  }
4648
- if ( 'on' === $aiosp_nofollow ||
4649
- ( is_singular() && ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) && $page_number > 1 )
4650
- ) {
4651
  $nofollow = true;
4652
  }
4653
 
@@ -4712,8 +4775,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4712
  * @return string
4713
  */
4714
  private function get_noindex_nofollow_meta_value( $key ) {
4715
- $meta = array();
4716
- $meta_key = '_aioseop_' . $key;
4717
  $meta_value = '';
4718
 
4719
  $queried_object = get_queried_object();
@@ -4780,11 +4843,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4780
  */
4781
  private function check_singular() {
4782
  global $wp_query, $post;
4783
- $is_singular = false;
4784
  if ( is_singular() ) {
4785
  // #1297 - support for bbpress 'reply' post type.
4786
  if ( $post && 'reply' === $post->post_type ) {
4787
- $is_singular = true;
4788
  }
4789
  }
4790
  return $is_singular;
@@ -4819,7 +4882,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4819
  * @return array
4820
  */
4821
  function get_prev_next_links( $post = null ) {
4822
- $prev = $next = '';
 
4823
  $page = $this->get_page_number();
4824
  if ( is_home() || is_archive() || is_paged() ) {
4825
  global $wp_query;
@@ -4953,7 +5017,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4953
  * @return bool
4954
  */
4955
  function save_post_data( $id ) {
4956
- $awmp_edit = $nonce = null;
 
4957
  if ( empty( $_POST ) ) {
4958
  return false;
4959
  }
@@ -5071,7 +5136,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5071
  $title = $t['title'];
5072
  }
5073
  $header .= '<li><label class="aioseop_header_nav"><a class="aioseop_header_tab' . $active . '" href="#' . $t['id'] . '">' . $title . '</a></label></li>';
5074
- $active = '';
5075
  }
5076
  $header .= '</ul>';
5077
 
@@ -5229,7 +5294,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5229
  * @param $id
5230
  */
5231
  function save_category_metaboxes( $id ) {
5232
- $awmp_edit = $nonce = null;
 
5233
  if ( isset( $_POST['aiosp_edit'] ) ) {
5234
  $awmp_edit = $_POST['aiosp_edit'];
5235
  }
@@ -5327,7 +5393,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5327
  }
5328
  */
5329
 
5330
- if ( isset( $_POST ) && isset( $_POST['module'] ) && isset( $_POST['nonce-aioseop'] ) && ( $_POST['module'] == 'All_in_One_SEO_Pack' ) && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) {
5331
  if ( isset( $_POST['Submit'] ) && AIOSEOPPRO ) {
5332
  if ( isset( $_POST['aiosp_custom_menu_order'] ) ) {
5333
  $custom_menu_order = $_POST['aiosp_custom_menu_order'];
@@ -5351,7 +5417,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5351
  if ( ! AIOSEOPPRO ) {
5352
  if ( ! empty( $this->pointers ) ) {
5353
  foreach ( $this->pointers as $k => $p ) {
5354
- if ( ! empty( $p['pointer_scope'] ) && ( $p['pointer_scope'] == 'global' ) ) {
5355
  unset( $this->pointers[ $k ] );
5356
  }
5357
  }
@@ -5498,7 +5564,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5498
  if ( $item != $file ) {
5499
  $order[] = $item;
5500
  }
5501
- if ( $index == 0 ) {
5502
  $order[] = $file;
5503
  }
5504
  }
@@ -5698,7 +5764,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5698
  */
5699
  function check_recently_activated_modules() {
5700
  global $aioseop_options;
5701
- $options = get_option( 'aioseop_options' );
5702
  $modules_before = array();
5703
  $modules_now = array();
5704
  if ( array_key_exists( 'modules', $aioseop_options ) && array_key_exists( 'aiosp_feature_manager_options', $aioseop_options['modules'] ) ) {
@@ -5717,10 +5783,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
5717
  }
5718
 
5719
  $action = 'deactivate';
5720
- $diff = array_diff( $modules_before, $modules_now );
5721
  if ( count( $modules_now ) > count( $modules_before ) ) {
5722
  $action = 'activate';
5723
- $diff = array_diff( $modules_now, $modules_before );
5724
  }
5725
 
5726
  if ( $diff ) {
217
  $this->do_log = false;
218
  }
219
  /* translators: This is a header for the General Settings menu. %s is a placeholder and is replaced with the name of the plugin. */
220
+ $this->name = sprintf( __( '%s Plugin Options', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME );
221
  /* translators: This is the main menu of the plugin. */
222
  $this->menu_name = __( 'General Settings', 'all-in-one-seo-pack' );
223
 
231
  $this->default_options = array(
232
  'license_key' => array(
233
  /* translators: This is a setting where users can enter their license code for All in One SEO Pack Pro. */
234
+ 'name' => __( 'License Key', 'all-in-one-seo-pack' ),
235
  'type' => 'text',
236
  ),
237
  'home_title' => array(
238
  /* translators: This is a setting where users can enter the title for their homepage. */
239
+ 'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
240
  'default' => null,
241
  'type' => 'text',
242
  'sanitize' => 'text',
247
  ),
248
  'home_description' => array(
249
  /* translators: This is a setting where users can enter the description for their homepage. */
250
+ 'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
251
  'default' => '',
252
  'type' => 'textarea',
253
  'sanitize' => 'text',
258
  ),
259
  'togglekeywords' => array(
260
  /* translators: This is a setting where users can enable the use of meta keywords for their website. */
261
+ 'name' => __( 'Use Keywords', 'all-in-one-seo-pack' ),
262
  'default' => 1,
263
  'type' => 'radio',
264
  'initial_options' => array(
270
  ),
271
  'home_keywords' => array(
272
  /* translators: This is a setting where users can enter meta keywords for their homepage. */
273
+ 'name' => __( 'Home Keywords (comma separated)', 'all-in-one-seo-pack' ),
274
  'default' => null,
275
  'type' => 'textarea',
276
  'sanitize' => 'text',
291
  ),
292
  'can' => array(
293
  /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. */
294
+ 'name' => __( 'Canonical URLs', 'all-in-one-seo-pack' ),
295
  'default' => 1,
296
  ),
297
  'no_paged_canonical_links' => array(
298
  /* translators: This is the name of a setting. Canonical URLs help users prevent duplicate content issues - https://en.wikipedia.org/wiki/Canonical_link_element. Leave "Canonical" in English if there is no such term in your language. Enabling this setting means the plugin will use the URL of the first page as the canonical URL for all subsequent paginated pages. */
299
+ 'name' => __( 'No Pagination for Canonical URLs', 'all-in-one-seo-pack' ),
300
  'default' => 0,
301
  'condshow' => array( 'aiosp_can' => 'on' ),
302
  ),
303
  'force_rewrites' => array(
304
  /* translators: This is the name of a setting. Enabling this option forces the plugin to use output buffering to ensure that the title tag will be rewritten. */
305
+ 'name' => __( 'Force Rewrites', 'all-in-one-seo-pack' ),
306
  'default' => 1,
307
  'type' => 'hidden',
308
  'prefix' => $this->prefix,
313
  ),
314
  'use_original_title' => array(
315
  /* translators: This is the name of a setting. Enabling this option forces the plugin to use the wp_title() function to fetch the title tag. */
316
+ 'name' => __( 'Use Original Title', 'all-in-one-seo-pack' ),
317
  'type' => 'radio',
318
  'default' => 0,
319
  'initial_options' => array(
323
  ),
324
  'home_page_title_format' => array(
325
  /* translators: This is a setting where users can enter the title format for the homepage. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
326
+ 'name' => __( 'Home Page Title Format', 'all-in-one-seo-pack' ),
327
  'type' => 'text',
328
  'default' => '%page_title%',
329
  ),
330
  'page_title_format' => array(
331
 
332
  /* translators: This is a setting where users can enter the title format for Pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
333
+ 'name' => __( 'Page Title Format', 'all-in-one-seo-pack' ),
334
  'type' => 'text',
335
  'default' => '%page_title% | %site_title%',
336
  ),
337
  'post_title_format' => array(
338
  /* translators: This is a setting where users can enter the title format for Posts. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
339
+ 'name' => __( 'Post Title Format', 'all-in-one-seo-pack' ),
340
  'type' => 'text',
341
  'default' => '%post_title% | %site_title%',
342
  ),
343
  'category_title_format' => array(
344
  /* translators: This is a setting where users can enter the title format for categories. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
345
+ 'name' => __( 'Category Title Format', 'all-in-one-seo-pack' ),
346
  'type' => 'text',
347
  'default' => '%category_title% | %site_title%',
348
  ),
349
  'archive_title_format' => array(
350
  /* translators: This is a setting where users can enter the title format for archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
351
+ 'name' => __( 'Archive Title Format', 'all-in-one-seo-pack' ),
352
  'type' => 'text',
353
  'default' => '%archive_title% | %site_title%',
354
  ),
355
  'date_title_format' => array(
356
  /* translators: This is a setting where users can enter the title format for date archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
357
+ 'name' => __( 'Date Archive Title Format', 'all-in-one-seo-pack' ),
358
  'type' => 'text',
359
  'default' => '%date% | %site_title%',
360
  ),
361
  'author_title_format' => array(
362
  /* translators: This is a setting where users can enter the title format for author archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
363
+ 'name' => __( 'Author Archive Title Format', 'all-in-one-seo-pack' ),
364
  'type' => 'text',
365
  'default' => '%author% | %site_title%',
366
  ),
367
  'tag_title_format' => array(
368
  /* translators: This is a setting where users can enter the title format for tag archive pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
369
+ 'name' => __( 'Tag Title Format', 'all-in-one-seo-pack' ),
370
  'type' => 'text',
371
  'default' => '%tag% | %site_title%',
372
  ),
373
  'search_title_format' => array(
374
  /* translators: This is a setting where users can enter the title format for the search page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
375
+ 'name' => __( 'Search Title Format', 'all-in-one-seo-pack' ),
376
  'type' => 'text',
377
  'default' => '%search% | %site_title%',
378
  ),
384
  ),
385
  '404_title_format' => array(
386
  /* translators: This is a setting where users can enter the title format for the 404 page. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
387
+ 'name' => __( '404 Title Format', 'all-in-one-seo-pack' ),
388
  'type' => 'text',
389
  'default' => __( 'Nothing found for %request_words%', 'all-in-one-seo-pack' ),
390
  ),
391
  'paged_format' => array(
392
  /* translators: This is a setting where users can enter the title format for paginated pages. The title format is the format All in One SEO Pack uses to rewrite the title tag. */
393
+ 'name' => __( 'Paged Format', 'all-in-one-seo-pack' ),
394
  'type' => 'text',
395
  'default' => sprintf( ' - %s %%page%%', __( 'Part', 'all-in-one-seo-pack' ) ),
396
  ),
397
  'cpostactive' => array(
398
  /* translators: This is a setting where users can indicate which post types they want to use All in One SEO Pack with. */
399
+ 'name' => __( 'SEO on only these Content Types', 'all-in-one-seo-pack' ),
400
  'type' => 'multicheckbox',
401
  'default' => array( 'post', 'page' ),
402
  ),
403
  'taxactive' => array(
404
  /* translators: This is a setting where users can indicate which taxonomies they want to use All in One SEO Pack with. */
405
+ 'name' => __( 'SEO on only these taxonomies', 'all-in-one-seo-pack' ),
406
  'type' => 'multicheckbox',
407
  'default' => array( 'category', 'post_tag' ),
408
  ),
409
  'cpostnoindex' => array(
410
  /* translators: This is a setting where users can indicate which post types they want to NOINDEX by default. NOINDEX is a value of the HTML robots meta tag that asks search engines not to index the page. */
411
+ 'name' => __( 'Default to NOINDEX', 'all-in-one-seo-pack' ),
412
  'type' => 'multicheckbox',
413
  'default' => array(),
414
  ),
415
  'cpostnofollow' => array(
416
  /* translators: This is a setting where users can indicate which post types they want to NOFOLLOW by default. NOFOLLOW is a value of the HTML robots meta tag that asks search engines not to follow any links on the page. */
417
+ 'name' => __( 'Default to NOFOLLOW', 'all-in-one-seo-pack' ),
418
  'type' => 'multicheckbox',
419
  'default' => array(),
420
  ),
421
  'posttypecolumns' => array(
422
  /* translators: This is a setting where users can indicate for which post types they want to enable columns. Columns are added to the All Posts, All Pages, etc. list pages and allow users to quick-edit their title and description - https://semperplugins.com/documentation/display-settings/#show-column-labels-for-custom-post-types. */
423
+ 'name' => __( 'Show Column Labels for Custom Post Types', 'all-in-one-seo-pack' ),
424
  'type' => 'multicheckbox',
425
  'default' => array( 'post', 'page' ),
426
  ),
427
  'google_verify' => array(
428
+ 'name' => 'Google Search Console',
429
  'default' => '',
430
  'type' => 'text',
431
  ),
432
  'bing_verify' => array(
433
+ 'name' => 'Bing Webmaster Tools',
434
  'default' => '',
435
  'type' => 'text',
436
  ),
437
  'pinterest_verify' => array(
438
  /* translators: This is a setting where users can add their Pinterest website verification code. */
439
+ 'name' => __( 'Pinterest Site Verification', 'all-in-one-seo-pack' ),
440
  'default' => '',
441
  'type' => 'text',
442
  ),
443
  'yandex_verify' => array(
444
+ 'name' => 'Yandex Webmaster Tools',
445
  'default' => '',
446
  'type' => 'text',
447
  ),
448
  'baidu_verify' => array(
449
+ 'name' => 'Baidu Webmaster Tools',
450
  'default' => '',
451
  'type' => 'text',
452
  ),
453
  'google_analytics_id' => array(
454
  /* translators: This is a setting where users can add their Google Analytics verification code. Leave this in English if there is no translation for "Google Analytics". */
455
+ 'name' => __( 'Google Analytics ID', 'all-in-one-seo-pack' ),
456
  'default' => null,
457
  'type' => 'text',
458
  'placeholder' => 'UA-########-#',
459
  ),
460
  'ga_advanced_options' => array(
461
  /* translators: This is a setting users can enable to display more advanced options for Google Analytics. */
462
+ 'name' => __( 'Advanced Analytics Options', 'all-in-one-seo-pack' ),
463
  'default' => 'on',
464
  'type' => 'radio',
465
  'initial_options' => array(
476
  ),
477
  'ga_domain' => array(
478
  /* translators: This is a setting which allows users to set the cookie domain for their Google Analytics tracking code. */
479
+ 'name' => __( 'Tracking Domain', 'all-in-one-seo-pack' ),
480
  'type' => 'text',
481
  'condshow' => array(
482
  'aiosp_google_analytics_id' => array(
489
  ),
490
  'ga_multi_domain' => array(
491
  /* translators: This is a setting which allows users to enable Google Analytics tracking for multiple domain names. */
492
+ 'name' => __( 'Track Multiple Domains', 'all-in-one-seo-pack' ),
493
  'default' => 0,
494
  'condshow' => array(
495
  'aiosp_google_analytics_id' => array(
502
  ),
503
  'ga_addl_domains' => array(
504
  /* translators: This is a setting which allows users to enter additional domain names used for Google Analytics cross-domain tracking - https://support.google.com/analytics/answer/1034342?hl=en.*/
505
+ 'name' => __( 'Additional Domains', 'all-in-one-seo-pack' ),
506
  'type' => 'textarea',
507
  'condshow' => array(
508
  'aiosp_google_analytics_id' => array(
516
  ),
517
  'ga_anonymize_ip' => array(
518
  /* translators: This is a setting which tells Google Analytics not to track and store the IP addresses of website visitors. This is required to be compliant with the GDPR for example. */
519
+ 'name' => __( 'Anonymize IP Addresses', 'all-in-one-seo-pack' ),
520
  'type' => 'checkbox',
521
  'condshow' => array(
522
  'aiosp_google_analytics_id' => array(
529
  ),
530
  'ga_display_advertising' => array(
531
  /* translators: This is a setting that enables a collection of Google Analytics features so you can, for example, create segments based on demographic and interest data. */
532
+ 'name' => __( 'Display Advertiser Tracking', 'all-in-one-seo-pack' ),
533
  'type' => 'checkbox',
534
  'condshow' => array(
535
  'aiosp_google_analytics_id' => array(
542
  ),
543
  'ga_exclude_users' => array(
544
  /* translators: This is a setting that allows you to exclude certain WordPress user roles, e.g. Administrators, from Google Analytics tracking. */
545
+ 'name' => __( 'Exclude Users From Tracking', 'all-in-one-seo-pack' ),
546
  'type' => 'multicheckbox',
547
  'condshow' => array(
548
  'aiosp_google_analytics_id' => array(
555
  ),
556
  'ga_track_outbound_links' => array(
557
  /* translators: This is a setting that enables tracking of outbound/external links by Google Analytics. */
558
+ 'name' => __( 'Track Outbound Links', 'all-in-one-seo-pack' ),
559
  'default' => 0,
560
  'condshow' => array(
561
  'aiosp_google_analytics_id' => array(
568
  ),
569
  'ga_link_attribution' => array(
570
  /* translators: This is a setting for Google Analytics that allows you to tag your pages to implement enhanced link-tracking. */
571
+ 'name' => __( 'Enhanced Link Attribution', 'all-in-one-seo-pack' ),
572
  'default' => 0,
573
  'condshow' => array(
574
  'aiosp_google_analytics_id' => array(
581
  ),
582
  'ga_enhanced_ecommerce' => array(
583
  /* translators: This is a setting which tells Google Analytics to track your customers' path to purchase on your e-commerce website. */
584
+ 'name' => __( 'Enhanced Ecommerce', 'all-in-one-seo-pack' ),
585
  'default' => 0,
586
  'condshow' => array(
587
  'aiosp_google_analytics_id' => array(
596
  /* translators: This is a setting that outputs basic Schema.org markup, also known as structured data, into the source code of each page. */
597
  'name' => __( 'Use Schema.org Markup', 'all-in-one-seo-pack' ),
598
  'type' => 'radio',
599
+ 'default' => 1,
600
  'initial_options' => array(
601
  1 => __( 'Enabled', 'all-in-one-seo-pack' ),
602
  0 => __( 'Disabled', 'all-in-one-seo-pack' ),
605
  // TODO Change `schema_search_results_page` to `schema_add_search_results_page`. Requires modifying double arrow alignment.
606
  'schema_search_results_page' => array(
607
  /* translators: This is a setting users can enable to add the basic markup code to their source code that is needed for Google to generate a Sitelinks Search Box - https://developers.google.com/search/docs/data-types/sitelinks-searchbox.*/
608
+ 'name' => __( 'Display Sitelinks Search Box', 'all-in-one-seo-pack' ),
609
  'condshow' => array(
610
  'aiosp_schema_markup' => 1,
611
  ),
612
  ),
613
  'schema_social_profile_links' => array(
614
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
615
  'type' => 'textarea',
616
  'cols' => 60,
617
  'rows' => 5,
620
  ),
621
  ),
622
  'schema_site_represents' => array(
623
+ 'name' => __( 'Person or Organization', 'all-in-one-seo-pack' ),
624
  'type' => 'radio',
625
  'default' => 'organization',
626
  'initial_options' => array(
632
  ),
633
  ),
634
  'schema_organization_name' => array(
635
+ 'name' => __( 'Organization Name', 'all-in-one-seo-pack' ),
636
  'type' => 'text',
637
  'default' => '',
638
  'condshow' => array(
641
  ),
642
  ),
643
  'schema_organization_logo' => array(
644
+ 'name' => __( 'Organization Logo', 'all-in-one-seo-pack' ),
645
  'type' => 'image',
646
  'condshow' => array(
647
  'aiosp_schema_markup' => 1,
650
  ),
651
 
652
  'schema_person_user' => array(
653
+ 'name' => __( 'Person\'s Username', 'all-in-one-seo-pack' ),
654
  'type' => 'select',
655
  'default' => 1,
656
  'condshow' => array(
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',
666
  'condshow' => array(
669
  ),
670
  ),
671
  'schema_contact_type' => array(
672
+ 'name' => __( 'Type of Contact', 'all-in-one-seo-pack' ),
673
  'type' => 'select',
674
  'condshow' => array(
675
  'aiosp_schema_markup' => 1,
692
  ),
693
  'use_categories' => array(
694
  /* translators: This is the name of a setting. By enabling it, the plugin will use the categories of the relevant post as meta keywords in addition to any user-specified keywords. */
695
+ 'name' => __( 'Use Categories for META keywords', 'all-in-one-seo-pack' ),
696
  'default' => 0,
697
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
698
  ),
699
  'use_tags_as_keywords' => array(
700
  /* translators: This is the name of a setting. By enabling it, the plugin will use the tags of the relevant post as meta keywords in addition to any user-specified keywords. */
701
+ 'name' => __( 'Use Tags for META keywords', 'all-in-one-seo-pack' ),
702
  'default' => 1,
703
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
704
  ),
705
  'dynamic_postspage_keywords' => array(
706
  /* translators: This a setting that allows you to dynamically output meta keywords on archive pages based on the keywords from the posts that are displayed by the archive page. */
707
+ 'name' => __( 'Dynamically Generate Keywords for Posts Page/Archives', 'all-in-one-seo-pack' ),
708
  'default' => 1,
709
  'condshow' => array( 'aiosp_togglekeywords' => 0 ),
710
  ),
711
  'category_noindex' => array(
712
  /* translators: This is a global setting that allows you to NOINDEX all your categories. */
713
+ 'name' => __( 'Use noindex for Categories', 'all-in-one-seo-pack' ),
714
  'default' => 1,
715
  ),
716
  'archive_date_noindex' => array(
717
  /* translators: This is a global setting that allows you to NOINDEX all your date archive pages. */
718
+ 'name' => __( 'Use noindex for Date Archives', 'all-in-one-seo-pack' ),
719
  'default' => 1,
720
  ),
721
  'archive_author_noindex' => array(
722
  /* translators: This is a global setting that allows you to NOINDEX all your author archive pages. */
723
+ 'name' => __( 'Use noindex for Author Archives', 'all-in-one-seo-pack' ),
724
  'default' => 1,
725
  ),
726
  'tags_noindex' => array(
727
  /* translators: This is a global setting that allows you to NOINDEX all your tag archive pages. */
728
+ 'name' => __( 'Use noindex for Tag Archives', 'all-in-one-seo-pack' ),
729
  'default' => 0,
730
  ),
731
  'search_noindex' => array(
732
  /* translators: This is a setting that allows you to NOINDEX your search results page. */
733
+ 'name' => __( 'Use noindex for the Search page', 'all-in-one-seo-pack' ),
734
  'default' => 0,
735
  ),
736
  '404_noindex' => array(
737
  /* translators: This is a setting that allows you to NOINDEX your 404 Not Found page. */
738
+ 'name' => __( 'Use noindex for the 404 page', 'all-in-one-seo-pack' ),
739
  'default' => 0,
740
  ),
741
  'tax_noindex' => array(
742
  /* translators: This is a global setting that allows you to NOINDEX specific taxonomies. */
743
+ 'name' => __( 'Use noindex for Taxonomy Archives', 'all-in-one-seo-pack' ),
744
  'type' => 'multicheckbox',
745
  'default' => array(),
746
  ),
747
  'paginated_noindex' => array(
748
  /* translators: This is a global setting that allows you to NOINDEX all your paginated content (page 2 and higher). */
749
+ 'name' => __( 'Use noindex for paginated pages/posts', 'all-in-one-seo-pack' ),
750
  'default' => 0,
751
  ),
752
  'paginated_nofollow' => array(
753
  /* translators: This is a global setting that allows you to NOFOLLOW all your paginated content. */
754
+ 'name' => __( 'Use nofollow for paginated pages/posts', 'all-in-one-seo-pack' ),
755
  'default' => 0,
756
  ),
757
  'generate_descriptions' => array(
758
  /* translators: This is a setting that allows the plugin to automatically populate the meta description tag based on the excerpt or content of the post/page.*/
759
+ 'name' => __( 'Autogenerate Descriptions', 'all-in-one-seo-pack' ),
760
  'default' => 0,
761
  ),
762
  'skip_excerpt' => array(
763
  /* translators: This is the name of a setting. By enabling it, the plugin will use the content of the post/page to automatically populate the meta description tag, instead of the excerpt. */
764
+ 'name' => __( 'Use Content For Autogenerated Descriptions', 'all-in-one-seo-pack' ),
765
  'default' => 0,
766
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
767
  ),
768
  'run_shortcodes' => array(
769
  /* translators: This is a setting that enables the plugin to execute shortcodes in the autogenerated descriptions. Shortcodes allow people to execute code inside WordPress posts, pages, and widgets without writing any code directly. */
770
+ 'name' => __( 'Run Shortcodes In Autogenerated Descriptions', 'all-in-one-seo-pack' ),
771
  'default' => 0,
772
  'condshow' => array( 'aiosp_generate_descriptions' => 'on' ),
773
  ),
774
  'hide_paginated_descriptions' => array(
775
  /* translators: This is a setting that, if enabled, removes the meta description for paginated content (page 2 and higher). */
776
+ 'name' => __( 'Remove Descriptions For Paginated Pages', 'all-in-one-seo-pack' ),
777
  'default' => 0,
778
  ),
779
  'dont_truncate_descriptions' => array(
780
  /* translators: This is a setting that makes sure the plugin does not truncate the meta description tag if it is longer than what All in One SEO Pack recommends. */
781
+ 'name' => __( 'Never Shorten Long Descriptions', 'all-in-one-seo-pack' ),
782
  'default' => 0,
783
  ),
784
  'unprotect_meta' => array(
785
  /* translators: This is a setting that allows users to unprotect internal postmeta fields for use with XML-RPC. */
786
+ 'name' => __( 'Unprotect Post Meta Fields', 'all-in-one-seo-pack' ),
787
  'default' => 0,
788
  ),
789
  'redirect_attachement_parent' => array(
790
  /* translators: This is the name of a setting. By enabling it, the plugin will redirect attachment page requests to the post parent, or in other words, the post/page where the media is embedded. */
791
+ 'name' => __( 'Redirect Attachments to Post Parent', 'all-in-one-seo-pack' ),
792
  'default' => 0,
793
  ),
794
  'ex_pages' => array(
795
  /* translators: This is a textarea setting where users can enter a list of pages that All in One SEO Pack should not affect. */
796
+ 'name' => __( 'Exclude Pages', 'all-in-one-seo-pack' ),
797
  'type' => 'textarea',
798
  'default' => '',
799
  ),
800
  'post_meta_tags' => array(
801
  /* translators: This is a setting that allows users to ouput additional code, such as references to stylesheets or JavaScript libraries, into the HEAD section of each post. */
802
+ 'name' => __( 'Additional Post Headers', 'all-in-one-seo-pack' ),
803
  'type' => 'textarea',
804
  'default' => '',
805
  'sanitize' => 'default',
806
  ),
807
  'page_meta_tags' => array(
808
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of each page. */
809
+ 'name' => __( 'Additional Page Headers', 'all-in-one-seo-pack' ),
810
  'type' => 'textarea',
811
  'default' => '',
812
  'sanitize' => 'default',
813
  ),
814
  'front_meta_tags' => array(
815
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the frontpage/homepage. */
816
+ 'name' => __( 'Additional Front Page Headers', 'all-in-one-seo-pack' ),
817
  'type' => 'textarea',
818
  'default' => '',
819
  'sanitize' => 'default',
820
  ),
821
  'home_meta_tags' => array(
822
  /* translators: This is a setting that allows users to ouput additional HTML tags, such as references to stylesheets or JavaScript libraries, into the HEAD section of the static Posts page (see Settings > Reading). */
823
+ 'name' => __( 'Additional Posts Page Headers', 'all-in-one-seo-pack' ),
824
  'type' => 'textarea',
825
  'default' => '',
826
  'sanitize' => 'default',
827
  ),
828
  'do_log' => array(
829
  /* translators: This is a setting that enables All in One SEO Pack to log important events to help with debugging. */
830
+ 'name' => __( 'Log important events', 'all-in-one-seo-pack' ),
831
  'default' => null,
832
  ),
833
 
1004
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify', 'yandex_verify', 'baidu_verify' ),
1005
  ),
1006
  'google' => array(
1007
+ 'name' => __( 'Google Analytics', 'all-in-one-seo-pack' ),
1008
  'help_link' => 'https://semperplugins.com/documentation/advanced-google-analytics-settings/',
1009
  'options' => array(
1010
  'google_analytics_id',
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 ) {
1154
  $args['options']['nowrap'] = false;
1155
  $args['options']['save'] = false;
1156
  $info = $this->get_page_snippet_info();
1157
+ $title = $info['title'];
1158
+ $description = $info['description'];
1159
+ $keywords = $info['keywords'];
1160
+ $url = $info['url'];
1161
+ $title_format = $info['title_format'];
1162
+ $category = $info['category'];
1163
+ $w = $info['w'];
1164
+ $p = $info['p'];
1165
 
1166
  if ( $this->strlen( $title ) > 70 ) {
1167
  $title = $this->trim_excerpt_without_filters(
1182
  $title = $title_format;
1183
  }
1184
 
1185
+ $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
1186
+ $buf = $this->get_option_row( $args['name'], $args['options'], $args );
1187
 
1188
  return $buf;
1189
  }
1230
  if ( false !== strpos( $title_format, '%blog_title%', 0 ) ) {
1231
  $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
1232
  }
1233
+ $title_format = $this->apply_cf_fields( $title_format );
1234
  if ( false !== strpos( $title_format, '%post_title%', 0 ) ) {
1235
  $title_format = str_replace( '%post_title%', $this->get_preview_snippet_title_helper( $title ), $title_format );
1236
  }
1362
  return $info;
1363
  }
1364
  global $post, $aioseop_options, $wp_query;
1365
+ $title = '';
1366
+ $url = '';
1367
+ $description = '';
1368
+ $term = '';
1369
+ $category = '';
1370
+ $p = $post;
1371
+ $w = $wp_query;
1372
  if ( ! is_object( $post ) ) {
1373
  $post = $this->get_queried_object();
1374
  }
1400
  $this->is_front_page = false;
1401
  }
1402
  if ( 'page' === get_option( 'show_on_front' ) ) {
1403
+ if ( is_page() && get_option( 'page_on_front' ) == $post->ID ) {
1404
  $this->is_front_page = true;
1405
+ } elseif ( get_option( 'page_for_posts' ) == $post->ID ) {
1406
  $wp_query->is_home = true;
1407
  }
1408
  }
1464
  }
1465
  $description = $this->internationalize( $description );
1466
  }
1467
+ if ( true == $this->is_front_page ) {
1468
  // $title_format = $aioseop_options['aiosp_home_page_title_format'];
1469
  $title_format = ''; // Not sure why this needs to be this way, but we should extract all this out to figure out what's going on.
1470
  }
1689
  if ( is_front_page() ) {
1690
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1691
  global $post;
1692
+ if ( 'page' == get_option( 'show_on_front' ) && is_page() && get_option( 'page_on_front' ) == $post->ID ) {
1693
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1694
  if ( ! $title ) {
1695
  $title = $this->internationalize( $post->post_title );
1716
  // #1616 - Avoid trying to get property of non-object when no posts are present on the homepage.
1717
  global $post;
1718
 
1719
+ if ( null === $post ) {
1720
  $post_id = get_option( 'page_on_front' );
1721
  } else {
1722
  $post_id = $post->ID;
1723
  }
1724
 
1725
+ if ( is_post_type_archive() && is_post_type_archive( 'product' ) && function_exists( 'wc_get_page_id' ) ) {
1726
+ $post_id = wc_get_page_id( 'shop' );
1727
+ if ( $post_id ) {
1728
+ $post = get_post( $post_id );
1729
+ if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
1730
+ $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1731
+ }
1732
+ // $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1733
+ if ( ! $title ) {
1734
+ $title = $this->internationalize( get_post_meta( $post_id, '_aioseop_title', true ) );
1735
+ } // This is/was causing the first product to come through.
1736
+ if ( ! $title ) {
1737
+ $title = $this->internationalize( $post->post_title );
1738
+ }
1739
+ if ( ! $title ) {
1740
+ $title = $this->internationalize( $this->get_original_title( '', false ) );
1741
+ }
 
 
1742
 
1743
+ $title = $this->apply_page_title_format( $title, $post );
1744
+ $title = $this->paged_title( $title );
1745
+ $title = apply_filters( 'aioseop_title_page', $title );
1746
 
1747
+ return $title;
1748
+ }
1749
  }
1750
 
1751
  // this is returned for woo.
1771
  if ( null === $post ) {
1772
  return false;
1773
  }
1774
+
1775
+ $home_title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1776
+ if ( $this->is_static_front_page() && ( $home_title ) ) {
1777
  if ( ! empty( $aioseop_options['aiosp_home_page_title_format'] ) ) {
1778
  $home_title = $this->apply_page_title_format( $home_title, $post, $aioseop_options['aiosp_home_page_title_format'] );
1779
  }
1810
 
1811
  return $title;
1812
  }
1813
+ } elseif ( is_post_type_archive( 'product' ) && function_exists( 'wc_get_page_id' ) ) {
1814
+ $post_id = wc_get_page_id( 'shop' );
1815
+ if ( $post_id ) {
1816
+ $post = get_post( $post_id );
1817
+ // Too far down? -mrt.
1818
+ $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1819
+ if ( ! $title ) {
1820
+ $title = $this->internationalize( $post->post_title );
1821
+ }
1822
+ if ( ! $title ) {
1823
+ $title = $this->internationalize( $this->get_original_title( '', false ) );
1824
+ }
1825
+ $title = $this->apply_page_title_format( $title, $post );
1826
+ $title = $this->paged_title( $title );
1827
+ $title = apply_filters( 'aioseop_title_page', $title );
1828
 
1829
+ return $title;
1830
+ }
1831
  } elseif ( is_single() || $this->check_singular() ) {
1832
  // We're not in the loop :(.
1833
  if ( null === $post ) {
1855
 
1856
  return apply_filters( 'aioseop_title_single', $title );
1857
  } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
1858
+ $search = esc_attr( stripslashes( $s ) );
1859
  $title_format = $aioseop_options['aiosp_search_title_format'];
1860
  $title = str_replace( '%site_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1861
  if ( false !== strpos( $title, '%blog_title%', 0 ) ) {
1875
  return $title;
1876
  } elseif ( is_tag() ) {
1877
  global $utw;
1878
+ $tag = '';
1879
+ $tag_description = '';
1880
  if ( $utw ) {
1881
  $tags = $utw->GetCurrentTagSet();
1882
  $tag = $tags[0]->tag;
2061
  if ( false !== $has_filter ) {
2062
  add_filter( 'wp_title', array( $this, 'wp_title' ), $has_filter );
2063
  }
2064
+ $title = trim( $title );
2065
+ if ( $title ) {
2066
  return trim( $title );
2067
  }
2068
  }
2078
  $title = $this->internationalize( single_post_title( '', false ) );
2079
  } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
2080
  $search = esc_attr( stripslashes( $s ) );
2081
+ $title = $search;
2082
  } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
2083
  $category_name = $this->ucwords( $this->internationalize( single_cat_title( '', false ) ) );
2084
  $title = $category_name;
2099
  }
2100
  } elseif ( is_author() ) {
2101
  $author = get_userdata( get_query_var( 'author' ) );
2102
+ if ( false === $author ) {
2103
  global $wp_query;
2104
  $author = $wp_query->get_queried_object();
2105
  }
2106
+ if ( false !== $author ) {
2107
  $title = $author->display_name;
2108
  }
2109
  } elseif ( is_day() ) {
2175
  */
2176
  function apply_page_title_format( $title, $p = null, $title_format = '' ) {
2177
  global $aioseop_options;
2178
+ if ( null === $p ) {
2179
  global $post;
2180
  } else {
2181
  $post = $p;
2228
  if ( false !== strpos( $new_title, "%{$type}_title%", 0 ) ) {
2229
  $new_title = str_replace( "%{$type}_title%", $title, $new_title );
2230
  }
2231
+ if ( 'post' == $type ) {
2232
  if ( false !== strpos( $new_title, '%category%', 0 ) ) {
2233
  $new_title = str_replace( '%category%', $category, $new_title );
2234
  }
2386
  * @return string
2387
  */
2388
  function apply_post_title_format( $title, $category = '', $p = null ) {
2389
+ if ( null === $p ) {
2390
  global $post;
2391
  } else {
2392
  $post = $p;
2407
  */
2408
  function get_post_title_format( $title_type = 'post', $p = null ) {
2409
  global $aioseop_options;
2410
+ if ( ( 'post' != $title_type ) && ( 'archive' != $title_type ) ) {
2411
  return false;
2412
  }
2413
  $title_format = "%{$title_type}_title% | %site_title%";
2417
 
2418
  if ( ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
2419
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
2420
+
2421
+ $is_post_type_archive = ( 'archive' == $title_type ) && is_post_type_archive( $wp_post_types );
2422
+ $is_singular_post = ( 'post' == $title_type ) && $this->is_singular( $wp_post_types, $p );
2423
+
2424
+ if ( $is_post_type_archive || $is_singular_post ) {
2425
+ if ( $is_post_type_archive ) {
2426
+ $prefix = "aiosp_{$title_type}_";
2427
+ } else {
2428
+ $prefix = 'aiosp_';
2429
+ }
2430
+
 
2431
  $post_type = get_post_type( $p );
2432
 
2433
  if ( ! empty( $aioseop_options[ "{$prefix}{$post_type}_title_format" ] ) ) {
2465
  */
2466
  function is_static_posts_page() {
2467
  static $is_posts_page = null;
2468
+ if ( null !== $is_posts_page ) {
2469
  return $is_posts_page;
2470
  }
2471
  $post = $this->get_queried_object();
2472
+ $is_posts_page = ( 'page' == get_option( 'show_on_front' ) && is_home() && ! empty( $post ) && get_option( 'page_for_posts' ) == $post->ID );
2473
 
2474
  return $is_posts_page;
2475
  }
2482
  * @return bool|null
2483
  */
2484
  function is_static_front_page() {
2485
+ if ( isset( $this->is_front_page ) && null !== $this->is_front_page ) {
2486
  return $this->is_front_page;
2487
  }
2488
  $post = $this->get_queried_object();
2489
+ $this->is_front_page = ( 'page' == get_option( 'show_on_front' ) && is_page() && ! empty( $post ) && get_option( 'page_on_front' ) == $post->ID );
2490
 
2491
  return $this->is_front_page;
2492
  }
2756
  $description = '';
2757
  if ( is_author() && $this->show_page_description() ) {
2758
  $description = $this->internationalize( get_the_author_meta( 'description' ) );
2759
+ } elseif ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) ) {
2760
+ $post_id = wc_get_page_id( 'shop' );
2761
+ if ( $post_id ) {
2762
+ $post = get_post( $post_id );
2763
+ // $description = $this->get_post_description( $post );
2764
+ // $description = $this->apply_cf_fields( $description );
2765
+ if ( ! ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ) {
2766
+ $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2767
+ } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2768
+ // $description = $this->get_aioseop_description( $post );
2769
+ $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2770
+ } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2771
+ $description = $this->get_aioseop_description( $post );
2772
+ }
2773
  }
2774
  } elseif ( is_front_page() ) {
2775
  $description = $this->get_aioseop_description( $post );
2786
  }
2787
 
2788
  // #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
2789
+ $screen = is_admin() ? get_current_screen() : null;
2790
  $ignore_php_version = $screen && isset( $screen->id ) && 'post' === $screen->id;
2791
 
2792
  $truncate = false;
3002
  if ( $query->is_404 || $query->is_search ) {
3003
  return false;
3004
  }
3005
+
3006
  // this boolean will determine if any additional parameters will be added to the final link or not.
3007
  // this is especially useful in issues such as #491.
3008
  $add_query_params = false;
3009
+ $link = '';
3010
+ $haspost = false;
3011
  if ( ! empty( $query->posts ) ) {
3012
  $haspost = count( $query->posts ) > 0;
3013
  }
3028
  return false;
3029
  }
3030
  $add_query_params = true;
3031
+ } elseif ( $query->is_home && ( get_option( 'show_on_front' ) == 'page' ) ) {
3032
+ $pageid = get_option( 'page_for_posts' );
3033
+ if ( $pageid ) {
3034
+ $link = aioseop_get_permalink( $pageid );
3035
+ }
3036
  } elseif ( is_front_page() || ( $query->is_home && ( get_option( 'show_on_front' ) != 'page' || ! get_option( 'page_for_posts' ) ) ) ) {
3037
  if ( function_exists( 'icl_get_home_url' ) ) {
3038
  $link = icl_get_home_url();
3056
  $link = get_tag_link( $tag->term_id );
3057
  }
3058
  } elseif ( $query->is_day && $haspost ) {
3059
+ $link = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
3060
  $add_query_params = true;
3061
  } elseif ( $query->is_month && $haspost ) {
3062
+ $link = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
3063
  $add_query_params = true;
3064
  } elseif ( $query->is_year && $haspost ) {
3065
+ $link = get_year_link( get_query_var( 'year' ) );
3066
  $add_query_params = true;
3067
  } elseif ( $query->is_tax && $haspost ) {
3068
  $taxonomy = get_query_var( 'taxonomy' );
3070
  if ( ! empty( $term ) ) {
3071
  $link = get_term_link( $term, $taxonomy );
3072
  }
3073
+ } elseif ( $query->is_archive && function_exists( 'get_post_type_archive_link' ) ) {
3074
+ $post_type = get_query_var( 'post_type' );
3075
+ if ( $post_type && is_array( $post_type ) ) {
3076
  $post_type = reset( $post_type );
3077
  }
3078
  $link = get_post_type_archive_link( $post_type );
3112
  $page_name = $wp_rewrite->pagination_base;
3113
  }
3114
  if ( ! empty( $page ) && $page > 1 ) {
3115
+ if ( get_query_var( 'page' ) == $page ) {
3116
  if ( get_query_var( 'p' ) ) {
3117
  // non-pretty urls.
3118
  $link = add_query_arg( 'page', $page, $link );
3144
  global $aioseop_options;
3145
  global $aioseop_keywords;
3146
  global $post;
3147
+
3148
+ $opts = $this->meta_opts;
3149
+ $blog_page = aiosp_common::get_blog_page( $post );
3150
  if ( ( is_front_page() && $aioseop_options['aiosp_home_keywords'] && ! $this->is_static_posts_page() ) || $this->is_static_front_page() ) {
3151
  if ( ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
3152
  $keywords = $this->get_all_keywords();
3155
  }
3156
  } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
3157
  $keywords = stripslashes( $this->internationalize( $opts['aiosp_keywords'] ) ); // And if option = use page set keywords instead of keywords from recent posts.
3158
+ } elseif ( $blog_page && empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) ) {
3159
  $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, '_aioseop_keywords', true ) ) );
3160
  } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
3161
  $keywords = '';
3533
  $field = $p . '_title_format';
3534
  $name = $post_objs[ $p ]->labels->singular_name;
3535
  if ( ! isset( $this->default_options[ $field ] ) ) {
3536
+ $this->default_options[ $field ] = array(
3537
  /* translators: The title format is the template that is used to format the title for each post of a certain post type (Posts, Pages, etc.). */
3538
+ 'name' => "$name " . __( 'Title Format', 'all-in-one-seo-pack' ) . "<br />($p)",
3539
  'type' => 'text',
3540
  'default' => '%post_title% | %site_title%',
3541
  'condshow' => array(
3660
  * @return mixed
3661
  */
3662
  function filter_submit( $submit ) {
3663
+ $submit['Submit_Default'] = array(
3664
  'type' => 'submit',
3665
  'class' => 'aioseop_reset_settings_button button-secondary',
3666
  /* translators: This is the text of a button that allows users to reset the General Settings to their default values. */
3667
  'value' => __( 'Reset General Settings to Defaults', 'all-in-one-seo-pack' ) . ' &raquo;',
3668
  );
3669
+ $submit['Submit_All_Default'] = array(
3670
  'type' => 'submit',
3671
  'class' => 'aioseop_reset_settings_button button-secondary',
3672
  /* translators: This is the text of a button that allows users to reset all settings across the entire plugin to their default values. */
3690
  if ( AIOSEOPPRO ) {
3691
  global $aioseop_update_checker;
3692
  }
3693
+ if ( true === $delete ) {
3694
 
3695
  if ( AIOSEOPPRO ) {
3696
  $license_key = '';
3711
 
3712
  if ( AIOSEOPPRO ) {
3713
  foreach ( $default_options as $k => $v ) {
3714
+ if ( 'aiosp_license_key' != $k ) {
3715
  $this->options[ $k ] = $v;
3716
  }
3717
  }
3736
  * @return mixed
3737
  */
3738
  function filter_settings( $settings, $location, $current ) {
3739
+ if ( null == $location ) {
3740
  $prefix = $this->prefix;
3741
 
3742
  foreach ( array( 'seopostcol', 'seocustptcol', 'debug_info', 'max_words_excerpt' ) as $opt ) {
3749
  $settings['aiosp_license_key']['size'] = 38;
3750
  }
3751
  }
3752
+ } elseif ( 'aiosp' == $location ) {
3753
  global $post, $aioseop_sitemap;
3754
  $prefix = $this->get_prefix( $location ) . $location . '_';
3755
  if ( ! empty( $post ) ) {
3776
  global $post;
3777
  $info = $this->get_page_snippet_info();
3778
 
3779
+ $title = $info['title'];
3780
  $description = $info['description'];
3781
+ $keywords = $info['keywords'];
3782
 
3783
  $settings[ "{$prefix}title" ]['placeholder'] = $this->html_entity_decode( $title );
3784
  $settings[ "{$prefix}description" ]['placeholder'] = $this->html_entity_decode( $description );
3819
  * @return mixed
3820
  */
3821
  function filter_options( $options, $location ) {
3822
+ if ( 'aiosp' == $location ) {
3823
  global $post;
3824
  if ( ! empty( $post ) ) {
3825
  $prefix = $this->prefix;
3826
  $post_type = get_post_type( $post );
3827
  foreach ( array( 'noindex', 'nofollow' ) as $no ) {
3828
  if ( empty( $this->options[ 'aiosp_cpost' . $no ] ) || ( ! in_array( $post_type, $this->options[ 'aiosp_cpost' . $no ] ) ) ) {
3829
+ if ( isset( $options[ "{$prefix}{$no}" ] ) && ( 'on' != $options[ "{$prefix}{$no}" ] ) ) {
3830
  unset( $options[ "{$prefix}{$no}" ] );
3831
  }
3832
  }
3833
  }
3834
  }
3835
  }
3836
+ if ( null == $location ) {
3837
  $prefix = $this->prefix;
3838
+ if ( isset( $options[ "{$prefix}use_original_title" ] ) && ( '' === $options[ "{$prefix}use_original_title" ] ) ) {
3839
  $options[ "{$prefix}use_original_title" ] = 0;
3840
  }
3841
  }
3874
  * Checks whether All in One SEO Pack is enabled for this page.
3875
  *
3876
  * @since ?
3877
+ * @since 3.3 Show Google Analytics if post type isn't checked in options.
3878
  *
3879
  * @return bool
3880
  */
3924
 
3925
  $this->meta_opts = $this->get_current_options( array(), 'aiosp' );
3926
 
3927
+ $aiosp_disable = false;
3928
 
3929
  if ( ! empty( $this->meta_opts ) ) {
3930
  if ( isset( $this->meta_opts['aiosp_disable'] ) ) {
3931
  $aiosp_disable = $this->meta_opts['aiosp_disable'];
3932
  }
 
 
 
3933
  }
3934
 
3935
  $aiosp_disable = apply_filters( 'aiosp_disable', $aiosp_disable ); // API filter to disable AIOSEOP.
3936
 
3937
  if ( $aiosp_disable ) {
 
 
 
 
 
 
 
3938
  return false;
3939
  }
3940
 
3941
+ if ( ! empty( $this->meta_opts ) && true == $this->meta_opts['aiosp_disable'] ) {
3942
  return false;
3943
  }
3944
 
4059
  add_action( 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array( $aioseop_update_checker, 'add_plugin_row' ) );
4060
  }
4061
  } else {
4062
+ if ( '1' == $aioseop_options['aiosp_can'] || 'on' == $aioseop_options['aiosp_can'] ) {
4063
  remove_action( 'wp_head', 'rel_canonical' );
4064
  }
4065
  // Analytics.
4123
  global $wp_query;
4124
  if ( is_attachment() ) {
4125
 
4126
+ $url = $this->aiosp_mrt_get_url( $wp_query );
4127
  $unique_desc = '';
4128
  if ( $url ) {
4129
  $matches = array();
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.
4176
  if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
4177
  $desc_attr = '';
4178
  }
4179
+ $desc_attr = apply_filters( 'aioseop_amp_description_attributes', $desc_attr );
4180
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
4181
  }
4182
  if ( ! empty( $meta_string ) ) {
4200
  return empty( $post_type ) || in_array( get_post_type(), $aioseop_options['aiosp_cpostactive'], true );
4201
  }
4202
 
4203
+ /**
4204
+ * Checks to see if Google Analytics should be excluded from the current page.
4205
+ *
4206
+ * Looks at both the individual post settings and the General Settings.
4207
+ *
4208
+ * @since 3.3.0
4209
+ *
4210
+ * @return bool
4211
+ */
4212
+ function analytics_excluded() {
4213
+
4214
+ $this->meta_opts = $this->get_current_options( array(), 'aiosp' ); // Get page-specific options.
4215
+
4216
+ $aiosp_disable_analytics = false;
4217
+
4218
+ if ( isset( $this->meta_opts['aiosp_disable_analytics'] ) ) {
4219
+ $aiosp_disable_analytics = $this->meta_opts['aiosp_disable_analytics'];
4220
+ }
4221
+
4222
+ if ( $aiosp_disable_analytics || ! aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
4223
+ return true;
4224
+ }
4225
+ return false;
4226
+ }
4227
+
4228
  /**
4229
  * WP Head
4230
  *
4241
  }
4242
 
4243
  if ( ! $this->is_page_included() ) {
 
4244
  /**
4245
  * The aioseop_robots_meta filter hook.
4246
  *
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
 
4260
  if ( ! empty( $old_wp_query ) ) {
4263
  unset( $old_wp_query );
4264
  }
4265
 
4266
+ if ( ! $this->analytics_excluded() ) {
4267
+ remove_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
4268
+ add_action( 'wp_head', array( $this, 'aiosp_google_analytics' ) );
4269
+ }
4270
+
4271
  return;
4272
  }
4273
 
4318
 
4319
  // This outputs robots meta tags and custom canonical URl on WooCommerce product archive page.
4320
  // See Github issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/755.
4321
+ if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) ) {
4322
+ $post_id = wc_get_page_id( 'shop' );
4323
+ if ( $post_id ) {
4324
+ $post = get_post( $post_id );
4325
+
4326
+ global $posts;
4327
+ $opts = $this->get_current_options( array(), 'aiosp', null, $post );
4328
+ $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
4329
+ $posts = array();
4330
+ $posts[] = $post;
4331
+ }
4332
  }
4333
 
4334
+ $posts = $save_posts;
4335
  // Handle the description format.
4336
  // We are not going to mandate that post description needs to be present because the content could be derived from a custom field too.
4337
  if ( ! ( is_front_page() && is_paged() ) ) {
4356
  if ( isset( $aioseop_options['aiosp_togglekeywords'] ) ) {
4357
  $togglekeywords = $aioseop_options['aiosp_togglekeywords'];
4358
  }
4359
+ if ( 0 == $togglekeywords && ! ( is_front_page() && is_paged() ) ) {
4360
  $keywords = $this->get_main_keywords();
4361
  $keywords = $this->apply_cf_fields( $keywords );
4362
  $keywords = apply_filters( 'aioseop_keywords', $keywords );
4365
  if ( isset( $meta_string ) ) {
4366
  $meta_string .= "\n";
4367
  }
4368
+ $keywords = wp_filter_nohtml_kses( str_replace( '"', '', $keywords ) );
4369
+ $key_attr = apply_filters( 'aioseop_keywords_attributes', '' );
4370
  $meta_string .= sprintf( "<meta name=\"keywords\" %s content=\"%s\" />\n", $key_attr, $keywords );
4371
  }
4372
  }
4449
  if ( ! empty( $next ) ) {
4450
  $meta_string .= '<link rel="next" href="' . esc_url( $next ) . "\" />\n";
4451
  }
4452
+ if ( null != $meta_string ) {
4453
  echo "$meta_string\n";
4454
  }
4455
 
4456
+ /**
4457
+ * The aioseop_disable_schema filter hook.
4458
+ *
4459
+ * Used to disable schema.org output programatically.
4460
+ *
4461
+ * @since 3.2.8
4462
+ *
4463
+ * @return boolean
4464
+ */
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
+ }
4472
+ } else {
4473
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) && (bool) $aioseop_options['aiosp_schema_markup'] ) {
4474
+ $aioseop_schema = new AIOSEOP_Schema_Builder();
4475
+ $aioseop_schema->display_json_ld_head_script();
4476
+ }
4477
+ }
4478
  }
4479
 
4480
  // Handle canonical links.
4649
  */
4650
  do_action( 'aioseop_after_apply_description_format' );
4651
 
4652
+ return esc_html( $description );
4653
  }
4654
 
4655
  /**
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
 
4694
  }
4695
 
4696
  if ( $is_static_posts_page || $is_woocommerce_shop_page ) {
4697
+ $post_type = 'page';
4698
  $is_static_page = true;
4699
  }
4700
 
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
 
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();
4843
  */
4844
  private function check_singular() {
4845
  global $wp_query, $post;
4846
+ $is_singular = false;
4847
  if ( is_singular() ) {
4848
  // #1297 - support for bbpress 'reply' post type.
4849
  if ( $post && 'reply' === $post->post_type ) {
4850
+ $is_singular = true;
4851
  }
4852
  }
4853
  return $is_singular;
4882
  * @return array
4883
  */
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;
5017
  * @return bool
5018
  */
5019
  function save_post_data( $id ) {
5020
+ $awmp_edit = null;
5021
+ $nonce = null;
5022
  if ( empty( $_POST ) ) {
5023
  return false;
5024
  }
5136
  $title = $t['title'];
5137
  }
5138
  $header .= '<li><label class="aioseop_header_nav"><a class="aioseop_header_tab' . $active . '" href="#' . $t['id'] . '">' . $title . '</a></label></li>';
5139
+ $active = '';
5140
  }
5141
  $header .= '</ul>';
5142
 
5294
  * @param $id
5295
  */
5296
  function save_category_metaboxes( $id ) {
5297
+ $awmp_edit = null;
5298
+ $nonce = null;
5299
  if ( isset( $_POST['aiosp_edit'] ) ) {
5300
  $awmp_edit = $_POST['aiosp_edit'];
5301
  }
5393
  }
5394
  */
5395
 
5396
+ if ( isset( $_POST ) && isset( $_POST['module'] ) && isset( $_POST['nonce-aioseop'] ) && ( 'All_in_One_SEO_Pack' == $_POST['module'] ) && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) {
5397
  if ( isset( $_POST['Submit'] ) && AIOSEOPPRO ) {
5398
  if ( isset( $_POST['aiosp_custom_menu_order'] ) ) {
5399
  $custom_menu_order = $_POST['aiosp_custom_menu_order'];
5417
  if ( ! AIOSEOPPRO ) {
5418
  if ( ! empty( $this->pointers ) ) {
5419
  foreach ( $this->pointers as $k => $p ) {
5420
+ if ( ! empty( $p['pointer_scope'] ) && ( 'global' == $p['pointer_scope'] ) ) {
5421
  unset( $this->pointers[ $k ] );
5422
  }
5423
  }
5564
  if ( $item != $file ) {
5565
  $order[] = $item;
5566
  }
5567
+ if ( 0 == $index ) {
5568
  $order[] = $file;
5569
  }
5570
  }
5764
  */
5765
  function check_recently_activated_modules() {
5766
  global $aioseop_options;
5767
+ $options = get_option( 'aioseop_options', array() );
5768
  $modules_before = array();
5769
  $modules_now = array();
5770
  if ( array_key_exists( 'modules', $aioseop_options ) && array_key_exists( 'aiosp_feature_manager_options', $aioseop_options['modules'] ) ) {
5783
  }
5784
 
5785
  $action = 'deactivate';
5786
+ $diff = array_diff( $modules_before, $modules_now );
5787
  if ( count( $modules_now ) > count( $modules_before ) ) {
5788
  $action = 'activate';
5789
+ $diff = array_diff( $modules_now, $modules_before );
5790
  }
5791
 
5792
  if ( $diff ) {
all_in_one_seo_pack.php CHANGED
@@ -4,7 +4,7 @@
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.3
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 +32,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.3
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
@@ -46,7 +46,7 @@ if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
46
  }
47
  }
48
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
49
- define( 'AIOSEOP_VERSION', '3.2.3' );
50
  }
51
 
52
  /*
@@ -128,7 +128,8 @@ if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
128
  }
129
 
130
  global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
131
- $aioseop_get_pages_start = $aioseop_admin_menu = 0;
 
132
 
133
  if ( AIOSEOPPRO ) {
134
  global $aioseop_update_checker;
@@ -208,8 +209,8 @@ if ( ! empty( $aioseop_mem_limit ) ) {
208
  }
209
  }
210
 
211
- $aiosp_activation = false;
212
- // list all available modules here.
213
  $aioseop_module_list = array(
214
  'sitemap',
215
  'opengraph',
@@ -481,7 +482,7 @@ if ( ! function_exists( 'aioseop_init_class' ) ) {
481
  }
482
 
483
  add_action( 'init', array( $aiosp, 'add_hooks' ) );
484
- add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
485
 
486
  // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
487
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
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.9
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
  * The original WordPress SEO plugin.
33
  *
34
  * @package All-in-One-SEO-Pack
35
+ * @version 3.2.9
36
  */
37
 
38
  if ( ! defined( 'AIOSEOPPRO' ) ) {
46
  }
47
  }
48
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
49
+ define( 'AIOSEOP_VERSION', '3.2.9' );
50
  }
51
 
52
  /*
128
  }
129
 
130
  global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
131
+ $aioseop_get_pages_start = 0;
132
+ $aioseop_admin_menu = 0;
133
 
134
  if ( AIOSEOPPRO ) {
135
  global $aioseop_update_checker;
209
  }
210
  }
211
 
212
+ $aiosp_activation = false;
213
+ // List all available modules here.
214
  $aioseop_module_list = array(
215
  'sitemap',
216
  'opengraph',
482
  }
483
 
484
  add_action( 'init', array( $aiosp, 'add_hooks' ) );
485
+ add_action( 'plugins_loaded', array( $aioseop_updates, 'version_updates' ), 11 );
486
 
487
  // phpcs:ignore Squiz.Commenting.InlineComment.InvalidEndChar
488
  // add_action( 'admin_init', 'aioseop_review_plugin_notice' );
css/aiosp_admin.min.css CHANGED
@@ -1 +1 @@
1
- #aioseop_settings_header #message{padding:5px 0 5px 50px;background-image:url(../images/update32.png);background-repeat:no-repeat;background-position:10px;font-size:14px;min-height:32px;clear:none}@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){#aioseop_settings_header #message{background-image:url(../images/update64.png)!important;-webkit-background-size:32px 32px!important;-moz-background-size:32px 32px!important;background-size:32px 32px!important}}.proupgrade a{font-weight:900;color:#d54e21;font-size:105%}li#wp-admin-bar-aioseop-pro-upgrade a.ab-item{font-weight:900;color:#d54e21!important;font-size:110%}#aio-pro-update{font-weight:900;color:#d54e21!important;font-size:110%}.upgrade_menu_link{font-weight:900;color:#d54e21;font-size:105%}label[for=aioseop_edit_profile_header]{font-size:1.3em}#aioseop_edit_profile_header{display:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip{font-family:'Open Sans',sans-serif;-webkit-box-shadow:0 1px 6px -2px #0073aa;box-shadow:0 1px 6px -2px #0073aa;border:0;border-radius:0;background:#fefefe}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip a{color:#0073aa;text-decoration:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip dt{font-weight:700}
1
+ #aioseop_settings_header #message{padding:5px 0 5px 50px;background-image:url(../images/update32.png);background-repeat:no-repeat;background-position:10px;font-size:14px;min-height:32px;clear:none}@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){#aioseop_settings_header #message{background-image:url(../images/update64.png)!important;-webkit-background-size:32px 32px!important;-moz-background-size:32px 32px!important;background-size:32px 32px!important}}.proupgrade a{font-weight:900;color:#d54e21;font-size:105%}li#wp-admin-bar-aioseop-pro-upgrade a.ab-item{font-weight:900;color:#d54e21!important;font-size:110%}#aio-pro-update{font-weight:900;color:#cc4b1f!important;font-size:110%}.upgrade_menu_link{font-weight:900;color:#d54e21;font-size:105%}label[for=aioseop_edit_profile_header]{font-size:1.3em}#aioseop_edit_profile_header{display:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip{font-family:'Open Sans',sans-serif;-webkit-box-shadow:0 1px 6px -2px #0073aa;box-shadow:0 1px 6px -2px #0073aa;border:0;border-radius:0;background:#fefefe}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip a{color:#0073aa;text-decoration:none}.ui-tooltip.ui-widget.ui-corner-all.ui-widget-content.aioseop-ui-tooltip dt{font-weight:700}
{inc/extlib → css/font-icons}/index.php RENAMED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Silence is golden.
5
  */
1
  <?php
 
2
  /**
3
  * Silence is golden.
4
  */
css/modules/aioseop_module-rtl.css CHANGED
@@ -352,4 +352,24 @@ textarea.robots-text {
352
 
353
  .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
354
  margin: 30px 0 0 0;
355
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
 
353
  .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
354
  margin: 30px 0 0 0;
355
+ }
356
+
357
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-prev {
358
+ float: right;
359
+ text-align: right;
360
+ }
361
+
362
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-prev:before {
363
+ content: '\2192 ';
364
+ padding-left: 2px;
365
+ }
366
+
367
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-next {
368
+ float: left;
369
+ text-align: left;
370
+ }
371
+
372
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-next:after {
373
+ content: '\2190 ';
374
+ padding-right: 2px;
375
+ }
css/modules/aioseop_module-rtl.min.css CHANGED
@@ -1 +1 @@
1
- *{direction:rtl!important}.form-table.aioseop{clear:none}.form-table.aioseop th{padding:10px 9px 12px 0;direction:rtl}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:right;float:right}.aioseop_help_text_link span{left:-60px}.aioseop_meta_box_help>label{margin-left:0;margin-right:8px}.aioseop_help_text_link img{float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:left;padding-left:0;margin-right:0}.aioseop_label{float:right;padding-left:0;padding-right:0;text-align:right;direction:rtl}.aioseop_help_text_div{text-align:right;margin:8px 0 10px 0}.aioseop_help_text{float:right;clear:right}.aioseop_head_nav{float:right}.aioseop_head_nav_tab{margin:0 15px 0 0;float:right}.aioseop_head_nav_tab:first-child{margin-right:0}.aioseop_header{float:right;clear:right}.aioseop_nopad{padding-right:0}.aioseop_adverts{float:left}.aioseop_content{clear:right}#aiosp_feature_manager_metabox.postbox{float:right}.aioseop_sidebar{margin-left:0;margin-right:10px}.aioseop_option_label{float:right!important;clear:right!important}.aioseop_settings_left{float:right}.aioseop_option_input{float:left;padding-left:0;padding-right:1px;margin-bottom:20px;width:60%;min-width:160px}.aioseop_top{margin:10px 0 0 10px}.aioseop_right_sidebar{float:left}div.aioseop_feature{float:right}.aioseop_feature #free-flag{float:left;margin-right:0;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px;position:relative}.aioseop_feature #free-flag:after,.aioseop_feature #free-flag:before{display:none}.aioseop_feature .feature_button{float:left;margin-right:0;margin-left:10px}.aioseop_follow_button{margin-right:0;margin-left:5px}.aioseop_wrapper{padding-left:0;padding-right:5px;direction:rtl}.aioseop_input{clear:left}#aiosp div.preview_snippet{padding:15px 7px 20px 15px}#aiosp_sitemap_addl_pages,#aiosp_video_sitemap_addl_pages{clear:right;margin-left:0;margin-right:20px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{border-left:0 solid #dfdfdf;border-right:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{padding-left:0;padding-right:5%}.aioseop_settings_left .postbox{float:right}.aioseop_option_setting_label{padding-left:0;padding-right:1px}.aioseop_settings_left .postbox .inside{clear:left}.postbox h2 .Taha{float:left!important}.postbox-container div#aiosp_upgrade_wrapper{float:right}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:right;margin:0 13px 0 23px}.aioseop_module.error.below-h2{margin:0 0 15px 477px!important}.robots img{margin:0 2px 0 0}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{margin-top:10px}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;left:10px;text-align:left}.aioseop_help_text ul{margin:15px 20px 0 0}.aioseop_header_tabs li a.aioseop_header_tab{margin:5px 0 0 5px}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border-left:solid 0 #ccc;border-right:solid 1px #ccc;margin-left:0;margin-right:5px}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:0;padding-left:477px}#aiosp_settings_form ul.sfwd_debug_settings li strong{float:right;text-align:left;margin-right:0;margin-left:8px;padding-right:0;padding-left:8px}#aiosp_settings_form ul.sfwd_debug_settings li{clear:right}.aioseop_advert{direction:rtl;float:right;z-index:999999}.aioseop_advert form input{float:left}.MRL{margin-left:0!important;margin-right:20px!important}.aioseop_upload_image_label{clear:right!important;float:none!important}.aioseop_upload_image_button{float:right!important;margin-bottom:5px!important}#aioseop-about .aioseop_metabox_text ul{padding-right:15px}.aioseop input[readonly]{text-align:center}.aioseop_input input[type=checkbox]:before{margin:-4px -4px 0 0}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border:none}.aioseop_feature h3{text-align:left}.aioseop_feature .flag:before{border-width:13.5px 4px 15px 10px}#aioseop_coming_soon,#aioseop_coming_soon2 b{text-align:center}.aioseop_feature p.aioseop_desc{text-align:right}#aioseop_coming_soon .flag.pro{height:17.5px;font-size:13.5px}#aiosp_robots_default_metabox table.aioseop_table{margin:5px 10px 10px 0}textarea.robots-text{margin:0 10px 0 10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin:30px 0 0 0}
1
+ *{direction:rtl!important}.form-table.aioseop{clear:none}.form-table.aioseop th{padding:10px 9px 12px 0;direction:rtl}.aioseop_help_text_link,.aioseop_help_text_link:active{text-align:right;float:right}.aioseop_help_text_link span{left:-60px}.aioseop_meta_box_help>label{margin-left:0;margin-right:8px}.aioseop_help_text_link img{float:left}.aioseop_meta_box_help,.aioseop_meta_box_help:active{float:left;padding-left:0;margin-right:0}.aioseop_label{float:right;padding-left:0;padding-right:0;text-align:right;direction:rtl}.aioseop_help_text_div{text-align:right;margin:8px 0 10px 0}.aioseop_help_text{float:right;clear:right}.aioseop_head_nav{float:right}.aioseop_head_nav_tab{margin:0 15px 0 0;float:right}.aioseop_head_nav_tab:first-child{margin-right:0}.aioseop_header{float:right;clear:right}.aioseop_nopad{padding-right:0}.aioseop_adverts{float:left}.aioseop_content{clear:right}#aiosp_feature_manager_metabox.postbox{float:right}.aioseop_sidebar{margin-left:0;margin-right:10px}.aioseop_option_label{float:right!important;clear:right!important}.aioseop_settings_left{float:right}.aioseop_option_input{float:left;padding-left:0;padding-right:1px;margin-bottom:20px;width:60%;min-width:160px}.aioseop_top{margin:10px 0 0 10px}.aioseop_right_sidebar{float:left}div.aioseop_feature{float:right}.aioseop_feature #free-flag{float:left;margin-right:0;background:none repeat scroll 0 0 #d23d46;color:#fff;padding:5px 12px;position:relative}.aioseop_feature #free-flag:after,.aioseop_feature #free-flag:before{display:none}.aioseop_feature .feature_button{float:left;margin-right:0;margin-left:10px}.aioseop_follow_button{margin-right:0;margin-left:5px}.aioseop_wrapper{padding-left:0;padding-right:5px;direction:rtl}.aioseop_input{clear:left}#aiosp div.preview_snippet{padding:15px 7px 20px 15px}#aiosp_sitemap_addl_pages,#aiosp_video_sitemap_addl_pages{clear:right;margin-left:0;margin-right:20px}.All_in_One_SEO_Pack_Opengraph table.aioseop_table{border-left:0 solid #dfdfdf;border-right:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table th{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}.All_in_One_SEO_Pack_Opengraph table.aioseop_table td{border-right:0 solid #dfdfdf;border-left:1px solid #dfdfdf}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td{padding-left:0;padding-right:5%}.aioseop_settings_left .postbox{float:right}.aioseop_option_setting_label{padding-left:0;padding-right:1px}.aioseop_settings_left .postbox .inside{clear:left}.postbox h2 .Taha{float:left!important}.postbox-container div#aiosp_upgrade_wrapper{float:right}#aiosp_settings_form .aioseop_no_label,.aioseop_no_label{float:right;margin:0 13px 0 23px}.aioseop_module.error.below-h2{margin:0 0 15px 477px!important}.robots img{margin:0 2px 0 0}#aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,#aiosp_robots_generator_robothtml_wrapper .aioseop_option_div{margin-top:10px}div.aioseop_notice a.aioseop_dismiss_link{position:absolute;top:10px;left:10px;text-align:left}.aioseop_help_text ul{margin:15px 20px 0 0}.aioseop_header_tabs li a.aioseop_header_tab{margin:5px 0 0 5px}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border-left:solid 0 #ccc;border-right:solid 1px #ccc;margin-left:0;margin-right:5px}.aioseop_tabs_div,form#aiosp_settings_form{padding-right:0;padding-left:477px}#aiosp_settings_form ul.sfwd_debug_settings li strong{float:right;text-align:left;margin-right:0;margin-left:8px;padding-right:0;padding-left:8px}#aiosp_settings_form ul.sfwd_debug_settings li{clear:right}.aioseop_advert{direction:rtl;float:right;z-index:999999}.aioseop_advert form input{float:left}.MRL{margin-left:0!important;margin-right:20px!important}.aioseop_upload_image_label{clear:right!important;float:none!important}.aioseop_upload_image_button{float:right!important;margin-bottom:5px!important}#aioseop-about .aioseop_metabox_text ul{padding-right:15px}.aioseop input[readonly]{text-align:center}.aioseop_input input[type=checkbox]:before{margin:-4px -4px 0 0}.aioseop_header_tabs li:first-child a.aioseop_header_tab{border:none}.aioseop_feature h3{text-align:left}.aioseop_feature .flag:before{border-width:13.5px 4px 15px 10px}#aioseop_coming_soon,#aioseop_coming_soon2 b{text-align:center}.aioseop_feature p.aioseop_desc{text-align:right}#aioseop_coming_soon .flag.pro{height:17.5px;font-size:13.5px}#aiosp_robots_default_metabox table.aioseop_table{margin:5px 10px 10px 0}textarea.robots-text{margin:0 10px 0 10px}.All_in_One_SEO_Pack_Feature_Manager>.aioseop_right_sidebar.aioseop_options_wrapper{margin:30px 0 0 0}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev{float:right;text-align:right}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-prev:before{content:'\2192 ';padding-left:2px}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next{float:left;text-align:left}body[class*=all-in-one-seo_page_all-in-one-seo-pack] #ui-datepicker-div .ui-datepicker-next:after{content:'\2190 ';padding-right:2px}
css/modules/aioseop_module.css CHANGED
@@ -1607,4 +1607,68 @@ div#aiosp_sitemap_status_metabox .toggle-indicator {
1607
  .aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value] {
1608
  background-color: #0E7BBE;
1609
  background-image: none;
1610
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1607
  .aioseop_options .aioseop-exclude-terms.selectize-control.multi .selectize-input [data-value] {
1608
  background-color: #0E7BBE;
1609
  background-image: none;
1610
+ }
1611
+
1612
+ /**
1613
+ * Styling for jQuery UI Datepicker in Safari
1614
+ *
1615
+ */
1616
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div {
1617
+ background-color: #fff;
1618
+ padding: 15px;
1619
+ border: 1px solid #8d96a0;
1620
+ border-radius: 4px;
1621
+ }
1622
+
1623
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-prev {
1624
+ float: left;
1625
+ text-align: left;
1626
+ }
1627
+
1628
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-prev:before {
1629
+ content: '\2190 ';
1630
+ padding-right: 2px;
1631
+ }
1632
+
1633
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-next {
1634
+ float: right;
1635
+ text-align: right;
1636
+ }
1637
+
1638
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-next:after {
1639
+ content: '\2192 ';
1640
+ padding-left: 2px;
1641
+ }
1642
+
1643
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div .ui-datepicker-title {
1644
+ clear: both;
1645
+ text-align: center;
1646
+ font-weight: bold;
1647
+ padding: 10px 0;
1648
+ }
1649
+
1650
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar {
1651
+ border: 1px solid #007cba;
1652
+ border-collapse: collapse;
1653
+ }
1654
+
1655
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar thead {
1656
+ background-color: #f1f1f1;
1657
+ border-bottom: 1px solid #8d96a0;
1658
+ }
1659
+
1660
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar thead th,
1661
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar td {
1662
+ width: 2rem;
1663
+ height: 2rem;
1664
+ text-align: center;
1665
+ }
1666
+
1667
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar td a {
1668
+ text-decoration: none;
1669
+ }
1670
+
1671
+ body[class*="all-in-one-seo_page_all-in-one-seo-pack"] #ui-datepicker-div table.ui-datepicker-calendar td a:hover {
1672
+ border: 1px solid #8d96a0;
1673
+ padding: 5px 7px;
1674
+ }
css/modules/aioseop_module.min.css CHANGED
@@ -1 +1 @@
1
- .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;border-bottom:1px solid #ccc;width:100%;margin:8px 0 0 0}.aioseop_head_nav_tab{padding:10px 15px 10px 15px;margin:0 0 0 15px;border-radius:4px 4px 0 0;border:1px solid #ccc;border-bottom:0 #fff;float:left;opacity:.5;color:#000;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:27%;padding-left:5%}#aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child{padding-left: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:25%;padding-left:5%}.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:#888!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:#093;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}
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}
inc/aioseop_functions.php CHANGED
@@ -81,7 +81,8 @@ if ( ! function_exists( 'aioseop_update_settings_check' ) ) {
81
  $update_options = false;
82
  if ( ! empty( $aioseop_options ) ) {
83
  if ( ! empty( $aioseop_options['aiosp_archive_noindex'] ) ) { // Migrate setting for noindex archives.
84
- $aioseop_options['aiosp_archive_date_noindex'] = $aioseop_options['aiosp_archive_author_noindex'] = $aioseop_options['aiosp_archive_noindex'];
 
85
  unset( $aioseop_options['aiosp_archive_noindex'] );
86
  $update_options = true;
87
  }
@@ -90,7 +91,7 @@ if ( ! function_exists( 'aioseop_update_settings_check' ) ) {
90
  unset( $aioseop_options['aiosp_archive_title_format'] );
91
  $update_options = true;
92
  }
93
- if ( ! empty( $aioseop_options['aiosp_archive_title_format'] ) && ( $aioseop_options['aiosp_archive_title_format'] === '%date% | %site_title%' ) ) {
94
  $aioseop_options['aiosp_archive_title_format'] = '%archive_title% | %site_title%';
95
  $update_options = true;
96
  }
@@ -118,10 +119,11 @@ if ( ! function_exists( 'aioseop_initialize_options' ) ) {
118
 
119
  if ( get_option( 'aiosp_post_title_format' ) ) {
120
  foreach ( $naioseop_options as $aioseop_opt_name => $value ) {
121
- if ( $aioseop_oldval = get_option( $aioseop_opt_name ) ) {
 
122
  $naioseop_options[ $aioseop_opt_name ] = $aioseop_oldval;
123
  }
124
- if ( $aioseop_oldval == '' ) {
125
  $naioseop_options[ $aioseop_opt_name ] = '';
126
  }
127
  delete_option( $aioseop_opt_name );
@@ -183,7 +185,7 @@ if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
183
  if ( ! empty( $aioseop_options ) && ! empty( $aioseop_options['aiosp_posttypecolumns'] ) ) {
184
  $aiosp_posttypecolumns = $aioseop_options['aiosp_posttypecolumns'];
185
  }
186
- if ( ! empty( $pagenow ) && ( $pagenow === 'upload.php' ) ) {
187
  $post_type = 'attachment';
188
  } elseif ( ! isset( $_REQUEST['post_type'] ) ) {
189
  $post_type = 'post';
@@ -192,14 +194,14 @@ if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
192
  }
193
  if ( is_array( $aiosp_posttypecolumns ) && in_array( $post_type, $aiosp_posttypecolumns ) ) {
194
  add_action( 'admin_head', 'aioseop_admin_head' );
195
- if ( $post_type === 'page' ) {
196
  add_filter( 'manage_pages_columns', 'aioseop_mrt_pcolumns' );
197
- } elseif ( $post_type === 'attachment' ) {
198
  add_filter( 'manage_media_columns', 'aioseop_mrt_pcolumns' );
199
  } else {
200
  add_filter( 'manage_posts_columns', 'aioseop_mrt_pcolumns' );
201
  }
202
- if ( $post_type === 'attachment' ) {
203
  add_action( 'manage_media_custom_column', 'aioseop_mrt_pccolumn', 10, 2 );
204
  } elseif ( is_post_type_hierarchical( $post_type ) ) {
205
  add_action( 'manage_pages_custom_column', 'aioseop_mrt_pccolumn', 10, 2 );
@@ -390,7 +392,7 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
390
  * AIOSEOP AJAX Save Meta
391
  */
392
  function aioseop_ajax_save_meta() {
393
- if ( ! empty( $_POST['_inline_edit'] ) && ( $_POST['_inline_edit'] !== 'undefined' ) ) {
394
  check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
395
  }
396
  $post_id = intval( $_POST['post_id'] );
@@ -412,17 +414,17 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
412
  } else {
413
  die();
414
  }
415
- if ( $result != '' ) :
416
  $label = "<label id='aioseop_label_{$target}_{$post_id}' class='aioseop-label-quickedit' for='{$target}editlink{$post_id}'>" . $result . '</label>';
417
  else :
418
  $label = "<label id='aioseop_label_{$target}_{$post_id}' class='aioseop-label-quickedit' for='{$target}editlink{$post_id}'></label><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
419
  endif;
420
- $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
421
- $output = '<a id="' . $target . 'editlink' . $post_id . '" '
422
  . 'class="aioseop_edit_link aioseop-icon-cog-edit" '
423
  . 'href="javascript:void(0);" '
424
  . 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' '
425
- . 'title="' . __( 'Edit' ) . '"></a>';
426
  $output .= $label;
427
  die(
428
  "jQuery('div#aioseop_" . $target . '_' . $post_id . "').fadeOut('fast', function() {
@@ -479,20 +481,22 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
479
  * @since ?
480
  */
481
  function aioseop_ajax_save_url() {
482
- $valid = true;
483
- $invalid_msg = null;
 
 
484
  aioseop_ajax_init();
485
- $options = array();
486
  parse_str( $_POST['options'], $options );
487
  foreach ( $options as $k => $v ) {
488
  // all values are mandatory while adding to the sitemap.
489
  // this should work in the same way for news and video sitemaps too, but tackling only regular sitemaps for now.
490
  if ( 'sitemap_addl_pages' === $_POST['settings'] ) {
491
  if ( empty( $v ) ) {
492
- $valid = false;
493
  } elseif ( 'aiosp_sitemap_addl_url' === $k && ! aiosp_common::is_url_valid( $v ) ) {
494
- $valid = false;
495
- $invalid_msg = __( 'Please provide absolute URLs (including http or https).', 'all-in-one-seo-pack' );
496
  }
497
  if ( ! $valid ) {
498
  break;
@@ -505,9 +509,9 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
505
  global $aiosp, $aioseop_modules;
506
  aioseop_load_modules();
507
  $aiosp->admin_menu();
508
- if ( ! empty( $_POST['settings'] ) && ( $_POST['settings'] === 'video_sitemap_addl_pages' ) ) {
509
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Video_Sitemap' );
510
- } elseif ( ! empty( $_POST['settings'] ) && ( $_POST['settings'] === 'news_sitemap_addl_pages' ) ) {
511
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_News_Sitemap' );
512
  } else {
513
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Sitemap' );
@@ -535,7 +539,7 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
535
  if ( $invalid_msg ) {
536
  $output = $invalid_msg;
537
  } else {
538
- $output = __( 'All values are mandatory.', 'all-in-one-seo-pack' );
539
  }
540
  }
541
  die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
@@ -658,7 +662,7 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
658
  foreach ( $metadata[ $type ] as $tk => $tv ) {
659
  if ( $m[ $tags['name'] ] == $tv ) {
660
  /* This message is shown when a duplicate meta tag is found. %s is a placeholder and will be replaced with the name of the relevant meta tag. */
661
- $meta .= "<tr><th style='color:red;'>" . sprintf( __( 'Duplicate %s Meta' ), ucwords( $type ) ) . '</th><td>' . ucwords( $tk ) . "</td><td>{$m[$tags['name']]}</td><td>{$m[$tags['value']]}</td></tr>\n";
662
  }
663
  }
664
  }
@@ -669,7 +673,7 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
669
  if ( empty( $meta ) ) {
670
  $meta = '<span style="color:green;">' . __( 'No duplicate meta tags found.', 'all-in-one-seo-pack' ) . '</span>';
671
  } else {
672
- $meta = "<table cellspacing=0 cellpadding=0 width=80% class='aioseop_table'><tr class='aioseop_table_header'><th>Meta For Site</th><th>Kind of Meta</th><th>Element Name</th><th>Element Value</th></tr>" . $meta . '</table>';
673
  $meta .=
674
  "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
675
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
@@ -795,7 +799,7 @@ if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
795
  $output = '<ul>';
796
  if ( ! empty( $links ) ) {
797
  foreach ( $links as $k => $v ) {
798
- if ( $k === 'Feature Manager' ) {
799
  $current = ' class="current"';
800
  } else {
801
  $current = '';
@@ -821,13 +825,13 @@ if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
821
  function aioseop_mrt_pccolumn( $aioseopcn, $aioseoppi ) {
822
  $id = $aioseoppi;
823
  $target = null;
824
- if ( $aioseopcn === 'seotitle' ) {
825
  $target = 'title';
826
  }
827
- if ( $aioseopcn === 'seokeywords' ) {
828
  $target = 'keywords';
829
  }
830
- if ( $aioseopcn === 'seodesc' ) {
831
  $target = 'description';
832
  }
833
  if ( ! $target ) {
@@ -852,7 +856,7 @@ if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
852
  . 'class="aioseop_edit_link aioseop-icon-cog-edit" '
853
  . 'href="javascript:void(0);" '
854
  . 'onclick=\'aioseop_ajax_edit_meta_form(' . $id . ', "' . $target . '", "' . $nonce . '");return false;\' '
855
- . 'title="' . __( 'Edit' ) . '"></a>';
856
  echo $label;
857
  ?>
858
  </div>
@@ -896,7 +900,7 @@ if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
896
  */
897
  function aioseop_mrt_exclude_this_page( $url = null ) {
898
  static $excluded = false;
899
- if ( $excluded === false ) {
900
  global $aioseop_options;
901
  $ex_pages = '';
902
  if ( isset( $aioseop_options['aiosp_ex_pages'] ) ) {
@@ -918,7 +922,7 @@ if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
918
  }
919
  }
920
  if ( ! empty( $excluded ) ) {
921
- if ( $url === null ) {
922
  $url = $_SERVER['REQUEST_URI'];
923
  } else {
924
  $url = wp_parse_url( $url );
@@ -956,7 +960,7 @@ if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
956
 
957
  if ( ! empty( $aioseop_modules ) && is_object( $aioseop_modules ) ) {
958
  $m = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Opengraph' );
959
- if ( ( $m !== false ) && is_object( $m ) ) {
960
 
961
  if ( $m->option_isset( 'twitter_creator' ) || $m->option_isset( 'facebook_author' ) ) {
962
  $contactmethods['aioseop_edit_profile_header'] = AIOSEOP_PLUGIN_NAME;
@@ -1397,3 +1401,31 @@ if ( ! function_exists( 'aioseop_is_woocommerce_active' ) ) {
1397
  return class_exists( 'woocommerce' );
1398
  }
1399
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  $update_options = false;
82
  if ( ! empty( $aioseop_options ) ) {
83
  if ( ! empty( $aioseop_options['aiosp_archive_noindex'] ) ) { // Migrate setting for noindex archives.
84
+ $aioseop_options['aiosp_archive_date_noindex'] = $aioseop_options['aiosp_archive_noindex'];
85
+ $aioseop_options['aiosp_archive_author_noindex'] = $aioseop_options['aiosp_archive_noindex'];
86
  unset( $aioseop_options['aiosp_archive_noindex'] );
87
  $update_options = true;
88
  }
91
  unset( $aioseop_options['aiosp_archive_title_format'] );
92
  $update_options = true;
93
  }
94
+ if ( ! empty( $aioseop_options['aiosp_archive_title_format'] ) && ( '%date% | %site_title%' === $aioseop_options['aiosp_archive_title_format'] ) ) {
95
  $aioseop_options['aiosp_archive_title_format'] = '%archive_title% | %site_title%';
96
  $update_options = true;
97
  }
119
 
120
  if ( get_option( 'aiosp_post_title_format' ) ) {
121
  foreach ( $naioseop_options as $aioseop_opt_name => $value ) {
122
+ $aioseop_oldval = get_option( $aioseop_opt_name );
123
+ if ( $aioseop_oldval ) {
124
  $naioseop_options[ $aioseop_opt_name ] = $aioseop_oldval;
125
  }
126
+ if ( '' == $aioseop_oldval ) {
127
  $naioseop_options[ $aioseop_opt_name ] = '';
128
  }
129
  delete_option( $aioseop_opt_name );
185
  if ( ! empty( $aioseop_options ) && ! empty( $aioseop_options['aiosp_posttypecolumns'] ) ) {
186
  $aiosp_posttypecolumns = $aioseop_options['aiosp_posttypecolumns'];
187
  }
188
+ if ( ! empty( $pagenow ) && ( 'upload.php' === $pagenow ) ) {
189
  $post_type = 'attachment';
190
  } elseif ( ! isset( $_REQUEST['post_type'] ) ) {
191
  $post_type = 'post';
194
  }
195
  if ( is_array( $aiosp_posttypecolumns ) && in_array( $post_type, $aiosp_posttypecolumns ) ) {
196
  add_action( 'admin_head', 'aioseop_admin_head' );
197
+ if ( 'page' === $post_type ) {
198
  add_filter( 'manage_pages_columns', 'aioseop_mrt_pcolumns' );
199
+ } elseif ( 'attachment' === $post_type ) {
200
  add_filter( 'manage_media_columns', 'aioseop_mrt_pcolumns' );
201
  } else {
202
  add_filter( 'manage_posts_columns', 'aioseop_mrt_pcolumns' );
203
  }
204
+ if ( 'attachment' === $post_type ) {
205
  add_action( 'manage_media_custom_column', 'aioseop_mrt_pccolumn', 10, 2 );
206
  } elseif ( is_post_type_hierarchical( $post_type ) ) {
207
  add_action( 'manage_pages_custom_column', 'aioseop_mrt_pccolumn', 10, 2 );
392
  * AIOSEOP AJAX Save Meta
393
  */
394
  function aioseop_ajax_save_meta() {
395
+ if ( ! empty( $_POST['_inline_edit'] ) && ( 'undefined' !== $_POST['_inline_edit'] ) ) {
396
  check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
397
  }
398
  $post_id = intval( $_POST['post_id'] );
414
  } else {
415
  die();
416
  }
417
+ if ( '' != $result ) :
418
  $label = "<label id='aioseop_label_{$target}_{$post_id}' class='aioseop-label-quickedit' for='{$target}editlink{$post_id}'>" . $result . '</label>';
419
  else :
420
  $label = "<label id='aioseop_label_{$target}_{$post_id}' class='aioseop-label-quickedit' for='{$target}editlink{$post_id}'></label><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
421
  endif;
422
+ $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
423
+ $output = '<a id="' . $target . 'editlink' . $post_id . '" '
424
  . 'class="aioseop_edit_link aioseop-icon-cog-edit" '
425
  . 'href="javascript:void(0);" '
426
  . 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' '
427
+ . 'title="' . __( 'Edit', 'all-in-one-seo-pack' ) . '"></a>';
428
  $output .= $label;
429
  die(
430
  "jQuery('div#aioseop_" . $target . '_' . $post_id . "').fadeOut('fast', function() {
481
  * @since ?
482
  */
483
  function aioseop_ajax_save_url() {
484
+ $valid = true;
485
+ $invalid_msg = null;
486
+ $options = array();
487
+
488
  aioseop_ajax_init();
489
+
490
  parse_str( $_POST['options'], $options );
491
  foreach ( $options as $k => $v ) {
492
  // all values are mandatory while adding to the sitemap.
493
  // this should work in the same way for news and video sitemaps too, but tackling only regular sitemaps for now.
494
  if ( 'sitemap_addl_pages' === $_POST['settings'] ) {
495
  if ( empty( $v ) ) {
496
+ $valid = false;
497
  } elseif ( 'aiosp_sitemap_addl_url' === $k && ! aiosp_common::is_url_valid( $v ) ) {
498
+ $valid = false;
499
+ $invalid_msg = __( 'Please provide absolute URLs (including http or https).', 'all-in-one-seo-pack' );
500
  }
501
  if ( ! $valid ) {
502
  break;
509
  global $aiosp, $aioseop_modules;
510
  aioseop_load_modules();
511
  $aiosp->admin_menu();
512
+ if ( ! empty( $_POST['settings'] ) && ( 'video_sitemap_addl_pages' === $_POST['settings'] ) ) {
513
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Video_Sitemap' );
514
+ } elseif ( ! empty( $_POST['settings'] ) && ( 'news_sitemap_addl_pages' === $_POST['settings'] ) ) {
515
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_News_Sitemap' );
516
  } else {
517
  $module = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Sitemap' );
539
  if ( $invalid_msg ) {
540
  $output = $invalid_msg;
541
  } else {
542
+ $output = __( 'All values are mandatory.', 'all-in-one-seo-pack' );
543
  }
544
  }
545
  die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
662
  foreach ( $metadata[ $type ] as $tk => $tv ) {
663
  if ( $m[ $tags['name'] ] == $tv ) {
664
  /* This message is shown when a duplicate meta tag is found. %s is a placeholder and will be replaced with the name of the relevant meta tag. */
665
+ $meta .= "<tr><th style='color:red;'>" . sprintf( __( 'Duplicate %s Meta', 'all-in-one-seo-pack' ), ucwords( $type ) ) . '</th><td>' . ucwords( $tk ) . "</td><td>{$m[$tags['name']]}</td><td>{$m[$tags['value']]}</td></tr>\n";
666
  }
667
  }
668
  }
673
  if ( empty( $meta ) ) {
674
  $meta = '<span style="color:green;">' . __( 'No duplicate meta tags found.', 'all-in-one-seo-pack' ) . '</span>';
675
  } else {
676
+ $meta = "<table cellspacing=0 cellpadding=0 width=80% class='aioseop_table'><tr class='aioseop_table_header'><th>Meta For Site</th><th>Kind of Meta</th><th>Element Name</th><th>Element Value</th></tr>" . $meta . '</table>';
677
  $meta .=
678
  "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
679
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
799
  $output = '<ul>';
800
  if ( ! empty( $links ) ) {
801
  foreach ( $links as $k => $v ) {
802
+ if ( 'Feature Manager' === $k ) {
803
  $current = ' class="current"';
804
  } else {
805
  $current = '';
825
  function aioseop_mrt_pccolumn( $aioseopcn, $aioseoppi ) {
826
  $id = $aioseoppi;
827
  $target = null;
828
+ if ( 'seotitle' === $aioseopcn ) {
829
  $target = 'title';
830
  }
831
+ if ( 'seokeywords' === $aioseopcn ) {
832
  $target = 'keywords';
833
  }
834
+ if ( 'seodesc' === $aioseopcn ) {
835
  $target = 'description';
836
  }
837
  if ( ! $target ) {
856
  . 'class="aioseop_edit_link aioseop-icon-cog-edit" '
857
  . 'href="javascript:void(0);" '
858
  . 'onclick=\'aioseop_ajax_edit_meta_form(' . $id . ', "' . $target . '", "' . $nonce . '");return false;\' '
859
+ . 'title="' . __( 'Edit', 'all-in-one-seo-pack' ) . '"></a>';
860
  echo $label;
861
  ?>
862
  </div>
900
  */
901
  function aioseop_mrt_exclude_this_page( $url = null ) {
902
  static $excluded = false;
903
+ if ( false === $excluded ) {
904
  global $aioseop_options;
905
  $ex_pages = '';
906
  if ( isset( $aioseop_options['aiosp_ex_pages'] ) ) {
922
  }
923
  }
924
  if ( ! empty( $excluded ) ) {
925
+ if ( null === $url ) {
926
  $url = $_SERVER['REQUEST_URI'];
927
  } else {
928
  $url = wp_parse_url( $url );
960
 
961
  if ( ! empty( $aioseop_modules ) && is_object( $aioseop_modules ) ) {
962
  $m = $aioseop_modules->return_module( 'All_in_One_SEO_Pack_Opengraph' );
963
+ if ( ( false !== $m ) && is_object( $m ) ) {
964
 
965
  if ( $m->option_isset( 'twitter_creator' ) || $m->option_isset( 'facebook_author' ) ) {
966
  $contactmethods['aioseop_edit_profile_header'] = AIOSEOP_PLUGIN_NAME;
1401
  return class_exists( 'woocommerce' );
1402
  }
1403
  }
1404
+
1405
+ /**
1406
+ * Gets the major version of a sementic plugin version.
1407
+ *
1408
+ * @since 3.2.8
1409
+ *
1410
+ * @param string $version
1411
+ * @return string
1412
+ */
1413
+ function get_major_version( $version ) {
1414
+
1415
+ if ( ! strpos( $version, '.' ) ) {
1416
+ // No period. Return version which should just look like "x".
1417
+ return $version;
1418
+ }
1419
+ $offset1 = strpos( $version, '.' ); // Location of first period.
1420
+
1421
+ if ( ! strpos( $version, '.', $offset1 + 1 ) ) {
1422
+ // No second period. Return version which should just look like "x.y".
1423
+ return $version;
1424
+ }
1425
+
1426
+ // If we get here, there's at least an "x.y.z".
1427
+ $offset2 = strpos( $version, '.', $offset1 + 1 ); // Location of second period.
1428
+ $major_version = substr( $version, 0, $offset2 );
1429
+
1430
+ return $major_version;
1431
+ }
inc/aioseop_updates_class.php CHANGED
@@ -66,7 +66,7 @@ class AIOSEOP_Updates {
66
  set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
67
  }
68
  delete_transient( 'aioseop_feed' );
69
- add_action( 'admin_init', array( $this, 'aioseop_welcome' ) );
70
 
71
  }
72
 
@@ -145,10 +145,12 @@ class AIOSEOP_Updates {
145
  $this->reset_flush_rewrite_rules_201906();
146
  }
147
 
 
148
  if (
149
- version_compare( $old_version, '3.2', '<' )
 
150
  ) {
151
- $this->update_schema_markup();
152
  }
153
  }
154
 
@@ -164,8 +166,8 @@ class AIOSEOP_Updates {
164
 
165
  // Remove 'DOC' from bad bots list to avoid false positives.
166
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
167
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
168
- $list = str_replace(
169
  array(
170
  "DOC\r\n",
171
  "DOC\n",
@@ -173,6 +175,7 @@ class AIOSEOP_Updates {
173
  '',
174
  $list
175
  );
 
176
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
177
  update_option( 'aioseop_options', $aioseop_options );
178
  $aiosp->update_class_option( $aioseop_options );
@@ -194,8 +197,8 @@ class AIOSEOP_Updates {
194
 
195
  // Remove 'yandex' from bad bots list to avoid false positives.
196
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
197
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
198
- $list = str_replace(
199
  array(
200
  "yandex\r\n",
201
  "yandex\n",
@@ -203,6 +206,7 @@ class AIOSEOP_Updates {
203
  '',
204
  $list
205
  );
 
206
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
207
  update_option( 'aioseop_options', $aioseop_options );
208
  $aiosp->update_class_option( $aioseop_options );
@@ -220,8 +224,8 @@ class AIOSEOP_Updates {
220
 
221
  // Remove 'SeznamBot' from bad bots list to avoid false positives.
222
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
223
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
224
- $list = str_replace(
225
  array(
226
  "SeznamBot\r\n",
227
  "SeznamBot\n",
@@ -229,6 +233,7 @@ class AIOSEOP_Updates {
229
  '',
230
  $list
231
  );
 
232
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
233
  update_option( 'aioseop_options', $aioseop_options );
234
  $aiosp->update_class_option( $aioseop_options );
@@ -246,8 +251,8 @@ class AIOSEOP_Updates {
246
 
247
  // Remove 'SemrushBot' from bad bots list to avoid false positives.
248
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
249
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
250
- $list = str_replace(
251
  array(
252
  "SemrushBot\r\n",
253
  "SemrushBot\n",
@@ -255,6 +260,7 @@ class AIOSEOP_Updates {
255
  '',
256
  $list
257
  );
 
258
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
259
  update_option( 'aioseop_options', $aioseop_options );
260
  $aiosp->update_class_option( $aioseop_options );
@@ -271,8 +277,8 @@ class AIOSEOP_Updates {
271
  global $aiosp, $aioseop_options;
272
 
273
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
274
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
275
- $list = str_replace(
276
  array(
277
  "Exabot\r\n",
278
  "Exabot\n",
@@ -280,6 +286,7 @@ class AIOSEOP_Updates {
280
  '',
281
  $list
282
  );
 
283
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
284
  update_option( 'aioseop_options', $aioseop_options );
285
  $aiosp->update_class_option( $aioseop_options );
@@ -367,7 +374,7 @@ class AIOSEOP_Updates {
367
  *
368
  * @since 3.2
369
  */
370
- public function update_schema_markup() {
371
  global $aiosp;
372
  global $aioseop_options;
373
 
66
  set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
67
  }
68
  delete_transient( 'aioseop_feed' );
69
+ // add_action( 'admin_init', array( $this, 'aioseop_welcome' ) ); //Uncomment for welcome screen.
70
 
71
  }
72
 
145
  $this->reset_flush_rewrite_rules_201906();
146
  }
147
 
148
+ // Cause the update to occur again for 3.2.6.
149
  if (
150
+ version_compare( $old_version, '3.2', '<' ) ||
151
+ version_compare( $old_version, '3.2.6', '<' )
152
  ) {
153
+ $this->update_schema_markup_201907();
154
  }
155
  }
156
 
166
 
167
  // Remove 'DOC' from bad bots list to avoid false positives.
168
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
169
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
170
+ $list = str_replace(
171
  array(
172
  "DOC\r\n",
173
  "DOC\n",
175
  '',
176
  $list
177
  );
178
+
179
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
180
  update_option( 'aioseop_options', $aioseop_options );
181
  $aiosp->update_class_option( $aioseop_options );
197
 
198
  // Remove 'yandex' from bad bots list to avoid false positives.
199
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
200
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
201
+ $list = str_replace(
202
  array(
203
  "yandex\r\n",
204
  "yandex\n",
206
  '',
207
  $list
208
  );
209
+
210
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
211
  update_option( 'aioseop_options', $aioseop_options );
212
  $aiosp->update_class_option( $aioseop_options );
224
 
225
  // Remove 'SeznamBot' from bad bots list to avoid false positives.
226
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
227
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
228
+ $list = str_replace(
229
  array(
230
  "SeznamBot\r\n",
231
  "SeznamBot\n",
233
  '',
234
  $list
235
  );
236
+
237
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
238
  update_option( 'aioseop_options', $aioseop_options );
239
  $aiosp->update_class_option( $aioseop_options );
251
 
252
  // Remove 'SemrushBot' from bad bots list to avoid false positives.
253
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
254
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
255
+ $list = str_replace(
256
  array(
257
  "SemrushBot\r\n",
258
  "SemrushBot\n",
260
  '',
261
  $list
262
  );
263
+
264
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
265
  update_option( 'aioseop_options', $aioseop_options );
266
  $aiosp->update_class_option( $aioseop_options );
277
  global $aiosp, $aioseop_options;
278
 
279
  if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
280
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
281
+ $list = str_replace(
282
  array(
283
  "Exabot\r\n",
284
  "Exabot\n",
286
  '',
287
  $list
288
  );
289
+
290
  $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
291
  update_option( 'aioseop_options', $aioseop_options );
292
  $aiosp->update_class_option( $aioseop_options );
374
  *
375
  * @since 3.2
376
  */
377
+ public function update_schema_markup_201907() {
378
  global $aiosp;
379
  global $aioseop_options;
380
 
inc/aiosp_common.php CHANGED
@@ -58,7 +58,7 @@ class aiosp_common {
58
  * @return array|null|string|WP_Post
59
  */
60
  static function get_blog_page( $p = null ) {
61
- static $blog_page = '';
62
  static $page_for_posts = '';
63
  if ( null === $p ) {
64
  global $post;
@@ -173,19 +173,19 @@ class aiosp_common {
173
  if ( 0 !== strpos( $url, 'http' ) ) {
174
  if ( 0 === strpos( $url, '//' ) ) {
175
  // for //<host>/resource type urls.
176
- $url = $scheme . ':' . $url;
177
  } elseif ( strpos( $url, '.' ) !== false && strpos( $url, '/' ) !== false && strpos( $url, '.' ) < strpos( $url, '/' ) ) {
178
  // if the . comes before the first / then this is absolute.
179
- $url = $scheme . '://' . $url;
180
  } else {
181
  // for /resource type urls.
182
  $url = home_url( $url );
183
  }
184
  } elseif ( strpos( $url, 'http://' ) === false ) {
185
  if ( 0 === strpos( $url, 'http:/' ) ) {
186
- $url = $scheme . '://' . str_replace( 'http:/', '', $url );
187
  } elseif ( 0 === strpos( $url, 'http:' ) ) {
188
- $url = $scheme . '://' . str_replace( 'http:', '', $url );
189
  }
190
  }
191
  return $url;
@@ -264,7 +264,7 @@ class aiosp_common {
264
  static $results_1;
265
  static $results_2;
266
 
267
- $id = 0;
268
  $url_md5 = md5( $url );
269
 
270
  // Gets the URL => PostIDs array.
58
  * @return array|null|string|WP_Post
59
  */
60
  static function get_blog_page( $p = null ) {
61
+ static $blog_page = '';
62
  static $page_for_posts = '';
63
  if ( null === $p ) {
64
  global $post;
173
  if ( 0 !== strpos( $url, 'http' ) ) {
174
  if ( 0 === strpos( $url, '//' ) ) {
175
  // for //<host>/resource type urls.
176
+ $url = $scheme . ':' . $url;
177
  } elseif ( strpos( $url, '.' ) !== false && strpos( $url, '/' ) !== false && strpos( $url, '.' ) < strpos( $url, '/' ) ) {
178
  // if the . comes before the first / then this is absolute.
179
+ $url = $scheme . '://' . $url;
180
  } else {
181
  // for /resource type urls.
182
  $url = home_url( $url );
183
  }
184
  } elseif ( strpos( $url, 'http://' ) === false ) {
185
  if ( 0 === strpos( $url, 'http:/' ) ) {
186
+ $url = $scheme . '://' . str_replace( 'http:/', '', $url );
187
  } elseif ( 0 === strpos( $url, 'http:' ) ) {
188
+ $url = $scheme . '://' . str_replace( 'http:', '', $url );
189
  }
190
  }
191
  return $url;
264
  static $results_1;
265
  static $results_2;
266
 
267
+ $id = 0;
268
  $url_md5 = md5( $url );
269
 
270
  // Gets the URL => PostIDs array.
inc/compatability/compat-gutenberg.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/compat-init.php CHANGED
@@ -52,7 +52,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
52
 
53
  // Remove Twitter plugin's meta if our Social Module is on.
54
  global $aioseop_options;
55
- if ( isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) && $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] === 'on' ) {
 
 
 
56
  add_filter( 'twitter_card', array( $this, 'aioseop_disable_twitter' ) );
57
  }
58
  // Run compatibility classes.
@@ -132,7 +135,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
132
 
133
  global $aioseop_options;
134
  // Check if AIOSEOP's sitemap exists.
135
- if ( isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) && $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] === 'on' ) {
 
 
 
136
  unset( $modules['sitemaps'] ); // Remove Jetpack's sitemap.
137
  }
138
 
@@ -146,6 +152,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
146
  * @since 2.3.12.3 WPML compatibility loaded.
147
  */
148
  public function load_compatibility_classes() {
 
149
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
150
  // Evaluate classes and push them into array.
151
  $target = new All_in_One_SEO_Pack_Wpml;
52
 
53
  // Remove Twitter plugin's meta if our Social Module is on.
54
  global $aioseop_options;
55
+ if (
56
+ isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) &&
57
+ 'on' === $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph']
58
+ ) {
59
  add_filter( 'twitter_card', array( $this, 'aioseop_disable_twitter' ) );
60
  }
61
  // Run compatibility classes.
135
 
136
  global $aioseop_options;
137
  // Check if AIOSEOP's sitemap exists.
138
+ if (
139
+ isset( $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) &&
140
+ 'on' === $aioseop_options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap']
141
+ ) {
142
  unset( $modules['sitemaps'] ); // Remove Jetpack's sitemap.
143
  }
144
 
152
  * @since 2.3.12.3 WPML compatibility loaded.
153
  */
154
  public function load_compatibility_classes() {
155
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-gutenberg.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;
inc/compatability/compat-wpml.php CHANGED
@@ -55,8 +55,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
55
  // Remove query string.
56
  preg_match_all( '/\?[\s\S]+/', $url, $matches );
57
  // Get base.
58
- $url = preg_replace( '/\?[\s\S]+/', '', $url );
59
- $url = trailingslashit( $url );
60
  $url .= preg_replace( '/\//', '', $path, 1 );
61
  // Add query string.
62
  if ( count( $matches ) > 0 && count( $matches[0] ) > 0 ) {
55
  // Remove query string.
56
  preg_match_all( '/\?[\s\S]+/', $url, $matches );
57
  // Get base.
58
+ $url = preg_replace( '/\?[\s\S]+/', '', $url );
59
+ $url = trailingslashit( $url );
60
  $url .= preg_replace( '/\//', '', $path, 1 );
61
  // Add query string.
62
  if ( count( $matches ) > 0 && count( $matches[0] ) > 0 ) {
inc/extlib/OAuth.php DELETED
@@ -1,939 +0,0 @@
1
- <?php
2
- /* OAuth PHP Library
3
- * http://oauth.googlecode.com/svn/code/php/
4
- *
5
- * License: The MIT License
6
- *
7
- * Copyright (c) 2007 Andy Smith
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in
17
- * all copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- * THE SOFTWARE.
26
- *
27
- */
28
- // vim: foldmethod=marker
29
-
30
- /* Generic exception class
31
- */
32
- if ( !class_exists( 'OAuthException' ) ) {
33
- class OAuthException extends Exception {
34
- // pass
35
- }
36
- }
37
-
38
- if ( !class_exists( 'OAuthConsumer' ) ) {
39
- class OAuthConsumer {
40
- public $key;
41
- public $secret;
42
-
43
- function __construct($key, $secret, $callback_url=NULL) {
44
- $this->key = $key;
45
- $this->secret = $secret;
46
- $this->callback_url = $callback_url;
47
- }
48
-
49
- function __toString() {
50
- return "OAuthConsumer[key=$this->key,secret=$this->secret]";
51
- }
52
- }
53
- }
54
-
55
- if ( !class_exists( 'OAuthToken' ) ) {
56
- class OAuthToken {
57
- // access tokens and request tokens
58
- public $key;
59
- public $secret;
60
-
61
- /**
62
- * key = the token
63
- * secret = the token secret
64
- */
65
- function __construct($key, $secret) {
66
- $this->key = $key;
67
- $this->secret = $secret;
68
- }
69
-
70
- /**
71
- * generates the basic string serialization of a token that a server
72
- * would respond to request_token and access_token calls with
73
- */
74
- function to_string() {
75
- return "oauth_token=" .
76
- OAuthUtil::urlencode_rfc3986($this->key) .
77
- "&oauth_token_secret=" .
78
- OAuthUtil::urlencode_rfc3986($this->secret);
79
- }
80
-
81
- function __toString() {
82
- return $this->to_string();
83
- }
84
- }
85
- }
86
-
87
- if ( !class_exists('OAuthSignatureMethod') ) {
88
- /**
89
- * A class for implementing a Signature Method
90
- * See section 9 ("Signing Requests") in the spec
91
- */
92
- abstract class OAuthSignatureMethod {
93
- /**
94
- * Needs to return the name of the Signature Method (ie HMAC-SHA1)
95
- * @return string
96
- */
97
- abstract public function get_name();
98
-
99
- /**
100
- * Build up the signature
101
- * NOTE: The output of this function MUST NOT be urlencoded.
102
- * the encoding is handled in OAuthRequest when the final
103
- * request is serialized
104
- * @param OAuthRequest $request
105
- * @param OAuthConsumer $consumer
106
- * @param OAuthToken $token
107
- * @return string
108
- */
109
- abstract public function build_signature($request, $consumer, $token);
110
-
111
- /**
112
- * Verifies that a given signature is correct
113
- * @param OAuthRequest $request
114
- * @param OAuthConsumer $consumer
115
- * @param OAuthToken $token
116
- * @param string $signature
117
- * @return bool
118
- */
119
- public function check_signature($request, $consumer, $token, $signature) {
120
- $built = $this->build_signature($request, $consumer, $token);
121
-
122
- // Check for zero length, although unlikely here
123
- if (strlen($built) == 0 || strlen($signature) == 0) {
124
- return false;
125
- }
126
-
127
- if (strlen($built) != strlen($signature)) {
128
- return false;
129
- }
130
-
131
- // Avoid a timing leak with a (hopefully) time insensitive compare
132
- $result = 0;
133
- for ($i = 0; $i < strlen($signature); $i++) {
134
- $result |= ord($built{$i}) ^ ord($signature{$i});
135
- }
136
-
137
- return $result == 0;
138
- }
139
- }
140
- }
141
-
142
- if ( !class_exists('OAuthSignatureMethod_HMAC_SHA1') ) {
143
- /**
144
- * The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
145
- * where the Signature Base String is the text and the key is the concatenated values (each first
146
- * encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
147
- * character (ASCII code 38) even if empty.
148
- * - Chapter 9.2 ("HMAC-SHA1")
149
- */
150
- class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
151
- function get_name() {
152
- return "HMAC-SHA1";
153
- }
154
-
155
- public function build_signature($request, $consumer, $token) {
156
- $base_string = $request->get_signature_base_string();
157
- $request->base_string = $base_string;
158
-
159
- $key_parts = array(
160
- $consumer->secret,
161
- ($token) ? $token->secret : ""
162
- );
163
-
164
- $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
165
- $key = implode('&', $key_parts);
166
-
167
- return base64_encode(hash_hmac('sha1', $base_string, $key, true));
168
- }
169
- }
170
- }
171
-
172
- if ( !class_exists('OAuthSignatureMethod_PLAINTEXT') ) {
173
- /**
174
- * The PLAINTEXT method does not provide any security protection and SHOULD only be used
175
- * over a secure channel such as HTTPS. It does not use the Signature Base String.
176
- * - Chapter 9.4 ("PLAINTEXT")
177
- */
178
- class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
179
- public function get_name() {
180
- return "PLAINTEXT";
181
- }
182
-
183
- /**
184
- * oauth_signature is set to the concatenated encoded values of the Consumer Secret and
185
- * Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
186
- * empty. The result MUST be encoded again.
187
- * - Chapter 9.4.1 ("Generating Signatures")
188
- *
189
- * Please note that the second encoding MUST NOT happen in the SignatureMethod, as
190
- * OAuthRequest handles this!
191
- */
192
- public function build_signature($request, $consumer, $token) {
193
- $key_parts = array(
194
- $consumer->secret,
195
- ($token) ? $token->secret : ""
196
- );
197
-
198
- $key_parts = OAuthUtil::urlencode_rfc3986($key_parts);
199
- $key = implode('&', $key_parts);
200
- $request->base_string = $key;
201
-
202
- return $key;
203
- }
204
- }
205
- }
206
-
207
-
208
- if ( !class_exists('OAuthSignatureMethod_RSA_SHA1') ) {
209
- /**
210
- * The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
211
- * [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
212
- * EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
213
- * verified way to the Service Provider, in a manner which is beyond the scope of this
214
- * specification.
215
- * - Chapter 9.3 ("RSA-SHA1")
216
- */
217
- abstract class OAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod {
218
- public function get_name() {
219
- return "RSA-SHA1";
220
- }
221
-
222
- // Up to the SP to implement this lookup of keys. Possible ideas are:
223
- // (1) do a lookup in a table of trusted certs keyed off of consumer
224
- // (2) fetch via http using a url provided by the requester
225
- // (3) some sort of specific discovery code based on request
226
- //
227
- // Either way should return a string representation of the certificate
228
- protected abstract function fetch_public_cert(&$request);
229
-
230
- // Up to the SP to implement this lookup of keys. Possible ideas are:
231
- // (1) do a lookup in a table of trusted certs keyed off of consumer
232
- //
233
- // Either way should return a string representation of the certificate
234
- protected abstract function fetch_private_cert(&$request);
235
-
236
- public function build_signature($request, $consumer, $token) {
237
- $base_string = $request->get_signature_base_string();
238
- $request->base_string = $base_string;
239
-
240
- // Fetch the private key cert based on the request
241
- $cert = $this->fetch_private_cert($request);
242
-
243
- // Pull the private key ID from the certificate
244
- $privatekeyid = openssl_get_privatekey($cert);
245
-
246
- // Sign using the key
247
- $ok = openssl_sign($base_string, $signature, $privatekeyid);
248
-
249
- // Release the key resource
250
- openssl_free_key($privatekeyid);
251
-
252
- return base64_encode($signature);
253
- }
254
-
255
- public function check_signature($request, $consumer, $token, $signature) {
256
- $decoded_sig = base64_decode($signature);
257
-
258
- $base_string = $request->get_signature_base_string();
259
-
260
- // Fetch the public key cert based on the request
261
- $cert = $this->fetch_public_cert($request);
262
-
263
- // Pull the public key ID from the certificate
264
- $publickeyid = openssl_get_publickey($cert);
265
-
266
- // Check the computed signature against the one passed in the query
267
- $ok = openssl_verify($base_string, $decoded_sig, $publickeyid);
268
-
269
- // Release the key resource
270
- openssl_free_key($publickeyid);
271
-
272
- return $ok == 1;
273
- }
274
- }
275
- }
276
-
277
- if ( !class_exists('OAuthRequest') ) {
278
- class OAuthRequest {
279
- protected $parameters;
280
- protected $http_method;
281
- protected $http_url;
282
- // for debug purposes
283
- public $base_string;
284
- public static $version = '1.0';
285
- public static $POST_INPUT = 'php://input';
286
-
287
- function __construct($http_method, $http_url, $parameters=NULL) {
288
- $parameters = ($parameters) ? $parameters : array();
289
- $parameters = array_merge( OAuthUtil::parse_parameters(parse_url($http_url, PHP_URL_QUERY)), $parameters);
290
- $this->parameters = $parameters;
291
- $this->http_method = $http_method;
292
- $this->http_url = $http_url;
293
- }
294
-
295
-
296
- /**
297
- * attempt to build up a request from what was passed to the server
298
- */
299
- public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {
300
- $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on")
301
- ? 'http'
302
- : 'https';
303
- $http_url = ($http_url) ? $http_url : $scheme .
304
- '://' . $_SERVER['SERVER_NAME'] .
305
- ':' .
306
- $_SERVER['SERVER_PORT'] .
307
- $_SERVER['REQUEST_URI'];
308
- $http_method = ($http_method) ? $http_method : $_SERVER['REQUEST_METHOD'];
309
-
310
- // We weren't handed any parameters, so let's find the ones relevant to
311
- // this request.
312
- // If you run XML-RPC or similar you should use this to provide your own
313
- // parsed parameter-list
314
- if (!$parameters) {
315
- // Find request headers
316
- $request_headers = OAuthUtil::get_headers();
317
-
318
- // Parse the query-string to find GET parameters
319
- $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']);
320
-
321
- // It's a POST request of the proper content-type, so parse POST
322
- // parameters and add those overriding any duplicates from GET
323
- if ($http_method == "POST"
324
- && isset($request_headers['Content-Type'])
325
- && strstr($request_headers['Content-Type'],
326
- 'application/x-www-form-urlencoded')
327
- ) {
328
- $post_data = OAuthUtil::parse_parameters(
329
- file_get_contents(self::$POST_INPUT)
330
- );
331
- $parameters = array_merge($parameters, $post_data);
332
- }
333
-
334
- // We have a Authorization-header with OAuth data. Parse the header
335
- // and add those overriding any duplicates from GET or POST
336
- if (isset($request_headers['Authorization']) && substr($request_headers['Authorization'], 0, 6) == 'OAuth ') {
337
- $header_parameters = OAuthUtil::split_header(
338
- $request_headers['Authorization']
339
- );
340
- $parameters = array_merge($parameters, $header_parameters);
341
- }
342
-
343
- }
344
-
345
- return new OAuthRequest($http_method, $http_url, $parameters);
346
- }
347
-
348
- /**
349
- * pretty much a helper function to set up the request
350
- */
351
- public static function from_consumer_and_token($consumer, $token, $http_method, $http_url, $parameters=NULL) {
352
- $parameters = ($parameters) ? $parameters : array();
353
- $defaults = array("oauth_version" => OAuthRequest::$version,
354
- "oauth_nonce" => OAuthRequest::generate_nonce(),
355
- "oauth_timestamp" => OAuthRequest::generate_timestamp(),
356
- "oauth_consumer_key" => $consumer->key);
357
- if ($token)
358
- $defaults['oauth_token'] = $token->key;
359
-
360
- $parameters = array_merge($defaults, $parameters);
361
-
362
- return new OAuthRequest($http_method, $http_url, $parameters);
363
- }
364
-
365
- public function set_parameter($name, $value, $allow_duplicates = true) {
366
- if ($allow_duplicates && isset($this->parameters[$name])) {
367
- // We have already added parameter(s) with this name, so add to the list
368
- if (is_scalar($this->parameters[$name])) {
369
- // This is the first duplicate, so transform scalar (string)
370
- // into an array so we can add the duplicates
371
- $this->parameters[$name] = array($this->parameters[$name]);
372
- }
373
-
374
- $this->parameters[$name][] = $value;
375
- } else {
376
- $this->parameters[$name] = $value;
377
- }
378
- }
379
-
380
- public function get_parameter($name) {
381
- return isset($this->parameters[$name]) ? $this->parameters[$name] : null;
382
- }
383
-
384
- public function get_parameters() {
385
- return $this->parameters;
386
- }
387
-
388
- public function unset_parameter($name) {
389
- unset($this->parameters[$name]);
390
- }
391
-
392
- /**
393
- * The request parameters, sorted and concatenated into a normalized string.
394
- * @return string
395
- */
396
- public function get_signable_parameters() {
397
- // Grab all parameters
398
- $params = $this->parameters;
399
-
400
- // Remove oauth_signature if present
401
- // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
402
- if (isset($params['oauth_signature'])) {
403
- unset($params['oauth_signature']);
404
- }
405
-
406
- return OAuthUtil::build_http_query($params);
407
- }
408
-
409
- /**
410
- * Returns the base string of this request
411
- *
412
- * The base string defined as the method, the url
413
- * and the parameters (normalized), each urlencoded
414
- * and the concated with &.
415
- */
416
- public function get_signature_base_string() {
417
- $parts = array(
418
- $this->get_normalized_http_method(),
419
- $this->get_normalized_http_url(),
420
- $this->get_signable_parameters()
421
- );
422
-
423
- $parts = OAuthUtil::urlencode_rfc3986($parts);
424
-
425
- return implode('&', $parts);
426
- }
427
-
428
- /**
429
- * just uppercases the http method
430
- */
431
- public function get_normalized_http_method() {
432
- return strtoupper($this->http_method);
433
- }
434
-
435
- /**
436
- * parses the url and rebuilds it to be
437
- * scheme://host/path
438
- */
439
- public function get_normalized_http_url() {
440
- $parts = parse_url($this->http_url);
441
-
442
- $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';
443
- $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');
444
- $host = (isset($parts['host'])) ? strtolower($parts['host']) : '';
445
- $path = (isset($parts['path'])) ? $parts['path'] : '';
446
-
447
- if (($scheme == 'https' && $port != '443')
448
- || ($scheme == 'http' && $port != '80')) {
449
- $host = "$host:$port";
450
- }
451
- return "$scheme://$host$path";
452
- }
453
-
454
- /**
455
- * builds a url usable for a GET request
456
- */
457
- public function to_url() {
458
- $post_data = $this->to_postdata();
459
- $out = $this->get_normalized_http_url();
460
- if ($post_data) {
461
- $out .= '?'.$post_data;
462
- }
463
- return $out;
464
- }
465
-
466
- /**
467
- * builds the data one would send in a POST request
468
- */
469
- public function to_postdata() {
470
- return OAuthUtil::build_http_query($this->parameters);
471
- }
472
-
473
- /**
474
- * builds the Authorization: header
475
- */
476
- public function to_header($realm=null) {
477
- $first = true;
478
- if($realm) {
479
- $out = 'Authorization: OAuth realm="' . OAuthUtil::urlencode_rfc3986($realm) . '"';
480
- $first = false;
481
- } else
482
- $out = 'Authorization: OAuth';
483
-
484
- $total = array();
485
- foreach ($this->parameters as $k => $v) {
486
- if (substr($k, 0, 5) != "oauth") continue;
487
- if (is_array($v)) {
488
- throw new OAuthException('Arrays not supported in headers');
489
- }
490
- $out .= ($first) ? ' ' : ',';
491
- $out .= OAuthUtil::urlencode_rfc3986($k) .
492
- '="' .
493
- OAuthUtil::urlencode_rfc3986($v) .
494
- '"';
495
- $first = false;
496
- }
497
- return $out;
498
- }
499
-
500
- public function __toString() {
501
- return $this->to_url();
502
- }
503
-
504
-
505
- public function sign_request($signature_method, $consumer, $token) {
506
- $this->set_parameter(
507
- "oauth_signature_method",
508
- $signature_method->get_name(),
509
- false
510
- );
511
- $signature = $this->build_signature($signature_method, $consumer, $token);
512
- $this->set_parameter("oauth_signature", $signature, false);
513
- }
514
-
515
- public function build_signature($signature_method, $consumer, $token) {
516
- $signature = $signature_method->build_signature($this, $consumer, $token);
517
- return $signature;
518
- }
519
-
520
- /**
521
- * util function: current timestamp
522
- */
523
- private static function generate_timestamp() {
524
- return time();
525
- }
526
-
527
- /**
528
- * util function: current nonce
529
- */
530
- private static function generate_nonce() {
531
- $mt = microtime();
532
- $rand = mt_rand();
533
-
534
- return md5($mt . $rand); // md5s look nicer than numbers
535
- }
536
- }
537
- }
538
-
539
- if ( !class_exists('OAuthServer') ) {
540
- class OAuthServer {
541
- protected $timestamp_threshold = 300; // in seconds, five minutes
542
- protected $version = '1.0'; // hi blaine
543
- protected $signature_methods = array();
544
-
545
- protected $data_store;
546
-
547
- function __construct($data_store) {
548
- $this->data_store = $data_store;
549
- }
550
-
551
- public function add_signature_method($signature_method) {
552
- $this->signature_methods[$signature_method->get_name()] =
553
- $signature_method;
554
- }
555
-
556
- // high level functions
557
-
558
- /**
559
- * process a request_token request
560
- * returns the request token on success
561
- */
562
- public function fetch_request_token(&$request) {
563
- $this->get_version($request);
564
-
565
- $consumer = $this->get_consumer($request);
566
-
567
- // no token required for the initial token request
568
- $token = NULL;
569
-
570
- $this->check_signature($request, $consumer, $token);
571
-
572
- // Rev A change
573
- $callback = $request->get_parameter('oauth_callback');
574
- $new_token = $this->data_store->new_request_token($consumer, $callback);
575
-
576
- return $new_token;
577
- }
578
-
579
- /**
580
- * process an access_token request
581
- * returns the access token on success
582
- */
583
- public function fetch_access_token(&$request) {
584
- $this->get_version($request);
585
-
586
- $consumer = $this->get_consumer($request);
587
-
588
- // requires authorized request token
589
- $token = $this->get_token($request, $consumer, "request");
590
-
591
- $this->check_signature($request, $consumer, $token);
592
-
593
- // Rev A change
594
- $verifier = $request->get_parameter('oauth_verifier');
595
- $new_token = $this->data_store->new_access_token($token, $consumer, $verifier);
596
-
597
- return $new_token;
598
- }
599
-
600
- /**
601
- * verify an api call, checks all the parameters
602
- */
603
- public function verify_request(&$request) {
604
- $this->get_version($request);
605
- $consumer = $this->get_consumer($request);
606
- $token = $this->get_token($request, $consumer, "access");
607
- $this->check_signature($request, $consumer, $token);
608
- return array($consumer, $token);
609
- }
610
-
611
- // Internals from here
612
- /**
613
- * version 1
614
- */
615
- private function get_version(&$request) {
616
- $version = $request->get_parameter("oauth_version");
617
- if (!$version) {
618
- // Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
619
- // Chapter 7.0 ("Accessing Protected Ressources")
620
- $version = '1.0';
621
- }
622
- if ($version !== $this->version) {
623
- throw new OAuthException("OAuth version '$version' not supported");
624
- }
625
- return $version;
626
- }
627
-
628
- /**
629
- * figure out the signature with some defaults
630
- */
631
- private function get_signature_method($request) {
632
- $signature_method = $request instanceof OAuthRequest
633
- ? $request->get_parameter("oauth_signature_method")
634
- : NULL;
635
-
636
- if (!$signature_method) {
637
- // According to chapter 7 ("Accessing Protected Ressources") the signature-method
638
- // parameter is required, and we can't just fallback to PLAINTEXT
639
- throw new OAuthException('No signature method parameter. This parameter is required');
640
- }
641
-
642
- if (!in_array($signature_method,
643
- array_keys($this->signature_methods))) {
644
- throw new OAuthException(
645
- "Signature method '$signature_method' not supported " .
646
- "try one of the following: " .
647
- implode(", ", array_keys($this->signature_methods))
648
- );
649
- }
650
- return $this->signature_methods[$signature_method];
651
- }
652
-
653
- /**
654
- * try to find the consumer for the provided request's consumer key
655
- */
656
- private function get_consumer($request) {
657
- $consumer_key = $request instanceof OAuthRequest
658
- ? $request->get_parameter("oauth_consumer_key")
659
- : NULL;
660
-
661
- if (!$consumer_key) {
662
- throw new OAuthException("Invalid consumer key");
663
- }
664
-
665
- $consumer = $this->data_store->lookup_consumer($consumer_key);
666
- if (!$consumer) {
667
- throw new OAuthException("Invalid consumer");
668
- }
669
-
670
- return $consumer;
671
- }
672
-
673
- /**
674
- * try to find the token for the provided request's token key
675
- */
676
- private function get_token($request, $consumer, $token_type="access") {
677
- $token_field = $request instanceof OAuthRequest
678
- ? $request->get_parameter('oauth_token')
679
- : NULL;
680
-
681
- $token = $this->data_store->lookup_token(
682
- $consumer, $token_type, $token_field
683
- );
684
- if (!$token) {
685
- throw new OAuthException("Invalid $token_type token: $token_field");
686
- }
687
- return $token;
688
- }
689
-
690
- /**
691
- * all-in-one function to check the signature on a request
692
- * should guess the signature method appropriately
693
- */
694
- private function check_signature($request, $consumer, $token) {
695
- // this should probably be in a different method
696
- $timestamp = $request instanceof OAuthRequest
697
- ? $request->get_parameter('oauth_timestamp')
698
- : NULL;
699
- $nonce = $request instanceof OAuthRequest
700
- ? $request->get_parameter('oauth_nonce')
701
- : NULL;
702
-
703
- $this->check_timestamp($timestamp);
704
- $this->check_nonce($consumer, $token, $nonce, $timestamp);
705
-
706
- $signature_method = $this->get_signature_method($request);
707
-
708
- $signature = $request->get_parameter('oauth_signature');
709
- $valid_sig = $signature_method->check_signature(
710
- $request,
711
- $consumer,
712
- $token,
713
- $signature
714
- );
715
-
716
- if (!$valid_sig) {
717
- throw new OAuthException("Invalid signature");
718
- }
719
- }
720
-
721
- /**
722
- * check that the timestamp is new enough
723
- */
724
- private function check_timestamp($timestamp) {
725
- if( ! $timestamp )
726
- throw new OAuthException(
727
- 'Missing timestamp parameter. The parameter is required'
728
- );
729
-
730
- // verify that timestamp is recentish
731
- $now = time();
732
- if (abs($now - $timestamp) > $this->timestamp_threshold) {
733
- throw new OAuthException(
734
- "Expired timestamp, yours $timestamp, ours $now"
735
- );
736
- }
737
- }
738
-
739
- /**
740
- * check that the nonce is not repeated
741
- */
742
- private function check_nonce($consumer, $token, $nonce, $timestamp) {
743
- if( ! $nonce )
744
- throw new OAuthException(
745
- 'Missing nonce parameter. The parameter is required'
746
- );
747
-
748
- // verify that the nonce is uniqueish
749
- $found = $this->data_store->lookup_nonce(
750
- $consumer,
751
- $token,
752
- $nonce,
753
- $timestamp
754
- );
755
- if ($found) {
756
- throw new OAuthException("Nonce already used: $nonce");
757
- }
758
- }
759
- }
760
- }
761
-
762
- if ( !class_exists('OAuthDataStore') ) {
763
- class OAuthDataStore {
764
- function lookup_consumer($consumer_key) {
765
- // implement me
766
- }
767
-
768
- function lookup_token($consumer, $token_type, $token) {
769
- // implement me
770
- }
771
-
772
- function lookup_nonce($consumer, $token, $nonce, $timestamp) {
773
- // implement me
774
- }
775
-
776
- function new_request_token($consumer, $callback = null) {
777
- // return a new token attached to this consumer
778
- }
779
-
780
- function new_access_token($token, $consumer, $verifier = null) {
781
- // return a new access token attached to this consumer
782
- // for the user associated with this token if the request token
783
- // is authorized
784
- // should also invalidate the request token
785
- }
786
- }
787
- }
788
-
789
- if ( !class_exists('OAuthUtil') ) {
790
- class OAuthUtil {
791
- public static function urlencode_rfc3986($input) {
792
- if (is_array($input)) {
793
- return array_map(array('OAuthUtil', 'urlencode_rfc3986'), $input);
794
- } else if (is_scalar($input)) {
795
- return str_replace(
796
- '+',
797
- ' ',
798
- str_replace('%7E', '~', rawurlencode($input))
799
- );
800
- } else {
801
- return '';
802
- }
803
- }
804
-
805
- // This decode function isn't taking into consideration the above
806
- // modifications to the encoding process. However, this method doesn't
807
- // seem to be used anywhere so leaving it as is.
808
- public static function urldecode_rfc3986($string) {
809
- return urldecode($string);
810
- }
811
-
812
- // Utility function for turning the Authorization: header into
813
- // parameters, has to do some unescaping
814
- // Can filter out any non-oauth parameters if needed (default behaviour)
815
- // May 28th, 2010 - method updated to tjerk.meesters for a speed improvement.
816
- // see http://code.google.com/p/oauth/issues/detail?id=163
817
- public static function split_header($header, $only_allow_oauth_parameters = true) {
818
- $params = array();
819
- if (preg_match_all('/('.($only_allow_oauth_parameters ? 'oauth_' : '').'[a-z_-]*)=(:?"([^"]*)"|([^,]*))/', $header, $matches)) {
820
- foreach ($matches[1] as $i => $h) {
821
- $params[$h] = OAuthUtil::urldecode_rfc3986(empty($matches[3][$i]) ? $matches[4][$i] : $matches[3][$i]);
822
- }
823
- if (isset($params['realm'])) {
824
- unset($params['realm']);
825
- }
826
- }
827
- return $params;
828
- }
829
-
830
- // helper to try to sort out headers for people who aren't running apache
831
- public static function get_headers() {
832
- if (function_exists('apache_request_headers')) {
833
- // we need this to get the actual Authorization: header
834
- // because apache tends to tell us it doesn't exist
835
- $headers = apache_request_headers();
836
-
837
- // sanitize the output of apache_request_headers because
838
- // we always want the keys to be Cased-Like-This and arh()
839
- // returns the headers in the same case as they are in the
840
- // request
841
- $out = array();
842
- foreach ($headers AS $key => $value) {
843
- $key = str_replace(
844
- " ",
845
- "-",
846
- ucwords(strtolower(str_replace("-", " ", $key)))
847
- );
848
- $out[$key] = $value;
849
- }
850
- } else {
851
- // otherwise we don't have apache and are just going to have to hope
852
- // that $_SERVER actually contains what we need
853
- $out = array();
854
- if( isset($_SERVER['CONTENT_TYPE']) )
855
- $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];
856
- if( isset($_ENV['CONTENT_TYPE']) )
857
- $out['Content-Type'] = $_ENV['CONTENT_TYPE'];
858
-
859
- foreach ($_SERVER as $key => $value) {
860
- if (substr($key, 0, 5) == "HTTP_") {
861
- // this is chaos, basically it is just there to capitalize the first
862
- // letter of every word that is not an initial HTTP and strip HTTP
863
- // code from przemek
864
- $key = str_replace(
865
- " ",
866
- "-",
867
- ucwords(strtolower(str_replace("_", " ", substr($key, 5))))
868
- );
869
- $out[$key] = $value;
870
- }
871
- }
872
- }
873
- return $out;
874
- }
875
-
876
- // This function takes a input like a=b&a=c&d=e and returns the parsed
877
- // parameters like this
878
- // array('a' => array('b','c'), 'd' => 'e')
879
- public static function parse_parameters( $input ) {
880
- if (!isset($input) || !$input) return array();
881
-
882
- $pairs = explode('&', $input);
883
-
884
- $parsed_parameters = array();
885
- foreach ($pairs as $pair) {
886
- $split = explode('=', $pair, 2);
887
- $parameter = OAuthUtil::urldecode_rfc3986($split[0]);
888
- $value = isset($split[1]) ? OAuthUtil::urldecode_rfc3986($split[1]) : '';
889
-
890
- if (isset($parsed_parameters[$parameter])) {
891
- // We have already recieved parameter(s) with this name, so add to the list
892
- // of parameters with this name
893
-
894
- if (is_scalar($parsed_parameters[$parameter])) {
895
- // This is the first duplicate, so transform scalar (string) into an array
896
- // so we can add the duplicates
897
- $parsed_parameters[$parameter] = array($parsed_parameters[$parameter]);
898
- }
899
-
900
- $parsed_parameters[$parameter][] = $value;
901
- } else {
902
- $parsed_parameters[$parameter] = $value;
903
- }
904
- }
905
- return $parsed_parameters;
906
- }
907
-
908
- public static function build_http_query($params) {
909
- if (!$params) return '';
910
-
911
- // Urlencode both keys and values
912
- $keys = OAuthUtil::urlencode_rfc3986(array_keys($params));
913
- $values = OAuthUtil::urlencode_rfc3986(array_values($params));
914
- $params = array_combine($keys, $values);
915
-
916
- // Parameters are sorted by name, using lexicographical byte value ordering.
917
- // Ref: Spec: 9.1.1 (1)
918
- uksort($params, 'strcmp');
919
-
920
- $pairs = array();
921
- foreach ($params as $parameter => $value) {
922
- if (is_array($value)) {
923
- // If two or more parameters share the same name, they are sorted by their value
924
- // Ref: Spec: 9.1.1 (1)
925
- // June 12th, 2010 - changed to sort because of issue 164 by hidetaka
926
- sort($value, SORT_STRING);
927
- foreach ($value as $duplicate_value) {
928
- $pairs[] = $parameter . '=' . $duplicate_value;
929
- }
930
- } else {
931
- $pairs[] = $parameter . '=' . $value;
932
- }
933
- }
934
- // For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)
935
- // Each name-value pair is separated by an '&' character (ASCII code 38)
936
- return implode('&', $pairs);
937
- }
938
- }
939
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/schema/graphs/graph-organization.php CHANGED
@@ -68,11 +68,15 @@ class AIOSEOP_Graph_Organization extends AIOSEOP_Graph {
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.
75
- $rtn_data['name'] = $aioseop_options['aiosp_schema_organization_name'] ?: get_bloginfo( 'name' );
 
 
 
 
76
  $rtn_data['sameAs'] = $this->get_site_social_profile_links();
77
 
78
  // Handle Logo/Image.
@@ -104,7 +108,7 @@ class AIOSEOP_Graph_Organization extends AIOSEOP_Graph {
104
  protected function prepare_logo() {
105
  $rtn_data = array();
106
 
107
- $logo_id = $this->get_logo_id();
108
  if ( ! empty( $logo_id ) ) {
109
  $rtn_data = array(
110
  '@type' => 'ImageObject',
@@ -115,7 +119,7 @@ class AIOSEOP_Graph_Organization extends AIOSEOP_Graph {
115
  $logo_meta = wp_get_attachment_metadata( $logo_id );
116
  // Get image dimensions. Some images may not have this property.
117
  if ( isset( $rtn_data['width'] ) ) {
118
- $rtn_data['width'] = $logo_meta['width'];
119
  }
120
  if ( isset( $rtn_data['height'] ) ) {
121
  $rtn_data['height'] = $logo_meta['height'];
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.
75
+ if ( $aioseop_options['aiosp_schema_organization_name'] ) {
76
+ $rtn_data['name'] = $aioseop_options['aiosp_schema_organization_name'];
77
+ } else {
78
+ $rtn_data['name'] = get_bloginfo( 'name' );
79
+ }
80
  $rtn_data['sameAs'] = $this->get_site_social_profile_links();
81
 
82
  // Handle Logo/Image.
108
  protected function prepare_logo() {
109
  $rtn_data = array();
110
 
111
+ $logo_id = $this->get_logo_id();
112
  if ( ! empty( $logo_id ) ) {
113
  $rtn_data = array(
114
  '@type' => 'ImageObject',
119
  $logo_meta = wp_get_attachment_metadata( $logo_id );
120
  // Get image dimensions. Some images may not have this property.
121
  if ( isset( $rtn_data['width'] ) ) {
122
+ $rtn_data['width'] = $logo_meta['width'];
123
  }
124
  if ( isset( $rtn_data['height'] ) ) {
125
  $rtn_data['height'] = $logo_meta['height'];
inc/schema/graphs/graph.php CHANGED
@@ -149,7 +149,21 @@ abstract class AIOSEOP_Graph {
149
  * @param array Dynamically generated data through inherited schema graphs.
150
  */
151
  $schema_data = apply_filters( 'aioseop_schema_class_data_' . get_class( $this ), $this->prepare() );
152
- return wp_json_encode( (object) $schema_data, JSON_UNESCAPED_SLASHES ) ?: '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  }
154
 
155
  /**
@@ -318,7 +332,7 @@ abstract class AIOSEOP_Graph {
318
  */
319
  protected function get_user_social_profile_links( $user_id ) {
320
  $rtn_social_profiles = array();
321
- $social_sites = array(
322
  'facebook',
323
  'twitter',
324
  );
149
  * @param array Dynamically generated data through inherited schema graphs.
150
  */
151
  $schema_data = apply_filters( 'aioseop_schema_class_data_' . get_class( $this ), $this->prepare() );
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 );
159
+ $schema_data = str_replace( '\/', '/', $schema_data );
160
+ }
161
+ // If json encode returned false, set as empty string.
162
+ if ( ! $schema_data ) {
163
+ $schema_data = '';
164
+ }
165
+
166
+ return $schema_data;
167
  }
168
 
169
  /**
332
  */
333
  protected function get_user_social_profile_links( $user_id ) {
334
  $rtn_social_profiles = array();
335
+ $social_sites = array(
336
  'facebook',
337
  'twitter',
338
  );
inc/schema/schema-builder.php CHANGED
@@ -157,7 +157,14 @@ class AIOSEOP_Schema_Builder {
157
  $layout = apply_filters( 'aioseop_schema_layout', $layout );
158
 
159
  // Encode to json string, and remove string type around shortcodes.
160
- $layout = wp_json_encode( (object) $layout, JSON_UNESCAPED_SLASHES );
 
 
 
 
 
 
 
161
  $layout = str_replace( '"[', '[', $layout );
162
  $layout = str_replace( ']"', ']', $layout );
163
 
157
  $layout = apply_filters( 'aioseop_schema_layout', $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 );
162
+ } else {
163
+ // PHP <= 5.3 compatibility.
164
+ $layout = wp_json_encode( (object) $layout );
165
+ $layout = str_replace( '\/', '/', $layout );
166
+ }
167
+
168
  $layout = str_replace( '"[', '[', $layout );
169
  $layout = str_replace( ']"', ']', $layout );
170
 
inc/translations.php CHANGED
@@ -107,7 +107,7 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
107
 
108
  $this->current_locale = get_locale();
109
 
110
- if ( $this->current_locale === 'en_US' ) {
111
  return;
112
  }
113
 
@@ -153,9 +153,10 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
153
  $current_locale = $this->current_locale;
154
 
155
  if ( strpos( $current_locale, '_formal' ) ) {
156
- $this->formal = 'formal';
157
- $formal = 'formal';
158
- $short_locale = $this->short_locale = str_replace( '_formal', '', $current_locale );
 
159
  } else {
160
  $short_locale = $current_locale;
161
  $this->formal = 'default';
@@ -267,7 +268,7 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
267
 
268
  $json = $this->get_locale_data();
269
 
270
- if ( $json === false ) {
271
  return false;
272
  }
273
 
107
 
108
  $this->current_locale = get_locale();
109
 
110
+ if ( 'en_US' === $this->current_locale ) {
111
  return;
112
  }
113
 
153
  $current_locale = $this->current_locale;
154
 
155
  if ( strpos( $current_locale, '_formal' ) ) {
156
+ $formal = 'formal';
157
+ $this->formal = 'formal';
158
+ $short_locale = str_replace( '_formal', '', $current_locale );
159
+ $this->short_locale = str_replace( '_formal', '', $current_locale );
160
  } else {
161
  $short_locale = $current_locale;
162
  $this->formal = 'default';
268
 
269
  $json = $this->get_locale_data();
270
 
271
+ if ( false === $json ) {
272
  return false;
273
  }
274
 
modules/aioseop_feature_manager.php CHANGED
@@ -175,7 +175,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
175
  * @return mixed
176
  */
177
  function filter_submit( $submit ) {
178
- $submit['Submit']['value'] = __( 'Update Features', 'all-in-one-seo-pack' ) . ' &raquo;';
179
  $submit['Submit']['class'] .= ' hidden';
180
  /* translators: this button deactivates all active modules of the plugin. */
181
  $submit['Submit_Default']['value'] = __( 'Reset Features', 'all-in-one-seo-pack' ) . ' &raquo;';
@@ -193,7 +193,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
193
  * @return string
194
  */
195
  function display_option_div( $buf, $args ) {
196
- $name = $img = $desc = $checkbox = $class = '';
 
 
 
 
197
  if ( isset( $args['options']['help_text'] ) && ! empty( $args['options']['help_text'] ) ) {
198
  $desc .= '<p class="aioseop_desc">' . $args['options']['help_text'] . '</p>';
199
  }
@@ -207,7 +211,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
207
  }
208
 
209
  if ( $args['options']['save'] ) {
210
- $name = "<h3>{$args['options']['name']}</h3>";
211
  $checkbox .= '<input type="checkbox" onchange="jQuery(\'#' . $args['options']['id'] . ' .aioseop_featured_image, #' . $args['options']['id'] . ' .feature_button\').toggleClass(\'active\', this.checked);jQuery(\'input[name=Submit]\').trigger(\'click\');" style="display:none;" id="' . $args['name'] . '" name="' . $args['name'] . '"';
212
  if ( $args['value'] ) {
213
  $checkbox .= ' CHECKED';
175
  * @return mixed
176
  */
177
  function filter_submit( $submit ) {
178
+ $submit['Submit']['value'] = __( 'Update Features', 'all-in-one-seo-pack' ) . ' &raquo;';
179
  $submit['Submit']['class'] .= ' hidden';
180
  /* translators: this button deactivates all active modules of the plugin. */
181
  $submit['Submit_Default']['value'] = __( 'Reset Features', 'all-in-one-seo-pack' ) . ' &raquo;';
193
  * @return string
194
  */
195
  function display_option_div( $buf, $args ) {
196
+ $name = '';
197
+ $img = '';
198
+ $desc = '';
199
+ $checkbox = '';
200
+ $class = '';
201
  if ( isset( $args['options']['help_text'] ) && ! empty( $args['options']['help_text'] ) ) {
202
  $desc .= '<p class="aioseop_desc">' . $args['options']['help_text'] . '</p>';
203
  }
211
  }
212
 
213
  if ( $args['options']['save'] ) {
214
+ $name = "<h3>{$args['options']['name']}</h3>";
215
  $checkbox .= '<input type="checkbox" onchange="jQuery(\'#' . $args['options']['id'] . ' .aioseop_featured_image, #' . $args['options']['id'] . ' .feature_button\').toggleClass(\'active\', this.checked);jQuery(\'input[name=Submit]\').trigger(\'click\');" style="display:none;" id="' . $args['name'] . '" name="' . $args['name'] . '"';
216
  if ( $args['value'] ) {
217
  $checkbox .= ' CHECKED';
modules/aioseop_file_editor.php CHANGED
@@ -39,7 +39,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_File_Editor' ) ) {
39
  );
40
 
41
  $this->tabs = array(
42
- 'htaccess' => array( 'name' => __( '.htaccess' ) ),
43
  );
44
 
45
  $this->layout = array(
39
  );
40
 
41
  $this->tabs = array(
42
+ 'htaccess' => array( 'name' => __( '.htaccess', 'all-in-one-seo-pack' ) ),
43
  );
44
 
45
  $this->layout = array(
modules/aioseop_importer_exporter.php CHANGED
@@ -19,11 +19,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
19
  * All_in_One_SEO_Pack_Importer_Exporter constructor.
20
  */
21
  function __construct() {
22
- $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module.
23
- $this->prefix = 'aiosp_importer_exporter_'; // option prefix.
24
- $this->file = __FILE__;
 
 
25
  parent::__construct();
26
- $this->warnings = array();
27
  $this->default_options = array(
28
  'import_submit' => array(
29
  'name' => __( 'Import', 'all-in-one-seo-pack' ),
@@ -41,7 +43,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
41
  ),
42
  ),
43
  'export_post_types' => array(
44
- 'name' => __( 'Export Post Types:', 'all-in-one-seo-pack' ),
45
  'default' => array(
46
  'post' => 'post',
47
  'page' => 'page',
@@ -63,6 +65,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
63
  ) . '<br />',
64
  ),
65
  );
 
66
  $this->layout = array(
67
  'default' => array(
68
  'name' => $this->name,
@@ -114,8 +117,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
114
  * @since ?
115
  */
116
  function debug_post_types() {
117
- $post_types = $this->get_post_type_titles();
118
- $rempost = array(
119
  'customize_changeset' => 1,
120
  'custom_css' => 1,
121
  'revision' => 1,
@@ -239,7 +242,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
239
  $return_array[ $x[1] ]
240
  );
241
  }
242
- if ( $k === 0 ) {
243
  $return_array[ $c ] = array_merge(
244
  $return_array[ $c ],
245
  $array[ $key ]
@@ -281,7 +284,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
281
  }
282
  $first = true;
283
  foreach ( $x as $k => $v ) {
284
- if ( $first === true ) {
285
  $b = $array[ $key ];
286
  $first = false;
287
  }
@@ -320,7 +323,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
320
  for ( $i = 0; $i < count( $elem2 ); $i ++ ) {
321
  $content .= $key2 . '[] = "' . $elem2[ $i ] . "\"\n";
322
  }
323
- } elseif ( $elem2 == '' ) {
324
  $content .= $key2 . " = \n";
325
  } else {
326
  $content .= $key2 . ' = "' . $elem2 . "\"\n";
@@ -333,7 +336,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
333
  for ( $i = 0; $i < count( $elem ); $i ++ ) {
334
  $content .= $key2 . '[] = "' . $elem[ $i ] . "\"\n";
335
  }
336
- } elseif ( $elem == '' ) {
337
  $content .= $key2 . " = \n";
338
  } else {
339
  $content .= $key2 . ' = "' . $elem . "\"\n";
@@ -390,7 +393,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
390
  if ( ! empty( $_REQUEST['export_submit'] ) ) {
391
  $submit = 'Export';
392
  }
393
- if ( ( $submit != null ) && wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
394
  switch ( $submit ) {
395
  case 'Import':
396
  try {
@@ -406,25 +409,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
406
  if ( empty( $line ) ) {
407
  continue;
408
  }
409
- if ( $line[0] == ';' ) {
410
  continue;
411
  }
412
  if ( preg_match( '/^\[(\S+)\]$/', $line, $label ) ) {
413
  $section_label = strval( $label[1] );
414
- if ( $section_label == 'post_data' ) {
415
  $count ++;
416
  }
417
  if ( ! isset( $section[ $section_label ] ) ) {
418
  $section[ $section_label ] = array();
419
  }
420
  } elseif ( preg_match( "/^(\S+)\s*=\s*'(.*)'$/", $line, $matches ) ) {
421
- if ( $section_label == 'post_data' ) {
422
  $section[ $section_label ][ $count ][ $matches[1] ] = $matches[2];
423
  } else {
424
  $section[ $section_label ][ $matches[1] ] = $matches[2];
425
  }
426
  } elseif ( preg_match( '/^(\S+)\s*=\s*NULL$/', $line, $matches ) ) {
427
- if ( $section_label == 'post_data' ) {
428
  $section[ $section_label ][ $count ][ $matches[1] ] = null;
429
  } else {
430
  $section[ $section_label ][ $matches[1] ] = null;
@@ -448,7 +451,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
448
  foreach ( $module_options as $key => $value ) {
449
 
450
  // Updates Post Data.
451
- if ( $label == 'post_data' ) {
452
  $post_exists = post_exists(
453
  $module_options[ $key ]['post_title'],
454
  '',
@@ -456,8 +459,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
456
  );
457
  $target = get_post( $post_exists );
458
  if (
459
- ( ! empty( $module_options[ $key ]['post_type'] ) ) &&
460
- $post_exists != null
461
  ) {
462
  if ( is_array( $value ) ) {
463
  foreach ( $value as $field_name => $field_value ) {
@@ -488,7 +491,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
488
  $target_title
489
  );
490
  }
491
- if ( $post_warning != null ) {
492
  $this->warnings[] = $post_warning;
493
  $post_warning = null;
494
  }
@@ -513,7 +516,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
513
  }
514
  } catch ( Exception $e ) {
515
  // Shows only one warning when compromised file is imported.
516
- $this->warnings = array();
517
  $this->warnings[] = $e->getMessage();
518
  add_action(
519
  $this->prefix . 'settings_header_errors',
@@ -536,12 +539,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
536
  // Creates Files Contents.
537
  $settings_file = 'settings_aioseop.ini';
538
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
539
- $buf = '; ' . sprintf(
540
- __(
541
- 'Settings export file for %s',
542
- '
543
- all-in-one-seo-pack'
544
- ),
545
  AIOSEOP_PLUGIN_NAME
546
  ) . "\n";
547
 
19
  * All_in_One_SEO_Pack_Importer_Exporter constructor.
20
  */
21
  function __construct() {
22
+ $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module.
23
+ $this->prefix = 'aiosp_importer_exporter_'; // option prefix.
24
+ $this->file = __FILE__;
25
+ $this->warnings = array();
26
+
27
  parent::__construct();
28
+
29
  $this->default_options = array(
30
  'import_submit' => array(
31
  'name' => __( 'Import', 'all-in-one-seo-pack' ),
43
  ),
44
  ),
45
  'export_post_types' => array(
46
+ 'name' => __( 'Export Post Types', 'all-in-one-seo-pack' ),
47
  'default' => array(
48
  'post' => 'post',
49
  'page' => 'page',
65
  ) . '<br />',
66
  ),
67
  );
68
+
69
  $this->layout = array(
70
  'default' => array(
71
  'name' => $this->name,
117
  * @since ?
118
  */
119
  function debug_post_types() {
120
+ $post_types = $this->get_post_type_titles();
121
+ $rempost = array(
122
  'customize_changeset' => 1,
123
  'custom_css' => 1,
124
  'revision' => 1,
242
  $return_array[ $x[1] ]
243
  );
244
  }
245
+ if ( 0 === $k ) {
246
  $return_array[ $c ] = array_merge(
247
  $return_array[ $c ],
248
  $array[ $key ]
284
  }
285
  $first = true;
286
  foreach ( $x as $k => $v ) {
287
+ if ( true === $first ) {
288
  $b = $array[ $key ];
289
  $first = false;
290
  }
323
  for ( $i = 0; $i < count( $elem2 ); $i ++ ) {
324
  $content .= $key2 . '[] = "' . $elem2[ $i ] . "\"\n";
325
  }
326
+ } elseif ( '' == $elem2 ) {
327
  $content .= $key2 . " = \n";
328
  } else {
329
  $content .= $key2 . ' = "' . $elem2 . "\"\n";
336
  for ( $i = 0; $i < count( $elem ); $i ++ ) {
337
  $content .= $key2 . '[] = "' . $elem[ $i ] . "\"\n";
338
  }
339
+ } elseif ( '' == $elem ) {
340
  $content .= $key2 . " = \n";
341
  } else {
342
  $content .= $key2 . ' = "' . $elem . "\"\n";
393
  if ( ! empty( $_REQUEST['export_submit'] ) ) {
394
  $submit = 'Export';
395
  }
396
+ if ( ( null != $submit ) && wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
397
  switch ( $submit ) {
398
  case 'Import':
399
  try {
409
  if ( empty( $line ) ) {
410
  continue;
411
  }
412
+ if ( ';' == $line[0] ) {
413
  continue;
414
  }
415
  if ( preg_match( '/^\[(\S+)\]$/', $line, $label ) ) {
416
  $section_label = strval( $label[1] );
417
+ if ( 'post_data' == $section_label ) {
418
  $count ++;
419
  }
420
  if ( ! isset( $section[ $section_label ] ) ) {
421
  $section[ $section_label ] = array();
422
  }
423
  } elseif ( preg_match( "/^(\S+)\s*=\s*'(.*)'$/", $line, $matches ) ) {
424
+ if ( 'post_data' == $section_label ) {
425
  $section[ $section_label ][ $count ][ $matches[1] ] = $matches[2];
426
  } else {
427
  $section[ $section_label ][ $matches[1] ] = $matches[2];
428
  }
429
  } elseif ( preg_match( '/^(\S+)\s*=\s*NULL$/', $line, $matches ) ) {
430
+ if ( 'post_data' == $section_label ) {
431
  $section[ $section_label ][ $count ][ $matches[1] ] = null;
432
  } else {
433
  $section[ $section_label ][ $matches[1] ] = null;
451
  foreach ( $module_options as $key => $value ) {
452
 
453
  // Updates Post Data.
454
+ if ( 'post_data' == $label ) {
455
  $post_exists = post_exists(
456
  $module_options[ $key ]['post_title'],
457
  '',
459
  );
460
  $target = get_post( $post_exists );
461
  if (
462
+ ( ! empty( $module_options[ $key ]['post_type'] ) ) &&
463
+ null != $post_exists
464
  ) {
465
  if ( is_array( $value ) ) {
466
  foreach ( $value as $field_name => $field_value ) {
491
  $target_title
492
  );
493
  }
494
+ if ( null != $post_warning ) {
495
  $this->warnings[] = $post_warning;
496
  $post_warning = null;
497
  }
516
  }
517
  } catch ( Exception $e ) {
518
  // Shows only one warning when compromised file is imported.
519
+ $this->warnings = array();
520
  $this->warnings[] = $e->getMessage();
521
  add_action(
522
  $this->prefix . 'settings_header_errors',
539
  // Creates Files Contents.
540
  $settings_file = 'settings_aioseop.ini';
541
  /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
542
+ $buf = '; ' . sprintf(
543
+ __( 'Settings export file for %s', 'all-in-one-seo-pack' ),
 
 
 
 
544
  AIOSEOP_PLUGIN_NAME
545
  ) . "\n";
546
 
modules/aioseop_opengraph.php CHANGED
@@ -193,9 +193,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
193
  * @param string $taxonomy Taxonomy slug.
194
  */
195
  function created_term( $term_id, $tt_id, $taxonomy_name ) {
196
- $k = 'settings';
197
- $prefix = $this->get_prefix( $k );
198
- $tax = get_taxonomy( $taxonomy_name );
199
  $this->set_object_type_for_taxonomy( $prefix, $k, $taxonomy_name, $tax, false, array( $term_id ) );
200
  }
201
 
@@ -278,7 +278,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
278
  * Called when this module is activated.
279
  */
280
  public function activate_module() {
281
- if ( $this->locations !== null ) {
282
  foreach ( $this->locations as $k => $v ) {
283
  if ( ! isset( $v['type'] ) || 'metabox' !== $v['type'] ) {
284
  continue;
@@ -293,8 +293,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
293
  * @param string $k The key against which the options will be determined/set.
294
  */
295
  private function set_virgin_tax_terms( $k ) {
296
- $prefix = $this->get_prefix( $k );
297
- $opts = $this->default_options( $k );
298
  $taxonomies = get_taxonomies( array( 'public' => true ), 'object' );
299
  if ( ! $taxonomies ) {
300
  return;
@@ -784,13 +784,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
784
  }
785
 
786
  function filter_options( $options, $location ) {
787
- if ( $location == 'settings' ) {
788
  $prefix = $this->get_prefix( $location ) . $location . '_';
 
789
  list( $legacy, $images ) = $this->get_all_images( $options );
790
  if ( isset( $options ) && isset( $options[ "{$prefix}image" ] ) ) {
791
  $thumbnail = $options[ "{$prefix}image" ];
792
- if ( ctype_digit( (string) $thumbnail ) || ( $thumbnail == 'post' ) ) {
793
- if ( $thumbnail == 'post' ) {
794
  $thumbnail = $images['post1'];
795
  } elseif ( ! empty( $legacy[ $thumbnail ] ) ) {
796
  $thumbnail = $legacy[ $thumbnail ];
@@ -820,12 +821,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
820
  */
821
  function filter_settings( $settings, $location, $current ) {
822
  global $aiosp, $post;
823
- if ( $location == 'opengraph' || $location == 'settings' ) {
824
  $prefix = $this->get_prefix( $location ) . $location . '_';
825
- if ( $location == 'opengraph' ) {
826
  return $settings;
827
  }
828
- if ( $location == 'settings' ) {
829
  list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
830
  $opts = array( 'title', 'desc' );
831
  $current_post_type = get_post_type();
@@ -857,8 +858,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
857
  if ( isset( $this->options['aiosp_opengraph_defcard'] ) ) {
858
  $settings[ $prefix . 'setcard' ]['default'] = $this->options['aiosp_opengraph_defcard'];
859
  }
860
- $info = $aiosp->get_page_snippet_info();
861
- $title = $info['title'];
862
  $description = $info['description'];
863
 
864
  // Description options.
@@ -877,7 +878,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
877
 
878
  // #1308 - we want to make sure we are ignoring php version only in the admin area
879
  // while editing the post, so that it does not impact #932.
880
- $screen = get_current_screen();
881
  $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
882
 
883
  // Add filters.
@@ -889,8 +890,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
889
  if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
890
  foreach ( $opts as $opt ) {
891
  if ( isset( $settings[ $prefix . $opt ] ) ) {
892
- $settings[ $prefix . $opt ]['type'] = 'hidden';
893
- $settings[ $prefix . $opt ]['label'] = 'none';
894
  unset( $settings[ $prefix . $opt ]['count'] );
895
  }
896
  }
@@ -922,7 +923,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
922
  global $aioseop_options;
923
  // Prepare default and prefix.
924
  $prefix = $this->get_prefix( $location ) . $location . '_';
925
- $opts = array();
926
 
927
  foreach ( $settings as $k => $v ) {
928
  if ( $v['save'] ) {
@@ -949,7 +950,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
949
  }
950
  break;
951
  }
952
- if ( $v === null ) {
953
  unset( $options[ $k ] );
954
  }
955
  }
@@ -986,7 +987,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
986
  * @return array
987
  */
988
  function filter_metabox_options( $options, $location, $post_id ) {
989
- if ( $location == 'settings' ) {
990
  $prefix = $this->get_prefix( $location ) . $location . '_';
991
  if ( isset( $options[ $prefix . 'customimg_checker' ] )
992
  && $options[ $prefix . 'customimg_checker' ]
@@ -999,11 +1000,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
999
 
1000
  /** Custom settings **/
1001
  function display_custom_options( $buf, $args ) {
1002
- if ( $args['name'] == 'aiosp_opengraph_scan_header' ) {
1003
  $buf .= '<div class="aioseop aioseop_options aiosp_opengraph_settings"><div class="aioseop_wrapper aioseop_custom_type" id="aiosp_opengraph_scan_header_wrapper"><div class="aioseop_input" id="aiosp_opengraph_scan_header" style="padding-left:20px;">';
1004
- $args['options']['type'] = 'submit';
1005
- $args['attr'] = " class='button-primary' ";
1006
- $args['value'] = $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
 
 
 
1007
  $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
1008
  $buf .= '<br /><br />' . $this->get_option_html( $args );
1009
  $buf .= '</div></div></div>';
@@ -1050,7 +1054,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1050
  $attributes = apply_filters(
1051
  $this->prefix . 'attributes',
1052
  array(
1053
- 'prefix="og: http://ogp.me/ns#"',
1054
  )
1055
  );
1056
 
@@ -1084,7 +1088,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1084
  $key = $this->options['aiosp_opengraph_key'];
1085
  $dimg = $this->options['aiosp_opengraph_dimg'];
1086
  $current_post_type = get_post_type();
1087
- $title = $description = $image = $video = '';
 
 
 
1088
  $type = $this->type;
1089
  $sitename = $this->options['aiosp_opengraph_sitename'];
1090
  $tag = '';
@@ -1110,7 +1117,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1110
  // this will collect the extra values that are required outside the below IF block.
1111
  $extra_params = array();
1112
 
1113
- $setmeta = $this->options['aiosp_opengraph_setmeta'];
1114
  if ( is_front_page() ) {
1115
  $title = $this->options['aiosp_opengraph_hometitle'];
1116
  if ( $first_page ) {
@@ -1161,7 +1168,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1161
  in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1162
  ) {
1163
 
1164
- if ( $type == 'article' ) {
1165
  if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1166
  $section = $metabox['aioseop_opengraph_settings_section'];
1167
  }
@@ -1177,7 +1184,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1177
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
1178
  }
1179
 
1180
- if ( $type == 'article' && ! empty( $post ) ) {
1181
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1182
  $author = get_the_author_meta( 'facebook', $post->post_author );
1183
  }
@@ -1245,7 +1252,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1245
  if ( isset( $metabox['aioseop_opengraph_settings_category'] ) ) {
1246
  $type = $metabox['aioseop_opengraph_settings_category'];
1247
  }
1248
- if ( $type == 'article' ) {
1249
  if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1250
  $section = $metabox['aioseop_opengraph_settings_section'];
1251
  }
@@ -1259,7 +1266,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1259
  if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1260
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
1261
  }
1262
- if ( $type == 'article' && ! empty( $post ) ) {
1263
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1264
  $author = get_the_author_meta( 'facebook', $post->post_author );
1265
  }
@@ -1281,8 +1288,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1281
  $title = $aiosp->wp_title();
1282
  }
1283
  if ( empty( $description ) ) {
1284
- $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1285
- $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1286
  $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1287
  }
1288
  // Add default title.
@@ -1327,7 +1334,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1327
  return;
1328
  }
1329
 
1330
- if ( $type === 'article' && ! empty( $post ) && is_singular() ) {
1331
  if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1332
  if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1333
  $keywords = $aiosp->get_main_keywords();
@@ -1437,7 +1444,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1437
  $thumbnail = set_url_scheme( $thumbnail );
1438
  }
1439
 
1440
- $width = $height = '';
 
1441
  if ( ! empty( $thumbnail ) ) {
1442
  if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1443
  $width = $metabox['aioseop_opengraph_settings_imagewidth'];
@@ -1472,11 +1480,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1472
  }
1473
 
1474
  // support for changing legacy twitter cardtype-photo to summary large image.
1475
- if ( $card == 'photo' ) {
1476
  $card = 'summary_large_image';
1477
  }
1478
 
1479
- $site = $domain = $creator = '';
 
 
1480
 
1481
  if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1482
  $site = $this->options['aiosp_opengraph_twitter_site'];
@@ -1506,25 +1516,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1506
 
1507
  $meta = array(
1508
  'facebook' => array(
1509
- 'title' => 'og:title',
1510
  'type' => 'og:type',
 
 
1511
  'url' => 'og:url',
 
1512
  'thumbnail' => 'og:image',
1513
  'width' => 'og:image:width',
1514
  'height' => 'og:image:height',
1515
  'video' => 'og:video',
1516
  'videowidth' => 'og:video:width',
1517
  'videoheight' => 'og:video:height',
1518
- 'sitename' => 'og:site_name',
1519
  'key' => 'fb:admins',
1520
  'appid' => 'fb:app_id',
1521
- 'description' => 'og:description',
1522
  'section' => 'article:section',
1523
  'tag' => 'article:tag',
1524
- 'publisher' => 'article:publisher',
1525
- 'author' => 'article:author',
1526
  'published_time' => 'article:published_time',
1527
  'modified_time' => 'article:modified_time',
 
 
1528
  ),
1529
  'twitter' => array(
1530
  'card' => 'twitter:card',
@@ -1538,9 +1548,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1538
  );
1539
 
1540
  // Issue #1848 ( https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/1848 ).
 
1541
  if ( is_ssl() ) {
1542
  $meta['facebook'] += array( 'thumbnail_1' => 'og:image:secure_url' );
1543
- $thumbnail_1 = $thumbnail;
 
 
1544
  }
1545
 
1546
  $tags = array(
@@ -1682,15 +1695,18 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1682
  10,
1683
  3
1684
  );
1685
- $post_types = $this->get_post_type_titles();
1686
- $rempost = array(
 
1687
  'revision' => 1,
1688
  'nav_menu_item' => 1,
1689
  'custom_css' => 1,
1690
  'customize_changeset' => 1,
1691
  );
1692
- $post_types = array_diff_key( $post_types, $rempost );
 
1693
  $this->default_options['types']['initial_options'] = $post_types;
 
1694
  foreach ( $post_types as $slug => $name ) {
1695
  $field = $slug . '_fb_object_type';
1696
  $this->default_options[ $field ] = array(
@@ -1719,7 +1735,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1719
  $size = apply_filters( 'post_thumbnail_size', 'large' );
1720
  $default = $this->get_the_image_by_default();
1721
  if ( ! empty( $default ) ) {
1722
- $default = set_url_scheme( $default );
1723
  $img[ $default ] = 0;
1724
  }
1725
  $img = array_merge( $img, parent::get_all_images( $options, null ) );
@@ -1734,7 +1750,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1734
  $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1735
  }
1736
 
1737
- if ( $author_img = $this->get_the_image_by_author( $p ) ) {
 
1738
  $image['author'] = $author_img;
1739
  }
1740
  $image = array_flip( $img );
@@ -1749,7 +1766,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1749
  }
1750
 
1751
  function get_the_image_by_author( $options = null, $p = null ) {
1752
- if ( $p === null ) {
1753
  global $post;
1754
  } else {
1755
  $post = $p;
@@ -1841,9 +1858,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1841
  if ( $update ) {
1842
  return;
1843
  }
1844
- if ( $this->locations !== null ) {
1845
  foreach ( $this->locations as $k => $v ) {
1846
- if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
1847
  $opts = $this->default_options( $k );
1848
  $options = array();
1849
  $update = false;
@@ -1891,7 +1908,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1891
  * @return array
1892
  */
1893
  public function filter_default_options( $options, $location ) {
1894
- if ( $location === 'settings' ) {
1895
  $prefix = $this->get_prefix( $location ) . $location . '_';
1896
  // Add image checker as default.
1897
  $options[ $prefix . 'customimg_checker' ] = 0;
193
  * @param string $taxonomy Taxonomy slug.
194
  */
195
  function created_term( $term_id, $tt_id, $taxonomy_name ) {
196
+ $k = 'settings';
197
+ $prefix = $this->get_prefix( $k );
198
+ $tax = get_taxonomy( $taxonomy_name );
199
  $this->set_object_type_for_taxonomy( $prefix, $k, $taxonomy_name, $tax, false, array( $term_id ) );
200
  }
201
 
278
  * Called when this module is activated.
279
  */
280
  public function activate_module() {
281
+ if ( null !== $this->locations ) {
282
  foreach ( $this->locations as $k => $v ) {
283
  if ( ! isset( $v['type'] ) || 'metabox' !== $v['type'] ) {
284
  continue;
293
  * @param string $k The key against which the options will be determined/set.
294
  */
295
  private function set_virgin_tax_terms( $k ) {
296
+ $prefix = $this->get_prefix( $k );
297
+ $opts = $this->default_options( $k );
298
  $taxonomies = get_taxonomies( array( 'public' => true ), 'object' );
299
  if ( ! $taxonomies ) {
300
  return;
784
  }
785
 
786
  function filter_options( $options, $location ) {
787
+ if ( 'settings' == $location ) {
788
  $prefix = $this->get_prefix( $location ) . $location . '_';
789
+
790
  list( $legacy, $images ) = $this->get_all_images( $options );
791
  if ( isset( $options ) && isset( $options[ "{$prefix}image" ] ) ) {
792
  $thumbnail = $options[ "{$prefix}image" ];
793
+ if ( ctype_digit( (string) $thumbnail ) || ( 'post' == $thumbnail ) ) {
794
+ if ( 'post' == $thumbnail ) {
795
  $thumbnail = $images['post1'];
796
  } elseif ( ! empty( $legacy[ $thumbnail ] ) ) {
797
  $thumbnail = $legacy[ $thumbnail ];
821
  */
822
  function filter_settings( $settings, $location, $current ) {
823
  global $aiosp, $post;
824
+ if ( 'opengraph' == $location || 'settings' == $location ) {
825
  $prefix = $this->get_prefix( $location ) . $location . '_';
826
+ if ( 'opengraph' == $location ) {
827
  return $settings;
828
  }
829
+ if ( 'settings' == $location ) {
830
  list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
831
  $opts = array( 'title', 'desc' );
832
  $current_post_type = get_post_type();
858
  if ( isset( $this->options['aiosp_opengraph_defcard'] ) ) {
859
  $settings[ $prefix . 'setcard' ]['default'] = $this->options['aiosp_opengraph_defcard'];
860
  }
861
+ $info = $aiosp->get_page_snippet_info();
862
+ $title = $info['title'];
863
  $description = $info['description'];
864
 
865
  // Description options.
878
 
879
  // #1308 - we want to make sure we are ignoring php version only in the admin area
880
  // while editing the post, so that it does not impact #932.
881
+ $screen = get_current_screen();
882
  $ignore_php_version = is_admin() && isset( $screen->id ) && 'post' == $screen->id;
883
 
884
  // Add filters.
890
  if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
891
  foreach ( $opts as $opt ) {
892
  if ( isset( $settings[ $prefix . $opt ] ) ) {
893
+ $settings[ $prefix . $opt ]['type'] = 'hidden';
894
+ $settings[ $prefix . $opt ]['label'] = 'none';
895
  unset( $settings[ $prefix . $opt ]['count'] );
896
  }
897
  }
923
  global $aioseop_options;
924
  // Prepare default and prefix.
925
  $prefix = $this->get_prefix( $location ) . $location . '_';
926
+ $opts = array();
927
 
928
  foreach ( $settings as $k => $v ) {
929
  if ( $v['save'] ) {
950
  }
951
  break;
952
  }
953
+ if ( null === $v ) {
954
  unset( $options[ $k ] );
955
  }
956
  }
987
  * @return array
988
  */
989
  function filter_metabox_options( $options, $location, $post_id ) {
990
+ if ( 'settings' == $location ) {
991
  $prefix = $this->get_prefix( $location ) . $location . '_';
992
  if ( isset( $options[ $prefix . 'customimg_checker' ] )
993
  && $options[ $prefix . 'customimg_checker' ]
1000
 
1001
  /** Custom settings **/
1002
  function display_custom_options( $buf, $args ) {
1003
+ if ( 'aiosp_opengraph_scan_header' == $args['name'] ) {
1004
  $buf .= '<div class="aioseop aioseop_options aiosp_opengraph_settings"><div class="aioseop_wrapper aioseop_custom_type" id="aiosp_opengraph_scan_header_wrapper"><div class="aioseop_input" id="aiosp_opengraph_scan_header" style="padding-left:20px;">';
1005
+
1006
+ $args['options']['type'] = 'submit';
1007
+ $args['attr'] = " class='button-primary' ";
1008
+ $args['value'] = __( 'Scan Now', 'all-in-one-seo-pack' );
1009
+ $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
1010
+
1011
  $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
1012
  $buf .= '<br /><br />' . $this->get_option_html( $args );
1013
  $buf .= '</div></div></div>';
1054
  $attributes = apply_filters(
1055
  $this->prefix . 'attributes',
1056
  array(
1057
+ 'prefix="og: https://ogp.me/ns#"',
1058
  )
1059
  );
1060
 
1088
  $key = $this->options['aiosp_opengraph_key'];
1089
  $dimg = $this->options['aiosp_opengraph_dimg'];
1090
  $current_post_type = get_post_type();
1091
+ $title = '';
1092
+ $description = '';
1093
+ $image = '';
1094
+ $video = '';
1095
  $type = $this->type;
1096
  $sitename = $this->options['aiosp_opengraph_sitename'];
1097
  $tag = '';
1117
  // this will collect the extra values that are required outside the below IF block.
1118
  $extra_params = array();
1119
 
1120
+ $setmeta = $this->options['aiosp_opengraph_setmeta'];
1121
  if ( is_front_page() ) {
1122
  $title = $this->options['aiosp_opengraph_hometitle'];
1123
  if ( $first_page ) {
1168
  in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1169
  ) {
1170
 
1171
+ if ( 'article' == $type ) {
1172
  if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1173
  $section = $metabox['aioseop_opengraph_settings_section'];
1174
  }
1184
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
1185
  }
1186
 
1187
+ if ( 'article' == $type && ! empty( $post ) ) {
1188
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1189
  $author = get_the_author_meta( 'facebook', $post->post_author );
1190
  }
1252
  if ( isset( $metabox['aioseop_opengraph_settings_category'] ) ) {
1253
  $type = $metabox['aioseop_opengraph_settings_category'];
1254
  }
1255
+ if ( 'article' == $type ) {
1256
  if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1257
  $section = $metabox['aioseop_opengraph_settings_section'];
1258
  }
1266
  if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1267
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
1268
  }
1269
+ if ( 'article' == $type && ! empty( $post ) ) {
1270
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1271
  $author = get_the_author_meta( 'facebook', $post->post_author );
1272
  }
1288
  $title = $aiosp->wp_title();
1289
  }
1290
  if ( empty( $description ) ) {
1291
+ $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1292
+ $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1293
  $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1294
  }
1295
  // Add default title.
1334
  return;
1335
  }
1336
 
1337
+ if ( 'article' === $type && ! empty( $post ) && is_singular() ) {
1338
  if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1339
  if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1340
  $keywords = $aiosp->get_main_keywords();
1444
  $thumbnail = set_url_scheme( $thumbnail );
1445
  }
1446
 
1447
+ $width = '';
1448
+ $height = '';
1449
  if ( ! empty( $thumbnail ) ) {
1450
  if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1451
  $width = $metabox['aioseop_opengraph_settings_imagewidth'];
1480
  }
1481
 
1482
  // support for changing legacy twitter cardtype-photo to summary large image.
1483
+ if ( 'photo' == $card ) {
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'];
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',
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(
1695
  10,
1696
  3
1697
  );
1698
+
1699
+ $post_types = $this->get_post_type_titles();
1700
+ $rempost = array(
1701
  'revision' => 1,
1702
  'nav_menu_item' => 1,
1703
  'custom_css' => 1,
1704
  'customize_changeset' => 1,
1705
  );
1706
+ $post_types = array_diff_key( $post_types, $rempost );
1707
+
1708
  $this->default_options['types']['initial_options'] = $post_types;
1709
+
1710
  foreach ( $post_types as $slug => $name ) {
1711
  $field = $slug . '_fb_object_type';
1712
  $this->default_options[ $field ] = array(
1735
  $size = apply_filters( 'post_thumbnail_size', 'large' );
1736
  $default = $this->get_the_image_by_default();
1737
  if ( ! empty( $default ) ) {
1738
+ $default = set_url_scheme( $default );
1739
  $img[ $default ] = 0;
1740
  }
1741
  $img = array_merge( $img, parent::get_all_images( $options, null ) );
1750
  $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1751
  }
1752
 
1753
+ $author_img = $this->get_the_image_by_author( $p );
1754
+ if ( $author_img ) {
1755
  $image['author'] = $author_img;
1756
  }
1757
  $image = array_flip( $img );
1766
  }
1767
 
1768
  function get_the_image_by_author( $options = null, $p = null ) {
1769
+ if ( null === $p ) {
1770
  global $post;
1771
  } else {
1772
  $post = $p;
1858
  if ( $update ) {
1859
  return;
1860
  }
1861
+ if ( null !== $this->locations ) {
1862
  foreach ( $this->locations as $k => $v ) {
1863
+ if ( isset( $v['type'] ) && ( 'metabox' === $v['type'] ) ) {
1864
  $opts = $this->default_options( $k );
1865
  $options = array();
1866
  $update = false;
1908
  * @return array
1909
  */
1910
  public function filter_default_options( $options, $location ) {
1911
+ if ( 'settings' === $location ) {
1912
  $prefix = $this->get_prefix( $location ) . $location . '_';
1913
  // Add image checker as default.
1914
  $options[ $prefix . 'customimg_checker' ] = 0;
modules/aioseop_performance.php CHANGED
@@ -32,17 +32,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
32
  * @param $mod
33
  */
34
  function __construct( $mod ) {
35
- $this->name = __( 'Performance', 'all-in-one-seo-pack' ); // Human-readable name of the plugin.
36
- $this->prefix = 'aiosp_performance_'; // Option prefix.
37
- $this->file = __FILE__; // The current file.
 
38
  parent::__construct();
39
 
40
  $this->default_options = array(
41
  'memory_limit' => array(
 
42
  'name' => __( 'Raise memory limit', 'all-in-one-seo-pack' ),
43
  'default' => '256M',
44
  'type' => 'select',
45
  'initial_options' => array(
 
46
  0 => __( 'Use the system default', 'all-in-one-seo-pack' ),
47
  '32M' => '32MB',
48
  '64M' => '64MB',
@@ -51,6 +54,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
51
  ),
52
  ),
53
  'execution_time' => array(
 
54
  'name' => __( 'Raise execution time', 'all-in-one-seo-pack' ),
55
  'default' => '',
56
  'type' => 'select',
@@ -67,7 +71,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
67
 
68
  global $aiosp, $aioseop_options;
69
  $this->default_options['force_rewrites'] = array(
70
- 'name' => __( 'Force Rewrites:', 'all-in-one-seo-pack' ),
 
71
  'default' => 1,
72
  'type' => 'radio',
73
  'initial_options' => array(
@@ -100,6 +105,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
100
  );
101
 
102
  $this->layout['system_status'] = array(
 
103
  'name' => __( 'System Status', 'all-in-one-seo-pack' ),
104
  'help_link' => 'https://semperplugins.com/documentation/performance-settings/',
105
  'options' => array_keys( $system_status ),
@@ -122,7 +128,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
122
  * @return mixed
123
  */
124
  function update_options_filter( $options, $location ) {
125
- if ( $location == null && isset( $options[ $this->prefix . 'force_rewrites' ] ) ) {
126
  unset( $options[ $this->prefix . 'force_rewrites' ] );
127
  }
128
 
@@ -139,7 +145,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
139
  * @return mixed
140
  */
141
  function display_options_filter( $options, $location ) {
142
- if ( $location == null ) {
143
  $options[ $this->prefix . 'force_rewrites' ] = 1;
144
  global $aiosp;
145
  $opts = $aiosp->get_current_options( array(), null );
@@ -157,9 +163,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
157
  * @param $location
158
  */
159
  function settings_update_action( $options, $location ) {
160
- if ( $location == null && isset( $_POST[ $this->prefix . 'force_rewrites' ] ) ) {
161
  $force_rewrites = $_POST[ $this->prefix . 'force_rewrites' ];
162
- if ( ( $force_rewrites == 0 ) || ( $force_rewrites == 1 ) ) {
163
  global $aiosp;
164
  $opts = $aiosp->get_current_options( array(), null );
165
  $opts['aiosp_force_rewrites'] = $force_rewrites;
@@ -198,7 +204,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
198
  * @since ?
199
  */
200
  function settings_page_init() {
201
- $this->default_options['status']['default'] = $this->get_serverinfo();
202
  $this->default_options['send_email']['default'] = $this->get_email_input();
203
  }
204
 
@@ -240,6 +246,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
240
  if ( ini_get( 'upload_max_filesize' ) ) {
241
  $upload_max = ini_get( 'upload_max_filesize' );
242
  } else {
 
243
  $upload_max = __( 'N/A', 'all-in-one-seo-pack' );
244
  }
245
  if ( ini_get( 'post_max_size' ) ) {
@@ -258,7 +265,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
258
  $memory_limit = __( 'N/A', 'all-in-one-seo-pack' );
259
  }
260
  if ( function_exists( 'memory_get_usage' ) ) {
261
- $memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . __( ' MByte', 'all-in-one-seo-pack' );
262
  } else {
263
  $memory_usage = __( 'N/A', 'all-in-one-seo-pack' );
264
  }
@@ -304,33 +311,48 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
304
  $debug_info = array(
305
  __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
306
  __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
 
307
  __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
 
308
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
 
309
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
310
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
 
311
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
 
312
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
313
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
314
  __( 'PHP Max Post Size', 'all-in-one-seo-pack' ) => $post_max,
315
  __( 'PHP Max Script Execute Time', 'all-in-one-seo-pack' ) => $max_execute,
 
316
  __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
 
317
  __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
 
318
  __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
 
319
  __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
 
320
  __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
321
  __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
 
322
  __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
 
323
  __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
324
  __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
325
  __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
326
  __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
327
- __( 'Front Page Displays', 'all-in-one-seo-pack' ) => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
 
328
  __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
 
329
  __( 'Permalink Setting', 'all-in-one-seo-pack' ) => $perm_struct,
330
  );
331
  $debug_info[ __( 'Active Plugins', 'all-in-one-seo-pack' ) ] = null;
332
- $active_plugins = $inactive_plugins = array();
333
- $plugins = get_plugins();
 
334
  foreach ( $plugins as $path => $plugin ) {
335
  if ( is_plugin_active( $path ) ) {
336
  $debug_info[ $plugin['Name'] ] = $plugin['Version'];
@@ -338,15 +360,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
338
  $inactive_plugins[ $plugin['Name'] ] = $plugin['Version'];
339
  }
340
  }
341
- $debug_info[ __( 'Inactive Plugins', 'all-in-one-seo-pack' ) ] = null;
342
- $debug_info = array_merge( $debug_info, (array) $inactive_plugins );
343
 
344
- /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the premium version of the plugin, All in One SEO Pack Pro. */
 
 
 
 
345
  $mail_text = sprintf( __( '%s Debug Info', 'all-in-one-seo-pack' ), 'All in One SEO Pack Pro' ) . "\r\n------------------\r\n\r\n";
346
  $page_text = '';
347
  if ( ! empty( $debug_info ) ) {
348
  foreach ( $debug_info as $name => $value ) {
349
- if ( $value !== null ) {
350
  $page_text .= "<li><strong>$name</strong> $value</li>";
351
  $mail_text .= "$name: $value\r\n";
352
  } else {
@@ -360,7 +384,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
360
  if ( ! empty( $_REQUEST['sfwd_debug_submit'] ) ) {
361
  $nonce = $_REQUEST['sfwd_debug_nonce'];
362
  if ( ! wp_verify_nonce( $nonce, 'sfwd-debug-nonce' ) ) {
363
- echo "<div class='sfwd_debug_error'>" . __( 'Form submission error: verification check failed.', 'all-in-one-seo-pack' ) . '</div>';
 
 
 
364
  break;
365
  }
366
  $email = '';
@@ -369,8 +396,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
369
  }
370
  if ( $email ) {
371
  $attachments = array();
372
- $upload_dir = wp_upload_dir();
373
- $dir = $upload_dir['basedir'] . '/aiosp-log/';
374
  if ( wp_mkdir_p( $dir ) ) {
375
  $file_path = $dir . 'settings_aioseop-' . date( 'Y-m-d' ) . '-' . time() . '.ini';
376
  if ( ! file_exists( $file_path ) ) {
@@ -379,7 +406,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
379
  // @codingStandardsIgnoreEnd
380
  global $aiosp;
381
  $buf = '; ' . sprintf(
382
- /* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
383
  __( 'Settings export file for %s', 'all-in-one-seo-pack' ),
384
  AIOSEOP_PLUGIN_NAME
385
  ) . "\n";
@@ -397,17 +424,28 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
397
  }
398
  }
399
 
400
- if ( wp_mail( $email, sprintf( __( 'SFWD Debug Mail From Site %s.', 'all-in-one-seo-pack' ), $siteurl ), $mail_text, '', $attachments ) ) {
401
- echo "<div class='sfwd_debug_mail_sent'>" . sprintf( __( 'Sent to %s.', 'all-in-one-seo-pack' ), $email ) . '</div>';
 
 
 
 
 
 
 
 
 
402
  } else {
403
- echo "<div class='sfwd_debug_error'>" . sprintf( __( 'Failed to send to %s.', 'all-in-one-seo-pack' ), $email ) . '</div>';
 
 
404
  }
405
  } else {
406
  echo "<div class='sfwd_debug_error'>" . __( 'Error: please enter an e-mail address before submitting.', 'all-in-one-seo-pack' ) . '</div>';
407
  }
408
  }
409
  } while ( 0 ); // Control structure for use with break.
410
- $buf = "<ul class='sfwd_debug_settings'>\n{$page_text}\n</ul>\n";
411
 
412
  return $buf;
413
  }
@@ -422,7 +460,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
422
  function get_email_input() {
423
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
424
  $buf =
425
- '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '" aria-label="' . __( 'Enter the email address provided by Semper Plugins Support to send your debug information', 'all-in-one-seo-pack' ) . '">' .
 
 
426
  '<input name="sfwd_debug_nonce" type="hidden" value="' . $nonce . '">' .
427
  '<input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
428
  return $buf;
32
  * @param $mod
33
  */
34
  function __construct( $mod ) {
35
+ /* translators: This is the title of our Performance module. */
36
+ $this->name = __( 'Performance', 'all-in-one-seo-pack' );
37
+ $this->prefix = 'aiosp_performance_';
38
+ $this->file = __FILE__;
39
  parent::__construct();
40
 
41
  $this->default_options = array(
42
  'memory_limit' => array(
43
+ /* translators: This is the name of a setting which allows users to increase their PHP memory limit. */
44
  'name' => __( 'Raise memory limit', 'all-in-one-seo-pack' ),
45
  'default' => '256M',
46
  'type' => 'select',
47
  'initial_options' => array(
48
+ /* translators: This a dropdown value for the "Raise memory limit" setting. If this is selected, All in One SEO Pack will not override the PHP memory limit and use the default system value. */
49
  0 => __( 'Use the system default', 'all-in-one-seo-pack' ),
50
  '32M' => '32MB',
51
  '64M' => '64MB',
54
  ),
55
  ),
56
  'execution_time' => array(
57
+ /* translators: This is the name of a setting which allows users to increase their PHP execution time limit. */
58
  'name' => __( 'Raise execution time', 'all-in-one-seo-pack' ),
59
  'default' => '',
60
  'type' => 'select',
71
 
72
  global $aiosp, $aioseop_options;
73
  $this->default_options['force_rewrites'] = array(
74
+ /* translators: This is the name of a setting which forces the plugin to use output buffering to rewrite the title tag in the source code. */
75
+ 'name' => __( 'Force Rewrites', 'all-in-one-seo-pack' ),
76
  'default' => 1,
77
  'type' => 'radio',
78
  'initial_options' => array(
105
  );
106
 
107
  $this->layout['system_status'] = array(
108
+ /* translators: This is the header of a table in which All in One SEO Pack displays data about the user's WordPress installation and server. */
109
  'name' => __( 'System Status', 'all-in-one-seo-pack' ),
110
  'help_link' => 'https://semperplugins.com/documentation/performance-settings/',
111
  'options' => array_keys( $system_status ),
128
  * @return mixed
129
  */
130
  function update_options_filter( $options, $location ) {
131
+ if ( null == $location && isset( $options[ $this->prefix . 'force_rewrites' ] ) ) {
132
  unset( $options[ $this->prefix . 'force_rewrites' ] );
133
  }
134
 
145
  * @return mixed
146
  */
147
  function display_options_filter( $options, $location ) {
148
+ if ( null == $location ) {
149
  $options[ $this->prefix . 'force_rewrites' ] = 1;
150
  global $aiosp;
151
  $opts = $aiosp->get_current_options( array(), null );
163
  * @param $location
164
  */
165
  function settings_update_action( $options, $location ) {
166
+ if ( null == $location && isset( $_POST[ $this->prefix . 'force_rewrites' ] ) ) {
167
  $force_rewrites = $_POST[ $this->prefix . 'force_rewrites' ];
168
+ if ( ( 0 == $force_rewrites ) || ( 1 == $force_rewrites ) ) {
169
  global $aiosp;
170
  $opts = $aiosp->get_current_options( array(), null );
171
  $opts['aiosp_force_rewrites'] = $force_rewrites;
204
  * @since ?
205
  */
206
  function settings_page_init() {
207
+ $this->default_options['status']['default'] = $this->get_serverinfo();
208
  $this->default_options['send_email']['default'] = $this->get_email_input();
209
  }
210
 
246
  if ( ini_get( 'upload_max_filesize' ) ) {
247
  $upload_max = ini_get( 'upload_max_filesize' );
248
  } else {
249
+ /* translators: "N/A" is an abbreviation for "Non Applicable". */
250
  $upload_max = __( 'N/A', 'all-in-one-seo-pack' );
251
  }
252
  if ( ini_get( 'post_max_size' ) ) {
265
  $memory_limit = __( 'N/A', 'all-in-one-seo-pack' );
266
  }
267
  if ( function_exists( 'memory_get_usage' ) ) {
268
+ $memory_usage = round( memory_get_usage() / 1024 / 1024, 2 ) . 'M';
269
  } else {
270
  $memory_usage = __( 'N/A', 'all-in-one-seo-pack' );
271
  }
311
  $debug_info = array(
312
  __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
313
  __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
314
+ /* translators: "Memory" in this context refers to RAM memory. */
315
  __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
316
+ /* translators: "MYSQL" is the name of a database software and should not be translated. */
317
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
318
+ /* translators: "SQL" is a programming language that is used to store or retrieve data from databases and should not be translated. */
319
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
320
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
321
+ /* translators: This is a setting in the PHP interpreter of the server. Leave this untranslated if there's no proper translation for this. */
322
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
323
+ /* translators: "Memory" in this context refers to RAM memory. */
324
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
325
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
326
  __( 'PHP Max Post Size', 'all-in-one-seo-pack' ) => $post_max,
327
  __( 'PHP Max Script Execute Time', 'all-in-one-seo-pack' ) => $max_execute,
328
+ /* translators: The "PHP Exif" part should not be translated. */
329
  __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
330
+ /* translators: The "PHP IPTC" part should not be translated. */
331
  __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
332
+ /* translators: The "PHP XML" part should not be translated. */
333
  __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
334
+ /* translators: This is the base URL (e.g. "examplewebsite.com") of the website. */
335
  __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
336
+ /* translators: This is the URL of the homepage (e.g. "examplewebsite.com/home") of the website. */
337
  __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
338
  __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
339
+ /* translators: "DB" is an abbreviation for "Database". */
340
  __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
341
+ /* translators: "Multisite" or "WordPress Multisite" is a feature that allows users to create a network of websites. Leave this in English if there is no translation for this in your locale glossary. */
342
  __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
343
  __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
344
  __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
345
  __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
346
+ /* translators: This is a label that shows what page is used as the homepage/front page. */
347
+ __( 'Front Page Displays', 'all-in-one-seo-pack' ) => 'page' === $front_displays ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
348
  __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
349
+ /* translators: This is a label that shows what the current permalink structure is. The permalink structure is the way that the URLs of the website are formatted, e.g. "examplesite.com/?p=123" or "examplesite.com/1970/01/01/sample-post/". */
350
  __( 'Permalink Setting', 'all-in-one-seo-pack' ) => $perm_struct,
351
  );
352
  $debug_info[ __( 'Active Plugins', 'all-in-one-seo-pack' ) ] = null;
353
+ $active_plugins = array();
354
+ $inactive_plugins = array();
355
+ $plugins = get_plugins();
356
  foreach ( $plugins as $path => $plugin ) {
357
  if ( is_plugin_active( $path ) ) {
358
  $debug_info[ $plugin['Name'] ] = $plugin['Version'];
360
  $inactive_plugins[ $plugin['Name'] ] = $plugin['Version'];
361
  }
362
  }
 
 
363
 
364
+ $debug_key = __( 'Inactive Plugins', 'all-in-one-seo-pack' );
365
+ $debug_info[ $debug_key ] = null;
366
+ $debug_info = array_merge( $debug_info, (array) $inactive_plugins );
367
+
368
+ /* translators: "%s" is a placeholder so it should not be translated. It will be replaced with the name of the premium version of the plugin, All in One SEO Pack Pro. */
369
  $mail_text = sprintf( __( '%s Debug Info', 'all-in-one-seo-pack' ), 'All in One SEO Pack Pro' ) . "\r\n------------------\r\n\r\n";
370
  $page_text = '';
371
  if ( ! empty( $debug_info ) ) {
372
  foreach ( $debug_info as $name => $value ) {
373
+ if ( null !== $value ) {
374
  $page_text .= "<li><strong>$name</strong> $value</li>";
375
  $mail_text .= "$name: $value\r\n";
376
  } else {
384
  if ( ! empty( $_REQUEST['sfwd_debug_submit'] ) ) {
385
  $nonce = $_REQUEST['sfwd_debug_nonce'];
386
  if ( ! wp_verify_nonce( $nonce, 'sfwd-debug-nonce' ) ) {
387
+ echo "<div class='sfwd_debug_error'>" .
388
+ /* translators: This message is shown when a form could not be submitted due to a verification error (e.g. when a field is required and is still blank). */
389
+ __( 'Form submission error: verification check failed.', 'all-in-one-seo-pack' )
390
+ . '</div>';
391
  break;
392
  }
393
  $email = '';
396
  }
397
  if ( $email ) {
398
  $attachments = array();
399
+ $upload_dir = wp_upload_dir();
400
+ $dir = $upload_dir['basedir'] . '/aiosp-log/';
401
  if ( wp_mkdir_p( $dir ) ) {
402
  $file_path = $dir . 'settings_aioseop-' . date( 'Y-m-d' ) . '-' . time() . '.ini';
403
  if ( ! file_exists( $file_path ) ) {
406
  // @codingStandardsIgnoreEnd
407
  global $aiosp;
408
  $buf = '; ' . sprintf(
409
+ /* translators: %s is a placeholder so it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
410
  __( 'Settings export file for %s', 'all-in-one-seo-pack' ),
411
  AIOSEOP_PLUGIN_NAME
412
  ) . "\n";
424
  }
425
  }
426
 
427
+ /* translators: %s is a placeholder and should not be translated. It will be replaced with the URL of the website. Also, "SFWD" is an abbreviation for our business name and shouldn't be translated either. */
428
+ if ( wp_mail(
429
+ $email,
430
+ sprintf( __( 'SFWD Debug Mail From Site %s.', 'all-in-one-seo-pack' ), $siteurl ),
431
+ $mail_text,
432
+ '',
433
+ $attachments
434
+ ) ) {
435
+ echo "<div class='sfwd_debug_mail_sent'>" .
436
+ /* translators: %s is a placeholder and should not be translated. It will be replaced with an e-mail address. */
437
+ sprintf( __( 'Sent to %s.', 'all-in-one-seo-pack' ), $email ) . '</div>';
438
  } else {
439
+ echo "<div class='sfwd_debug_error'>" .
440
+ /* translators: %s is a placeholder and should not be translated. It will be replaced with an e-mail address. */
441
+ sprintf( __( 'Failed to send to %s.', 'all-in-one-seo-pack' ), $email ) . '</div>';
442
  }
443
  } else {
444
  echo "<div class='sfwd_debug_error'>" . __( 'Error: please enter an e-mail address before submitting.', 'all-in-one-seo-pack' ) . '</div>';
445
  }
446
  }
447
  } while ( 0 ); // Control structure for use with break.
448
+ $buf = "<ul class='sfwd_debug_settings'>\n{$page_text}\n</ul>\n";
449
 
450
  return $buf;
451
  }
460
  function get_email_input() {
461
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
462
  $buf =
463
+ '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' .
464
+ /* translators: This is the text of a button that can be clicked. Therefore, "E-mail" is used as a verb in this context. */
465
+ __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '" aria-label="' . __( 'Enter the email address provided by Semper Plugins Support to send your debug information', 'all-in-one-seo-pack' ) . '">' .
466
  '<input name="sfwd_debug_nonce" type="hidden" value="' . $nonce . '">' .
467
  '<input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
468
  return $buf;
modules/aioseop_sitemap.php CHANGED
@@ -316,10 +316,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
316
  'save' => false,
317
  ),
318
  'addl_mod' => array(
319
- 'name' => __( 'Last Modified', 'all-in-one-seo-pack' ),
320
- 'type' => 'date',
321
- 'save' => false,
322
- 'class' => 'aiseop-date',
 
323
  ),
324
  'addl_pages' => array(
325
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
@@ -727,6 +728,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
727
 
728
  // Exclude Terms element items.
729
  $this->default_options['excl_terms']['initial_options'] = array();
 
730
  $taxonomies_active = array();
731
  if ( is_array( $this->options[ $this->prefix . 'taxonomies' ] ) ) {
732
  $taxonomies_active = $this->options[ $this->prefix . 'taxonomies' ];
@@ -744,7 +746,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
744
 
745
  $excl_terms_init_opts = array();
746
  foreach ( $taxonomies_active as $v1_taxonomy ) {
747
- $args_terms = array(
748
  'taxonomy' => $v1_taxonomy,
749
  'hide_empty' => false,
750
  );
@@ -1073,8 +1075,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1073
  // Parse taxonomy terms {$taxonomy_slug}-{$term_id}.
1074
  $excl_terms = array();
1075
  foreach ( $raw_excl_terms as $v1_tax_term ) {
1076
- $term_id = explode( '-', $v1_tax_term );
1077
- $term_id = intval( end( $term_id ) );
1078
  $taxonomy_slug = sanitize_text_field( str_replace( '-' . $term_id, '', $v1_tax_term ) );
1079
 
1080
  // Initialize taxonomy => terms array if not yet set.
@@ -1136,7 +1138,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1136
  if ( ! $siteurl ) {
1137
  $siteurl = get_home_url( $blog_id );
1138
  }
1139
- $url = $siteurl . '/' . $this->get_filename() . '.xml';
1140
  $siteurls[] = $url;
1141
  }
1142
  }
@@ -1598,9 +1600,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1598
  $sitemap_memory_usage = $end_memory_usage - $this->start_memory_usage;
1599
  $end_memory_usage = $end_memory_usage / 1024.0 / 1024.0;
1600
  $sitemap_memory_usage = $sitemap_memory_usage / 1024.0 / 1024.0;
1601
- $sitemap_type = __( 'static', 'all-in-one-seo-pack ' );
1602
  if ( $dynamic ) {
1603
- $sitemap_type = __( 'dynamic', 'all-in-one-seo-pack ' );
1604
  }
1605
  $this->debug_message( sprintf( ' %01.2f MB memory used generating the %s sitemap in %01.3f seconds, %01.2f MB total memory used.', $sitemap_memory_usage, $sitemap_type, $time, $end_memory_usage ) );
1606
  }
@@ -2069,6 +2071,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2069
  ),
2070
  ),
2071
  );
 
2072
  $q = new WP_Query( $args );
2073
  if ( 0 === $q->post_count ) {
2074
  unset( $post_types[ $index ] );
@@ -2078,8 +2081,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2078
  }
2079
 
2080
  if ( ! empty( $post_types ) ) {
2081
- $prio = $this->get_default_priority( 'post' );
2082
- $freq = $this->get_default_frequency( 'post' );
2083
 
2084
  // Get post counts from posts type. Exclude if NoIndex is on, and does not contain excluded terms.
2085
  $args = array(
@@ -2207,7 +2210,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2207
  // Remove Additional Pages index if all pages are static and no extra pages are specified.
2208
  if ( ! $this->does_addl_sitemap_contain_urls() ) {
2209
  $page_to_remove = array( get_site_url() . '/addl-sitemap.xml' );
2210
- $files = $this->remove_urls_from_sitemap_page( $files, $page_to_remove );
2211
  }
2212
 
2213
  return $files;
@@ -2225,9 +2228,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2225
  */
2226
  private function does_addl_sitemap_contain_urls() {
2227
  $is_addl_pages = ! empty( $this->options['aiosp_sitemap_addl_pages'] );
2228
- if ( ! $is_addl_pages &&
2229
- ( 0 !== (int) get_option( 'page_on_front' ) ) &&
2230
- ( 0 !== (int) get_option( 'page_for_posts' ) ) ) {
2231
  return false;
2232
  }
2233
  return true;
@@ -2431,8 +2432,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2431
  * @return array
2432
  */
2433
  public function get_sitemap_without_indexes() {
2434
- $child_urls = $this->get_child_sitemap_urls();
2435
- $options = $this->options;
2436
 
2437
  if ( is_array( $options[ "{$this->prefix}posttypes" ] ) ) {
2438
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
@@ -2883,8 +2884,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2883
  $def_prio = $this->get_default_priority( 'taxonomies' );
2884
  $def_freq = $this->get_default_frequency( 'taxonomies' );
2885
  foreach ( $terms as $term ) {
2886
- $pr_info = array();
2887
- $pr_info['loc'] = $this->get_term_link( $term, $term->taxonomy );
2888
  $pr_info['lastmod'] = $this->get_tax_term_timestamp( $term );
2889
  if (
2890
  ( 'sel' === $this->options[ $this->prefix . 'freq_taxonomies' ] )
@@ -3297,7 +3298,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3297
  }
3298
 
3299
  $homepage_url = get_site_url() . '/';
3300
- $urls = $this->update_static_page_timestamp( $urls, $homepage_url );
3301
 
3302
  return $urls;
3303
  }
@@ -3319,7 +3320,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3319
  }
3320
 
3321
  $posts_page_url = get_permalink( $posts_page_id );
3322
- $urls = $this->update_static_page_timestamp( $urls, $posts_page_url );
3323
 
3324
  return $urls;
3325
  }
@@ -3580,7 +3581,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3580
  }
3581
 
3582
  $archive_pages = array();
3583
- $types = apply_filters( "{$this->prefix}include_post_types_archives", $types );
3584
  if ( $types ) {
3585
  foreach ( $types as $post_type => $p ) {
3586
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
@@ -4561,14 +4562,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4561
  $status = 'inherit';
4562
  }
4563
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
4564
- if ( is_array( $include ) && ( ( $pos = array_search( 'attachment', $include ) ) !== false ) ) {
4565
- unset( $include[ $pos ] );
4566
- $att_args = array(
4567
- 'post_type' => 'attachment',
4568
- 'post_status' => 'inherit',
4569
- );
4570
- $att_args = array_merge( $att_args, $page_query );
4571
- $posts = $this->get_all_post_type_data( $att_args );
 
 
 
4572
  }
4573
  $args = array(
4574
  'post_type' => $include,
@@ -4667,7 +4671,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
4667
 
4668
  if ( $latest_modified_product->have_posts() ) {
4669
  $timestamp = $latest_modified_product->posts[0]->post_modified_gmt;
4670
- $lastmod = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $timestamp ) );
4671
  // Last Change timestamp needs to be inserted as second attribute in order to have valid sitemap schema.
4672
  // TODO Use insert_timestamp_as_second_attribute() instead when #2721 is merged.
4673
  $links[ $shop_page_index ] = array_slice( $links[ $shop_page_index ], 0, 1, true ) + array( 'lastmod' => $lastmod ) + array_slice( $links[ $shop_page_index ], 1, null, true );
@@ -5012,8 +5016,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
5012
  }
5013
 
5014
  // Exclude (method) query args.
5015
- $ex_args = $args;
5016
- $ex_args['meta_query'] = array(
5017
  'relation' => 'OR',
5018
 
5019
  array(
@@ -5027,12 +5031,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
5027
  'compare' => '=',
5028
  ),
5029
  );
5030
- $ex_args['fields'] = 'ids';
5031
  // This needs to be -1 so that excluding posts isn't restricted to affect posts to not be excluded properly.
5032
  $ex_args['posts_per_page'] = -1;
 
5033
 
5034
  // Exclude (method) query.
5035
- $q_exclude = new WP_Query( $ex_args );
5036
  if ( ! empty( $q_exclude->posts ) ) {
5037
  $args['exclude'] = array_merge( $args['exclude'], $q_exclude->posts );
5038
  }
316
  'save' => false,
317
  ),
318
  'addl_mod' => array(
319
+ 'name' => __( 'Last Modified', 'all-in-one-seo-pack' ),
320
+ 'type' => 'date',
321
+ 'save' => false,
322
+ 'placeholder' => 'yyyy-mm-dd',
323
+ 'class' => 'aiseop-date',
324
  ),
325
  'addl_pages' => array(
326
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
728
 
729
  // Exclude Terms element items.
730
  $this->default_options['excl_terms']['initial_options'] = array();
731
+
732
  $taxonomies_active = array();
733
  if ( is_array( $this->options[ $this->prefix . 'taxonomies' ] ) ) {
734
  $taxonomies_active = $this->options[ $this->prefix . 'taxonomies' ];
746
 
747
  $excl_terms_init_opts = array();
748
  foreach ( $taxonomies_active as $v1_taxonomy ) {
749
+ $args_terms = array(
750
  'taxonomy' => $v1_taxonomy,
751
  'hide_empty' => false,
752
  );
1075
  // Parse taxonomy terms {$taxonomy_slug}-{$term_id}.
1076
  $excl_terms = array();
1077
  foreach ( $raw_excl_terms as $v1_tax_term ) {
1078
+ $term_id = explode( '-', $v1_tax_term );
1079
+ $term_id = intval( end( $term_id ) );
1080
  $taxonomy_slug = sanitize_text_field( str_replace( '-' . $term_id, '', $v1_tax_term ) );
1081
 
1082
  // Initialize taxonomy => terms array if not yet set.
1138
  if ( ! $siteurl ) {
1139
  $siteurl = get_home_url( $blog_id );
1140
  }
1141
+ $url = $siteurl . '/' . $this->get_filename() . '.xml';
1142
  $siteurls[] = $url;
1143
  }
1144
  }
1600
  $sitemap_memory_usage = $end_memory_usage - $this->start_memory_usage;
1601
  $end_memory_usage = $end_memory_usage / 1024.0 / 1024.0;
1602
  $sitemap_memory_usage = $sitemap_memory_usage / 1024.0 / 1024.0;
1603
+ $sitemap_type = __( 'static', 'all-in-one-seo-pack' );
1604
  if ( $dynamic ) {
1605
+ $sitemap_type = __( 'dynamic', 'all-in-one-seo-pack' );
1606
  }
1607
  $this->debug_message( sprintf( ' %01.2f MB memory used generating the %s sitemap in %01.3f seconds, %01.2f MB total memory used.', $sitemap_memory_usage, $sitemap_type, $time, $end_memory_usage ) );
1608
  }
2071
  ),
2072
  ),
2073
  );
2074
+
2075
  $q = new WP_Query( $args );
2076
  if ( 0 === $q->post_count ) {
2077
  unset( $post_types[ $index ] );
2081
  }
2082
 
2083
  if ( ! empty( $post_types ) ) {
2084
+ $prio = $this->get_default_priority( 'post' );
2085
+ $freq = $this->get_default_frequency( 'post' );
2086
 
2087
  // Get post counts from posts type. Exclude if NoIndex is on, and does not contain excluded terms.
2088
  $args = array(
2210
  // Remove Additional Pages index if all pages are static and no extra pages are specified.
2211
  if ( ! $this->does_addl_sitemap_contain_urls() ) {
2212
  $page_to_remove = array( get_site_url() . '/addl-sitemap.xml' );
2213
+ $files = $this->remove_urls_from_sitemap_page( $files, $page_to_remove );
2214
  }
2215
 
2216
  return $files;
2228
  */
2229
  private function does_addl_sitemap_contain_urls() {
2230
  $is_addl_pages = ! empty( $this->options['aiosp_sitemap_addl_pages'] );
2231
+ if ( ! $is_addl_pages && ( 'page' === get_option( 'show_on_front' ) ) ) {
 
 
2232
  return false;
2233
  }
2234
  return true;
2432
  * @return array
2433
  */
2434
  public function get_sitemap_without_indexes() {
2435
+ $child_urls = $this->get_child_sitemap_urls();
2436
+ $options = $this->options;
2437
 
2438
  if ( is_array( $options[ "{$this->prefix}posttypes" ] ) ) {
2439
  $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
2884
  $def_prio = $this->get_default_priority( 'taxonomies' );
2885
  $def_freq = $this->get_default_frequency( 'taxonomies' );
2886
  foreach ( $terms as $term ) {
2887
+ $pr_info = array();
2888
+ $pr_info['loc'] = $this->get_term_link( $term, $term->taxonomy );
2889
  $pr_info['lastmod'] = $this->get_tax_term_timestamp( $term );
2890
  if (
2891
  ( 'sel' === $this->options[ $this->prefix . 'freq_taxonomies' ] )
3298
  }
3299
 
3300
  $homepage_url = get_site_url() . '/';
3301
+ $urls = $this->update_static_page_timestamp( $urls, $homepage_url );
3302
 
3303
  return $urls;
3304
  }
3320
  }
3321
 
3322
  $posts_page_url = get_permalink( $posts_page_id );
3323
+ $urls = $this->update_static_page_timestamp( $urls, $posts_page_url );
3324
 
3325
  return $urls;
3326
  }
3581
  }
3582
 
3583
  $archive_pages = array();
3584
+ $types = apply_filters( "{$this->prefix}include_post_types_archives", $types );
3585
  if ( $types ) {
3586
  foreach ( $types as $post_type => $p ) {
3587
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
4562
  $status = 'inherit';
4563
  }
4564
  // TODO Add `true` in 3rd argument with in_array(); which changes it to a strict comparison.
4565
+ if ( is_array( $include ) ) {
4566
+ $pos = array_search( 'attachment', $include );
4567
+ if ( false !== $pos ) {
4568
+ unset( $include[ $pos ] );
4569
+ $att_args = array(
4570
+ 'post_type' => 'attachment',
4571
+ 'post_status' => 'inherit',
4572
+ );
4573
+ $att_args = array_merge( $att_args, $page_query );
4574
+ $posts = $this->get_all_post_type_data( $att_args );
4575
+ }
4576
  }
4577
  $args = array(
4578
  'post_type' => $include,
4671
 
4672
  if ( $latest_modified_product->have_posts() ) {
4673
  $timestamp = $latest_modified_product->posts[0]->post_modified_gmt;
4674
+ $lastmod = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $timestamp ) );
4675
  // Last Change timestamp needs to be inserted as second attribute in order to have valid sitemap schema.
4676
  // TODO Use insert_timestamp_as_second_attribute() instead when #2721 is merged.
4677
  $links[ $shop_page_index ] = array_slice( $links[ $shop_page_index ], 0, 1, true ) + array( 'lastmod' => $lastmod ) + array_slice( $links[ $shop_page_index ], 1, null, true );
5016
  }
5017
 
5018
  // Exclude (method) query args.
5019
+ $ex_args = $args;
5020
+ $ex_args['meta_query'] = array(
5021
  'relation' => 'OR',
5022
 
5023
  array(
5031
  'compare' => '=',
5032
  ),
5033
  );
 
5034
  // This needs to be -1 so that excluding posts isn't restricted to affect posts to not be excluded properly.
5035
  $ex_args['posts_per_page'] = -1;
5036
+ $ex_args['fields'] = 'ids';
5037
 
5038
  // Exclude (method) query.
5039
+ $q_exclude = new WP_Query( $ex_args );
5040
  if ( ! empty( $q_exclude->posts ) ) {
5041
  $args['exclude'] = array_merge( $args['exclude'], $q_exclude->posts );
5042
  }
public/front.php CHANGED
@@ -62,12 +62,24 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
62
  */
63
  function redirect_attachment() {
64
  global $aioseop_options;
65
- if ( ! isset( $aioseop_options['aiosp_redirect_attachement_parent'] ) || $aioseop_options['aiosp_redirect_attachement_parent'] !== 'on' ) {
66
  return false;
67
  }
68
 
69
  global $post;
70
- if ( is_attachment() && ( ( is_object( $post ) && isset( $post->post_parent ) ) && ( is_numeric( $post->post_parent ) && $post->post_parent != 0 ) ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
71
  wp_safe_redirect( aioseop_get_permalink( $post->post_parent ), 301 );
72
  exit;
73
  }
62
  */
63
  function redirect_attachment() {
64
  global $aioseop_options;
65
+ if ( ! isset( $aioseop_options['aiosp_redirect_attachement_parent'] ) || 'on' !== $aioseop_options['aiosp_redirect_attachement_parent'] ) {
66
  return false;
67
  }
68
 
69
  global $post;
70
+ if (
71
+ is_attachment() &&
72
+ (
73
+ (
74
+ is_object( $post ) &&
75
+ isset( $post->post_parent )
76
+ ) &&
77
+ (
78
+ is_numeric( $post->post_parent ) &&
79
+ 0 != $post->post_parent
80
+ )
81
+ )
82
+ ) {
83
  wp_safe_redirect( aioseop_get_permalink( $post->post_parent ), 301 );
84
  exit;
85
  }
public/google-analytics.php CHANGED
@@ -105,7 +105,11 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
105
  */
106
  public function universal_analytics() {
107
  global $aioseop_options;
108
- $allow_linker = $cookie_domain = $domain = $addl_domains = $domain_list = '';
 
 
 
 
109
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
110
  $cookie_domain = $this->get_analytics_domain();
111
  }
@@ -159,7 +163,7 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
159
  }
160
  }
161
  $extra_options = apply_filters( 'aioseop_ga_extra_options', $extra_options, $aioseop_options );
162
- $js_options = array();
163
  foreach ( array( 'cookie_domain', 'allow_linker' ) as $opts ) {
164
  if ( ! empty( $$opts ) ) {
165
  $js_options[] = $$opts;
105
  */
106
  public function universal_analytics() {
107
  global $aioseop_options;
108
+ $allow_linker = '';
109
+ $cookie_domain = '';
110
+ $domain = '';
111
+ $addl_domains = '';
112
+ $domain_list = '';
113
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
114
  $cookie_domain = $this->get_analytics_domain();
115
  }
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;
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9
 
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.9
7
  License: GPLv2 or later
8
  Requires PHP: 5.2.4
9