All in One SEO Pack - Version 2.4.6

Version Description

Download this release

Release Info

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

Code changes from version 2.4.5.1 to 2.4.6

admin/aioseop_module_class.php CHANGED
@@ -43,12 +43,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
43
  * @param $arguments
44
  *
45
  * @throws Exception
 
46
  */
47
  function __call( $name, $arguments ) {
48
  if ( $this->strpos( $name, 'display_settings_page_' ) === 0 ) {
49
  return $this->display_settings_page( $this->substr( $name, 22 ) );
50
  }
51
- $error = __( sprintf( "Method %s doesn't exist", $name ), 'all-in-one-seo-pack' );
52
  if ( class_exists( 'BadMethodCallException' ) ) {
53
  throw new BadMethodCallException( $error );
54
  }
@@ -64,7 +65,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
64
  }
65
  $this->plugin_name = AIOSEOP_PLUGIN_NAME;
66
  $this->plugin_path = array();
67
- // $this->plugin_path['dir'] = plugin_dir_path( $this->file );
68
  $this->plugin_path['basename'] = plugin_basename( $this->file );
69
  $this->plugin_path['dirname'] = dirname( $this->plugin_path['basename'] );
70
  $this->plugin_path['url'] = plugin_dir_url( $this->file );
@@ -164,7 +165,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
164
  return ( isset( $this->options[ $opt ] ) && $this->options[ $opt ] );
165
  }
166
 
167
- /*** Case conversion; handle non UTF-8 encodings and fallback **
 
168
  *
169
  * @param $str
170
  * @param string $mode
@@ -388,8 +390,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
388
  $output = (string) $v;
389
  }
390
  }
391
- if ( $node->attributes->length && ! is_array( $output ) ) //Has attributes but isn't an array
392
- {
393
  $output = array( '@content' => $output );
394
  } //Change output into an array.
395
  if ( is_array( $output ) ) {
@@ -414,7 +415,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
414
  return $output;
415
  }
416
 
417
- /*** adds support for using %cf_(name of field)% for using custom fields / Advanced Custom Fields in titles / descriptions etc. **
 
418
  *
419
  * @param $format
420
  *
@@ -465,7 +467,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
465
  return false;
466
  }
467
 
 
468
  return $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = {$blog_id} AND site_id != blog_id" );
 
469
  }
470
 
471
  return false;
@@ -503,7 +507,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
503
  $regex = '';
504
  $cont = 0;
505
  foreach ( $list as $l ) {
506
- $trim_l = trim ( $l );
507
  if ( ! empty( $trim_l ) ) {
508
  if ( $cont ) {
509
  $regex .= '|';
@@ -802,9 +806,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
802
  <?php
803
  foreach ( $tabs as $k => $v ) {
804
  ?>
805
- <a class="aioseop_head_nav_tab aioseop_head_nav_<?php if ( $this->current_tab != $k ) {
 
 
806
  echo 'in';
807
- } ?>active"
 
 
808
  href="<?php echo esc_url( add_query_arg( 'tab', $k ) ); ?>"><?php echo $v['name']; ?></a>
809
  <?php
810
  }
@@ -956,11 +964,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
956
  }
957
 
958
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
959
- $buf .= $this->post_data_export( '_aioseop', array(
960
- 'posts_per_page' => - 1,
961
- 'post_type' => $post_types,
962
- 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit' ),
963
- ) );
 
 
964
  }
965
 
966
  /* Add all active settings to settings file */
@@ -973,16 +983,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
973
  continue;
974
  } // don't re-export all module settings -- pdb
975
  if ( is_array( $value ) ) {
976
- $value = "'" . str_replace( array( "'", "\n", "\r" ), array(
 
977
  "\'",
978
  '\n',
979
  '\r',
980
- ), trim( serialize( $value ) ) ) . "'";
 
981
  } else {
982
- $value = str_replace( array( "\n", "\r" ), array(
983
- '\n',
984
- '\r',
985
- ), trim( var_export( $value, true ) ) );
 
 
986
  }
987
  $buf .= "$key = $value\n";
988
  }
@@ -1011,7 +1025,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1011
  return false;
1012
  }
1013
 
1014
- /***
 
1015
  * Backwards compatibility - see http://php.net/manual/en/function.str-getcsv.php
1016
  *
1017
  * @param $input
@@ -1021,7 +1036,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1021
  *
1022
  * @return array
1023
  */
1024
- function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = "\\" ) {
1025
  $fp = fopen( 'php://memory', 'r+' );
1026
  fputs( $fp, $input );
1027
  rewind( $fp );
@@ -1031,7 +1046,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1031
  return $data;
1032
  }
1033
 
1034
- /***
 
1035
  * Helper function to convert csv in key/value pair format to an associative array.
1036
  *
1037
  * @param $csv
@@ -1212,8 +1228,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1212
  * @return bool
1213
  */
1214
  function save_file( $filename, $contents ) {
1215
- $failed_str = __( sprintf( "Failed to write file %s!\n", $filename ), 'all-in-one-seo-pack' );
1216
- $readonly_str = __( sprintf( "File %s isn't writable!\n", $filename ), 'all-in-one-seo-pack' );
1217
  $wpfs = $this->get_filesystem_object();
1218
  if ( is_object( $wpfs ) ) {
1219
  $file_exists = $wpfs->exists( $filename );
@@ -1243,12 +1259,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1243
  if ( is_object( $wpfs ) ) {
1244
  if ( $wpfs->exists( $filename ) ) {
1245
  if ( $wpfs->delete( $filename ) === false ) {
1246
- $this->output_error( __( sprintf( "Failed to delete file %s!\n", $filename ), 'all-in-one-seo-pack' ) );
1247
  } else {
1248
  return true;
1249
  }
1250
  } else {
1251
- $this->output_error( __( sprintf( "File %s doesn't exist!\n", $filename ), 'all-in-one-seo-pack' ) );
1252
  }
1253
  }
1254
 
@@ -1270,15 +1286,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1270
  $newfile_exists = $wpfs->exists( $newname );
1271
  if ( $file_exists && ! $newfile_exists ) {
1272
  if ( $wpfs->move( $filename, $newname ) === false ) {
1273
- $this->output_error( __( sprintf( "Failed to rename file %s!\n", $filename ), 'all-in-one-seo-pack' ) );
1274
  } else {
1275
  return true;
1276
  }
1277
  } else {
1278
  if ( ! $file_exists ) {
1279
- $this->output_error( __( sprintf( "File %s doesn't exist!\n", $filename ), 'all-in-one-seo-pack' ) );
1280
  } elseif ( $newfile_exists ) {
1281
- $this->output_error( __( sprintf( "File %s already exists!\n", $newname ), 'all-in-one-seo-pack' ) );
1282
  }
1283
  }
1284
  }
@@ -1390,10 +1406,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1390
  }
1391
 
1392
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1393
- $image = $this->get_the_image_by_meta_key( array(
1394
- 'post_id' => $post->ID,
1395
- 'meta_key' => explode( ',', $meta_key ),
1396
- ) );
 
 
1397
  if ( ! empty( $image ) ) {
1398
  $img[] = array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
1399
  }
@@ -1417,14 +1435,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1417
  $args['options']['save'] = false;
1418
  $wp_query->queried_object = $post;
1419
 
1420
- $attachments = get_children( array(
1421
- 'post_parent' => $post->ID,
1422
- 'post_status' => 'inherit',
1423
- 'post_type' => 'attachment',
1424
- 'post_mime_type' => 'image',
1425
- 'order' => 'ASC',
1426
- 'orderby' => 'menu_order ID',
1427
- ) );
 
 
1428
  if ( ! empty( $attachments ) ) {
1429
  foreach ( $attachments as $id => $attachment ) {
1430
  $image = wp_get_attachment_image_src( $id, $size );
@@ -1459,7 +1479,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1459
  $img = $this->get_all_images_by_type( $options, $p );
1460
  $legacy = array();
1461
  foreach ( $img as $k => $v ) {
1462
- $v['link'] = set_url_scheme($v['link']);
1463
  if ( $v['type'] == 'featured' ) {
1464
  $legacy[ $v['link'] ] = 1;
1465
  } else {
@@ -1470,7 +1490,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1470
  return $legacy;
1471
  }
1472
 
1473
- /*** Thanks to Justin Tadlock for the original get-the-image code - http://themehybrid.com/plugins/get-the-image **
 
1474
  *
1475
  * @param null $options
1476
  * @param null $p
@@ -1493,10 +1514,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1493
 
1494
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1495
  $meta_key = explode( ',', $meta_key );
1496
- $image = $this->get_the_image_by_meta_key( array(
1497
- 'post_id' => $post->ID,
1498
- 'meta_key' => $meta_key,
1499
- ) );
 
 
1500
  }
1501
  if ( empty( $image ) ) {
1502
  $image = $this->get_the_image_by_post_thumbnail( $post );
@@ -1563,8 +1586,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1563
  $post = $p;
1564
  }
1565
 
1566
- if ( is_category() || is_tag() || is_tax() )
1567
  return false;
 
1568
 
1569
  $post_thumbnail_id = null;
1570
  if ( function_exists( 'get_post_thumbnail_id' ) ) {
@@ -1595,14 +1619,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1595
  $post = $p;
1596
  }
1597
 
1598
- $attachments = get_children( array(
1599
- 'post_parent' => $post->ID,
1600
- 'post_status' => 'inherit',
1601
- 'post_type' => 'attachment',
1602
- 'post_mime_type' => 'image',
1603
- 'order' => 'ASC',
1604
- 'orderby' => 'menu_order ID',
1605
- ) );
 
 
1606
 
1607
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1608
  $size = 'large';
@@ -1763,7 +1789,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1763
  }
1764
  }
1765
 
1766
- function admin_enqueue_scripts(){
1767
  wp_enqueue_media(); // WP 3.5+ Media upload.
1768
  }
1769
 
@@ -1797,11 +1823,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1797
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
1798
  }
1799
  global $post;
1800
- if( !empty( $post->ID) ) {
1801
  wp_enqueue_media( array( 'post' => $post->ID ) );
1802
- }else{
1803
  wp_enqueue_media();
1804
- }
1805
  wp_enqueue_script( 'aioseop-module-script', AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_module.js', array(), AIOSEOP_VERSION );
1806
  if ( ! empty( $this->script_data ) ) {
1807
  aioseop_localize_script_data();
@@ -1895,37 +1921,43 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1895
  }
1896
 
1897
  if ( $this->locations === null ) {
1898
- array_unshift( $links, array(
1899
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1900
- 'title' => $name,
1901
- 'id' => $hookname,
1902
- 'href' => $url,
1903
- 'order' => $this->menu_order(),
1904
- ) );
 
 
1905
  } else {
1906
  foreach ( $this->locations as $k => $v ) {
1907
  if ( $v['type'] === 'settings' ) {
1908
  if ( $k === 'default' ) {
1909
- array_unshift( $links, array(
1910
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1911
- 'title' => $name,
1912
- 'id' => $hookname,
1913
- 'href' => $url,
1914
- 'order' => $this->menu_order(),
1915
- ) );
 
 
1916
  } else {
1917
  if ( ! empty( $v['menu_name'] ) ) {
1918
  $name = $v['menu_name'];
1919
  } else {
1920
  $name = $v['name'];
1921
  }
1922
- array_unshift( $links, array(
1923
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1924
- 'title' => $name,
1925
- 'id' => $this->get_prefix( $k ) . $k,
1926
- 'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ),
1927
- 'order' => $this->menu_order(),
1928
- ) );
 
 
1929
  }
1930
  }
1931
  }
@@ -1971,10 +2003,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1971
  $name = $this->name;
1972
  }
1973
  if ( $this->locations === null ) {
1974
- $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1975
- $this,
1976
- 'display_settings_page',
1977
- ) );
 
 
1978
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
1979
 
1980
  return true;
@@ -1987,20 +2021,24 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1987
  } else {
1988
  $name = $this->name;
1989
  }
1990
- $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1991
- $this,
1992
- 'display_settings_page',
1993
- ) );
 
 
1994
  } else {
1995
  if ( ! empty( $v['menu_name'] ) ) {
1996
  $name = $v['menu_name'];
1997
  } else {
1998
  $name = $v['name'];
1999
  }
2000
- $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $this->get_prefix( $k ) . $k, array(
2001
- $this,
2002
- "display_settings_page_$k",
2003
- ) );
 
 
2004
  }
2005
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2006
  } elseif ( $v['type'] === 'metabox' ) {
@@ -2021,7 +2059,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2021
  $v['posttype'] = $posttype;
2022
 
2023
  if ( post_type_exists( $posttype ) ) {
2024
- // Metabox priority/context on edit post screen.
2025
  $v['context'] = apply_filters( 'aioseop_post_metabox_context', 'normal' );
2026
  $v['priority'] = apply_filters( 'aioseop_post_metabox_priority', 'high' );
2027
  }
@@ -2057,10 +2095,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2057
  if ( ! empty( $v['help_link'] ) ) {
2058
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2059
  }
2060
- add_meta_box( $v['prefix'] . $k, $title, array(
2061
- $this,
2062
- 'display_metabox',
2063
- ), $posttype, $v['context'], $v['priority'], $v );
 
 
2064
  }
2065
  }
2066
  }
@@ -2109,7 +2149,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2109
  * @return string
2110
  */
2111
  function do_multi_input( $args ) {
 
2112
  extract( $args );
 
2113
  $buf1 = '';
2114
  $type = $options['type'];
2115
 
@@ -2135,8 +2177,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2135
  if ( isset( $options['initial_options'] ) && is_array( $options['initial_options'] ) ) {
2136
  foreach ( $options['initial_options'] as $l => $option ) {
2137
  $option_check = strip_tags( is_array( $option ) ? implode( ' ', $option ) : $option );
2138
- if ( empty( $l ) && empty( $option_check ) )
2139
  continue;
 
2140
  $is_group = is_array( $option );
2141
  if ( ! $is_group ) {
2142
  $option = array( $l => $option );
@@ -2151,7 +2194,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2151
  } else {
2152
  $cmp = ! strcmp( $v, '' );
2153
  }
2154
- // $cmp = !strcmp( (string)$v, (string)$value );
2155
  } else {
2156
  $cmp = ( $value == $v );
2157
  }
@@ -2185,22 +2228,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2185
  */
2186
  function get_option_html( $args ) {
2187
  static $n = 0;
 
2188
  extract( $args );
 
 
2189
  if ( $options['type'] == 'custom' ) {
2190
  return apply_filters( "{$prefix}output_option", '', $args );
2191
  }
2192
- if ( in_array( $options['type'], array(
2193
- 'multiselect',
2194
- 'select',
2195
- 'multicheckbox',
2196
- 'radio',
2197
- 'checkbox',
2198
- 'textarea',
2199
- 'text',
2200
- 'submit',
2201
- 'hidden',
2202
- 'date',
2203
- ) ) && is_string( $value )
 
 
2204
  ) {
2205
  $value = esc_attr( $value );
2206
  }
@@ -2222,12 +2270,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2222
  $attr .= ' MULTIPLE';
2223
  $args['attr'] = $attr;
2224
  $args['name'] = $name = "{$name}[]";
 
2225
  case 'select':
2226
  $buf .= $this->do_multi_input( $args );
2227
  break;
2228
  case 'multicheckbox':
2229
  $args['name'] = $name = "{$name}[]";
2230
  $args['options']['type'] = $options['type'] = 'checkbox';
 
2231
  case 'radio':
2232
  $buf .= $this->do_multi_input( $args );
2233
  break;
@@ -2242,16 +2292,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2242
  break;
2243
  case 'image':
2244
  $buf .= '<input class="aioseop_upload_image_checker" type="hidden" name="' . $name . '_checker" value="0">' .
2245
- "<input class='aioseop_upload_image_button button-primary' type='button' value='";
2246
  $buf .= __( 'Upload Image', 'all-in-one-seo-pack' );
2247
  $buf .= "' style='float:left;' />" .
2248
- "<input class='aioseop_upload_image_label' name='$name' type='text' $attr value='$value' size=57 style='float:left;clear:left;'>\n";
2249
  break;
2250
  case 'html':
2251
  $buf .= $value;
2252
  break;
2253
  case 'esc_html':
2254
- $buf .= "<pre>" . esc_html( $value ) . "</pre>\n";
2255
  break;
2256
  case 'date':
2257
  // firefox and IE < 11 do not have support for HTML5 date, so we will fall back to the datepicker.
@@ -2266,17 +2316,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2266
  $size = $options['size'];
2267
  } elseif ( isset( $options['rows'] ) && isset( $options['cols'] ) ) {
2268
  $size = $options['rows'] * $options['cols'];
2269
- }
2270
  if ( 'Description' === $options['name'] && isset( $options['name'] ) ) {
2271
  $size = ( $size - 90 ) . '-' . $size;
2272
  }
2273
  if ( isset( $options['count_desc'] ) ) {
2274
  $count_desc = $options['count_desc'];
2275
  } else {
2276
- $count_desc = __( ' characters. Most search engines use a maximum of %s chars for the %s.', 'all-in-one-seo-pack' );
2277
  }
2278
  $buf .= "<br /><input readonly type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
2279
- . sprintf( $count_desc, $size, trim( $this->strtolower( $options['name'] ), ':' ) );
2280
  if ( ! empty( $onload ) ) {
2281
  $buf .= "<script>jQuery( document ).ready(function() { {$onload} });</script>";
2282
  }
@@ -2465,6 +2515,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2465
  }
2466
  switch ( $type ) {
2467
  case 'multiselect':
 
2468
  case 'multicheckbox':
2469
  $this->options[ $k ] = urlencode_deep( $this->options[ $k ] );
2470
  break;
@@ -2477,9 +2528,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2477
  break;
2478
  case 'text':
2479
  $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
 
2480
  case 'checkbox':
 
2481
  case 'radio':
 
2482
  case 'select':
 
2483
  default:
2484
  if ( ! is_array( $this->options[ $k ] ) ) {
2485
  $this->options[ $k ] = esc_attr( $this->options[ $k ] );
@@ -2526,11 +2581,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2526
  function handle_settings_updates( $location = null ) {
2527
  $message = '';
2528
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
2529
- ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) || ! empty( $_POST['Submit'] ) ) )
2530
  ) {
2531
  $nonce = $_POST['nonce-aioseop'];
2532
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
2533
- die ( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
2534
  }
2535
  if ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
2536
  $message = __( 'Options Reset.', 'all-in-one-seo-pack' );
@@ -2588,9 +2643,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2588
  echo $errors;
2589
  ?>
2590
  <div id="aioseop_settings_header">
2591
- <?php if ( ! empty( $message ) && empty( $errors ) ) {
 
2592
  echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
2593
- } ?>
 
2594
  <div id="icon-aioseop" class="icon32"><br></div>
2595
  <h2><?php echo $name; ?></h2>
2596
  <div id="dropmessage" class="updated" style="display:none;"></div>
@@ -2633,17 +2690,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2633
  if ( isset( $s['class'] ) ) {
2634
  $class = " class='{$s['class']}' ";
2635
  }
2636
- echo $this->get_option_html( array(
2637
- 'name' => $k,
2638
- 'options' => $s,
2639
- 'attr' => $class,
2640
- 'value' => $s['value'],
2641
- ) );
 
 
2642
  }
2643
  ?>
2644
  </div>
2645
  <div class="aioseop_options_wrapper aioseop_settings_left">
2646
- <?php $opts = $this->get_class_option();
 
2647
  if ( $opts !== false ) {
2648
  $this->options = $opts;
2649
  }
@@ -2654,21 +2714,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2654
  if ( ! empty( $lopts['help_link'] ) ) {
2655
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2656
  }
2657
- add_meta_box( $this->get_prefix( $location ) . $l . '_metabox', $title, array(
2658
- $this,
2659
- 'display_options',
2660
- ),
2661
- "{$this->prefix}settings", 'advanced', 'default', $lopts );
 
 
2662
  }
2663
  }
2664
  } else {
2665
- add_meta_box( $this->get_prefix( $location ) . 'metabox', $name, array(
2666
- $this,
2667
- 'display_options',
2668
- ), "{$this->prefix}settings", 'advanced' );
 
 
2669
  }
2670
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
2671
- ?> <p class="submit" style="clear:both;"><?php
 
 
2672
  foreach ( array( 'action', 'nonce-aioseop', 'page_options' ) as $submit_field ) {
2673
  if ( isset( $submit_field ) ) {
2674
  unset( $submit_field );
@@ -2679,19 +2745,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2679
  if ( isset( $s['class'] ) ) {
2680
  $class = " class='{$s['class']}' ";
2681
  }
2682
- echo $this->get_option_html( array(
2683
- 'name' => $k,
2684
- 'options' => $s,
2685
- 'attr' => $class,
2686
- 'value' => $s['value'],
2687
- ) );
 
 
2688
  }
2689
- ?> </p>
 
2690
  </div>
2691
  </form>
2692
- <?php do_action( $this->prefix . 'settings_footer', $location );
2693
- do_action( 'aioseop_global_settings_footer', $location ); ?>
2694
- </div> <?php
 
 
 
2695
  }
2696
 
2697
  /**
@@ -2874,14 +2946,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2874
  $get_opts = AIO_ProGeneral::getprotax( $get_opts );
2875
  $get_opts = get_term_meta( $term_id, '_' . $prefix . $location, true );
2876
  }
2877
-
2878
  } elseif ( isset( $post ) ) {
2879
  $get_opts = get_post_meta( $post->ID, '_' . $prefix . $location, true );
2880
  }
2881
  }
2882
 
2883
  if ( is_home() && ! is_front_page() ) {
2884
- // If we're on the non-front page blog page, WP doesn't really know its post meta data so we need to get that manually for social meta.
2885
  $get_opts = get_post_meta( get_option( 'page_for_posts' ), '_' . $prefix . $location, true );
2886
  }
2887
 
43
  * @param $arguments
44
  *
45
  * @throws Exception
46
+ * @throws BadMethodCallException
47
  */
48
  function __call( $name, $arguments ) {
49
  if ( $this->strpos( $name, 'display_settings_page_' ) === 0 ) {
50
  return $this->display_settings_page( $this->substr( $name, 22 ) );
51
  }
52
+ $error = sprintf( __( "Method %s doesn't exist", 'all-in-one-seo-pack' ), $name );
53
  if ( class_exists( 'BadMethodCallException' ) ) {
54
  throw new BadMethodCallException( $error );
55
  }
65
  }
66
  $this->plugin_name = AIOSEOP_PLUGIN_NAME;
67
  $this->plugin_path = array();
68
+ // $this->plugin_path['dir'] = plugin_dir_path( $this->file );
69
  $this->plugin_path['basename'] = plugin_basename( $this->file );
70
  $this->plugin_path['dirname'] = dirname( $this->plugin_path['basename'] );
71
  $this->plugin_path['url'] = plugin_dir_url( $this->file );
165
  return ( isset( $this->options[ $opt ] ) && $this->options[ $opt ] );
166
  }
167
 
168
+ /**
169
+ * Case conversion; handle non UTF-8 encodings and fallback **
170
  *
171
  * @param $str
172
  * @param string $mode
390
  $output = (string) $v;
391
  }
392
  }
393
+ if ( $node->attributes->length && ! is_array( $output ) ) { // Has attributes but isn't an array
 
394
  $output = array( '@content' => $output );
395
  } //Change output into an array.
396
  if ( is_array( $output ) ) {
415
  return $output;
416
  }
417
 
418
+ /**
419
+ * adds support for using %cf_(name of field)% for using custom fields / Advanced Custom Fields in titles / descriptions etc. **
420
  *
421
  * @param $format
422
  *
467
  return false;
468
  }
469
 
470
+ // @codingStandardsIgnoreStart
471
  return $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = {$blog_id} AND site_id != blog_id" );
472
+ // @codingStandardsIgnoreEnd
473
  }
474
 
475
  return false;
507
  $regex = '';
508
  $cont = 0;
509
  foreach ( $list as $l ) {
510
+ $trim_l = trim( $l );
511
  if ( ! empty( $trim_l ) ) {
512
  if ( $cont ) {
513
  $regex .= '|';
806
  <?php
807
  foreach ( $tabs as $k => $v ) {
808
  ?>
809
+ <a class="aioseop_head_nav_tab aioseop_head_nav_
810
+ <?php
811
+ if ( $this->current_tab != $k ) {
812
  echo 'in';
813
+ }
814
+ ?>
815
+ active"
816
  href="<?php echo esc_url( add_query_arg( 'tab', $k ) ); ?>"><?php echo $v['name']; ?></a>
817
  <?php
818
  }
964
  }
965
 
966
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
967
+ $buf .= $this->post_data_export(
968
+ '_aioseop', array(
969
+ 'posts_per_page' => - 1,
970
+ 'post_type' => $post_types,
971
+ 'post_status' => array( 'publish', 'pending', 'draft', 'future', 'private', 'inherit' ),
972
+ )
973
+ );
974
  }
975
 
976
  /* Add all active settings to settings file */
983
  continue;
984
  } // don't re-export all module settings -- pdb
985
  if ( is_array( $value ) ) {
986
+ $value = "'" . str_replace(
987
+ array( "'", "\n", "\r" ), array(
988
  "\'",
989
  '\n',
990
  '\r',
991
+ ), trim( serialize( $value ) )
992
+ ) . "'";
993
  } else {
994
+ $value = str_replace(
995
+ array( "\n", "\r" ), array(
996
+ '\n',
997
+ '\r',
998
+ ), trim( var_export( $value, true ) )
999
+ );
1000
  }
1001
  $buf .= "$key = $value\n";
1002
  }
1025
  return false;
1026
  }
1027
 
1028
+ /**
1029
+ *
1030
  * Backwards compatibility - see http://php.net/manual/en/function.str-getcsv.php
1031
  *
1032
  * @param $input
1036
  *
1037
  * @return array
1038
  */
1039
+ function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = '\\' ) {
1040
  $fp = fopen( 'php://memory', 'r+' );
1041
  fputs( $fp, $input );
1042
  rewind( $fp );
1046
  return $data;
1047
  }
1048
 
1049
+ /**
1050
+ *
1051
  * Helper function to convert csv in key/value pair format to an associative array.
1052
  *
1053
  * @param $csv
1228
  * @return bool
1229
  */
1230
  function save_file( $filename, $contents ) {
1231
+ $failed_str = sprintf( __( "Failed to write file %s!\n", 'all-in-one-seo-pack' ), $filename );
1232
+ $readonly_str = sprintf( __( "File %s isn't writable!\n", 'all-in-one-seo-pack' ), $filename );
1233
  $wpfs = $this->get_filesystem_object();
1234
  if ( is_object( $wpfs ) ) {
1235
  $file_exists = $wpfs->exists( $filename );
1259
  if ( is_object( $wpfs ) ) {
1260
  if ( $wpfs->exists( $filename ) ) {
1261
  if ( $wpfs->delete( $filename ) === false ) {
1262
+ $this->output_error( sprintf( __( "Failed to delete file %s!\n", 'all-in-one-seo-pack' ), $filename ) );
1263
  } else {
1264
  return true;
1265
  }
1266
  } else {
1267
+ $this->output_error( sprintf( __( "File %s doesn't exist!\n", 'all-in-one-seo-pack' ), $filename ) );
1268
  }
1269
  }
1270
 
1286
  $newfile_exists = $wpfs->exists( $newname );
1287
  if ( $file_exists && ! $newfile_exists ) {
1288
  if ( $wpfs->move( $filename, $newname ) === false ) {
1289
+ $this->output_error( sprintf( __( "Failed to rename file %s!\n", 'all-in-one-seo-pack' ), $filename ) );
1290
  } else {
1291
  return true;
1292
  }
1293
  } else {
1294
  if ( ! $file_exists ) {
1295
+ $this->output_error( sprintf( __( "File %s doesn't exist!\n", 'all-in-one-seo-pack' ), $filename ) );
1296
  } elseif ( $newfile_exists ) {
1297
+ $this->output_error( sprintf( __( "File %s already exists!\n", 'all-in-one-seo-pack' ), $newname ) );
1298
  }
1299
  }
1300
  }
1406
  }
1407
 
1408
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1409
+ $image = $this->get_the_image_by_meta_key(
1410
+ array(
1411
+ 'post_id' => $post->ID,
1412
+ 'meta_key' => explode( ',', $meta_key ),
1413
+ )
1414
+ );
1415
  if ( ! empty( $image ) ) {
1416
  $img[] = array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
1417
  }
1435
  $args['options']['save'] = false;
1436
  $wp_query->queried_object = $post;
1437
 
1438
+ $attachments = get_children(
1439
+ array(
1440
+ 'post_parent' => $post->ID,
1441
+ 'post_status' => 'inherit',
1442
+ 'post_type' => 'attachment',
1443
+ 'post_mime_type' => 'image',
1444
+ 'order' => 'ASC',
1445
+ 'orderby' => 'menu_order ID',
1446
+ )
1447
+ );
1448
  if ( ! empty( $attachments ) ) {
1449
  foreach ( $attachments as $id => $attachment ) {
1450
  $image = wp_get_attachment_image_src( $id, $size );
1479
  $img = $this->get_all_images_by_type( $options, $p );
1480
  $legacy = array();
1481
  foreach ( $img as $k => $v ) {
1482
+ $v['link'] = set_url_scheme( $v['link'] );
1483
  if ( $v['type'] == 'featured' ) {
1484
  $legacy[ $v['link'] ] = 1;
1485
  } else {
1490
  return $legacy;
1491
  }
1492
 
1493
+ /**
1494
+ * Thanks to Justin Tadlock for the original get-the-image code - http://themehybrid.com/plugins/get-the-image **
1495
  *
1496
  * @param null $options
1497
  * @param null $p
1514
 
1515
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1516
  $meta_key = explode( ',', $meta_key );
1517
+ $image = $this->get_the_image_by_meta_key(
1518
+ array(
1519
+ 'post_id' => $post->ID,
1520
+ 'meta_key' => $meta_key,
1521
+ )
1522
+ );
1523
  }
1524
  if ( empty( $image ) ) {
1525
  $image = $this->get_the_image_by_post_thumbnail( $post );
1586
  $post = $p;
1587
  }
1588
 
1589
+ if ( is_category() || is_tag() || is_tax() ) {
1590
  return false;
1591
+ }
1592
 
1593
  $post_thumbnail_id = null;
1594
  if ( function_exists( 'get_post_thumbnail_id' ) ) {
1619
  $post = $p;
1620
  }
1621
 
1622
+ $attachments = get_children(
1623
+ array(
1624
+ 'post_parent' => $post->ID,
1625
+ 'post_status' => 'inherit',
1626
+ 'post_type' => 'attachment',
1627
+ 'post_mime_type' => 'image',
1628
+ 'order' => 'ASC',
1629
+ 'orderby' => 'menu_order ID',
1630
+ )
1631
+ );
1632
 
1633
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1634
  $size = 'large';
1789
  }
1790
  }
1791
 
1792
+ function admin_enqueue_scripts() {
1793
  wp_enqueue_media(); // WP 3.5+ Media upload.
1794
  }
1795
 
1823
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
1824
  }
1825
  global $post;
1826
+ if ( ! empty( $post->ID ) ) {
1827
  wp_enqueue_media( array( 'post' => $post->ID ) );
1828
+ } else {
1829
  wp_enqueue_media();
1830
+ }
1831
  wp_enqueue_script( 'aioseop-module-script', AIOSEOP_PLUGIN_URL . 'js/modules/aioseop_module.js', array(), AIOSEOP_VERSION );
1832
  if ( ! empty( $this->script_data ) ) {
1833
  aioseop_localize_script_data();
1921
  }
1922
 
1923
  if ( $this->locations === null ) {
1924
+ array_unshift(
1925
+ $links, array(
1926
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1927
+ 'title' => $name,
1928
+ 'id' => $hookname,
1929
+ 'href' => $url,
1930
+ 'order' => $this->menu_order(),
1931
+ )
1932
+ );
1933
  } else {
1934
  foreach ( $this->locations as $k => $v ) {
1935
  if ( $v['type'] === 'settings' ) {
1936
  if ( $k === 'default' ) {
1937
+ array_unshift(
1938
+ $links, array(
1939
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1940
+ 'title' => $name,
1941
+ 'id' => $hookname,
1942
+ 'href' => $url,
1943
+ 'order' => $this->menu_order(),
1944
+ )
1945
+ );
1946
  } else {
1947
  if ( ! empty( $v['menu_name'] ) ) {
1948
  $name = $v['menu_name'];
1949
  } else {
1950
  $name = $v['name'];
1951
  }
1952
+ array_unshift(
1953
+ $links, array(
1954
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
1955
+ 'title' => $name,
1956
+ 'id' => $this->get_prefix( $k ) . $k,
1957
+ 'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ),
1958
+ 'order' => $this->menu_order(),
1959
+ )
1960
+ );
1961
  }
1962
  }
1963
  }
2003
  $name = $this->name;
2004
  }
2005
  if ( $this->locations === null ) {
2006
+ $hookname = add_submenu_page(
2007
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
2008
+ $this,
2009
+ 'display_settings_page',
2010
+ )
2011
+ );
2012
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2013
 
2014
  return true;
2021
  } else {
2022
  $name = $this->name;
2023
  }
2024
+ $hookname = add_submenu_page(
2025
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
2026
+ $this,
2027
+ 'display_settings_page',
2028
+ )
2029
+ );
2030
  } else {
2031
  if ( ! empty( $v['menu_name'] ) ) {
2032
  $name = $v['menu_name'];
2033
  } else {
2034
  $name = $v['name'];
2035
  }
2036
+ $hookname = add_submenu_page(
2037
+ $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $this->get_prefix( $k ) . $k, array(
2038
+ $this,
2039
+ "display_settings_page_$k",
2040
+ )
2041
+ );
2042
  }
2043
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
2044
  } elseif ( $v['type'] === 'metabox' ) {
2059
  $v['posttype'] = $posttype;
2060
 
2061
  if ( post_type_exists( $posttype ) ) {
2062
+ // Metabox priority/context on edit post screen.
2063
  $v['context'] = apply_filters( 'aioseop_post_metabox_context', 'normal' );
2064
  $v['priority'] = apply_filters( 'aioseop_post_metabox_priority', 'high' );
2065
  }
2095
  if ( ! empty( $v['help_link'] ) ) {
2096
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2097
  }
2098
+ add_meta_box(
2099
+ $v['prefix'] . $k, $title, array(
2100
+ $this,
2101
+ 'display_metabox',
2102
+ ), $posttype, $v['context'], $v['priority'], $v
2103
+ );
2104
  }
2105
  }
2106
  }
2149
  * @return string
2150
  */
2151
  function do_multi_input( $args ) {
2152
+ // @codingStandardsIgnoreStart
2153
  extract( $args );
2154
+ // @codingStandardsIgnoreEnd
2155
  $buf1 = '';
2156
  $type = $options['type'];
2157
 
2177
  if ( isset( $options['initial_options'] ) && is_array( $options['initial_options'] ) ) {
2178
  foreach ( $options['initial_options'] as $l => $option ) {
2179
  $option_check = strip_tags( is_array( $option ) ? implode( ' ', $option ) : $option );
2180
+ if ( empty( $l ) && empty( $option_check ) ) {
2181
  continue;
2182
+ }
2183
  $is_group = is_array( $option );
2184
  if ( ! $is_group ) {
2185
  $option = array( $l => $option );
2194
  } else {
2195
  $cmp = ! strcmp( $v, '' );
2196
  }
2197
+ // $cmp = !strcmp( (string)$v, (string)$value );
2198
  } else {
2199
  $cmp = ( $value == $v );
2200
  }
2228
  */
2229
  function get_option_html( $args ) {
2230
  static $n = 0;
2231
+ // @codingStandardsIgnoreStart
2232
  extract( $args );
2233
+ // @codingStandardsIgnoreEnd
2234
+
2235
  if ( $options['type'] == 'custom' ) {
2236
  return apply_filters( "{$prefix}output_option", '', $args );
2237
  }
2238
+ if ( in_array(
2239
+ $options['type'], array(
2240
+ 'multiselect',
2241
+ 'select',
2242
+ 'multicheckbox',
2243
+ 'radio',
2244
+ 'checkbox',
2245
+ 'textarea',
2246
+ 'text',
2247
+ 'submit',
2248
+ 'hidden',
2249
+ 'date',
2250
+ )
2251
+ ) && is_string( $value )
2252
  ) {
2253
  $value = esc_attr( $value );
2254
  }
2270
  $attr .= ' MULTIPLE';
2271
  $args['attr'] = $attr;
2272
  $args['name'] = $name = "{$name}[]";
2273
+ // fall through.
2274
  case 'select':
2275
  $buf .= $this->do_multi_input( $args );
2276
  break;
2277
  case 'multicheckbox':
2278
  $args['name'] = $name = "{$name}[]";
2279
  $args['options']['type'] = $options['type'] = 'checkbox';
2280
+ // fall through.
2281
  case 'radio':
2282
  $buf .= $this->do_multi_input( $args );
2283
  break;
2292
  break;
2293
  case 'image':
2294
  $buf .= '<input class="aioseop_upload_image_checker" type="hidden" name="' . $name . '_checker" value="0">' .
2295
+ "<input class='aioseop_upload_image_button button-primary' type='button' value='";
2296
  $buf .= __( 'Upload Image', 'all-in-one-seo-pack' );
2297
  $buf .= "' style='float:left;' />" .
2298
+ "<input class='aioseop_upload_image_label' name='$name' type='text' $attr value='$value' size=57 style='float:left;clear:left;'>\n";
2299
  break;
2300
  case 'html':
2301
  $buf .= $value;
2302
  break;
2303
  case 'esc_html':
2304
+ $buf .= '<pre>' . esc_html( $value ) . "</pre>\n";
2305
  break;
2306
  case 'date':
2307
  // firefox and IE < 11 do not have support for HTML5 date, so we will fall back to the datepicker.
2316
  $size = $options['size'];
2317
  } elseif ( isset( $options['rows'] ) && isset( $options['cols'] ) ) {
2318
  $size = $options['rows'] * $options['cols'];
2319
+ }
2320
  if ( 'Description' === $options['name'] && isset( $options['name'] ) ) {
2321
  $size = ( $size - 90 ) . '-' . $size;
2322
  }
2323
  if ( isset( $options['count_desc'] ) ) {
2324
  $count_desc = $options['count_desc'];
2325
  } else {
2326
+ $count_desc = __( ' characters. Most search engines use a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
2327
  }
2328
  $buf .= "<br /><input readonly type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
2329
+ . sprintf( $count_desc, $size, trim( $this->strtolower( $options['name'] ), ':' ) );
2330
  if ( ! empty( $onload ) ) {
2331
  $buf .= "<script>jQuery( document ).ready(function() { {$onload} });</script>";
2332
  }
2515
  }
2516
  switch ( $type ) {
2517
  case 'multiselect':
2518
+ // fall through.
2519
  case 'multicheckbox':
2520
  $this->options[ $k ] = urlencode_deep( $this->options[ $k ] );
2521
  break;
2528
  break;
2529
  case 'text':
2530
  $this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
2531
+ // fall through.
2532
  case 'checkbox':
2533
+ // fall through.
2534
  case 'radio':
2535
+ // fall through.
2536
  case 'select':
2537
+ // fall through.
2538
  default:
2539
  if ( ! is_array( $this->options[ $k ] ) ) {
2540
  $this->options[ $k ] = esc_attr( $this->options[ $k ] );
2581
  function handle_settings_updates( $location = null ) {
2582
  $message = '';
2583
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
2584
+ ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) || ! empty( $_POST['Submit'] ) ) )
2585
  ) {
2586
  $nonce = $_POST['nonce-aioseop'];
2587
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
2588
+ die( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
2589
  }
2590
  if ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
2591
  $message = __( 'Options Reset.', 'all-in-one-seo-pack' );
2643
  echo $errors;
2644
  ?>
2645
  <div id="aioseop_settings_header">
2646
+ <?php
2647
+ if ( ! empty( $message ) && empty( $errors ) ) {
2648
  echo "<div id=\"message\" class=\"updated fade\"><p>$message</p></div>";
2649
+ }
2650
+ ?>
2651
  <div id="icon-aioseop" class="icon32"><br></div>
2652
  <h2><?php echo $name; ?></h2>
2653
  <div id="dropmessage" class="updated" style="display:none;"></div>
2690
  if ( isset( $s['class'] ) ) {
2691
  $class = " class='{$s['class']}' ";
2692
  }
2693
+ echo $this->get_option_html(
2694
+ array(
2695
+ 'name' => $k,
2696
+ 'options' => $s,
2697
+ 'attr' => $class,
2698
+ 'value' => $s['value'],
2699
+ )
2700
+ );
2701
  }
2702
  ?>
2703
  </div>
2704
  <div class="aioseop_options_wrapper aioseop_settings_left">
2705
+ <?php
2706
+ $opts = $this->get_class_option();
2707
  if ( $opts !== false ) {
2708
  $this->options = $opts;
2709
  }
2714
  if ( ! empty( $lopts['help_link'] ) ) {
2715
  $title .= "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $lopts['help_link'] . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2716
  }
2717
+ add_meta_box(
2718
+ $this->get_prefix( $location ) . $l . '_metabox', $title, array(
2719
+ $this,
2720
+ 'display_options',
2721
+ ),
2722
+ "{$this->prefix}settings", 'advanced', 'default', $lopts
2723
+ );
2724
  }
2725
  }
2726
  } else {
2727
+ add_meta_box(
2728
+ $this->get_prefix( $location ) . 'metabox', $name, array(
2729
+ $this,
2730
+ 'display_options',
2731
+ ), "{$this->prefix}settings", 'advanced'
2732
+ );
2733
  }
2734
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
2735
+ ?>
2736
+ <p class="submit" style="clear:both;">
2737
+ <?php
2738
  foreach ( array( 'action', 'nonce-aioseop', 'page_options' ) as $submit_field ) {
2739
  if ( isset( $submit_field ) ) {
2740
  unset( $submit_field );
2745
  if ( isset( $s['class'] ) ) {
2746
  $class = " class='{$s['class']}' ";
2747
  }
2748
+ echo $this->get_option_html(
2749
+ array(
2750
+ 'name' => $k,
2751
+ 'options' => $s,
2752
+ 'attr' => $class,
2753
+ 'value' => $s['value'],
2754
+ )
2755
+ );
2756
  }
2757
+ ?>
2758
+ </p>
2759
  </div>
2760
  </form>
2761
+ <?php
2762
+ do_action( $this->prefix . 'settings_footer', $location );
2763
+ do_action( 'aioseop_global_settings_footer', $location );
2764
+ ?>
2765
+ </div>
2766
+ <?php
2767
  }
2768
 
2769
  /**
2946
  $get_opts = AIO_ProGeneral::getprotax( $get_opts );
2947
  $get_opts = get_term_meta( $term_id, '_' . $prefix . $location, true );
2948
  }
 
2949
  } elseif ( isset( $post ) ) {
2950
  $get_opts = get_post_meta( $post->ID, '_' . $prefix . $location, true );
2951
  }
2952
  }
2953
 
2954
  if ( is_home() && ! is_front_page() ) {
2955
+ // If we're on the non-front page blog page, WP doesn't really know its post meta data so we need to get that manually for social meta.
2956
  $get_opts = get_post_meta( get_option( 'page_for_posts' ), '_' . $prefix . $location, true );
2957
  }
2958
 
admin/aioseop_module_manager.php CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
37
  $reset_all = ( isset( $_POST['Submit_All_Default'] ) && '' !== $_POST['Submit_All_Default'] );
38
  $reset = ( ( isset( $_POST['Submit_Default'] ) && '' !== $_POST['Submit_Default'] ) || $reset_all );
39
  $update = ( isset( $_POST['action'] ) && $_POST['action']
40
- && ( ( isset( $_POST['Submit'] ) && '' !== $_POST['Submit'] ) || $reset )
41
  );
42
  if ( $update ) {
43
  if ( $reset ) {
@@ -110,7 +110,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
110
  // The name of the class - All_in_One_SEO_Pack_$Module.
111
  // The global $aioseop_$module.
112
  // $this->modules[$module].
113
-
114
  $mod_path = apply_filters( "aioseop_include_$mod", AIOSEOP_PLUGIN_DIR . "modules/aioseop_$mod.php" );
115
  if ( ! empty( $mod_path ) ) {
116
  require_once( $mod_path );
@@ -122,16 +121,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
122
  $GLOBALS[ $ref ] = $module_class;
123
  $this->modules[ $mod ] = $module_class;
124
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
125
- add_action( 'admin_bar_menu', array(
126
- $module_class,
127
- 'add_admin_bar_submenu',
128
- ), 1001 + $module_class->menu_order() );
 
 
129
  }
130
  if ( is_admin() ) {
131
- add_action( 'aioseop_modules_add_menus', array(
132
- $module_class,
133
- 'add_menu',
134
- ), $module_class->menu_order() );
 
 
135
  add_action( 'aiosoep_options_reset', array( $module_class, 'reset_options' ) );
136
  add_filter( 'aioseop_export_settings', array( $module_class, 'settings_export' ) );
137
  }
@@ -158,9 +161,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
158
  return false;
159
  }
160
  if ( ( 'file_editor' === $mod || 'robots' === $mod )
161
- && ( ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
162
- || ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
163
- || ! is_super_admin() )
164
  ) {
165
  return false;
166
  }
@@ -173,8 +176,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
173
  }
174
  $fm_page = $this->module_settings_update && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) && $is_module_page;
175
  if ( $fm_page && ! $this->settings_reset ) {
176
- if ( isset( $_POST["aiosp_feature_manager_enable_$mod"] ) ) {
177
- $mod_enable = $_POST["aiosp_feature_manager_enable_$mod"];
178
  } else {
179
  $mod_enable = false;
180
  }
@@ -192,8 +195,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
192
  $feature_options = $this->modules['feature_manager']->get_current_options();
193
  }
194
  }
195
- if ( isset( $feature_options["{$feature_prefix}enable_$mod"] ) ) {
196
- $mod_enable = $feature_options["{$feature_prefix}enable_$mod"];
197
  }
198
  }
199
  if ( $mod_enable ) {
37
  $reset_all = ( isset( $_POST['Submit_All_Default'] ) && '' !== $_POST['Submit_All_Default'] );
38
  $reset = ( ( isset( $_POST['Submit_Default'] ) && '' !== $_POST['Submit_Default'] ) || $reset_all );
39
  $update = ( isset( $_POST['action'] ) && $_POST['action']
40
+ && ( ( isset( $_POST['Submit'] ) && '' !== $_POST['Submit'] ) || $reset )
41
  );
42
  if ( $update ) {
43
  if ( $reset ) {
110
  // The name of the class - All_in_One_SEO_Pack_$Module.
111
  // The global $aioseop_$module.
112
  // $this->modules[$module].
 
113
  $mod_path = apply_filters( "aioseop_include_$mod", AIOSEOP_PLUGIN_DIR . "modules/aioseop_$mod.php" );
114
  if ( ! empty( $mod_path ) ) {
115
  require_once( $mod_path );
121
  $GLOBALS[ $ref ] = $module_class;
122
  $this->modules[ $mod ] = $module_class;
123
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
124
+ add_action(
125
+ 'admin_bar_menu', array(
126
+ $module_class,
127
+ 'add_admin_bar_submenu',
128
+ ), 1001 + $module_class->menu_order()
129
+ );
130
  }
131
  if ( is_admin() ) {
132
+ add_action(
133
+ 'aioseop_modules_add_menus', array(
134
+ $module_class,
135
+ 'add_menu',
136
+ ), $module_class->menu_order()
137
+ );
138
  add_action( 'aiosoep_options_reset', array( $module_class, 'reset_options' ) );
139
  add_filter( 'aioseop_export_settings', array( $module_class, 'settings_export' ) );
140
  }
161
  return false;
162
  }
163
  if ( ( 'file_editor' === $mod || 'robots' === $mod )
164
+ && ( ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
165
+ || ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
166
+ || ! is_super_admin() )
167
  ) {
168
  return false;
169
  }
176
  }
177
  $fm_page = $this->module_settings_update && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) && $is_module_page;
178
  if ( $fm_page && ! $this->settings_reset ) {
179
+ if ( isset( $_POST[ "aiosp_feature_manager_enable_$mod" ] ) ) {
180
+ $mod_enable = $_POST[ "aiosp_feature_manager_enable_$mod" ];
181
  } else {
182
  $mod_enable = false;
183
  }
195
  $feature_options = $this->modules['feature_manager']->get_current_options();
196
  }
197
  }
198
+ if ( isset( $feature_options[ "{$feature_prefix}enable_$mod" ] ) ) {
199
+ $mod_enable = $feature_options[ "{$feature_prefix}enable_$mod" ];
200
  }
201
  }
202
  if ( $mod_enable ) {
admin/display/credits-content.php CHANGED
@@ -37,9 +37,14 @@
37
 
38
  <h3 class="wp-people-group">&#x1f31f;<?php _e( 'Recent Rockstar Contributors', 'all-in-one-seo-pack' ); ?>&#x1f31f;</h3>
39
  <ul class="wp-people-group " id="wp-people-group-rockstars">
40
- <li><?php /* translators: '%1$s' and '%2$s' are used as placeholders and turn the text in between into a clickable link */
41
- printf( __('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'),
42
- '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">', '</a>'); ?>
 
 
 
 
 
43
  </li>
44
  <li class="wp-person" id="wp-person-dougalcampbell">
45
  <a class="web" target="_blank" href="https://profiles.wordpress.org/dougal/"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/81717a172b6918071fbea1a52483294b?s=60">
@@ -53,10 +58,10 @@
53
  <a class="web" target="_blank" href="https://profiles.wordpress.org/rozroz/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/5a4758faa5ba6fc1322bdfb0f6ebcf56c?s=60">
54
  Ashish Ravi</a>
55
  </li>
56
- <li class="wp-person" id="rozroz">
57
- <a class="web" target="_blank" href="https://profiles.wordpress.org/yummy-wp/"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/22232968?v=3&s=460">
58
- Stanislav Samoilenko</a>
59
- </li>
60
  </ul>
61
 
62
  <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>
37
 
38
  <h3 class="wp-people-group">&#x1f31f;<?php _e( 'Recent Rockstar Contributors', 'all-in-one-seo-pack' ); ?>&#x1f31f;</h3>
39
  <ul class="wp-people-group " id="wp-people-group-rockstars">
40
+ <li>
41
+ <?php
42
+ /* translators: '%1$s' and '%2$s' are used as placeholders and turn the text in between into a clickable link */
43
+ printf(
44
+ __( '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' ),
45
+ '<a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">', '</a>'
46
+ );
47
+ ?>
48
  </li>
49
  <li class="wp-person" id="wp-person-dougalcampbell">
50
  <a class="web" target="_blank" href="https://profiles.wordpress.org/dougal/"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/81717a172b6918071fbea1a52483294b?s=60">
58
  <a class="web" target="_blank" href="https://profiles.wordpress.org/rozroz/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/5a4758faa5ba6fc1322bdfb0f6ebcf56c?s=60">
59
  Ashish Ravi</a>
60
  </li>
61
+ <li class="wp-person" id="rozroz">
62
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/yummy-wp/"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/22232968?v=3&s=460">
63
+ Stanislav Samoilenko</a>
64
+ </li>
65
  </ul>
66
 
67
  <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>
admin/display/dashboard_widget.php CHANGED
@@ -7,13 +7,15 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
7
  *
8
  * @since 2.3.10
9
  */
 
10
  class aioseop_dashboard_widget {
 
11
 
12
  /**
13
  * Add the action to the constructor.
14
  */
15
  function __construct() {
16
- add_action( "wp_dashboard_setup", array( $this, 'aioseop_add_dashboard_widget' ) );
17
  }
18
 
19
  /**
@@ -22,10 +24,12 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
22
  function aioseop_add_dashboard_widget() {
23
 
24
  if ( current_user_can( 'install_plugins' ) && false !== $this->show_widget() ) {
25
- wp_add_dashboard_widget( "semperplugins-rss-feed", __( 'SEO News', 'all-in-one-seo-pack' ), array(
26
- $this,
27
- 'aioseop_display_rss_dashboard_widget',
28
- ) );
 
 
29
  }
30
 
31
  }
@@ -56,11 +60,11 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
56
  */
57
  function aioseop_display_rss_dashboard_widget() {
58
 
59
- include_once( ABSPATH . WPINC . "/feed.php" );
60
 
61
  if ( false === ( $rss_items = get_transient( 'aioseop_feed' ) ) ) {
62
 
63
- $rss = fetch_feed( "https://www.semperplugins.com/feed/" );
64
  if ( is_wp_error( $rss ) ) {
65
  echo '{Temporarily unable to load feed.}';
66
 
@@ -73,8 +77,8 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
73
  $cached[] = array(
74
  'url' => $item->get_permalink(),
75
  'title' => $item->get_title(),
76
- 'date' => $item->get_date( "M jS Y" ),
77
- 'content' => substr( strip_tags( $item->get_content() ), 0, 128 ) . "...",
78
  );
79
  }
80
  $rss_items = $cached;
@@ -88,7 +92,7 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
88
  <ul>
89
  <?php
90
  if ( false === $rss_items ) {
91
- echo "<li>No items</li>";
92
 
93
  return;
94
  }
@@ -101,7 +105,7 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
101
  </a>
102
  <span class="aioseop-rss-date"><?php echo $item['date']; ?></span>
103
  <div class="aioseop_news">
104
- <?php echo strip_tags( $item['content'] ) . "..."; ?>
105
  </div>
106
  </li>
107
  <?php
7
  *
8
  * @since 2.3.10
9
  */
10
+ // @codingStandardsIgnoreStart
11
  class aioseop_dashboard_widget {
12
+ // @codingStandardsIgnoreEnd
13
 
14
  /**
15
  * Add the action to the constructor.
16
  */
17
  function __construct() {
18
+ add_action( 'wp_dashboard_setup', array( $this, 'aioseop_add_dashboard_widget' ) );
19
  }
20
 
21
  /**
24
  function aioseop_add_dashboard_widget() {
25
 
26
  if ( current_user_can( 'install_plugins' ) && false !== $this->show_widget() ) {
27
+ wp_add_dashboard_widget(
28
+ 'semperplugins-rss-feed', __( 'SEO News', 'all-in-one-seo-pack' ), array(
29
+ $this,
30
+ 'aioseop_display_rss_dashboard_widget',
31
+ )
32
+ );
33
  }
34
 
35
  }
60
  */
61
  function aioseop_display_rss_dashboard_widget() {
62
 
63
+ include_once( ABSPATH . WPINC . '/feed.php' );
64
 
65
  if ( false === ( $rss_items = get_transient( 'aioseop_feed' ) ) ) {
66
 
67
+ $rss = fetch_feed( 'https://www.semperplugins.com/feed/' );
68
  if ( is_wp_error( $rss ) ) {
69
  echo '{Temporarily unable to load feed.}';
70
 
77
  $cached[] = array(
78
  'url' => $item->get_permalink(),
79
  'title' => $item->get_title(),
80
+ 'date' => $item->get_date( 'M jS Y' ),
81
+ 'content' => substr( strip_tags( $item->get_content() ), 0, 128 ) . '...',
82
  );
83
  }
84
  $rss_items = $cached;
92
  <ul>
93
  <?php
94
  if ( false === $rss_items ) {
95
+ echo '<li>No items</li>';
96
 
97
  return;
98
  }
105
  </a>
106
  <span class="aioseop-rss-date"><?php echo $item['date']; ?></span>
107
  <div class="aioseop_news">
108
+ <?php echo strip_tags( $item['content'] ) . '...'; ?>
109
  </div>
110
  </li>
111
  <?php
admin/display/general-metaboxes.php CHANGED
@@ -3,14 +3,15 @@
3
  /**
4
  * @package All-in-One-SEO-Pack
5
  */
 
6
  class aiosp_metaboxes {
 
7
 
8
  /**
9
  * aiosp_metaboxes constructor.
10
  */
11
  function __construct() {
12
- //construct
13
-
14
  }
15
 
16
  /**
@@ -30,7 +31,7 @@ class aiosp_metaboxes {
30
  $user_id = $current_user->ID;
31
  $ignore = get_user_meta( $user_id, 'aioseop_ignore_notice' );
32
  if ( ! empty( $ignore ) ) {
33
- $qa = Array();
34
  wp_parse_str( $_SERVER['QUERY_STRING'], $qa );
35
  $qa['aioseop_reset_notices'] = 1;
36
  $url = '?' . build_query( $qa );
@@ -40,16 +41,19 @@ class aiosp_metaboxes {
40
  ?>
41
  <p>
42
  <strong>
43
- <?php
44
- echo aiosp_common::get_upgrade_hyperlink( 'side', __( 'Pro Version', 'all-in-one-seo-pack' ), __( 'CLICK HERE', 'all-in-one-seo-pack' ), '_blank' );
45
- echo __( ' to upgrade to Pro Version and get:', 'all-in-one-seo-pack' ); ?></strong>
 
 
46
  </p>
47
  <?php } ?>
48
  </div>
49
  <?php
50
- case 'aioseop-donate':
51
- ?>
52
- <div>
 
53
 
54
  <?php if ( ! AIOSEOPPRO ) { ?>
55
  <div class="aioseop_metabox_text">
@@ -67,37 +71,41 @@ class aiosp_metaboxes {
67
  <a class="dashicons di-facebook" target="_blank" href="https://www.facebook.com/aioseopack" title="Follow me on Facebook"></a>
68
  </div>
69
 
70
- </div><?php
 
71
 
72
  $aiosp_trans = new AIOSEOP_Translations();
73
  // Eventually if nothing is returned we should just remove this section.
74
-
75
- if ( get_locale() != 'en_US' ) { ?>
76
  <div class="aioseop_translations"><strong>
77
  <?php
78
 
79
  if ( $aiosp_trans->percent_translated < 100 ) {
80
- if ( ! empty ( $aiosp_trans->native_name ) ) {
81
  $maybe_native_name = $aiosp_trans->native_name;
82
  } else {
83
  $maybe_native_name = $aiosp_trans->name;
84
  }
85
 
86
  /* translators: %1$s expands to the number of languages All in One SEO Pack has been translated into. $2%s to the percentage translated of the current language, $3%s to the language name, %4$s and %5$s to anchor tags with link to translation page at translate.wordpress.org */
87
- printf( __(
88
- 'All in One SEO Pack has been translated into %1$s languages, but currently the %3$s translation is only %2$s percent complete. %4$s Click here %5$s to help get it to 100 percent.', 'all-in-one-seo-pack' ),
 
 
89
  $aiosp_trans->translated_count,
90
  $aiosp_trans->percent_translated,
91
  $maybe_native_name,
92
  "<a href=\"$aiosp_trans->translation_url\" target=\"_BLANK\">",
93
- '</a>' );
 
94
  }
95
 
96
  ?>
97
  </strong></div>
98
  <?php } ?>
99
- </div>
100
- <?php
101
  break;
102
  case 'aioseop-list':
103
  ?>
@@ -111,9 +119,9 @@ class aiosp_metaboxes {
111
  <i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i>
112
  </p>
113
  <p><input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL"
114
- placeholder="<?php _e( 'Email Address', 'all-in-one-seo-pack' ); ?>">
115
  <input type="submit" value="<?php _e( 'Subscribe', 'all-in-one-seo-pack' ); ?>" name="subscribe" id="mc-embedded-subscribe"
116
- class="btn"></p>
117
  </form>
118
  </div>
119
  <?php
@@ -133,11 +141,15 @@ class aiosp_metaboxes {
133
  <p>
134
  <div class="aioseop_icon aioseop_cog_icon"></div>
135
  <a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
136
- href="<?php if ( AIOSEOPPRO ) {
137
- echo 'https://semperplugins.com/documentation/all-in-one-seo-pack-pro-changelog/';
138
- } else {
139
- echo 'https://semperfiwebdesign.com/blog/all-in-one-seo-pack/all-in-one-seo-pack-release-history/';
140
- } ?>"><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a></p>
 
 
 
 
141
  <p>
142
  <div class="aioseop_icon aioseop_youtube_icon"></div>
143
  <a target="_blank"
@@ -159,7 +171,7 @@ class aiosp_metaboxes {
159
 
160
  if ( class_exists( 'WooCommerce' ) ) {
161
  echo '<li>' . __( 'Advanced support for WooCommerce', 'all-in-one-seo-pack' ) . '</li>';
162
- }else{
163
  echo '<li>' . __( 'Advanced support for e-commerce', 'all-in-one-seo-pack' ) . '</li>';
164
  }
165
 
3
  /**
4
  * @package All-in-One-SEO-Pack
5
  */
6
+ // @codingStandardsIgnoreStart
7
  class aiosp_metaboxes {
8
+ // @codingStandardsIgnoreEnd
9
 
10
  /**
11
  * aiosp_metaboxes constructor.
12
  */
13
  function __construct() {
14
+ // construct
 
15
  }
16
 
17
  /**
31
  $user_id = $current_user->ID;
32
  $ignore = get_user_meta( $user_id, 'aioseop_ignore_notice' );
33
  if ( ! empty( $ignore ) ) {
34
+ $qa = array();
35
  wp_parse_str( $_SERVER['QUERY_STRING'], $qa );
36
  $qa['aioseop_reset_notices'] = 1;
37
  $url = '?' . build_query( $qa );
41
  ?>
42
  <p>
43
  <strong>
44
+ <?php
45
+ echo aiosp_common::get_upgrade_hyperlink( 'side', __( 'Pro Version', 'all-in-one-seo-pack' ), __( 'CLICK HERE', 'all-in-one-seo-pack' ), '_blank' );
46
+ echo __( ' to upgrade to Pro Version and get:', 'all-in-one-seo-pack' );
47
+ ?>
48
+ </strong>
49
  </p>
50
  <?php } ?>
51
  </div>
52
  <?php
53
+ // Is this fall through deliberate?
54
+ case 'aioseop-donate':
55
+ ?>
56
+ <div>
57
 
58
  <?php if ( ! AIOSEOPPRO ) { ?>
59
  <div class="aioseop_metabox_text">
71
  <a class="dashicons di-facebook" target="_blank" href="https://www.facebook.com/aioseopack" title="Follow me on Facebook"></a>
72
  </div>
73
 
74
+ </div>
75
+ <?php
76
 
77
  $aiosp_trans = new AIOSEOP_Translations();
78
  // Eventually if nothing is returned we should just remove this section.
79
+ if ( get_locale() != 'en_US' ) {
80
+ ?>
81
  <div class="aioseop_translations"><strong>
82
  <?php
83
 
84
  if ( $aiosp_trans->percent_translated < 100 ) {
85
+ if ( ! empty( $aiosp_trans->native_name ) ) {
86
  $maybe_native_name = $aiosp_trans->native_name;
87
  } else {
88
  $maybe_native_name = $aiosp_trans->name;
89
  }
90
 
91
  /* translators: %1$s expands to the number of languages All in One SEO Pack has been translated into. $2%s to the percentage translated of the current language, $3%s to the language name, %4$s and %5$s to anchor tags with link to translation page at translate.wordpress.org */
92
+ printf(
93
+ __(
94
+ 'All in One SEO Pack has been translated into %1$s languages, but currently the %3$s translation is only %2$s percent complete. %4$s Click here %5$s to help get it to 100 percent.', 'all-in-one-seo-pack'
95
+ ),
96
  $aiosp_trans->translated_count,
97
  $aiosp_trans->percent_translated,
98
  $maybe_native_name,
99
  "<a href=\"$aiosp_trans->translation_url\" target=\"_BLANK\">",
100
+ '</a>'
101
+ );
102
  }
103
 
104
  ?>
105
  </strong></div>
106
  <?php } ?>
107
+ </div>
108
+ <?php
109
  break;
110
  case 'aioseop-list':
111
  ?>
119
  <i><?php _e( 'Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value).', 'all-in-one-seo-pack' ); ?></i>
120
  </p>
121
  <p><input type="text" value="" name="EMAIL" class="required email" id="mce-EMAIL"
122
+ placeholder="<?php _e( 'Email Address', 'all-in-one-seo-pack' ); ?>">
123
  <input type="submit" value="<?php _e( 'Subscribe', 'all-in-one-seo-pack' ); ?>" name="subscribe" id="mc-embedded-subscribe"
124
+ class="btn"></p>
125
  </form>
126
  </div>
127
  <?php
141
  <p>
142
  <div class="aioseop_icon aioseop_cog_icon"></div>
143
  <a target="_blank" title="<?php _e( 'All in One SEO Pro Plugin Changelog', 'all-in-one-seo-pack' ); ?>"
144
+ href="
145
+ <?php
146
+ if ( AIOSEOPPRO ) {
147
+ echo 'https://semperplugins.com/documentation/all-in-one-seo-pack-pro-changelog/';
148
+ } else {
149
+ echo 'https://semperfiwebdesign.com/blog/all-in-one-seo-pack/all-in-one-seo-pack-release-history/';
150
+ }
151
+ ?>
152
+ "><?php _e( 'View the Changelog', 'all-in-one-seo-pack' ); ?></a></p>
153
  <p>
154
  <div class="aioseop_icon aioseop_youtube_icon"></div>
155
  <a target="_blank"
171
 
172
  if ( class_exists( 'WooCommerce' ) ) {
173
  echo '<li>' . __( 'Advanced support for WooCommerce', 'all-in-one-seo-pack' ) . '</li>';
174
+ } else {
175
  echo '<li>' . __( 'Advanced support for e-commerce', 'all-in-one-seo-pack' ) . '</li>';
176
  }
177
 
admin/display/menu.php CHANGED
@@ -11,9 +11,9 @@ class AIOSEOPAdminMenus {
11
  * Constructor to add the actions.
12
  */
13
  function __construct() {
14
- if( current_user_can( 'manage_options' ) || current_user_can( 'aiosp_manage_seo') ){
15
  add_action( 'admin_menu', array( $this, 'add_pro_submenu' ), 11 );
16
- }else{
17
  return;
18
  }
19
  }
@@ -26,7 +26,7 @@ class AIOSEOPAdminMenus {
26
  function add_pro_submenu() {
27
  global $submenu;
28
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_menu';
29
- $upgrade_text = __('Upgrade to Pro', 'all-in-one-seo-pack');
30
  $submenu['all-in-one-seo-pack/aioseop_class.php'][] = array(
31
  "<span class='upgrade_menu_link'>$upgrade_text</span>",
32
  'manage_options',
11
  * Constructor to add the actions.
12
  */
13
  function __construct() {
14
+ if ( current_user_can( 'manage_options' ) || current_user_can( 'aiosp_manage_seo' ) ) {
15
  add_action( 'admin_menu', array( $this, 'add_pro_submenu' ), 11 );
16
+ } else {
17
  return;
18
  }
19
  }
26
  function add_pro_submenu() {
27
  global $submenu;
28
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_menu';
29
+ $upgrade_text = __( 'Upgrade to Pro', 'all-in-one-seo-pack' );
30
  $submenu['all-in-one-seo-pack/aioseop_class.php'][] = array(
31
  "<span class='upgrade_menu_link'>$upgrade_text</span>",
32
  'manage_options',
admin/display/welcome-content.php CHANGED
@@ -21,26 +21,26 @@
21
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
22
  <ul>
23
  <li><a href="https://semperplugins.com/documentation/quick-start-guide/"
24
- target="_blank"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a>
25
  </li>
26
  <li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
27
- target="_blank"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
28
  </li>
29
  <li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
30
- target="_blank"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
31
  </li>
32
  <li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
33
- target="_blank"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
34
  </li>
35
  <li>
36
  <a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
37
  target="_blank"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
38
  </li>
39
  <li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
40
- target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
41
  </li>
42
  <li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/"
43
- target="_blank"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
44
  </li>
45
  </ul>
46
  </div>
@@ -49,13 +49,13 @@
49
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
50
  <ul>
51
  <li><a href="https://semperplugins.com/documentation/"
52
- target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
53
  </li>
54
  <li><a href="https://semperplugins.com/videos/"
55
- target="_blank"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
56
  </li>
57
  <li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
58
- target="_blank"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
59
  </li>
60
  </ul>
61
  </div>
21
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
22
  <ul>
23
  <li><a href="https://semperplugins.com/documentation/quick-start-guide/"
24
+ target="_blank"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a>
25
  </li>
26
  <li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
27
+ target="_blank"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
28
  </li>
29
  <li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
30
+ target="_blank"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
31
  </li>
32
  <li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
33
+ target="_blank"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
34
  </li>
35
  <li>
36
  <a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
37
  target="_blank"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
38
  </li>
39
  <li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
40
+ target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
41
  </li>
42
  <li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/"
43
+ target="_blank"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
44
  </li>
45
  </ul>
46
  </div>
49
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
50
  <ul>
51
  <li><a href="https://semperplugins.com/documentation/"
52
+ target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
53
  </li>
54
  <li><a href="https://semperplugins.com/videos/"
55
+ target="_blank"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
56
  </li>
57
  <li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
58
+ target="_blank"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
59
  </li>
60
  </ul>
61
  </div>
admin/display/welcome.php CHANGED
@@ -5,7 +5,9 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
5
  /**
6
  * Class aioseop_welcome
7
  */
 
8
  class aioseop_welcome {
 
9
  /**
10
  * Constructor to add the actions.
11
  */
@@ -37,8 +39,8 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
37
 
38
  /**
39
  * Removes unneeded pages.
40
- *
41
- * @since 2.3.12 Called via admin_menu action instead of admin_head.
42
  */
43
  function remove_pages() {
44
  remove_submenu_page( 'index.php', 'aioseop-about' );
@@ -78,10 +80,10 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
78
  if ( ! current_user_can( 'manage_options' ) ) {
79
  return;
80
  }
81
-
82
  wp_cache_flush();
83
  aiosp_common::clear_wpe_cache();
84
-
85
  delete_transient( '_aioseop_activation_redirect' );
86
 
87
  $seen = 0;
@@ -92,7 +94,7 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
92
  if ( AIOSEOPPRO ) {
93
  return;
94
  }
95
-
96
  if ( ( AIOSEOP_VERSION === $seen ) || ( true !== $activate ) ) {
97
  return;
98
  }
5
  /**
6
  * Class aioseop_welcome
7
  */
8
+ // @codingStandardsIgnoreStart
9
  class aioseop_welcome {
10
+ // @codingStandardsIgnoreEnd
11
  /**
12
  * Constructor to add the actions.
13
  */
39
 
40
  /**
41
  * Removes unneeded pages.
42
+ *
43
+ * @since 2.3.12 Called via admin_menu action instead of admin_head.
44
  */
45
  function remove_pages() {
46
  remove_submenu_page( 'index.php', 'aioseop-about' );
80
  if ( ! current_user_can( 'manage_options' ) ) {
81
  return;
82
  }
83
+
84
  wp_cache_flush();
85
  aiosp_common::clear_wpe_cache();
86
+
87
  delete_transient( '_aioseop_activation_redirect' );
88
 
89
  $seen = 0;
94
  if ( AIOSEOPPRO ) {
95
  return;
96
  }
97
+
98
  if ( ( AIOSEOP_VERSION === $seen ) || ( true !== $activate ) ) {
99
  return;
100
  }
admin/meta_import.php CHANGED
@@ -25,11 +25,11 @@ if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
25
 
26
  if ( empty( $aioseop_yst_detected_notice_dismissed ) ) {
27
 
28
- 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 %simport its settings%s into All in One SEO Pack?', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>' ), '</p></div>';
29
 
30
  }
31
 
32
- echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %simport its settings%s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $yoasturl ) ), '</a>' ), '</p></div>';
33
 
34
  }
35
 
@@ -38,7 +38,7 @@ if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
38
  }
39
  }
40
  } else {
41
- if(is_admin()) {
42
  add_action( 'init', 'mi_aioseop_yst_detected_notice_dismissed' );
43
  }
44
  }
@@ -103,10 +103,9 @@ function aiosp_seometa_action() {
103
  return;
104
  }
105
 
106
- printf( __( '<p>Analyzing records in a %s to %s conversion&hellip;', 'all-in-one-seo-pack' ), esc_html( $_POST['platform_old'] ), 'All in One SEO Pack' );
107
  printf( '<p><b>%d</b> Compatible Records were identified</p>', $response->update );
108
- // printf( '<p>%d Compatible Records will be ignored</p>', $response->ignore );
109
-
110
  printf( '<p><b>%s</b></p>', __( 'Compatible data:', 'all-in-one-seo-pack' ) );
111
  echo '<ol>';
112
  foreach ( (array) $response->elements as $element ) {
@@ -160,7 +159,7 @@ function aiosp_seometa_admin() {
160
  </p>
161
 
162
  <p><span
163
- class="row-title"><?php printf( esc_html__( 'Before performing an import, we strongly recommend that you make a backup of your site. We use and recommend %s BackupBuddy %s for backups.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperfiwebdesign.com/backupbuddy/' ) ), '</a>' ); ?></span>
164
  </p>
165
 
166
 
@@ -193,8 +192,8 @@ function aiosp_seometa_admin() {
193
  ?>
194
 
195
  <input type="submit" class="button-highlighted" name="analyze"
196
- value="<?php _e( 'Analyze', 'genesis' ); ?>"/>
197
- <input type="submit" class="button-primary" value="<?php _e( 'Convert', 'genesis' ) ?>"/>
198
 
199
  </form>
200
 
@@ -232,10 +231,10 @@ function aiosp_seometa_meta_key_convert( $old = '', $new = '', $delete_old = fal
232
  return $output;
233
  }
234
 
235
- // See which records we need to ignore, if any.
236
  $exclude = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $new ) );
237
 
238
- // If no records to ignore, we'll do a basic UPDATE and DELETE.
239
  if ( ! $exclude ) {
240
 
241
  $output->updated = $wpdb->update( $wpdb->postmeta, array( 'meta_key' => $new ), array( 'meta_key' => $old ) );
@@ -250,8 +249,10 @@ function aiosp_seometa_meta_key_convert( $old = '', $new = '', $delete_old = fal
250
  }
251
  $not_in = implode( ', ', (array) $not_in );
252
 
 
253
  $output->updated = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_key = %s WHERE meta_key = %s AND post_id NOT IN ($not_in)", $new, $old ) );
254
  $output->deleted = $delete_old ? $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $old ) ) : 0;
 
255
  $output->ignored = count( $exclude );
256
 
257
  }
@@ -361,8 +362,7 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
361
 
362
  // See which records to ignore, if any.
363
  $ignore = 0;
364
- // $ignore = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
365
-
366
  // See which records to update, if any.
367
  $update = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
368
 
@@ -372,7 +372,6 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
372
 
373
  // Calculate update/ignore by comparison.
374
  // $update = ( (int)$update > (int)$ignore ) ? ( (int)$update - (int)$ignore ) : 0;
375
-
376
  // update output numbers
377
  $output->update += (int) $update;
378
  $output->ignore += (int) $ignore;
@@ -388,9 +387,8 @@ function aiosp_seometa_post_meta_analyze( $old_platform = '', $new_platform = 'A
388
  }
389
 
390
 
391
- // define('aiosp_seometa_PLUGIN_DIR', dirname(__FILE__));
392
-
393
- //add_action( 'plugins_loaded', 'aiosp_seometa_import' );
394
  /**
395
  * Initialize the SEO Data Transporter plugin
396
  */
@@ -451,6 +449,7 @@ function aiosp_seometa_import() {
451
  'Custom Scripts' => 'thesis_javascript_scripts',
452
  'Redirect URI' => 'thesis_redirect',
453
  ),
 
454
  /*
455
  'Thesis 2.x' => array(
456
  'Custom Doctitle' => '_thesis_title_tag',
@@ -461,6 +460,7 @@ function aiosp_seometa_import() {
461
  'Redirect URI' => '_thesis_redirect',
462
  ),
463
  */
 
464
  'WooFramework' => array(
465
  'Custom Doctitle' => 'seo_title',
466
  'META Description' => 'seo_description',
@@ -550,9 +550,8 @@ function aiosp_seometa_import() {
550
  /**
551
  * Include the other elements of the plugin.
552
  */
553
- // require_once( aiosp_seometa_PLUGIN_DIR . '/admin.php' );
554
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
555
-
556
  /**
557
  * Init hook.
558
  *
@@ -572,45 +571,8 @@ function aiosp_seometa_import() {
572
  register_activation_hook( __FILE__, 'aiosp_seometa_activation_hook' );
573
  function aiosp_seometa_activation_hook() {
574
 
575
- // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
576
-
577
  aiosp_seometa_meta_key_convert( '_yoast_seo_title', 'yoast_wpseo_title', true );
578
  aiosp_seometa_meta_key_convert( '_yoast_seo_metadesc', 'yoast_wpseo_metadesc', true );
579
 
580
  }
581
-
582
- /**
583
- * Manual conversion test
584
- */
585
- /*
586
- $aiosp_seometa_convert = aiosp_seometa_post_meta_convert( 'All in One SEO Pack', 'Genesis', false );
587
- printf( '%d records were updated', $aiosp_seometa_convert->updated );
588
- /**/
589
-
590
- /**
591
- * Manual analysis test
592
- */
593
- /*
594
- $aiosp_seometa_analyze = aiosp_seometa_post_meta_analyze( 'All in One SEO Pack', 'Genesis' );
595
- printf( '<p><b>%d</b> Compatible Records were identified</p>', $aiosp_seometa_analyze->update );
596
- /**/
597
-
598
- /**
599
- * Delete all SEO data, from every platform
600
- */
601
- /*
602
- foreach ( $_aiosp_seometa_platforms as $platform => $data ) {
603
-
604
- foreach ( $data as $field ) {
605
- $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $field ) );
606
- printf( '%d %s records deleted<br />', $deleted, $field );
607
- }
608
-
609
- }
610
- /**/
611
-
612
- /**
613
- * Query all SEO data to find the number of records to change
614
- */
615
-
616
-
25
 
26
  if ( empty( $aioseop_yst_detected_notice_dismissed ) ) {
27
 
28
+ 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 All in One SEO Pack?', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>' ), '</p></div>';
29
 
30
  }
31
 
32
+ 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>';
33
 
34
  }
35
 
38
  }
39
  }
40
  } else {
41
+ if ( is_admin() ) {
42
  add_action( 'init', 'mi_aioseop_yst_detected_notice_dismissed' );
43
  }
44
  }
103
  return;
104
  }
105
 
106
+ printf( __( '<p>Analyzing records in a %1$s to %2$s conversion&hellip;', 'all-in-one-seo-pack' ), esc_html( $_POST['platform_old'] ), 'All in One SEO Pack' );
107
  printf( '<p><b>%d</b> Compatible Records were identified</p>', $response->update );
108
+ // printf( '<p>%d Compatible Records will be ignored</p>', $response->ignore );
 
109
  printf( '<p><b>%s</b></p>', __( 'Compatible data:', 'all-in-one-seo-pack' ) );
110
  echo '<ol>';
111
  foreach ( (array) $response->elements as $element ) {
159
  </p>
160
 
161
  <p><span
162
+ class="row-title"><?php printf( esc_html__( 'Before performing an import, we strongly recommend that you make a backup of your site. We use and recommend %1$s BackupBuddy %2$s for backups.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperfiwebdesign.com/backupbuddy/' ) ), '</a>' ); ?></span>
163
  </p>
164
 
165
 
192
  ?>
193
 
194
  <input type="submit" class="button-highlighted" name="analyze"
195
+ value="<?php _e( 'Analyze', 'genesis' ); ?>"/>
196
+ <input type="submit" class="button-primary" value="<?php _e( 'Convert', 'genesis' ); ?>"/>
197
 
198
  </form>
199
 
231
  return $output;
232
  }
233
 
234
+ // See which records we need to ignore, if any.
235
  $exclude = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $new ) );
236
 
237
+ // If no records to ignore, we'll do a basic UPDATE and DELETE.
238
  if ( ! $exclude ) {
239
 
240
  $output->updated = $wpdb->update( $wpdb->postmeta, array( 'meta_key' => $new ), array( 'meta_key' => $old ) );
249
  }
250
  $not_in = implode( ', ', (array) $not_in );
251
 
252
+ // @codingStandardsIgnoreStart
253
  $output->updated = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->postmeta SET meta_key = %s WHERE meta_key = %s AND post_id NOT IN ($not_in)", $new, $old ) );
254
  $output->deleted = $delete_old ? $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s", $old ) ) : 0;
255
+ // @codingStandardsIgnoreEnd
256
  $output->ignored = count( $exclude );
257
 
258
  }
362
 
363
  // See which records to ignore, if any.
364
  $ignore = 0;
365
+ // $ignore = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
 
366
  // See which records to update, if any.
367
  $update = $wpdb->get_results( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_key ) );
368
 
372
 
373
  // Calculate update/ignore by comparison.
374
  // $update = ( (int)$update > (int)$ignore ) ? ( (int)$update - (int)$ignore ) : 0;
 
375
  // update output numbers
376
  $output->update += (int) $update;
377
  $output->ignore += (int) $ignore;
387
  }
388
 
389
 
390
+ // define('aiosp_seometa_PLUGIN_DIR', dirname(__FILE__));
391
+ // add_action( 'plugins_loaded', 'aiosp_seometa_import' );
 
392
  /**
393
  * Initialize the SEO Data Transporter plugin
394
  */
449
  'Custom Scripts' => 'thesis_javascript_scripts',
450
  'Redirect URI' => 'thesis_redirect',
451
  ),
452
+
453
  /*
454
  'Thesis 2.x' => array(
455
  'Custom Doctitle' => '_thesis_title_tag',
460
  'Redirect URI' => '_thesis_redirect',
461
  ),
462
  */
463
+
464
  'WooFramework' => array(
465
  'Custom Doctitle' => 'seo_title',
466
  'META Description' => 'seo_description',
550
  /**
551
  * Include the other elements of the plugin.
552
  */
553
+ // require_once( aiosp_seometa_PLUGIN_DIR . '/admin.php' );
554
  // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
 
555
  /**
556
  * Init hook.
557
  *
571
  register_activation_hook( __FILE__, 'aiosp_seometa_activation_hook' );
572
  function aiosp_seometa_activation_hook() {
573
 
574
+ // require_once( aiosp_seometa_PLUGIN_DIR . '/functions.php' );
 
575
  aiosp_seometa_meta_key_convert( '_yoast_seo_title', 'yoast_wpseo_title', true );
576
  aiosp_seometa_meta_key_convert( '_yoast_seo_metadesc', 'yoast_wpseo_metadesc', true );
577
 
578
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aioseop_class.php CHANGED
@@ -80,7 +80,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
80
 
81
  $this->help_text = array(
82
  'license_key' => __( 'This will be the license key received when the product was purchased. This is used for automatic upgrades.', 'all-in-one-seo-pack' ),
83
- 'can' => __( "This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by Google", 'all-in-one-seo-pack' ),
84
  'no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
85
  'customize_canonical_links' => __( 'Checking this option will allow you to customize Canonical URLs for specific posts.', 'all-in-one-seo-pack' ),
86
  'use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
@@ -103,7 +103,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
103
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
104
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
105
  __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
106
- __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li></ul>',
107
  'page_title_format' =>
108
  __( 'This controls the format of the title tag for Pages.<br />The following macros are supported:', 'all-in-one-seo-pack' )
109
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -113,25 +113,25 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
113
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
114
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
115
  __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
116
- __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li><li>'.
117
- __( "%post_date% - The date the page was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
118
- __( "%post_year% - The year the page was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
119
- __( "%post_month% - The month the page was published (localized)", 'all-in-one-seo-pack' ) . '</li>' ,
120
  'post_title_format' =>
121
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
122
  . '<li><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
123
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
125
  __( '%category_title% - The (main) category of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
126
- __( '%category% - Alias for %category_title%', 'all-in-one-seo-pack' ) . '</li><li>' .
127
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
128
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
129
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
130
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
131
- __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
132
- __( "%post_date% - The date the post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
133
- __( "%post_year% - The year the post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
134
- __( "%post_month% - The month the post was published (localized)", 'all-in-one-seo-pack' ) . '</li>' ,
135
  'category_title_format' =>
136
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
137
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -167,24 +167,24 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
167
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
168
  __( '%search% - What was searched for', 'all-in-one-seo-pack' ) . '</li></ul>',
169
  'description_format' => __( 'This controls the format of Meta Descriptions.The following macros are supported:', 'all-in-one-seo-pack' ) .
170
- '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
171
- __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
172
- __( '%description% - This outputs the description you write for each page/post or the autogenerated description, if you have that option enabled. Auto-generated descriptions are generated from the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt.', 'all-in-one-seo-pack' ) . '</li><li>' .
173
- __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
174
- __( '%wp_title% - The original WordPress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '</li><li>' .
175
- __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
176
- __( "%post_date% - The date the page/post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
177
- __( "%post_year% - The year the page/post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
178
- __( "%post_month% - The month the page/post was published (localized)", 'all-in-one-seo-pack' ) . '</li>' ,
179
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
180
- '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
181
- __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
182
- __( '%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all-in-one-seo-pack' ) . '</li><li>' .
183
- __( '%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all-in-one-seo-pack' ) . '</li><li>' .
184
- __( '%404_title% - Additional 404 title input"', 'all-in-one-seo-pack' ) . '</li></ul>',
185
  'paged_format' => __( 'This string gets appended/prepended to titles of paged index pages (like home or archive pages).', 'all-in-one-seo-pack' )
186
- . __( 'The following macros are supported:', 'all-in-one-seo-pack' )
187
- . '<ul><li>' . __( '%page% - The page number', 'all-in-one-seo-pack' ) . '</li></ul>',
188
  'enablecpost' => __( 'Check this if you want to use All in One SEO Pack with any Custom Post Types on this site.', 'all-in-one-seo-pack' ),
189
  'cpostadvanced' => __( 'This will show or hide the advanced options for SEO for Custom Post Types.', 'all-in-one-seo-pack' ),
190
  'cpostactive' => __( 'Use these checkboxes to select which Post Types you want to use All in One SEO Pack with.', 'all-in-one-seo-pack' ),
@@ -226,7 +226,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
226
  'tax_noindex' => __( 'Check this to ask search engines not to index custom Taxonomy archive pages. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
227
  'paginated_noindex' => __( 'Check this to ask search engines not to index paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
228
  'paginated_nofollow' => __( 'Check this to ask search engines not to follow links from paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
229
- 'skip_excerpt' => __( "This option will auto generate your meta descriptions from your post content instead of your post excerpt. This is useful if you want to use your content for your autogenerated meta descriptions instead of the excerpt. WooCommerce users should read the documentation regarding this setting.", 'all-in-one-seo-pack' ),
230
  'generate_descriptions' => __( 'Check this and your Meta Descriptions for any Post Type will be auto-generated using the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt. You can overwrite any auto-generated Meta Description by editing the post or page.', 'all-in-one-seo-pack' ),
231
  'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
232
  'hide_paginated_descriptions' => __( 'Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.', 'all-in-one-seo-pack' ),
@@ -299,7 +299,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
299
  'ga_enhanced_ecommerce' => '#enhanced-ecommerce',
300
  'cpostnoindex' => '#noindex',
301
  'cpostnofollow' => '#nofollow',
302
- 'category_noindex' => '#noindex-settings',
303
  'archive_date_noindex' => '#noindex-settings',
304
  'archive_author_noindex' => '#noindex-settings',
305
  'tags_noindex' => '#noindex-settings',
@@ -320,16 +320,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
320
  'page_meta_tags' => '#additional-page-headers',
321
  'front_meta_tags' => '#additional-front-page-headers',
322
  'home_meta_tags' => '#additional-blog-page-headers',
323
- 'snippet' => '#preview-snippet',
324
- 'title' => '#title',
325
- 'description' => '#description',
326
- 'keywords' => '#keywords',
327
- 'custom_link' => '#custom-canonical-url',
328
- 'noindex' => '#robots-meta-noindex',
329
- 'nofollow' => '#robots-meta-nofollow',
330
- 'sitemap_exclude' => '#exclude-from-sitemap',
331
- 'disable' => '#disable-on-this-post',
332
- 'disable_analytics' => '#disable-google-analytics',
333
  );
334
 
335
  $meta_help_text = array(
@@ -851,7 +851,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
851
  'default' => 0,
852
  ),
853
  'redirect_attachement_parent' => array(
854
- 'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack'),
855
  'default' => 0,
856
  ),
857
  'ex_pages' => array(
@@ -938,7 +938,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
938
  'type' => 'html',
939
  'label' => 'none',
940
  'default' => '<a target="_blank" href="https://semperplugins.com/support/">'
941
- . __( 'Support Forum', 'all-in-one-seo-pack' ) . '</a>',
942
  ),
943
  'snippet' => array(
944
  'name' => __( 'Preview Snippet', 'all-in-one-seo-pack' ),
@@ -1064,7 +1064,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1064
  'google_author_location',
1065
  'google_enable_publisher',
1066
  'google_specify_publisher',
1067
- // "google_connect",
1068
  'google_analytics_id',
1069
  'ga_advanced_options',
1070
  'ga_domain',
@@ -1151,7 +1151,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1151
  add_action( 'all_admin_notices', array( $this, 'visibility_warning' ) );
1152
 
1153
  if ( ! AIOSEOPPRO ) {
1154
- // add_action('all_admin_notices', array( $this, 'woo_upgrade_notice'));
1155
  }
1156
  }
1157
  if ( AIOSEOPPRO ) {
@@ -1159,8 +1159,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1159
  }
1160
  }
1161
 
1162
- //good candidate for pro dir
1163
-
1164
  /**
1165
  * Use custom callback for outputting snippet
1166
  *
@@ -1177,7 +1176,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1177
  $args['options']['nowrap'] = false;
1178
  $args['options']['save'] = false;
1179
  $info = $this->get_page_snippet_info();
 
1180
  extract( $info );
 
1181
  } else {
1182
  return '';
1183
  }
@@ -1212,13 +1213,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1212
  if ( strpos( $title_format, '%current_date%' ) !== false ) {
1213
  $title_format = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $title_format );
1214
  }
1215
- if ( strpos( $title_format, "%post_date%" ) !== false ){
1216
  $title_format = str_replace( '%post_date%', get_the_date(), $title_format );
1217
  }
1218
- if ( strpos( $title_format, "%post_year%" ) !== false ){
1219
  $title_format = str_replace( '%post_year%', get_the_date( 'Y' ), $title_format );
1220
  }
1221
- if ( strpos( $title_format, "%post_month%" ) !== false ){
1222
  $title_format = str_replace( '%post_month%', get_the_date( 'F' ), $title_format );
1223
  }
1224
  if ( $w->is_category || $w->is_tag || $w->is_tax ) {
@@ -1278,14 +1279,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1278
  }
1279
 
1280
  $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
1281
- $args['value'] .= '<script>var aiosp_title_extra = '. (int) $extra_title_len . ';</script>';
1282
  $buf = $this->get_option_row( $args['name'], $args['options'], $args );
1283
 
1284
  return $buf;
1285
  }
1286
 
1287
- //good candidate for pro dir
1288
-
1289
  /**
1290
  * @return array
1291
  */
@@ -1344,7 +1344,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1344
  $description = $this->get_main_description( $post );
1345
 
1346
  // All this needs to be in it's own function (class really)
1347
-
1348
  if ( empty( $title_format ) ) {
1349
  if ( is_page() ) {
1350
  $title_format = $aioseop_options['aiosp_page_title_format'];
@@ -1361,17 +1360,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1361
  if ( count( $categories ) > 0 ) {
1362
  $category = $categories[0];
1363
  }
1364
- } else if ( is_object( $term ) ) {
1365
  if ( 'category' === $_GET['taxonomy'] ) {
1366
  query_posts( array( 'cat' => $_GET['tag_ID'] ) );
1367
- } else if ( 'post_tag' === $_GET['taxonomy'] ) {
1368
  query_posts( array( 'tag' => $term->slug ) );
1369
  } else {
1370
- query_posts( array(
1371
- 'page' => '',
1372
- $_GET['taxonomy'] => $term->slug,
1373
- 'post_type' => $_GET['post_type'],
1374
- ) );
 
 
1375
  }
1376
  if ( empty( $this->meta_opts ) ) {
1377
  $this->meta_opts = $this->get_current_options( array(), 'aiosp' );
@@ -1387,8 +1388,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1387
  }
1388
  $description = $this->internationalize( $description );
1389
  }
1390
- if($this->is_front_page == true ){
1391
- //$title_format = $aioseop_options['aiosp_home_page_title_format'];
1392
  $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.
1393
  }
1394
  $show_page = true;
@@ -1463,7 +1464,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1463
  * @return array
1464
  */
1465
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
1466
- if ( ( 'aiosp' === $location) && ( 'metabox' == $this->locations[ $location ]['type'] ) ) {
1467
  if ( null === $post ) {
1468
  global $post;
1469
  }
@@ -1519,7 +1520,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1519
  }
1520
  }
1521
  }
1522
-
1523
  }
1524
  $opts = wp_parse_args( $opts, $get_opts );
1525
 
@@ -1640,8 +1640,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1640
 
1641
  }
1642
 
1643
- return $this->paged_title( $title ); //this is returned for woo
1644
- } else if ( is_attachment() ) {
1645
  if ( null === $post ) {
1646
  return false;
1647
  }
@@ -1658,7 +1658,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1658
  $title = apply_filters( 'aioseop_attachment_title', $this->internationalize( $this->apply_post_title_format( $title, '', $post ) ) );
1659
 
1660
  return $title;
1661
- } else if ( is_page() || $this->is_static_posts_page() || ( is_home() && ! $this->is_static_posts_page() ) ) {
1662
  if ( null === $post ) {
1663
  return false;
1664
  }
@@ -1699,7 +1699,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1699
 
1700
  return $title;
1701
  }
1702
- } else if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
1703
  // Too far down? -mrt.
1704
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1705
  if ( ! $title ) {
@@ -1713,7 +1713,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1713
  $title = apply_filters( 'aioseop_title_page', $title );
1714
 
1715
  return $title;
1716
- } else if ( is_single() ) {
1717
  // We're not in the loop :(.
1718
  if ( null === $post ) {
1719
  return false;
@@ -1739,7 +1739,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1739
  $title = $this->paged_title( $title );
1740
 
1741
  return apply_filters( 'aioseop_title_single', $title );
1742
- } else if ( is_search() && isset( $s ) && ! empty( $s ) ) {
1743
  $search = esc_attr( stripslashes( $s ) );
1744
  $title_format = $aioseop_options['aiosp_search_title_format'];
1745
  $title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
@@ -1752,7 +1752,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1752
  $title = $this->paged_title( $title );
1753
 
1754
  return $title;
1755
- } else if ( is_tag() ) {
1756
  global $utw;
1757
  $tag = $tag_description = '';
1758
  if ( $utw ) {
@@ -1803,9 +1803,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1803
 
1804
  return $title;
1805
  }
1806
- } else if ( ( is_tax() || is_category() ) && ! is_feed() ) {
1807
  return $this->get_tax_title();
1808
- } else if ( isset( $STagging ) && $STagging->is_tag_view() ) { // Simple tagging support.
1809
  $tag = $STagging->search_tag;
1810
  if ( $tag ) {
1811
  $title_format = $aioseop_options['aiosp_tag_title_format'];
@@ -1820,12 +1820,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1820
 
1821
  return $title;
1822
  }
1823
- } else if ( is_archive() || is_post_type_archive() ) {
1824
  if ( is_author() ) {
1825
  $author = $this->internationalize( $this->get_original_title( '', false ) );
1826
  $title_format = $aioseop_options['aiosp_author_title_format'];
1827
  $new_title = str_replace( '%author%', $author, $title_format );
1828
- } else if ( is_date() ) {
1829
  global $wp_query;
1830
  $date = $this->internationalize( $this->get_original_title( '', false ) );
1831
  $title_format = $aioseop_options['aiosp_date_title_format'];
@@ -1849,7 +1849,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1849
  if ( strpos( $new_title, '%year%' ) !== false ) {
1850
  $new_title = str_replace( '%year%', get_query_var( 'year' ), $new_title );
1851
  }
1852
- } else if ( is_post_type_archive() ) {
1853
  if ( empty( $title ) ) {
1854
  $title = $this->get_original_title( '', false );
1855
  }
@@ -1865,7 +1865,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1865
  $title = $this->paged_title( $title );
1866
 
1867
  return $title;
1868
- } else if ( is_404() ) {
1869
  $title_format = $aioseop_options['aiosp_404_title_format'];
1870
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1871
  if ( strpos( $new_title, '%blog_description%' ) !== false ) {
@@ -1907,7 +1907,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1907
  $seplocation = 'right';
1908
  }
1909
  $title = wp_title( $sep, $echo, $seplocation );
1910
- if ( false !== $has_filter ) {
1911
  add_filter( 'wp_title', array( $this, 'wp_title' ), $has_filter );
1912
  }
1913
  if ( $title && ( $title = trim( $title ) ) ) {
@@ -1922,17 +1922,17 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1922
 
1923
  if ( is_home() ) {
1924
  $title = get_option( 'blogname' );
1925
- } else if ( is_single() ) {
1926
  $title = $this->internationalize( single_post_title( '', false ) );
1927
- } else if ( is_search() && isset( $s ) && ! empty( $s ) ) {
1928
  $search = esc_attr( stripslashes( $s ) );
1929
  $title = $search;
1930
- } else if ( ( is_tax() || is_category() ) && ! is_feed() ) {
1931
  $category_name = $this->ucwords( $this->internationalize( single_cat_title( '', false ) ) );
1932
  $title = $category_name;
1933
- } else if ( is_page() ) {
1934
  $title = $this->internationalize( single_post_title( '', false ) );
1935
- } else if ( is_tag() ) {
1936
  global $utw;
1937
  if ( $utw ) {
1938
  $tags = $utw->GetCurrentTagSet();
@@ -1945,7 +1945,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1945
  if ( $tag ) {
1946
  $title = $tag;
1947
  }
1948
- } else if ( is_author() ) {
1949
  $author = get_userdata( get_query_var( 'author' ) );
1950
  if ( $author === false ) {
1951
  global $wp_query;
@@ -1954,15 +1954,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1954
  if ( $author !== false ) {
1955
  $title = $author->display_name;
1956
  }
1957
- } else if ( is_day() ) {
1958
  $title = get_the_date();
1959
- } else if ( is_month() ) {
1960
  $title = get_the_date( 'F, Y' );
1961
- } else if ( is_year() ) {
1962
  $title = get_the_date( 'Y' );
1963
- } else if ( is_archive() ) {
1964
  $title = $this->internationalize( post_type_archive_title( '', false ) );
1965
- } else if ( is_404() ) {
1966
  $title_format = $aioseop_options['aiosp_404_title_format'];
1967
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1968
  if ( strpos( $new_title, '%blog_description%' ) !== false ) {
@@ -2024,8 +2024,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2024
  }
2025
 
2026
  /**
2027
- * Replace title templates inside % symbol.
2028
- *
2029
  * @param $title
2030
  * @param $post
2031
  * @param string $type
@@ -2082,16 +2082,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2082
  if ( strpos( $new_title, "%{$type}_author_lastname%" ) !== false ) {
2083
  $new_title = str_replace( "%{$type}_author_lastname%", $this->ucwords( $authordata->last_name ), $new_title );
2084
  }
2085
- if ( strpos( $new_title, "%current_date%" ) !== false ){
2086
  $new_title = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $new_title );
2087
  }
2088
- if ( strpos( $new_title, "%post_date%" ) !== false ){
2089
  $new_title = str_replace( '%post_date%', get_the_date(), $new_title );
2090
  }
2091
- if ( strpos( $new_title, "%post_year%" ) !== false ){
2092
  $new_title = str_replace( '%post_year%', get_the_date( 'Y' ), $new_title );
2093
  }
2094
- if ( strpos( $new_title, "%post_month%" ) !== false ){
2095
  $new_title = str_replace( '%post_month%', get_the_date( 'F' ), $new_title );
2096
  }
2097
 
@@ -2151,7 +2151,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2151
  */
2152
  function log( $message ) {
2153
  if ( $this->do_log ) {
 
2154
  @error_log( date( 'Y-m-d H:i:s' ) . ' ' . $message . "\n", 3, $this->log_file );
 
2155
  }
2156
  }
2157
 
@@ -2185,18 +2187,18 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2185
  return false;
2186
  }
2187
  $title_format = "%{$title_type}_title% | %blog_title%";
2188
- if ( isset( $aioseop_options["aiosp_{$title_type}_title_format"] ) ) {
2189
- $title_format = $aioseop_options["aiosp_{$title_type}_title_format"];
2190
  }
2191
  if ( ! empty( $aioseop_options['aiosp_enablecpost'] ) && ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
2192
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
2193
  if ( ! empty( $aioseop_options['aiosp_cposttitles'] ) ) {
2194
  if ( ( ( $title_type == 'archive' ) && is_post_type_archive( $wp_post_types ) && $prefix = "aiosp_{$title_type}_" ) ||
2195
- ( ( $title_type == 'post' ) && $this->is_singular( $wp_post_types, $p ) && $prefix = 'aiosp_' )
2196
  ) {
2197
  $post_type = get_post_type( $p );
2198
- if ( ! empty( $aioseop_options["{$prefix}{$post_type}_title_format"] ) ) {
2199
- $title_format = $aioseop_options["{$prefix}{$post_type}_title_format"];
2200
  }
2201
  }
2202
  }
@@ -2288,7 +2290,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2288
  }
2289
 
2290
  // Handle prev / next links.
2291
-
2292
  /**
2293
  *
2294
  * Gets taxonomy name.
@@ -2297,7 +2298,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2297
  *
2298
  * @since 2.3.10 Remove option for capitalize categories. We still respect the option,
2299
  * and the default (true) or a legacy option in the db can be overridden with the new filter hook aioseop_capitalize_categories
2300
- * @since 2.3.15 Remove category capitalization completely
2301
  *
2302
  * @return mixed|void
2303
  */
@@ -2388,8 +2389,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2388
  if ( empty( $tax ) ) {
2389
  $tax = get_query_var( 'taxonomy' );
2390
  }
2391
- if ( ! empty( $aioseop_options["aiosp_{$tax}_tax_title_format"] ) ) {
2392
- $title_format = $aioseop_options["aiosp_{$tax}_tax_title_format"];
2393
  }
2394
  }
2395
  if ( empty( $title_format ) ) {
@@ -2448,22 +2449,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2448
  $description = '';
2449
  if ( is_author() && $this->show_page_description() ) {
2450
  $description = $this->internationalize( get_the_author_meta( 'description' ) );
2451
- } else if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
2452
  // $description = $this->get_post_description( $post );
2453
  // $description = $this->apply_cf_fields( $description );
2454
  if ( ! ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ) {
2455
  $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2456
- } else if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2457
  // $description = $this->get_aioseop_description( $post );
2458
  $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2459
- } else if ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2460
  $description = $this->get_aioseop_description( $post );
2461
  }
2462
- } else if ( is_front_page() ) {
2463
  $description = $this->get_aioseop_description( $post );
2464
- } else if ( is_single() || is_page() || is_attachment() || is_home() || $this->is_static_posts_page() ) {
2465
  $description = $this->get_aioseop_description( $post );
2466
- } else if ( ( is_category() || is_tag() || is_tax() ) && $this->show_page_description() ) {
2467
  if ( ! empty( $opts ) && AIOSEOPPRO ) {
2468
  $description = $opts['aiosp_description'];
2469
  }
@@ -2479,7 +2480,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2479
  $aioseop_desc = get_post_meta( $post->ID, '_aioseop_description', true );
2480
  }
2481
 
2482
- if ( empty ( $aioseop_desc ) && 'on' === $aioseop_options['aiosp_generate_descriptions'] && empty( $aioseop_options['aiosp_dont_truncate_descriptions'] ) ) {
2483
  $truncate = true;
2484
  }
2485
 
@@ -2699,12 +2700,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2699
  $link = get_tag_link( $tag->term_id );
2700
  }
2701
  } elseif ( $query->is_day && $haspost ) {
2702
- $link = get_day_link( get_query_var( 'year' ),
 
2703
  get_query_var( 'monthnum' ),
2704
- get_query_var( 'day' ) );
 
2705
  } elseif ( $query->is_month && $haspost ) {
2706
- $link = get_month_link( get_query_var( 'year' ),
2707
- get_query_var( 'monthnum' ) );
 
 
2708
  } elseif ( $query->is_year && $haspost ) {
2709
  $link = get_year_link( get_query_var( 'year' ) );
2710
  } elseif ( $query->is_tax && $haspost ) {
@@ -2980,8 +2985,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2980
  function add_page_icon() {
2981
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
2982
  wp_enqueue_style( 'wp-pointer' );
2983
- //$this->add_admin_pointers();
2984
-
2985
  wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css', array(), AIOSEOP_VERSION );
2986
  ?>
2987
  <script>
@@ -3016,17 +3020,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3016
  var admin_pointer;
3017
  var admin_index;
3018
  <?php
3019
- foreach ( $this->pointers as $k => $p )
3020
- {if ( ! empty( $p['pointer_scope'] ) && ( 'global' === $p['pointer_scope'] ) ) {
3021
- ?>admin_index = "<?php echo esc_attr( $k ); ?>";
3022
- admin_pointer = <?php echo json_encode( $p ); ?>;
3023
- aioseop_show_pointer(admin_index, admin_pointer);
3024
- <?php
 
 
3025
  }
3026
- } ?>
3027
  });
3028
  }
3029
- <?php } ?>
3030
  </script>
3031
  <?php
3032
  }
@@ -3041,7 +3047,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3041
  $this->pointers['aioseop_menu_2640'] = array(
3042
  'pointer_target' => "#toplevel_page_all-in-one-seo-pack$pro-aioseop_class",
3043
  'pointer_text' => '<h3>' . __( 'Review Your Settings', 'all-in-one-seo-pack' )
3044
- . '</h3><p>' . sprintf( __( 'Welcome to version %s. Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION ) . '</p>',
3045
  'pointer_edge' => 'top',
3046
  'pointer_align' => 'left',
3047
  'pointer_scope' => 'global',
@@ -3050,7 +3056,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3050
  $this->pointers['aioseop_menu_2361'] = array(
3051
  'pointer_target' => '#aioseop_top_button',
3052
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3053
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3054
  'pointer_edge' => 'top',
3055
  'pointer_align' => 'left',
3056
  'pointer_scope' => 'global',
@@ -3058,7 +3064,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3058
  $this->pointers['aioseop_welcome_230'] = array(
3059
  'pointer_target' => '#aioseop_top_button',
3060
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3061
- . '</h3><p>' . __( 'New in 2.4: Improved support for taxonomies, Woocommerce and massive performance improvements under the hood! Please review your settings on each options page!', 'all-in-one-seo-pack' ) . '</p>',
3062
  'pointer_edge' => 'bottom',
3063
  'pointer_align' => 'left',
3064
  'pointer_scope' => 'local',
@@ -3068,7 +3074,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3068
  $this->pointers['aioseop_menu_2205'] = array(
3069
  'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
3070
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3071
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3072
  'pointer_edge' => 'top',
3073
  'pointer_align' => 'left',
3074
  'pointer_scope' => 'global',
@@ -3076,7 +3082,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3076
  $this->pointers['aioseop_welcome_220534'] = array(
3077
  'pointer_target' => '#aioseop_top_button',
3078
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3079
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New since 2.2: Control who accesses your site with the new Robots.txt Editor and File Editor modules! Enable them from the Feature Manager. Remember to review your settings, we have added some new ones!', 'all-in-one-seo-pack' ) . '</p>',
3080
  'pointer_edge' => 'bottom',
3081
  'pointer_align' => 'left',
3082
  'pointer_scope' => 'local',
@@ -3142,7 +3148,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3142
  $this->default_options['google_author_location']['initial_options'] = array_merge( array( 'front' => __( 'Front Page', 'all-in-one-seo-pack' ) ), $post_types, array( 'all' => __( 'Everywhere Else', 'all-in-one-seo-pack' ) ) );
3143
  $this->default_options['google_author_location']['default'] = array_keys( $this->default_options['google_author_location']['initial_options'] );
3144
 
3145
- foreach ( $post_types as $p => $pt ) {
3146
  $field = $p . '_title_format';
3147
  $name = $post_objs[ $p ]->labels->singular_name;
3148
  if ( ! isset( $this->default_options[ $field ] ) ) {
@@ -3159,13 +3165,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3159
  ),
3160
  );
3161
  $this->help_text[ $field ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' )
3162
- . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
3163
- __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
3164
- __( '%post_title% - The original title of the post.', 'all-in-one-seo-pack' ) . '</li><li>';
3165
  $taxes = get_object_taxonomies( $p, 'objects' );
3166
  if ( ! empty( $taxes ) ) {
3167
  foreach ( $taxes as $n => $t ) {
3168
- $this->help_text[ $field ] .= sprintf( __( "%%tax_%s%% - This post's associated %s taxonomy title", 'all-in-one-seo-pack' ), $n, $t->label ) . '</li><li>';
3169
  }
3170
  }
3171
  $this->help_text[ $field ] .=
@@ -3173,11 +3179,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3173
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
3174
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3175
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li>' .
3176
- __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3177
- __( "%post_date% - The date the post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3178
- __( "%post_year% - The year the post was published (localized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3179
- __( "%post_month% - The month the post was published (localized)", 'all-in-one-seo-pack' ) . '</li>' .
3180
- '</ul>' .
3181
  '</ul>';
3182
  $this->help_anchors[ $field ] = '#custom-titles';
3183
  $this->layout['cpt']['options'][] = $field;
@@ -3216,10 +3222,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3216
  ),
3217
  );
3218
  $this->help_text[ $field ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' ) .
3219
- '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
3220
- __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
3221
- __( '%taxonomy_title% - The original title of the taxonomy', 'all-in-one-seo-pack' ) . '</li><li>' .
3222
- __( '%taxonomy_description% - The description of the taxonomy', 'all-in-one-seo-pack' ) . '</li></ul>';
3223
  $this->help_anchors[ $field ] = '#custom-titles';
3224
  $this->layout['cpt']['options'][] = $field;
3225
  }
@@ -3230,10 +3236,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3230
 
3231
  if ( AIOSEOPPRO ) {
3232
  global $aioseop_update_checker;
3233
- add_action( "{$this->prefix}update_options", array(
3234
- $aioseop_update_checker,
3235
- 'license_change_check',
3236
- ), 10, 2 );
 
 
3237
  add_action( "{$this->prefix}settings_update", array( $aioseop_update_checker, 'update_check' ), 10, 2 );
3238
  }
3239
 
@@ -3325,7 +3333,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3325
  $prefix = $this->prefix;
3326
 
3327
  foreach ( array( 'seopostcol', 'seocustptcol', 'debug_info', 'max_words_excerpt' ) as $opt ) {
3328
- unset( $settings["{$prefix}$opt"] );
3329
  }
3330
 
3331
  if ( ! class_exists( 'DOMDocument' ) ) {
@@ -3343,16 +3351,16 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3343
  if ( ! empty( $post ) ) {
3344
  $post_type = get_post_type( $post );
3345
  if ( ! empty( $this->options['aiosp_cpostnoindex'] ) && in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) {
3346
- $settings["{$prefix}noindex"]['type'] = 'select';
3347
- $settings["{$prefix}noindex"]['initial_options'] = array(
3348
  '' => __( 'Default - noindex', 'all-in-one-seo-pack' ),
3349
  'off' => __( 'index', 'all-in-one-seo-pack' ),
3350
  'on' => __( 'noindex', 'all-in-one-seo-pack' ),
3351
  );
3352
  }
3353
  if ( ! empty( $this->options['aiosp_cpostnofollow'] ) && in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) {
3354
- $settings["{$prefix}nofollow"]['type'] = 'select';
3355
- $settings["{$prefix}nofollow"]['initial_options'] = array(
3356
  '' => __( 'Default - nofollow', 'all-in-one-seo-pack' ),
3357
  'off' => __( 'follow', 'all-in-one-seo-pack' ),
3358
  'on' => __( 'nofollow', 'all-in-one-seo-pack' ),
@@ -3361,15 +3369,17 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3361
 
3362
  global $post;
3363
  $info = $this->get_page_snippet_info();
 
3364
  extract( $info );
3365
- $settings["{$prefix}title"]['placeholder'] = $this->html_entity_decode( $title );
3366
- $settings["{$prefix}description"]['placeholder'] = $this->html_entity_decode( $description );
3367
- $settings["{$prefix}keywords"]['placeholder'] = $keywords;
 
3368
  }
3369
 
3370
  if ( ! AIOSEOPPRO ) {
3371
  if ( ! current_user_can( 'update_plugins' ) ) {
3372
- unset( $settings["{$prefix}upgrade"] );
3373
  }
3374
  }
3375
 
@@ -3378,13 +3388,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3378
  }
3379
 
3380
  if ( ! empty( $this->options[ $this->prefix . 'togglekeywords' ] ) ) {
3381
- unset( $settings["{$prefix}keywords"] );
3382
- unset( $settings["{$prefix}togglekeywords"] );
3383
- } elseif ( ! empty( $current["{$prefix}togglekeywords"] ) ) {
3384
- unset( $settings["{$prefix}keywords"] );
3385
  }
3386
  if ( empty( $this->options['aiosp_can'] ) || empty( $this->options['aiosp_customize_canonical_links'] ) ) {
3387
- unset( $settings["{$prefix}custom_link"] );
3388
  }
3389
  }
3390
 
@@ -3405,8 +3415,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3405
  $post_type = get_post_type( $post );
3406
  foreach ( array( 'noindex', 'nofollow' ) as $no ) {
3407
  if ( empty( $this->options[ 'aiosp_cpost' . $no ] ) || ( ! in_array( $post_type, $this->options[ 'aiosp_cpost' . $no ] ) ) ) {
3408
- if ( isset( $options["{$prefix}{$no}"] ) && ( $options["{$prefix}{$no}"] != 'on' ) ) {
3409
- unset( $options["{$prefix}{$no}"] );
3410
  }
3411
  }
3412
  }
@@ -3414,14 +3424,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3414
  }
3415
  if ( $location == null ) {
3416
  $prefix = $this->prefix;
3417
- if ( isset( $options["{$prefix}rewrite_titles"] ) && ( ! empty( $options["{$prefix}rewrite_titles"] ) ) ) {
3418
- $options["{$prefix}rewrite_titles"] = 1;
3419
  }
3420
- if ( isset( $options["{$prefix}enablecpost"] ) && ( $options["{$prefix}enablecpost"] === '' ) ) {
3421
- $options["{$prefix}enablecpost"] = 0;
3422
  }
3423
- if ( isset( $options["{$prefix}use_original_title"] ) && ( $options["{$prefix}use_original_title"] === '' ) ) {
3424
- $options["{$prefix}use_original_title"] = 0;
3425
  }
3426
  }
3427
 
@@ -3489,7 +3499,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3489
  if ( empty( $aioseop_options['aiosp_taxactive'] ) || ! in_array( 'post_tag', $aioseop_options['aiosp_taxactive'] ) ) {
3490
  return false;
3491
  }
3492
- } else if ( ! in_array( $post_type, $wp_post_types ) && ! is_front_page() && ! is_post_type_archive( $wp_post_types ) && ! is_404() ) {
3493
  return false;
3494
  }
3495
  } else {
@@ -3559,7 +3569,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3559
  return $header;
3560
  }
3561
 
3562
- // Check if we're in the main query to support bad themes and plugins.
3563
  $old_wp_query = null;
3564
  if ( ! $wp_query->is_main_query() ) {
3565
  $old_wp_query = $wp_query;
@@ -3600,7 +3610,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3600
  }
3601
 
3602
  /**
3603
- * Adds wordpress hooks.
3604
  *
3605
  * @since 2.3.13 #899 Adds filter:aioseop_description.
3606
  * @since 2.3.14 #593 Adds filter:aioseop_title.
@@ -3610,11 +3620,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3610
  global $aioseop_options, $aioseop_update_checker;
3611
 
3612
  // MOVED TO MAIN PLUGIN FILE IN ORDER TO FIRE SOONS
3613
- //$role = get_role( 'administrator' );
3614
- //if ( is_object( $role ) ) {
3615
- // $role->add_cap( 'aiosp_manage_seo' );
3616
- //}
3617
-
3618
  aioseop_update_settings_check();
3619
  add_filter( 'user_contactmethods', 'aioseop_add_contactmethods' );
3620
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
@@ -3630,10 +3639,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3630
  if ( current_user_can( 'update_plugins' ) ) {
3631
  add_action( 'admin_notices', array( $aioseop_update_checker, 'key_warning' ) );
3632
  }
3633
- add_action( 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array(
3634
- $aioseop_update_checker,
3635
- 'add_plugin_row',
3636
- ) );
 
 
3637
  }
3638
  } else {
3639
  if ( $aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on' ) {
@@ -3657,7 +3668,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3657
 
3658
  if ( '0' == get_option( 'blog_public' ) && empty( $aioseop_visibility_notice_dismissed ) ) {
3659
 
3660
- printf( '
 
3661
  <div id="message" class="error notice is-dismissible aioseop-notice visibility-notice">
3662
  <p>
3663
  <strong>%1$s</strong>
@@ -3666,7 +3678,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3666
  </p>
3667
  </div>',
3668
  __( 'Warning: You\'re blocking access to search engines.', 'all-in-one-seo-pack' ),
3669
- sprintf( __( 'You can %s click here%s to go to your reading settings and toggle your blog visibility.', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( admin_url( 'options-reading.php' ) ) ), '</a>' ) );
 
3670
 
3671
  } elseif ( '1' == get_option( 'blog_public' ) && ! empty( $aioseop_visibility_notice_dismissed ) ) {
3672
  delete_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed' );
@@ -3679,7 +3692,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3679
 
3680
  if ( class_exists( 'WooCommerce' ) && empty( $aioseop_woo_upgrade_notice_dismissed ) && current_user_can( 'manage_options' ) ) {
3681
 
3682
- printf( '
 
3683
  <div id="message" class="notice-info notice is-dismissible aioseop-notice woo-upgrade-notice">
3684
  <p>
3685
  <strong>%1$s</strong>
@@ -3688,7 +3702,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3688
  </p>
3689
  </div>',
3690
  __( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
3691
- sprintf( __( '%s Upgrade%s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo' ) ), '</a>' ) );
 
3692
 
3693
  } elseif ( ! class_exists( 'WooCommerce' ) && ! empty( $aioseop_woo_upgrade_notice_dismissed ) ) {
3694
  delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
@@ -3720,8 +3735,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3720
 
3721
  /**
3722
  * Adds meta description to AMP pages.
3723
- *
3724
- * @since 2.3.11.5
3725
  */
3726
  function amp_head() {
3727
  $post = $this->get_queried_object();
@@ -3747,14 +3762,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3747
  $desc_attr = apply_filters( 'aioseop_amp_description_attributes', $desc_attr );
3748
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
3749
  }
3750
- if( ! empty( $meta_string) ){
3751
- echo $meta_string;
3752
- }
3753
- }
3754
 
3755
- /**
3756
  * @since 2.3.14 #932 Removes filter "aioseop_description".
3757
- */
3758
  function wp_head() {
3759
 
3760
  // Check if we're in the main query to support bad themes and plugins.
@@ -3779,7 +3794,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3779
  static $aioseop_dup_counter = 0;
3780
  $aioseop_dup_counter ++;
3781
  if ( $aioseop_dup_counter > 1 ) {
3782
- echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %s filter. Called %s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
3783
  if ( ! empty( $old_wp_query ) ) {
3784
  // Change the query back after we've finished.
3785
  $GLOBALS['wp_query'] = $old_wp_query;
@@ -3814,7 +3829,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3814
  $save_posts = $posts;
3815
 
3816
  // This outputs robots meta tags and custom canonical URl on WooCommerce product archive page.
3817
- // See Github issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/755.
3818
  if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
3819
  global $posts;
3820
  $opts = $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
@@ -3872,8 +3887,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3872
  'pinterest' => 'p:domain_verify',
3873
  ) as $k => $v
3874
  ) {
3875
- if ( ! empty( $aioseop_options["aiosp_{$k}_verify"] ) ) {
3876
- $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options["aiosp_{$k}_verify"] ) ) . '" />' . "\n";
3877
  }
3878
  }
3879
 
@@ -3884,8 +3899,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3884
  }
3885
  // Handle extra meta fields.
3886
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
3887
- if ( ! empty( $aioseop_options["aiosp_{$meta}_tags"] ) ) {
3888
- $$meta = html_entity_decode( stripslashes( $aioseop_options["aiosp_{$meta}_tags"] ), ENT_QUOTES );
3889
  } else {
3890
  $$meta = '';
3891
  }
@@ -3995,8 +4010,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3995
  $active_handlers = array();
3996
  }
3997
  if ( sizeof( $active_handlers ) > 0 &&
3998
- $this->strtolower( $active_handlers[ sizeof( $active_handlers ) - 1 ] ) ==
3999
- $this->strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' )
4000
  ) {
4001
  ob_end_flush();
4002
  } else {
@@ -4059,28 +4074,29 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4059
  if ( strpos( $description, '%current_date%' ) !== false ) {
4060
  $description = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $description );
4061
  }
4062
- if ( strpos( $description, "%post_date%" ) !== false ){
4063
  $description = str_replace( '%post_date%', get_the_date(), $description );
4064
  }
4065
- if ( strpos( $description, "%post_year%" ) !== false ){
4066
  $description = str_replace( '%post_year%', get_the_date( 'Y' ), $description );
4067
  }
4068
- if ( strpos( $description, "%post_month%" ) !== false ){
4069
  $description = str_replace( '%post_month%', get_the_date( 'F' ), $description );
4070
  }
4071
 
4072
- /*this was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
 
4073
  *on the roadmap is to have a better hierarchy for attachment description pulling
4074
  * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
4075
  */
4076
- $description = $this->apply_cf_fields($description);
4077
  return $description;
4078
  }
4079
 
4080
  /**
4081
  * @return string
4082
- * @since 0.0
4083
- * @since 2.3.11.5 Added no index API filter hook for password protected posts.
4084
  */
4085
  function get_robots_meta() {
4086
  global $aioseop_options;
@@ -4099,11 +4115,11 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4099
  $noindex = 'index';
4100
  $nofollow = 'follow';
4101
  if ( ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( ! is_category() && is_archive() && ! is_tag() && ! is_tax()
4102
- && ( ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) || ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ) )
4103
- || ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) )
4104
- || ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) )
4105
- || ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) )
4106
- || ( is_tax() && in_array( get_query_var( 'taxonomy' ), $tax_noindex ) )
4107
  ) {
4108
  $noindex = 'noindex';
4109
  } elseif ( is_single() || is_page() || $this->is_static_posts_page() || is_attachment() || is_category() || is_tag() || is_tax() || ( $page > 1 ) ) {
@@ -4113,23 +4129,23 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4113
  $aiosp_nofollow = htmlspecialchars( stripslashes( $opts['aiosp_nofollow'] ) );
4114
  }
4115
  if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] )
4116
- || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] )
4117
  ) {
4118
  if ( ( $aiosp_noindex == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) ) && $page > 1 ) ||
4119
- ( ( $aiosp_noindex == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) )
4120
  ) {
4121
  $noindex = 'noindex';
4122
  }
4123
  if ( ( $aiosp_nofollow == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) && $page > 1 ) ||
4124
- ( ( $aiosp_nofollow == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) )
4125
  ) {
4126
  $nofollow = 'nofollow';
4127
  }
4128
  }
4129
  }
4130
- if ( is_singular() && $this->is_password_protected() && apply_filters( 'aiosp_noindex_password_posts', false ) ){
4131
- $noindex = 'noindex';
4132
- }
4133
 
4134
  $robots_meta = $noindex . ',' . $nofollow;
4135
  if ( $robots_meta == 'index,follow' ) {
@@ -4140,20 +4156,20 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4140
  }
4141
 
4142
  /**
4143
- * Determine if post is password protected.
4144
- * @since 2.3.11.5
4145
  * @return bool
4146
  */
4147
- function is_password_protected(){
4148
- global $post;
4149
 
4150
- if (!empty($post->post_password)) {
4151
- return true;
4152
- }
4153
 
4154
- return false;
4155
 
4156
- }
4157
 
4158
  /**
4159
  * @return mixed|void
@@ -4239,7 +4255,7 @@ EOF;
4239
  }
4240
  if ( is_singular() && ( ! empty( $googleplus ) ) ) {
4241
  $author = $googleplus;
4242
- } else if ( ! empty( $aioseop_options['aiosp_google_publisher'] ) ) {
4243
  $author = $aioseop_options['aiosp_google_publisher'];
4244
  }
4245
 
@@ -4291,7 +4307,7 @@ EOF;
4291
  }
4292
  }
4293
  }
4294
- } else if ( is_page() || is_single() ) {
4295
  $numpages = 1;
4296
  $multipage = 0;
4297
  $page = get_query_var( 'page' );
@@ -4354,7 +4370,6 @@ EOF;
4354
  function validate_url_scheme( $url ) {
4355
 
4356
  // TODO we should check for the site setting in the case of auto.
4357
-
4358
  global $aioseop_options;
4359
 
4360
  $scheme = apply_filters( 'aioseop_canonical_protocol', false );
@@ -4512,13 +4527,11 @@ EOF;
4512
 
4513
  function admin_bar_menu() {
4514
 
4515
-
4516
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
4517
  // API filter hook to disable showing SEO in admin bar.
4518
  return;
4519
  }
4520
 
4521
-
4522
  global $wp_admin_bar, $aioseop_admin_menu, $post, $aioseop_options;
4523
 
4524
  $toggle = '';
@@ -4529,7 +4542,7 @@ EOF;
4529
  $toggle = 'off';
4530
  }
4531
 
4532
- if ( ( ! isset( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || ( ! empty( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || isset( $_POST['aiosp_admin_bar'] ) || true == apply_filters( 'aioseo_show_in_admin_bar', false ) ) {
4533
 
4534
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
4535
  // API filter hook to disable showing SEO in admin bar.
@@ -4546,20 +4559,24 @@ EOF;
4546
  $url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
4547
  }
4548
 
4549
- $wp_admin_bar->add_menu( array(
4550
- 'id' => AIOSEOP_PLUGIN_DIRNAME,
4551
- 'title' => __( 'SEO', 'all-in-one-seo-pack' ),
4552
- 'href' => $url,
4553
- ) );
 
 
4554
 
4555
  if ( current_user_can( 'update_plugins' ) && ! AIOSEOPPRO ) {
4556
- $wp_admin_bar->add_menu( array(
4557
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4558
- 'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
4559
- 'id' => 'aioseop-pro-upgrade',
4560
- 'href' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
4561
- 'meta' => array( 'target' => '_blank' ),
4562
- ) );
 
 
4563
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
4564
  }
4565
 
@@ -4579,35 +4596,39 @@ EOF;
4579
  if ( ! empty( $current_object ) && ! empty( $current_object->post_type ) ) {
4580
  // Try the main query.
4581
  $edit_post_link = get_edit_post_link( $current_object->ID );
4582
- $wp_admin_bar->add_menu( array(
4583
- 'id' => 'aiosp_edit_' . $current_object->ID,
4584
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4585
- 'title' => 'Edit SEO',
4586
- 'href' => $edit_post_link . '#aiosp',
4587
- ) );
 
 
4588
  } else {
4589
  // Try the post object.
4590
- $wp_admin_bar->add_menu( array(
4591
- 'id' => 'aiosp_edit_' . $post->ID,
4592
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4593
- 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4594
- 'href' => get_edit_post_link( $post->ID ) . '#aiosp',
4595
- ) );
 
 
4596
  }
4597
  }
4598
 
4599
  if ( AIOSEOPPRO && ( is_category() || is_tax() || is_tag() ) ) {
4600
  // SEO for taxonomies are only available in Pro version.
4601
  $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy );
4602
- $wp_admin_bar->add_menu( array(
4603
- 'id' => 'aiosp_edit_' . $post->ID,
4604
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4605
- 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4606
- 'href' => $edit_term_link . '#aiosp',
4607
- ) );
 
 
4608
  }
4609
-
4610
-
4611
  }
4612
  }
4613
  }
@@ -4717,8 +4738,8 @@ EOF;
4717
 
4718
  $this->update_options();
4719
 
4720
- // For now we're removing admin pointers.
4721
  /*
 
4722
  $this->add_admin_pointers();
4723
  if ( ! empty( $this->pointers ) ) {
4724
  foreach ( $this->pointers as $k => $p ) {
@@ -4736,7 +4757,7 @@ EOF;
4736
  } else {
4737
  $custom_menu_order = false;
4738
  }
4739
- } else if ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
4740
  $custom_menu_order = true;
4741
  }
4742
  } else {
@@ -4764,9 +4785,9 @@ EOF;
4764
 
4765
  if ( ! empty( $this->options['aiosp_enablecpost'] ) && $this->options['aiosp_enablecpost'] ) {
4766
  if ( AIOSEOPPRO ) {
4767
- if( is_array( $this->options['aiosp_cpostactive'] ) ) {
4768
- $this->locations['aiosp']['display'] = $this->options['aiosp_cpostactive'];
4769
- }else{
4770
  $this->locations['aiosp']['display'][] = $this->options['aiosp_cpostactive']; // Store as an array in case there are taxonomies to add also.
4771
  }
4772
 
@@ -4788,31 +4809,40 @@ EOF;
4788
  $this->locations['aiosp']['display'] = array( 'post', 'page' );
4789
  }
4790
 
 
 
 
 
 
 
4791
 
4792
- add_menu_page( $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $file, array(
4793
- $this,
4794
- 'display_settings_page',
4795
- ) );
4796
-
4797
- add_meta_box( 'aioseop-list', __( 'Join Our Mailing List', 'all-in-one-seo-pack' ), array(
4798
- 'aiosp_metaboxes',
4799
- 'display_extra_metaboxes',
4800
- ), 'aioseop_metaboxes', 'normal', 'core' );
4801
- if ( AIOSEOPPRO ) {
4802
- add_meta_box( 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ), array(
4803
  'aiosp_metaboxes',
4804
  'display_extra_metaboxes',
4805
- ), 'aioseop_metaboxes', 'side', 'core' );
 
 
 
 
 
 
 
 
4806
  } else {
4807
- add_meta_box( 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ) . "<span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . " <b>" . AIOSEOP_VERSION . '</b></span>', array(
 
 
 
 
 
 
 
 
4808
  'aiosp_metaboxes',
4809
  'display_extra_metaboxes',
4810
- ), 'aioseop_metaboxes', 'side', 'core' );
4811
- }
4812
- add_meta_box( 'aioseop-support', __( 'Support', 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>', array(
4813
- 'aiosp_metaboxes',
4814
- 'display_extra_metaboxes',
4815
- ), 'aioseop_metaboxes', 'side', 'core' );
4816
 
4817
  add_action( 'aioseop_modules_add_menus', array( $this, 'add_menu' ), 5 );
4818
  do_action( 'aioseop_modules_add_menus', $file );
@@ -4843,10 +4873,12 @@ EOF;
4843
  }
4844
  add_meta_box( $m[0]['id'], $title, $m[0]['callback'], $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m[0]['callback_args'] );
4845
  } elseif ( $tab_num > 1 ) {
4846
- add_meta_box( $m[0]['id'] . '_tabbed', $title, array(
4847
- $this,
4848
- 'display_tabbed_metabox',
4849
- ), $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m );
 
 
4850
  }
4851
  }
4852
  }
@@ -4931,14 +4963,15 @@ EOF;
4931
  * @return string
4932
  */
4933
  public function filter_description( $value, $truncate = false ) {
4934
- if ( preg_match( '/5.2[\s\S]+/', PHP_VERSION ) )
4935
  $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
 
4936
  // Decode entities
4937
  $value = $this->html_entity_decode( $value );
4938
  $value = preg_replace(
4939
  array(
4940
  '#<a.*?>([^>]*)</a>#i', // Remove link but keep anchor text
4941
- '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@',// Remove URLs
4942
  ),
4943
  array(
4944
  '$1', // Replacement link's anchor text.
@@ -4953,46 +4986,47 @@ EOF;
4953
  // Internal whitespace trim.
4954
  $value = preg_replace( '/\s\s+/u', ' ', $value );
4955
  // Truncate / crop
4956
- if ( ! empty( $truncate ) && $truncate )
4957
  $value = $this->trim_excerpt_without_filters( $value );
 
4958
  // Encode to valid SEO html entities
4959
  return $this->seo_entity_encode( $value );
4960
  }
4961
 
4962
  /**
4963
- * Returns string with decoded html entities.
4964
- * - Custom html_entity_decode supported on PHP 5.2
4965
- *
4966
- * @since 2.3.14
4967
- * @since 2.3.14.2 Hot fix on apostrophes.
4968
- * @since 2.3.16 &#039; Added to the list of apostrophes.
4969
- *
4970
- * @param string $value Value to decode.
4971
- *
4972
- * @return string
4973
- */
4974
- private function html_entity_decode( $value ) {
4975
- // Special conversions
4976
- $value = preg_replace(
4977
- array(
4978
- '/\“|\”|&#[xX]00022;|&#34;|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
4979
- .'|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;/', // Double quotes
4980
- '/&#039;|&#8217;|&apos;/', // Apostrophes
4981
- ),
4982
- array(
4983
- '"', // Double quotes
4984
- '\'', // Apostrophes
4985
- ),
4986
- $value
4987
- );
4988
- return html_entity_decode( $value );
4989
- }
4990
 
4991
  /**
4992
  * Returns SEO ready string with encoded HTML entitites.
4993
  *
4994
  * @since 2.3.14
4995
- * @since 2.3.14.1 Hot fix on apostrophes.
4996
  *
4997
  * @param string $value Value to encode.
4998
  *
@@ -5002,7 +5036,7 @@ EOF;
5002
  return preg_replace(
5003
  array(
5004
  '/\"|\“|\”|\„/', // Double quotes
5005
- '/\'|\’|\‘/', // Apostrophes
5006
  ),
5007
  array(
5008
  '&quot;', // Double quotes
80
 
81
  $this->help_text = array(
82
  'license_key' => __( 'This will be the license key received when the product was purchased. This is used for automatic upgrades.', 'all-in-one-seo-pack' ),
83
+ 'can' => __( 'This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by Google', 'all-in-one-seo-pack' ),
84
  'no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
85
  'customize_canonical_links' => __( 'Checking this option will allow you to customize Canonical URLs for specific posts.', 'all-in-one-seo-pack' ),
86
  'use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
103
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
104
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
105
  __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
106
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
107
  'page_title_format' =>
108
  __( 'This controls the format of the title tag for Pages.<br />The following macros are supported:', 'all-in-one-seo-pack' )
109
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
113
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
114
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
115
  __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
116
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
117
+ __( '%post_date% - The date the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
118
+ __( '%post_year% - The year the page was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
119
+ __( '%post_month% - The month the page was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
120
  'post_title_format' =>
121
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
122
  . '<li><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
123
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
125
  __( '%category_title% - The (main) category of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
126
+ __( '%1$category% - Alias for %2$category_title%', 'all-in-one-seo-pack' ) . '</li><li>' .
127
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
128
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
129
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
130
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
131
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
132
+ __( '%post_date% - The date the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
133
+ __( '%post_year% - The year the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
134
+ __( '%post_month% - The month the post was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
135
  'category_title_format' =>
136
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
137
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
167
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
168
  __( '%search% - What was searched for', 'all-in-one-seo-pack' ) . '</li></ul>',
169
  'description_format' => __( 'This controls the format of Meta Descriptions.The following macros are supported:', 'all-in-one-seo-pack' ) .
170
+ '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
171
+ __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
172
+ __( '%description% - This outputs the description you write for each page/post or the autogenerated description, if you have that option enabled. Auto-generated descriptions are generated from the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt.', 'all-in-one-seo-pack' ) . '</li><li>' .
173
+ __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
174
+ __( '%wp_title% - The original WordPress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '</li><li>' .
175
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
176
+ __( '%post_date% - The date the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
177
+ __( '%post_year% - The year the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
178
+ __( '%post_month% - The month the page/post was published (localized)', 'all-in-one-seo-pack' ) . '</li>',
179
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
180
+ '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
181
+ __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
182
+ __( '%request_url% - The original URL path, like "/url-that-does-not-exist/"', 'all-in-one-seo-pack' ) . '</li><li>' .
183
+ __( '%request_words% - The URL path in human readable form, like "Url That Does Not Exist"', 'all-in-one-seo-pack' ) . '</li><li>' .
184
+ __( '%404_title% - Additional 404 title input"', 'all-in-one-seo-pack' ) . '</li></ul>',
185
  'paged_format' => __( 'This string gets appended/prepended to titles of paged index pages (like home or archive pages).', 'all-in-one-seo-pack' )
186
+ . __( 'The following macros are supported:', 'all-in-one-seo-pack' )
187
+ . '<ul><li>' . __( '%page% - The page number', 'all-in-one-seo-pack' ) . '</li></ul>',
188
  'enablecpost' => __( 'Check this if you want to use All in One SEO Pack with any Custom Post Types on this site.', 'all-in-one-seo-pack' ),
189
  'cpostadvanced' => __( 'This will show or hide the advanced options for SEO for Custom Post Types.', 'all-in-one-seo-pack' ),
190
  'cpostactive' => __( 'Use these checkboxes to select which Post Types you want to use All in One SEO Pack with.', 'all-in-one-seo-pack' ),
226
  'tax_noindex' => __( 'Check this to ask search engines not to index custom Taxonomy archive pages. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
227
  'paginated_noindex' => __( 'Check this to ask search engines not to index paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
228
  'paginated_nofollow' => __( 'Check this to ask search engines not to follow links from paginated pages/posts. Useful for avoiding duplicate content.', 'all-in-one-seo-pack' ),
229
+ 'skip_excerpt' => __( 'This option will auto generate your meta descriptions from your post content instead of your post excerpt. This is useful if you want to use your content for your autogenerated meta descriptions instead of the excerpt. WooCommerce users should read the documentation regarding this setting.', 'all-in-one-seo-pack' ),
230
  'generate_descriptions' => __( 'Check this and your Meta Descriptions for any Post Type will be auto-generated using the Post Excerpt, or the first 320 characters of the post content if there is no Post Excerpt. You can overwrite any auto-generated Meta Description by editing the post or page.', 'all-in-one-seo-pack' ),
231
  'run_shortcodes' => __( 'Check this and shortcodes will get executed for descriptions auto-generated from content.', 'all-in-one-seo-pack' ),
232
  'hide_paginated_descriptions' => __( 'Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.', 'all-in-one-seo-pack' ),
299
  'ga_enhanced_ecommerce' => '#enhanced-ecommerce',
300
  'cpostnoindex' => '#noindex',
301
  'cpostnofollow' => '#nofollow',
302
+ 'category_noindex' => '#noindex-settings',
303
  'archive_date_noindex' => '#noindex-settings',
304
  'archive_author_noindex' => '#noindex-settings',
305
  'tags_noindex' => '#noindex-settings',
320
  'page_meta_tags' => '#additional-page-headers',
321
  'front_meta_tags' => '#additional-front-page-headers',
322
  'home_meta_tags' => '#additional-blog-page-headers',
323
+ 'snippet' => '#preview-snippet',
324
+ 'title' => '#title',
325
+ 'description' => '#description',
326
+ 'keywords' => '#keywords',
327
+ 'custom_link' => '#custom-canonical-url',
328
+ 'noindex' => '#robots-meta-noindex',
329
+ 'nofollow' => '#robots-meta-nofollow',
330
+ 'sitemap_exclude' => '#exclude-from-sitemap',
331
+ 'disable' => '#disable-on-this-post',
332
+ 'disable_analytics' => '#disable-google-analytics',
333
  );
334
 
335
  $meta_help_text = array(
851
  'default' => 0,
852
  ),
853
  'redirect_attachement_parent' => array(
854
+ 'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack' ),
855
  'default' => 0,
856
  ),
857
  'ex_pages' => array(
938
  'type' => 'html',
939
  'label' => 'none',
940
  'default' => '<a target="_blank" href="https://semperplugins.com/support/">'
941
+ . __( 'Support Forum', 'all-in-one-seo-pack' ) . '</a>',
942
  ),
943
  'snippet' => array(
944
  'name' => __( 'Preview Snippet', 'all-in-one-seo-pack' ),
1064
  'google_author_location',
1065
  'google_enable_publisher',
1066
  'google_specify_publisher',
1067
+ // "google_connect",
1068
  'google_analytics_id',
1069
  'ga_advanced_options',
1070
  'ga_domain',
1151
  add_action( 'all_admin_notices', array( $this, 'visibility_warning' ) );
1152
 
1153
  if ( ! AIOSEOPPRO ) {
1154
+ // add_action('all_admin_notices', array( $this, 'woo_upgrade_notice'));
1155
  }
1156
  }
1157
  if ( AIOSEOPPRO ) {
1159
  }
1160
  }
1161
 
1162
+ // good candidate for pro dir
 
1163
  /**
1164
  * Use custom callback for outputting snippet
1165
  *
1176
  $args['options']['nowrap'] = false;
1177
  $args['options']['save'] = false;
1178
  $info = $this->get_page_snippet_info();
1179
+ // @codingStandardsIgnoreStart
1180
  extract( $info );
1181
+ // @codingStandardsIgnoreEnd
1182
  } else {
1183
  return '';
1184
  }
1213
  if ( strpos( $title_format, '%current_date%' ) !== false ) {
1214
  $title_format = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $title_format );
1215
  }
1216
+ if ( strpos( $title_format, '%post_date%' ) !== false ) {
1217
  $title_format = str_replace( '%post_date%', get_the_date(), $title_format );
1218
  }
1219
+ if ( strpos( $title_format, '%post_year%' ) !== false ) {
1220
  $title_format = str_replace( '%post_year%', get_the_date( 'Y' ), $title_format );
1221
  }
1222
+ if ( strpos( $title_format, '%post_month%' ) !== false ) {
1223
  $title_format = str_replace( '%post_month%', get_the_date( 'F' ), $title_format );
1224
  }
1225
  if ( $w->is_category || $w->is_tag || $w->is_tax ) {
1279
  }
1280
 
1281
  $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( $description ) );
1282
+ $args['value'] .= '<script>var aiosp_title_extra = ' . (int) $extra_title_len . ';</script>';
1283
  $buf = $this->get_option_row( $args['name'], $args['options'], $args );
1284
 
1285
  return $buf;
1286
  }
1287
 
1288
+ // good candidate for pro dir
 
1289
  /**
1290
  * @return array
1291
  */
1344
  $description = $this->get_main_description( $post );
1345
 
1346
  // All this needs to be in it's own function (class really)
 
1347
  if ( empty( $title_format ) ) {
1348
  if ( is_page() ) {
1349
  $title_format = $aioseop_options['aiosp_page_title_format'];
1360
  if ( count( $categories ) > 0 ) {
1361
  $category = $categories[0];
1362
  }
1363
+ } elseif ( is_object( $term ) ) {
1364
  if ( 'category' === $_GET['taxonomy'] ) {
1365
  query_posts( array( 'cat' => $_GET['tag_ID'] ) );
1366
+ } elseif ( 'post_tag' === $_GET['taxonomy'] ) {
1367
  query_posts( array( 'tag' => $term->slug ) );
1368
  } else {
1369
+ query_posts(
1370
+ array(
1371
+ 'page' => '',
1372
+ $_GET['taxonomy'] => $term->slug,
1373
+ 'post_type' => $_GET['post_type'],
1374
+ )
1375
+ );
1376
  }
1377
  if ( empty( $this->meta_opts ) ) {
1378
  $this->meta_opts = $this->get_current_options( array(), 'aiosp' );
1388
  }
1389
  $description = $this->internationalize( $description );
1390
  }
1391
+ if ( $this->is_front_page == true ) {
1392
+ // $title_format = $aioseop_options['aiosp_home_page_title_format'];
1393
  $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.
1394
  }
1395
  $show_page = true;
1464
  * @return array
1465
  */
1466
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
1467
+ if ( ( 'aiosp' === $location ) && ( 'metabox' == $this->locations[ $location ]['type'] ) ) {
1468
  if ( null === $post ) {
1469
  global $post;
1470
  }
1520
  }
1521
  }
1522
  }
 
1523
  }
1524
  $opts = wp_parse_args( $opts, $get_opts );
1525
 
1640
 
1641
  }
1642
 
1643
+ return $this->paged_title( $title ); // this is returned for woo
1644
+ } elseif ( is_attachment() ) {
1645
  if ( null === $post ) {
1646
  return false;
1647
  }
1658
  $title = apply_filters( 'aioseop_attachment_title', $this->internationalize( $this->apply_post_title_format( $title, '', $post ) ) );
1659
 
1660
  return $title;
1661
+ } elseif ( is_page() || $this->is_static_posts_page() || ( is_home() && ! $this->is_static_posts_page() ) ) {
1662
  if ( null === $post ) {
1663
  return false;
1664
  }
1699
 
1700
  return $title;
1701
  }
1702
+ } elseif ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
1703
  // Too far down? -mrt.
1704
  $title = $this->internationalize( get_post_meta( $post->ID, '_aioseop_title', true ) );
1705
  if ( ! $title ) {
1713
  $title = apply_filters( 'aioseop_title_page', $title );
1714
 
1715
  return $title;
1716
+ } elseif ( is_single() ) {
1717
  // We're not in the loop :(.
1718
  if ( null === $post ) {
1719
  return false;
1739
  $title = $this->paged_title( $title );
1740
 
1741
  return apply_filters( 'aioseop_title_single', $title );
1742
+ } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
1743
  $search = esc_attr( stripslashes( $s ) );
1744
  $title_format = $aioseop_options['aiosp_search_title_format'];
1745
  $title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1752
  $title = $this->paged_title( $title );
1753
 
1754
  return $title;
1755
+ } elseif ( is_tag() ) {
1756
  global $utw;
1757
  $tag = $tag_description = '';
1758
  if ( $utw ) {
1803
 
1804
  return $title;
1805
  }
1806
+ } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
1807
  return $this->get_tax_title();
1808
+ } elseif ( isset( $STagging ) && $STagging->is_tag_view() ) { // Simple tagging support.
1809
  $tag = $STagging->search_tag;
1810
  if ( $tag ) {
1811
  $title_format = $aioseop_options['aiosp_tag_title_format'];
1820
 
1821
  return $title;
1822
  }
1823
+ } elseif ( is_archive() || is_post_type_archive() ) {
1824
  if ( is_author() ) {
1825
  $author = $this->internationalize( $this->get_original_title( '', false ) );
1826
  $title_format = $aioseop_options['aiosp_author_title_format'];
1827
  $new_title = str_replace( '%author%', $author, $title_format );
1828
+ } elseif ( is_date() ) {
1829
  global $wp_query;
1830
  $date = $this->internationalize( $this->get_original_title( '', false ) );
1831
  $title_format = $aioseop_options['aiosp_date_title_format'];
1849
  if ( strpos( $new_title, '%year%' ) !== false ) {
1850
  $new_title = str_replace( '%year%', get_query_var( 'year' ), $new_title );
1851
  }
1852
+ } elseif ( is_post_type_archive() ) {
1853
  if ( empty( $title ) ) {
1854
  $title = $this->get_original_title( '', false );
1855
  }
1865
  $title = $this->paged_title( $title );
1866
 
1867
  return $title;
1868
+ } elseif ( is_404() ) {
1869
  $title_format = $aioseop_options['aiosp_404_title_format'];
1870
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1871
  if ( strpos( $new_title, '%blog_description%' ) !== false ) {
1907
  $seplocation = 'right';
1908
  }
1909
  $title = wp_title( $sep, $echo, $seplocation );
1910
+ if ( false !== $has_filter ) {
1911
  add_filter( 'wp_title', array( $this, 'wp_title' ), $has_filter );
1912
  }
1913
  if ( $title && ( $title = trim( $title ) ) ) {
1922
 
1923
  if ( is_home() ) {
1924
  $title = get_option( 'blogname' );
1925
+ } elseif ( is_single() ) {
1926
  $title = $this->internationalize( single_post_title( '', false ) );
1927
+ } elseif ( is_search() && isset( $s ) && ! empty( $s ) ) {
1928
  $search = esc_attr( stripslashes( $s ) );
1929
  $title = $search;
1930
+ } elseif ( ( is_tax() || is_category() ) && ! is_feed() ) {
1931
  $category_name = $this->ucwords( $this->internationalize( single_cat_title( '', false ) ) );
1932
  $title = $category_name;
1933
+ } elseif ( is_page() ) {
1934
  $title = $this->internationalize( single_post_title( '', false ) );
1935
+ } elseif ( is_tag() ) {
1936
  global $utw;
1937
  if ( $utw ) {
1938
  $tags = $utw->GetCurrentTagSet();
1945
  if ( $tag ) {
1946
  $title = $tag;
1947
  }
1948
+ } elseif ( is_author() ) {
1949
  $author = get_userdata( get_query_var( 'author' ) );
1950
  if ( $author === false ) {
1951
  global $wp_query;
1954
  if ( $author !== false ) {
1955
  $title = $author->display_name;
1956
  }
1957
+ } elseif ( is_day() ) {
1958
  $title = get_the_date();
1959
+ } elseif ( is_month() ) {
1960
  $title = get_the_date( 'F, Y' );
1961
+ } elseif ( is_year() ) {
1962
  $title = get_the_date( 'Y' );
1963
+ } elseif ( is_archive() ) {
1964
  $title = $this->internationalize( post_type_archive_title( '', false ) );
1965
+ } elseif ( is_404() ) {
1966
  $title_format = $aioseop_options['aiosp_404_title_format'];
1967
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1968
  if ( strpos( $new_title, '%blog_description%' ) !== false ) {
2024
  }
2025
 
2026
  /**
2027
+ * Replace title templates inside % symbol.
2028
+ *
2029
  * @param $title
2030
  * @param $post
2031
  * @param string $type
2082
  if ( strpos( $new_title, "%{$type}_author_lastname%" ) !== false ) {
2083
  $new_title = str_replace( "%{$type}_author_lastname%", $this->ucwords( $authordata->last_name ), $new_title );
2084
  }
2085
+ if ( strpos( $new_title, '%current_date%' ) !== false ) {
2086
  $new_title = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $new_title );
2087
  }
2088
+ if ( strpos( $new_title, '%post_date%' ) !== false ) {
2089
  $new_title = str_replace( '%post_date%', get_the_date(), $new_title );
2090
  }
2091
+ if ( strpos( $new_title, '%post_year%' ) !== false ) {
2092
  $new_title = str_replace( '%post_year%', get_the_date( 'Y' ), $new_title );
2093
  }
2094
+ if ( strpos( $new_title, '%post_month%' ) !== false ) {
2095
  $new_title = str_replace( '%post_month%', get_the_date( 'F' ), $new_title );
2096
  }
2097
 
2151
  */
2152
  function log( $message ) {
2153
  if ( $this->do_log ) {
2154
+ // @codingStandardsIgnoreStart
2155
  @error_log( date( 'Y-m-d H:i:s' ) . ' ' . $message . "\n", 3, $this->log_file );
2156
+ // @codingStandardsIgnoreEnd
2157
  }
2158
  }
2159
 
2187
  return false;
2188
  }
2189
  $title_format = "%{$title_type}_title% | %blog_title%";
2190
+ if ( isset( $aioseop_options[ "aiosp_{$title_type}_title_format" ] ) ) {
2191
+ $title_format = $aioseop_options[ "aiosp_{$title_type}_title_format" ];
2192
  }
2193
  if ( ! empty( $aioseop_options['aiosp_enablecpost'] ) && ! empty( $aioseop_options['aiosp_cpostactive'] ) ) {
2194
  $wp_post_types = $aioseop_options['aiosp_cpostactive'];
2195
  if ( ! empty( $aioseop_options['aiosp_cposttitles'] ) ) {
2196
  if ( ( ( $title_type == 'archive' ) && is_post_type_archive( $wp_post_types ) && $prefix = "aiosp_{$title_type}_" ) ||
2197
+ ( ( $title_type == 'post' ) && $this->is_singular( $wp_post_types, $p ) && $prefix = 'aiosp_' )
2198
  ) {
2199
  $post_type = get_post_type( $p );
2200
+ if ( ! empty( $aioseop_options[ "{$prefix}{$post_type}_title_format" ] ) ) {
2201
+ $title_format = $aioseop_options[ "{$prefix}{$post_type}_title_format" ];
2202
  }
2203
  }
2204
  }
2290
  }
2291
 
2292
  // Handle prev / next links.
 
2293
  /**
2294
  *
2295
  * Gets taxonomy name.
2298
  *
2299
  * @since 2.3.10 Remove option for capitalize categories. We still respect the option,
2300
  * and the default (true) or a legacy option in the db can be overridden with the new filter hook aioseop_capitalize_categories
2301
+ * @since 2.3.15 Remove category capitalization completely
2302
  *
2303
  * @return mixed|void
2304
  */
2389
  if ( empty( $tax ) ) {
2390
  $tax = get_query_var( 'taxonomy' );
2391
  }
2392
+ if ( ! empty( $aioseop_options[ "aiosp_{$tax}_tax_title_format" ] ) ) {
2393
+ $title_format = $aioseop_options[ "aiosp_{$tax}_tax_title_format" ];
2394
  }
2395
  }
2396
  if ( empty( $title_format ) ) {
2449
  $description = '';
2450
  if ( is_author() && $this->show_page_description() ) {
2451
  $description = $this->internationalize( get_the_author_meta( 'description' ) );
2452
+ } elseif ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
2453
  // $description = $this->get_post_description( $post );
2454
  // $description = $this->apply_cf_fields( $description );
2455
  if ( ! ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ) {
2456
  $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2457
+ } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && ! empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2458
  // $description = $this->get_aioseop_description( $post );
2459
  $description = trim( $this->internationalize( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
2460
+ } elseif ( wc_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
2461
  $description = $this->get_aioseop_description( $post );
2462
  }
2463
+ } elseif ( is_front_page() ) {
2464
  $description = $this->get_aioseop_description( $post );
2465
+ } elseif ( is_single() || is_page() || is_attachment() || is_home() || $this->is_static_posts_page() ) {
2466
  $description = $this->get_aioseop_description( $post );
2467
+ } elseif ( ( is_category() || is_tag() || is_tax() ) && $this->show_page_description() ) {
2468
  if ( ! empty( $opts ) && AIOSEOPPRO ) {
2469
  $description = $opts['aiosp_description'];
2470
  }
2480
  $aioseop_desc = get_post_meta( $post->ID, '_aioseop_description', true );
2481
  }
2482
 
2483
+ if ( empty( $aioseop_desc ) && 'on' === $aioseop_options['aiosp_generate_descriptions'] && empty( $aioseop_options['aiosp_dont_truncate_descriptions'] ) ) {
2484
  $truncate = true;
2485
  }
2486
 
2700
  $link = get_tag_link( $tag->term_id );
2701
  }
2702
  } elseif ( $query->is_day && $haspost ) {
2703
+ $link = get_day_link(
2704
+ get_query_var( 'year' ),
2705
  get_query_var( 'monthnum' ),
2706
+ get_query_var( 'day' )
2707
+ );
2708
  } elseif ( $query->is_month && $haspost ) {
2709
+ $link = get_month_link(
2710
+ get_query_var( 'year' ),
2711
+ get_query_var( 'monthnum' )
2712
+ );
2713
  } elseif ( $query->is_year && $haspost ) {
2714
  $link = get_year_link( get_query_var( 'year' ) );
2715
  } elseif ( $query->is_tax && $haspost ) {
2985
  function add_page_icon() {
2986
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
2987
  wp_enqueue_style( 'wp-pointer' );
2988
+ // $this->add_admin_pointers();
 
2989
  wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css', array(), AIOSEOP_VERSION );
2990
  ?>
2991
  <script>
3020
  var admin_pointer;
3021
  var admin_index;
3022
  <?php
3023
+ foreach ( $this->pointers as $k => $p ) {
3024
+ if ( ! empty( $p['pointer_scope'] ) && ( 'global' === $p['pointer_scope'] ) ) {
3025
+ ?>
3026
+ admin_index = "<?php echo esc_attr( $k ); ?>";
3027
+ admin_pointer = <?php echo json_encode( $p ); ?>;
3028
+ aioseop_show_pointer(admin_index, admin_pointer);
3029
+ <?php
3030
+ }
3031
  }
3032
+ ?>
3033
  });
3034
  }
3035
+ <?php } ?>
3036
  </script>
3037
  <?php
3038
  }
3047
  $this->pointers['aioseop_menu_2640'] = array(
3048
  'pointer_target' => "#toplevel_page_all-in-one-seo-pack$pro-aioseop_class",
3049
  'pointer_text' => '<h3>' . __( 'Review Your Settings', 'all-in-one-seo-pack' )
3050
+ . '</h3><p>' . sprintf( __( 'Welcome to version %s. Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION ) . '</p>',
3051
  'pointer_edge' => 'top',
3052
  'pointer_align' => 'left',
3053
  'pointer_scope' => 'global',
3056
  $this->pointers['aioseop_menu_2361'] = array(
3057
  'pointer_target' => '#aioseop_top_button',
3058
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3059
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3060
  'pointer_edge' => 'top',
3061
  'pointer_align' => 'left',
3062
  'pointer_scope' => 'global',
3064
  $this->pointers['aioseop_welcome_230'] = array(
3065
  'pointer_target' => '#aioseop_top_button',
3066
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3067
+ . '</h3><p>' . __( 'New in 2.4: Improved support for taxonomies, Woocommerce and massive performance improvements under the hood! Please review your settings on each options page!', 'all-in-one-seo-pack' ) . '</p>',
3068
  'pointer_edge' => 'bottom',
3069
  'pointer_align' => 'left',
3070
  'pointer_scope' => 'local',
3074
  $this->pointers['aioseop_menu_2205'] = array(
3075
  'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
3076
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3077
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3078
  'pointer_edge' => 'top',
3079
  'pointer_align' => 'left',
3080
  'pointer_scope' => 'global',
3082
  $this->pointers['aioseop_welcome_220534'] = array(
3083
  'pointer_target' => '#aioseop_top_button',
3084
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3085
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New since 2.2: Control who accesses your site with the new Robots.txt Editor and File Editor modules! Enable them from the Feature Manager. Remember to review your settings, we have added some new ones!', 'all-in-one-seo-pack' ) . '</p>',
3086
  'pointer_edge' => 'bottom',
3087
  'pointer_align' => 'left',
3088
  'pointer_scope' => 'local',
3148
  $this->default_options['google_author_location']['initial_options'] = array_merge( array( 'front' => __( 'Front Page', 'all-in-one-seo-pack' ) ), $post_types, array( 'all' => __( 'Everywhere Else', 'all-in-one-seo-pack' ) ) );
3149
  $this->default_options['google_author_location']['default'] = array_keys( $this->default_options['google_author_location']['initial_options'] );
3150
 
3151
+ foreach ( $all_post_types as $p => $pt ) {
3152
  $field = $p . '_title_format';
3153
  $name = $post_objs[ $p ]->labels->singular_name;
3154
  if ( ! isset( $this->default_options[ $field ] ) ) {
3165
  ),
3166
  );
3167
  $this->help_text[ $field ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' )
3168
+ . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
3169
+ __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
3170
+ __( '%post_title% - The original title of the post.', 'all-in-one-seo-pack' ) . '</li><li>';
3171
  $taxes = get_object_taxonomies( $p, 'objects' );
3172
  if ( ! empty( $taxes ) ) {
3173
  foreach ( $taxes as $n => $t ) {
3174
+ $this->help_text[ $field ] .= sprintf( __( "%%tax_%1\$s%% - This post's associated %2\$s taxonomy title", 'all-in-one-seo-pack' ), $n, $t->label ) . '</li><li>';
3175
  }
3176
  }
3177
  $this->help_text[ $field ] .=
3179
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
3180
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3181
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li>' .
3182
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
3183
+ __( '%post_date% - The date the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
3184
+ __( '%post_year% - The year the post was published (localized)', 'all-in-one-seo-pack' ) . '</li><li>' .
3185
+ __( '%post_month% - The month the post was published (localized)', 'all-in-one-seo-pack' ) . '</li>' .
3186
+ '</ul>' .
3187
  '</ul>';
3188
  $this->help_anchors[ $field ] = '#custom-titles';
3189
  $this->layout['cpt']['options'][] = $field;
3222
  ),
3223
  );
3224
  $this->help_text[ $field ] = __( 'The following macros are supported:', 'all-in-one-seo-pack' ) .
3225
+ '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
3226
+ __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
3227
+ __( '%taxonomy_title% - The original title of the taxonomy', 'all-in-one-seo-pack' ) . '</li><li>' .
3228
+ __( '%taxonomy_description% - The description of the taxonomy', 'all-in-one-seo-pack' ) . '</li></ul>';
3229
  $this->help_anchors[ $field ] = '#custom-titles';
3230
  $this->layout['cpt']['options'][] = $field;
3231
  }
3236
 
3237
  if ( AIOSEOPPRO ) {
3238
  global $aioseop_update_checker;
3239
+ add_action(
3240
+ "{$this->prefix}update_options", array(
3241
+ $aioseop_update_checker,
3242
+ 'license_change_check',
3243
+ ), 10, 2
3244
+ );
3245
  add_action( "{$this->prefix}settings_update", array( $aioseop_update_checker, 'update_check' ), 10, 2 );
3246
  }
3247
 
3333
  $prefix = $this->prefix;
3334
 
3335
  foreach ( array( 'seopostcol', 'seocustptcol', 'debug_info', 'max_words_excerpt' ) as $opt ) {
3336
+ unset( $settings[ "{$prefix}$opt" ] );
3337
  }
3338
 
3339
  if ( ! class_exists( 'DOMDocument' ) ) {
3351
  if ( ! empty( $post ) ) {
3352
  $post_type = get_post_type( $post );
3353
  if ( ! empty( $this->options['aiosp_cpostnoindex'] ) && in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) {
3354
+ $settings[ "{$prefix}noindex" ]['type'] = 'select';
3355
+ $settings[ "{$prefix}noindex" ]['initial_options'] = array(
3356
  '' => __( 'Default - noindex', 'all-in-one-seo-pack' ),
3357
  'off' => __( 'index', 'all-in-one-seo-pack' ),
3358
  'on' => __( 'noindex', 'all-in-one-seo-pack' ),
3359
  );
3360
  }
3361
  if ( ! empty( $this->options['aiosp_cpostnofollow'] ) && in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) {
3362
+ $settings[ "{$prefix}nofollow" ]['type'] = 'select';
3363
+ $settings[ "{$prefix}nofollow" ]['initial_options'] = array(
3364
  '' => __( 'Default - nofollow', 'all-in-one-seo-pack' ),
3365
  'off' => __( 'follow', 'all-in-one-seo-pack' ),
3366
  'on' => __( 'nofollow', 'all-in-one-seo-pack' ),
3369
 
3370
  global $post;
3371
  $info = $this->get_page_snippet_info();
3372
+ // @codingStandardsIgnoreStart
3373
  extract( $info );
3374
+ // @codingStandardsIgnoreEnd
3375
+ $settings[ "{$prefix}title" ]['placeholder'] = $this->html_entity_decode( $title );
3376
+ $settings[ "{$prefix}description" ]['placeholder'] = $this->html_entity_decode( $description );
3377
+ $settings[ "{$prefix}keywords" ]['placeholder'] = $keywords;
3378
  }
3379
 
3380
  if ( ! AIOSEOPPRO ) {
3381
  if ( ! current_user_can( 'update_plugins' ) ) {
3382
+ unset( $settings[ "{$prefix}upgrade" ] );
3383
  }
3384
  }
3385
 
3388
  }
3389
 
3390
  if ( ! empty( $this->options[ $this->prefix . 'togglekeywords' ] ) ) {
3391
+ unset( $settings[ "{$prefix}keywords" ] );
3392
+ unset( $settings[ "{$prefix}togglekeywords" ] );
3393
+ } elseif ( ! empty( $current[ "{$prefix}togglekeywords" ] ) ) {
3394
+ unset( $settings[ "{$prefix}keywords" ] );
3395
  }
3396
  if ( empty( $this->options['aiosp_can'] ) || empty( $this->options['aiosp_customize_canonical_links'] ) ) {
3397
+ unset( $settings[ "{$prefix}custom_link" ] );
3398
  }
3399
  }
3400
 
3415
  $post_type = get_post_type( $post );
3416
  foreach ( array( 'noindex', 'nofollow' ) as $no ) {
3417
  if ( empty( $this->options[ 'aiosp_cpost' . $no ] ) || ( ! in_array( $post_type, $this->options[ 'aiosp_cpost' . $no ] ) ) ) {
3418
+ if ( isset( $options[ "{$prefix}{$no}" ] ) && ( $options[ "{$prefix}{$no}" ] != 'on' ) ) {
3419
+ unset( $options[ "{$prefix}{$no}" ] );
3420
  }
3421
  }
3422
  }
3424
  }
3425
  if ( $location == null ) {
3426
  $prefix = $this->prefix;
3427
+ if ( isset( $options[ "{$prefix}rewrite_titles" ] ) && ( ! empty( $options[ "{$prefix}rewrite_titles" ] ) ) ) {
3428
+ $options[ "{$prefix}rewrite_titles" ] = 1;
3429
  }
3430
+ if ( isset( $options[ "{$prefix}enablecpost" ] ) && ( $options[ "{$prefix}enablecpost" ] === '' ) ) {
3431
+ $options[ "{$prefix}enablecpost" ] = 0;
3432
  }
3433
+ if ( isset( $options[ "{$prefix}use_original_title" ] ) && ( $options[ "{$prefix}use_original_title" ] === '' ) ) {
3434
+ $options[ "{$prefix}use_original_title" ] = 0;
3435
  }
3436
  }
3437
 
3499
  if ( empty( $aioseop_options['aiosp_taxactive'] ) || ! in_array( 'post_tag', $aioseop_options['aiosp_taxactive'] ) ) {
3500
  return false;
3501
  }
3502
+ } elseif ( ! in_array( $post_type, $wp_post_types ) && ! is_front_page() && ! is_post_type_archive( $wp_post_types ) && ! is_404() ) {
3503
  return false;
3504
  }
3505
  } else {
3569
  return $header;
3570
  }
3571
 
3572
+ // Check if we're in the main query to support bad themes and plugins.
3573
  $old_wp_query = null;
3574
  if ( ! $wp_query->is_main_query() ) {
3575
  $old_wp_query = $wp_query;
3610
  }
3611
 
3612
  /**
3613
+ * Adds WordPress hooks.
3614
  *
3615
  * @since 2.3.13 #899 Adds filter:aioseop_description.
3616
  * @since 2.3.14 #593 Adds filter:aioseop_title.
3620
  global $aioseop_options, $aioseop_update_checker;
3621
 
3622
  // MOVED TO MAIN PLUGIN FILE IN ORDER TO FIRE SOONS
3623
+ // $role = get_role( 'administrator' );
3624
+ // if ( is_object( $role ) ) {
3625
+ // $role->add_cap( 'aiosp_manage_seo' );
3626
+ // }
 
3627
  aioseop_update_settings_check();
3628
  add_filter( 'user_contactmethods', 'aioseop_add_contactmethods' );
3629
  if ( is_user_logged_in() && is_admin_bar_showing() && current_user_can( 'aiosp_manage_seo' ) ) {
3639
  if ( current_user_can( 'update_plugins' ) ) {
3640
  add_action( 'admin_notices', array( $aioseop_update_checker, 'key_warning' ) );
3641
  }
3642
+ add_action(
3643
+ 'after_plugin_row_' . AIOSEOP_PLUGIN_BASENAME, array(
3644
+ $aioseop_update_checker,
3645
+ 'add_plugin_row',
3646
+ )
3647
+ );
3648
  }
3649
  } else {
3650
  if ( $aioseop_options['aiosp_can'] == '1' || $aioseop_options['aiosp_can'] == 'on' ) {
3668
 
3669
  if ( '0' == get_option( 'blog_public' ) && empty( $aioseop_visibility_notice_dismissed ) ) {
3670
 
3671
+ printf(
3672
+ '
3673
  <div id="message" class="error notice is-dismissible aioseop-notice visibility-notice">
3674
  <p>
3675
  <strong>%1$s</strong>
3678
  </p>
3679
  </div>',
3680
  __( 'Warning: You\'re blocking access to search engines.', 'all-in-one-seo-pack' ),
3681
+ sprintf( __( 'You can %1$s click here%2$s to go to your reading settings and toggle your blog visibility.', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( admin_url( 'options-reading.php' ) ) ), '</a>' )
3682
+ );
3683
 
3684
  } elseif ( '1' == get_option( 'blog_public' ) && ! empty( $aioseop_visibility_notice_dismissed ) ) {
3685
  delete_user_meta( get_current_user_id(), 'aioseop_visibility_notice_dismissed' );
3692
 
3693
  if ( class_exists( 'WooCommerce' ) && empty( $aioseop_woo_upgrade_notice_dismissed ) && current_user_can( 'manage_options' ) ) {
3694
 
3695
+ printf(
3696
+ '
3697
  <div id="message" class="notice-info notice is-dismissible aioseop-notice woo-upgrade-notice">
3698
  <p>
3699
  <strong>%1$s</strong>
3702
  </p>
3703
  </div>',
3704
  __( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
3705
+ sprintf( __( '%1$s Upgrade%2$s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo' ) ), '</a>' )
3706
+ );
3707
 
3708
  } elseif ( ! class_exists( 'WooCommerce' ) && ! empty( $aioseop_woo_upgrade_notice_dismissed ) ) {
3709
  delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
3735
 
3736
  /**
3737
  * Adds meta description to AMP pages.
3738
+ *
3739
+ * @since 2.3.11.5
3740
  */
3741
  function amp_head() {
3742
  $post = $this->get_queried_object();
3762
  $desc_attr = apply_filters( 'aioseop_amp_description_attributes', $desc_attr );
3763
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
3764
  }
3765
+ if ( ! empty( $meta_string ) ) {
3766
+ echo $meta_string;
3767
+ }
3768
+ }
3769
 
3770
+ /**
3771
  * @since 2.3.14 #932 Removes filter "aioseop_description".
3772
+ */
3773
  function wp_head() {
3774
 
3775
  // Check if we're in the main query to support bad themes and plugins.
3794
  static $aioseop_dup_counter = 0;
3795
  $aioseop_dup_counter ++;
3796
  if ( $aioseop_dup_counter > 1 ) {
3797
+ echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %1$s filter. Called %2$s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
3798
  if ( ! empty( $old_wp_query ) ) {
3799
  // Change the query back after we've finished.
3800
  $GLOBALS['wp_query'] = $old_wp_query;
3829
  $save_posts = $posts;
3830
 
3831
  // This outputs robots meta tags and custom canonical URl on WooCommerce product archive page.
3832
+ // See Github issue https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/755.
3833
  if ( function_exists( 'wc_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = wc_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
3834
  global $posts;
3835
  $opts = $this->meta_opts = $this->get_current_options( array(), 'aiosp', null, $post );
3887
  'pinterest' => 'p:domain_verify',
3888
  ) as $k => $v
3889
  ) {
3890
+ if ( ! empty( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) {
3891
+ $meta_string .= '<meta name="' . $v . '" content="' . trim( strip_tags( $aioseop_options[ "aiosp_{$k}_verify" ] ) ) . '" />' . "\n";
3892
  }
3893
  }
3894
 
3899
  }
3900
  // Handle extra meta fields.
3901
  foreach ( array( 'page_meta', 'post_meta', 'home_meta', 'front_meta' ) as $meta ) {
3902
+ if ( ! empty( $aioseop_options[ "aiosp_{$meta}_tags" ] ) ) {
3903
+ $$meta = html_entity_decode( stripslashes( $aioseop_options[ "aiosp_{$meta}_tags" ] ), ENT_QUOTES );
3904
  } else {
3905
  $$meta = '';
3906
  }
4010
  $active_handlers = array();
4011
  }
4012
  if ( sizeof( $active_handlers ) > 0 &&
4013
+ $this->strtolower( $active_handlers[ sizeof( $active_handlers ) - 1 ] ) ==
4014
+ $this->strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' )
4015
  ) {
4016
  ob_end_flush();
4017
  } else {
4074
  if ( strpos( $description, '%current_date%' ) !== false ) {
4075
  $description = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $description );
4076
  }
4077
+ if ( strpos( $description, '%post_date%' ) !== false ) {
4078
  $description = str_replace( '%post_date%', get_the_date(), $description );
4079
  }
4080
+ if ( strpos( $description, '%post_year%' ) !== false ) {
4081
  $description = str_replace( '%post_year%', get_the_date( 'Y' ), $description );
4082
  }
4083
+ if ( strpos( $description, '%post_month%' ) !== false ) {
4084
  $description = str_replace( '%post_month%', get_the_date( 'F' ), $description );
4085
  }
4086
 
4087
+ /*
4088
+ This was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
4089
  *on the roadmap is to have a better hierarchy for attachment description pulling
4090
  * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
4091
  */
4092
+ $description = $this->apply_cf_fields( $description );
4093
  return $description;
4094
  }
4095
 
4096
  /**
4097
  * @return string
4098
+ * @since 0.0
4099
+ * @since 2.3.11.5 Added no index API filter hook for password protected posts.
4100
  */
4101
  function get_robots_meta() {
4102
  global $aioseop_options;
4115
  $noindex = 'index';
4116
  $nofollow = 'follow';
4117
  if ( ( is_category() && ! empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( ! is_category() && is_archive() && ! is_tag() && ! is_tax()
4118
+ && ( ( is_date() && ! empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) || ( is_author() && ! empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ) )
4119
+ || ( is_tag() && ! empty( $aioseop_options['aiosp_tags_noindex'] ) )
4120
+ || ( is_search() && ! empty( $aioseop_options['aiosp_search_noindex'] ) )
4121
+ || ( is_404() && ! empty( $aioseop_options['aiosp_404_noindex'] ) )
4122
+ || ( is_tax() && in_array( get_query_var( 'taxonomy' ), $tax_noindex ) )
4123
  ) {
4124
  $noindex = 'noindex';
4125
  } elseif ( is_single() || is_page() || $this->is_static_posts_page() || is_attachment() || is_category() || is_tag() || is_tax() || ( $page > 1 ) ) {
4129
  $aiosp_nofollow = htmlspecialchars( stripslashes( $opts['aiosp_nofollow'] ) );
4130
  }
4131
  if ( $aiosp_noindex || $aiosp_nofollow || ! empty( $aioseop_options['aiosp_cpostnoindex'] )
4132
+ || ! empty( $aioseop_options['aiosp_cpostnofollow'] ) || ! empty( $aioseop_options['aiosp_paginated_noindex'] ) || ! empty( $aioseop_options['aiosp_paginated_nofollow'] )
4133
  ) {
4134
  if ( ( $aiosp_noindex == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_noindex'] ) ) && $page > 1 ) ||
4135
+ ( ( $aiosp_noindex == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) )
4136
  ) {
4137
  $noindex = 'noindex';
4138
  }
4139
  if ( ( $aiosp_nofollow == 'on' ) || ( ( ! empty( $aioseop_options['aiosp_paginated_nofollow'] ) ) && $page > 1 ) ||
4140
+ ( ( $aiosp_nofollow == '' ) && ( ! empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) )
4141
  ) {
4142
  $nofollow = 'nofollow';
4143
  }
4144
  }
4145
  }
4146
+ if ( is_singular() && $this->is_password_protected() && apply_filters( 'aiosp_noindex_password_posts', false ) ) {
4147
+ $noindex = 'noindex';
4148
+ }
4149
 
4150
  $robots_meta = $noindex . ',' . $nofollow;
4151
  if ( $robots_meta == 'index,follow' ) {
4156
  }
4157
 
4158
  /**
4159
+ * Determine if post is password protected.
4160
+ * @since 2.3.11.5
4161
  * @return bool
4162
  */
4163
+ function is_password_protected() {
4164
+ global $post;
4165
 
4166
+ if ( ! empty( $post->post_password ) ) {
4167
+ return true;
4168
+ }
4169
 
4170
+ return false;
4171
 
4172
+ }
4173
 
4174
  /**
4175
  * @return mixed|void
4255
  }
4256
  if ( is_singular() && ( ! empty( $googleplus ) ) ) {
4257
  $author = $googleplus;
4258
+ } elseif ( ! empty( $aioseop_options['aiosp_google_publisher'] ) ) {
4259
  $author = $aioseop_options['aiosp_google_publisher'];
4260
  }
4261
 
4307
  }
4308
  }
4309
  }
4310
+ } elseif ( is_page() || is_single() ) {
4311
  $numpages = 1;
4312
  $multipage = 0;
4313
  $page = get_query_var( 'page' );
4370
  function validate_url_scheme( $url ) {
4371
 
4372
  // TODO we should check for the site setting in the case of auto.
 
4373
  global $aioseop_options;
4374
 
4375
  $scheme = apply_filters( 'aioseop_canonical_protocol', false );
4527
 
4528
  function admin_bar_menu() {
4529
 
 
4530
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
4531
  // API filter hook to disable showing SEO in admin bar.
4532
  return;
4533
  }
4534
 
 
4535
  global $wp_admin_bar, $aioseop_admin_menu, $post, $aioseop_options;
4536
 
4537
  $toggle = '';
4542
  $toggle = 'off';
4543
  }
4544
 
4545
+ if ( ( ! isset( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || ( ! empty( $aioseop_options['aiosp_admin_bar'] ) && 'off' !== $toggle ) || isset( $_POST['aiosp_admin_bar'] ) || true == apply_filters( 'aioseo_show_in_admin_bar', false ) ) {
4546
 
4547
  if ( apply_filters( 'aioseo_show_in_admin_bar', true ) === false ) {
4548
  // API filter hook to disable showing SEO in admin bar.
4559
  $url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
4560
  }
4561
 
4562
+ $wp_admin_bar->add_menu(
4563
+ array(
4564
+ 'id' => AIOSEOP_PLUGIN_DIRNAME,
4565
+ 'title' => __( 'SEO', 'all-in-one-seo-pack' ),
4566
+ 'href' => $url,
4567
+ )
4568
+ );
4569
 
4570
  if ( current_user_can( 'update_plugins' ) && ! AIOSEOPPRO ) {
4571
+ $wp_admin_bar->add_menu(
4572
+ array(
4573
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4574
+ 'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
4575
+ 'id' => 'aioseop-pro-upgrade',
4576
+ 'href' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
4577
+ 'meta' => array( 'target' => '_blank' ),
4578
+ )
4579
+ );
4580
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
4581
  }
4582
 
4596
  if ( ! empty( $current_object ) && ! empty( $current_object->post_type ) ) {
4597
  // Try the main query.
4598
  $edit_post_link = get_edit_post_link( $current_object->ID );
4599
+ $wp_admin_bar->add_menu(
4600
+ array(
4601
+ 'id' => 'aiosp_edit_' . $current_object->ID,
4602
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4603
+ 'title' => 'Edit SEO',
4604
+ 'href' => $edit_post_link . '#aiosp',
4605
+ )
4606
+ );
4607
  } else {
4608
  // Try the post object.
4609
+ $wp_admin_bar->add_menu(
4610
+ array(
4611
+ 'id' => 'aiosp_edit_' . $post->ID,
4612
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4613
+ 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4614
+ 'href' => get_edit_post_link( $post->ID ) . '#aiosp',
4615
+ )
4616
+ );
4617
  }
4618
  }
4619
 
4620
  if ( AIOSEOPPRO && ( is_category() || is_tax() || is_tag() ) ) {
4621
  // SEO for taxonomies are only available in Pro version.
4622
  $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy );
4623
+ $wp_admin_bar->add_menu(
4624
+ array(
4625
+ 'id' => 'aiosp_edit_' . $post->ID,
4626
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4627
+ 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4628
+ 'href' => $edit_term_link . '#aiosp',
4629
+ )
4630
+ );
4631
  }
 
 
4632
  }
4633
  }
4634
  }
4738
 
4739
  $this->update_options();
4740
 
 
4741
  /*
4742
+ For now we're removing admin pointers.
4743
  $this->add_admin_pointers();
4744
  if ( ! empty( $this->pointers ) ) {
4745
  foreach ( $this->pointers as $k => $p ) {
4757
  } else {
4758
  $custom_menu_order = false;
4759
  }
4760
+ } elseif ( isset( $_POST['Submit_Default'] ) || isset( $_POST['Submit_All_Default'] ) ) {
4761
  $custom_menu_order = true;
4762
  }
4763
  } else {
4785
 
4786
  if ( ! empty( $this->options['aiosp_enablecpost'] ) && $this->options['aiosp_enablecpost'] ) {
4787
  if ( AIOSEOPPRO ) {
4788
+ if ( is_array( $this->options['aiosp_cpostactive'] ) ) {
4789
+ $this->locations['aiosp']['display'] = $this->options['aiosp_cpostactive'];
4790
+ } else {
4791
  $this->locations['aiosp']['display'][] = $this->options['aiosp_cpostactive']; // Store as an array in case there are taxonomies to add also.
4792
  }
4793
 
4809
  $this->locations['aiosp']['display'] = array( 'post', 'page' );
4810
  }
4811
 
4812
+ add_menu_page(
4813
+ $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $file, array(
4814
+ $this,
4815
+ 'display_settings_page',
4816
+ )
4817
+ );
4818
 
4819
+ add_meta_box(
4820
+ 'aioseop-list', __( 'Join Our Mailing List', 'all-in-one-seo-pack' ), array(
 
 
 
 
 
 
 
 
 
4821
  'aiosp_metaboxes',
4822
  'display_extra_metaboxes',
4823
+ ), 'aioseop_metaboxes', 'normal', 'core'
4824
+ );
4825
+ if ( AIOSEOPPRO ) {
4826
+ add_meta_box(
4827
+ 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ), array(
4828
+ 'aiosp_metaboxes',
4829
+ 'display_extra_metaboxes',
4830
+ ), 'aioseop_metaboxes', 'side', 'core'
4831
+ );
4832
  } else {
4833
+ add_meta_box(
4834
+ 'aioseop-about', __( 'About', 'all-in-one-seo-pack' ) . "<span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>', array(
4835
+ 'aiosp_metaboxes',
4836
+ 'display_extra_metaboxes',
4837
+ ), 'aioseop_metaboxes', 'side', 'core'
4838
+ );
4839
+ }
4840
+ add_meta_box(
4841
+ 'aioseop-support', __( 'Support', 'all-in-one-seo-pack' ) . " <span class='Taha' style='float:right;'>" . __( 'Version', 'all-in-one-seo-pack' ) . ' <b>' . AIOSEOP_VERSION . '</b></span>', array(
4842
  'aiosp_metaboxes',
4843
  'display_extra_metaboxes',
4844
+ ), 'aioseop_metaboxes', 'side', 'core'
4845
+ );
 
 
 
 
4846
 
4847
  add_action( 'aioseop_modules_add_menus', array( $this, 'add_menu' ), 5 );
4848
  do_action( 'aioseop_modules_add_menus', $file );
4873
  }
4874
  add_meta_box( $m[0]['id'], $title, $m[0]['callback'], $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m[0]['callback_args'] );
4875
  } elseif ( $tab_num > 1 ) {
4876
+ add_meta_box(
4877
+ $m[0]['id'] . '_tabbed', $title, array(
4878
+ $this,
4879
+ 'display_tabbed_metabox',
4880
+ ), $m[0]['post_type'], $m[0]['context'], $m[0]['priority'], $m
4881
+ );
4882
  }
4883
  }
4884
  }
4963
  * @return string
4964
  */
4965
  public function filter_description( $value, $truncate = false ) {
4966
+ if ( preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
4967
  $value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
4968
+ }
4969
  // Decode entities
4970
  $value = $this->html_entity_decode( $value );
4971
  $value = preg_replace(
4972
  array(
4973
  '#<a.*?>([^>]*)</a>#i', // Remove link but keep anchor text
4974
+ '@(https?://([-\w\.]+[-\w])+(:\d+)?(/([\w/_\.#-]*(\?\S+)?[^\.\s])?)?)@', // Remove URLs
4975
  ),
4976
  array(
4977
  '$1', // Replacement link's anchor text.
4986
  // Internal whitespace trim.
4987
  $value = preg_replace( '/\s\s+/u', ' ', $value );
4988
  // Truncate / crop
4989
+ if ( ! empty( $truncate ) && $truncate ) {
4990
  $value = $this->trim_excerpt_without_filters( $value );
4991
+ }
4992
  // Encode to valid SEO html entities
4993
  return $this->seo_entity_encode( $value );
4994
  }
4995
 
4996
  /**
4997
+ * Returns string with decoded html entities.
4998
+ * - Custom html_entity_decode supported on PHP 5.2
4999
+ *
5000
+ * @since 2.3.14
5001
+ * @since 2.3.14.2 Hot fix on apostrophes.
5002
+ * @since 2.3.16 &#039; Added to the list of apostrophes.
5003
+ *
5004
+ * @param string $value Value to decode.
5005
+ *
5006
+ * @return string
5007
+ */
5008
+ private function html_entity_decode( $value ) {
5009
+ // Special conversions
5010
+ $value = preg_replace(
5011
+ array(
5012
+ '/\“|\”|&#[xX]00022;|&#34;|&[lLrRbB](dquo|DQUO)(?:[rR])?;|&#[xX]0201[dDeE];'
5013
+ . '|&[OoCc](pen|lose)[Cc]urly[Dd]ouble[Qq]uote;|&#822[012];|&#[xX]27;/', // Double quotes
5014
+ '/&#039;|&#8217;|&apos;/', // Apostrophes
5015
+ ),
5016
+ array(
5017
+ '"', // Double quotes
5018
+ '\'', // Apostrophes
5019
+ ),
5020
+ $value
5021
+ );
5022
+ return html_entity_decode( $value );
5023
+ }
5024
 
5025
  /**
5026
  * Returns SEO ready string with encoded HTML entitites.
5027
  *
5028
  * @since 2.3.14
5029
+ * @since 2.3.14.1 Hot fix on apostrophes.
5030
  *
5031
  * @param string $value Value to encode.
5032
  *
5036
  return preg_replace(
5037
  array(
5038
  '/\"|\“|\”|\„/', // Double quotes
5039
+ '/\'|\’|\‘/', // Apostrophes
5040
  ),
5041
  array(
5042
  '&quot;', // Double quotes
all_in_one_seo_pack.php CHANGED
@@ -1,504 +1,516 @@
1
- <?php
2
- /*
3
- Plugin Name: All In One SEO Pack
4
- Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
5
- Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007.
6
- Version: 2.4.5.1
7
- Author: Michael Torbert
8
- Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
9
- Text Domain: all-in-one-seo-pack
10
- Domain Path: /i18n/
11
- */
12
-
13
- /*
14
- Copyright (C) 2007-2017 Michael Torbert, https://semperfiwebdesign.com
15
-
16
- This program is free software; you can redistribute it and/or modify
17
- it under the terms of the GNU General Public License as published by
18
- the Free Software Foundation; version 2 of the License.
19
-
20
- This program is distributed in the hope that it will be useful,
21
- but WITHOUT ANY WARRANTY; without even the implied warranty of
22
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
- GNU General Public License for more details.
24
-
25
- You should have received a copy of the GNU General Public License
26
- along with this program. If not, see <http://www.gnu.org/licenses/>.
27
- */
28
-
29
- /**
30
- * All in One SEO Pack.
31
- * The original WordPress SEO plugin.
32
- *
33
- * @package All-in-One-SEO-Pack
34
- * @version 2.4.5.1
35
- */
36
-
37
- if ( ! defined( 'AIOSEOPPRO' ) ) {
38
- define( 'AIOSEOPPRO', false );
39
- }
40
- if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
- define( 'AIOSEOP_VERSION', '2.4.5.1' );
42
- }
43
- global $aioseop_plugin_name;
44
- $aioseop_plugin_name = 'All in One SEO Pack';
45
-
46
- /*
47
- * DO NOT EDIT BELOW THIS LINE.
48
- */
49
-
50
- if ( ! defined( 'ABSPATH' ) ) {
51
- return;
52
- }
53
-
54
- if ( AIOSEOPPRO ) {
55
-
56
- add_action( 'admin_head', 'disable_all_in_one_free', 1 );
57
-
58
- }
59
-
60
- if ( ! function_exists( 'aiosp_add_cap' ) ) {
61
-
62
- function aiosp_add_cap() {
63
- /*
64
- TODO we should put this into an install script. We just need to make sure it runs soon enough and we need to make
65
- sure people updating from previous versions have access to it.
66
- */
67
-
68
- $role = get_role( 'administrator' );
69
- if ( is_object( $role ) ) {
70
- $role->add_cap( 'aiosp_manage_seo' );
71
- }
72
- }
73
- }
74
- add_action( 'plugins_loaded', 'aiosp_add_cap' );
75
-
76
- if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
77
- define( 'AIOSEOP_PLUGIN_NAME', $aioseop_plugin_name );
78
- }
79
-
80
- if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
81
- define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
82
- } elseif ( AIOSEOP_PLUGIN_DIR !== plugin_dir_path( __FILE__ ) ) {
83
-
84
- /*
85
- This is not a great message.
86
- add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
87
- __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
88
- $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
89
- */
90
-
91
- return;
92
- }
93
-
94
- if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) ) {
95
- define( 'AIOSEOP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
96
- }
97
- if ( ! defined( 'AIOSEOP_PLUGIN_DIRNAME' ) ) {
98
- define( 'AIOSEOP_PLUGIN_DIRNAME', dirname( AIOSEOP_PLUGIN_BASENAME ) );
99
- }
100
- if ( ! defined( 'AIOSEOP_PLUGIN_URL' ) ) {
101
- define( 'AIOSEOP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
102
- }
103
- if ( ! defined( 'AIOSEOP_PLUGIN_IMAGES_URL' ) ) {
104
- define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
105
- }
106
- if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
107
- define( 'AIOSEOP_BASELINE_MEM_LIMIT', 268435456 );
108
- } // 256MB
109
- if ( ! defined( 'WP_CONTENT_URL' ) ) {
110
- define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
111
- }
112
- if ( ! defined( 'WP_ADMIN_URL' ) ) {
113
- define( 'WP_ADMIN_URL', site_url() . '/wp-admin' );
114
- }
115
- if ( ! defined( 'WP_CONTENT_DIR' ) ) {
116
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
117
- }
118
- if ( ! defined( 'WP_PLUGIN_URL' ) ) {
119
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
120
- }
121
- if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
122
- define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
123
- }
124
-
125
- global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
126
- $aioseop_get_pages_start = $aioseop_admin_menu = 0;
127
-
128
- if ( AIOSEOPPRO ) {
129
- global $aioseop_update_checker;
130
- }
131
-
132
- $aioseop_options = get_option( 'aioseop_options' );
133
-
134
- $aioseop_mem_limit = @ini_get( 'memory_limit' );
135
-
136
- if ( ! function_exists( 'aioseop_convert_bytestring' ) ) {
137
- /**
138
- * @param $byte_string
139
- *
140
- * @return int
141
- */
142
- function aioseop_convert_bytestring( $byte_string ) {
143
- $num = 0;
144
- preg_match( '/^\s*([0-9.]+)\s*([KMGTPE])B?\s*$/i', $byte_string, $matches );
145
- if ( ! empty( $matches ) ) {
146
- $num = (float) $matches[1];
147
- switch ( strtoupper( $matches[2] ) ) {
148
- case 'E':
149
- $num *= 1024;
150
- case 'P':
151
- $num *= 1024;
152
- case 'T':
153
- $num *= 1024;
154
- case 'G':
155
- $num *= 1024;
156
- case 'M':
157
- $num *= 1024;
158
- case 'K':
159
- $num *= 1024;
160
- }
161
- }
162
-
163
- return intval( $num );
164
- }
165
- }
166
-
167
- if ( is_array( $aioseop_options ) && isset( $aioseop_options['modules'] ) && isset( $aioseop_options['modules']['aiosp_performance_options'] ) ) {
168
- $perf_opts = $aioseop_options['modules']['aiosp_performance_options'];
169
- if ( isset( $perf_opts['aiosp_performance_memory_limit'] ) ) {
170
- $aioseop_mem_limit = $perf_opts['aiosp_performance_memory_limit'];
171
- }
172
- if ( isset( $perf_opts['aiosp_performance_execution_time'] ) && ( '' !== $perf_opts['aiosp_performance_execution_time'] ) ) {
173
- @ini_set( 'max_execution_time', (int) $perf_opts['aiosp_performance_execution_time'] );
174
- @set_time_limit( (int) $perf_opts['aiosp_performance_execution_time'] );
175
- }
176
- } else {
177
- $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
178
- if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit < AIOSEOP_BASELINE_MEM_LIMIT ) ) {
179
- $aioseop_mem_limit = AIOSEOP_BASELINE_MEM_LIMIT;
180
- }
181
- }
182
-
183
- if ( ! empty( $aioseop_mem_limit ) ) {
184
- if ( ! is_int( $aioseop_mem_limit ) ) {
185
- $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
186
- }
187
- if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit <= AIOSEOP_BASELINE_MEM_LIMIT ) ) {
188
- @ini_set( 'memory_limit', $aioseop_mem_limit );
189
- }
190
- }
191
-
192
- $aiosp_activation = false;
193
- $aioseop_module_list = array(
194
- 'sitemap',
195
- 'opengraph',
196
- 'robots',
197
- 'file_editor',
198
- 'importer_exporter',
199
- 'bad_robots',
200
- 'performance',
201
- ); // list all available modules here
202
-
203
- if ( AIOSEOPPRO ) {
204
- $aioseop_module_list[] = 'video_sitemap';
205
- }
206
-
207
- if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
208
- add_action( 'admin_notices', create_function( '', 'echo "<div class=\'error\'>The All In One SEO Pack class is already defined";'
209
- . "if ( class_exists( 'ReflectionClass' ) ) { \$r = new ReflectionClass( 'All_in_One_SEO_Pack' ); echo ' in ' . \$r->getFileName(); } "
210
- . ' echo ", preventing All In One SEO Pack from loading.</div>";' ) );
211
-
212
- return;
213
- }
214
-
215
- if ( AIOSEOPPRO ) {
216
-
217
- require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
218
- $aiosp_update_url = 'https://semperplugins.com/upgrade_plugins.php';
219
- if( defined( 'AIOSEOP_UPDATE_URL' ) ) {
220
- $aiosp_update_url = AIOSEOP_UPDATE_URL;
221
- }
222
- $aioseop_update_checker = new SFWD_Update_Checker(
223
- $aiosp_update_url,
224
- __FILE__,
225
- 'aioseop'
226
- );
227
-
228
- $aioseop_update_checker->plugin_name = AIOSEOP_PLUGIN_NAME;
229
- $aioseop_update_checker->plugin_basename = AIOSEOP_PLUGIN_BASENAME;
230
- if ( ! empty( $aioseop_options['aiosp_license_key'] ) ) {
231
- $aioseop_update_checker->license_key = $aioseop_options['aiosp_license_key'];
232
- } else {
233
- $aioseop_update_checker->license_key = '';
234
- }
235
- $aioseop_update_checker->options_page = AIOSEOP_PLUGIN_DIRNAME . "/aioseop_class.php";
236
- $aioseop_update_checker->renewal_page = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
237
-
238
- $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
239
- }
240
-
241
-
242
- if ( ! function_exists( 'aioseop_activate' ) ) {
243
-
244
- function aioseop_activate() {
245
-
246
- //Check if we just got activated.
247
- global $aiosp_activation;
248
- if ( AIOSEOPPRO ) {
249
- global $aioseop_update_checker;
250
- }
251
- $aiosp_activation = true;
252
-
253
- // These checks might be duplicated in the function being called.
254
- if( ! is_network_admin() || !isset( $_GET['activate-multi'] ) ) {
255
- set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
256
- }
257
-
258
- delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
259
-
260
- if ( AIOSEOPPRO ) {
261
- $aioseop_update_checker->checkForUpdates();
262
- }
263
- }
264
- }
265
-
266
- add_action( 'plugins_loaded', 'aioseop_init_class' );
267
-
268
- if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
269
-
270
- add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
271
-
272
- /**
273
- * @param $actions
274
- * @param $plugin_file
275
- *
276
- * @return array
277
- */
278
- function aiosp_plugin_row_meta( $actions, $plugin_file ) {
279
-
280
-
281
- $action_links = array(
282
-
283
- 'settings' => array(
284
- 'label' => __( 'Feature Request/Bug Report', 'all-in-one-seo-pack' ),
285
- 'url' => 'https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new' )
286
-
287
- );
288
-
289
-
290
-
291
- return aiosp_action_links( $actions, $plugin_file, $action_links, 'after' );
292
- }
293
- }
294
-
295
- if ( ! function_exists( 'aiosp_add_action_links' ) ) {
296
-
297
-
298
- add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'aiosp_add_action_links', 10, 2 );
299
-
300
- /**
301
- * @param $actions
302
- * @param $plugin_file
303
- *
304
- * @return array
305
- */
306
- function aiosp_add_action_links( $actions, $plugin_file ) {
307
- if ( ! is_array( $actions ) ) {
308
- return $actions;
309
- }
310
-
311
- $aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
312
- $action_links = array();
313
- $action_links = array(
314
- 'settings' => array(
315
- 'label' => __( 'SEO Settings', 'all-in-one-seo-pack' ),
316
- 'url' => get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/aioseop_class.php" ),
317
- ),
318
-
319
- 'forum' => array(
320
- 'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
321
- 'url' => 'https://semperplugins.com/support/',
322
- ),
323
-
324
- 'docs' => array(
325
- 'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
326
- 'url' => 'https://semperplugins.com/documentation/',
327
- ),
328
-
329
- );
330
-
331
- unset( $actions['edit'] );
332
-
333
- if ( ! AIOSEOPPRO ) {
334
- $action_links['proupgrade'] =
335
- array(
336
- 'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
337
- 'url' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
338
-
339
- );
340
- }
341
-
342
- return aiosp_action_links( $actions, $plugin_file, $action_links, 'before' );
343
- }
344
- }
345
-
346
- if ( ! function_exists( 'aiosp_action_links' ) ) {
347
-
348
- /**
349
- * @param $actions
350
- * @param $plugin_file
351
- * @param array $action_links
352
- * @param string $position
353
- *
354
- * @return array
355
- */
356
- function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
357
- static $plugin;
358
- if ( ! isset( $plugin ) ) {
359
- $plugin = plugin_basename( __FILE__ );
360
- }
361
- if ( $plugin === $plugin_file && ! empty( $action_links ) ) {
362
- foreach ( $action_links as $key => $value ) {
363
- $link = array( $key => '<a href="' . $value['url'] . '">' . $value['label'] . '</a>' );
364
- if ( 'after' === $position ) {
365
- $actions = array_merge( $actions, $link );
366
- } else {
367
- $actions = array_merge( $link, $actions );
368
- }
369
- }//foreach
370
- }// if
371
- return $actions;
372
- }
373
- }
374
-
375
- if ( ! function_exists( 'aioseop_init_class' ) ) {
376
- /**
377
- * Inits All-in-One-Seo plugin class.
378
- *
379
- * @since ?? // When was this added?
380
- * @since 2.3.12.3 Loads third party compatibility class.
381
- */
382
- function aioseop_init_class() {
383
- global $aiosp;
384
- load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
385
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
386
- require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
387
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_updates_class.php' );
388
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php' );
389
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/postedit.php' );
390
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/general-metaboxes.php' );
391
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aiosp_common.php' );
392
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
393
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
394
- require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
395
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/abstract/aiosep_compatible.php');
396
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-init.php');
397
- require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
398
- require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
399
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
400
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
401
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/menu.php' );
402
-
403
- $aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
404
-
405
- if ( AIOSEOPPRO ) {
406
- require_once( AIOSEOP_PLUGIN_DIR . 'pro/class-aio-pro-init.php' ); // Loads pro files and other pro init stuff.
407
- }
408
- aiosp_seometa_import(); // call importer functions... this should be moved somewhere better
409
-
410
- $aiosp = new All_in_One_SEO_Pack();
411
-
412
- $aioseop_updates = new AIOSEOP_Updates();
413
-
414
- if ( AIOSEOPPRO ) {
415
- $aioseop_pro_updates = new AIOSEOP_Pro_Updates();
416
- add_action( 'admin_init', array( $aioseop_pro_updates, 'version_updates' ), 12 );
417
- }
418
-
419
- add_action( 'admin_init', 'aioseop_welcome' );
420
-
421
- if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) ) {
422
- add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
423
- }
424
-
425
- add_action( 'init', array( $aiosp, 'add_hooks' ) );
426
- add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
427
-
428
- if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
429
- remove_action( 'init', array( $aiosp, 'add_hooks' ) );
430
- add_action( 'admin_init', 'aioseop_scan_post_header' );
431
- add_action( 'shutdown', 'aioseop_ajax_scan_header' ); // if the action doesn't run -- pdb
432
- include_once( ABSPATH . 'wp-admin/includes/screen.php' );
433
- global $current_screen;
434
- if ( class_exists( 'WP_Screen' ) ) {
435
- $current_screen = WP_Screen::get( 'front' );
436
- }
437
- }
438
- }
439
- }
440
-
441
-
442
-
443
- if ( ! function_exists( 'aioseop_welcome' ) ){
444
- function aioseop_welcome(){
445
- if( get_transient( '_aioseop_activation_redirect') ){
446
- $aioseop_welcome = new aioseop_welcome();
447
- delete_transient( '_aioseop_activation_redirect' );
448
- $aioseop_welcome->init( TRUE );
449
- }
450
-
451
- }
452
- }
453
-
454
- add_action( 'init', 'aioseop_load_modules', 1 );
455
- //add_action( 'after_setup_theme', 'aioseop_load_modules' );
456
-
457
- if ( is_admin() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
458
- add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
459
- add_action( 'wp_ajax_aioseop_ajax_save_url', 'aioseop_ajax_save_url' );
460
- add_action( 'wp_ajax_aioseop_ajax_delete_url', 'aioseop_ajax_delete_url' );
461
- add_action( 'wp_ajax_aioseop_ajax_scan_header', 'aioseop_ajax_scan_header' );
462
- if ( AIOSEOPPRO ) {
463
- add_action( 'wp_ajax_aioseop_ajax_facebook_debug', 'aioseop_ajax_facebook_debug' );
464
- }
465
- add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings' );
466
- add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links' );
467
- add_action( 'wp_ajax_aioseo_dismiss_yst_notice', 'aioseop_update_yst_detected_notice' );
468
- add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
469
- add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
470
- add_action( 'wp_ajax_aioseo_dismiss_sitemap_max_url_notice', 'aioseop_sitemap_max_url_notice_dismissed' );
471
- if ( AIOSEOPPRO ) {
472
- add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
473
- }
474
- }
475
-
476
- if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
477
- function aioseop_scan_post_header() {
478
- require_once( ABSPATH . WPINC . '/default-filters.php' );
479
- global $wp_query;
480
- $wp_query->query_vars['paged'] = 0;
481
- query_posts( 'post_type=post&posts_per_page=1' );
482
- if ( have_posts() ) {
483
- the_post();
484
- }
485
- }
486
- }
487
-
488
- require_once( AIOSEOP_PLUGIN_DIR . 'aioseop-init.php' );
489
-
490
- if ( ! function_exists( 'aioseop_install' ) ) {
491
- register_activation_hook( __FILE__, 'aioseop_install' );
492
-
493
- function aioseop_install() {
494
- aioseop_activate();
495
- }
496
- }
497
-
498
- if ( ! function_exists( 'disable_all_in_one_free' ) ) {
499
- function disable_all_in_one_free() {
500
- if ( AIOSEOPPRO && is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) {
501
- deactivate_plugins( 'all-in-one-seo-pack/all_in_one_seo_pack.php' );
502
- }
503
- }
504
- }
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ Plugin Name: All In One SEO Pack
5
+ Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
6
+ Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. More than 30 million downloads since 2007.
7
+ Version: 2.4.6
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
11
+ Domain Path: /i18n/
12
+ */
13
+
14
+ /*
15
+ Copyright (C) 2007-2017 Michael Torbert, https://semperfiwebdesign.com
16
+
17
+ This program is free software; you can redistribute it and/or modify
18
+ it under the terms of the GNU General Public License as published by
19
+ the Free Software Foundation; version 2 of the License.
20
+
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
+
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
28
+ */
29
+
30
+ /**
31
+ * All in One SEO Pack.
32
+ * The original WordPress SEO plugin.
33
+ *
34
+ * @package All-in-One-SEO-Pack
35
+ * @version 2.4.6
36
+ */
37
+
38
+ if ( ! defined( 'AIOSEOPPRO' ) ) {
39
+ define( 'AIOSEOPPRO', false );
40
+ }
41
+ if ( ! defined( 'AIOSEOP_VERSION' ) ) {
42
+ define( 'AIOSEOP_VERSION', '2.4.6' );
43
+ }
44
+ global $aioseop_plugin_name;
45
+ $aioseop_plugin_name = 'All in One SEO Pack';
46
+
47
+ /*
48
+ * DO NOT EDIT BELOW THIS LINE.
49
+ */
50
+
51
+ if ( ! defined( 'ABSPATH' ) ) {
52
+ return;
53
+ }
54
+
55
+ if ( AIOSEOPPRO ) {
56
+
57
+ add_action( 'admin_head', 'disable_all_in_one_free', 1 );
58
+
59
+ }
60
+
61
+ if ( ! function_exists( 'aiosp_add_cap' ) ) {
62
+
63
+ function aiosp_add_cap() {
64
+ /*
65
+ TODO we should put this into an install script. We just need to make sure it runs soon enough and we need to make
66
+ sure people updating from previous versions have access to it.
67
+ */
68
+
69
+ $role = get_role( 'administrator' );
70
+ if ( is_object( $role ) ) {
71
+ $role->add_cap( 'aiosp_manage_seo' );
72
+ }
73
+ }
74
+ }
75
+ add_action( 'plugins_loaded', 'aiosp_add_cap' );
76
+
77
+ if ( ! defined( 'AIOSEOP_PLUGIN_NAME' ) ) {
78
+ define( 'AIOSEOP_PLUGIN_NAME', $aioseop_plugin_name );
79
+ }
80
+
81
+ if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
82
+ define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
83
+ } elseif ( AIOSEOP_PLUGIN_DIR !== plugin_dir_path( __FILE__ ) ) {
84
+ /*
85
+ This is not a great message.
86
+ add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
87
+ __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
88
+ $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
89
+ */
90
+ return;
91
+ }
92
+
93
+ if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) ) {
94
+ define( 'AIOSEOP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
95
+ }
96
+ if ( ! defined( 'AIOSEOP_PLUGIN_DIRNAME' ) ) {
97
+ define( 'AIOSEOP_PLUGIN_DIRNAME', dirname( AIOSEOP_PLUGIN_BASENAME ) );
98
+ }
99
+ if ( ! defined( 'AIOSEOP_PLUGIN_URL' ) ) {
100
+ define( 'AIOSEOP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
101
+ }
102
+ if ( ! defined( 'AIOSEOP_PLUGIN_IMAGES_URL' ) ) {
103
+ define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
104
+ }
105
+ if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
106
+ define( 'AIOSEOP_BASELINE_MEM_LIMIT', 268435456 );
107
+ } // 256MB
108
+ if ( ! defined( 'WP_CONTENT_URL' ) ) {
109
+ define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
110
+ }
111
+ if ( ! defined( 'WP_ADMIN_URL' ) ) {
112
+ define( 'WP_ADMIN_URL', site_url() . '/wp-admin' );
113
+ }
114
+ if ( ! defined( 'WP_CONTENT_DIR' ) ) {
115
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
116
+ }
117
+ if ( ! defined( 'WP_PLUGIN_URL' ) ) {
118
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
119
+ }
120
+ if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
121
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
122
+ }
123
+
124
+ global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
125
+ $aioseop_get_pages_start = $aioseop_admin_menu = 0;
126
+
127
+ if ( AIOSEOPPRO ) {
128
+ global $aioseop_update_checker;
129
+ }
130
+
131
+ $aioseop_options = get_option( 'aioseop_options' );
132
+
133
+ // @codingStandardsIgnoreStart
134
+ $aioseop_mem_limit = @ini_get( 'memory_limit' );
135
+ // @codingStandardsIgnoreEnd
136
+
137
+ if ( ! function_exists( 'aioseop_convert_bytestring' ) ) {
138
+ /**
139
+ * @param $byte_string
140
+ *
141
+ * @return int
142
+ */
143
+ function aioseop_convert_bytestring( $byte_string ) {
144
+ $num = 0;
145
+ preg_match( '/^\s*([0-9.]+)\s*([KMGTPE])B?\s*$/i', $byte_string, $matches );
146
+ if ( ! empty( $matches ) ) {
147
+ $num = (float) $matches[1];
148
+ switch ( strtoupper( $matches[2] ) ) {
149
+ case 'E':
150
+ $num *= 1024;
151
+ // fall through.
152
+ case 'P':
153
+ $num *= 1024;
154
+ // fall through.
155
+ case 'T':
156
+ $num *= 1024;
157
+ // fall through.
158
+ case 'G':
159
+ $num *= 1024;
160
+ // fall through.
161
+ case 'M':
162
+ $num *= 1024;
163
+ // fall through.
164
+ case 'K':
165
+ $num *= 1024;
166
+ }
167
+ }
168
+
169
+ return intval( $num );
170
+ }
171
+ }
172
+
173
+ if ( is_array( $aioseop_options ) && isset( $aioseop_options['modules'] ) && isset( $aioseop_options['modules']['aiosp_performance_options'] ) ) {
174
+ $perf_opts = $aioseop_options['modules']['aiosp_performance_options'];
175
+ if ( isset( $perf_opts['aiosp_performance_memory_limit'] ) ) {
176
+ $aioseop_mem_limit = $perf_opts['aiosp_performance_memory_limit'];
177
+ }
178
+ if ( isset( $perf_opts['aiosp_performance_execution_time'] ) && ( '' !== $perf_opts['aiosp_performance_execution_time'] ) ) {
179
+ // @codingStandardsIgnoreStart
180
+ @ini_set( 'max_execution_time', (int) $perf_opts['aiosp_performance_execution_time'] );
181
+ @set_time_limit( (int) $perf_opts['aiosp_performance_execution_time'] );
182
+ // @codingStandardsIgnoreEnd
183
+ }
184
+ } else {
185
+ $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
186
+ if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit < AIOSEOP_BASELINE_MEM_LIMIT ) ) {
187
+ $aioseop_mem_limit = AIOSEOP_BASELINE_MEM_LIMIT;
188
+ }
189
+ }
190
+
191
+ if ( ! empty( $aioseop_mem_limit ) ) {
192
+ if ( ! is_int( $aioseop_mem_limit ) ) {
193
+ $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
194
+ }
195
+ if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit <= AIOSEOP_BASELINE_MEM_LIMIT ) ) {
196
+ // @codingStandardsIgnoreStart
197
+ @ini_set( 'memory_limit', $aioseop_mem_limit );
198
+ // @codingStandardsIgnoreEnd
199
+ }
200
+ }
201
+
202
+ $aiosp_activation = false;
203
+ $aioseop_module_list = array(
204
+ 'sitemap',
205
+ 'opengraph',
206
+ 'robots',
207
+ 'file_editor',
208
+ 'importer_exporter',
209
+ 'bad_robots',
210
+ 'performance',
211
+ ); // list all available modules here
212
+
213
+ if ( AIOSEOPPRO ) {
214
+ $aioseop_module_list[] = 'video_sitemap';
215
+ }
216
+
217
+ if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
218
+ add_action( 'admin_notices', 'admin_notices_already_defined' );
219
+ function admin_notices_already_defined() {
220
+ echo "<div class=\'error\'>The All In One SEO Pack class is already defined";
221
+ if ( class_exists( 'ReflectionClass' ) ) {
222
+ $_r = new ReflectionClass( 'All_in_One_SEO_Pack' );
223
+ echo ' in ' . $_r->getFileName();
224
+ }
225
+ echo ', preventing All In One SEO Pack from loading.</div>';
226
+ }
227
+
228
+ return;
229
+ }
230
+
231
+ if ( AIOSEOPPRO ) {
232
+
233
+ require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
234
+ $aiosp_update_url = 'https://semperplugins.com/upgrade_plugins.php';
235
+ if ( defined( 'AIOSEOP_UPDATE_URL' ) ) {
236
+ $aiosp_update_url = AIOSEOP_UPDATE_URL;
237
+ }
238
+ $aioseop_update_checker = new SFWD_Update_Checker(
239
+ $aiosp_update_url,
240
+ __FILE__,
241
+ 'aioseop'
242
+ );
243
+
244
+ $aioseop_update_checker->plugin_name = AIOSEOP_PLUGIN_NAME;
245
+ $aioseop_update_checker->plugin_basename = AIOSEOP_PLUGIN_BASENAME;
246
+ if ( ! empty( $aioseop_options['aiosp_license_key'] ) ) {
247
+ $aioseop_update_checker->license_key = $aioseop_options['aiosp_license_key'];
248
+ } else {
249
+ $aioseop_update_checker->license_key = '';
250
+ }
251
+ $aioseop_update_checker->options_page = AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class.php';
252
+ $aioseop_update_checker->renewal_page = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
253
+
254
+ $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
255
+ }
256
+
257
+
258
+ if ( ! function_exists( 'aioseop_activate' ) ) {
259
+
260
+ function aioseop_activate() {
261
+
262
+ // Check if we just got activated.
263
+ global $aiosp_activation;
264
+ if ( AIOSEOPPRO ) {
265
+ global $aioseop_update_checker;
266
+ }
267
+ $aiosp_activation = true;
268
+
269
+ // These checks might be duplicated in the function being called.
270
+ if ( ! is_network_admin() || ! isset( $_GET['activate-multi'] ) ) {
271
+ set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
272
+ }
273
+
274
+ delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
275
+
276
+ if ( AIOSEOPPRO ) {
277
+ $aioseop_update_checker->checkForUpdates();
278
+ }
279
+ }
280
+ }
281
+
282
+ add_action( 'plugins_loaded', 'aioseop_init_class' );
283
+
284
+ if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
285
+
286
+ add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
287
+
288
+ /**
289
+ * @param $actions
290
+ * @param $plugin_file
291
+ *
292
+ * @return array
293
+ */
294
+ function aiosp_plugin_row_meta( $actions, $plugin_file ) {
295
+
296
+ $action_links = array(
297
+
298
+ 'settings' => array(
299
+ 'label' => __( 'Feature Request/Bug Report', 'all-in-one-seo-pack' ),
300
+ 'url' => 'https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/new',
301
+ ),
302
+
303
+ );
304
+
305
+ return aiosp_action_links( $actions, $plugin_file, $action_links, 'after' );
306
+ }
307
+ }
308
+
309
+ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
310
+
311
+
312
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'aiosp_add_action_links', 10, 2 );
313
+
314
+ /**
315
+ * @param $actions
316
+ * @param $plugin_file
317
+ *
318
+ * @return array
319
+ */
320
+ function aiosp_add_action_links( $actions, $plugin_file ) {
321
+ if ( ! is_array( $actions ) ) {
322
+ return $actions;
323
+ }
324
+
325
+ $aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
326
+ $action_links = array();
327
+ $action_links = array(
328
+ 'settings' => array(
329
+ 'label' => __( 'SEO Settings', 'all-in-one-seo-pack' ),
330
+ 'url' => get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/aioseop_class.php" ),
331
+ ),
332
+
333
+ 'forum' => array(
334
+ 'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
335
+ 'url' => 'https://semperplugins.com/support/',
336
+ ),
337
+
338
+ 'docs' => array(
339
+ 'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
340
+ 'url' => 'https://semperplugins.com/documentation/',
341
+ ),
342
+
343
+ );
344
+
345
+ unset( $actions['edit'] );
346
+
347
+ if ( ! AIOSEOPPRO ) {
348
+ $action_links['proupgrade'] =
349
+ array(
350
+ 'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
351
+ 'url' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
352
+
353
+ );
354
+ }
355
+
356
+ return aiosp_action_links( $actions, $plugin_file, $action_links, 'before' );
357
+ }
358
+ }
359
+
360
+ if ( ! function_exists( 'aiosp_action_links' ) ) {
361
+
362
+ /**
363
+ * @param $actions
364
+ * @param $plugin_file
365
+ * @param array $action_links
366
+ * @param string $position
367
+ *
368
+ * @return array
369
+ */
370
+ function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
371
+ static $plugin;
372
+ if ( ! isset( $plugin ) ) {
373
+ $plugin = plugin_basename( __FILE__ );
374
+ }
375
+ if ( $plugin === $plugin_file && ! empty( $action_links ) ) {
376
+ foreach ( $action_links as $key => $value ) {
377
+ $link = array( $key => '<a href="' . $value['url'] . '">' . $value['label'] . '</a>' );
378
+ if ( 'after' === $position ) {
379
+ $actions = array_merge( $actions, $link );
380
+ } else {
381
+ $actions = array_merge( $link, $actions );
382
+ }
383
+ }//foreach
384
+ }// if
385
+ return $actions;
386
+ }
387
+ }
388
+
389
+ if ( ! function_exists( 'aioseop_init_class' ) ) {
390
+ /**
391
+ * Inits All-in-One-Seo plugin class.
392
+ *
393
+ * @since ?? // When was this added?
394
+ * @since 2.3.12.3 Loads third party compatibility class.
395
+ */
396
+ function aioseop_init_class() {
397
+ global $aiosp;
398
+ load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
399
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
400
+ require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
401
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_updates_class.php' );
402
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php' );
403
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/general-metaboxes.php' );
404
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aiosp_common.php' );
405
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
406
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
407
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
408
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/abstract/aiosep_compatible.php' );
409
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-init.php' );
410
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
411
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
412
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
413
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/dashboard_widget.php' );
414
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/menu.php' );
415
+
416
+ $aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
417
+
418
+ if ( AIOSEOPPRO ) {
419
+ require_once( AIOSEOP_PLUGIN_DIR . 'pro/class-aio-pro-init.php' ); // Loads pro files and other pro init stuff.
420
+ }
421
+ aiosp_seometa_import(); // call importer functions... this should be moved somewhere better
422
+
423
+ $aiosp = new All_in_One_SEO_Pack();
424
+
425
+ $aioseop_updates = new AIOSEOP_Updates();
426
+
427
+ if ( AIOSEOPPRO ) {
428
+ $aioseop_pro_updates = new AIOSEOP_Pro_Updates();
429
+ add_action( 'admin_init', array( $aioseop_pro_updates, 'version_updates' ), 12 );
430
+ }
431
+
432
+ add_action( 'admin_init', 'aioseop_welcome' );
433
+
434
+ if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) ) {
435
+ add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
436
+ }
437
+
438
+ add_action( 'init', array( $aiosp, 'add_hooks' ) );
439
+ add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
440
+
441
+ if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
442
+ remove_action( 'init', array( $aiosp, 'add_hooks' ) );
443
+ add_action( 'admin_init', 'aioseop_scan_post_header' );
444
+ add_action( 'shutdown', 'aioseop_ajax_scan_header' ); // if the action doesn't run -- pdb
445
+ include_once( ABSPATH . 'wp-admin/includes/screen.php' );
446
+ global $current_screen;
447
+ if ( class_exists( 'WP_Screen' ) ) {
448
+ $current_screen = WP_Screen::get( 'front' );
449
+ }
450
+ }
451
+ }
452
+ }
453
+
454
+
455
+
456
+ if ( ! function_exists( 'aioseop_welcome' ) ) {
457
+ function aioseop_welcome() {
458
+ if ( get_transient( '_aioseop_activation_redirect' ) ) {
459
+ $aioseop_welcome = new aioseop_welcome();
460
+ delete_transient( '_aioseop_activation_redirect' );
461
+ $aioseop_welcome->init( true );
462
+ }
463
+
464
+ }
465
+ }
466
+
467
+ add_action( 'init', 'aioseop_load_modules', 1 );
468
+ // add_action( 'after_setup_theme', 'aioseop_load_modules' );
469
+ if ( is_admin() || defined( 'AIOSEOP_UNIT_TESTING' ) ) {
470
+ add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
471
+ add_action( 'wp_ajax_aioseop_ajax_save_url', 'aioseop_ajax_save_url' );
472
+ add_action( 'wp_ajax_aioseop_ajax_delete_url', 'aioseop_ajax_delete_url' );
473
+ add_action( 'wp_ajax_aioseop_ajax_scan_header', 'aioseop_ajax_scan_header' );
474
+ if ( AIOSEOPPRO ) {
475
+ add_action( 'wp_ajax_aioseop_ajax_facebook_debug', 'aioseop_ajax_facebook_debug' );
476
+ }
477
+ add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings' );
478
+ add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links' );
479
+ add_action( 'wp_ajax_aioseo_dismiss_yst_notice', 'aioseop_update_yst_detected_notice' );
480
+ add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
481
+ add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
482
+ add_action( 'wp_ajax_aioseo_dismiss_sitemap_max_url_notice', 'aioseop_sitemap_max_url_notice_dismissed' );
483
+ if ( AIOSEOPPRO ) {
484
+ add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
485
+ }
486
+ }
487
+
488
+ if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
489
+ function aioseop_scan_post_header() {
490
+ require_once( ABSPATH . WPINC . '/default-filters.php' );
491
+ global $wp_query;
492
+ $wp_query->query_vars['paged'] = 0;
493
+ query_posts( 'post_type=post&posts_per_page=1' );
494
+ if ( have_posts() ) {
495
+ the_post();
496
+ }
497
+ }
498
+ }
499
+
500
+ require_once( AIOSEOP_PLUGIN_DIR . 'aioseop-init.php' );
501
+
502
+ if ( ! function_exists( 'aioseop_install' ) ) {
503
+ register_activation_hook( __FILE__, 'aioseop_install' );
504
+
505
+ function aioseop_install() {
506
+ aioseop_activate();
507
+ }
508
+ }
509
+
510
+ if ( ! function_exists( 'disable_all_in_one_free' ) ) {
511
+ function disable_all_in_one_free() {
512
+ if ( AIOSEOPPRO && is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) {
513
+ deactivate_plugins( 'all-in-one-seo-pack/all_in_one_seo_pack.php' );
514
+ }
515
+ }
516
+ }
css/aiosp_admin.css CHANGED
@@ -1,134 +1,134 @@
1
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
2
- background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
3
  }
4
 
5
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
6
- background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
7
  }
8
 
9
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image img {
10
- display: none;
11
  }
12
 
13
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
14
- display: none;
15
  }
16
 
17
  #adminmenu #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image:before {
18
- content: '';
19
  }
20
 
21
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image:before {
22
- content: '' !important;
23
  }
24
 
25
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-pro-aioseop_class.wp-has-current-submenu .wp-menu-image {
26
- background-position: 8px -26px !important;
27
  }
28
 
29
  #toplevel_page_all-in-one-seo-pack-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-aioseop_class.wp-has-current-submenu .wp-menu-image {
30
- background-position: 8px -26px !important;
31
  }
32
 
33
  #icon-aioseop.icon32 {
34
- background: url(../images/shield32.png) no-repeat left top !important;
35
  }
36
 
37
  #aioseop_settings_header #message {
38
- padding: 5px 0px 5px 50px;
39
- background-image: url(../images/update32.png);
40
- background-repeat: no-repeat;
41
- background-position: 10px;
42
- font-size: 14px;
43
- min-height: 32px;
44
- clear: none;
45
  }
46
 
47
  @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) {
48
 
49
- #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
50
- background-image: url('../images/shield-sprite-32.png') !important;
51
- -webkit-background-size: 16px 48px !important;
52
- -moz-background-size: 16px 48px !important;
53
- background-size: 16px 48px !important;
54
- }
55
-
56
- #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
57
- background-image: url('../images/shield-sprite-32.png') !important;
58
- -webkit-background-size: 16px 48px !important;
59
- -moz-background-size: 16px 48px !important;
60
- background-size: 16px 48px !important;
61
- }
62
-
63
- #icon-aioseop.icon32 {
64
- background-image: url('../images/shield64.png') !important;
65
- -webkit-background-size: 32px 32px !important;
66
- -moz-background-size: 32px 32px !important;
67
- background-size: 32px 32px !important;
68
- }
69
-
70
- #aioseop_settings_header #message {
71
- background-image: url(../images/update64.png) !important;
72
- -webkit-background-size: 32px 32px !important;
73
- -moz-background-size: 32px 32px !important;
74
- background-size: 32px 32px !important;
75
- }
76
  }
77
 
78
  .proupgrade a {
79
- font-weight: 900;
80
- color: #d54e21;
81
- font-size: 105%;
82
  }
83
 
84
  li#wp-admin-bar-aioseop-pro-upgrade a.ab-item {
85
- font-weight: 900;
86
- color: #d54e21 !important;
87
- font-size: 110%;
88
  }
89
 
90
  #aio-pro-update{
91
- font-weight: 900;
92
- color: #d54e21 !important;
93
- font-size: 110%;
94
  }
95
 
96
  /* Dashicons in sidebar */
97
 
98
  .aiosp-di .dashicons {
99
- margin:1px;
100
- line-height: 1;
101
- width: 42px;
102
- height:36px;
103
- color:#fff;
104
- padding:3px;
105
- vertical-align:middle;
106
  }
107
  .aiosp-di .dashicons:before {
108
- -webkit-font-smoothing:antialiased;
109
- font:400 30px/1 dashicons;
110
- line-height: 38px;
111
  }
112
  .aiosp-di .dashicons.di-facebook {
113
- margin:0;
114
  }
115
  .aiosp-di .dashicons.di-facebook:before {
116
- content:"\f304";
117
- font-size:52px;
118
  }
119
  .aiosp-di .dashicons.di-twitter:before {
120
- content:"\f301"
121
  }
122
  .aiosp-di .dashicons.di-facebook {
123
- color: #3B5998;
124
  }
125
  .aiosp-di .dashicons.di-twitter {
126
  width: 36px;
127
- background-color:#00aced;
128
- border-radius:2px;
129
  }
130
  .upgrade_menu_link {
131
- font-weight: 900;
132
- color: #d54e21;
133
- font-size: 105%;
134
  }
1
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
2
+ background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
3
  }
4
 
5
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
6
+ background: url(../images/shield-sprite-16.png) no-repeat 8px 6px !important;
7
  }
8
 
9
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image img {
10
+ display: none;
11
  }
12
 
13
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
14
+ display: none;
15
  }
16
 
17
  #adminmenu #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image:before {
18
+ content: '';
19
  }
20
 
21
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image:before {
22
+ content: '' !important;
23
  }
24
 
25
  #toplevel_page_all-in-one-seo-pack-pro-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-pro-aioseop_class.wp-has-current-submenu .wp-menu-image {
26
+ background-position: 8px -26px !important;
27
  }
28
 
29
  #toplevel_page_all-in-one-seo-pack-aioseop_class:hover .wp-menu-image, #toplevel_page_all-in-one-seo-pack-aioseop_class.wp-has-current-submenu .wp-menu-image {
30
+ background-position: 8px -26px !important;
31
  }
32
 
33
  #icon-aioseop.icon32 {
34
+ background: url(../images/shield32.png) no-repeat left top !important;
35
  }
36
 
37
  #aioseop_settings_header #message {
38
+ padding: 5px 0px 5px 50px;
39
+ background-image: url(../images/update32.png);
40
+ background-repeat: no-repeat;
41
+ background-position: 10px;
42
+ font-size: 14px;
43
+ min-height: 32px;
44
+ clear: none;
45
  }
46
 
47
  @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) {
48
 
49
+ #toplevel_page_all-in-one-seo-pack-pro-aioseop_class .wp-menu-image {
50
+ background-image: url('../images/shield-sprite-32.png') !important;
51
+ -webkit-background-size: 16px 48px !important;
52
+ -moz-background-size: 16px 48px !important;
53
+ background-size: 16px 48px !important;
54
+ }
55
+
56
+ #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
57
+ background-image: url('../images/shield-sprite-32.png') !important;
58
+ -webkit-background-size: 16px 48px !important;
59
+ -moz-background-size: 16px 48px !important;
60
+ background-size: 16px 48px !important;
61
+ }
62
+
63
+ #icon-aioseop.icon32 {
64
+ background-image: url('../images/shield64.png') !important;
65
+ -webkit-background-size: 32px 32px !important;
66
+ -moz-background-size: 32px 32px !important;
67
+ background-size: 32px 32px !important;
68
+ }
69
+
70
+ #aioseop_settings_header #message {
71
+ background-image: url(../images/update64.png) !important;
72
+ -webkit-background-size: 32px 32px !important;
73
+ -moz-background-size: 32px 32px !important;
74
+ background-size: 32px 32px !important;
75
+ }
76
  }
77
 
78
  .proupgrade a {
79
+ font-weight: 900;
80
+ color: #d54e21;
81
+ font-size: 105%;
82
  }
83
 
84
  li#wp-admin-bar-aioseop-pro-upgrade a.ab-item {
85
+ font-weight: 900;
86
+ color: #d54e21 !important;
87
+ font-size: 110%;
88
  }
89
 
90
  #aio-pro-update{
91
+ font-weight: 900;
92
+ color: #d54e21 !important;
93
+ font-size: 110%;
94
  }
95
 
96
  /* Dashicons in sidebar */
97
 
98
  .aiosp-di .dashicons {
99
+ margin:1px;
100
+ line-height: 1;
101
+ width: 42px;
102
+ height:36px;
103
+ color:#fff;
104
+ padding:3px;
105
+ vertical-align:middle;
106
  }
107
  .aiosp-di .dashicons:before {
108
+ -webkit-font-smoothing:antialiased;
109
+ font:400 30px/1 dashicons;
110
+ line-height: 38px;
111
  }
112
  .aiosp-di .dashicons.di-facebook {
113
+ margin:0;
114
  }
115
  .aiosp-di .dashicons.di-facebook:before {
116
+ content:"\f304";
117
+ font-size:52px;
118
  }
119
  .aiosp-di .dashicons.di-twitter:before {
120
+ content:"\f301"
121
  }
122
  .aiosp-di .dashicons.di-facebook {
123
+ color: #3B5998;
124
  }
125
  .aiosp-di .dashicons.di-twitter {
126
  width: 36px;
127
+ background-color:#00aced;
128
+ border-radius:2px;
129
  }
130
  .upgrade_menu_link {
131
+ font-weight: 900;
132
+ color: #d54e21;
133
+ font-size: 105%;
134
  }
css/modules/aioseop_module-rtl.css CHANGED
@@ -1,319 +1,319 @@
1
- * {
2
- direction: rtl !important
3
- }
4
-
5
- .form-table.aioseop {
6
- clear: none
7
- }
8
-
9
- .form-table.aioseop th {
10
- padding: 10px 9px 12px 0;
11
- direction: rtl
12
- }
13
-
14
- .aioseop_help_text_link,
15
- .aioseop_help_text_link:active {
16
- text-align: right;
17
- float: right
18
- }
19
-
20
- .aioseop_help_text_link span {
21
- left: -60px;
22
- }
23
-
24
- .aioseop_meta_box_help > label {
25
- margin-left: 0;
26
- margin-right: 8px
27
- }
28
-
29
- .aioseop_help_text_link img {
30
- float: left
31
- }
32
-
33
- .aioseop_meta_box_help,
34
- .aioseop_meta_box_help:active {
35
- float: left;
36
- padding-left: 0;
37
- margin-right: 0;
38
- margin-left: 64px
39
- }
40
-
41
- .aioseop_label {
42
- padding-left: 0;
43
- padding-right: 20px;
44
- text-align: right;
45
- direction: rtl
46
- }
47
-
48
- .aioseop input[type="text"] {
49
- padding: 2px 10px 2px 0
50
- }
51
-
52
- .aioseop textarea {
53
- padding: 10px 10px 0 0
54
- }
55
-
56
- .aioseop_help_text_div {
57
- text-align: right;
58
- margin: 8px 0 10px 0
59
- }
60
-
61
- .aioseop_help_text {
62
- float: right;
63
- clear: right
64
- }
65
-
66
- .aioseop_head_nav {
67
- float: right
68
- }
69
-
70
- .aioseop_head_nav_tab {
71
- margin: 0 15px 0 0;
72
- float: right
73
- }
74
-
75
- .aioseop_head_nav_tab:first-child {
76
- margin-right: 0
77
- }
78
-
79
- .aioseop_header {
80
- float: right;
81
- clear: right
82
- }
83
-
84
- .aioseop_nopad {
85
- padding-right: 0
86
- }
87
-
88
- .aioseop_adverts {
89
- float: left
90
- }
91
-
92
- .aioseop_content {
93
- clear: right
94
- }
95
-
96
- #aiosp_feature_manager_metabox.postbox {
97
- float: right
98
- }
99
-
100
- .aioseop_sidebar {
101
- margin-left: 0;
102
- margin-right: 10px
103
- }
104
-
105
- .aioseop_option_label {
106
- float: right !important;
107
- clear: right !important;
108
- }
109
-
110
- .aioseop_settings_left {
111
- float: right;
112
- }
113
-
114
- .aioseop_option_input {
115
- float: left; /*clear: right !important;*/
116
- padding-left: 0;
117
- padding-right: 1px;
118
- margin-bottom: 20px;
119
- width: 60%;
120
- min-width: 160px;
121
- }
122
-
123
- .aioseop_top {
124
- margin: 10px 0 0 10px
125
- }
126
-
127
- .aioseop_right_sidebar {
128
- float: left
129
- }
130
-
131
- div.aioseop_feature {
132
- float: right
133
- }
134
-
135
- .aioseop_feature #free-flag {
136
- float: left;
137
- margin-right: 0;
138
- background: none repeat scroll 0 0 #D23D46;
139
- color: #FFFFFF;
140
- padding: 5px 12px;
141
- position: relative;
142
- }
143
-
144
- .aioseop_feature #free-flag:before,
145
- .aioseop_feature #free-flag:after {
146
- display: none;
147
- }
148
-
149
- .aioseop_feature .feature_button {
150
- float: left;
151
- margin-right: 0;
152
- margin-left: 10px
153
- }
154
-
155
- .aioseop_follow_button {
156
- margin-right: 0;
157
- margin-left: 5px
158
- }
159
-
160
- .aioseop_wrapper {
161
- padding-left: 0;
162
- padding-right: 5px;
163
- direction: rtl
164
- }
165
-
166
- .aioseop_input {
167
- clear: left
168
- }
169
-
170
- #aiosp div.preview_snippet {
171
- padding: 15px 7px 20px 15px
172
- }
173
-
174
- #aiosp_sitemap_addl_pages,
175
- #aiosp_video_sitemap_addl_pages {
176
- clear: right;
177
- margin-left: 0;
178
- margin-right: 20px
179
- }
180
-
181
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
182
- border-left: 0 solid #dfdfdf;
183
- border-right: 1px solid #dfdfdf
184
- }
185
-
186
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
187
- border-right: 0 solid #dfdfdf;
188
- border-left: 1px solid #dfdfdf
189
- }
190
-
191
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
192
- border-right: 0 solid #dfdfdf;
193
- border-left: 1px solid #dfdfdf
194
- }
195
-
196
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
197
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
198
- padding-left: 0;
199
- padding-right: 5%
200
- }
201
-
202
- .aioseop_settings_left .postbox {
203
- float: right
204
- }
205
-
206
- .aioseop_option_setting_label {
207
- padding-left: 0;
208
- padding-right: 1px
209
- }
210
-
211
- .aioseop_settings_left .postbox .inside {
212
- clear: left
213
- }
214
-
215
- .postbox h2 .Taha {
216
- float: left !important;
217
- }
218
-
219
- #aiosp_settings_form .aioseop_no_label,
220
- .aioseop_no_label {
221
- float: right;
222
- margin: 0 13px 0 23px
223
- }
224
-
225
- .aioseop_module.error.below-h2 {
226
- margin: 0 0 15px 477px !important
227
- }
228
-
229
- .robots img {
230
- margin: 0 2px 0 0
231
- }
232
-
233
- /* Robots.txt styling */
234
- #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
235
- #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
236
- margin-top: 10px;
237
- }
238
-
239
- div.aioseop_notice a.aioseop_dismiss_link {
240
- position: absolute;
241
- top: 10px;
242
- left: 10px;
243
- text-align: left;
244
- }
245
-
246
- /*
247
- .ButtonB{
248
- border: 1px solid red !important;
249
- float: left;
250
- clear: right;
251
-
252
- }*/
253
- .aioseop_help_text ul {
254
- margin: 15px 20px 0 0
255
- }
256
-
257
- .aioseop_header_tabs li a.aioseop_header_tab {
258
- margin: 5px 0 0 5px
259
- }
260
-
261
- .aioseop_header_tabs li:first-child a.aioseop_header_tab {
262
- border-left: solid 0 #CCC;
263
- border-right: solid 1px #CCC;
264
- margin-left: 0;
265
- margin-right: 5px
266
- }
267
-
268
- .aioseop_tab {
269
- padding-left: 0;
270
- padding-right: 5px
271
- }
272
-
273
- form#aiosp_settings_form,
274
- .aioseop_tabs_div {
275
- padding-right: 0;
276
- padding-left: 477px
277
- }
278
-
279
- #aiosp_settings_form ul.sfwd_debug_settings li strong {
280
- float: right;
281
- text-align: left;
282
- margin-right: 0;
283
- margin-left: 8px;
284
- padding-right: 0;
285
- padding-left: 8px
286
- }
287
-
288
- #aiosp_settings_form ul.sfwd_debug_settings li {
289
- clear: right
290
- }
291
-
292
- .aioseop_advert {
293
- direction: rtl;
294
- float: right;
295
- z-index: 999999
296
- }
297
-
298
- .aioseop_advert form input {
299
- float: left
300
- }
301
-
302
- .MRL {
303
- margin-left: 0 !important;
304
- margin-right: 20px !important;
305
- }
306
-
307
- .aioseop_upload_image_label {
308
- clear: right !important;
309
- float: none !important;
310
- }
311
-
312
- .aioseop_upload_image_button {
313
- float: right !important;
314
- margin-bottom: 5px !important;
315
- }
316
-
317
- #aioseop-about .aioseop_metabox_text ul {
318
- padding-right: 15px;
319
- }
1
+ * {
2
+ direction: rtl !important
3
+ }
4
+
5
+ .form-table.aioseop {
6
+ clear: none
7
+ }
8
+
9
+ .form-table.aioseop th {
10
+ padding: 10px 9px 12px 0;
11
+ direction: rtl
12
+ }
13
+
14
+ .aioseop_help_text_link,
15
+ .aioseop_help_text_link:active {
16
+ text-align: right;
17
+ float: right
18
+ }
19
+
20
+ .aioseop_help_text_link span {
21
+ left: -60px;
22
+ }
23
+
24
+ .aioseop_meta_box_help > label {
25
+ margin-left: 0;
26
+ margin-right: 8px
27
+ }
28
+
29
+ .aioseop_help_text_link img {
30
+ float: left
31
+ }
32
+
33
+ .aioseop_meta_box_help,
34
+ .aioseop_meta_box_help:active {
35
+ float: left;
36
+ padding-left: 0;
37
+ margin-right: 0;
38
+ margin-left: 64px
39
+ }
40
+
41
+ .aioseop_label {
42
+ padding-left: 0;
43
+ padding-right: 20px;
44
+ text-align: right;
45
+ direction: rtl
46
+ }
47
+
48
+ .aioseop input[type="text"] {
49
+ padding: 2px 10px 2px 0
50
+ }
51
+
52
+ .aioseop textarea {
53
+ padding: 10px 10px 0 0
54
+ }
55
+
56
+ .aioseop_help_text_div {
57
+ text-align: right;
58
+ margin: 8px 0 10px 0
59
+ }
60
+
61
+ .aioseop_help_text {
62
+ float: right;
63
+ clear: right
64
+ }
65
+
66
+ .aioseop_head_nav {
67
+ float: right
68
+ }
69
+
70
+ .aioseop_head_nav_tab {
71
+ margin: 0 15px 0 0;
72
+ float: right
73
+ }
74
+
75
+ .aioseop_head_nav_tab:first-child {
76
+ margin-right: 0
77
+ }
78
+
79
+ .aioseop_header {
80
+ float: right;
81
+ clear: right
82
+ }
83
+
84
+ .aioseop_nopad {
85
+ padding-right: 0
86
+ }
87
+
88
+ .aioseop_adverts {
89
+ float: left
90
+ }
91
+
92
+ .aioseop_content {
93
+ clear: right
94
+ }
95
+
96
+ #aiosp_feature_manager_metabox.postbox {
97
+ float: right
98
+ }
99
+
100
+ .aioseop_sidebar {
101
+ margin-left: 0;
102
+ margin-right: 10px
103
+ }
104
+
105
+ .aioseop_option_label {
106
+ float: right !important;
107
+ clear: right !important;
108
+ }
109
+
110
+ .aioseop_settings_left {
111
+ float: right;
112
+ }
113
+
114
+ .aioseop_option_input {
115
+ float: left; /*clear: right !important;*/
116
+ padding-left: 0;
117
+ padding-right: 1px;
118
+ margin-bottom: 20px;
119
+ width: 60%;
120
+ min-width: 160px;
121
+ }
122
+
123
+ .aioseop_top {
124
+ margin: 10px 0 0 10px
125
+ }
126
+
127
+ .aioseop_right_sidebar {
128
+ float: left
129
+ }
130
+
131
+ div.aioseop_feature {
132
+ float: right
133
+ }
134
+
135
+ .aioseop_feature #free-flag {
136
+ float: left;
137
+ margin-right: 0;
138
+ background: none repeat scroll 0 0 #D23D46;
139
+ color: #FFFFFF;
140
+ padding: 5px 12px;
141
+ position: relative;
142
+ }
143
+
144
+ .aioseop_feature #free-flag:before,
145
+ .aioseop_feature #free-flag:after {
146
+ display: none;
147
+ }
148
+
149
+ .aioseop_feature .feature_button {
150
+ float: left;
151
+ margin-right: 0;
152
+ margin-left: 10px
153
+ }
154
+
155
+ .aioseop_follow_button {
156
+ margin-right: 0;
157
+ margin-left: 5px
158
+ }
159
+
160
+ .aioseop_wrapper {
161
+ padding-left: 0;
162
+ padding-right: 5px;
163
+ direction: rtl
164
+ }
165
+
166
+ .aioseop_input {
167
+ clear: left
168
+ }
169
+
170
+ #aiosp div.preview_snippet {
171
+ padding: 15px 7px 20px 15px
172
+ }
173
+
174
+ #aiosp_sitemap_addl_pages,
175
+ #aiosp_video_sitemap_addl_pages {
176
+ clear: right;
177
+ margin-left: 0;
178
+ margin-right: 20px
179
+ }
180
+
181
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
182
+ border-left: 0 solid #dfdfdf;
183
+ border-right: 1px solid #dfdfdf
184
+ }
185
+
186
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
187
+ border-right: 0 solid #dfdfdf;
188
+ border-left: 1px solid #dfdfdf
189
+ }
190
+
191
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
192
+ border-right: 0 solid #dfdfdf;
193
+ border-left: 1px solid #dfdfdf
194
+ }
195
+
196
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
197
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
198
+ padding-left: 0;
199
+ padding-right: 5%
200
+ }
201
+
202
+ .aioseop_settings_left .postbox {
203
+ float: right
204
+ }
205
+
206
+ .aioseop_option_setting_label {
207
+ padding-left: 0;
208
+ padding-right: 1px
209
+ }
210
+
211
+ .aioseop_settings_left .postbox .inside {
212
+ clear: left
213
+ }
214
+
215
+ .postbox h2 .Taha {
216
+ float: left !important;
217
+ }
218
+
219
+ #aiosp_settings_form .aioseop_no_label,
220
+ .aioseop_no_label {
221
+ float: right;
222
+ margin: 0 13px 0 23px
223
+ }
224
+
225
+ .aioseop_module.error.below-h2 {
226
+ margin: 0 0 15px 477px !important
227
+ }
228
+
229
+ .robots img {
230
+ margin: 0 2px 0 0
231
+ }
232
+
233
+ /* Robots.txt styling */
234
+ #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
235
+ #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
236
+ margin-top: 10px;
237
+ }
238
+
239
+ div.aioseop_notice a.aioseop_dismiss_link {
240
+ position: absolute;
241
+ top: 10px;
242
+ left: 10px;
243
+ text-align: left;
244
+ }
245
+
246
+ /*
247
+ .ButtonB{
248
+ border: 1px solid red !important;
249
+ float: left;
250
+ clear: right;
251
+
252
+ }*/
253
+ .aioseop_help_text ul {
254
+ margin: 15px 20px 0 0
255
+ }
256
+
257
+ .aioseop_header_tabs li a.aioseop_header_tab {
258
+ margin: 5px 0 0 5px
259
+ }
260
+
261
+ .aioseop_header_tabs li:first-child a.aioseop_header_tab {
262
+ border-left: solid 0 #CCC;
263
+ border-right: solid 1px #CCC;
264
+ margin-left: 0;
265
+ margin-right: 5px
266
+ }
267
+
268
+ .aioseop_tab {
269
+ padding-left: 0;
270
+ padding-right: 5px
271
+ }
272
+
273
+ form#aiosp_settings_form,
274
+ .aioseop_tabs_div {
275
+ padding-right: 0;
276
+ padding-left: 477px
277
+ }
278
+
279
+ #aiosp_settings_form ul.sfwd_debug_settings li strong {
280
+ float: right;
281
+ text-align: left;
282
+ margin-right: 0;
283
+ margin-left: 8px;
284
+ padding-right: 0;
285
+ padding-left: 8px
286
+ }
287
+
288
+ #aiosp_settings_form ul.sfwd_debug_settings li {
289
+ clear: right
290
+ }
291
+
292
+ .aioseop_advert {
293
+ direction: rtl;
294
+ float: right;
295
+ z-index: 999999
296
+ }
297
+
298
+ .aioseop_advert form input {
299
+ float: left
300
+ }
301
+
302
+ .MRL {
303
+ margin-left: 0 !important;
304
+ margin-right: 20px !important;
305
+ }
306
+
307
+ .aioseop_upload_image_label {
308
+ clear: right !important;
309
+ float: none !important;
310
+ }
311
+
312
+ .aioseop_upload_image_button {
313
+ float: right !important;
314
+ margin-bottom: 5px !important;
315
+ }
316
+
317
+ #aioseop-about .aioseop_metabox_text ul {
318
+ padding-right: 15px;
319
+ }
css/modules/aioseop_module.css CHANGED
@@ -1,1405 +1,1405 @@
1
- /**
2
- * Controls all the styling of the plugin.
3
- *
4
- * @author Michael Torbert.
5
- * @author Semper Fi Web Design.
6
- * @copyright http://semperplugins.com
7
- * @package All-in-One-SEO-Pack.
8
- */
9
-
10
- .form-table.aioseop {
11
- clear: none;
12
- }
13
-
14
- .form-table.aioseop td {
15
- vertical-align: top;
16
- padding: 16px 0 10px 0;
17
- line-height: 20px;
18
- font-size: 12px;
19
- }
20
-
21
- .form-table.aioseop th {
22
- width: 200px;
23
- padding: 10px 0 12px 9px;
24
- }
25
-
26
- .aioseop_help_text_link,
27
- .aioseop_help_text_link:active {
28
- text-align: left;
29
- float: left;
30
- max-width: 300px;
31
- min-width: 1px;
32
- padding-top: 2px;
33
- outline: none;
34
- color: #888;
35
- font-family: sans-serif;
36
- }
37
-
38
- .aioseop_help_text_link span {
39
- font-size: 14px;
40
- }
41
-
42
- .aioseop_help_text_link:before {
43
- content: "\f223";
44
- font-size: 27px;
45
- font-family: dashicons;
46
- vertical-align: middle;
47
- }
48
-
49
- #aioseop-support .aioseop_metabox_text,
50
- #aioseop-support a {
51
- font-size: 14px;
52
- color: #000;
53
- text-decoration: none;
54
- }
55
-
56
- .aioseop_icon {
57
- display: inline-block;
58
- width: 40px;
59
- height: 40px;
60
- background-repeat: no-repeat;
61
- background-size: 100%;
62
- vertical-align: middle;
63
- margin: 10px;
64
- }
65
-
66
- .aioseop_book_icon {
67
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==);
68
- }
69
-
70
- .aioseop_cog_icon {
71
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=);
72
- }
73
-
74
- .aioseop_file_icon {
75
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==);
76
- }
77
-
78
- .aioseop_help_icon {
79
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC);
80
- }
81
-
82
- .aioseop_support_icon {
83
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC);
84
- }
85
-
86
- .aioseop_youtube_icon {
87
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==);
88
- }
89
-
90
- .aioseop_meta_box_help > label {
91
- position: absolute;
92
- margin-left: 8px;
93
- }
94
-
95
- div.aioseop_tip_icon {
96
- font-size: 14px;
97
- border: 1px solid #888;
98
- width: 1em;
99
- text-align: center;
100
- padding: 0 4px;
101
- -webkit-border-radius: 12px;
102
- -moz-border-radius: 12px;
103
- -webkit-box-shadow: 1px 1px 1px #888;
104
- -moz-box-shadow: 1px 1px 1px #888;
105
- box-shadow: 1px 1px 1px #888;
106
- border-radius: 12px;
107
- }
108
-
109
- div.aioseop_tip_icon:before {
110
- content: '?';
111
- }
112
-
113
- .aioseop_help_text_link img {
114
- width: 40px;
115
- float: left;
116
- }
117
-
118
- .aioseop_meta_box_help,
119
- .aioseop_meta_box_help:active {
120
- float: right;
121
- padding-left: 0;
122
- width: 16px;
123
- margin-right: 32px;
124
- text-decoration: none;
125
- height: 15px;
126
- padding-top: 1px;
127
- position: relative;
128
- }
129
-
130
- .aioseop_tabs .aioseop_meta_box_help,
131
- .aioseop_tabs .aioseop_meta_box_help:active {
132
- margin-top: 4px;
133
- margin-right: 45px;
134
- }
135
-
136
- .aioseop_label {
137
- color: #5F5F5F;
138
- font-weight: bold;
139
- line-height: 19px;
140
- display: inline-block;
141
- text-align: left;
142
- position: absolute;
143
- font-family: 'Open Sans', sans-serif;
144
- width: 26%;
145
- min-width: 120px;
146
- max-width: 230px;
147
- }
148
-
149
- .aioseop_option_div {
150
- max-height: 360px;
151
- min-height: 37px;
152
- width: 95%;
153
- overflow-y: auto;
154
- }
155
-
156
- .aioseop_overflowed {
157
- border: 1px solid #e1e1e1;
158
- }
159
-
160
- .aioseop input[type="text"] {
161
- color: #515151;
162
- height: 35px;
163
- padding: 10px 0 10px 10px;
164
- font-size: 14px;
165
- width: 95%;
166
- max-width: 600px;
167
- }
168
-
169
- .aioseop textarea {
170
- color: #515151;
171
- padding: 10px 0 0 10px;
172
- margin: 0;
173
- font-size: 14px;
174
- line-height: 25px;
175
- width: 95%;
176
- max-width: 600px;
177
- }
178
-
179
- .aioseop_help_text_div {
180
- text-align: left;
181
- width: 100%;
182
- margin: 0;
183
- }
184
-
185
- .aioseop_help_text {
186
- font-size: 12px;
187
- float: left;
188
- clear: left;
189
- color: #797979;
190
- line-height: 15px;
191
- font-style: italic;
192
- }
193
-
194
- .aioseop_head_tagline {
195
- color: #5F5F5F;
196
- font-size: 13px;
197
- }
198
-
199
- .aioseop_head_nav {
200
- float: left;
201
- font-size: 18px;
202
- margin: 0 0 16px 0;
203
- font-family: "HelveticaNeue-Light",
204
- "Helvetica Neue Light",
205
- "Helvetica Neue",
206
- sans-serif;
207
- border-bottom: 1px solid #CCC;
208
- width: 100%;
209
- }
210
-
211
- .aioseop_head_nav_tab {
212
- padding: 10px 15px 10px 15px;
213
- margin: 0 0 0 15px;
214
- border-radius: 4px 4px 0 0;
215
- border: 1px solid #CCC;
216
- border-bottom: 0 white;
217
- float: left;
218
- opacity: 0.5;
219
- color: black;
220
- text-shadow: white 0 1px 0;
221
- text-decoration: none;
222
- }
223
-
224
- .aioseop_head_nav_tab.aioseop_head_nav_active {
225
- opacity: 1;
226
- margin-bottom: -1px;
227
- border-width: 1px;
228
- }
229
-
230
- .aioseop_head_nav_tab:first-child {
231
- margin-left: 0;
232
- }
233
-
234
- .aioseop_head_nav_tab:hover {
235
- opacity: 1;
236
- }
237
-
238
- .aioseop_header {
239
- float: left;
240
- clear: left;
241
- }
242
-
243
- .aioseop_advert {
244
- padding: 10px;
245
- margin-bottom: 30px;
246
- border: 1px solid #DDD;
247
- height: 200px;
248
- width: 423px;
249
- }
250
-
251
- .aioseop_nopad {
252
- padding-left: 0;
253
- padding-top: 0;
254
- }
255
-
256
- .aioseop_nopad_all {
257
- padding: 0;
258
- height: 220px;
259
- width: 445px;
260
- margin-bottom: 20px;
261
- border: none;
262
- }
263
-
264
- .aioseop_adverts {
265
- float: right;
266
- }
267
-
268
- .wincherad {
269
- width: 100%;
270
- height: 100%;
271
- background-size: 100%;
272
- background-repeat: no-repeat;
273
- margin-bottom: 0;
274
- border: none;
275
- }
276
-
277
- #wincher21 {
278
- background-image: url(../../modules/images/banner21.jpg);
279
- }
280
-
281
- #wincher22 {
282
- background-image: url(../../modules/images/banner22.jpg);
283
- }
284
-
285
- .aioseop_content {
286
- min-width: 760px;
287
- clear: left;
288
- }
289
-
290
- .aioseop_options_wrapper .hndle {
291
- font-size: 15px;
292
- font-family: Georgia,
293
- "Times New Roman",
294
- "Bitstream Charter",
295
- Times,
296
- serif;
297
- font-weight: normal;
298
- padding: 7px 10px;
299
- margin: 0;
300
- line-height: 1;
301
- }
302
-
303
- .aioseop_options_wrapper .submit input.button-primary {
304
- margin-bottom: 5px;
305
- }
306
-
307
- #aiosp_feature_manager_metabox.postbox {
308
- margin-top: 20px;
309
- float: left;
310
- }
311
-
312
- .aioseop_advert p {
313
- margin: 25px 0 25px 0;
314
- }
315
-
316
- .aioseop_options_wrapper .postarea {
317
- border-color: #DFDFDF;
318
- -moz-box-shadow: inset 0 1px 0 #fff;
319
- -webkit-box-shadow: inset 0 1px 0 #fff;
320
- box-shadow: inset 0 1px 0 #fff;
321
- -moz-border-radius: 3px;
322
- -webkit-border-radius: 3px;
323
- border-radius: 3px;
324
- }
325
-
326
- .aioseop_advert h3 {
327
- padding: 0;
328
- margin-top: 6px;
329
- }
330
-
331
- .aioseop_metabox_text p {
332
- margin: 0 0 0 0;
333
- width: 101%;
334
- }
335
-
336
- .aioseop_sidebar {
337
- width: 457px;
338
- margin-left: 10px;
339
- }
340
-
341
- .aioseop_metabox_text {
342
- margin-bottom: 0;
343
- }
344
-
345
- .aioseop_metabox_wrapper {
346
- padding: 0;
347
- }
348
-
349
- .aioseop_metabox_text *:last-child {
350
- margin: 0;
351
- }
352
-
353
- .aioseop_metabox_feature {
354
- margin-top: 20px;
355
- }
356
-
357
- .aioseop_translations {
358
- margin-top: 15px;
359
- }
360
-
361
- .aioseop_option_label {
362
- float: left;
363
- margin: 0;
364
- min-width: 150px;
365
- width: 37%;
366
- max-width: 270px;
367
- padding-top: 3px;
368
- padding-bottom: 3px;
369
- height: 67px !important; /*added for certain language support*/
370
- }
371
-
372
- .aioseop_metabox_text h2 {
373
- font-size: 14px;
374
- padding: 0;
375
- font-weight: bold;
376
- line-height: 29px;
377
- }
378
-
379
- #aioseop-about {
380
- width: 443px;
381
- margin-bottom: 20px;
382
- }
383
-
384
- #aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 {
385
- font-size: 13px;
386
- }
387
-
388
- .aioseop_sidebar #mc-embedded-subscribe-form {
389
- margin: 0 0 10px 0;
390
- background: white;
391
- padding: 10px 10px;
392
- border: 1px solid #DDD;
393
- }
394
-
395
- #aioseop-about .aioseop_metabox_text ul {
396
- list-style-type: disc;
397
- padding-left: 15px;
398
- }
399
-
400
- .aioseop input[readonly] {
401
- background-color: #EEE;
402
- margin: 5px 0 5px 0 !important;
403
- }
404
-
405
- .aioseop_settings_left {
406
- float: left;
407
- padding: 0;
408
- margin: 0;
409
- width: 100%;
410
- }
411
-
412
- body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left {
413
- margin-top: 20px;
414
- }
415
-
416
- body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left {
417
- margin-top: 20px;
418
- }
419
-
420
- #aioseop_top_button {
421
- margin-top: 5px;
422
- height: 30px;
423
- }
424
-
425
- #aioseop-list #mce-EMAIL {
426
- margin-top: 5px;
427
- width: 250px;
428
- }
429
-
430
- .aioseop_top {
431
- margin: 10px 10px 0 0;
432
- /* margin: 10px 477px 0px 0px; */
433
- }
434
-
435
- .aioseop_top #aioseop-list {
436
- margin-bottom: 0;
437
- }
438
-
439
- .aioseop_top #aioseop-list.postbox.closed {
440
- overflow: hidden;
441
- }
442
-
443
- .aioseop_right_sidebar {
444
- float: right;
445
- margin-top: 35px;
446
- }
447
-
448
- #aiosp_settings_form .button-primary.hidden {
449
- display: none;
450
- }
451
-
452
- form#edittag div#aiosp_titleatr_wrapper,
453
- form#edittag div#aiosp_menulabel_wrapper,
454
- form#edittag div#aiosp_sitemap_exclude_wrapper {
455
- display: none;
456
- }
457
-
458
- .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button {
459
- height: 5px;
460
- position: absolute;
461
- top: 0;
462
- width: 97%;
463
- }
464
-
465
- .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left {
466
- margin-top: 10px;
467
- }
468
-
469
- .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
470
- margin-top: 10px;
471
- }
472
-
473
- div#aiosp_feature_manager_metabox .inside {
474
- padding: 8px;
475
- }
476
-
477
- div.aioseop_feature {
478
- position: relative;
479
- display: inline-block;
480
- float: left;
481
- vertical-align: top;
482
- width: 240px;
483
- height: 288px;
484
- margin: 8px;
485
- border: 1px solid #DEDEDE;
486
- -moz-border-radius: 3px;
487
- -webkit-border-radius: 3px;
488
- border-radius: 3px;
489
- background: white;
490
- padding: 10px 0 0;
491
- -webkit-box-shadow: inset 0 1px 0 #fff,
492
- inset 0 0 20px rgba(0, 0, 0, 0.05),
493
- 0 1px 2px rgba(0, 0, 0, 0.1);
494
- -moz-box-shadow: inset 0 1px 0 #fff,
495
- inset 0 0 20px rgba(0, 0, 0, 0.05),
496
- 0 1px 2px rgba(0, 0, 0, 0.1);
497
- box-shadow: inset 0 1px 0 #fff,
498
- inset 0 0 20px rgba(0, 0, 0, 0.05),
499
- 0 1px 2px rgba(0, 0, 0, 0.1);
500
- -webkit-transition-duration: .4s;
501
- -moz-transition-duration: .4s;
502
- }
503
-
504
- .aioseop_feature .flag {
505
- float: right;
506
- margin-right: -7px;
507
- background: none repeat scroll 0 0 #D23D46;
508
- color: #FFFFFF;
509
- padding: 5px 12px 6px 5px;
510
- position: relative;
511
- }
512
-
513
- .aioseop_feature .flag:before {
514
- border-color: #D23D46 #D23D46 #D23D46 transparent;
515
- border-style: solid;
516
- border-width: 14px 4px 15px 10px;
517
- content: "";
518
- left: -14px;
519
- position: absolute;
520
- top: 0;
521
- }
522
-
523
- .aioseop_feature .flag:after {
524
- border-color: #892026 transparent transparent;
525
- border-style: solid;
526
- border-width: 6px 6px 6px 0;
527
- bottom: -12px;
528
- content: "";
529
- position: absolute;
530
- right: 0;
531
- }
532
-
533
- .aioseop_feature .flag.pro {
534
- display: none;
535
- }
536
-
537
- #aioseop_coming_soon .free.flag,
538
- .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag {
539
- display: none;
540
- }
541
-
542
- #aioseop_coming_soon .flag.pro {
543
- display: block;
544
- margin-top: -30px;
545
- }
546
-
547
- .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro {
548
- display: none;
549
- }
550
-
551
- .aioseop_feature h3 {
552
- font-size: 17px;
553
- margin: 0;
554
- padding: 0 10px 5px 10px;
555
- font-weight: normal;
556
- font-style: normal;
557
- font-family: "Helvetica Neue",
558
- Helvetica,
559
- Arial,
560
- "Lucida Grande",
561
- Verdana,
562
- "Bitstream Vera Sans",
563
- sans-serif;
564
- }
565
-
566
- .aioseop_feature p {
567
- line-height: 150%;
568
- font-size: 12px;
569
- font-family: Georgia,
570
- "Times New Roman",
571
- "Bitstream Charter",
572
- Times, serif;
573
- margin-bottom: 20px;
574
- color: #666;
575
- padding: 0 10px;
576
- }
577
-
578
- .aioseop_feature p.aioseop_desc {
579
- min-height: 80px;
580
- }
581
-
582
- .aioseop_feature .feature_button {
583
- float: right;
584
- margin-bottom: 10px;
585
- margin-right: 10px;
586
- min-width: 80px;
587
- text-align: center;
588
- }
589
-
590
- .aioseop_feature .feature_button:before {
591
- content: "Activate";
592
- }
593
-
594
- .aioseop_feature .active.feature_button:before {
595
- content: "Deactivate";
596
- }
597
-
598
- div.aioseop_feature .aioseop_featured_image {
599
- min-height: 100px;
600
- background-repeat: no-repeat;
601
- display: block;
602
- margin: 0 auto;
603
- width: 133px;
604
- }
605
-
606
- div.aioseop_feature .aioseop_featured_image {
607
- background-image: url(../../modules/images/Default-BW-Standard.png);
608
- }
609
-
610
- div.aioseop_feature .aioseop_featured_image.active {
611
- background-image: url(../../modules/images/Default-Color-Standard.png);
612
- }
613
-
614
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
615
- background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png);
616
- }
617
-
618
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
619
- background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png);
620
- }
621
-
622
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
623
- background-image: url(../../modules/images/VideoSitemap-BW-Standard.png);
624
- }
625
-
626
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
627
- background-image: url(../../modules/images/VideoSitemap-Color-Standard.png);
628
- }
629
-
630
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
631
- background-image: url(../../modules/images/SocialMeta-BW-Standard.png);
632
- }
633
-
634
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
635
- background-image: url(../../modules/images/SocialMeta-Color-Standard.png);
636
- }
637
-
638
- div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
639
- background-image: url(../../modules/images/Robots-BW-Standard.png);
640
- }
641
-
642
- div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
643
- background-image: url(../../modules/images/Robots-Color-Standard.png);
644
- }
645
-
646
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
647
- background-image: url(../../modules/images/FileEditor-BW-Standard.png);
648
- }
649
-
650
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
651
- background-image: url(../../modules/images/FileEditor-Color-Standard.png);
652
- }
653
-
654
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
655
- background-image: url(../../modules/images/ImporterExporter-BW-Standard.png);
656
- }
657
-
658
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
659
- background-image: url(../../modules/images/ImporterExporter-Color-Standard.png);
660
- }
661
-
662
- div.aioseop_feature#aioseop_performance .aioseop_featured_image {
663
- background-image: url(../../modules/images/Performance-BW-Standard.png);
664
- }
665
-
666
- div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
667
- background-image: url(../../modules/images/Performance-Color-Standard.png);
668
- }
669
-
670
- div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
671
- background-image: url(../../modules/images/Default-Color-Standard.png);
672
- }
673
-
674
- div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
675
- background-image: url(../../modules/images/Default-Color-Standard.png);
676
- }
677
-
678
- .All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table,
679
- .All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table {
680
- max-width: 500px;
681
- clear: none;
682
- }
683
-
684
- .aioseop_follow_button {
685
- min-height: 50px;
686
- background-repeat: no-repeat;
687
- display: inline-block;
688
- width: 100px;
689
- background-size: auto 50px !important;
690
- margin-right: 0;
691
- }
692
-
693
- .aioseop_facebook_follow {
694
- background-image: url(../../modules/images/facebook-follow-standard.png);
695
- }
696
-
697
- .aioseop_twitter_follow {
698
- background-image: url(../../modules/images/twitter-follow-standard.png);
699
- }
700
-
701
- @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) {
702
- div.aioseop_feature .aioseop_featured_image {
703
- background-size: auto 100px !important;
704
- }
705
-
706
- div.aioseop_feature .aioseop_featured_image.active {
707
- background-image: url(../../modules/images/Default-Color-Retina.png);
708
- }
709
-
710
- div.aioseop_feature .aioseop_featured_image {
711
- background-image: url(../../modules/images/Default-BW-Retina.png);
712
- }
713
-
714
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
715
- background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png);
716
- }
717
-
718
- div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
719
- background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png);
720
- }
721
-
722
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
723
- background-image: url(../../modules/images/VideoSitemap-BW-Retina.png);
724
- }
725
-
726
- div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
727
- background-image: url(../../modules/images/VideoSitemap-Color-Retina.png);
728
- }
729
-
730
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
731
- background-image: url(../../modules/images/SocialMeta-BW-Retina.png);
732
- }
733
-
734
- div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
735
- background-image: url(../../modules/images/SocialMeta-Color-Retina.png);
736
- }
737
-
738
- div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
739
- background-image: url(../../modules/images/Robots-BW-Retina.png);
740
- }
741
-
742
- div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
743
- background-image: url(../../modules/images/Robots-Color-Retina.png);
744
- }
745
-
746
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
747
- background-image: url(../../modules/images/FileEditor-BW-Retina.png);
748
- }
749
-
750
- div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
751
- background-image: url(../../modules/images/FileEditor-Color-Retina.png);
752
- }
753
-
754
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
755
- background-image: url(../../modules/images/ImporterExporter-BW-Retina.png);
756
- }
757
-
758
- div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
759
- background-image: url(../../modules/images/ImporterExporter-Color-Retina.png);
760
- }
761
-
762
- div.aioseop_feature#aioseop_performance .aioseop_featured_image {
763
- background-image: url(../../modules/images/Performance-BW-Retina.png);
764
- }
765
-
766
- div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
767
- background-image: url(../../modules/images/Performance-Color-Retina.png);
768
- }
769
-
770
- div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
771
- background-image: url(../../modules/images/Default-BW-Retina.png);
772
- }
773
-
774
- div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
775
- background-image: url(../../modules/images/Default-BW-Retina.png);
776
- }
777
-
778
- .aioseop_facebook_follow {
779
- background-image: url(../../modules/images/facebook-follow-retina.png);
780
- }
781
-
782
- .aioseop_twitter_follow {
783
- background-image: url(../../modules/images/twitter-follow-retina.png);
784
- }
785
- }
786
-
787
- .aioseop_options {
788
- width: 100%;
789
- margin: 18px 0 10px 0;
790
- }
791
-
792
- .aioseop_wrapper {
793
- width: 100%;
794
- padding-left: 5px;
795
- }
796
-
797
- .aioseop_input {
798
- clear: left;
799
- width: 100%;
800
- padding: 5px;
801
- display: inline;
802
- }
803
-
804
- .aioseop_option_input {
805
- float: left;
806
- width: 61%;
807
- margin: 0;
808
- padding-left: 1px;
809
- min-width: 160px;
810
- /* max-width: 900px; */
811
- }
812
-
813
- #aiosp_sitemap_addl_pages,
814
- #aiosp_video_sitemap_addl_pages {
815
- clear: left;
816
- margin-left: 20px;
817
- max-width: 1072px;
818
- }
819
-
820
- #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,
821
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper {
822
- width: 23%;
823
- min-width: 165px;
824
- display: inline-block;
825
- max-width: 265px;
826
- }
827
-
828
- #aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,
829
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div {
830
- position: absolute;
831
- margin: 5px 0 10px 0;
832
- }
833
-
834
- #aiosp_sitemap_addl_pages_metabox .aioseop_option_input,
835
- #aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input {
836
- width: 94%;
837
- min-width: 94%;
838
- }
839
-
840
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table,
841
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table {
842
- width: 96%;
843
- border: 1px solid #CCC;
844
- margin: 5px 0 10px 0;
845
- }
846
-
847
- table.aioseop_table tr:nth-child(odd) {
848
- background-color: #EEE;
849
- }
850
-
851
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) {
852
- background-color: rgba(238, 238, 238, 0.5);
853
- }
854
-
855
- table.aioseop_table td {
856
- width: 23%;
857
- }
858
-
859
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
860
- width: 80%;
861
- max-width: 800px;
862
- display: block;
863
- border-top: 1px solid #dfdfdf;
864
- border-left: 1px solid #dfdfdf;
865
- }
866
-
867
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
868
- width: 18%;
869
- border-right: 1px solid #dfdfdf;
870
- border-bottom: 1px solid #dfdfdf;
871
- }
872
-
873
- .All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info {
874
- margin-top: 10px;
875
- border: 1px solid #dfdfdf;
876
- width: 80%;
877
- max-width: 800px;
878
- }
879
-
880
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th {
881
- background: #f1f1f1;
882
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
883
- background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
884
- background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
885
- background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
886
- background-image: linear-gradient(to top, #ececec, #f9f9f9);
887
- padding: 5px;
888
- border-bottom-color: #dfdfdf;
889
- text-shadow: #fff 0 1px 0;
890
- -webkit-box-shadow: 0 1px 0 #fff;
891
- -moz-box-shadow: 0 1px 0 #fff;
892
- box-shadow: 0 1px 0 #fff;
893
- }
894
-
895
- .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
896
- border-right: 1px solid #dfdfdf;
897
- border-bottom: 1px solid #dfdfdf;
898
- }
899
-
900
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item {
901
- display: inline-block;
902
- width: 30%;
903
- vertical-align: top;
904
- }
905
-
906
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) {
907
- font-weight: bold;
908
- }
909
-
910
- #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) {
911
- width: 70%;
912
- }
913
-
914
- #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
915
- #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
916
- width: 25%;
917
- padding-left: 5%;
918
- }
919
-
920
- table.aioseop_table td, table.aioseop_table th {
921
- padding: 3px;
922
- }
923
-
924
- .aioseop_top_label .aioseop_option_input,
925
- .aioseop_no_label .aioseop_option_input {
926
- width: 100%;
927
- }
928
-
929
- #aiosp_settings_form .postbox {
930
- margin: 0 0 20px 0;
931
- }
932
-
933
- .aioseop_settings_left .postbox {
934
- float: left;
935
- width: 100%;
936
- }
937
-
938
- .aioseop_option_setting_label {
939
- min-height: 35px;
940
- display: inline-block;
941
- white-space: nowrap;
942
- overflow: hidden;
943
- padding-left: 1px;
944
- max-width: 229px;
945
- min-width: 160px;
946
- width: 33%;
947
- }
948
-
949
- .aioseop_settings_left .postbox .inside {
950
- padding: 0;
951
- margin: 0;
952
- clear: right;
953
- }
954
-
955
- #aiosp_settings_form .aioseop_no_label, .aioseop_no_label {
956
- float: left;
957
- width: 92%;
958
- max-width: 100%;
959
- margin: 0 23px 0 13px;
960
- }
961
-
962
- #aiosp_sitemap_status_metabox .handlediv.button-link {
963
- display: none;
964
- }
965
-
966
- #aiosp_sitemap_status_metabox.closed .inside {
967
- display: block;
968
- }
969
-
970
- .aioseop_top_label {
971
- width: 96%;
972
- margin: 0 10px;
973
- }
974
-
975
- .aioseop_hidden_type {
976
- margin: 0;
977
- padding: 0;
978
- height: 0;
979
- }
980
-
981
- #aiosp_title_metabox #aiosp_force_rewrites_wrapper {
982
- display: none;
983
- height: 0;
984
- }
985
-
986
- .aioseop_module.error.below-h2 {
987
- padding: 5px 0;
988
- margin: 0 477px 15px 0 !important;
989
- }
990
-
991
- #aioseop_opengraph_settings .inside {
992
- margin: 0;
993
- }
994
-
995
- #aioseop_opengraph_settings_image_wrapper img {
996
- width: auto;
997
- height: 75px;
998
- }
999
-
1000
- #aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label {
1001
- max-width: 160px;
1002
- min-width: 100px;
1003
- width: 30%;
1004
- }
1005
-
1006
- .aioseop_input input[type="checkbox"],
1007
- .aioseop_input input[type="radio"] {
1008
- vertical-align: text-bottom;
1009
- margin-top: 8px;
1010
- }
1011
-
1012
- #aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div {
1013
- max-height: initial;
1014
- }
1015
-
1016
- #aiosp {
1017
- width: auto;
1018
- }
1019
-
1020
- .aioseop_input.aioseop_top_label .aioseop_option_input {
1021
- margin: 0 0 10px 0;
1022
- }
1023
-
1024
- .aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div {
1025
- max-height: none;
1026
- }
1027
-
1028
- /* Robots.txt styling */
1029
- #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
1030
- #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
1031
- max-height: none;
1032
- }
1033
-
1034
- .aioseop_option_input .widefat td {
1035
- vertical-align: middle;
1036
- }
1037
-
1038
- .entry-row.robots.quirks {
1039
- font-weight: bold;
1040
- opacity: 1;
1041
- }
1042
-
1043
- .entry-row.robots {
1044
- opacity: 0.8;
1045
- }
1046
-
1047
- .entry-row.robots.invalid {
1048
- opacity: 1;
1049
- font-weight: bold;
1050
- }
1051
-
1052
- .invalid .entry_label {
1053
- font-weight: bold;
1054
- }
1055
-
1056
- .aioseop .aioseop_option_input tbody {
1057
- background: #FCFCFC;
1058
- }
1059
-
1060
- .All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody {
1061
- background: transparent;
1062
- }
1063
-
1064
- .entry-row.robots div {
1065
- height: 20px;
1066
- vertical-align: middle;
1067
- width: 90%;
1068
- margin: 0 0 4px 0;
1069
- }
1070
-
1071
- .robots img {
1072
- margin: 0 0 0 2px;
1073
- opacity: 0.6;
1074
- }
1075
-
1076
- .aioseop_option_docs {
1077
- width: 98%;
1078
- display: none;
1079
- border: 1px solid #D3D3D3;
1080
- margin-top: 20px;
1081
- padding: 1%;
1082
- background-color: #EEE;
1083
- }
1084
-
1085
- .aioseop_option_docs h3 {
1086
- background: none;
1087
- }
1088
-
1089
- div.aioseop_notice {
1090
- position: relative;
1091
- }
1092
-
1093
- div.aioseop_notice a.aioseop_dismiss_link {
1094
- position: absolute;
1095
- top: 10px;
1096
- right: 10px;
1097
- }
1098
-
1099
- .aioseop_error_notice {
1100
- color: #f00;
1101
- font-weight: bold;
1102
- }
1103
-
1104
- .aioseop_input select {
1105
- margin: 7px 0;
1106
- }
1107
-
1108
- .aioseop_help_text ul {
1109
- margin: 15px 0 0 20px;
1110
- }
1111
-
1112
- .aioseop_help_text ul li {
1113
- line-height: 20px;
1114
- margin: 0;
1115
- }
1116
-
1117
- .aioseop_sidebar #side-sortables {
1118
- width: 98%;
1119
- }
1120
-
1121
- #aioseop_opengraph_settings .aioseop_option_label {
1122
- width: 30%;
1123
- }
1124
-
1125
- .aioseop_tabs {
1126
- padding-top: 6px;
1127
- }
1128
-
1129
- .aioseop_tabs.hide,
1130
- .aioseop_header_tabs.hide {
1131
- display: block !important;
1132
- }
1133
-
1134
- .aioseop_header_tabs li {
1135
- display: inline;
1136
- padding: 0;
1137
- margin: 0;
1138
- }
1139
-
1140
- .aioseop_header_tabs {
1141
- margin: 0;
1142
- }
1143
-
1144
- .aioseop_header_nav {
1145
- margin: 0;
1146
- }
1147
-
1148
- .aioseop_header_tabs li a.aioseop_header_tab.active {
1149
- background-color: rgb(255, 255, 255);
1150
- border-bottom-color: rgba(255, 255, 255, 0.5);
1151
- font-weight: bold;
1152
- }
1153
-
1154
- .aioseop_header_tabs li a.aioseop_header_tab {
1155
- font-size: 14px;
1156
- line-height: 37px;
1157
- text-decoration: none;
1158
- margin: 5px 5px 0 0;
1159
- padding: 10px;
1160
- cursor: pointer;
1161
- -webkit-border-top-right-radius: 3px;
1162
- -webkit-border-top-left-radius: 3px;
1163
- border-top-right-radius: 3px;
1164
- border-top-left-radius: 3px;
1165
- background-color: #e5e5e5;
1166
- border: 1px solid #ccc;
1167
- color: #5F5F5F;
1168
- }
1169
-
1170
- .aioseop_header_tabs li:first-child a.aioseop_header_tab {
1171
- border-left: solid 1px #CCC;
1172
- margin-left: 5px;
1173
- }
1174
-
1175
- .aioseop_tab {
1176
- border: solid 1px #CCC;
1177
- background-color: rgb(255, 255, 255);
1178
- background-color: rgba(255, 255, 255, 0.5);
1179
- padding: 10px;
1180
- }
1181
-
1182
- .aioseop_loading {
1183
- background-image: url('../../images/activity.gif');
1184
- display: inline-block;
1185
- width: 24px;
1186
- height: 24px;
1187
- margin: 0;
1188
- padding: 0;
1189
- vertical-align: bottom;
1190
- }
1191
-
1192
- .aiosp_delete_url {
1193
- background-image: url('../../images/delete.png');
1194
- display: inline-block;
1195
- width: 16px;
1196
- height: 16px;
1197
- margin: 0;
1198
- padding: 0;
1199
- vertical-align: bottom;
1200
- }
1201
-
1202
- form#aiosp_settings_form,
1203
- .aioseop_tabs_div {
1204
- padding-right: 477px;
1205
- }
1206
-
1207
- .aioseop_tabs_div {
1208
- margin-top: 10px;
1209
- }
1210
-
1211
- #aiosp_settings_form ul.sfwd_debug_settings li strong {
1212
- display: block;
1213
- float: left;
1214
- text-align: right;
1215
- background-color: #DDD;
1216
- margin-right: 8px;
1217
- padding: 1px 8px 1px 1px;
1218
- overflow: auto;
1219
- width: 200px;
1220
- min-height: 16px;
1221
- }
1222
-
1223
- #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong {
1224
- background-color: #CCC;
1225
- }
1226
-
1227
- #aiosp_settings_form ul.sfwd_debug_settings li {
1228
- clear: left;
1229
- margin: 0;
1230
- padding: 0;
1231
- background-color: #EEE;
1232
- overflow: auto;
1233
- max-width: 75%;
1234
- min-width: 800px;
1235
- }
1236
-
1237
- #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) {
1238
- background-color: #DDD;
1239
- }
1240
-
1241
- div.sfwd_debug_mail_sent {
1242
- background-color: #080;
1243
- border: 1px solid #0A0;
1244
- margin: 10px 0 10px 0;
1245
- width: 598px;
1246
- color: #FFF;
1247
- text-align: center;
1248
- }
1249
-
1250
- div.sfwd_debug_error {
1251
- background-color: #F00;
1252
- color: #FFF;
1253
- border: 1px solid #A00;
1254
- margin: 10px 0 10px 0;
1255
- width: 598px;
1256
- text-align: center;
1257
- font-weight: bolder;
1258
- }
1259
-
1260
- #aiosp_performance_status_wrapper .aioseop_option_div {
1261
- max-height: 420px;
1262
- }
1263
-
1264
- #aioseop_coming_soon, #aioseop_coming_soon2 {
1265
- padding-top: 40px;
1266
- text-align: center;
1267
- height: 258px;
1268
- font-size: 16px;
1269
- }
1270
-
1271
- .MRL {
1272
- margin-left: 20px !important;
1273
- margin-bottom: 10px !important;
1274
- }
1275
-
1276
- /**
1277
- * Edit Post screen specific styling
1278
- *
1279
- */
1280
- .postbox-container .aioseop_option_div {
1281
- width: 100%;
1282
- }
1283
-
1284
- .postbox-container .aioseop_option_div input[type="text"],
1285
- .postbox-container .aioseop_option_div textarea {
1286
- width: 99%;
1287
- max-width: 900px;
1288
- }
1289
-
1290
- .postbox-container .aioseop_option_label {
1291
- max-width: none;
1292
- height: auto !important;
1293
- }
1294
-
1295
- .postbox-container .aioseop_wrapper {
1296
- padding: 0;
1297
- }
1298
-
1299
- .postbox-container .aioseop_input {
1300
- display: block;
1301
- margin-bottom: 10px;
1302
- padding: 0;
1303
- }
1304
-
1305
- .postbox-container .aioseop_option_input {
1306
- width: 63%;
1307
- padding: 0;
1308
- }
1309
-
1310
- .postbox-container div#aiosp_upgrade_wrapper {
1311
- float: none;
1312
- width: auto;
1313
- margin: 0;
1314
- padding: 0;
1315
- }
1316
-
1317
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input {
1318
- display: block;
1319
- padding: 0;
1320
- }
1321
-
1322
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input {
1323
- float: none;
1324
- width: auto;
1325
- padding: 0;
1326
- }
1327
-
1328
- .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div {
1329
- width: auto;
1330
- min-height: 0;
1331
- padding: 10px 0;
1332
- }
1333
-
1334
- .aioseop_tabs .aioseop_options {
1335
- margin: 0;
1336
- }
1337
-
1338
- #aioseop_opengraph_settings .aioseop_options {
1339
- clear: both;
1340
- margin-top: 35px;
1341
- }
1342
-
1343
- #aioseop_opengraph_settings .aioseop_option_input {
1344
- width: 70%;
1345
- }
1346
-
1347
- /**
1348
- * Preview Snippet styling
1349
- *
1350
- */
1351
- div#aiosp_snippet_wrapper {
1352
- border: 1px solid #888;
1353
- clear: both;
1354
- padding: 10px 10px 0;
1355
- max-width: 97%;
1356
- margin-bottom: 15px;
1357
- }
1358
-
1359
- div#aiosp_snippet_wrapper .aioseop_option_label {
1360
- height: auto !important;
1361
- }
1362
-
1363
- div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input {
1364
- margin: 0;
1365
- }
1366
-
1367
- div#aioseop_snippet {
1368
- font-family: arial, sans-serif;
1369
- font-size: 13px;
1370
- }
1371
-
1372
- div#aioseop_snippet > h3 {
1373
- margin: 10px 0 5px;
1374
- font-size: 18px;
1375
- border: 0;
1376
- background: inherit;
1377
- font-weight: normal;
1378
- }
1379
-
1380
- div#aioseop_snippet > h3 > a {
1381
- color: #12c;
1382
- text-decoration: none;
1383
- cursor: pointer;
1384
- }
1385
-
1386
- div#aioseop_snippet > div {
1387
- color: #545454;
1388
- max-width: 48em;
1389
- }
1390
-
1391
- div#aioseop_snippet > div > div {
1392
- display: block;
1393
- margin-bottom: 1px;
1394
- }
1395
-
1396
- div#aioseop_snippet > div > div > cite {
1397
- color: #093;
1398
- font-style: normal;
1399
- }
1400
-
1401
- div#aioseop_snippet > div > span {
1402
- margin: 0;
1403
- padding: 0;
1404
- border: 0;
1405
- }
1
+ /**
2
+ * Controls all the styling of the plugin.
3
+ *
4
+ * @author Michael Torbert.
5
+ * @author Semper Fi Web Design.
6
+ * @copyright http://semperplugins.com
7
+ * @package All-in-One-SEO-Pack.
8
+ */
9
+
10
+ .form-table.aioseop {
11
+ clear: none;
12
+ }
13
+
14
+ .form-table.aioseop td {
15
+ vertical-align: top;
16
+ padding: 16px 0 10px 0;
17
+ line-height: 20px;
18
+ font-size: 12px;
19
+ }
20
+
21
+ .form-table.aioseop th {
22
+ width: 200px;
23
+ padding: 10px 0 12px 9px;
24
+ }
25
+
26
+ .aioseop_help_text_link,
27
+ .aioseop_help_text_link:active {
28
+ text-align: left;
29
+ float: left;
30
+ max-width: 300px;
31
+ min-width: 1px;
32
+ padding-top: 2px;
33
+ outline: none;
34
+ color: #888;
35
+ font-family: sans-serif;
36
+ }
37
+
38
+ .aioseop_help_text_link span {
39
+ font-size: 14px;
40
+ }
41
+
42
+ .aioseop_help_text_link:before {
43
+ content: "\f223";
44
+ font-size: 27px;
45
+ font-family: dashicons;
46
+ vertical-align: middle;
47
+ }
48
+
49
+ #aioseop-support .aioseop_metabox_text,
50
+ #aioseop-support a {
51
+ font-size: 14px;
52
+ color: #000;
53
+ text-decoration: none;
54
+ }
55
+
56
+ .aioseop_icon {
57
+ display: inline-block;
58
+ width: 40px;
59
+ height: 40px;
60
+ background-repeat: no-repeat;
61
+ background-size: 100%;
62
+ vertical-align: middle;
63
+ margin: 10px;
64
+ }
65
+
66
+ .aioseop_book_icon {
67
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABABAMAAABYR2ztAAAAKlBMVEUAAAAAn+cAneEAnuABnuEBnuEAnuEAn+QAn+QAneAAnuEAneAAnuAAneFPI9ocAAAADnRSTlMAII/P/wCQMADwANDvnyPbz6kAAAB9SURBVHgB7c+xCQMgEIVhZwiSSRzhkRBImsA5gVUmuBGcJbUDxlhY6T2wvh/sPvBd+HdJWCSj0N8bsEEiIIOAyEBhIDGAcwA4cDBy4MDBTeuqCR5abXCvBHy+6ybQrs2R0jsH/As+srEzC55qggi81AIZ+waQxkBmQK5tD34LnXJVZf9y5gAAAABJRU5ErkJggg==);
68
+ }
69
+
70
+ .aioseop_cog_icon {
71
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAeFBMVEUAAAAAn+MAnOIAn+cAneIAneEAn+MAnuEAneIAnuAAnuAAneEAn+cAn+QAn98AnuEAn98AneAAneEAneAAnOIAnuAAnuEAnuAAneEAn+EAnuEAnuAAneEAneAAneAAn+QAnuEAnuABnuEAneAAn+EAnuIAnuMBnuHeY3dlAAAAJ3RSTlMAQFAAYIAAkADP3wAgMACgEACfrwC/X++PbwAAcODwALDAANAATz8hP00ZAAACHklEQVR4Xq3XbWObIBAHcPAJJRjJVmtso4vL2vv+33AzJO2J/LuE9PfGFyR4HHiAgCQxyRMiYEtGTL5BBGzJiVEviIAtFTH6FRGowdBC/QsQqKGhhebeIdTkqe+LwFbkqew2SGyDftDKz12Q2AXYlhgeA46AD/G5oyD9zJO0zIEhvXd91L0mSPcmnZlek0nPhHu4mKu2ov+q2rZzOWE5kBRBFjNRzDRFqD6X8oGiHK5fo+0oSmcv06goknLfQk3RzHkaWwIGlUhrZaIGAto5iQn6uyw+yAFOpSgUTDEHJqqZc5DR2rgqw8lIa7mbRkkMLOOBoWZlWYrynwzGzx1C/3cdlEcvf7sgL5MTq8rGz22QNwjDP+cGBYBDOC6qcnLTNqQCeRbuYdEU4In47YjL84RSwEk+Tq8qT7xvhMc5eXsj78Buga866O4dQrXs4OEk3jaNTWC1Cfc43nSa0MQ0fCFFLWXL9saWFjQMgFOfEUR+zsl1KWeRBaWr3e7c01q3Lmld+FfiSVFQ/2ehp6B8IzaorGvJ8q8Jl/ViIkDv396tfX/bawKm81J+eGtLH91cX+xIUUZ7XYmPHTBmA0U4feMh6zqVwzTe8ubQvmBoUJeDphoIGtT5tVaq0Ttopvyom4M4xqz8YGXhiCLAnIKhg8N2iA30cLzrxmJH/H4cASejrjzcFHXpwrcukwIiRQZv2QICtjQP352/9fYuC+Qv593CTVvcgwkAAAAASUVORK5CYII=);
72
+ }
73
+
74
+ .aioseop_file_icon {
75
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAPFBMVEUAAAAAneAAn98AneIAneEAnuAAn+QAnuAAnuAAnuEAn+MAnuEAneAAnuEAn+EAneEAnOIAnuEAnuABnuG5yOaaAAAAE3RSTlMA0BBgn88wv++gQLCvX2+PUJDAyp/15gAAALdJREFUeF7t1z2ygzAMhVFJjm0C5Ff732uaMCSWCVzTJO/paz1zRsVtTM/OUT+Wx5PQchJ1Q2O/CETdVk51IOjWugAeYLvUAEU6rAO4oLhQB2bSvh+NAAKU2AgYQGIEDHgXbjhQCFcYKIQuoUApZBQwQg8CRhhAwArSBlCagNAI0LTqAQCq3fcC+jOA7e8DDuhK/wDwHfgOfAe+A98B2BcC3Aaw+XiCBdp3AtOcNAgs9FoACZ7ufwCe6pfMGb29UwAAAABJRU5ErkJggg==);
76
+ }
77
+
78
+ .aioseop_help_icon {
79
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAflBMVEUAAAAAn98AnuIAn+EAneAAnuAAnuAAn+QAn+QAneEAnuAAnuAAn+EAnuAAnuEAneAAn+cAneAAnuAAn98AnOIAnuEAneIAn+MAnuEAnuEAn+EAneIAneEAneEAnuEAn+MAneAAneEAnuMAnOIAn+cAneEBnuEAneAAnuMBnuEoGewkAAAAKXRSTlMAEE9/r7/fADCPzwBv718AIPDAAFCwYEAAoAAAn4CQAOAAPwAAcADQAFP96WQAAAMNSURBVHhelZcNc5swDIatBghpoCGEj9Jij2XLMv3/P7glkoNtZJo+d+0lhBOveSXZUjHgZZOkGf4nS5PNC5wiKPFqvnvFgNddvpVQy0tQZCiSFfCEAtiUGKXcwFcB3kpcpXx791HetypFn2NdH9EnrX67KPdL46g/tl3PeqHvWidM2fxyUM7n3fzgof8R0A9zjN3PGTV/HB+6teg66EeIUQqQIGOiSQMGmeRgUQfGPn/Ktyv0k9UQKrCxWzitAq3V6dvYIDG8f8mAROO6ULF/3ecTaHazcvIgjTw/PxfFeVFErCHd31C3fx2v39cKGy6qLKyA1tGr/v8BLWDyb3OLqiw+XGCiq8DFxIvypMKIHqMXvaeLmmyEkn1xSTCAjWcMS7gruFD+eo/QuEC7AYCy+nJXkC1/r5A4Gq2NrQCvjMnL7OZCLggY3KoAI5jMEvKt2hohBYK3wiveuwx8i3qn/uvVf0O2Hh5MnLwOZMTrXgGt4OCi7RuyXNg1F1oDqEZIQh2K6oUALalSWqgiIwUIM4VVqZZvdlkE7QQFFLRVNS3l5NLZarMkgkx6ebWiNPqzSu9nEkM2KDZhjbykh+19KKri3+LkIxLhVlE/E4CaAjsd4AYo9zJkR9huGF7CtPYSX9FyXG4XFHe2UQIt9fIGa6NNJBErX2r35O0wp7KEbZYSNpVtMYngSpbZYoI1G9YClFzOp+vKS6jviLFJ+fWgDralfZO5peW2xX8LKB9NdTtxsQuc7/wV0OTv/YRyiUuIugCls7FwizffsXHgzcRurjEjYgH8zdVKyODZJUDGAuxZubNnt5BIgMQ7YNyowy2c0XfCqyNX6HzE2Ve8A28+nmDDHaJyD9sNChpkxvCYRxgkEjitAkl40AzPjxm7KdNnSAzLgaNFZhcVATtkBmliGaTJSJ6mBnnkMWgpx+XAMZZoMbGZqXEHm6Q4sxA4F4k7DEkjD1PVGJCmGFDLQ5elO+Iqx7B/q88A0FKI+DSlBLMuE4pMF3h6+DZXDLia6PAtA41u67uUqW51E02uf46zvXx+HY4YAAAAAElFTkSuQmCC);
80
+ }
81
+
82
+ .aioseop_support_icon {
83
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAe1BMVEUAAAAAn98AnuIAn+EAneAAnuAAnuABnuEAn98An+QAneEAnuAAn+QAn+EAnuAAnuEAneAAnuEAneIAn+MAn+cAn+cAnuEAnuEAnOIAneEAneEAnOIAnuAAneEAn+MAneAAneEAneIAnuEAnuIAneAAnuAAneABnuEAnuPdwDkgAAAAKXRSTlMAEE9/r7/f/wAwj88Ab+9f0JBgQCAAALBQcAAAAJ8AAIAAoADgwPAAP4Dl7rAAAALsSURBVHgBtdcBc6I6EAfwRCH/KjUSTCW2eHK8kHff/xM+Dg5NlsTTOu830xmc0BhJdtllKXy1znKBgciz9Yq/JbC3mM22AFFsN+8x7H2B7wSixI4/sAK+lkiSa/63CfbXfy9VddAfA32oVHmdYn8MsaNP55jUhpOFmRqTXH/4mP/BSExOnxEnTKT58jDveouZaCIEZltvWna7POPm8GPhgJtzbIIMnvq4UMOTXWZsvjgjoD8IjcCZrkAh1H4SLUIq3EYDQjSEBGH8XdASVPUzUIGS2jsHORbyJpC8gzWDChGaPsL4ItnwxyUiuuPqnBdAkW9X/3SIkPxPMLWIkZJcL7XTNnKJb5J8XMEJ33YaVyCQYJUZ0tjGKIsE8XsXNuNUFpStvFMQGR4Xvhlyoppi51AjUAcZhdPRIVzr8UCzYzEfS91afxOJDle2Hc9IBaBoGMdg/raq/3s49/NPm/6TGQDl5Up3DoCN5G9uAbjOO6AlAMPa8Zd4JI0kP55k41EAWlaT+w0Ae4mytyAenQDUrCcZsCMr8igydADQM0ECrydf4zEA+uZGAygYBv96ivF4RG3GffNgsJiAfr439v9MUN7/CeXFgwGzrz1Eu9hG9eQ2Rg+SaKJE5CB1y6Ps7h1ld/FMR9mEm6vPEoCIBZMAIM/e8xoTQRjO+5y8fT0ZJvlc5PwJ57fymlDWMloBLKoHsb4mlPLCLnNKyxDIwpRGR72UtsEgUhoKrx7bR4Z3c1J9Tyft7ep3Wl9t04l/rFBefrFwh29y/N7L1TlynXy5JpbQHY3qS6Dslfnq4guYa+UXC4xBj4W+CSTvYFMEuOeLLKf9Ytssd5hw6TJv9FKhOeqeK3W7ZcNRP1Nsd7GOpXu83O/iLY8ij5CwmKlUz2TcIy2PIy2PT/eYZLRV5fsMk542XaHK3VrV/a+p7fu1uzWyjiZs9pPgrUOSa6ONJ8FPFlH2xB9uvlUJolTJ5juOm7buLQa2r1uvkSX+A/xd+1xZLxG0AAAAAElFTkSuQmCC);
84
+ }
85
+
86
+ .aioseop_youtube_icon {
87
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAARVBMVEUAAAAAn+cAn+EAneAAnuABnuEAn+cAn98AneEAn98AnOIAnuAAnOIAneIAneIAnuEAnuEAneEAnuEBnuEAn+QAneAAneCXjc90AAAAF3RSTlMAIG+vz/8AEJ8AUO8AYACgAHCwADDw0E/SOHoAAAEBSURBVHgB7dbBjsIgGATgH+UvCAso3fL+j7rDYZMerGGZQ5NNv8TrREZLRy47F3O7Wx1m7zezAMjSOa9/5t2jkweEqBNi+ALBJ+mklHOWnINOC/0buKjTokMHRQnlKUYpRl5HBQ32KFXfW783HVDFHgWsrg0EWNEDK4z0+yEAEhuAIsgAFMEFQOECILEBKIIMQBFcABQuABIbgCLIABTBBUBhAzx5BEuWGM/9GT35V7bkwxTPfZw9eaVZ8lKN517rI8NHmr43cPyufXi5Rh1Q+dc7PTAWduI83abTNteHJjvz6KEJYeoU2+/UBVcm+tuNbTCv2nRYq2k/9ylXwL8I+AGj+lzlceKDYQAAAABJRU5ErkJggg==);
88
+ }
89
+
90
+ .aioseop_meta_box_help > label {
91
+ position: absolute;
92
+ margin-left: 8px;
93
+ }
94
+
95
+ div.aioseop_tip_icon {
96
+ font-size: 14px;
97
+ border: 1px solid #888;
98
+ width: 1em;
99
+ text-align: center;
100
+ padding: 0 4px;
101
+ -webkit-border-radius: 12px;
102
+ -moz-border-radius: 12px;
103
+ -webkit-box-shadow: 1px 1px 1px #888;
104
+ -moz-box-shadow: 1px 1px 1px #888;
105
+ box-shadow: 1px 1px 1px #888;
106
+ border-radius: 12px;
107
+ }
108
+
109
+ div.aioseop_tip_icon:before {
110
+ content: '?';
111
+ }
112
+
113
+ .aioseop_help_text_link img {
114
+ width: 40px;
115
+ float: left;
116
+ }
117
+
118
+ .aioseop_meta_box_help,
119
+ .aioseop_meta_box_help:active {
120
+ float: right;
121
+ padding-left: 0;
122
+ width: 16px;
123
+ margin-right: 32px;
124
+ text-decoration: none;
125
+ height: 15px;
126
+ padding-top: 1px;
127
+ position: relative;
128
+ }
129
+
130
+ .aioseop_tabs .aioseop_meta_box_help,
131
+ .aioseop_tabs .aioseop_meta_box_help:active {
132
+ margin-top: 4px;
133
+ margin-right: 45px;
134
+ }
135
+
136
+ .aioseop_label {
137
+ color: #5F5F5F;
138
+ font-weight: bold;
139
+ line-height: 19px;
140
+ display: inline-block;
141
+ text-align: left;
142
+ position: absolute;
143
+ font-family: 'Open Sans', sans-serif;
144
+ width: 26%;
145
+ min-width: 120px;
146
+ max-width: 230px;
147
+ }
148
+
149
+ .aioseop_option_div {
150
+ max-height: 360px;
151
+ min-height: 37px;
152
+ width: 95%;
153
+ overflow-y: auto;
154
+ }
155
+
156
+ .aioseop_overflowed {
157
+ border: 1px solid #e1e1e1;
158
+ }
159
+
160
+ .aioseop input[type="text"] {
161
+ color: #515151;
162
+ height: 35px;
163
+ padding: 10px 0 10px 10px;
164
+ font-size: 14px;
165
+ width: 95%;
166
+ max-width: 600px;
167
+ }
168
+
169
+ .aioseop textarea {
170
+ color: #515151;
171
+ padding: 10px 0 0 10px;
172
+ margin: 0;
173
+ font-size: 14px;
174
+ line-height: 25px;
175
+ width: 95%;
176
+ max-width: 600px;
177
+ }
178
+
179
+ .aioseop_help_text_div {
180
+ text-align: left;
181
+ width: 100%;
182
+ margin: 0;
183
+ }
184
+
185
+ .aioseop_help_text {
186
+ font-size: 12px;
187
+ float: left;
188
+ clear: left;
189
+ color: #797979;
190
+ line-height: 15px;
191
+ font-style: italic;
192
+ }
193
+
194
+ .aioseop_head_tagline {
195
+ color: #5F5F5F;
196
+ font-size: 13px;
197
+ }
198
+
199
+ .aioseop_head_nav {
200
+ float: left;
201
+ font-size: 18px;
202
+ margin: 0 0 16px 0;
203
+ font-family: "HelveticaNeue-Light",
204
+ "Helvetica Neue Light",
205
+ "Helvetica Neue",
206
+ sans-serif;
207
+ border-bottom: 1px solid #CCC;
208
+ width: 100%;
209
+ }
210
+
211
+ .aioseop_head_nav_tab {
212
+ padding: 10px 15px 10px 15px;
213
+ margin: 0 0 0 15px;
214
+ border-radius: 4px 4px 0 0;
215
+ border: 1px solid #CCC;
216
+ border-bottom: 0 white;
217
+ float: left;
218
+ opacity: 0.5;
219
+ color: black;
220
+ text-shadow: white 0 1px 0;
221
+ text-decoration: none;
222
+ }
223
+
224
+ .aioseop_head_nav_tab.aioseop_head_nav_active {
225
+ opacity: 1;
226
+ margin-bottom: -1px;
227
+ border-width: 1px;
228
+ }
229
+
230
+ .aioseop_head_nav_tab:first-child {
231
+ margin-left: 0;
232
+ }
233
+
234
+ .aioseop_head_nav_tab:hover {
235
+ opacity: 1;
236
+ }
237
+
238
+ .aioseop_header {
239
+ float: left;
240
+ clear: left;
241
+ }
242
+
243
+ .aioseop_advert {
244
+ padding: 10px;
245
+ margin-bottom: 30px;
246
+ border: 1px solid #DDD;
247
+ height: 200px;
248
+ width: 423px;
249
+ }
250
+
251
+ .aioseop_nopad {
252
+ padding-left: 0;
253
+ padding-top: 0;
254
+ }
255
+
256
+ .aioseop_nopad_all {
257
+ padding: 0;
258
+ height: 220px;
259
+ width: 445px;
260
+ margin-bottom: 20px;
261
+ border: none;
262
+ }
263
+
264
+ .aioseop_adverts {
265
+ float: right;
266
+ }
267
+
268
+ .wincherad {
269
+ width: 100%;
270
+ height: 100%;
271
+ background-size: 100%;
272
+ background-repeat: no-repeat;
273
+ margin-bottom: 0;
274
+ border: none;
275
+ }
276
+
277
+ #wincher21 {
278
+ background-image: url(../../modules/images/banner21.jpg);
279
+ }
280
+
281
+ #wincher22 {
282
+ background-image: url(../../modules/images/banner22.jpg);
283
+ }
284
+
285
+ .aioseop_content {
286
+ min-width: 760px;
287
+ clear: left;
288
+ }
289
+
290
+ .aioseop_options_wrapper .hndle {
291
+ font-size: 15px;
292
+ font-family: Georgia,
293
+ "Times New Roman",
294
+ "Bitstream Charter",
295
+ Times,
296
+ serif;
297
+ font-weight: normal;
298
+ padding: 7px 10px;
299
+ margin: 0;
300
+ line-height: 1;
301
+ }
302
+
303
+ .aioseop_options_wrapper .submit input.button-primary {
304
+ margin-bottom: 5px;
305
+ }
306
+
307
+ #aiosp_feature_manager_metabox.postbox {
308
+ margin-top: 20px;
309
+ float: left;
310
+ }
311
+
312
+ .aioseop_advert p {
313
+ margin: 25px 0 25px 0;
314
+ }
315
+
316
+ .aioseop_options_wrapper .postarea {
317
+ border-color: #DFDFDF;
318
+ -moz-box-shadow: inset 0 1px 0 #fff;
319
+ -webkit-box-shadow: inset 0 1px 0 #fff;
320
+ box-shadow: inset 0 1px 0 #fff;
321
+ -moz-border-radius: 3px;
322
+ -webkit-border-radius: 3px;
323
+ border-radius: 3px;
324
+ }
325
+
326
+ .aioseop_advert h3 {
327
+ padding: 0;
328
+ margin-top: 6px;
329
+ }
330
+
331
+ .aioseop_metabox_text p {
332
+ margin: 0 0 0 0;
333
+ width: 101%;
334
+ }
335
+
336
+ .aioseop_sidebar {
337
+ width: 457px;
338
+ margin-left: 10px;
339
+ }
340
+
341
+ .aioseop_metabox_text {
342
+ margin-bottom: 0;
343
+ }
344
+
345
+ .aioseop_metabox_wrapper {
346
+ padding: 0;
347
+ }
348
+
349
+ .aioseop_metabox_text *:last-child {
350
+ margin: 0;
351
+ }
352
+
353
+ .aioseop_metabox_feature {
354
+ margin-top: 20px;
355
+ }
356
+
357
+ .aioseop_translations {
358
+ margin-top: 15px;
359
+ }
360
+
361
+ .aioseop_option_label {
362
+ float: left;
363
+ margin: 0;
364
+ min-width: 150px;
365
+ width: 37%;
366
+ max-width: 270px;
367
+ padding-top: 3px;
368
+ padding-bottom: 3px;
369
+ height: 67px !important; /*added for certain language support*/
370
+ }
371
+
372
+ .aioseop_metabox_text h2 {
373
+ font-size: 14px;
374
+ padding: 0;
375
+ font-weight: bold;
376
+ line-height: 29px;
377
+ }
378
+
379
+ #aioseop-about {
380
+ width: 443px;
381
+ margin-bottom: 20px;
382
+ }
383
+
384
+ #aioseop-about .aioseop_metabox_text #mc-embedded-subscribe-form h2 {
385
+ font-size: 13px;
386
+ }
387
+
388
+ .aioseop_sidebar #mc-embedded-subscribe-form {
389
+ margin: 0 0 10px 0;
390
+ background: white;
391
+ padding: 10px 10px;
392
+ border: 1px solid #DDD;
393
+ }
394
+
395
+ #aioseop-about .aioseop_metabox_text ul {
396
+ list-style-type: disc;
397
+ padding-left: 15px;
398
+ }
399
+
400
+ .aioseop input[readonly] {
401
+ background-color: #EEE;
402
+ margin: 5px 0 5px 0 !important;
403
+ }
404
+
405
+ .aioseop_settings_left {
406
+ float: left;
407
+ padding: 0;
408
+ margin: 0;
409
+ width: 100%;
410
+ }
411
+
412
+ body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left {
413
+ margin-top: 20px;
414
+ }
415
+
416
+ body.all-in-one-seo_page_all-in-one-seo-pack-pro-aioseop_feature_manager .aioseop_settings_left {
417
+ margin-top: 20px;
418
+ }
419
+
420
+ #aioseop_top_button {
421
+ margin-top: 5px;
422
+ height: 30px;
423
+ }
424
+
425
+ #aioseop-list #mce-EMAIL {
426
+ margin-top: 5px;
427
+ width: 250px;
428
+ }
429
+
430
+ .aioseop_top {
431
+ margin: 10px 10px 0 0;
432
+ /* margin: 10px 477px 0px 0px; */
433
+ }
434
+
435
+ .aioseop_top #aioseop-list {
436
+ margin-bottom: 0;
437
+ }
438
+
439
+ .aioseop_top #aioseop-list.postbox.closed {
440
+ overflow: hidden;
441
+ }
442
+
443
+ .aioseop_right_sidebar {
444
+ float: right;
445
+ margin-top: 35px;
446
+ }
447
+
448
+ #aiosp_settings_form .button-primary.hidden {
449
+ display: none;
450
+ }
451
+
452
+ form#edittag div#aiosp_titleatr_wrapper,
453
+ form#edittag div#aiosp_menulabel_wrapper,
454
+ form#edittag div#aiosp_sitemap_exclude_wrapper {
455
+ display: none;
456
+ }
457
+
458
+ .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > #aioseop_top_button {
459
+ height: 5px;
460
+ position: absolute;
461
+ top: 0;
462
+ width: 97%;
463
+ }
464
+
465
+ .All_in_One_SEO_Pack_Feature_Manager > #aiosp_settings_form > .aioseop_settings_left {
466
+ margin-top: 10px;
467
+ }
468
+
469
+ .All_in_One_SEO_Pack_Feature_Manager > .aioseop_right_sidebar.aioseop_options_wrapper {
470
+ margin-top: 10px;
471
+ }
472
+
473
+ div#aiosp_feature_manager_metabox .inside {
474
+ padding: 8px;
475
+ }
476
+
477
+ div.aioseop_feature {
478
+ position: relative;
479
+ display: inline-block;
480
+ float: left;
481
+ vertical-align: top;
482
+ width: 240px;
483
+ height: 288px;
484
+ margin: 8px;
485
+ border: 1px solid #DEDEDE;
486
+ -moz-border-radius: 3px;
487
+ -webkit-border-radius: 3px;
488
+ border-radius: 3px;
489
+ background: white;
490
+ padding: 10px 0 0;
491
+ -webkit-box-shadow: inset 0 1px 0 #fff,
492
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
493
+ 0 1px 2px rgba(0, 0, 0, 0.1);
494
+ -moz-box-shadow: inset 0 1px 0 #fff,
495
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
496
+ 0 1px 2px rgba(0, 0, 0, 0.1);
497
+ box-shadow: inset 0 1px 0 #fff,
498
+ inset 0 0 20px rgba(0, 0, 0, 0.05),
499
+ 0 1px 2px rgba(0, 0, 0, 0.1);
500
+ -webkit-transition-duration: .4s;
501
+ -moz-transition-duration: .4s;
502
+ }
503
+
504
+ .aioseop_feature .flag {
505
+ float: right;
506
+ margin-right: -7px;
507
+ background: none repeat scroll 0 0 #D23D46;
508
+ color: #FFFFFF;
509
+ padding: 5px 12px 6px 5px;
510
+ position: relative;
511
+ }
512
+
513
+ .aioseop_feature .flag:before {
514
+ border-color: #D23D46 #D23D46 #D23D46 transparent;
515
+ border-style: solid;
516
+ border-width: 14px 4px 15px 10px;
517
+ content: "";
518
+ left: -14px;
519
+ position: absolute;
520
+ top: 0;
521
+ }
522
+
523
+ .aioseop_feature .flag:after {
524
+ border-color: #892026 transparent transparent;
525
+ border-style: solid;
526
+ border-width: 6px 6px 6px 0;
527
+ bottom: -12px;
528
+ content: "";
529
+ position: absolute;
530
+ right: 0;
531
+ }
532
+
533
+ .aioseop_feature .flag.pro {
534
+ display: none;
535
+ }
536
+
537
+ #aioseop_coming_soon .free.flag,
538
+ .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager .aioseop_feature .free.flag {
539
+ display: none;
540
+ }
541
+
542
+ #aioseop_coming_soon .flag.pro {
543
+ display: block;
544
+ margin-top: -30px;
545
+ }
546
+
547
+ .all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aioseop_coming_soon .flag.pro {
548
+ display: none;
549
+ }
550
+
551
+ .aioseop_feature h3 {
552
+ font-size: 17px;
553
+ margin: 0;
554
+ padding: 0 10px 5px 10px;
555
+ font-weight: normal;
556
+ font-style: normal;
557
+ font-family: "Helvetica Neue",
558
+ Helvetica,
559
+ Arial,
560
+ "Lucida Grande",
561
+ Verdana,
562
+ "Bitstream Vera Sans",
563
+ sans-serif;
564
+ }
565
+
566
+ .aioseop_feature p {
567
+ line-height: 150%;
568
+ font-size: 12px;
569
+ font-family: Georgia,
570
+ "Times New Roman",
571
+ "Bitstream Charter",
572
+ Times, serif;
573
+ margin-bottom: 20px;
574
+ color: #666;
575
+ padding: 0 10px;
576
+ }
577
+
578
+ .aioseop_feature p.aioseop_desc {
579
+ min-height: 80px;
580
+ }
581
+
582
+ .aioseop_feature .feature_button {
583
+ float: right;
584
+ margin-bottom: 10px;
585
+ margin-right: 10px;
586
+ min-width: 80px;
587
+ text-align: center;
588
+ }
589
+
590
+ .aioseop_feature .feature_button:before {
591
+ content: "Activate";
592
+ }
593
+
594
+ .aioseop_feature .active.feature_button:before {
595
+ content: "Deactivate";
596
+ }
597
+
598
+ div.aioseop_feature .aioseop_featured_image {
599
+ min-height: 100px;
600
+ background-repeat: no-repeat;
601
+ display: block;
602
+ margin: 0 auto;
603
+ width: 133px;
604
+ }
605
+
606
+ div.aioseop_feature .aioseop_featured_image {
607
+ background-image: url(../../modules/images/Default-BW-Standard.png);
608
+ }
609
+
610
+ div.aioseop_feature .aioseop_featured_image.active {
611
+ background-image: url(../../modules/images/Default-Color-Standard.png);
612
+ }
613
+
614
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
615
+ background-image: url(../../modules/images/XMLSitemaps-BW-Standard.png);
616
+ }
617
+
618
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
619
+ background-image: url(../../modules/images/XMLSitemaps-Color-Standard.png);
620
+ }
621
+
622
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
623
+ background-image: url(../../modules/images/VideoSitemap-BW-Standard.png);
624
+ }
625
+
626
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
627
+ background-image: url(../../modules/images/VideoSitemap-Color-Standard.png);
628
+ }
629
+
630
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
631
+ background-image: url(../../modules/images/SocialMeta-BW-Standard.png);
632
+ }
633
+
634
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
635
+ background-image: url(../../modules/images/SocialMeta-Color-Standard.png);
636
+ }
637
+
638
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
639
+ background-image: url(../../modules/images/Robots-BW-Standard.png);
640
+ }
641
+
642
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
643
+ background-image: url(../../modules/images/Robots-Color-Standard.png);
644
+ }
645
+
646
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
647
+ background-image: url(../../modules/images/FileEditor-BW-Standard.png);
648
+ }
649
+
650
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
651
+ background-image: url(../../modules/images/FileEditor-Color-Standard.png);
652
+ }
653
+
654
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
655
+ background-image: url(../../modules/images/ImporterExporter-BW-Standard.png);
656
+ }
657
+
658
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
659
+ background-image: url(../../modules/images/ImporterExporter-Color-Standard.png);
660
+ }
661
+
662
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image {
663
+ background-image: url(../../modules/images/Performance-BW-Standard.png);
664
+ }
665
+
666
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
667
+ background-image: url(../../modules/images/Performance-Color-Standard.png);
668
+ }
669
+
670
+ div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
671
+ background-image: url(../../modules/images/Default-Color-Standard.png);
672
+ }
673
+
674
+ div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
675
+ background-image: url(../../modules/images/Default-Color-Standard.png);
676
+ }
677
+
678
+ .All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table,
679
+ .All_in_One_SEO_Pack_Video_Sitemap > form > .wrap > .form-table {
680
+ max-width: 500px;
681
+ clear: none;
682
+ }
683
+
684
+ .aioseop_follow_button {
685
+ min-height: 50px;
686
+ background-repeat: no-repeat;
687
+ display: inline-block;
688
+ width: 100px;
689
+ background-size: auto 50px !important;
690
+ margin-right: 0;
691
+ }
692
+
693
+ .aioseop_facebook_follow {
694
+ background-image: url(../../modules/images/facebook-follow-standard.png);
695
+ }
696
+
697
+ .aioseop_twitter_follow {
698
+ background-image: url(../../modules/images/twitter-follow-standard.png);
699
+ }
700
+
701
+ @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) {
702
+ div.aioseop_feature .aioseop_featured_image {
703
+ background-size: auto 100px !important;
704
+ }
705
+
706
+ div.aioseop_feature .aioseop_featured_image.active {
707
+ background-image: url(../../modules/images/Default-Color-Retina.png);
708
+ }
709
+
710
+ div.aioseop_feature .aioseop_featured_image {
711
+ background-image: url(../../modules/images/Default-BW-Retina.png);
712
+ }
713
+
714
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
715
+ background-image: url(../../modules/images/XMLSitemaps-BW-Retina.png);
716
+ }
717
+
718
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
719
+ background-image: url(../../modules/images/XMLSitemaps-Color-Retina.png);
720
+ }
721
+
722
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image {
723
+ background-image: url(../../modules/images/VideoSitemap-BW-Retina.png);
724
+ }
725
+
726
+ div.aioseop_feature#aioseop_video_sitemap .aioseop_featured_image.active {
727
+ background-image: url(../../modules/images/VideoSitemap-Color-Retina.png);
728
+ }
729
+
730
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image {
731
+ background-image: url(../../modules/images/SocialMeta-BW-Retina.png);
732
+ }
733
+
734
+ div.aioseop_feature#aioseop_opengraph .aioseop_featured_image.active {
735
+ background-image: url(../../modules/images/SocialMeta-Color-Retina.png);
736
+ }
737
+
738
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image {
739
+ background-image: url(../../modules/images/Robots-BW-Retina.png);
740
+ }
741
+
742
+ div.aioseop_feature#aioseop_robots .aioseop_featured_image.active, div.aioseop_feature#aioseop_bad_robots .aioseop_featured_image.active {
743
+ background-image: url(../../modules/images/Robots-Color-Retina.png);
744
+ }
745
+
746
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image {
747
+ background-image: url(../../modules/images/FileEditor-BW-Retina.png);
748
+ }
749
+
750
+ div.aioseop_feature#aioseop_file_editor .aioseop_featured_image.active {
751
+ background-image: url(../../modules/images/FileEditor-Color-Retina.png);
752
+ }
753
+
754
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image {
755
+ background-image: url(../../modules/images/ImporterExporter-BW-Retina.png);
756
+ }
757
+
758
+ div.aioseop_feature#aioseop_importer_exporter .aioseop_featured_image.active {
759
+ background-image: url(../../modules/images/ImporterExporter-Color-Retina.png);
760
+ }
761
+
762
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image {
763
+ background-image: url(../../modules/images/Performance-BW-Retina.png);
764
+ }
765
+
766
+ div.aioseop_feature#aioseop_performance .aioseop_featured_image.active {
767
+ background-image: url(../../modules/images/Performance-Color-Retina.png);
768
+ }
769
+
770
+ div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
771
+ background-image: url(../../modules/images/Default-BW-Retina.png);
772
+ }
773
+
774
+ div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
775
+ background-image: url(../../modules/images/Default-BW-Retina.png);
776
+ }
777
+
778
+ .aioseop_facebook_follow {
779
+ background-image: url(../../modules/images/facebook-follow-retina.png);
780
+ }
781
+
782
+ .aioseop_twitter_follow {
783
+ background-image: url(../../modules/images/twitter-follow-retina.png);
784
+ }
785
+ }
786
+
787
+ .aioseop_options {
788
+ width: 100%;
789
+ margin: 18px 0 10px 0;
790
+ }
791
+
792
+ .aioseop_wrapper {
793
+ width: 100%;
794
+ padding-left: 5px;
795
+ }
796
+
797
+ .aioseop_input {
798
+ clear: left;
799
+ width: 100%;
800
+ padding: 5px;
801
+ display: inline;
802
+ }
803
+
804
+ .aioseop_option_input {
805
+ float: left;
806
+ width: 61%;
807
+ margin: 0;
808
+ padding-left: 1px;
809
+ min-width: 160px;
810
+ /* max-width: 900px; */
811
+ }
812
+
813
+ #aiosp_sitemap_addl_pages,
814
+ #aiosp_video_sitemap_addl_pages {
815
+ clear: left;
816
+ margin-left: 20px;
817
+ max-width: 1072px;
818
+ }
819
+
820
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,
821
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper {
822
+ width: 23%;
823
+ min-width: 165px;
824
+ display: inline-block;
825
+ max-width: 265px;
826
+ }
827
+
828
+ #aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,
829
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div {
830
+ position: absolute;
831
+ margin: 5px 0 10px 0;
832
+ }
833
+
834
+ #aiosp_sitemap_addl_pages_metabox .aioseop_option_input,
835
+ #aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input {
836
+ width: 94%;
837
+ min-width: 94%;
838
+ }
839
+
840
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table,
841
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table {
842
+ width: 96%;
843
+ border: 1px solid #CCC;
844
+ margin: 5px 0 10px 0;
845
+ }
846
+
847
+ table.aioseop_table tr:nth-child(odd) {
848
+ background-color: #EEE;
849
+ }
850
+
851
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr:nth-child(odd) {
852
+ background-color: rgba(238, 238, 238, 0.5);
853
+ }
854
+
855
+ table.aioseop_table td {
856
+ width: 23%;
857
+ }
858
+
859
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table {
860
+ width: 80%;
861
+ max-width: 800px;
862
+ display: block;
863
+ border-top: 1px solid #dfdfdf;
864
+ border-left: 1px solid #dfdfdf;
865
+ }
866
+
867
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table th {
868
+ width: 18%;
869
+ border-right: 1px solid #dfdfdf;
870
+ border-bottom: 1px solid #dfdfdf;
871
+ }
872
+
873
+ .All_in_One_SEO_Pack_Opengraph div.aioseop_meta_info {
874
+ margin-top: 10px;
875
+ border: 1px solid #dfdfdf;
876
+ width: 80%;
877
+ max-width: 800px;
878
+ }
879
+
880
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table tr.aioseop_table_header th {
881
+ background: #f1f1f1;
882
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
883
+ background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
884
+ background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
885
+ background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
886
+ background-image: linear-gradient(to top, #ececec, #f9f9f9);
887
+ padding: 5px;
888
+ border-bottom-color: #dfdfdf;
889
+ text-shadow: #fff 0 1px 0;
890
+ -webkit-box-shadow: 0 1px 0 #fff;
891
+ -moz-box-shadow: 0 1px 0 #fff;
892
+ box-shadow: 0 1px 0 #fff;
893
+ }
894
+
895
+ .All_in_One_SEO_Pack_Opengraph table.aioseop_table td {
896
+ border-right: 1px solid #dfdfdf;
897
+ border-bottom: 1px solid #dfdfdf;
898
+ }
899
+
900
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item {
901
+ display: inline-block;
902
+ width: 30%;
903
+ vertical-align: top;
904
+ }
905
+
906
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(even) {
907
+ font-weight: bold;
908
+ }
909
+
910
+ #aioseop_opengraph_settings_facebook_debug_result li.aioseop_opengraph_settings_facebook_debug_item:nth-child(odd) {
911
+ width: 70%;
912
+ }
913
+
914
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
915
+ #aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
916
+ width: 25%;
917
+ padding-left: 5%;
918
+ }
919
+
920
+ table.aioseop_table td, table.aioseop_table th {
921
+ padding: 3px;
922
+ }
923
+
924
+ .aioseop_top_label .aioseop_option_input,
925
+ .aioseop_no_label .aioseop_option_input {
926
+ width: 100%;
927
+ }
928
+
929
+ #aiosp_settings_form .postbox {
930
+ margin: 0 0 20px 0;
931
+ }
932
+
933
+ .aioseop_settings_left .postbox {
934
+ float: left;
935
+ width: 100%;
936
+ }
937
+
938
+ .aioseop_option_setting_label {
939
+ min-height: 35px;
940
+ display: inline-block;
941
+ white-space: nowrap;
942
+ overflow: hidden;
943
+ padding-left: 1px;
944
+ max-width: 229px;
945
+ min-width: 160px;
946
+ width: 33%;
947
+ }
948
+
949
+ .aioseop_settings_left .postbox .inside {
950
+ padding: 0;
951
+ margin: 0;
952
+ clear: right;
953
+ }
954
+
955
+ #aiosp_settings_form .aioseop_no_label, .aioseop_no_label {
956
+ float: left;
957
+ width: 92%;
958
+ max-width: 100%;
959
+ margin: 0 23px 0 13px;
960
+ }
961
+
962
+ #aiosp_sitemap_status_metabox .handlediv.button-link {
963
+ display: none;
964
+ }
965
+
966
+ #aiosp_sitemap_status_metabox.closed .inside {
967
+ display: block;
968
+ }
969
+
970
+ .aioseop_top_label {
971
+ width: 96%;
972
+ margin: 0 10px;
973
+ }
974
+
975
+ .aioseop_hidden_type {
976
+ margin: 0;
977
+ padding: 0;
978
+ height: 0;
979
+ }
980
+
981
+ #aiosp_title_metabox #aiosp_force_rewrites_wrapper {
982
+ display: none;
983
+ height: 0;
984
+ }
985
+
986
+ .aioseop_module.error.below-h2 {
987
+ padding: 5px 0;
988
+ margin: 0 477px 15px 0 !important;
989
+ }
990
+
991
+ #aioseop_opengraph_settings .inside {
992
+ margin: 0;
993
+ }
994
+
995
+ #aioseop_opengraph_settings_image_wrapper img {
996
+ width: auto;
997
+ height: 75px;
998
+ }
999
+
1000
+ #aioseop_opengraph_settings_image_wrapper .aioseop_option_setting_label {
1001
+ max-width: 160px;
1002
+ min-width: 100px;
1003
+ width: 30%;
1004
+ }
1005
+
1006
+ .aioseop_input input[type="checkbox"],
1007
+ .aioseop_input input[type="radio"] {
1008
+ vertical-align: text-bottom;
1009
+ margin-top: 8px;
1010
+ }
1011
+
1012
+ #aiosp_importer_exporter_import_export_help_wrapper .aioseop_option_div {
1013
+ max-height: initial;
1014
+ }
1015
+
1016
+ #aiosp {
1017
+ width: auto;
1018
+ }
1019
+
1020
+ .aioseop_input.aioseop_top_label .aioseop_option_input {
1021
+ margin: 0 0 10px 0;
1022
+ }
1023
+
1024
+ .aiosp_file_editor_settings > .aioseop_textarea_type .aioseop_option_div {
1025
+ max-height: none;
1026
+ }
1027
+
1028
+ /* Robots.txt styling */
1029
+ #aiosp_robots_generator_robotgen_wrapper .aioseop_option_div,
1030
+ #aiosp_robots_generator_robothtml_wrapper .aioseop_option_div {
1031
+ max-height: none;
1032
+ }
1033
+
1034
+ .aioseop_option_input .widefat td {
1035
+ vertical-align: middle;
1036
+ }
1037
+
1038
+ .entry-row.robots.quirks {
1039
+ font-weight: bold;
1040
+ opacity: 1;
1041
+ }
1042
+
1043
+ .entry-row.robots {
1044
+ opacity: 0.8;
1045
+ }
1046
+
1047
+ .entry-row.robots.invalid {
1048
+ opacity: 1;
1049
+ font-weight: bold;
1050
+ }
1051
+
1052
+ .invalid .entry_label {
1053
+ font-weight: bold;
1054
+ }
1055
+
1056
+ .aioseop .aioseop_option_input tbody {
1057
+ background: #FCFCFC;
1058
+ }
1059
+
1060
+ .All_in_One_SEO_Pack_Robots .aioseop .aioseop_option_input tbody {
1061
+ background: transparent;
1062
+ }
1063
+
1064
+ .entry-row.robots div {
1065
+ height: 20px;
1066
+ vertical-align: middle;
1067
+ width: 90%;
1068
+ margin: 0 0 4px 0;
1069
+ }
1070
+
1071
+ .robots img {
1072
+ margin: 0 0 0 2px;
1073
+ opacity: 0.6;
1074
+ }
1075
+
1076
+ .aioseop_option_docs {
1077
+ width: 98%;
1078
+ display: none;
1079
+ border: 1px solid #D3D3D3;
1080
+ margin-top: 20px;
1081
+ padding: 1%;
1082
+ background-color: #EEE;
1083
+ }
1084
+
1085
+ .aioseop_option_docs h3 {
1086
+ background: none;
1087
+ }
1088
+
1089
+ div.aioseop_notice {
1090
+ position: relative;
1091
+ }
1092
+
1093
+ div.aioseop_notice a.aioseop_dismiss_link {
1094
+ position: absolute;
1095
+ top: 10px;
1096
+ right: 10px;
1097
+ }
1098
+
1099
+ .aioseop_error_notice {
1100
+ color: #f00;
1101
+ font-weight: bold;
1102
+ }
1103
+
1104
+ .aioseop_input select {
1105
+ margin: 7px 0;
1106
+ }
1107
+
1108
+ .aioseop_help_text ul {
1109
+ margin: 15px 0 0 20px;
1110
+ }
1111
+
1112
+ .aioseop_help_text ul li {
1113
+ line-height: 20px;
1114
+ margin: 0;
1115
+ }
1116
+
1117
+ .aioseop_sidebar #side-sortables {
1118
+ width: 98%;
1119
+ }
1120
+
1121
+ #aioseop_opengraph_settings .aioseop_option_label {
1122
+ width: 30%;
1123
+ }
1124
+
1125
+ .aioseop_tabs {
1126
+ padding-top: 6px;
1127
+ }
1128
+
1129
+ .aioseop_tabs.hide,
1130
+ .aioseop_header_tabs.hide {
1131
+ display: block !important;
1132
+ }
1133
+
1134
+ .aioseop_header_tabs li {
1135
+ display: inline;
1136
+ padding: 0;
1137
+ margin: 0;
1138
+ }
1139
+
1140
+ .aioseop_header_tabs {
1141
+ margin: 0;
1142
+ }
1143
+
1144
+ .aioseop_header_nav {
1145
+ margin: 0;
1146
+ }
1147
+
1148
+ .aioseop_header_tabs li a.aioseop_header_tab.active {
1149
+ background-color: rgb(255, 255, 255);
1150
+ border-bottom-color: rgba(255, 255, 255, 0.5);
1151
+ font-weight: bold;
1152
+ }
1153
+
1154
+ .aioseop_header_tabs li a.aioseop_header_tab {
1155
+ font-size: 14px;
1156
+ line-height: 37px;
1157
+ text-decoration: none;
1158
+ margin: 5px 5px 0 0;
1159
+ padding: 10px;
1160
+ cursor: pointer;
1161
+ -webkit-border-top-right-radius: 3px;
1162
+ -webkit-border-top-left-radius: 3px;
1163
+ border-top-right-radius: 3px;
1164
+ border-top-left-radius: 3px;
1165
+ background-color: #e5e5e5;
1166
+ border: 1px solid #ccc;
1167
+ color: #5F5F5F;
1168
+ }
1169
+
1170
+ .aioseop_header_tabs li:first-child a.aioseop_header_tab {
1171
+ border-left: solid 1px #CCC;
1172
+ margin-left: 5px;
1173
+ }
1174
+
1175
+ .aioseop_tab {
1176
+ border: solid 1px #CCC;
1177
+ background-color: rgb(255, 255, 255);
1178
+ background-color: rgba(255, 255, 255, 0.5);
1179
+ padding: 10px;
1180
+ }
1181
+
1182
+ .aioseop_loading {
1183
+ background-image: url('../../images/activity.gif');
1184
+ display: inline-block;
1185
+ width: 24px;
1186
+ height: 24px;
1187
+ margin: 0;
1188
+ padding: 0;
1189
+ vertical-align: bottom;
1190
+ }
1191
+
1192
+ .aiosp_delete_url {
1193
+ background-image: url('../../images/delete.png');
1194
+ display: inline-block;
1195
+ width: 16px;
1196
+ height: 16px;
1197
+ margin: 0;
1198
+ padding: 0;
1199
+ vertical-align: bottom;
1200
+ }
1201
+
1202
+ form#aiosp_settings_form,
1203
+ .aioseop_tabs_div {
1204
+ padding-right: 477px;
1205
+ }
1206
+
1207
+ .aioseop_tabs_div {
1208
+ margin-top: 10px;
1209
+ }
1210
+
1211
+ #aiosp_settings_form ul.sfwd_debug_settings li strong {
1212
+ display: block;
1213
+ float: left;
1214
+ text-align: right;
1215
+ background-color: #DDD;
1216
+ margin-right: 8px;
1217
+ padding: 1px 8px 1px 1px;
1218
+ overflow: auto;
1219
+ width: 200px;
1220
+ min-height: 16px;
1221
+ }
1222
+
1223
+ #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n+1) strong {
1224
+ background-color: #CCC;
1225
+ }
1226
+
1227
+ #aiosp_settings_form ul.sfwd_debug_settings li {
1228
+ clear: left;
1229
+ margin: 0;
1230
+ padding: 0;
1231
+ background-color: #EEE;
1232
+ overflow: auto;
1233
+ max-width: 75%;
1234
+ min-width: 800px;
1235
+ }
1236
+
1237
+ #aiosp_settings_form ul.sfwd_debug_settings li:nth-child(2n) {
1238
+ background-color: #DDD;
1239
+ }
1240
+
1241
+ div.sfwd_debug_mail_sent {
1242
+ background-color: #080;
1243
+ border: 1px solid #0A0;
1244
+ margin: 10px 0 10px 0;
1245
+ width: 598px;
1246
+ color: #FFF;
1247
+ text-align: center;
1248
+ }
1249
+
1250
+ div.sfwd_debug_error {
1251
+ background-color: #F00;
1252
+ color: #FFF;
1253
+ border: 1px solid #A00;
1254
+ margin: 10px 0 10px 0;
1255
+ width: 598px;
1256
+ text-align: center;
1257
+ font-weight: bolder;
1258
+ }
1259
+
1260
+ #aiosp_performance_status_wrapper .aioseop_option_div {
1261
+ max-height: 420px;
1262
+ }
1263
+
1264
+ #aioseop_coming_soon, #aioseop_coming_soon2 {
1265
+ padding-top: 40px;
1266
+ text-align: center;
1267
+ height: 258px;
1268
+ font-size: 16px;
1269
+ }
1270
+
1271
+ .MRL {
1272
+ margin-left: 20px !important;
1273
+ margin-bottom: 10px !important;
1274
+ }
1275
+
1276
+ /**
1277
+ * Edit Post screen specific styling
1278
+ *
1279
+ */
1280
+ .postbox-container .aioseop_option_div {
1281
+ width: 100%;
1282
+ }
1283
+
1284
+ .postbox-container .aioseop_option_div input[type="text"],
1285
+ .postbox-container .aioseop_option_div textarea {
1286
+ width: 99%;
1287
+ max-width: 900px;
1288
+ }
1289
+
1290
+ .postbox-container .aioseop_option_label {
1291
+ max-width: none;
1292
+ height: auto !important;
1293
+ }
1294
+
1295
+ .postbox-container .aioseop_wrapper {
1296
+ padding: 0;
1297
+ }
1298
+
1299
+ .postbox-container .aioseop_input {
1300
+ display: block;
1301
+ margin-bottom: 10px;
1302
+ padding: 0;
1303
+ }
1304
+
1305
+ .postbox-container .aioseop_option_input {
1306
+ width: 63%;
1307
+ padding: 0;
1308
+ }
1309
+
1310
+ .postbox-container div#aiosp_upgrade_wrapper {
1311
+ float: none;
1312
+ width: auto;
1313
+ margin: 0;
1314
+ padding: 0;
1315
+ }
1316
+
1317
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input {
1318
+ display: block;
1319
+ padding: 0;
1320
+ }
1321
+
1322
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input {
1323
+ float: none;
1324
+ width: auto;
1325
+ padding: 0;
1326
+ }
1327
+
1328
+ .postbox-container div#aiosp_upgrade_wrapper .aioseop_input .aioseop_option_input .aioseop_option_div {
1329
+ width: auto;
1330
+ min-height: 0;
1331
+ padding: 10px 0;
1332
+ }
1333
+
1334
+ .aioseop_tabs .aioseop_options {
1335
+ margin: 0;
1336
+ }
1337
+
1338
+ #aioseop_opengraph_settings .aioseop_options {
1339
+ clear: both;
1340
+ margin-top: 35px;
1341
+ }
1342
+
1343
+ #aioseop_opengraph_settings .aioseop_option_input {
1344
+ width: 70%;
1345
+ }
1346
+
1347
+ /**
1348
+ * Preview Snippet styling
1349
+ *
1350
+ */
1351
+ div#aiosp_snippet_wrapper {
1352
+ border: 1px solid #888;
1353
+ clear: both;
1354
+ padding: 10px 10px 0;
1355
+ max-width: 97%;
1356
+ margin-bottom: 15px;
1357
+ }
1358
+
1359
+ div#aiosp_snippet_wrapper .aioseop_option_label {
1360
+ height: auto !important;
1361
+ }
1362
+
1363
+ div#aiosp_snippet_wrapper .aioseop_input.aioseop_top_label .aioseop_option_input {
1364
+ margin: 0;
1365
+ }
1366
+
1367
+ div#aioseop_snippet {
1368
+ font-family: arial, sans-serif;
1369
+ font-size: 13px;
1370
+ }
1371
+
1372
+ div#aioseop_snippet > h3 {
1373
+ margin: 10px 0 5px;
1374
+ font-size: 18px;
1375
+ border: 0;
1376
+ background: inherit;
1377
+ font-weight: normal;
1378
+ }
1379
+
1380
+ div#aioseop_snippet > h3 > a {
1381
+ color: #12c;
1382
+ text-decoration: none;
1383
+ cursor: pointer;
1384
+ }
1385
+
1386
+ div#aioseop_snippet > div {
1387
+ color: #545454;
1388
+ max-width: 48em;
1389
+ }
1390
+
1391
+ div#aioseop_snippet > div > div {
1392
+ display: block;
1393
+ margin-bottom: 1px;
1394
+ }
1395
+
1396
+ div#aioseop_snippet > div > div > cite {
1397
+ color: #093;
1398
+ font-style: normal;
1399
+ }
1400
+
1401
+ div#aioseop_snippet > div > span {
1402
+ margin: 0;
1403
+ padding: 0;
1404
+ border: 0;
1405
+ }
css/welcome.css CHANGED
@@ -1,46 +1,46 @@
1
  h2.nav-tab-wrapper {
2
- margin:22px 0 0 0;
3
  }
4
 
5
  #sections {
6
- padding:22px;
7
- background: #fff;
8
- border:1px solid #ccc;
9
- border-top:0px;
10
  }
11
 
12
  section {
13
- display:none;
14
  }
15
 
16
  section:first-child {
17
- display:block;
18
  }
19
 
20
 
21
  .no-js h2.nav-tab-wrapper {
22
- display:none;
23
  }
24
 
25
  .no-js #sections {
26
- border-top:1px solid #ccc;
27
- margin-top:22px;
28
  }
29
 
30
  .no-js section {
31
- border-top: 1px dashed #aaa;
32
- margin-top:22px;
33
- padding-top:22px;
34
  }
35
 
36
  .no-js section:first-child {
37
- margin:0px;
38
- padding:0px;
39
- border:0px;
40
  }
41
 
42
  .nav-tab-active {
43
- background-color:white;
44
  }
45
 
46
 
@@ -48,24 +48,24 @@ section:first-child {
48
  /* Welcome Panel */
49
 
50
  .welcome-panel-close {
51
- display: none;
52
  }
53
  .welcome-panel-close {
54
- z-index: 2;
55
  }
56
  .welcome-panel .welcome-widgets-menus:before,
57
  .welcome-panel .welcome-comments:before,
58
  .welcome-panel .welcome-learn-more:before{
59
- content: '';
60
  }
61
  .welcome-panel .welcome-widgets-menus {
62
- background: url(/path/to/icon) 0 50% no-repeat;
63
  }
64
  .welcome-panel .welcome-comments {
65
- background: url(/path/to/icon) 0 50% no-repeat;
66
  }
67
  .welcome-panel .welcome-learn-more {
68
- background: url(/path/to/icon) 0 50% no-repeat;
69
  }
70
 
71
 
@@ -77,10 +77,10 @@ section:first-child {
77
  }
78
 
79
  .welcome-panel-column {
80
- width: 30%;
81
- margin-right: 3%;
82
- display: inline-block;
83
- vertical-align: top;
84
  }
85
 
86
  .welcome-panel-column:last-child {
@@ -102,13 +102,13 @@ section:first-child {
102
  }
103
 
104
  .welcome-panel-column p.call-to-action .button-orange {
105
- background: #d54e21;
106
- border-color: #d54e21;
107
- -webkit-box-shadow: 0 1px 0 #d54e21;
108
- box-shadow: 0 1px 0 #d54e21;
109
- color: #fff;
110
- text-decoration: none;
111
- text-shadow: 0 -1px 1px #d54e21,1px 0 1px #d54e21,0 1px 1px #d54e21,-1px 0 1px #d54e21;
112
  }
113
 
114
  .welcome-panel-column ul {
@@ -116,7 +116,7 @@ section:first-child {
116
  }
117
 
118
  .welcome-panel-column ul li {
119
- margin-bottom: 12px;
120
  list-style-type: square;
121
  }
122
 
1
  h2.nav-tab-wrapper {
2
+ margin:22px 0 0 0;
3
  }
4
 
5
  #sections {
6
+ padding:22px;
7
+ background: #fff;
8
+ border:1px solid #ccc;
9
+ border-top:0px;
10
  }
11
 
12
  section {
13
+ display:none;
14
  }
15
 
16
  section:first-child {
17
+ display:block;
18
  }
19
 
20
 
21
  .no-js h2.nav-tab-wrapper {
22
+ display:none;
23
  }
24
 
25
  .no-js #sections {
26
+ border-top:1px solid #ccc;
27
+ margin-top:22px;
28
  }
29
 
30
  .no-js section {
31
+ border-top: 1px dashed #aaa;
32
+ margin-top:22px;
33
+ padding-top:22px;
34
  }
35
 
36
  .no-js section:first-child {
37
+ margin:0px;
38
+ padding:0px;
39
+ border:0px;
40
  }
41
 
42
  .nav-tab-active {
43
+ background-color:white;
44
  }
45
 
46
 
48
  /* Welcome Panel */
49
 
50
  .welcome-panel-close {
51
+ display: none;
52
  }
53
  .welcome-panel-close {
54
+ z-index: 2;
55
  }
56
  .welcome-panel .welcome-widgets-menus:before,
57
  .welcome-panel .welcome-comments:before,
58
  .welcome-panel .welcome-learn-more:before{
59
+ content: '';
60
  }
61
  .welcome-panel .welcome-widgets-menus {
62
+ background: url(/path/to/icon) 0 50% no-repeat;
63
  }
64
  .welcome-panel .welcome-comments {
65
+ background: url(/path/to/icon) 0 50% no-repeat;
66
  }
67
  .welcome-panel .welcome-learn-more {
68
+ background: url(/path/to/icon) 0 50% no-repeat;
69
  }
70
 
71
 
77
  }
78
 
79
  .welcome-panel-column {
80
+ width: 30%;
81
+ margin-right: 3%;
82
+ display: inline-block;
83
+ vertical-align: top;
84
  }
85
 
86
  .welcome-panel-column:last-child {
102
  }
103
 
104
  .welcome-panel-column p.call-to-action .button-orange {
105
+ background: #d54e21;
106
+ border-color: #d54e21;
107
+ -webkit-box-shadow: 0 1px 0 #d54e21;
108
+ box-shadow: 0 1px 0 #d54e21;
109
+ color: #fff;
110
+ text-decoration: none;
111
+ text-shadow: 0 -1px 1px #d54e21,1px 0 1px #d54e21,0 1px 1px #d54e21,-1px 0 1px #d54e21;
112
  }
113
 
114
  .welcome-panel-column ul {
116
  }
117
 
118
  .welcome-panel-column ul li {
119
+ margin-bottom: 12px;
120
  list-style-type: square;
121
  }
122
 
inc/aioseop_UTF8.php CHANGED
@@ -2,449 +2,449 @@
2
  /**
3
  * @package All-in-One-SEO-Pack
4
  */
5
- $UTF8_TABLES = Array();
6
 
7
  $UTF8_TABLES['strtolower'] = array(
8
- "Z" => "z", "Y" => "y", "X" => "x",
9
- "W" => "w", "V" => "v", "U" => "u",
10
- "T" => "t", "S" => "s", "R" => "r",
11
- "Q" => "q", "P" => "p", "O" => "o",
12
- "N" => "n", "M" => "m", "L" => "l",
13
- "K" => "k", "J" => "j", "I" => "i",
14
- "H" => "h", "G" => "g", "F" => "f",
15
- "E" => "e", "D" => "d", "C" => "c",
16
- "B" => "b", "A" => "a", "Å" => "å",
17
- "K" => "k", "Ω" => "ω", "Ώ" => "ώ",
18
- "·ø∫" => "·Ωº", "·øπ" => "·Ωπ", "·ø∏" => "·Ω∏",
19
- "·ø¨" => "·ø•", "·ø´" => "·Ωª", "·ø™" => "·Ω∫",
20
- "·ø©" => "·ø°", "·ø®" => "·ø ", "·øõ" => "·Ω∑",
21
- "·øö" => "·Ω∂", "·øô" => "·øë", "·øò" => "·øê",
22
- "·øã" => "·Ωµ", "·øä" => "·Ω¥", "·øâ" => "·Ω≥",
23
- "Ὲ" => "ὲ", "Ά" => "ά", "Ὰ" => "ὰ",
24
- "·æπ" => "·æ±", "·æ∏" => "·æ∞", "·ΩØ" => "·Ωß",
25
- "·ΩÆ" => "·Ω¶", "·Ω≠" => "·Ω•", "·Ω¨" => "·Ω§",
26
- "·Ω´" => "·Ω£", "·Ω™" => "·Ω¢", "·Ω©" => "·Ω°",
27
- "·Ω®" => "·Ω ", "·Ωü" => "·Ωó", "·Ωù" => "·Ωï",
28
- "·Ωõ" => "·Ωì", "·Ωô" => "·Ωë", "·Ωç" => "·ΩÖ",
29
- "·Ωå" => "·ΩÑ", "·Ωã" => "·ΩÉ", "·Ωä" => "·ΩÇ",
30
- "Ὁ" => "ὁ", "Ὀ" => "ὀ", "Ἷ" => "ἷ",
31
- "Ἶ" => "ἶ", "Ἵ" => "ἵ", "Ἴ" => "ἴ",
32
- "Ἳ" => "ἳ", "Ἲ" => "ἲ", "Ἱ" => "ἱ",
33
- "Ἰ" => "ἰ", "Ἧ" => "ἧ", "Ἦ" => "ἦ",
34
- "Ἥ" => "ἥ", "Ἤ" => "ἤ", "Ἣ" => "ἣ",
35
- "Ἢ" => "ἢ", "Ἡ" => "ἡ", "Ἠ" => "ἠ",
36
- "Ἕ" => "ἕ", "Ἔ" => "ἔ", "Ἓ" => "ἓ",
37
- "Ἒ" => "ἒ", "Ἑ" => "ἑ", "Ἐ" => "ἐ",
38
- "Ἇ" => "ἇ", "Ἆ" => "ἆ", "Ἅ" => "ἅ",
39
- "Ἄ" => "ἄ", "Ἃ" => "ἃ", "Ἂ" => "ἂ",
40
- "Ἁ" => "ἁ", "Ἀ" => "ἀ", "Ỹ" => "ỹ",
41
- "Ỷ" => "ỷ", "Ỵ" => "ỵ", "Ỳ" => "ỳ",
42
- "Ự" => "ự", "Ữ" => "ữ", "Ử" => "ử",
43
- "Ừ" => "ừ", "Ứ" => "ứ", "Ủ" => "ủ",
44
- "Ụ" => "ụ", "Ợ" => "ợ", "Ỡ" => "ỡ",
45
- "Ở" => "ở", "Ờ" => "ờ", "Ớ" => "ớ",
46
- "Ộ" => "ộ", "Ỗ" => "ỗ", "Ổ" => "ổ",
47
- "Ồ" => "ồ", "Ố" => "ố", "Ỏ" => "ỏ",
48
- "Ọ" => "ọ", "Ị" => "ị", "Ỉ" => "ỉ",
49
- "Ệ" => "ệ", "Ễ" => "ễ", "Ể" => "ể",
50
- "Ề" => "ề", "Ế" => "ế", "Ẽ" => "ẽ",
51
- "Ẻ" => "ẻ", "Ẹ" => "ẹ", "Ặ" => "ặ",
52
- "·∫¥" => "·∫µ", "·∫≤" => "·∫≥", "·∫∞" => "·∫±",
53
- "Ắ" => "ắ", "Ậ" => "ậ", "Ẫ" => "ẫ",
54
- "Ẩ" => "ẩ", "Ầ" => "ầ", "Ấ" => "ấ",
55
- "Ả" => "ả", "Ạ" => "ạ", "Ẕ" => "ẕ",
56
- "Ẓ" => "ẓ", "Ẑ" => "ẑ", "Ẏ" => "ẏ",
57
- "Ẍ" => "ẍ", "Ẋ" => "ẋ", "Ẉ" => "ẉ",
58
- "Ẇ" => "ẇ", "Ẅ" => "ẅ", "Ẃ" => "ẃ",
59
- "Ẁ" => "ẁ", "Ṿ" => "ṿ", "Ṽ" => "ṽ",
60
- "·π∫" => "·πª", "·π∏" => "·ππ", "·π∂" => "·π∑",
61
- "·π¥" => "·πµ", "·π≤" => "·π≥", "·π∞" => "·π±",
62
- "Ṯ" => "ṯ", "Ṭ" => "ṭ", "Ṫ" => "ṫ",
63
- "·π®" => "·π©", "·π¶" => "·πß", "·π§" => "·π•",
64
- "·π¢" => "·π£", "·π " => "·π°", "·πû" => "·πü",
65
- "·πú" => "·πù", "·πö" => "·πõ", "·πò" => "·πô",
66
- "·πñ" => "·πó", "·πî" => "·πï", "·πí" => "·πì",
67
- "·πê" => "·πë", "·πé" => "·πè", "·πå" => "·πç",
68
- "Ṋ" => "ṋ", "Ṉ" => "ṉ", "Ṇ" => "ṇ",
69
- "Ṅ" => "ṅ", "Ṃ" => "ṃ", "Ṁ" => "ṁ",
70
- "Ḿ" => "ḿ", "Ḽ" => "ḽ", "Ḻ" => "ḻ",
71
- "·∏∏" => "·∏π", "·∏∂" => "·∏∑", "·∏¥" => "·∏µ",
72
- "Ḳ" => "ḳ", "Ḱ" => "ḱ", "Ḯ" => "ḯ",
73
- "Ḭ" => "ḭ", "Ḫ" => "ḫ", "Ḩ" => "ḩ",
74
- "Ḧ" => "ḧ", "Ḥ" => "ḥ", "Ḣ" => "ḣ",
75
- "Ḡ" => "ḡ", "Ḟ" => "ḟ", "Ḝ" => "ḝ",
76
- "Ḛ" => "ḛ", "Ḙ" => "ḙ", "Ḗ" => "ḗ",
77
- "Ḕ" => "ḕ", "Ḓ" => "ḓ", "Ḑ" => "ḑ",
78
- "Ḏ" => "ḏ", "Ḍ" => "ḍ", "Ḋ" => "ḋ",
79
- "Ḉ" => "ḉ", "Ḇ" => "ḇ", "Ḅ" => "ḅ",
80
- "Ḃ" => "ḃ", "Ḁ" => "ḁ", "Ֆ" => "ֆ",
81
- "Օ" => "օ", "Ք" => "ք", "Փ" => "փ",
82
- "Ւ" => "ւ", "Ց" => "ց", "Ր" => "ր",
83
- "’è" => "’ø", "’é" => "’æ", "’ç" => "’Ω",
84
- "’å" => "’º", "’ã" => "’ª", "’ä" => "’∫",
85
- "’â" => "’π", "’à" => "’∏", "’á" => "’∑",
86
- "’Ü" => "’∂", "’Ö" => "’µ", "’Ñ" => "’¥",
87
- "’É" => "’≥", "’Ç" => "’≤", "’Å" => "’±",
88
- "’Ä" => "’∞", "‘ø" => "’Ø", "‘æ" => "’Æ",
89
- "Խ" => "խ", "Լ" => "լ", "Ի" => "ի",
90
- "‘∫" => "’™", "‘π" => "’©", "‘∏" => "’®",
91
- "‘∑" => "’ß", "‘∂" => "’¶", "‘µ" => "’•",
92
- "‘¥" => "’§", "‘≥" => "’£", "‘≤" => "’¢",
93
- "‘±" => "’°", "‘é" => "‘è", "‘å" => "‘ç",
94
- "‘ä" => "‘ã", "‘à" => "‘â", "‘Ü" => "‘á",
95
- "‘Ñ" => "‘Ö", "‘Ç" => "‘É", "‘Ä" => "‘Å",
96
- "Ӹ" => "ӹ", "Ӵ" => "ӵ", "Ӳ" => "ӳ",
97
- "Ӱ" => "ӱ", "Ӯ" => "ӯ", "Ӭ" => "ӭ",
98
- "Ӫ" => "ӫ", "Ө" => "ө", "Ӧ" => "ӧ",
99
- "”§" => "”•", "”¢" => "”£", "” " => "”°",
100
- "Ӟ" => "ӟ", "Ӝ" => "ӝ", "Ӛ" => "ӛ",
101
- "Ә" => "ә", "Ӗ" => "ӗ", "Ӕ" => "ӕ",
102
- "Ӓ" => "ӓ", "Ӑ" => "ӑ", "Ӎ" => "ӎ",
103
- "Ӌ" => "ӌ", "Ӊ" => "ӊ", "Ӈ" => "ӈ",
104
- "Ӆ" => "ӆ", "Ӄ" => "ӄ", "Ӂ" => "ӂ",
105
- "Ҿ" => "ҿ", "Ҽ" => "ҽ", "Һ" => "һ",
106
- "“∏" => "“π", "“∂" => "“∑", "“¥" => "“µ",
107
- "“≤" => "“≥", "“∞" => "“±", "“Æ" => "“Ø",
108
- "Ҭ" => "ҭ", "Ҫ" => "ҫ", "Ҩ" => "ҩ",
109
- "Ҧ" => "ҧ", "Ҥ" => "ҥ", "Ң" => "ң",
110
- "“ " => "“°", "“û" => "“ü", "“ú" => "“ù",
111
- "“ö" => "“õ", "“ò" => "“ô", "“ñ" => "“ó",
112
- "“î" => "“ï", "“í" => "“ì", "“ê" => "“ë",
113
- "“é" => "“è", "“å" => "“ç", "“ä" => "“ã",
114
- "“Ä" => "“Å", "—æ" => "—ø", "—º" => "—Ω",
115
- "—∫" => "—ª", "—∏" => "—π", "—∂" => "—∑",
116
- "—¥" => "—µ", "—≤" => "—≥", "—∞" => "—±",
117
- "—Æ" => "—Ø", "—¨" => "—≠", "—™" => "—´",
118
- "—®" => "—©", "—¶" => "—ß", "—§" => "—•",
119
- "—¢" => "—£", "— " => "—°", "–Ø" => "—è",
120
- "–Æ" => "—é", "–≠" => "—ç", "–¨" => "—å",
121
- "–´" => "—ã", "–™" => "—ä", "–©" => "—â",
122
- "–®" => "—à", "–ß" => "—á", "–¶" => "—Ü",
123
- "–•" => "—Ö", "–§" => "—Ñ", "–£" => "—É",
124
- "–¢" => "—Ç", "–°" => "—Å", "– " => "—Ä",
125
- "–ü" => "–ø", "–û" => "–æ", "–ù" => "–Ω",
126
- "–ú" => "–º", "–õ" => "–ª", "–ö" => "–∫",
127
- "–ô" => "–π", "–ò" => "–∏", "–ó" => "–∑",
128
- "–ñ" => "–∂", "–ï" => "–µ", "–î" => "–¥",
129
- "–ì" => "–≥", "–í" => "–≤", "–ë" => "–±",
130
- "–ê" => "–∞", "–è" => "—ü", "–é" => "—û",
131
- "–ç" => "—ù", "–å" => "—ú", "–ã" => "—õ",
132
- "–ä" => "—ö", "–â" => "—ô", "–à" => "—ò",
133
- "–á" => "—ó", "–Ü" => "—ñ", "–Ö" => "—ï",
134
- "–Ñ" => "—î", "–É" => "—ì", "–Ç" => "—í",
135
- "Ё" => "ё", "Ѐ" => "ѐ", "ϴ" => "θ",
136
- "Ϯ" => "ϯ", "Ϭ" => "ϭ", "Ϫ" => "ϫ",
137
- "Ϩ" => "ϩ", "Ϧ" => "ϧ", "Ϥ" => "ϥ",
138
- "œ¢" => "œ£", "œ " => "œ°", "œû" => "œü",
139
- "Ϝ" => "ϝ", "Ϛ" => "ϛ", "Ϙ" => "ϙ",
140
- "Ϋ" => "ϋ", "Ϊ" => "ϊ", "Ω" => "ω",
141
- "Ψ" => "ψ", "Χ" => "χ", "Φ" => "φ",
142
- "Υ" => "υ", "Τ" => "τ", "Σ" => "σ",
143
- "Ρ" => "ρ", "Π" => "π", "Ο" => "ο",
144
- "Ξ" => "ξ", "Ν" => "ν", "Μ" => "μ",
145
- "Λ" => "λ", "Κ" => "κ", "Ι" => "ι",
146
- "Θ" => "θ", "Η" => "η", "Ζ" => "ζ",
147
- "Ε" => "ε", "Δ" => "δ", "Γ" => "γ",
148
- "Β" => "β", "Α" => "α", "Ώ" => "ώ",
149
- "Ύ" => "ύ", "Ό" => "ό", "Ί" => "ί",
150
- "Ή" => "ή", "Έ" => "έ", "Ά" => "ά",
151
- "Ȳ" => "ȳ", "Ȱ" => "ȱ", "Ȯ" => "ȯ",
152
- "Ȭ" => "ȭ", "Ȫ" => "ȫ", "Ȩ" => "ȩ",
153
- "Ȧ" => "ȧ", "Ȥ" => "ȥ", "Ȣ" => "ȣ",
154
- "» " => "∆û", "»û" => "»ü", "»ú" => "»ù",
155
- "Ț" => "ț", "Ș" => "ș", "Ȗ" => "ȗ",
156
- "Ȕ" => "ȕ", "Ȓ" => "ȓ", "Ȑ" => "ȑ",
157
- "Ȏ" => "ȏ", "Ȍ" => "ȍ", "Ȋ" => "ȋ",
158
- "Ȉ" => "ȉ", "Ȇ" => "ȇ", "Ȅ" => "ȅ",
159
- "Ȃ" => "ȃ", "Ȁ" => "ȁ", "Ǿ" => "ǿ",
160
- "Ǽ" => "ǽ", "Ǻ" => "ǻ", "Ǹ" => "ǹ",
161
- "Ƿ" => "ƿ", "Ƕ" => "ƕ", "Ǵ" => "ǵ",
162
- "DZ" => "dz", "Ǯ" => "ǯ", "Ǭ" => "ǭ",
163
- "Ǫ" => "ǫ", "Ǩ" => "ǩ", "Ǧ" => "ǧ",
164
- "«§" => "«•", "«¢" => "«£", "« " => "«°",
165
- "«û" => "«ü", "«õ" => "«ú", "«ô" => "«ö",
166
- "«ó" => "«ò", "«ï" => "«ñ", "«ì" => "«î",
167
- "«ë" => "«í", "«è" => "«ê", "«ç" => "«é",
168
- "«ä" => "«å", "«á" => "«â", "«Ñ" => "«Ü",
169
- "Ƽ" => "ƽ", "Ƹ" => "ƹ", "Ʒ" => "ʒ",
170
- "∆µ" => "∆∂", "∆≥" => "∆¥", "∆≤" => " ã",
171
- "Ʊ" => "ʊ", "Ư" => "ư", "Ʈ" => "ʈ",
172
- "Ƭ" => "ƭ", "Ʃ" => "ʃ", "Ƨ" => "ƨ",
173
- "Ʀ" => "ʀ", "Ƥ" => "ƥ", "Ƣ" => "ƣ",
174
- "∆ " => "∆°", "∆ü" => "…µ", "∆ù" => "…≤",
175
- "∆ú" => "…Ø", "∆ò" => "∆ô", "∆ó" => "…®",
176
- "∆ñ" => "…©", "∆î" => "…£", "∆ì" => "… ",
177
- "Ƒ" => "ƒ", "Ɛ" => "ɛ", "Ə" => "ə",
178
- "Ǝ" => "ǝ", "Ƌ" => "ƌ", "Ɗ" => "ɗ",
179
- "Ɖ" => "ɖ", "Ƈ" => "ƈ", "Ɔ" => "ɔ",
180
- "Ƅ" => "ƅ", "Ƃ" => "ƃ", "Ɓ" => "ɓ",
181
- "Ž" => "ž", "Ż" => "ż", "Ź" => "ź",
182
- "Ÿ" => "ÿ", "Ŷ" => "ŷ", "Ŵ" => "ŵ",
183
- "Ų" => "ų", "Ű" => "ű", "Ů" => "ů",
184
- "Ŭ" => "ŭ", "Ū" => "ū", "Ũ" => "ũ",
185
- "Ŧ" => "ŧ", "Ť" => "ť", "Ţ" => "ţ",
186
- "Š" => "š", "Ş" => "ş", "Ŝ" => "ŝ",
187
- "Ś" => "ś", "Ř" => "ř", "Ŗ" => "ŗ",
188
- "Ŕ" => "ŕ", "Œ" => "œ", "Ő" => "ő",
189
- "Ŏ" => "ŏ", "Ō" => "ō", "Ŋ" => "ŋ",
190
- "Ň" => "ň", "Ņ" => "ņ", "Ń" => "ń",
191
- "Ł" => "ł", "Ŀ" => "ŀ", "Ľ" => "ľ",
192
- "Ļ" => "ļ", "Ĺ" => "ĺ", "Ķ" => "ķ",
193
- "Ĵ" => "ĵ", "IJ" => "ij", "İ" => "i",
194
- "Į" => "į", "Ĭ" => "ĭ", "Ī" => "ī",
195
- "Ĩ" => "ĩ", "Ħ" => "ħ", "Ĥ" => "ĥ",
196
- "ƒ¢" => "ƒ£", "ƒ " => "ƒ°", "ƒû" => "ƒü",
197
- "ƒú" => "ƒù", "ƒö" => "ƒõ", "ƒò" => "ƒô",
198
- "Ė" => "ė", "Ĕ" => "ĕ", "Ē" => "ē",
199
- "Đ" => "đ", "Ď" => "ď", "Č" => "č",
200
- "Ċ" => "ċ", "Ĉ" => "ĉ", "Ć" => "ć",
201
- "Ą" => "ą", "Ă" => "ă", "Ā" => "ā",
202
- "Þ" => "þ", "Ý" => "ý", "Ü" => "ü",
203
- "Û" => "û", "Ú" => "ú", "Ù" => "ù",
204
- "Ø" => "ø", "Ö" => "ö", "Õ" => "õ",
205
- "Ô" => "ô", "Ó" => "ó", "Ò" => "ò",
206
- "Ñ" => "ñ", "Ð" => "ð", "Ï" => "ï",
207
- "Î" => "î", "Í" => "í", "Ì" => "ì",
208
- "Ë" => "ë", "Ê" => "ê", "É" => "é",
209
- "È" => "è", "Ç" => "ç", "Æ" => "æ",
210
- "Å" => "å", "Ä" => "ä", "Ã" => "ã",
211
- "Â" => "â", "Á" => "á", "À" => "à ",
212
- "Z" => "z", "Y" => "y", "X" => "x",
213
- "W" => "w", "V" => "v", "U" => "u",
214
- "T" => "t", "S" => "s", "R" => "r",
215
- "Q" => "q", "P" => "p", "O" => "o",
216
- "N" => "n", "M" => "m", "L" => "l",
217
- "K" => "k", "J" => "j", "I" => "i",
218
- "H" => "h", "G" => "g", "F" => "f",
219
- "E" => "e", "D" => "d", "C" => "c",
220
- "B" => "b", "A" => "a",
221
  );
222
 
223
 
224
  $UTF8_TABLES['strtoupper'] = array(
225
- "z" => "Z", "y" => "Y", "x" => "X",
226
- "w" => "W", "v" => "V", "u" => "U",
227
- "t" => "T", "s" => "S", "r" => "R",
228
- "q" => "Q", "p" => "P", "o" => "O",
229
- "n" => "N", "m" => "M", "l" => "L",
230
- "k" => "K", "j" => "J", "i" => "I",
231
- "h" => "H", "g" => "G", "f" => "F",
232
- "e" => "E", "d" => "D", "c" => "C",
233
- "b" => "B", "a" => "A", "ῳ" => "ῼ",
234
- "·ø•" => "·ø¨", "·ø°" => "·ø©", "·ø " => "·ø®",
235
- "·øë" => "·øô", "·øê" => "·øò", "·øÉ" => "·øå",
236
- "ι" => "Ι", "ᾳ" => "ᾼ", "ᾱ" => "Ᾱ",
237
- "ᾰ" => "Ᾰ", "ᾧ" => "ᾯ", "ᾦ" => "ᾮ",
238
- "ᾥ" => "ᾭ", "ᾤ" => "ᾬ", "ᾣ" => "ᾫ",
239
- "ᾢ" => "ᾪ", "ᾡ" => "ᾩ", "ᾠ" => "ᾨ",
240
- "·æó" => "·æü", "·æñ" => "·æû", "·æï" => "·æù",
241
- "·æî" => "·æú", "·æì" => "·æõ", "·æí" => "·æö",
242
- "·æë" => "·æô", "·æê" => "·æò", "·æá" => "·æè",
243
- "ᾆ" => "ᾎ", "ᾅ" => "ᾍ", "ᾄ" => "ᾌ",
244
- "ᾃ" => "ᾋ", "ᾂ" => "ᾊ", "ᾁ" => "ᾉ",
245
- "ᾀ" => "ᾈ", "ώ" => "Ώ", "ὼ" => "Ὼ",
246
- "·Ωª" => "·ø´", "·Ω∫" => "·ø™", "·Ωπ" => "·øπ",
247
- "·Ω∏" => "·ø∏", "·Ω∑" => "·øõ", "·Ω∂" => "·øö",
248
- "·Ωµ" => "·øã", "·Ω¥" => "·øä", "·Ω≥" => "·øâ",
249
- "ὲ" => "Ὲ", "ά" => "Ά", "ὰ" => "Ὰ",
250
- "·Ωß" => "·ΩØ", "·Ω¶" => "·ΩÆ", "·Ω•" => "·Ω≠",
251
- "·Ω§" => "·Ω¨", "·Ω£" => "·Ω´", "·Ω¢" => "·Ω™",
252
- "·Ω°" => "·Ω©", "·Ω " => "·Ω®", "·Ωó" => "·Ωü",
253
- "·Ωï" => "·Ωù", "·Ωì" => "·Ωõ", "·Ωë" => "·Ωô",
254
- "·ΩÖ" => "·Ωç", "·ΩÑ" => "·Ωå", "·ΩÉ" => "·Ωã",
255
- "·ΩÇ" => "·Ωä", "·ΩÅ" => "·Ωâ", "·ΩÄ" => "·Ωà",
256
- "ἷ" => "Ἷ", "ἶ" => "Ἶ", "ἵ" => "Ἵ",
257
- "ἴ" => "Ἴ", "ἳ" => "Ἳ", "ἲ" => "Ἲ",
258
- "ἱ" => "Ἱ", "ἰ" => "Ἰ", "ἧ" => "Ἧ",
259
- "ἦ" => "Ἦ", "ἥ" => "Ἥ", "ἤ" => "Ἤ",
260
- "ἣ" => "Ἣ", "ἢ" => "Ἢ", "ἡ" => "Ἡ",
261
- "ἠ" => "Ἠ", "ἕ" => "Ἕ", "ἔ" => "Ἔ",
262
- "ἓ" => "Ἓ", "ἒ" => "Ἒ", "ἑ" => "Ἑ",
263
- "ἐ" => "Ἐ", "ἇ" => "Ἇ", "ἆ" => "Ἆ",
264
- "ἅ" => "Ἅ", "ἄ" => "Ἄ", "ἃ" => "Ἃ",
265
- "ἂ" => "Ἂ", "ἁ" => "Ἁ", "ἀ" => "Ἀ",
266
- "ỹ" => "Ỹ", "ỷ" => "Ỷ", "ỵ" => "Ỵ",
267
- "ỳ" => "Ỳ", "ự" => "Ự", "ữ" => "Ữ",
268
- "ử" => "Ử", "ừ" => "Ừ", "ứ" => "Ứ",
269
- "ủ" => "Ủ", "ụ" => "Ụ", "ợ" => "Ợ",
270
- "ỡ" => "Ỡ", "ở" => "Ở", "ờ" => "Ờ",
271
- "ớ" => "Ớ", "ộ" => "Ộ", "ỗ" => "Ỗ",
272
- "ổ" => "Ổ", "ồ" => "Ồ", "ố" => "Ố",
273
- "ỏ" => "Ỏ", "ọ" => "Ọ", "ị" => "Ị",
274
- "ỉ" => "Ỉ", "ệ" => "Ệ", "ễ" => "Ễ",
275
- "ể" => "Ể", "ề" => "Ề", "ế" => "Ế",
276
- "ẽ" => "Ẽ", "ẻ" => "Ẻ", "ẹ" => "Ẹ",
277
- "·∫∑" => "·∫∂", "·∫µ" => "·∫¥", "·∫≥" => "·∫≤",
278
- "ằ" => "Ằ", "ắ" => "Ắ", "ậ" => "Ậ",
279
- "ẫ" => "Ẫ", "ẩ" => "Ẩ", "ầ" => "Ầ",
280
- "ấ" => "Ấ", "ả" => "Ả", "ạ" => "Ạ",
281
- "ẛ" => "Ṡ", "ẕ" => "Ẕ", "ẓ" => "Ẓ",
282
- "ẑ" => "Ẑ", "ẏ" => "Ẏ", "ẍ" => "Ẍ",
283
- "ẋ" => "Ẋ", "ẉ" => "Ẉ", "ẇ" => "Ẇ",
284
- "ẅ" => "Ẅ", "ẃ" => "Ẃ", "ẁ" => "Ẁ",
285
- "·πø" => "·πæ", "·πΩ" => "·πº", "·πª" => "·π∫",
286
- "·ππ" => "·π∏", "·π∑" => "·π∂", "·πµ" => "·π¥",
287
- "ṳ" => "Ṳ", "ṱ" => "Ṱ", "ṯ" => "Ṯ",
288
- "·π≠" => "·π¨", "·π´" => "·π™", "·π©" => "·π®",
289
- "·πß" => "·π¶", "·π•" => "·π§", "·π£" => "·π¢",
290
- "·π°" => "·π ", "·πü" => "·πû", "·πù" => "·πú",
291
- "·πõ" => "·πö", "·πô" => "·πò", "·πó" => "·πñ",
292
- "·πï" => "·πî", "·πì" => "·πí", "·πë" => "·πê",
293
- "·πè" => "·πé", "·πç" => "·πå", "·πã" => "·πä",
294
- "ṉ" => "Ṉ", "ṇ" => "Ṇ", "ṅ" => "Ṅ",
295
- "ṃ" => "Ṃ", "ṁ" => "Ṁ", "ḿ" => "Ḿ",
296
- "ḽ" => "Ḽ", "ḻ" => "Ḻ", "ḹ" => "Ḹ",
297
- "·∏∑" => "·∏∂", "·∏µ" => "·∏¥", "·∏≥" => "·∏≤",
298
- "ḱ" => "Ḱ", "ḯ" => "Ḯ", "ḭ" => "Ḭ",
299
- "ḫ" => "Ḫ", "ḩ" => "Ḩ", "ḧ" => "Ḧ",
300
- "ḥ" => "Ḥ", "ḣ" => "Ḣ", "ḡ" => "Ḡ",
301
- "ḟ" => "Ḟ", "ḝ" => "Ḝ", "ḛ" => "Ḛ",
302
- "ḙ" => "Ḙ", "ḗ" => "Ḗ", "ḕ" => "Ḕ",
303
- "ḓ" => "Ḓ", "ḑ" => "Ḑ", "ḏ" => "Ḏ",
304
- "ḍ" => "Ḍ", "ḋ" => "Ḋ", "ḉ" => "Ḉ",
305
- "ḇ" => "Ḇ", "ḅ" => "Ḅ", "ḃ" => "Ḃ",
306
- "ḁ" => "Ḁ", "ֆ" => "Ֆ", "օ" => "Օ",
307
- "ք" => "Ք", "փ" => "Փ", "ւ" => "Ւ",
308
- "ց" => "Ց", "ր" => "Ր", "տ" => "Տ",
309
- "’æ" => "’é", "’Ω" => "’ç", "’º" => "’å",
310
- "’ª" => "’ã", "’∫" => "’ä", "’π" => "’â",
311
- "’∏" => "’à", "’∑" => "’á", "’∂" => "’Ü",
312
- "’µ" => "’Ö", "’¥" => "’Ñ", "’≥" => "’É",
313
- "’≤" => "’Ç", "’±" => "’Å", "’∞" => "’Ä",
314
- "’Ø" => "‘ø", "’Æ" => "‘æ", "’≠" => "‘Ω",
315
- "լ" => "Լ", "ի" => "Ի", "ժ" => "Ժ",
316
- "’©" => "‘π", "’®" => "‘∏", "’ß" => "‘∑",
317
- "’¶" => "‘∂", "’•" => "‘µ", "’§" => "‘¥",
318
- "’£" => "‘≥", "’¢" => "‘≤", "’°" => "‘±",
319
- "‘è" => "‘é", "‘ç" => "‘å", "‘ã" => "‘ä",
320
- "‘â" => "‘à", "‘á" => "‘Ü", "‘Ö" => "‘Ñ",
321
- "‘É" => "‘Ç", "‘Å" => "‘Ä", "”π" => "”∏",
322
- "ӵ" => "Ӵ", "ӳ" => "Ӳ", "ӱ" => "Ӱ",
323
- "ӯ" => "Ӯ", "ӭ" => "Ӭ", "ӫ" => "Ӫ",
324
- "ө" => "Ө", "ӧ" => "Ӧ", "ӥ" => "Ӥ",
325
- "”£" => "”¢", "”°" => "” ", "”ü" => "”û",
326
- "”ù" => "”ú", "”õ" => "”ö", "”ô" => "”ò",
327
- "ӗ" => "Ӗ", "ӕ" => "Ӕ", "ӓ" => "Ӓ",
328
- "ӑ" => "Ӑ", "ӎ" => "Ӎ", "ӌ" => "Ӌ",
329
- "ӊ" => "Ӊ", "ӈ" => "Ӈ", "ӆ" => "Ӆ",
330
- "ӄ" => "Ӄ", "ӂ" => "Ӂ", "ҿ" => "Ҿ",
331
- "ҽ" => "Ҽ", "һ" => "Һ", "ҹ" => "Ҹ",
332
- "“∑" => "“∂", "“µ" => "“¥", "“≥" => "“≤",
333
- "ұ" => "Ұ", "ү" => "Ү", "ҭ" => "Ҭ",
334
- "ҫ" => "Ҫ", "ҩ" => "Ҩ", "ҧ" => "Ҧ",
335
- "“•" => "“§", "“£" => "“¢", "“°" => "“ ",
336
- "“ü" => "“û", "“ù" => "“ú", "“õ" => "“ö",
337
- "“ô" => "“ò", "“ó" => "“ñ", "“ï" => "“î",
338
- "“ì" => "“í", "“ë" => "“ê", "“è" => "“é",
339
- "“ç" => "“å", "“ã" => "“ä", "“Å" => "“Ä",
340
- "—ø" => "—æ", "—Ω" => "—º", "—ª" => "—∫",
341
- "—π" => "—∏", "—∑" => "—∂", "—µ" => "—¥",
342
- "—≥" => "—≤", "—±" => "—∞", "—Ø" => "—Æ",
343
- "—≠" => "—¨", "—´" => "—™", "—©" => "—®",
344
- "—ß" => "—¶", "—•" => "—§", "—£" => "—¢",
345
- "—°" => "— ", "—ü" => "–è", "—û" => "–é",
346
- "—ù" => "–ç", "—ú" => "–å", "—õ" => "–ã",
347
- "—ö" => "–ä", "—ô" => "–â", "—ò" => "–à",
348
- "—ó" => "–á", "—ñ" => "–Ü", "—ï" => "–Ö",
349
- "—î" => "–Ñ", "—ì" => "–É", "—í" => "–Ç",
350
- "—ë" => "–Å", "—ê" => "–Ä", "—è" => "–Ø",
351
- "—é" => "–Æ", "—ç" => "–≠", "—å" => "–¨",
352
- "—ã" => "–´", "—ä" => "–™", "—â" => "–©",
353
- "—à" => "–®", "—á" => "–ß", "—Ü" => "–¶",
354
- "—Ö" => "–•", "—Ñ" => "–§", "—É" => "–£",
355
- "—Ç" => "–¢", "—Å" => "–°", "—Ä" => "– ",
356
- "–ø" => "–ü", "–æ" => "–û", "–Ω" => "–ù",
357
- "–º" => "–ú", "–ª" => "–õ", "–∫" => "–ö",
358
- "–π" => "–ô", "–∏" => "–ò", "–∑" => "–ó",
359
- "–∂" => "–ñ", "–µ" => "–ï", "–¥" => "–î",
360
- "–≥" => "–ì", "–≤" => "–í", "–±" => "–ë",
361
- "а" => "А", "ϵ" => "Ε", "ϲ" => "Σ",
362
- "ϱ" => "Ρ", "ϰ" => "Κ", "ϯ" => "Ϯ",
363
- "ϭ" => "Ϭ", "ϫ" => "Ϫ", "ϩ" => "Ϩ",
364
- "ϧ" => "Ϧ", "ϥ" => "Ϥ", "ϣ" => "Ϣ",
365
- "œ°" => "œ ", "œü" => "œû", "œù" => "œú",
366
- "ϛ" => "Ϛ", "ϙ" => "Ϙ", "ϖ" => "Π",
367
- "ϕ" => "Φ", "ϑ" => "Θ", "ϐ" => "Β",
368
- "ώ" => "Ώ", "ύ" => "Ύ", "ό" => "Ό",
369
- "ϋ" => "Ϋ", "ϊ" => "Ϊ", "ω" => "Ω",
370
- "ψ" => "Ψ", "χ" => "Χ", "φ" => "Φ",
371
- "υ" => "Υ", "τ" => "Τ", "σ" => "Σ",
372
- "ς" => "Σ", "ρ" => "Ρ", "π" => "Π",
373
- "ο" => "Ο", "ξ" => "Ξ", "ν" => "Ν",
374
- "μ" => "Μ", "λ" => "Λ", "κ" => "Κ",
375
- "ι" => "Ι", "θ" => "Θ", "η" => "Η",
376
- "ζ" => "Ζ", "ε" => "Ε", "δ" => "Δ",
377
- "γ" => "Γ", "β" => "Β", "α" => "Α",
378
- "ί" => "Ί", "ή" => "Ή", "έ" => "Έ",
379
- "ά" => "Ά", "ʒ" => "Ʒ", "ʋ" => "Ʋ",
380
- "ʊ" => "Ʊ", "ʈ" => "Ʈ", "ʃ" => "Ʃ",
381
- "ʀ" => "Ʀ", "ɵ" => "Ɵ", "ɲ" => "Ɲ",
382
- "ɯ" => "Ɯ", "ɩ" => "Ɩ", "ɨ" => "Ɨ",
383
- "…£" => "∆î", "… " => "∆ì", "…õ" => "∆ê",
384
- "ə" => "Ə", "ɗ" => "Ɗ", "ɖ" => "Ɖ",
385
- "ɔ" => "Ɔ", "ɓ" => "Ɓ", "ȳ" => "Ȳ",
386
- "ȱ" => "Ȱ", "ȯ" => "Ȯ", "ȭ" => "Ȭ",
387
- "ȫ" => "Ȫ", "ȩ" => "Ȩ", "ȧ" => "Ȧ",
388
- "ȥ" => "Ȥ", "ȣ" => "Ȣ", "ȟ" => "Ȟ",
389
- "»ù" => "»ú", "»õ" => "»ö", "»ô" => "»ò",
390
- "ȗ" => "Ȗ", "ȕ" => "Ȕ", "ȓ" => "Ȓ",
391
- "ȑ" => "Ȑ", "ȏ" => "Ȏ", "ȍ" => "Ȍ",
392
- "ȋ" => "Ȋ", "ȉ" => "Ȉ", "ȇ" => "Ȇ",
393
- "ȅ" => "Ȅ", "ȃ" => "Ȃ", "ȁ" => "Ȁ",
394
- "ǿ" => "Ǿ", "ǽ" => "Ǽ", "ǻ" => "Ǻ",
395
- "«π" => "«∏", "«µ" => "«¥", "«≥" => "«≤",
396
- "ǯ" => "Ǯ", "ǭ" => "Ǭ", "ǫ" => "Ǫ",
397
- "ǩ" => "Ǩ", "ǧ" => "Ǧ", "ǥ" => "Ǥ",
398
- "«£" => "«¢", "«°" => "« ", "«ü" => "«û",
399
- "ǝ" => "Ǝ", "ǜ" => "Ǜ", "ǚ" => "Ǚ",
400
- "«ò" => "«ó", "«ñ" => "«ï", "«î" => "«ì",
401
- "«í" => "«ë", "«ê" => "«è", "«é" => "«ç",
402
- "«å" => "«ã", "«â" => "«à", "«Ü" => "«Ö",
403
- "ƿ" => "Ƿ", "ƽ" => "Ƽ", "ƹ" => "Ƹ",
404
- "ƶ" => "Ƶ", "ƴ" => "Ƴ", "ư" => "Ư",
405
- "ƭ" => "Ƭ", "ƨ" => "Ƨ", "ƥ" => "Ƥ",
406
- "∆£" => "∆¢", "∆°" => "∆ ", "∆û" => "» ",
407
- "ƙ" => "Ƙ", "ƕ" => "Ƕ", "ƒ" => "Ƒ",
408
- "ƌ" => "Ƌ", "ƈ" => "Ƈ", "ƅ" => "Ƅ",
409
- "ƃ" => "Ƃ", "ſ" => "S", "ž" => "Ž",
410
- "ż" => "Ż", "ź" => "Ź", "ŷ" => "Ŷ",
411
- "≈µ" => "≈¥", "≈≥" => "≈≤", "≈±" => "≈∞",
412
- "ů" => "Ů", "ŭ" => "Ŭ", "ū" => "Ū",
413
- "ũ" => "Ũ", "ŧ" => "Ŧ", "ť" => "Ť",
414
- "ţ" => "Ţ", "š" => "Š", "ş" => "Ş",
415
- "≈ù" => "≈ú", "≈õ" => "≈ö", "≈ô" => "≈ò",
416
- "ŗ" => "Ŗ", "ŕ" => "Ŕ", "œ" => "Œ",
417
- "ő" => "Ő", "ŏ" => "Ŏ", "ō" => "Ō",
418
- "ŋ" => "Ŋ", "ň" => "Ň", "ņ" => "Ņ",
419
- "ń" => "Ń", "ł" => "Ł", "ŀ" => "Ŀ",
420
- "ľ" => "Ľ", "ļ" => "Ļ", "ĺ" => "Ĺ",
421
- "ķ" => "Ķ", "ĵ" => "Ĵ", "ij" => "IJ",
422
- "ı" => "I", "į" => "Į", "ĭ" => "Ĭ",
423
- "ī" => "Ī", "ĩ" => "Ĩ", "ħ" => "Ħ",
424
- "ƒ•" => "ƒ§", "ƒ£" => "ƒ¢", "ƒ°" => "ƒ ",
425
- "ğ" => "Ğ", "ĝ" => "Ĝ", "ě" => "Ě",
426
- "ę" => "Ę", "ė" => "Ė", "ĕ" => "Ĕ",
427
- "ē" => "Ē", "đ" => "Đ", "ď" => "Ď",
428
- "č" => "Č", "ċ" => "Ċ", "ĉ" => "Ĉ",
429
- "ć" => "Ć", "ą" => "Ą", "ă" => "Ă",
430
- "ā" => "Ā", "ÿ" => "Ÿ", "þ" => "Þ",
431
- "ý" => "Ý", "ü" => "Ü", "û" => "Û",
432
- "√∫" => "√ö", "√π" => "√ô", "√∏" => "√ò",
433
- "ö" => "Ö", "õ" => "Õ", "ô" => "Ô",
434
- "ó" => "Ó", "ò" => "Ò", "ñ" => "Ñ",
435
- "ð" => "Ð", "ï" => "Ï", "î" => "Î",
436
- "í" => "Í", "ì" => "Ì", "ë" => "Ë",
437
- "ê" => "Ê", "é" => "É", "è" => "È",
438
- "ç" => "Ç", "æ" => "Æ", "å" => "Å",
439
- "ä" => "Ä", "ã" => "Ã", "â" => "Â",
440
- "á" => "Á", "à " => "À", "µ" => "Μ",
441
- "z" => "Z", "y" => "Y", "x" => "X",
442
- "w" => "W", "v" => "V", "u" => "U",
443
- "t" => "T", "s" => "S", "r" => "R",
444
- "q" => "Q", "p" => "P", "o" => "O",
445
- "n" => "N", "m" => "M", "l" => "L",
446
- "k" => "K", "j" => "J", "i" => "I",
447
- "h" => "H", "g" => "G", "f" => "F",
448
- "e" => "E", "d" => "D", "c" => "C",
449
- "b" => "B", "a" => "A",
450
  );
2
  /**
3
  * @package All-in-One-SEO-Pack
4
  */
5
+ $UTF8_TABLES = array();
6
 
7
  $UTF8_TABLES['strtolower'] = array(
8
+ 'Z' => 'z', 'Y' => 'y', 'X' => 'x',
9
+ 'W' => 'w', 'V' => 'v', 'U' => 'u',
10
+ 'T' => 't', 'S' => 's', 'R' => 'r',
11
+ 'Q' => 'q', 'P' => 'p', 'O' => 'o',
12
+ 'N' => 'n', 'M' => 'm', 'L' => 'l',
13
+ 'K' => 'k', 'J' => 'j', 'I' => 'i',
14
+ 'H' => 'h', 'G' => 'g', 'F' => 'f',
15
+ 'E' => 'e', 'D' => 'd', 'C' => 'c',
16
+ 'B' => 'b', 'A' => 'a', 'Å' => 'å',
17
+ 'K' => 'k', 'Ω' => 'ω', 'Ώ' => 'ώ',
18
+ '·ø∫' => '·Ωº', '·øπ' => '·Ωπ', '·ø∏' => '·Ω∏',
19
+ '·ø¨' => '·ø•', '·ø´' => '·Ωª', '·ø™' => '·Ω∫',
20
+ '·ø©' => '·ø°', '·ø®' => '·ø ', '·øõ' => '·Ω∑',
21
+ '·øö' => '·Ω∂', '·øô' => '·øë', '·øò' => '·øê',
22
+ '·øã' => '·Ωµ', '·øä' => '·Ω¥', '·øâ' => '·Ω≥',
23
+ 'Ὲ' => 'ὲ', 'Ά' => 'ά', 'Ὰ' => 'ὰ',
24
+ '·æπ' => '·æ±', '·æ∏' => '·æ∞', '·ΩØ' => '·Ωß',
25
+ '·ΩÆ' => '·Ω¶', '·Ω≠' => '·Ω•', '·Ω¨' => '·Ω§',
26
+ '·Ω´' => '·Ω£', '·Ω™' => '·Ω¢', '·Ω©' => '·Ω°',
27
+ '·Ω®' => '·Ω ', '·Ωü' => '·Ωó', '·Ωù' => '·Ωï',
28
+ '·Ωõ' => '·Ωì', '·Ωô' => '·Ωë', '·Ωç' => '·ΩÖ',
29
+ '·Ωå' => '·ΩÑ', '·Ωã' => '·ΩÉ', '·Ωä' => '·ΩÇ',
30
+ 'Ὁ' => 'ὁ', 'Ὀ' => 'ὀ', 'Ἷ' => 'ἷ',
31
+ 'Ἶ' => 'ἶ', 'Ἵ' => 'ἵ', 'Ἴ' => 'ἴ',
32
+ 'Ἳ' => 'ἳ', 'Ἲ' => 'ἲ', 'Ἱ' => 'ἱ',
33
+ 'Ἰ' => 'ἰ', 'Ἧ' => 'ἧ', 'Ἦ' => 'ἦ',
34
+ 'Ἥ' => 'ἥ', 'Ἤ' => 'ἤ', 'Ἣ' => 'ἣ',
35
+ 'Ἢ' => 'ἢ', 'Ἡ' => 'ἡ', 'Ἠ' => 'ἠ',
36
+ 'Ἕ' => 'ἕ', 'Ἔ' => 'ἔ', 'Ἓ' => 'ἓ',
37
+ 'Ἒ' => 'ἒ', 'Ἑ' => 'ἑ', 'Ἐ' => 'ἐ',
38
+ 'Ἇ' => 'ἇ', 'Ἆ' => 'ἆ', 'Ἅ' => 'ἅ',
39
+ 'Ἄ' => 'ἄ', 'Ἃ' => 'ἃ', 'Ἂ' => 'ἂ',
40
+ 'Ἁ' => 'ἁ', 'Ἀ' => 'ἀ', 'Ỹ' => 'ỹ',
41
+ 'Ỷ' => 'ỷ', 'Ỵ' => 'ỵ', 'Ỳ' => 'ỳ',
42
+ 'Ự' => 'ự', 'Ữ' => 'ữ', 'Ử' => 'ử',
43
+ 'Ừ' => 'ừ', 'Ứ' => 'ứ', 'Ủ' => 'ủ',
44
+ 'Ụ' => 'ụ', 'Ợ' => 'ợ', 'Ỡ' => 'ỡ',
45
+ 'Ở' => 'ở', 'Ờ' => 'ờ', 'Ớ' => 'ớ',
46
+ 'Ộ' => 'ộ', 'Ỗ' => 'ỗ', 'Ổ' => 'ổ',
47
+ 'Ồ' => 'ồ', 'Ố' => 'ố', 'Ỏ' => 'ỏ',
48
+ 'Ọ' => 'ọ', 'Ị' => 'ị', 'Ỉ' => 'ỉ',
49
+ 'Ệ' => 'ệ', 'Ễ' => 'ễ', 'Ể' => 'ể',
50
+ 'Ề' => 'ề', 'Ế' => 'ế', 'Ẽ' => 'ẽ',
51
+ 'Ẻ' => 'ẻ', 'Ẹ' => 'ẹ', 'Ặ' => 'ặ',
52
+ '·∫¥' => '·∫µ', '·∫≤' => '·∫≥', '·∫∞' => '·∫±',
53
+ 'Ắ' => 'ắ', 'Ậ' => 'ậ', 'Ẫ' => 'ẫ',
54
+ 'Ẩ' => 'ẩ', 'Ầ' => 'ầ', 'Ấ' => 'ấ',
55
+ 'Ả' => 'ả', 'Ạ' => 'ạ', 'Ẕ' => 'ẕ',
56
+ 'Ẓ' => 'ẓ', 'Ẑ' => 'ẑ', 'Ẏ' => 'ẏ',
57
+ 'Ẍ' => 'ẍ', 'Ẋ' => 'ẋ', 'Ẉ' => 'ẉ',
58
+ 'Ẇ' => 'ẇ', 'Ẅ' => 'ẅ', 'Ẃ' => 'ẃ',
59
+ 'Ẁ' => 'ẁ', 'Ṿ' => 'ṿ', 'Ṽ' => 'ṽ',
60
+ '·π∫' => '·πª', '·π∏' => '·ππ', '·π∂' => '·π∑',
61
+ '·π¥' => '·πµ', '·π≤' => '·π≥', '·π∞' => '·π±',
62
+ 'Ṯ' => 'ṯ', 'Ṭ' => 'ṭ', 'Ṫ' => 'ṫ',
63
+ '·π®' => '·π©', '·π¶' => '·πß', '·π§' => '·π•',
64
+ '·π¢' => '·π£', '·π ' => '·π°', '·πû' => '·πü',
65
+ '·πú' => '·πù', '·πö' => '·πõ', '·πò' => '·πô',
66
+ '·πñ' => '·πó', '·πî' => '·πï', '·πí' => '·πì',
67
+ '·πê' => '·πë', '·πé' => '·πè', '·πå' => '·πç',
68
+ 'Ṋ' => 'ṋ', 'Ṉ' => 'ṉ', 'Ṇ' => 'ṇ',
69
+ 'Ṅ' => 'ṅ', 'Ṃ' => 'ṃ', 'Ṁ' => 'ṁ',
70
+ 'Ḿ' => 'ḿ', 'Ḽ' => 'ḽ', 'Ḻ' => 'ḻ',
71
+ '·∏∏' => '·∏π', '·∏∂' => '·∏∑', '·∏¥' => '·∏µ',
72
+ 'Ḳ' => 'ḳ', 'Ḱ' => 'ḱ', 'Ḯ' => 'ḯ',
73
+ 'Ḭ' => 'ḭ', 'Ḫ' => 'ḫ', 'Ḩ' => 'ḩ',
74
+ 'Ḧ' => 'ḧ', 'Ḥ' => 'ḥ', 'Ḣ' => 'ḣ',
75
+ 'Ḡ' => 'ḡ', 'Ḟ' => 'ḟ', 'Ḝ' => 'ḝ',
76
+ 'Ḛ' => 'ḛ', 'Ḙ' => 'ḙ', 'Ḗ' => 'ḗ',
77
+ 'Ḕ' => 'ḕ', 'Ḓ' => 'ḓ', 'Ḑ' => 'ḑ',
78
+ 'Ḏ' => 'ḏ', 'Ḍ' => 'ḍ', 'Ḋ' => 'ḋ',
79
+ 'Ḉ' => 'ḉ', 'Ḇ' => 'ḇ', 'Ḅ' => 'ḅ',
80
+ 'Ḃ' => 'ḃ', 'Ḁ' => 'ḁ', 'Ֆ' => 'ֆ',
81
+ 'Օ' => 'օ', 'Ք' => 'ք', 'Փ' => 'փ',
82
+ 'Ւ' => 'ւ', 'Ց' => 'ց', 'Ր' => 'ր',
83
+ '’è' => '’ø', '’é' => '’æ', '’ç' => '’Ω',
84
+ '’å' => '’º', '’ã' => '’ª', '’ä' => '’∫',
85
+ '’â' => '’π', '’à' => '’∏', '’á' => '’∑',
86
+ '’Ü' => '’∂', '’Ö' => '’µ', '’Ñ' => '’¥',
87
+ '’É' => '’≥', '’Ç' => '’≤', '’Å' => '’±',
88
+ '’Ä' => '’∞', '‘ø' => '’Ø', '‘æ' => '’Æ',
89
+ 'Խ' => 'խ', 'Լ' => 'լ', 'Ի' => 'ի',
90
+ '‘∫' => '’™', '‘π' => '’©', '‘∏' => '’®',
91
+ '‘∑' => '’ß', '‘∂' => '’¶', '‘µ' => '’•',
92
+ '‘¥' => '’§', '‘≥' => '’£', '‘≤' => '’¢',
93
+ '‘±' => '’°', '‘é' => '‘è', '‘å' => '‘ç',
94
+ '‘ä' => '‘ã', '‘à' => '‘â', '‘Ü' => '‘á',
95
+ '‘Ñ' => '‘Ö', '‘Ç' => '‘É', '‘Ä' => '‘Å',
96
+ 'Ӹ' => 'ӹ', 'Ӵ' => 'ӵ', 'Ӳ' => 'ӳ',
97
+ 'Ӱ' => 'ӱ', 'Ӯ' => 'ӯ', 'Ӭ' => 'ӭ',
98
+ 'Ӫ' => 'ӫ', 'Ө' => 'ө', 'Ӧ' => 'ӧ',
99
+ '”§' => '”•', '”¢' => '”£', '” ' => '”°',
100
+ 'Ӟ' => 'ӟ', 'Ӝ' => 'ӝ', 'Ӛ' => 'ӛ',
101
+ 'Ә' => 'ә', 'Ӗ' => 'ӗ', 'Ӕ' => 'ӕ',
102
+ 'Ӓ' => 'ӓ', 'Ӑ' => 'ӑ', 'Ӎ' => 'ӎ',
103
+ 'Ӌ' => 'ӌ', 'Ӊ' => 'ӊ', 'Ӈ' => 'ӈ',
104
+ 'Ӆ' => 'ӆ', 'Ӄ' => 'ӄ', 'Ӂ' => 'ӂ',
105
+ 'Ҿ' => 'ҿ', 'Ҽ' => 'ҽ', 'Һ' => 'һ',
106
+ '“∏' => '“π', '“∂' => '“∑', '“¥' => '“µ',
107
+ '“≤' => '“≥', '“∞' => '“±', '“Æ' => '“Ø',
108
+ 'Ҭ' => 'ҭ', 'Ҫ' => 'ҫ', 'Ҩ' => 'ҩ',
109
+ 'Ҧ' => 'ҧ', 'Ҥ' => 'ҥ', 'Ң' => 'ң',
110
+ '“ ' => '“°', '“û' => '“ü', '“ú' => '“ù',
111
+ '“ö' => '“õ', '“ò' => '“ô', '“ñ' => '“ó',
112
+ '“î' => '“ï', '“í' => '“ì', '“ê' => '“ë',
113
+ '“é' => '“è', '“å' => '“ç', '“ä' => '“ã',
114
+ '“Ä' => '“Å', '—æ' => '—ø', '—º' => '—Ω',
115
+ '—∫' => '—ª', '—∏' => '—π', '—∂' => '—∑',
116
+ '—¥' => '—µ', '—≤' => '—≥', '—∞' => '—±',
117
+ '—Æ' => '—Ø', '—¨' => '—≠', '—™' => '—´',
118
+ '—®' => '—©', '—¶' => '—ß', '—§' => '—•',
119
+ '—¢' => '—£', '— ' => '—°', '–Ø' => '—è',
120
+ '–Æ' => '—é', '–≠' => '—ç', '–¨' => '—å',
121
+ '–´' => '—ã', '–™' => '—ä', '–©' => '—â',
122
+ '–®' => '—à', '–ß' => '—á', '–¶' => '—Ü',
123
+ '–•' => '—Ö', '–§' => '—Ñ', '–£' => '—É',
124
+ '–¢' => '—Ç', '–°' => '—Å', '– ' => '—Ä',
125
+ '–ü' => '–ø', '–û' => '–æ', '–ù' => '–Ω',
126
+ '–ú' => '–º', '–õ' => '–ª', '–ö' => '–∫',
127
+ '–ô' => '–π', '–ò' => '–∏', '–ó' => '–∑',
128
+ '–ñ' => '–∂', '–ï' => '–µ', '–î' => '–¥',
129
+ '–ì' => '–≥', '–í' => '–≤', '–ë' => '–±',
130
+ '–ê' => '–∞', '–è' => '—ü', '–é' => '—û',
131
+ '–ç' => '—ù', '–å' => '—ú', '–ã' => '—õ',
132
+ '–ä' => '—ö', '–â' => '—ô', '–à' => '—ò',
133
+ '–á' => '—ó', '–Ü' => '—ñ', '–Ö' => '—ï',
134
+ '–Ñ' => '—î', '–É' => '—ì', '–Ç' => '—í',
135
+ 'Ё' => 'ё', 'Ѐ' => 'ѐ', 'ϴ' => 'θ',
136
+ 'Ϯ' => 'ϯ', 'Ϭ' => 'ϭ', 'Ϫ' => 'ϫ',
137
+ 'Ϩ' => 'ϩ', 'Ϧ' => 'ϧ', 'Ϥ' => 'ϥ',
138
+ 'œ¢' => 'œ£', 'œ ' => 'œ°', 'œû' => 'œü',
139
+ 'Ϝ' => 'ϝ', 'Ϛ' => 'ϛ', 'Ϙ' => 'ϙ',
140
+ 'Ϋ' => 'ϋ', 'Ϊ' => 'ϊ', 'Ω' => 'ω',
141
+ 'Ψ' => 'ψ', 'Χ' => 'χ', 'Φ' => 'φ',
142
+ 'Υ' => 'υ', 'Τ' => 'τ', 'Σ' => 'σ',
143
+ 'Ρ' => 'ρ', 'Π' => 'π', 'Ο' => 'ο',
144
+ 'Ξ' => 'ξ', 'Ν' => 'ν', 'Μ' => 'μ',
145
+ 'Λ' => 'λ', 'Κ' => 'κ', 'Ι' => 'ι',
146
+ 'Θ' => 'θ', 'Η' => 'η', 'Ζ' => 'ζ',
147
+ 'Ε' => 'ε', 'Δ' => 'δ', 'Γ' => 'γ',
148
+ 'Β' => 'β', 'Α' => 'α', 'Ώ' => 'ώ',
149
+ 'Ύ' => 'ύ', 'Ό' => 'ό', 'Ί' => 'ί',
150
+ 'Ή' => 'ή', 'Έ' => 'έ', 'Ά' => 'ά',
151
+ 'Ȳ' => 'ȳ', 'Ȱ' => 'ȱ', 'Ȯ' => 'ȯ',
152
+ 'Ȭ' => 'ȭ', 'Ȫ' => 'ȫ', 'Ȩ' => 'ȩ',
153
+ 'Ȧ' => 'ȧ', 'Ȥ' => 'ȥ', 'Ȣ' => 'ȣ',
154
+ '» ' => '∆û', '»û' => '»ü', '»ú' => '»ù',
155
+ 'Ț' => 'ț', 'Ș' => 'ș', 'Ȗ' => 'ȗ',
156
+ 'Ȕ' => 'ȕ', 'Ȓ' => 'ȓ', 'Ȑ' => 'ȑ',
157
+ 'Ȏ' => 'ȏ', 'Ȍ' => 'ȍ', 'Ȋ' => 'ȋ',
158
+ 'Ȉ' => 'ȉ', 'Ȇ' => 'ȇ', 'Ȅ' => 'ȅ',
159
+ 'Ȃ' => 'ȃ', 'Ȁ' => 'ȁ', 'Ǿ' => 'ǿ',
160
+ 'Ǽ' => 'ǽ', 'Ǻ' => 'ǻ', 'Ǹ' => 'ǹ',
161
+ 'Ƿ' => 'ƿ', 'Ƕ' => 'ƕ', 'Ǵ' => 'ǵ',
162
+ 'DZ' => 'dz', 'Ǯ' => 'ǯ', 'Ǭ' => 'ǭ',
163
+ 'Ǫ' => 'ǫ', 'Ǩ' => 'ǩ', 'Ǧ' => 'ǧ',
164
+ '«§' => '«•', '«¢' => '«£', '« ' => '«°',
165
+ '«û' => '«ü', '«õ' => '«ú', '«ô' => '«ö',
166
+ '«ó' => '«ò', '«ï' => '«ñ', '«ì' => '«î',
167
+ '«ë' => '«í', '«è' => '«ê', '«ç' => '«é',
168
+ '«ä' => '«å', '«á' => '«â', '«Ñ' => '«Ü',
169
+ 'Ƽ' => 'ƽ', 'Ƹ' => 'ƹ', 'Ʒ' => 'ʒ',
170
+ '∆µ' => '∆∂', '∆≥' => '∆¥', '∆≤' => ' ã',
171
+ 'Ʊ' => 'ʊ', 'Ư' => 'ư', 'Ʈ' => 'ʈ',
172
+ 'Ƭ' => 'ƭ', 'Ʃ' => 'ʃ', 'Ƨ' => 'ƨ',
173
+ 'Ʀ' => 'ʀ', 'Ƥ' => 'ƥ', 'Ƣ' => 'ƣ',
174
+ '∆ ' => '∆°', '∆ü' => '…µ', '∆ù' => '…≤',
175
+ '∆ú' => '…Ø', '∆ò' => '∆ô', '∆ó' => '…®',
176
+ '∆ñ' => '…©', '∆î' => '…£', '∆ì' => '… ',
177
+ 'Ƒ' => 'ƒ', 'Ɛ' => 'ɛ', 'Ə' => 'ə',
178
+ 'Ǝ' => 'ǝ', 'Ƌ' => 'ƌ', 'Ɗ' => 'ɗ',
179
+ 'Ɖ' => 'ɖ', 'Ƈ' => 'ƈ', 'Ɔ' => 'ɔ',
180
+ 'Ƅ' => 'ƅ', 'Ƃ' => 'ƃ', 'Ɓ' => 'ɓ',
181
+ 'Ž' => 'ž', 'Ż' => 'ż', 'Ź' => 'ź',
182
+ 'Ÿ' => 'ÿ', 'Ŷ' => 'ŷ', 'Ŵ' => 'ŵ',
183
+ 'Ų' => 'ų', 'Ű' => 'ű', 'Ů' => 'ů',
184
+ 'Ŭ' => 'ŭ', 'Ū' => 'ū', 'Ũ' => 'ũ',
185
+ 'Ŧ' => 'ŧ', 'Ť' => 'ť', 'Ţ' => 'ţ',
186
+ 'Š' => 'š', 'Ş' => 'ş', 'Ŝ' => 'ŝ',
187
+ 'Ś' => 'ś', 'Ř' => 'ř', 'Ŗ' => 'ŗ',
188
+ 'Ŕ' => 'ŕ', 'Œ' => 'œ', 'Ő' => 'ő',
189
+ 'Ŏ' => 'ŏ', 'Ō' => 'ō', 'Ŋ' => 'ŋ',
190
+ 'Ň' => 'ň', 'Ņ' => 'ņ', 'Ń' => 'ń',
191
+ 'Ł' => 'ł', 'Ŀ' => 'ŀ', 'Ľ' => 'ľ',
192
+ 'Ļ' => 'ļ', 'Ĺ' => 'ĺ', 'Ķ' => 'ķ',
193
+ 'Ĵ' => 'ĵ', 'IJ' => 'ij', 'İ' => 'i',
194
+ 'Į' => 'į', 'Ĭ' => 'ĭ', 'Ī' => 'ī',
195
+ 'Ĩ' => 'ĩ', 'Ħ' => 'ħ', 'Ĥ' => 'ĥ',
196
+ 'ƒ¢' => 'ƒ£', 'ƒ ' => 'ƒ°', 'ƒû' => 'ƒü',
197
+ 'ƒú' => 'ƒù', 'ƒö' => 'ƒõ', 'ƒò' => 'ƒô',
198
+ 'Ė' => 'ė', 'Ĕ' => 'ĕ', 'Ē' => 'ē',
199
+ 'Đ' => 'đ', 'Ď' => 'ď', 'Č' => 'č',
200
+ 'Ċ' => 'ċ', 'Ĉ' => 'ĉ', 'Ć' => 'ć',
201
+ 'Ą' => 'ą', 'Ă' => 'ă', 'Ā' => 'ā',
202
+ 'Þ' => 'þ', 'Ý' => 'ý', 'Ü' => 'ü',
203
+ 'Û' => 'û', 'Ú' => 'ú', 'Ù' => 'ù',
204
+ 'Ø' => 'ø', 'Ö' => 'ö', 'Õ' => 'õ',
205
+ 'Ô' => 'ô', 'Ó' => 'ó', 'Ò' => 'ò',
206
+ 'Ñ' => 'ñ', 'Ð' => 'ð', 'Ï' => 'ï',
207
+ 'Î' => 'î', 'Í' => 'í', 'Ì' => 'ì',
208
+ 'Ë' => 'ë', 'Ê' => 'ê', 'É' => 'é',
209
+ 'È' => 'è', 'Ç' => 'ç', 'Æ' => 'æ',
210
+ 'Å' => 'å', 'Ä' => 'ä', 'Ã' => 'ã',
211
+ 'Â' => 'â', 'Á' => 'á', 'À' => 'à ',
212
+ 'Z' => 'z', 'Y' => 'y', 'X' => 'x',
213
+ 'W' => 'w', 'V' => 'v', 'U' => 'u',
214
+ 'T' => 't', 'S' => 's', 'R' => 'r',
215
+ 'Q' => 'q', 'P' => 'p', 'O' => 'o',
216
+ 'N' => 'n', 'M' => 'm', 'L' => 'l',
217
+ 'K' => 'k', 'J' => 'j', 'I' => 'i',
218
+ 'H' => 'h', 'G' => 'g', 'F' => 'f',
219
+ 'E' => 'e', 'D' => 'd', 'C' => 'c',
220
+ 'B' => 'b', 'A' => 'a',
221
  );
222
 
223
 
224
  $UTF8_TABLES['strtoupper'] = array(
225
+ 'z' => 'Z', 'y' => 'Y', 'x' => 'X',
226
+ 'w' => 'W', 'v' => 'V', 'u' => 'U',
227
+ 't' => 'T', 's' => 'S', 'r' => 'R',
228
+ 'q' => 'Q', 'p' => 'P', 'o' => 'O',
229
+ 'n' => 'N', 'm' => 'M', 'l' => 'L',
230
+ 'k' => 'K', 'j' => 'J', 'i' => 'I',
231
+ 'h' => 'H', 'g' => 'G', 'f' => 'F',
232
+ 'e' => 'E', 'd' => 'D', 'c' => 'C',
233
+ 'b' => 'B', 'a' => 'A', 'ῳ' => 'ῼ',
234
+ '·ø•' => '·ø¨', '·ø°' => '·ø©', '·ø ' => '·ø®',
235
+ '·øë' => '·øô', '·øê' => '·øò', '·øÉ' => '·øå',
236
+ 'ι' => 'Ι', 'ᾳ' => 'ᾼ', 'ᾱ' => 'Ᾱ',
237
+ 'ᾰ' => 'Ᾰ', 'ᾧ' => 'ᾯ', 'ᾦ' => 'ᾮ',
238
+ 'ᾥ' => 'ᾭ', 'ᾤ' => 'ᾬ', 'ᾣ' => 'ᾫ',
239
+ 'ᾢ' => 'ᾪ', 'ᾡ' => 'ᾩ', 'ᾠ' => 'ᾨ',
240
+ '·æó' => '·æü', '·æñ' => '·æû', '·æï' => '·æù',
241
+ '·æî' => '·æú', '·æì' => '·æõ', '·æí' => '·æö',
242
+ '·æë' => '·æô', '·æê' => '·æò', '·æá' => '·æè',
243
+ 'ᾆ' => 'ᾎ', 'ᾅ' => 'ᾍ', 'ᾄ' => 'ᾌ',
244
+ 'ᾃ' => 'ᾋ', 'ᾂ' => 'ᾊ', 'ᾁ' => 'ᾉ',
245
+ 'ᾀ' => 'ᾈ', 'ώ' => 'Ώ', 'ὼ' => 'Ὼ',
246
+ '·Ωª' => '·ø´', '·Ω∫' => '·ø™', '·Ωπ' => '·øπ',
247
+ '·Ω∏' => '·ø∏', '·Ω∑' => '·øõ', '·Ω∂' => '·øö',
248
+ '·Ωµ' => '·øã', '·Ω¥' => '·øä', '·Ω≥' => '·øâ',
249
+ 'ὲ' => 'Ὲ', 'ά' => 'Ά', 'ὰ' => 'Ὰ',
250
+ '·Ωß' => '·ΩØ', '·Ω¶' => '·ΩÆ', '·Ω•' => '·Ω≠',
251
+ '·Ω§' => '·Ω¨', '·Ω£' => '·Ω´', '·Ω¢' => '·Ω™',
252
+ '·Ω°' => '·Ω©', '·Ω ' => '·Ω®', '·Ωó' => '·Ωü',
253
+ '·Ωï' => '·Ωù', '·Ωì' => '·Ωõ', '·Ωë' => '·Ωô',
254
+ '·ΩÖ' => '·Ωç', '·ΩÑ' => '·Ωå', '·ΩÉ' => '·Ωã',
255
+ '·ΩÇ' => '·Ωä', '·ΩÅ' => '·Ωâ', '·ΩÄ' => '·Ωà',
256
+ 'ἷ' => 'Ἷ', 'ἶ' => 'Ἶ', 'ἵ' => 'Ἵ',
257
+ 'ἴ' => 'Ἴ', 'ἳ' => 'Ἳ', 'ἲ' => 'Ἲ',
258
+ 'ἱ' => 'Ἱ', 'ἰ' => 'Ἰ', 'ἧ' => 'Ἧ',
259
+ 'ἦ' => 'Ἦ', 'ἥ' => 'Ἥ', 'ἤ' => 'Ἤ',
260
+ 'ἣ' => 'Ἣ', 'ἢ' => 'Ἢ', 'ἡ' => 'Ἡ',
261
+ 'ἠ' => 'Ἠ', 'ἕ' => 'Ἕ', 'ἔ' => 'Ἔ',
262
+ 'ἓ' => 'Ἓ', 'ἒ' => 'Ἒ', 'ἑ' => 'Ἑ',
263
+ 'ἐ' => 'Ἐ', 'ἇ' => 'Ἇ', 'ἆ' => 'Ἆ',
264
+ 'ἅ' => 'Ἅ', 'ἄ' => 'Ἄ', 'ἃ' => 'Ἃ',
265
+ 'ἂ' => 'Ἂ', 'ἁ' => 'Ἁ', 'ἀ' => 'Ἀ',
266
+ 'ỹ' => 'Ỹ', 'ỷ' => 'Ỷ', 'ỵ' => 'Ỵ',
267
+ 'ỳ' => 'Ỳ', 'ự' => 'Ự', 'ữ' => 'Ữ',
268
+ 'ử' => 'Ử', 'ừ' => 'Ừ', 'ứ' => 'Ứ',
269
+ 'ủ' => 'Ủ', 'ụ' => 'Ụ', 'ợ' => 'Ợ',
270
+ 'ỡ' => 'Ỡ', 'ở' => 'Ở', 'ờ' => 'Ờ',
271
+ 'ớ' => 'Ớ', 'ộ' => 'Ộ', 'ỗ' => 'Ỗ',
272
+ 'ổ' => 'Ổ', 'ồ' => 'Ồ', 'ố' => 'Ố',
273
+ 'ỏ' => 'Ỏ', 'ọ' => 'Ọ', 'ị' => 'Ị',
274
+ 'ỉ' => 'Ỉ', 'ệ' => 'Ệ', 'ễ' => 'Ễ',
275
+ 'ể' => 'Ể', 'ề' => 'Ề', 'ế' => 'Ế',
276
+ 'ẽ' => 'Ẽ', 'ẻ' => 'Ẻ', 'ẹ' => 'Ẹ',
277
+ '·∫∑' => '·∫∂', '·∫µ' => '·∫¥', '·∫≥' => '·∫≤',
278
+ 'ằ' => 'Ằ', 'ắ' => 'Ắ', 'ậ' => 'Ậ',
279
+ 'ẫ' => 'Ẫ', 'ẩ' => 'Ẩ', 'ầ' => 'Ầ',
280
+ 'ấ' => 'Ấ', 'ả' => 'Ả', 'ạ' => 'Ạ',
281
+ 'ẛ' => 'Ṡ', 'ẕ' => 'Ẕ', 'ẓ' => 'Ẓ',
282
+ 'ẑ' => 'Ẑ', 'ẏ' => 'Ẏ', 'ẍ' => 'Ẍ',
283
+ 'ẋ' => 'Ẋ', 'ẉ' => 'Ẉ', 'ẇ' => 'Ẇ',
284
+ 'ẅ' => 'Ẅ', 'ẃ' => 'Ẃ', 'ẁ' => 'Ẁ',
285
+ '·πø' => '·πæ', '·πΩ' => '·πº', '·πª' => '·π∫',
286
+ '·ππ' => '·π∏', '·π∑' => '·π∂', '·πµ' => '·π¥',
287
+ 'ṳ' => 'Ṳ', 'ṱ' => 'Ṱ', 'ṯ' => 'Ṯ',
288
+ '·π≠' => '·π¨', '·π´' => '·π™', '·π©' => '·π®',
289
+ '·πß' => '·π¶', '·π•' => '·π§', '·π£' => '·π¢',
290
+ '·π°' => '·π ', '·πü' => '·πû', '·πù' => '·πú',
291
+ '·πõ' => '·πö', '·πô' => '·πò', '·πó' => '·πñ',
292
+ '·πï' => '·πî', '·πì' => '·πí', '·πë' => '·πê',
293
+ '·πè' => '·πé', '·πç' => '·πå', '·πã' => '·πä',
294
+ 'ṉ' => 'Ṉ', 'ṇ' => 'Ṇ', 'ṅ' => 'Ṅ',
295
+ 'ṃ' => 'Ṃ', 'ṁ' => 'Ṁ', 'ḿ' => 'Ḿ',
296
+ 'ḽ' => 'Ḽ', 'ḻ' => 'Ḻ', 'ḹ' => 'Ḹ',
297
+ '·∏∑' => '·∏∂', '·∏µ' => '·∏¥', '·∏≥' => '·∏≤',
298
+ 'ḱ' => 'Ḱ', 'ḯ' => 'Ḯ', 'ḭ' => 'Ḭ',
299
+ 'ḫ' => 'Ḫ', 'ḩ' => 'Ḩ', 'ḧ' => 'Ḧ',
300
+ 'ḥ' => 'Ḥ', 'ḣ' => 'Ḣ', 'ḡ' => 'Ḡ',
301
+ 'ḟ' => 'Ḟ', 'ḝ' => 'Ḝ', 'ḛ' => 'Ḛ',
302
+ 'ḙ' => 'Ḙ', 'ḗ' => 'Ḗ', 'ḕ' => 'Ḕ',
303
+ 'ḓ' => 'Ḓ', 'ḑ' => 'Ḑ', 'ḏ' => 'Ḏ',
304
+ 'ḍ' => 'Ḍ', 'ḋ' => 'Ḋ', 'ḉ' => 'Ḉ',
305
+ 'ḇ' => 'Ḇ', 'ḅ' => 'Ḅ', 'ḃ' => 'Ḃ',
306
+ 'ḁ' => 'Ḁ', 'ֆ' => 'Ֆ', 'օ' => 'Օ',
307
+ 'ք' => 'Ք', 'փ' => 'Փ', 'ւ' => 'Ւ',
308
+ 'ց' => 'Ց', 'ր' => 'Ր', 'տ' => 'Տ',
309
+ '’æ' => '’é', '’Ω' => '’ç', '’º' => '’å',
310
+ '’ª' => '’ã', '’∫' => '’ä', '’π' => '’â',
311
+ '’∏' => '’à', '’∑' => '’á', '’∂' => '’Ü',
312
+ '’µ' => '’Ö', '’¥' => '’Ñ', '’≥' => '’É',
313
+ '’≤' => '’Ç', '’±' => '’Å', '’∞' => '’Ä',
314
+ '’Ø' => '‘ø', '’Æ' => '‘æ', '’≠' => '‘Ω',
315
+ 'լ' => 'Լ', 'ի' => 'Ի', 'ժ' => 'Ժ',
316
+ '’©' => '‘π', '’®' => '‘∏', '’ß' => '‘∑',
317
+ '’¶' => '‘∂', '’•' => '‘µ', '’§' => '‘¥',
318
+ '’£' => '‘≥', '’¢' => '‘≤', '’°' => '‘±',
319
+ '‘è' => '‘é', '‘ç' => '‘å', '‘ã' => '‘ä',
320
+ '‘â' => '‘à', '‘á' => '‘Ü', '‘Ö' => '‘Ñ',
321
+ '‘É' => '‘Ç', '‘Å' => '‘Ä', '”π' => '”∏',
322
+ 'ӵ' => 'Ӵ', 'ӳ' => 'Ӳ', 'ӱ' => 'Ӱ',
323
+ 'ӯ' => 'Ӯ', 'ӭ' => 'Ӭ', 'ӫ' => 'Ӫ',
324
+ 'ө' => 'Ө', 'ӧ' => 'Ӧ', 'ӥ' => 'Ӥ',
325
+ '”£' => '”¢', '”°' => '” ', '”ü' => '”û',
326
+ '”ù' => '”ú', '”õ' => '”ö', '”ô' => '”ò',
327
+ 'ӗ' => 'Ӗ', 'ӕ' => 'Ӕ', 'ӓ' => 'Ӓ',
328
+ 'ӑ' => 'Ӑ', 'ӎ' => 'Ӎ', 'ӌ' => 'Ӌ',
329
+ 'ӊ' => 'Ӊ', 'ӈ' => 'Ӈ', 'ӆ' => 'Ӆ',
330
+ 'ӄ' => 'Ӄ', 'ӂ' => 'Ӂ', 'ҿ' => 'Ҿ',
331
+ 'ҽ' => 'Ҽ', 'һ' => 'Һ', 'ҹ' => 'Ҹ',
332
+ '“∑' => '“∂', '“µ' => '“¥', '“≥' => '“≤',
333
+ 'ұ' => 'Ұ', 'ү' => 'Ү', 'ҭ' => 'Ҭ',
334
+ 'ҫ' => 'Ҫ', 'ҩ' => 'Ҩ', 'ҧ' => 'Ҧ',
335
+ '“•' => '“§', '“£' => '“¢', '“°' => '“ ',
336
+ '“ü' => '“û', '“ù' => '“ú', '“õ' => '“ö',
337
+ '“ô' => '“ò', '“ó' => '“ñ', '“ï' => '“î',
338
+ '“ì' => '“í', '“ë' => '“ê', '“è' => '“é',
339
+ '“ç' => '“å', '“ã' => '“ä', '“Å' => '“Ä',
340
+ '—ø' => '—æ', '—Ω' => '—º', '—ª' => '—∫',
341
+ '—π' => '—∏', '—∑' => '—∂', '—µ' => '—¥',
342
+ '—≥' => '—≤', '—±' => '—∞', '—Ø' => '—Æ',
343
+ '—≠' => '—¨', '—´' => '—™', '—©' => '—®',
344
+ '—ß' => '—¶', '—•' => '—§', '—£' => '—¢',
345
+ '—°' => '— ', '—ü' => '–è', '—û' => '–é',
346
+ '—ù' => '–ç', '—ú' => '–å', '—õ' => '–ã',
347
+ '—ö' => '–ä', '—ô' => '–â', '—ò' => '–à',
348
+ '—ó' => '–á', '—ñ' => '–Ü', '—ï' => '–Ö',
349
+ '—î' => '–Ñ', '—ì' => '–É', '—í' => '–Ç',
350
+ '—ë' => '–Å', '—ê' => '–Ä', '—è' => '–Ø',
351
+ '—é' => '–Æ', '—ç' => '–≠', '—å' => '–¨',
352
+ '—ã' => '–´', '—ä' => '–™', '—â' => '–©',
353
+ '—à' => '–®', '—á' => '–ß', '—Ü' => '–¶',
354
+ '—Ö' => '–•', '—Ñ' => '–§', '—É' => '–£',
355
+ '—Ç' => '–¢', '—Å' => '–°', '—Ä' => '– ',
356
+ '–ø' => '–ü', '–æ' => '–û', '–Ω' => '–ù',
357
+ '–º' => '–ú', '–ª' => '–õ', '–∫' => '–ö',
358
+ '–π' => '–ô', '–∏' => '–ò', '–∑' => '–ó',
359
+ '–∂' => '–ñ', '–µ' => '–ï', '–¥' => '–î',
360
+ '–≥' => '–ì', '–≤' => '–í', '–±' => '–ë',
361
+ 'а' => 'А', 'ϵ' => 'Ε', 'ϲ' => 'Σ',
362
+ 'ϱ' => 'Ρ', 'ϰ' => 'Κ', 'ϯ' => 'Ϯ',
363
+ 'ϭ' => 'Ϭ', 'ϫ' => 'Ϫ', 'ϩ' => 'Ϩ',
364
+ 'ϧ' => 'Ϧ', 'ϥ' => 'Ϥ', 'ϣ' => 'Ϣ',
365
+ 'œ°' => 'œ ', 'œü' => 'œû', 'œù' => 'œú',
366
+ 'ϛ' => 'Ϛ', 'ϙ' => 'Ϙ', 'ϖ' => 'Π',
367
+ 'ϕ' => 'Φ', 'ϑ' => 'Θ', 'ϐ' => 'Β',
368
+ 'ώ' => 'Ώ', 'ύ' => 'Ύ', 'ό' => 'Ό',
369
+ 'ϋ' => 'Ϋ', 'ϊ' => 'Ϊ', 'ω' => 'Ω',
370
+ 'ψ' => 'Ψ', 'χ' => 'Χ', 'φ' => 'Φ',
371
+ 'υ' => 'Υ', 'τ' => 'Τ', 'σ' => 'Σ',
372
+ 'ς' => 'Σ', 'ρ' => 'Ρ', 'π' => 'Π',
373
+ 'ο' => 'Ο', 'ξ' => 'Ξ', 'ν' => 'Ν',
374
+ 'μ' => 'Μ', 'λ' => 'Λ', 'κ' => 'Κ',
375
+ 'ι' => 'Ι', 'θ' => 'Θ', 'η' => 'Η',
376
+ 'ζ' => 'Ζ', 'ε' => 'Ε', 'δ' => 'Δ',
377
+ 'γ' => 'Γ', 'β' => 'Β', 'α' => 'Α',
378
+ 'ί' => 'Ί', 'ή' => 'Ή', 'έ' => 'Έ',
379
+ 'ά' => 'Ά', 'ʒ' => 'Ʒ', 'ʋ' => 'Ʋ',
380
+ 'ʊ' => 'Ʊ', 'ʈ' => 'Ʈ', 'ʃ' => 'Ʃ',
381
+ 'ʀ' => 'Ʀ', 'ɵ' => 'Ɵ', 'ɲ' => 'Ɲ',
382
+ 'ɯ' => 'Ɯ', 'ɩ' => 'Ɩ', 'ɨ' => 'Ɨ',
383
+ '…£' => '∆î', '… ' => '∆ì', '…õ' => '∆ê',
384
+ 'ə' => 'Ə', 'ɗ' => 'Ɗ', 'ɖ' => 'Ɖ',
385
+ 'ɔ' => 'Ɔ', 'ɓ' => 'Ɓ', 'ȳ' => 'Ȳ',
386
+ 'ȱ' => 'Ȱ', 'ȯ' => 'Ȯ', 'ȭ' => 'Ȭ',
387
+ 'ȫ' => 'Ȫ', 'ȩ' => 'Ȩ', 'ȧ' => 'Ȧ',
388
+ 'ȥ' => 'Ȥ', 'ȣ' => 'Ȣ', 'ȟ' => 'Ȟ',
389
+ '»ù' => '»ú', '»õ' => '»ö', '»ô' => '»ò',
390
+ 'ȗ' => 'Ȗ', 'ȕ' => 'Ȕ', 'ȓ' => 'Ȓ',
391
+ 'ȑ' => 'Ȑ', 'ȏ' => 'Ȏ', 'ȍ' => 'Ȍ',
392
+ 'ȋ' => 'Ȋ', 'ȉ' => 'Ȉ', 'ȇ' => 'Ȇ',
393
+ 'ȅ' => 'Ȅ', 'ȃ' => 'Ȃ', 'ȁ' => 'Ȁ',
394
+ 'ǿ' => 'Ǿ', 'ǽ' => 'Ǽ', 'ǻ' => 'Ǻ',
395
+ '«π' => '«∏', '«µ' => '«¥', '«≥' => '«≤',
396
+ 'ǯ' => 'Ǯ', 'ǭ' => 'Ǭ', 'ǫ' => 'Ǫ',
397
+ 'ǩ' => 'Ǩ', 'ǧ' => 'Ǧ', 'ǥ' => 'Ǥ',
398
+ '«£' => '«¢', '«°' => '« ', '«ü' => '«û',
399
+ 'ǝ' => 'Ǝ', 'ǜ' => 'Ǜ', 'ǚ' => 'Ǚ',
400
+ '«ò' => '«ó', '«ñ' => '«ï', '«î' => '«ì',
401
+ '«í' => '«ë', '«ê' => '«è', '«é' => '«ç',
402
+ '«å' => '«ã', '«â' => '«à', '«Ü' => '«Ö',
403
+ 'ƿ' => 'Ƿ', 'ƽ' => 'Ƽ', 'ƹ' => 'Ƹ',
404
+ 'ƶ' => 'Ƶ', 'ƴ' => 'Ƴ', 'ư' => 'Ư',
405
+ 'ƭ' => 'Ƭ', 'ƨ' => 'Ƨ', 'ƥ' => 'Ƥ',
406
+ '∆£' => '∆¢', '∆°' => '∆ ', '∆û' => '» ',
407
+ 'ƙ' => 'Ƙ', 'ƕ' => 'Ƕ', 'ƒ' => 'Ƒ',
408
+ 'ƌ' => 'Ƌ', 'ƈ' => 'Ƈ', 'ƅ' => 'Ƅ',
409
+ 'ƃ' => 'Ƃ', 'ſ' => 'S', 'ž' => 'Ž',
410
+ 'ż' => 'Ż', 'ź' => 'Ź', 'ŷ' => 'Ŷ',
411
+ '≈µ' => '≈¥', '≈≥' => '≈≤', '≈±' => '≈∞',
412
+ 'ů' => 'Ů', 'ŭ' => 'Ŭ', 'ū' => 'Ū',
413
+ 'ũ' => 'Ũ', 'ŧ' => 'Ŧ', 'ť' => 'Ť',
414
+ 'ţ' => 'Ţ', 'š' => 'Š', 'ş' => 'Ş',
415
+ '≈ù' => '≈ú', '≈õ' => '≈ö', '≈ô' => '≈ò',
416
+ 'ŗ' => 'Ŗ', 'ŕ' => 'Ŕ', 'œ' => 'Œ',
417
+ 'ő' => 'Ő', 'ŏ' => 'Ŏ', 'ō' => 'Ō',
418
+ 'ŋ' => 'Ŋ', 'ň' => 'Ň', 'ņ' => 'Ņ',
419
+ 'ń' => 'Ń', 'ł' => 'Ł', 'ŀ' => 'Ŀ',
420
+ 'ľ' => 'Ľ', 'ļ' => 'Ļ', 'ĺ' => 'Ĺ',
421
+ 'ķ' => 'Ķ', 'ĵ' => 'Ĵ', 'ij' => 'IJ',
422
+ 'ı' => 'I', 'į' => 'Į', 'ĭ' => 'Ĭ',
423
+ 'ī' => 'Ī', 'ĩ' => 'Ĩ', 'ħ' => 'Ħ',
424
+ 'ƒ•' => 'ƒ§', 'ƒ£' => 'ƒ¢', 'ƒ°' => 'ƒ ',
425
+ 'ğ' => 'Ğ', 'ĝ' => 'Ĝ', 'ě' => 'Ě',
426
+ 'ę' => 'Ę', 'ė' => 'Ė', 'ĕ' => 'Ĕ',
427
+ 'ē' => 'Ē', 'đ' => 'Đ', 'ď' => 'Ď',
428
+ 'č' => 'Č', 'ċ' => 'Ċ', 'ĉ' => 'Ĉ',
429
+ 'ć' => 'Ć', 'ą' => 'Ą', 'ă' => 'Ă',
430
+ 'ā' => 'Ā', 'ÿ' => 'Ÿ', 'þ' => 'Þ',
431
+ 'ý' => 'Ý', 'ü' => 'Ü', 'û' => 'Û',
432
+ '√∫' => '√ö', '√π' => '√ô', '√∏' => '√ò',
433
+ 'ö' => 'Ö', 'õ' => 'Õ', 'ô' => 'Ô',
434
+ 'ó' => 'Ó', 'ò' => 'Ò', 'ñ' => 'Ñ',
435
+ 'ð' => 'Ð', 'ï' => 'Ï', 'î' => 'Î',
436
+ 'í' => 'Í', 'ì' => 'Ì', 'ë' => 'Ë',
437
+ 'ê' => 'Ê', 'é' => 'É', 'è' => 'È',
438
+ 'ç' => 'Ç', 'æ' => 'Æ', 'å' => 'Å',
439
+ 'ä' => 'Ä', 'ã' => 'Ã', 'â' => 'Â',
440
+ 'á' => 'Á', 'à ' => 'À', 'µ' => 'Μ',
441
+ 'z' => 'Z', 'y' => 'Y', 'x' => 'X',
442
+ 'w' => 'W', 'v' => 'V', 'u' => 'U',
443
+ 't' => 'T', 's' => 'S', 'r' => 'R',
444
+ 'q' => 'Q', 'p' => 'P', 'o' => 'O',
445
+ 'n' => 'N', 'm' => 'M', 'l' => 'L',
446
+ 'k' => 'K', 'j' => 'J', 'i' => 'I',
447
+ 'h' => 'H', 'g' => 'G', 'f' => 'F',
448
+ 'e' => 'E', 'd' => 'D', 'c' => 'C',
449
+ 'b' => 'B', 'a' => 'A',
450
  );
inc/aioseop_functions.php CHANGED
@@ -147,7 +147,7 @@ if ( ! function_exists( 'aioseop_addmycolumns' ) ) {
147
  */
148
  function aioseop_addmycolumns() {
149
  global $aioseop_options, $pagenow;
150
- $aiosp_posttypecolumns = Array();
151
  if ( ! empty( $aioseop_options ) && ! empty( $aioseop_options['aiosp_posttypecolumns'] ) ) {
152
  $aiosp_posttypecolumns = $aioseop_options['aiosp_posttypecolumns'];
153
  }
@@ -200,7 +200,7 @@ if ( ! function_exists( 'aioseop_mrt_pcolumns' ) ) {
200
  if ( ! function_exists( 'aioseop_admin_head' ) ) {
201
 
202
  function aioseop_admin_head() {
203
- wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/quickedit_functions.js', array( 'jquery' ), AIOSEOP_VERSION);
204
  ?>
205
  <style>
206
  .aioseop_edit_button {
@@ -251,14 +251,15 @@ if ( ! function_exists( 'aioseop_admin_head' ) ) {
251
  }
252
  }
253
  </style>
254
- <?php wp_print_scripts( Array( 'sack' ) );
 
255
  ?>
256
  <script type="text/javascript">
257
  //<![CDATA[
258
  var aioseopadmin = {
259
  blogUrl: "<?php print get_bloginfo( 'url' ); ?>",
260
  pluginUrl: "<?php print AIOSEOP_PLUGIN_URL; ?>",
261
- requestUrl: "<?php print WP_ADMIN_URL . '/admin-ajax.php' ?>",
262
  imgUrl: "<?php print AIOSEOP_PLUGIN_IMAGES_URL; ?>",
263
  Edit: "<?php _e( 'Edit', 'all-in-one-seo-pack' ); ?>",
264
  Post: "<?php _e( 'Post', 'all-in-one-seo-pack' ); ?>",
@@ -337,7 +338,7 @@ if ( ! function_exists( 'aioseop_output_dismissable_notice' ) ) {
337
  return false;
338
  }
339
  global $wp;
340
- $qa = Array();
341
  wp_parse_str( $_SERVER['QUERY_STRING'], $qa );
342
  $qa['aioseop_ignore_notice'] = $msgid;
343
  $url = '?' . build_query( $qa );
@@ -359,29 +360,33 @@ if ( ! function_exists( 'aioseop_ajax_save_meta' ) ) {
359
  $target = $_POST['target_meta'];
360
  check_ajax_referer( 'aioseop_meta_' . $target . '_' . $post_id, '_nonce' );
361
  $result = '';
362
- if ( in_array( $target, Array(
 
363
  'title',
364
  'description',
365
  'keywords',
366
- ) ) && current_user_can( 'edit_post', $post_id )
 
367
  ) {
368
  update_post_meta( $post_id, '_aioseop_' . $target, esc_attr( $new_meta ) );
369
  $result = get_post_meta( $post_id, '_aioseop_' . $target, true );
370
  } else {
371
  die();
372
  }
373
- if ( $result != '' ):
374
  $label = "<label id='aioseop_label_{$target}_{$post_id}'><span style='width: 20px;display: inline-block;'></span>" . $result . '</label>';
375
- else:
376
  $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
377
  endif;
378
  $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
379
  $output = '<a id="' . $target . 'editlink' . $post_id . '" class="aioseop_edit_link" href="javascript:void(0);"'
380
- . 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __( 'Edit' ) . '">'
381
- . '<img class="aioseop_edit_button" id="aioseop_edit_id" src="' . AIOSEOP_PLUGIN_IMAGES_URL . '/cog_edit.png" /></a> ' . $label;
382
- die( "jQuery('div#aioseop_" . $target . '_' . $post_id . "').fadeOut('fast', function() { var my_label = " . json_encode( $output ) . ";
 
383
  jQuery('div#aioseop_" . $target . '_' . $post_id . "').html(my_label).fadeIn('fast');
384
- });" );
 
385
  }
386
  }
387
 
@@ -424,7 +429,7 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
424
  function aioseop_ajax_save_url() {
425
  $valid = true;
426
  aioseop_ajax_init();
427
- $options = Array();
428
  parse_str( $_POST['options'], $options );
429
  foreach ( $options as $k => $v ) {
430
  // all values are mandatory while adding to the sitemap.
@@ -453,14 +458,16 @@ if ( ! function_exists( 'aioseop_ajax_save_url' ) ) {
453
  $prefix = $module->get_prefix();
454
  $_POST = $module->get_current_options( $_POST, null );
455
  $module->handle_settings_updates( null );
456
- $options = $module->get_current_options( Array(), null );
457
- $output = $module->display_custom_options( '', Array(
458
- 'name' => $prefix . 'addl_pages',
459
- 'type' => 'custom',
460
- 'save' => true,
461
- 'value' => $options[ $prefix . 'addl_pages' ],
462
- 'attr' => '',
463
- ) );
 
 
464
  $output = str_replace( "'", "\'", $output );
465
  $output = str_replace( "\n", '\n', $output );
466
  } else {
@@ -474,7 +481,7 @@ if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
474
 
475
  function aioseop_ajax_delete_url() {
476
  aioseop_ajax_init();
477
- $options = Array();
478
  $options = esc_attr( $_POST['options'] );
479
  $_POST['action'] = 'aiosp_update_module';
480
  global $aiosp, $aioseop_modules;
@@ -496,14 +503,16 @@ if ( ! function_exists( 'aioseop_ajax_delete_url' ) ) {
496
  $_POST['aiosp_sitemap_addl_pages'] = json_encode( $_POST['aiosp_sitemap_addl_pages'] );
497
  }
498
  $module->handle_settings_updates( null );
499
- $options = $module->get_current_options( Array(), null );
500
- $output = $module->display_custom_options( '', Array(
501
- 'name' => 'aiosp_sitemap_addl_pages',
502
- 'type' => 'custom',
503
- 'save' => true,
504
- 'value' => $options['aiosp_sitemap_addl_pages'],
505
- 'attr' => '',
506
- ) );
 
 
507
  $output = str_replace( "'", "\'", $output );
508
  $output = str_replace( "\n", '\n', $output );
509
  } else {
@@ -518,7 +527,7 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
518
  function aioseop_ajax_scan_header() {
519
  $_POST['options'] = 'foo';
520
  aioseop_ajax_init();
521
- $options = Array();
522
  parse_str( $_POST['options'], $options );
523
  foreach ( $options as $k => $v ) {
524
  $_POST[ $k ] = $v;
@@ -535,13 +544,13 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
535
  global $aiosp;
536
  $output = $aiosp->html_string_to_array( $output );
537
  $meta = '';
538
- $metatags = Array(
539
- 'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
540
- 'twitter' => Array( 'name' => 'name', 'value' => 'value' ),
541
- 'google+' => Array( 'name' => 'itemprop', 'value' => 'content' ),
542
  );
543
- $metadata = Array(
544
- 'facebook' => Array(
545
  'title' => 'og:title',
546
  'type' => 'og:type',
547
  'url' => 'og:url',
@@ -550,12 +559,12 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
550
  'key' => 'fb:admins',
551
  'description' => 'og:description',
552
  ),
553
- 'google+' => Array(
554
  'thumbnail' => 'image',
555
  'title' => 'name',
556
  'description' => 'description',
557
  ),
558
- 'twitter' => Array(
559
  'card' => 'twitter:card',
560
  'url' => 'twitter:url',
561
  'title' => 'twitter:title',
@@ -584,12 +593,12 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
584
  } else {
585
  $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>';
586
  $meta .= "<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;'>"
587
- . '<p>' . __( 'All in One SEO Pack has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' )
588
- . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in All in One SEO Pack Feature Manager.', 'all-in-one-seo-pack' )
589
- . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
590
 
591
  foreach (
592
- Array(
593
  'https://developers.facebook.com/tools/debug',
594
  'https://dev.twitter.com/docs/cards/validation/validator',
595
  ) as $link
@@ -609,7 +618,7 @@ if ( ! function_exists( 'aioseop_ajax_save_settings' ) ) {
609
 
610
  function aioseop_ajax_save_settings() {
611
  aioseop_ajax_init();
612
- $options = Array();
613
  parse_str( $_POST['options'], $options );
614
  $_POST = $options;
615
  $_POST['action'] = 'aiosp_update_module';
@@ -643,7 +652,7 @@ if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
643
 
644
  function aioseop_ajax_get_menu_links() {
645
  aioseop_ajax_init();
646
- $options = Array();
647
  parse_str( $_POST['options'], $options );
648
  $_POST = $options;
649
  $_POST['action'] = 'aiosp_update_module';
@@ -655,14 +664,14 @@ if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
655
  }
656
  $_POST['Submit'] = 'ajax';
657
  $modlist = $aioseop_modules->get_loaded_module_list();
658
- $links = Array();
659
- $link_list = Array();
660
  $link = $aiosp->get_admin_links();
661
  if ( ! empty( $link ) ) {
662
  foreach ( $link as $l ) {
663
  if ( ! empty( $l ) ) {
664
  if ( empty( $link_list[ $l['order'] ] ) ) {
665
- $link_list[ $l['order'] ] = Array();
666
  }
667
  $link_list[ $l['order'] ][ $l['title'] ] = $l['href'];
668
  }
@@ -677,7 +686,7 @@ if ( ! function_exists( 'aioseop_ajax_get_menu_links' ) ) {
677
  foreach ( $link as $l ) {
678
  if ( ! empty( $l ) ) {
679
  if ( empty( $link_list[ $l['order'] ] ) ) {
680
- $link_list[ $l['order'] ] = Array();
681
  }
682
  $link_list[ $l['order'] ][ $l['title'] ] = $l['href'];
683
  }
@@ -730,27 +739,30 @@ if ( ! function_exists( 'aioseop_mrt_pccolumn' ) ) {
730
  if ( ! $target ) {
731
  return;
732
  }
733
- if ( current_user_can( 'edit_post', $id ) ) { ?>
 
734
  <div class="aioseop_mpc_admin_meta_container">
735
  <div class="aioseop_mpc_admin_meta_options"
736
- id="aioseop_<?php print $target; ?>_<?php echo $id; ?>"
737
- style="float:left;">
738
- <?php $content = strip_tags( stripslashes( get_post_meta( $id, '_aioseop_' . $target, true ) ) );
739
- if ( ! empty( $content ) ):
 
740
  $label = "<label id='aioseop_label_{$target}_{$id}'><span style='width: 20px;display: inline-block;'></span>" . $content . '</label>';
741
- else:
742
  $label = "<label id='aioseop_label_{$target}_{$id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
743
  endif;
744
  $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$id}" );
745
  echo '<a id="' . $target . 'editlink' . $id . '" class="aioseop_edit_link" href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
746
- $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __( 'Edit' ) . '">'
747
- . "<img class='aioseop_edit_button'
748
  id='aioseop_edit_id'
749
  src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a> " . $label;
750
  ?>
751
  </div>
752
  </div>
753
- <?php }
 
754
  }
755
  }
756
 
@@ -859,7 +871,7 @@ if ( ! function_exists( 'aioseop_localize_script_data' ) ) {
859
  function aioseop_localize_script_data() {
860
  static $loaded = 0;
861
  if ( ! $loaded ) {
862
- $data = apply_filters( 'aioseop_localize_script_data', Array() );
863
  wp_localize_script( 'aioseop-module-script', 'aiosp_data', $data );
864
  $loaded = 1;
865
  }
@@ -901,15 +913,19 @@ if ( ! function_exists( 'fnmatch' ) ) {
901
  * @return int
902
  */
903
  function fnmatch( $pattern, $string ) {
904
- return preg_match( '#^' . strtr( preg_quote( $pattern, '#' ), array(
905
- '\*' => '.*',
906
- '\?' => '.',
907
- ) ) . "$#i", $string );
 
 
 
 
908
  }
909
  }
910
 
911
- if ( ! function_exists('aiosp_log')) {
912
- function aiosp_log ( $log ) {
913
 
914
  global $aioseop_options;
915
 
@@ -942,7 +958,9 @@ if ( ! function_exists( 'parse_ini_string' ) ) {
942
  *
943
  * Define our filter class.
944
  */
 
945
  class parse_ini_filter extends php_user_filter {
 
946
  static $buf = '';
947
 
948
  /**
@@ -1011,7 +1029,7 @@ function aioseop_home_url( $path = '/' ) {
1011
  }
1012
 
1013
 
1014
- if ( ! function_exists('aiosp_include_images') ) {
1015
  function aiosp_include_images() {
1016
  if ( false === apply_filters( 'aioseo_include_images_in_sitemap', true ) ) {
1017
  return false;
@@ -1019,14 +1037,14 @@ if ( ! function_exists('aiosp_include_images') ) {
1019
 
1020
  global $aioseop_options;
1021
 
1022
- if( isset( $aioseop_options['modules'] ) &&
1023
- isset( $aioseop_options['modules']['aiosp_sitemap_options'] ) &&
1024
- isset( $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images'] ) &&
1025
  'on' === $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images']
1026
- ){
1027
- return false;
1028
- }
1029
 
1030
- return true;
1031
  }
1032
  }
147
  */
148
  function aioseop_addmycolumns() {
149
  global $aioseop_options, $pagenow;
150
+ $aiosp_posttypecolumns = array();
151
  if ( ! empty( $aioseop_options ) && ! empty( $aioseop_options['aiosp_posttypecolumns'] ) ) {
152
  $aiosp_posttypecolumns = $aioseop_options['aiosp_posttypecolumns'];
153
  }
200
  if ( ! function_exists( 'aioseop_admin_head' ) ) {
201
 
202
  function aioseop_admin_head() {
203
+ wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/quickedit_functions.js', array( 'jquery' ), AIOSEOP_VERSION );
204
  ?>
205
  <style>
206
  .aioseop_edit_button {
251
  }
252
  }
253
  </style>
254
+ <?php
255
+ wp_print_scripts( array( 'sack' ) );
256
  ?>
257
  <script type="text/javascript">
258
  //<![CDATA[
259
  var aioseopadmin = {
260
  blogUrl: "<?php print get_bloginfo( 'url' ); ?>",
261
  pluginUrl: "<?php print AIOSEOP_PLUGIN_URL; ?>",
262
+ requestUrl: "<?php print WP_ADMIN_URL . '/admin-ajax.php'; ?>",
263
  imgUrl: "<?php print AIOSEOP_PLUGIN_IMAGES_URL; ?>",
264
  Edit: "<?php _e( 'Edit', 'all-in-one-seo-pack' ); ?>",
265
  Post: "<?php _e( 'Post', 'all-in-one-seo-pack' ); ?>",
338
  return false;
339
  }
340
  global $wp;
341
+ $qa = array();
342
  wp_parse_str( $_SERVER['QUERY_STRING'], $qa );
343
  $qa['aioseop_ignore_notice'] = $msgid;
344
  $url = '?' . build_query( $qa );
360
  $target = $_POST['target_meta'];
361
  check_ajax_referer( 'aioseop_meta_' . $target . '_' . $post_id, '_nonce' );
362
  $result = '';
363
+ if ( in_array(
364
+ $target, array(
365
  'title',
366
  'description',
367
  'keywords',
368
+ )
369
+ ) && current_user_can( 'edit_post', $post_id )
370
  ) {
371
  update_post_meta( $post_id, '_aioseop_' . $target, esc_attr( $new_meta ) );
372
  $result = get_post_meta( $post_id, '_aioseop_' . $target, true );
373
  } else {
374
  die();
375
  }
376
+ if ( $result != '' ) :
377
  $label = "<label id='aioseop_label_{$target}_{$post_id}'><span style='width: 20px;display: inline-block;'></span>" . $result . '</label>';
378
+ else :
379
  $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
380
  endif;
381
  $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
382
  $output = '<a id="' . $target . 'editlink' . $post_id . '" class="aioseop_edit_link" href="javascript:void(0);"'
383
+ . 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __( 'Edit' ) . '">'
384
+ . '<img class="aioseop_edit_button" id="aioseop_edit_id" src="' . AIOSEOP_PLUGIN_IMAGES_URL . '/cog_edit.png" /></a> ' . $label;
385
+ die(
386
+ "jQuery('div#aioseop_" . $target . '_' . $post_id . "').fadeOut('fast', function() { var my_label = " . json_encode( $output ) . ";
387
  jQuery('div#aioseop_" . $target . '_' . $post_id . "').html(my_label).fadeIn('fast');
388
+ });"
389
+ );
390
  }
391
  }
392
 
429
  function aioseop_ajax_save_url() {
430
  $valid = true;
431
  aioseop_ajax_init();
432
+ $options = array();
433
  parse_str( $_POST['options'], $options );
434
  foreach ( $options as $k => $v ) {
435
  // all values are mandatory while adding to the sitemap.
458
  $prefix = $module->get_prefix();
459
  $_POST = $module->get_current_options( $_POST, null );
460
  $module->handle_settings_updates( null );
461
+ $options = $module->get_current_options( array(), null );
462
+ $output = $module->display_custom_options(
463
+ '', array(
464
+ 'name' => $prefix . 'addl_pages',
465
+ 'type' => 'custom',
466
+ 'save' => true,
467
+ 'value' => $options[ $prefix . 'addl_pages' ],
468
+ 'attr' => '',
469
+ )
470
+ );
471
  $output = str_replace( "'", "\'", $output );
472
  $output = str_replace( "\n", '\n', $output );
473
  } else {
481
 
482
  function aioseop_ajax_delete_url() {
483
  aioseop_ajax_init();
484
+ $options = array();
485
  $options = esc_attr( $_POST['options'] );
486
  $_POST['action'] = 'aiosp_update_module';
487
  global $aiosp, $aioseop_modules;
503
  $_POST['aiosp_sitemap_addl_pages'] = json_encode( $_POST['aiosp_sitemap_addl_pages'] );
504
  }
505
  $module->handle_settings_updates( null );
506
+ $options = $module->get_current_options( array(), null );
507
+ $output = $module->display_custom_options(
508
+ '', array(
509
+ 'name' => 'aiosp_sitemap_addl_pages',
510
+ 'type' => 'custom',
511
+ 'save' => true,
512
+ 'value' => $options['aiosp_sitemap_addl_pages'],
513
+ 'attr' => '',
514
+ )
515
+ );
516
  $output = str_replace( "'", "\'", $output );
517
  $output = str_replace( "\n", '\n', $output );
518
  } else {
527
  function aioseop_ajax_scan_header() {
528
  $_POST['options'] = 'foo';
529
  aioseop_ajax_init();
530
+ $options = array();
531
  parse_str( $_POST['options'], $options );
532
  foreach ( $options as $k => $v ) {
533
  $_POST[ $k ] = $v;
544
  global $aiosp;
545
  $output = $aiosp->html_string_to_array( $output );
546
  $meta = '';
547
+ $metatags = array(
548
+ 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
549
+ 'twitter' => array( 'name' => 'name', 'value' => 'value' ),
550
+ 'google+' => array( 'name' => 'itemprop', 'value' => 'content' ),
551
  );
552
+ $metadata = array(
553
+ 'facebook' => array(
554
  'title' => 'og:title',
555
  'type' => 'og:type',
556
  'url' => 'og:url',
559
  'key' => 'fb:admins',
560
  'description' => 'og:description',
561
  ),
562
+ 'google+' => array(
563
  'thumbnail' => 'image',
564
  'title' => 'name',
565
  'description' => 'description',
566
  ),
567
+ 'twitter' => array(
568
  'card' => 'twitter:card',
569
  'url' => 'twitter:url',
570
  'title' => 'twitter:title',
593
  } else {
594
  $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>';
595
  $meta .= "<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;'>"
596
+ . '<p>' . __( 'All in One SEO Pack has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' )
597
+ . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in All in One SEO Pack Feature Manager.', 'all-in-one-seo-pack' )
598
+ . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
599
 
600
  foreach (
601
+ array(
602
  'https://developers.facebook.com/tools/debug',
603
  'https://dev.twitter.com/docs/cards/validation/validator',
604
  ) as $link
618
 
619
  function aioseop_ajax_save_settings() {
620
  aioseop_ajax_init();
621
+ $options = array();
622
  parse_str( $_POST['options'], $options );
623
  $_POST = $options;
624
  $_POST['action'] = 'aiosp_update_module';
652
 
653
  function aioseop_ajax_get_menu_links() {
654
  aioseop_ajax_init();
655
+ $options = array();
656
  parse_str( $_POST['options'], $options );
657
  $_POST = $options;
658
  $_POST['action'] = 'aiosp_update_module';
664
  }
665
  $_POST['Submit'] = 'ajax';
666
  $modlist = $aioseop_modules->get_loaded_module_list();
667
+ $links = array();
668
+ $link_list = array();
669
  $link = $aiosp->get_admin_links();
670
  if ( ! empty( $link ) ) {
671
  foreach ( $link as $l ) {
672
  if ( ! empty( $l ) ) {
673
  if ( empty( $link_list[ $l['order'] ] ) ) {
674
+ $link_list[ $l['order'] ] = array();
675
  }
676
  $link_list[ $l['order'] ][ $l['title'] ] = $l['href'];
677
  }
686
  foreach ( $link as $l ) {
687
  if ( ! empty( $l ) ) {
688
  if ( empty( $link_list[ $l['order'] ] ) ) {
689
+ $link_list[ $l['order'] ] = array();
690
  }
691
  $link_list[ $l['order'] ][ $l['title'] ] = $l['href'];
692
  }
739
  if ( ! $target ) {
740
  return;
741
  }
742
+ if ( current_user_can( 'edit_post', $id ) ) {
743
+ ?>
744
  <div class="aioseop_mpc_admin_meta_container">
745
  <div class="aioseop_mpc_admin_meta_options"
746
+ id="aioseop_<?php print $target; ?>_<?php echo $id; ?>"
747
+ style="float:left;">
748
+ <?php
749
+ $content = strip_tags( stripslashes( get_post_meta( $id, '_aioseop_' . $target, true ) ) );
750
+ if ( ! empty( $content ) ) :
751
  $label = "<label id='aioseop_label_{$target}_{$id}'><span style='width: 20px;display: inline-block;'></span>" . $content . '</label>';
752
+ else :
753
  $label = "<label id='aioseop_label_{$target}_{$id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all-in-one-seo-pack' ) . ' ' . $target . '</i></strong>';
754
  endif;
755
  $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$id}" );
756
  echo '<a id="' . $target . 'editlink' . $id . '" class="aioseop_edit_link" href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
757
+ $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __( 'Edit' ) . '">'
758
+ . "<img class='aioseop_edit_button'
759
  id='aioseop_edit_id'
760
  src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a> " . $label;
761
  ?>
762
  </div>
763
  </div>
764
+ <?php
765
+ }
766
  }
767
  }
768
 
871
  function aioseop_localize_script_data() {
872
  static $loaded = 0;
873
  if ( ! $loaded ) {
874
+ $data = apply_filters( 'aioseop_localize_script_data', array() );
875
  wp_localize_script( 'aioseop-module-script', 'aiosp_data', $data );
876
  $loaded = 1;
877
  }
913
  * @return int
914
  */
915
  function fnmatch( $pattern, $string ) {
916
+ return preg_match(
917
+ '#^' . strtr(
918
+ preg_quote( $pattern, '#' ), array(
919
+ '\*' => '.*',
920
+ '\?' => '.',
921
+ )
922
+ ) . '$#i', $string
923
+ );
924
  }
925
  }
926
 
927
+ if ( ! function_exists( 'aiosp_log' ) ) {
928
+ function aiosp_log( $log ) {
929
 
930
  global $aioseop_options;
931
 
958
  *
959
  * Define our filter class.
960
  */
961
+ // @codingStandardsIgnoreStart
962
  class parse_ini_filter extends php_user_filter {
963
+ // @codingStandardsIgnoreEnd
964
  static $buf = '';
965
 
966
  /**
1029
  }
1030
 
1031
 
1032
+ if ( ! function_exists( 'aiosp_include_images' ) ) {
1033
  function aiosp_include_images() {
1034
  if ( false === apply_filters( 'aioseo_include_images_in_sitemap', true ) ) {
1035
  return false;
1037
 
1038
  global $aioseop_options;
1039
 
1040
+ if ( isset( $aioseop_options['modules'] ) &&
1041
+ isset( $aioseop_options['modules']['aiosp_sitemap_options'] ) &&
1042
+ isset( $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images'] ) &&
1043
  'on' === $aioseop_options['modules']['aiosp_sitemap_options']['aiosp_sitemap_images']
1044
+ ) {
1045
+ return false;
1046
+ }
1047
 
1048
+ return true;
1049
  }
1050
  }
inc/aioseop_updates_class.php CHANGED
@@ -1,218 +1,224 @@
1
- <?php
2
-
3
- /**
4
- * Handles detection of new plugin version updates.
5
- *
6
- * Handles detection of new plugin version updates, migration of old settings,
7
- * new WP core feature support, etc.
8
- * AIOSEOP Updates class.
9
- *
10
- * @package All-in-One-SEO-Pack.
11
- */
12
- class AIOSEOP_Updates {
13
-
14
- /**
15
- * Constructor
16
- *
17
- */
18
- function __construct() {
19
-
20
- }
21
-
22
- /**
23
- * Updates version.
24
- *
25
- * @global $aiosp , $aioseop_options.
26
- * @return null
27
- */
28
- function version_updates() {
29
- global $aiosp, $aioseop_options;
30
- if ( empty( $aioseop_options ) ) {
31
- $aioseop_options = get_option( $aioseop_options );
32
- if ( empty( $aioseop_options ) ) {
33
- // Something's wrong. bail.
34
- return;
35
- }
36
- }
37
-
38
- // Last known running plugin version.
39
- $last_active_version = '0.0';
40
- if ( isset( $aioseop_options['last_active_version'] ) ) {
41
- $last_active_version = $aioseop_options['last_active_version'];
42
- }
43
-
44
- // Compares version to see which one is the newer.
45
- if ( version_compare( $last_active_version, AIOSEOP_VERSION, '<' ) ) {
46
-
47
- // Upgrades based on previous version.
48
- do_action( 'before_doing_aioseop_updates' );
49
- $this->do_version_updates( $last_active_version );
50
- do_action( 'after_doing_aioseop_updates' );
51
- // If we're running Pro, let the Pro updater set the version.
52
- if ( ! AIOSEOPPRO ) {
53
-
54
- // Save the current plugin version as the new last_active_version.
55
- $aioseop_options['last_active_version'] = AIOSEOP_VERSION;
56
- $aiosp->update_class_option( $aioseop_options );
57
- }
58
-
59
- if( ! is_network_admin() || !isset( $_GET['activate-multi'] ) ) {
60
- // Replace this to reactivate update welcome screen.
61
- //set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
62
- }
63
- delete_transient( 'aioseop_feed' );
64
- add_action( 'admin_init', array( $this, 'aioseop_welcome' ) );
65
-
66
- }
67
-
68
- /**
69
- * Perform updates that are dependent on external factors, not
70
- * just the plugin version.
71
- */
72
- $this->do_feature_updates();
73
- }
74
-
75
- function aioseop_welcome(){
76
- if ( get_transient( '_aioseop_activation_redirect' ) ) {
77
- delete_transient( '_aioseop_activation_redirect' );
78
- //$aioseop_welcome = new aioseop_welcome();
79
- //$aioseop_welcome->init( TRUE );
80
- }
81
-
82
- }
83
-
84
- /**
85
- * Updates version.
86
- *
87
- * TODO: the compare here should be extracted into a function
88
- *
89
- * @global $aioseop_options .
90
- *
91
- * @param String $old_version
92
- */
93
- function do_version_updates( $old_version ) {
94
- global $aioseop_options;
95
- if (
96
- ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.3', '<' ) ) ||
97
- ( AIOSEOPPRO && version_compare( $old_version, '2.4.3', '<' ) )
98
- ) {
99
- $this->bad_bots_201603();
100
- }
101
-
102
- if (
103
- ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.4.1', '<' ) ) ||
104
- ( AIOSEOPPRO && version_compare( $old_version, '2.4.4.1', '<' ) )
105
- ) {
106
- $this->bad_bots_remove_yandex_201604();
107
- }
108
-
109
- if (
110
- ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.9', '<' ) ) ||
111
- ( AIOSEOPPRO && version_compare( $old_version, '2.4.9', '<' ) )
112
- ) {
113
- $this->bad_bots_remove_seznambot_201608();
114
- set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
115
- }
116
-
117
- }
118
-
119
- /**
120
- * Removes overzealous 'DOC' entry which is causing false-positive bad
121
- * bot blocking.
122
- *
123
- * @since 2.3.3
124
- * @global $aiosp , $aioseop_options.
125
- */
126
- function bad_bots_201603() {
127
- global $aiosp, $aioseop_options;
128
-
129
- // Remove 'DOC' from bad bots list to avoid false positives.
130
- if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
131
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
132
- $list = str_replace( array(
133
- "DOC\r\n",
134
- "DOC\n",
135
- ), '', $list );
136
- $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
137
- update_option( 'aioseop_options', $aioseop_options );
138
- $aiosp->update_class_option( $aioseop_options );
139
- }
140
- }
141
-
142
- /*
143
- * Functions for specific version milestones.
144
- */
145
-
146
- /**
147
- * Remove 'yandex' entry. This is a major Russian search engine, and no longer needs to be blocked.
148
- *
149
- * @since 2.3.4.1
150
- * @global $aiosp , $aioseop_options.
151
- */
152
- function bad_bots_remove_yandex_201604() {
153
- global $aiosp, $aioseop_options;
154
-
155
- // Remove 'yandex' from bad bots list to avoid false positives.
156
- if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
157
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
158
- $list = str_replace( array(
159
- "yandex\r\n",
160
- "yandex\n",
161
- ), '', $list );
162
- $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
163
- update_option( 'aioseop_options', $aioseop_options );
164
- $aiosp->update_class_option( $aioseop_options );
165
- }
166
- }
167
-
168
- /**
169
- * Remove 'SeznamBot' entry.
170
- *
171
- * @since 2.3.8
172
- * @global $aiosp , $aioseop_options.
173
- */
174
- function bad_bots_remove_seznambot_201608() {
175
- global $aiosp, $aioseop_options;
176
-
177
- // Remove 'SeznamBot' from bad bots list to avoid false positives.
178
- if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
179
- $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
180
- $list = str_replace( array(
181
- "SeznamBot\r\n",
182
- "SeznamBot\n",
183
- ), '', $list );
184
- $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
185
- update_option( 'aioseop_options', $aioseop_options );
186
- $aiosp->update_class_option( $aioseop_options );
187
- }
188
- }
189
-
190
- /**
191
- * Updates features.
192
- *
193
- * @return null
194
- *
195
- * if ( ! ( isset( $aioseop_options['version_feature_flags']['FEATURE_NAME'] ) &&
196
- * $aioseop_options['version_feature_flags']['FEATURE_NAME'] === 'yes' ) ) {
197
- * $this->some_feature_update_method(); // sets flag to 'yes' on completion.
198
- */
199
- public function do_feature_updates() {
200
- global $aioseop_options;
201
-
202
- // We don't need to check all the time. Use a transient to limit frequency.
203
- if ( get_site_transient( 'aioseop_update_check_time' ) ) {
204
- return;
205
- }
206
-
207
- // If we're running Pro, let the Pro updater set the transient.
208
- if ( ! AIOSEOPPRO ) {
209
-
210
- // We haven't checked recently. Reset the timestamp, timeout 6 hours.
211
- set_site_transient(
212
- 'aioseop_update_check_time',
213
- time(),
214
- apply_filters( 'aioseop_update_check_time', 3600 * 6 )
215
- );
216
- }
217
- }
218
- }
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Handles detection of new plugin version updates.
5
+ *
6
+ * Handles detection of new plugin version updates, migration of old settings,
7
+ * new WP core feature support, etc.
8
+ * AIOSEOP Updates class.
9
+ *
10
+ * @package All-in-One-SEO-Pack.
11
+ */
12
+ class AIOSEOP_Updates {
13
+
14
+ /**
15
+ * Constructor
16
+ *
17
+ */
18
+ function __construct() {
19
+
20
+ }
21
+
22
+ /**
23
+ * Updates version.
24
+ *
25
+ * @global $aiosp , $aioseop_options.
26
+ * @return null
27
+ */
28
+ function version_updates() {
29
+ global $aiosp, $aioseop_options;
30
+ if ( empty( $aioseop_options ) ) {
31
+ $aioseop_options = get_option( $aioseop_options );
32
+ if ( empty( $aioseop_options ) ) {
33
+ // Something's wrong. bail.
34
+ return;
35
+ }
36
+ }
37
+
38
+ // Last known running plugin version.
39
+ $last_active_version = '0.0';
40
+ if ( isset( $aioseop_options['last_active_version'] ) ) {
41
+ $last_active_version = $aioseop_options['last_active_version'];
42
+ }
43
+
44
+ // Compares version to see which one is the newer.
45
+ if ( version_compare( $last_active_version, AIOSEOP_VERSION, '<' ) ) {
46
+
47
+ // Upgrades based on previous version.
48
+ do_action( 'before_doing_aioseop_updates' );
49
+ $this->do_version_updates( $last_active_version );
50
+ do_action( 'after_doing_aioseop_updates' );
51
+ // If we're running Pro, let the Pro updater set the version.
52
+ if ( ! AIOSEOPPRO ) {
53
+
54
+ // Save the current plugin version as the new last_active_version.
55
+ $aioseop_options['last_active_version'] = AIOSEOP_VERSION;
56
+ $aiosp->update_class_option( $aioseop_options );
57
+ }
58
+
59
+ if ( ! is_network_admin() || ! isset( $_GET['activate-multi'] ) ) {
60
+ // Replace this to reactivate update welcome screen.
61
+ // set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
62
+ }
63
+ delete_transient( 'aioseop_feed' );
64
+ add_action( 'admin_init', array( $this, 'aioseop_welcome' ) );
65
+
66
+ }
67
+
68
+ /**
69
+ * Perform updates that are dependent on external factors, not
70
+ * just the plugin version.
71
+ */
72
+ $this->do_feature_updates();
73
+ }
74
+
75
+ function aioseop_welcome() {
76
+ if ( get_transient( '_aioseop_activation_redirect' ) ) {
77
+ delete_transient( '_aioseop_activation_redirect' );
78
+ // $aioseop_welcome = new aioseop_welcome();
79
+ // $aioseop_welcome->init( TRUE );
80
+ }
81
+
82
+ }
83
+
84
+ /**
85
+ * Updates version.
86
+ *
87
+ * TODO: the compare here should be extracted into a function
88
+ *
89
+ * @global $aioseop_options .
90
+ *
91
+ * @param String $old_version
92
+ */
93
+ function do_version_updates( $old_version ) {
94
+ global $aioseop_options;
95
+ if (
96
+ ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.3', '<' ) ) ||
97
+ ( AIOSEOPPRO && version_compare( $old_version, '2.4.3', '<' ) )
98
+ ) {
99
+ $this->bad_bots_201603();
100
+ }
101
+
102
+ if (
103
+ ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.4.1', '<' ) ) ||
104
+ ( AIOSEOPPRO && version_compare( $old_version, '2.4.4.1', '<' ) )
105
+ ) {
106
+ $this->bad_bots_remove_yandex_201604();
107
+ }
108
+
109
+ if (
110
+ ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.9', '<' ) ) ||
111
+ ( AIOSEOPPRO && version_compare( $old_version, '2.4.9', '<' ) )
112
+ ) {
113
+ $this->bad_bots_remove_seznambot_201608();
114
+ set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
115
+ }
116
+
117
+ }
118
+
119
+ /**
120
+ * Removes overzealous 'DOC' entry which is causing false-positive bad
121
+ * bot blocking.
122
+ *
123
+ * @since 2.3.3
124
+ * @global $aiosp , $aioseop_options.
125
+ */
126
+ function bad_bots_201603() {
127
+ global $aiosp, $aioseop_options;
128
+
129
+ // Remove 'DOC' from bad bots list to avoid false positives.
130
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
131
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
132
+ $list = str_replace(
133
+ array(
134
+ "DOC\r\n",
135
+ "DOC\n",
136
+ ), '', $list
137
+ );
138
+ $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
139
+ update_option( 'aioseop_options', $aioseop_options );
140
+ $aiosp->update_class_option( $aioseop_options );
141
+ }
142
+ }
143
+
144
+ /*
145
+ * Functions for specific version milestones.
146
+ */
147
+
148
+ /**
149
+ * Remove 'yandex' entry. This is a major Russian search engine, and no longer needs to be blocked.
150
+ *
151
+ * @since 2.3.4.1
152
+ * @global $aiosp , $aioseop_options.
153
+ */
154
+ function bad_bots_remove_yandex_201604() {
155
+ global $aiosp, $aioseop_options;
156
+
157
+ // Remove 'yandex' from bad bots list to avoid false positives.
158
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
159
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
160
+ $list = str_replace(
161
+ array(
162
+ "yandex\r\n",
163
+ "yandex\n",
164
+ ), '', $list
165
+ );
166
+ $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
167
+ update_option( 'aioseop_options', $aioseop_options );
168
+ $aiosp->update_class_option( $aioseop_options );
169
+ }
170
+ }
171
+
172
+ /**
173
+ * Remove 'SeznamBot' entry.
174
+ *
175
+ * @since 2.3.8
176
+ * @global $aiosp , $aioseop_options.
177
+ */
178
+ function bad_bots_remove_seznambot_201608() {
179
+ global $aiosp, $aioseop_options;
180
+
181
+ // Remove 'SeznamBot' from bad bots list to avoid false positives.
182
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
183
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
184
+ $list = str_replace(
185
+ array(
186
+ "SeznamBot\r\n",
187
+ "SeznamBot\n",
188
+ ), '', $list
189
+ );
190
+ $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
191
+ update_option( 'aioseop_options', $aioseop_options );
192
+ $aiosp->update_class_option( $aioseop_options );
193
+ }
194
+ }
195
+
196
+ /**
197
+ * Updates features.
198
+ *
199
+ * @return null
200
+ *
201
+ * if ( ! ( isset( $aioseop_options['version_feature_flags']['FEATURE_NAME'] ) &&
202
+ * $aioseop_options['version_feature_flags']['FEATURE_NAME'] === 'yes' ) ) {
203
+ * $this->some_feature_update_method(); // sets flag to 'yes' on completion.
204
+ */
205
+ public function do_feature_updates() {
206
+ global $aioseop_options;
207
+
208
+ // We don't need to check all the time. Use a transient to limit frequency.
209
+ if ( get_site_transient( 'aioseop_update_check_time' ) ) {
210
+ return;
211
+ }
212
+
213
+ // If we're running Pro, let the Pro updater set the transient.
214
+ if ( ! AIOSEOPPRO ) {
215
+
216
+ // We haven't checked recently. Reset the timestamp, timeout 6 hours.
217
+ set_site_transient(
218
+ 'aioseop_update_check_time',
219
+ time(),
220
+ apply_filters( 'aioseop_update_check_time', 3600 * 6 )
221
+ );
222
+ }
223
+ }
224
+ }
inc/aiosp_common.php CHANGED
@@ -10,7 +10,9 @@
10
  * These are commonly used functions that can be pulled from anywhere.
11
  * (or in some cases they're functions waiting for a home)
12
  */
 
13
  class aiosp_common {
 
14
 
15
  /**
16
  * aiosp_common constructor.
@@ -70,10 +72,10 @@ class aiosp_common {
70
 
71
  $affiliate_id = '';
72
 
73
- //call during plugins_loaded
74
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
75
 
76
- //build URL
77
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
78
  if ( $location ) {
79
  $url .= '?loc=' . $location;
@@ -82,7 +84,7 @@ class aiosp_common {
82
  $url .= "?ap_id=$affiliate_id";
83
  }
84
 
85
- //build hyperlink
86
  $hyperlink = '<a ';
87
  if ( $target ) {
88
  $hyperlink .= "target=\"$target\" ";
@@ -103,7 +105,7 @@ class aiosp_common {
103
  * Gets the upgrade to Pro version URL.
104
  */
105
  static function get_upgrade_url() {
106
- //put build URL stuff in here
107
  }
108
 
109
  /**
10
  * These are commonly used functions that can be pulled from anywhere.
11
  * (or in some cases they're functions waiting for a home)
12
  */
13
+ // @codingStandardsIgnoreStart
14
  class aiosp_common {
15
+ // @codingStandardsIgnoreEnd
16
 
17
  /**
18
  * aiosp_common constructor.
72
 
73
  $affiliate_id = '';
74
 
75
+ // call during plugins_loaded
76
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
77
 
78
+ // build URL
79
  $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
80
  if ( $location ) {
81
  $url .= '?loc=' . $location;
84
  $url .= "?ap_id=$affiliate_id";
85
  }
86
 
87
+ // build hyperlink
88
  $hyperlink = '<a ';
89
  if ( $target ) {
90
  $hyperlink .= "target=\"$target\" ";
105
  * Gets the upgrade to Pro version URL.
106
  */
107
  static function get_upgrade_url() {
108
+ // put build URL stuff in here
109
  }
110
 
111
  /**
inc/commonstrings.php CHANGED
@@ -46,9 +46,9 @@ class AIOSP_Common_Strings {
46
  __( 'This displays an SEO News widget on the dashboard.', 'all-in-one-seo-pack' );
47
  __( 'Check this to add All in One SEO Pack to the Admin Bar for easy access to your SEO settings.', 'all-in-one-seo-pack' );
48
  __( 'Check this to move the All in One SEO Pack menu item to the top of your WordPress Dashboard menu.', 'all-in-one-seo-pack' );
49
- __('%s is almost ready.', 'all-in-one-seo-pack' );
50
- __('You must <a href="%s">enter a valid License Key</a> for it to work.', 'all-in-one-seo-pack' );
51
- __( "There is a new version of %s available. Go to <a href='%s'>the plugins page</a> for details.", 'all-in-one-seo-pack' );
52
  sprintf( __( 'Your license has expired. Please %1$s click here %2$s to purchase a new one.', 'all-in-one-seo-pack' ), '<a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/" target="_blank">', '</a>' );
53
  __( 'Track Outbound Forms:', 'all-in-one-seo-pack' );
54
  __( 'Track Events:', 'all-in-one-seo-pack' );
@@ -63,10 +63,16 @@ class AIOSP_Common_Strings {
63
  __( 'Check this if you want to track events with Google Analytics.', 'all-in-one-seo-pack' );
64
  __( 'Check this if you want to track URL changes for single pages with Google Analytics.', 'all-in-one-seo-pack' );
65
  __( 'Check this if you want to track how long pages are in visible state with Google Analytics.', 'all-in-one-seo-pack' );
66
- /* translators: 'This option allows users to track media queries, allowing them to find out if users are viewing a responsive layout or not and which layout changes
67
- have been applied if the browser window has been resized by the user, see https://github.com/googleanalytics/autotrack/blob/master/docs/plugins/media-query-tracker.md. */
 
 
 
68
  __( 'Check this if you want to track media query matching and queries with Google Analytics.', 'all-in-one-seo-pack' );
69
- /* translators: The term 'viewport' refers to the area of the page that is visible to the user, see https://www.w3schools.com/css/css_rwd_viewport.asp. */
 
 
 
70
  __( 'Check this if you want to track when elements are visible within the viewport with Google Analytics.', 'all-in-one-seo-pack' );
71
  __( 'Check this if you want to ensure consistency in URL paths reported to Google Analytics.', 'all-in-one-seo-pack' );
72
  __( 'Check this if you want to track how far down a user scrolls a page with Google Analytics.', 'all-in-one-seo-pack' );
46
  __( 'This displays an SEO News widget on the dashboard.', 'all-in-one-seo-pack' );
47
  __( 'Check this to add All in One SEO Pack to the Admin Bar for easy access to your SEO settings.', 'all-in-one-seo-pack' );
48
  __( 'Check this to move the All in One SEO Pack menu item to the top of your WordPress Dashboard menu.', 'all-in-one-seo-pack' );
49
+ __( '%s is almost ready.', 'all-in-one-seo-pack' );
50
+ __( 'You must <a href="%s">enter a valid License Key</a> for it to work.', 'all-in-one-seo-pack' );
51
+ __( "There is a new version of %1\$s available. Go to <a href='%2\$s'>the plugins page</a> for details.", 'all-in-one-seo-pack' );
52
  sprintf( __( 'Your license has expired. Please %1$s click here %2$s to purchase a new one.', 'all-in-one-seo-pack' ), '<a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/" target="_blank">', '</a>' );
53
  __( 'Track Outbound Forms:', 'all-in-one-seo-pack' );
54
  __( 'Track Events:', 'all-in-one-seo-pack' );
63
  __( 'Check this if you want to track events with Google Analytics.', 'all-in-one-seo-pack' );
64
  __( 'Check this if you want to track URL changes for single pages with Google Analytics.', 'all-in-one-seo-pack' );
65
  __( 'Check this if you want to track how long pages are in visible state with Google Analytics.', 'all-in-one-seo-pack' );
66
+
67
+ /*
68
+ Translators: 'This option allows users to track media queries, allowing them to find out if users are viewing a responsive layout or not and which layout changes
69
+ have been applied if the browser window has been resized by the user, see https://github.com/googleanalytics/autotrack/blob/master/docs/plugins/media-query-tracker.md.
70
+ */
71
  __( 'Check this if you want to track media query matching and queries with Google Analytics.', 'all-in-one-seo-pack' );
72
+
73
+ /*
74
+ Translators: The term 'viewport' refers to the area of the page that is visible to the user, see https://www.w3schools.com/css/css_rwd_viewport.asp.
75
+ */
76
  __( 'Check this if you want to track when elements are visible within the viewport with Google Analytics.', 'all-in-one-seo-pack' );
77
  __( 'Check this if you want to ensure consistency in URL paths reported to Google Analytics.', 'all-in-one-seo-pack' );
78
  __( 'Check this if you want to track how far down a user scrolls a page with Google Analytics.', 'all-in-one-seo-pack' );
inc/compatability/abstract/aiosep_compatible.php CHANGED
@@ -1,32 +1,32 @@
1
  <?php
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
3
- /**
4
- * Abstract class to be used to create compatibility with 3rd party wordpress plugins.
5
- *
6
- * @package All-in-One-SEO-Pack
7
- * @author Alejandro Mostajo
8
- * @copyright Semperfi Web Design <https://semperplugins.com/>
9
- * @version 2.3.13
10
- * @since 2.3.12.3
11
- */
12
- abstract class All_in_One_SEO_Pack_Compatible {
13
- /**
14
- * Returns flag indicating if compatible plugin exists in current instalation or not.
15
- * This function should be overwritten on child class.
16
- * @since 2.3.12.3
17
- *
18
- * @return bool
19
- */
20
- public function exists() {
21
- return false;
22
- }
23
 
24
- /**
25
- * Method executed by compatibility handler to declare hooks and/or any other compatibility code needed.
26
- * @since 2.3.12.3
27
- */
28
- public function hooks() {
29
- // TODO per compatible plugin.
30
- }
31
- }
32
  }
1
  <?php
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Compatible' ) ) {
3
+ /**
4
+ * Abstract class to be used to create compatibility with 3rd party WordPress plugins.
5
+ *
6
+ * @package All-in-One-SEO-Pack
7
+ * @author Alejandro Mostajo
8
+ * @copyright Semperfi Web Design <https://semperplugins.com/>
9
+ * @version 2.3.13
10
+ * @since 2.3.12.3
11
+ */
12
+ abstract class All_in_One_SEO_Pack_Compatible {
13
+ /**
14
+ * Returns flag indicating if compatible plugin exists in current instalation or not.
15
+ * This function should be overwritten on child class.
16
+ * @since 2.3.12.3
17
+ *
18
+ * @return bool
19
+ */
20
+ public function exists() {
21
+ return false;
22
+ }
23
 
24
+ /**
25
+ * Method executed by compatibility handler to declare hooks and/or any other compatibility code needed.
26
+ * @since 2.3.12.3
27
+ */
28
+ public function hooks() {
29
+ // TODO per compatible plugin.
30
+ }
31
+ }
32
  }
inc/compatability/compat-init.php CHANGED
@@ -48,10 +48,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
48
  // We'll use this until we set up our classes.
49
  if ( class_exists( 'jetpack' ) ) {
50
  add_filter( 'jetpack_get_available_modules', array( $this, 'remove_jetpack_sitemap' ) );
51
- add_filter( 'jetpack_site_verification_output', array(
52
- $this,
53
- 'filter_jetpack_site_verification_output',
54
- ), 10, 1 );
 
 
55
  }
56
 
57
  // Remove Twitter plugin's meta if our Social Module is on.
@@ -141,8 +143,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Compatibility' ) ) {
141
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
142
  // Evaluate classes and push them into array
143
  $target = new All_in_One_SEO_Pack_Wpml;
144
- if ( $target->exists() )
145
  $this->classes[] = $target;
 
146
  // Eventually we'll load our other classes from here.
147
  $this->load_compatibility_hooks();
148
  }
48
  // We'll use this until we set up our classes.
49
  if ( class_exists( 'jetpack' ) ) {
50
  add_filter( 'jetpack_get_available_modules', array( $this, 'remove_jetpack_sitemap' ) );
51
+ add_filter(
52
+ 'jetpack_site_verification_output', array(
53
+ $this,
54
+ 'filter_jetpack_site_verification_output',
55
+ ), 10, 1
56
+ );
57
  }
58
 
59
  // Remove Twitter plugin's meta if our Social Module is on.
143
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-wpml.php' ); // Load classes.
144
  // Evaluate classes and push them into array
145
  $target = new All_in_One_SEO_Pack_Wpml;
146
+ if ( $target->exists() ) {
147
  $this->classes[] = $target;
148
+ }
149
  // Eventually we'll load our other classes from here.
150
  $this->load_compatibility_hooks();
151
  }
inc/compatability/compat-wpml.php CHANGED
@@ -1,72 +1,72 @@
1
  <?php
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
3
- /**
4
- * Compatibility with WPML - Wordpress Multilingual Plugin
5
- *
6
- * @link https://wpml.org/
7
- * @package All-in-One-SEO-Pack
8
- * @author Alejandro Mostajo
9
- * @copyright Semperfi Web Design <https://semperplugins.com/>
10
- * @version 2.3.13
11
- */
12
- class All_in_One_SEO_Pack_Wpml extends All_in_One_SEO_Pack_Compatible {
13
- /**
14
- * Returns flag indicating if WPML is present.
15
- *
16
- * @since 2.3.12.3
17
- *
18
- * @return bool
19
- */
20
- public function exists() {
21
- return function_exists( 'icl_object_id' );
22
- }
23
 
24
- /**
25
- * Declares compatibility hooks.
26
- *
27
- * @since 2.3.12.3
28
- */
29
- public function hooks() {
30
- add_filter( 'aioseop_home_url', array( &$this, 'aioseop_home_url' ) );
31
- add_filter( 'aioseop_sitemap_xsl_url', array( &$this, 'aioseop_sitemap_xsl_url' ) );
32
- }
33
 
34
- /**
35
- * Returns specified url filtered by wpml.
36
- * This is needed to obtain the correct domain in which wordpress is running on.
37
- * AIOSEOP would have ran first expecting the return of home_url().
38
- *
39
- * @since 2.3.12.3
40
- *
41
- * @param string $path Relative path or url.
42
- *
43
- * @param string filtered url.
44
- */
45
- public function aioseop_home_url( $path ) {
46
- $url = apply_filters( 'wpml_home_url', home_url( '/' ) );
47
- // Remove query string
48
- preg_match_all( '/\?[\s\S]+/', $url, $matches );
49
- // Get base
50
- $url = preg_replace( '/\?[\s\S]+/', '', $url);
51
- $url = trailingslashit( $url );
52
- $url .= preg_replace( '/\//', '', $path, 1);
53
- // Add query string
54
- if ( count( $matches ) > 0 && count( $matches[0] ) > 0 )
55
- $url .= $matches[0][0];
56
- return $url;
57
- }
58
- /**
59
- * Returns XSL url without query string.
60
- *
61
- * @since 2.3.12.3
62
- *
63
- * @param string $url XSL url.
64
- *
65
- * @param string filtered url.
66
- */
67
- public function aioseop_sitemap_xsl_url( $url )
68
- {
69
- return preg_replace( '/\?[\s\S]+/', '', $url);
70
- }
71
- }
72
  }
1
  <?php
2
  if ( ! class_exists( 'All_in_One_SEO_Pack_Wpml' ) ) {
3
+ /**
4
+ * Compatibility with WPML - WordPress Multilingual Plugin
5
+ *
6
+ * @link https://wpml.org/
7
+ * @package All-in-One-SEO-Pack
8
+ * @author Alejandro Mostajo
9
+ * @copyright Semperfi Web Design <https://semperplugins.com/>
10
+ * @version 2.3.13
11
+ */
12
+ class All_in_One_SEO_Pack_Wpml extends All_in_One_SEO_Pack_Compatible {
13
+ /**
14
+ * Returns flag indicating if WPML is present.
15
+ *
16
+ * @since 2.3.12.3
17
+ *
18
+ * @return bool
19
+ */
20
+ public function exists() {
21
+ return function_exists( 'icl_object_id' );
22
+ }
23
 
24
+ /**
25
+ * Declares compatibility hooks.
26
+ *
27
+ * @since 2.3.12.3
28
+ */
29
+ public function hooks() {
30
+ add_filter( 'aioseop_home_url', array( &$this, 'aioseop_home_url' ) );
31
+ add_filter( 'aioseop_sitemap_xsl_url', array( &$this, 'aioseop_sitemap_xsl_url' ) );
32
+ }
33
 
34
+ /**
35
+ * Returns specified url filtered by wpml.
36
+ * This is needed to obtain the correct domain in which WordPress is running on.
37
+ * AIOSEOP would have ran first expecting the return of home_url().
38
+ *
39
+ * @since 2.3.12.3
40
+ *
41
+ * @param string $path Relative path or url.
42
+ *
43
+ * @param string filtered url.
44
+ */
45
+ public function aioseop_home_url( $path ) {
46
+ $url = apply_filters( 'wpml_home_url', home_url( '/' ) );
47
+ // Remove query string
48
+ preg_match_all( '/\?[\s\S]+/', $url, $matches );
49
+ // Get base
50
+ $url = preg_replace( '/\?[\s\S]+/', '', $url );
51
+ $url = trailingslashit( $url );
52
+ $url .= preg_replace( '/\//', '', $path, 1 );
53
+ // Add query string
54
+ if ( count( $matches ) > 0 && count( $matches[0] ) > 0 ) {
55
+ $url .= $matches[0][0];
56
+ }
57
+ return $url;
58
+ }
59
+ /**
60
+ * Returns XSL url without query string.
61
+ *
62
+ * @since 2.3.12.3
63
+ *
64
+ * @param string $url XSL url.
65
+ *
66
+ * @param string filtered url.
67
+ */
68
+ public function aioseop_sitemap_xsl_url( $url ) {
69
+ return preg_replace( '/\?[\s\S]+/', '', $url );
70
+ }
71
+ }
72
  }
inc/deprecated.php CHANGED
@@ -27,7 +27,7 @@ function oauth_init() {
27
  }
28
  $this->update_class_option( $preload );
29
  $this->update_options();
30
- //return;
31
  }
32
  foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) {
33
  if ( ! empty( $preload[ "{$this->prefix}{$v}" ] ) ) {
@@ -82,7 +82,7 @@ function oauth_init() {
82
  $results[] = $xml['entry'];
83
  }
84
  foreach ( $results as $r ) {
85
- foreach ( $r as $k => $v )
86
  switch ( $k ) {
87
  case 'id':
88
  $rec['id'] = $v;
@@ -99,6 +99,7 @@ function oauth_init() {
99
  }
100
  break;
101
  }
 
102
  $ua[ $rec['title'] ] = array( $rec['ga:webPropertyId'] => $rec['ga:webPropertyId'] );
103
  $profiles[ $rec['ga:webPropertyId'] ] = $rec['ga:profileId'];
104
  }
@@ -106,12 +107,12 @@ function oauth_init() {
106
  $this->account_cache = array();
107
  $this->account_cache['ua'] = $ua;
108
  $this->account_cache['profiles'] = $profiles;
109
- $preload["{$this->prefix}account_cache"] = $this->account_cache;
110
  } else {
111
  unset( $this->token );
112
  unset( $this->secret );
113
  unset( $this->ga_token );
114
- unset( $preload["{$this->prefix}ga_token"] ); // error condition here -- pdb
115
  $response = wp_remote_retrieve_body( $data );
116
  $xml = $this->xml_string_to_array( $response );
117
  if ( ! empty( $xml ) && ! empty( $xml['error'] ) ) {
@@ -136,7 +137,7 @@ function oauth_init() {
136
  $this->default_options['google_connect']['save'] = true;
137
  $this->default_options['google_connect']['name'] = __( 'Disconnect From Google Analytics', 'all-in-one-seo-pack' );
138
  $this->default_options['google_connect']['default'] = "<input name='aiosp_google_connect' type=submit class='button-primary' value='" . __( 'Remove Stored Credentials', 'all-in-one-seo-pack' ) . "'>";
139
- add_filter( $this->prefix . 'override_options', Array( $this, 'override_options' ), 10, 3 );
140
  } else {
141
  $this->default_options['google_connect']['type'] = 'html';
142
  $this->default_options['google_connect']['nolabel'] = 1;
@@ -145,15 +146,15 @@ function oauth_init() {
145
  $this->default_options['google_connect']['default'] = "<a href='{$url}' class='button-primary'>" . __( 'Connect With Google Analytics', 'all-in-one-seo-pack' ) . '</a>';
146
  foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) {
147
  if ( ! empty( $this->$v ) ) {
148
- $preload["{$this->prefix}{$v}"] = $this->$v;
149
  }
150
  }
151
  }
152
  $this->update_class_option( $preload );
153
  $this->update_options();
154
  // $url = $this->report_query();
155
- if ( ! empty( $this->account_cache ) && ! empty( $this->options["{$this->prefix}google_analytics_id"] ) && ! empty( $this->account_cache['profiles'][ $this->options["{$this->prefix}google_analytics_id"] ] ) ) {
156
- $this->profile_id = $this->account_cache['profiles'][ $this->options["{$this->prefix}google_analytics_id"] ];
157
  }
158
  }
159
 
@@ -168,9 +169,9 @@ function oauth_get_data( $oauth_url, $args = null ) {
168
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' );
169
  }
170
  if ( $args === null ) {
171
- $args = Array(
172
  'scope' => 'https://www.googleapis.com/auth/analytics.readonly',
173
- 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' )
174
  );
175
  }
176
  $req_token = new OAuthConsumer( $this->token, $this->secret );
@@ -217,7 +218,7 @@ function oauth_get_token( $oauth_verifier ) {
217
  }
218
  $args = array(
219
  'scope' => 'https://www.google.com/analytics/feeds/',
220
- 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' )
221
  );
222
  $args['oauth_verifier'] = $oauth_verifier;
223
  $oauth_access_token = 'https://www.google.com/accounts/OAuthGetAccessToken';
@@ -258,7 +259,7 @@ function oauth_connect( $count = 0 ) {
258
  }
259
  $args = array(
260
  'scope' => 'https://www.google.com/analytics/feeds/',
261
- 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' )
262
  );
263
  if ( AIOSEOPPRO ) {
264
  $req_req = $this->oauth_get_creds( $oauth_request_token, null, $args, admin_url( 'admin.php?page=all-in-one-seo-pack-pro/aioseop_class.php' ) );
27
  }
28
  $this->update_class_option( $preload );
29
  $this->update_options();
30
+ // return;
31
  }
32
  foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) {
33
  if ( ! empty( $preload[ "{$this->prefix}{$v}" ] ) ) {
82
  $results[] = $xml['entry'];
83
  }
84
  foreach ( $results as $r ) {
85
+ foreach ( $r as $k => $v ) {
86
  switch ( $k ) {
87
  case 'id':
88
  $rec['id'] = $v;
99
  }
100
  break;
101
  }
102
+ }
103
  $ua[ $rec['title'] ] = array( $rec['ga:webPropertyId'] => $rec['ga:webPropertyId'] );
104
  $profiles[ $rec['ga:webPropertyId'] ] = $rec['ga:profileId'];
105
  }
107
  $this->account_cache = array();
108
  $this->account_cache['ua'] = $ua;
109
  $this->account_cache['profiles'] = $profiles;
110
+ $preload[ "{$this->prefix}account_cache" ] = $this->account_cache;
111
  } else {
112
  unset( $this->token );
113
  unset( $this->secret );
114
  unset( $this->ga_token );
115
+ unset( $preload[ "{$this->prefix}ga_token" ] ); // error condition here -- pdb
116
  $response = wp_remote_retrieve_body( $data );
117
  $xml = $this->xml_string_to_array( $response );
118
  if ( ! empty( $xml ) && ! empty( $xml['error'] ) ) {
137
  $this->default_options['google_connect']['save'] = true;
138
  $this->default_options['google_connect']['name'] = __( 'Disconnect From Google Analytics', 'all-in-one-seo-pack' );
139
  $this->default_options['google_connect']['default'] = "<input name='aiosp_google_connect' type=submit class='button-primary' value='" . __( 'Remove Stored Credentials', 'all-in-one-seo-pack' ) . "'>";
140
+ add_filter( $this->prefix . 'override_options', array( $this, 'override_options' ), 10, 3 );
141
  } else {
142
  $this->default_options['google_connect']['type'] = 'html';
143
  $this->default_options['google_connect']['nolabel'] = 1;
146
  $this->default_options['google_connect']['default'] = "<a href='{$url}' class='button-primary'>" . __( 'Connect With Google Analytics', 'all-in-one-seo-pack' ) . '</a>';
147
  foreach ( array( 'token', 'secret', 'access_token', 'ga_token', 'account_cache' ) as $v ) {
148
  if ( ! empty( $this->$v ) ) {
149
+ $preload[ "{$this->prefix}{$v}" ] = $this->$v;
150
  }
151
  }
152
  }
153
  $this->update_class_option( $preload );
154
  $this->update_options();
155
  // $url = $this->report_query();
156
+ if ( ! empty( $this->account_cache ) && ! empty( $this->options[ "{$this->prefix}google_analytics_id" ] ) && ! empty( $this->account_cache['profiles'][ $this->options[ "{$this->prefix}google_analytics_id" ] ] ) ) {
157
+ $this->profile_id = $this->account_cache['profiles'][ $this->options[ "{$this->prefix}google_analytics_id" ] ];
158
  }
159
  }
160
 
169
  require_once( AIOSEOP_PLUGIN_DIR . 'inc/extlib/OAuth.php' );
170
  }
171
  if ( $args === null ) {
172
+ $args = array(
173
  'scope' => 'https://www.googleapis.com/auth/analytics.readonly',
174
+ 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ),
175
  );
176
  }
177
  $req_token = new OAuthConsumer( $this->token, $this->secret );
218
  }
219
  $args = array(
220
  'scope' => 'https://www.google.com/analytics/feeds/',
221
+ 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ),
222
  );
223
  $args['oauth_verifier'] = $oauth_verifier;
224
  $oauth_access_token = 'https://www.google.com/accounts/OAuthGetAccessToken';
259
  }
260
  $args = array(
261
  'scope' => 'https://www.google.com/analytics/feeds/',
262
+ 'xoauth_displayname' => AIOSEOP_PLUGIN_NAME . ' ' . __( 'Google Analytics', 'all-in-one-seo-pack' ),
263
  );
264
  if ( AIOSEOPPRO ) {
265
  $req_req = $this->oauth_get_creds( $oauth_request_token, null, $args, admin_url( 'admin.php?page=all-in-one-seo-pack-pro/aioseop_class.php' ) );
inc/sitemap-xsl.php CHANGED
@@ -144,11 +144,11 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
144
  <tr>
145
  <th width="50%">URL</th>
146
  <?php
147
- if ( aiosp_include_images() ) {
148
  ?>
149
  <th>Images</th>
150
  <?php
151
- }
152
  ?>
153
  <th>Priority</th>
154
  <th>Change Frequency</th>
@@ -170,26 +170,26 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
170
  <a href="{$itemURL}">
171
  <xsl:value-of select="sitemap:loc"/>
172
  </a>
173
- <xsl:for-each select="video:video">
174
- <xsl:variable name="thumbURL">
175
- <xsl:value-of select="video:thumbnail_loc"/>
176
- </xsl:variable>
177
- <xsl:variable name="playURL">
178
- <xsl:value-of select="video:player_loc"/>
179
- </xsl:variable>
180
- <xsl:if test="$thumbURL != ''">
181
- <a href="{$playURL}"><img src="{$thumbURL}" style="max-width:60px;float:right;"/></a>
182
- </xsl:if>
183
- </xsl:for-each>
184
  </td>
185
  <?php
186
- if ( aiosp_include_images() ) {
187
  ?>
188
  <td>
189
- <xsl:value-of select="count(image:image)"/>
190
  </td>
191
  <?php
192
- }
193
  ?>
194
  <td>
195
  <xsl:if test="string(number(sitemap:priority))!='NaN'">
144
  <tr>
145
  <th width="50%">URL</th>
146
  <?php
147
+ if ( aiosp_include_images() ) {
148
  ?>
149
  <th>Images</th>
150
  <?php
151
+ }
152
  ?>
153
  <th>Priority</th>
154
  <th>Change Frequency</th>
170
  <a href="{$itemURL}">
171
  <xsl:value-of select="sitemap:loc"/>
172
  </a>
173
+ <xsl:for-each select="video:video">
174
+ <xsl:variable name="thumbURL">
175
+ <xsl:value-of select="video:thumbnail_loc"/>
176
+ </xsl:variable>
177
+ <xsl:variable name="playURL">
178
+ <xsl:value-of select="video:player_loc"/>
179
+ </xsl:variable>
180
+ <xsl:if test="$thumbURL != ''">
181
+ <a href="{$playURL}"><img src="{$thumbURL}" style="max-width:60px;float:right;"/></a>
182
+ </xsl:if>
183
+ </xsl:for-each>
184
  </td>
185
  <?php
186
+ if ( aiosp_include_images() ) {
187
  ?>
188
  <td>
189
+ <xsl:value-of select="count(image:image)"/>
190
  </td>
191
  <?php
192
+ }
193
  ?>
194
  <td>
195
  <xsl:if test="string(number(sitemap:priority))!='NaN'">
inc/translations.php CHANGED
@@ -44,7 +44,7 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
44
 
45
  $this->current_locale = get_locale();
46
 
47
- if( $this->current_locale === 'en_US'){
48
  return;
49
  }
50
 
@@ -80,7 +80,6 @@ if ( ! class_exists( 'AIOSEOP_Translations' ) ) :
80
  private function set_current_locale_data( $locales ) {
81
 
82
  // Some locales are missing the locale code (wp_locale) so we need to check for that.
83
-
84
  foreach ( $locales as $locale ) {
85
 
86
  $wplocale = '';
44
 
45
  $this->current_locale = get_locale();
46
 
47
+ if ( $this->current_locale === 'en_US' ) {
48
  return;
49
  }
50
 
80
  private function set_current_locale_data( $locales ) {
81
 
82
  // Some locales are missing the locale code (wp_locale) so we need to check for that.
 
83
  foreach ( $locales as $locale ) {
84
 
85
  $wplocale = '';
js/modules/aioseop_module.js CHANGED
@@ -1,724 +1,817 @@
1
- /**
2
- * Controls all the styling of the plugin.
3
- *
4
- * AIOSEOP Updates class.
5
- * @author Michael Torbert.
6
- * @author Semper Fi Web Design.
7
- * @copyright https://semperplugins.com
8
- * @version 1.0.0
9
- */
10
- if ( typeof aiosp_data != 'undefined' ) {
11
-
12
- /**
13
- * @since 1.0.0
14
- * @param int $index.
15
- * @param $value
16
- */
17
- jQuery.each( aiosp_data, function( index, value ) {
18
- // aiosp_data[index] = value.json.replace(/&quot;/g, '"');
19
- // aiosp_data[index] = jQuery.parseJSON( value );
20
- if ( index == 0 ) {
21
- if ( typeof value.condshow == 'undefined' ) {
22
- aiosp_data[ index ].condshow = [];
23
- }
24
- } else {
25
- if ( typeof value.condshow != 'undefined' ) {
26
- aiosp_data[ 0 ].condshow =
27
- jQuery.merge( aiosp_data[0].condshow, value.condshow );
28
- }
29
- }
30
- });
31
- aiosp_data = aiosp_data[0];
32
- }
33
-
34
- /**
35
- * @summary Changes visibility.
36
- *
37
- * @since 1.0.0
38
- * @param int $id.
39
- */
40
- function toggleVisibility( id ) {
41
- var e = document.getElementById( id );
42
- if ( e.style.display == 'block' )
43
- e.style.display = 'none';
44
- else
45
- e.style.display = 'block';
46
- }
47
-
48
- /**
49
- * @summary Counts characters.
50
- *
51
- * @since 1.0.0
52
- * @param String $field.
53
- * @param Int $cntfield.
54
- * @return Mixed.
55
- */
56
- function countChars( field, cntfield ) {
57
- var extra = 0;
58
- var field_size;
59
- if ( ( field.name == 'aiosp_title' )
60
- && ( typeof aiosp_title_extra !== 'undefined' ) ) {
61
- extra = aiosp_title_extra;
62
- }
63
- cntfield.value = field.value.length + extra;
64
- if ( typeof field.size != 'undefined' ) {
65
- field_size = field.size;
66
- } else {
67
- field_size = field.rows * field.cols;
68
- }
69
- if ( field_size < 10 )
70
- return;
71
- if ( cntfield.value > field_size ) {
72
- cntfield.style.color = "#fff";
73
- cntfield.style.backgroundColor = "#f00";
74
- } else {
75
- if ( cntfield.value > ( field_size - 91 ) ) {
76
- cntfield.style.color = "#515151";
77
- cntfield.style.backgroundColor = "#ff0";
78
- } else {
79
- cntfield.style.color = "#515151";
80
- cntfield.style.backgroundColor = "#eee";
81
- }
82
- }
83
- }
84
-
85
- /**
86
- * @summary Returns the fields value.
87
- *
88
- * @since 1.0.0
89
- * @param String $field.
90
- * @return Mixed.
91
- */
92
- function aioseop_get_field_value( field ) {
93
- if ( field.length == 0 )
94
- return field;
95
- cur = jQuery('[name=' + field + ']');
96
- if ( cur.length == 0 )
97
- return field;
98
- type = cur.attr('type');
99
- if ( type == "checkbox" || type == "radio" )
100
- cur = jQuery('input[name=' + field + ']:checked');
101
- return cur.val();
102
- }
103
-
104
- /**
105
- * @summary Returns the fields value.
106
- *
107
- * @since 1.0.0
108
- * @param String $field.
109
- * @return Mixed.
110
- */
111
- function aioseop_get_field_values( field ) {
112
- arr = [];
113
- cur = jQuery( '[name=' + field + ']' );
114
- if ( cur.length == 0 )
115
- return field;
116
- type = cur.attr('type');
117
- if ( type == "checkbox" || type == "radio" )
118
- jQuery( 'input[name=' + field + ']:checked' ).each(function() {
119
- arr.push(jQuery(this).val());
120
- });
121
- if ( arr.length <= 0 )
122
- arr.push(cur.val());
123
- return arr;
124
- }
125
-
126
- /**
127
- * @summary Evaluates condshow logic.
128
- *
129
- * @since 1.0.0
130
- * @param String $statement.
131
- * @return Mixed.
132
- */
133
- function aioseop_eval_condshow_logic( statement ) {
134
- var lhs, rhs;
135
- if ( ( typeof statement ) == 'object' ) {
136
- lhs = statement['lhs'];
137
- rhs = statement['rhs'];
138
- if ( lhs !== null && ( ( typeof lhs ) == 'object' ) )
139
- lhs = aioseop_eval_condshow_logic( statement['lhs'] );
140
- if ( rhs !== null && ( typeof rhs ) == 'object' )
141
- rhs = aioseop_eval_condshow_logic( statement['rhs'] );
142
- lhs = aioseop_get_field_value( lhs );
143
- rhs = aioseop_get_field_value( rhs );
144
- switch ( statement['op'] ) {
145
- case 'NOT':
146
- return ( ! lhs );
147
- case 'AND':
148
- return ( lhs && rhs );
149
- case 'OR' :
150
- return ( lhs || rhs );
151
- case '==' :
152
- return ( lhs == rhs );
153
- case '!=' :
154
- return ( lhs != rhs );
155
- default :
156
- return null;
157
- }
158
- }
159
- return statement;
160
- }
161
-
162
- /**
163
- * @summary Evaluates condshow logic.
164
- *
165
- * @since 1.0.0
166
- * @param String $index.
167
- * @param $value.
168
- * @return Mixed.
169
- */
170
- function aioseop_do_condshow_match( index, value ) {
171
- if ( typeof value != 'undefined' ) {
172
- matches = true;
173
- jQuery.each( value, function(subopt, setting) {
174
- var statement;
175
- if ( ( typeof setting ) == 'object' ) {
176
- statement = aioseop_eval_condshow_logic( setting );
177
- if ( ! statement ) {
178
- matches = false;
179
- }
180
- } else {
181
- if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb
182
- cur = aioseop_get_field_values( subopt );
183
- if ( jQuery.inArray( setting, cur, 0 ) < 0 ) {
184
- matches = false;
185
- }
186
- } else {
187
- cur = aioseop_get_field_value( subopt );
188
- if ( cur != setting ) {
189
- matches = false;
190
- }
191
- }
192
- }
193
- });
194
- if ( matches ) {
195
- jQuery( '#' + index + '_wrapper' ).show();
196
- } else {
197
- jQuery( '#' + index + '_wrapper' ).hide();
198
- }
199
- return matches;
200
- }
201
- return false;
202
- }
203
-
204
- /**
205
- * @summary Adds condshow handlers.
206
- *
207
- * @since 1.0.0
208
- * @param String $index.
209
- * @param $value.
210
- */
211
- function aioseop_add_condshow_handlers( index, value ) {
212
- if ( typeof value != 'undefined' ) {
213
- jQuery.each(value, function(subopt, setting) {
214
- jQuery('[name=' + subopt + ']').bind( "change keyup", function() {
215
- aioseop_do_condshow_match( index, value );
216
- });
217
- });
218
- }
219
- }
220
-
221
- /**
222
- * @summary Does condshow.
223
- *
224
- * @since 1.0.0
225
- * @param $condshow.
226
- */
227
- function aioseop_do_condshow( condshow ) {
228
- if ( typeof aiosp_data.condshow != 'undefined' ) {
229
- jQuery.each( aiosp_data.condshow, function( index, value ) {
230
- aioseop_do_condshow_match( index, value );
231
- aioseop_add_condshow_handlers( index, value );
232
- });
233
- }
234
- }
235
-
236
- /**
237
- * @since 1.0.0
238
- */
239
- jQuery( document ).ready(function() {
240
- if ( typeof aiosp_data != 'undefined' ) {
241
- if ( typeof aiosp_data.condshow != 'undefined' ) {
242
- aioseop_do_condshow( aiosp_data.condshow );
243
- }
244
- }
245
-
246
- /**
247
- * Turns on image checker on custom url change.
248
- * @since 2.3.16
249
- */
250
- jQuery( '.aioseop_upload_image_label' ).on( 'change', function() {
251
- this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' );
252
- if ( this.checker.length > 0 ) {
253
- this.checker.val( 1 );
254
- }
255
- } );
256
- });
257
-
258
- /**
259
- * @summary Custom jQuery plugin that enables image uploader in wordpress.
260
- *
261
- * @since 2.3.13
262
- * @since 2.4.14 Added success callback and options.
263
- * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/
264
- *
265
- * @param object options Plugin options.
266
- */
267
- jQuery.fn.aioseopImageUploader = function( options ) {
268
- // Keep reference to this.
269
- var self = this;
270
-
271
- // Options
272
- self.options = jQuery.extend({
273
- success: undefined,
274
- }, options);
275
-
276
- // Set input target when to update image url value
277
- self.target = jQuery( self ).next();
278
-
279
- // Uploader per image button
280
- // * Having only one uploader was causing problems when multiple image buttons where in place
281
- self.uploader = wp.media({
282
- title: 'Choose Image',
283
- button: {
284
- text: 'Choose Image'
285
- },
286
- multiple: false
287
- });
288
-
289
- /**
290
- * Event handler that will be called when an image is selected from media uploader.
291
- */
292
- self.onSelect = function() {
293
- var url = self.uploader.state().get( 'selection' ).first().toJSON().url;
294
- if ( self.target.length >= 0 )
295
- jQuery( self.target ).val( url );
296
- if ( self.options.success !== undefined )
297
- self.options.success( url, self );
298
- }
299
-
300
- /**
301
- * Click event handler.
302
- * @param object e Click event.
303
- */
304
- self.onClick = function( e ) {
305
- e.preventDefault();
306
- self.uploader.open();
307
- }
308
-
309
- //Set uploader select handler
310
- self.uploader.on( 'select', self.onSelect );
311
-
312
- // Set click handler
313
- jQuery( self ).click( self.onClick );
314
- };
315
-
316
- /**
317
- * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin.
318
- *
319
- * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/
320
- * @since ?
321
- * @since 2.3.11.2 Use WP 3.5 new media uploader
322
- * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740)
323
- *
324
- */
325
- jQuery(document).ready(function($){
326
-
327
- jQuery( '.aioseop_upload_image_button' ).each(function() {
328
- jQuery( this ).aioseopImageUploader({
329
- success: function( url, el ) {
330
- // Update checker
331
- if ( jQuery( el ).prev().length > 0 )
332
- jQuery( el ).prev().val( 1 );
333
- },
334
- });
335
- });
336
-
337
- });
338
-
339
- /**
340
- * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged.
341
- *
342
- * props to commentluv for this fix
343
- * @author commentluv.
344
- * @link https://core.trac.wordpress.org/ticket/16972
345
- * @since 1.0.0
346
- */
347
- jQuery( document ).ready(function() {
348
-
349
- // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag
350
- jQuery( '.hndle' ).mousedown(function() {
351
-
352
- // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function
353
- jQuery( '.wrap').mouseup(function() {
354
- aiosp_store_radio();
355
- setTimeout( 'aiosp_reclick_radio();', 50 );
356
- });
357
- })
358
- });
359
-
360
- /**
361
- * @summary Stores object of all radio buttons that are checked for entire form.
362
- *
363
- * @since 1.0.0
364
- */
365
- function aiosp_store_radio() {
366
- var radioshack = {};
367
- jQuery( 'input[type="radio"]' ).each(function() {
368
- if( jQuery( this ).is( ':checked' ) ) {
369
- radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val();
370
- }
371
- jQuery( document ).data( 'radioshack', radioshack );
372
- });
373
- }
374
-
375
- /**
376
- * @summary Detects mouseup and restore all radio buttons that were checked.
377
- *
378
- * @since 1.0.0
379
- */
380
- function aiosp_reclick_radio() {
381
-
382
- // gets the object of checked radio button names and values
383
- var radios = jQuery( document ).data( 'radioshack' );
384
-
385
- //steps thru each object element and trigger a click on it's corresponding radio button
386
- for( key in radios ) {
387
- jQuery( 'input[name="' + key + '"]' )
388
- .filter( '[value="' + radios[ key ]+ '"]' )
389
- .trigger( 'click' );
390
- }
391
- // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function)
392
- jQuery( '.wrap' ).unbind( 'mouseup' );
393
- }
394
-
395
- /**
396
- * @summary Handdles ajax call.
397
- *
398
- * @since 1.0.0
399
- * @param $action.
400
- * @param $setting.
401
- * @param $options.
402
- * @param $success.
403
- */
404
- function aioseop_handle_ajax_call( action, settings, options, success ) {
405
- var aioseop_sack = new sack( ajaxurl );
406
- aioseop_sack.execute = 1;
407
- aioseop_sack.method = 'POST';
408
- aioseop_sack.setVar( "action", action );
409
- aioseop_sack.setVar( "settings", settings );
410
- aioseop_sack.setVar( "options", options );
411
- if ( typeof success != 'undefined' ) {
412
- aioseop_sack.onCompletion = success;
413
- }
414
- aioseop_sack.setVar(
415
- "nonce-aioseop",
416
- jQuery( 'input[name="nonce-aioseop"]' ).val()
417
- );
418
- aioseop_sack.setVar(
419
- "nonce-aioseop-edit",
420
- jQuery( 'input[name="nonce-aioseop-edit"]' ).val()
421
- );
422
- aioseop_sack.onError = function() {
423
- alert( 'Ajax error on saving.' );
424
- };
425
- aioseop_sack.runAJAX();
426
- }
427
-
428
- /**
429
- * @summary Handdles posts URL.
430
- *
431
- * @since 1.0.0
432
- * @param $action.
433
- * @param $setting.
434
- * @param $options.
435
- * @param $success.
436
- */
437
- function aioseop_handle_post_url( action, settings, options, success) {
438
- jQuery("div#aiosp_"+settings).fadeOut('fast', function() {
439
- var loading = '<label class="aioseop_loading aioseop_' + settings + '_loading"></label> Please wait...';
440
- jQuery( "div#aiosp_"+ settings ).fadeIn( 'fast', function() {
441
- aioseop_handle_ajax_call( action, settings, options, success);
442
- });
443
- jQuery( "div#aiosp_" + settings ).html( loading );
444
- })
445
- };
446
-
447
- /**
448
- * @summary Handles when AIOSEOP is overflowed.
449
- *
450
- * @since 1.0.0
451
- * @param $element.
452
- * @return mixed.
453
- */
454
- function aioseop_is_overflowed( element ) {
455
- return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
456
- }
457
-
458
- /**
459
- * @summary Handles when overflowed border.
460
- *
461
- * @since 1.0.0
462
- * @param $el.
463
- */
464
- function aioseop_overflow_border( el ) {
465
- if ( aioseop_is_overflowed( el ) ) {
466
- el.className = 'aioseop_option_div aioseop_overflowed';
467
- } else {
468
- el.className = 'aioseop_option_div';
469
- }
470
- }
471
-
472
- /**
473
- * @since 1.0.0
474
- * @return mixed.
475
- */
476
- jQuery( document ).ready(function() {
477
- jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on( 'click', function() {
478
- var previousValue = jQuery( this ).attr( 'previousValue' );
479
- var name = jQuery( this ).attr( 'name' );
480
- if ( typeof previousValue == 'undefined' ) {
481
- if ( jQuery( this ).prop( "checked" ) ) {
482
- jQuery( this ).prop( 'checked', true );
483
- jQuery( this ).attr( 'previousValue', 'checked' );
484
- } else {
485
- jQuery( this ).prop( 'checked', false );
486
- jQuery( this ).attr( 'previousValue', false );
487
- }
488
- return;
489
- }
490
- if ( previousValue == 'checked' ) {
491
- jQuery( this ).prop( 'checked', false );
492
- jQuery( this ).attr( 'previousValue', false );
493
- } else {
494
- jQuery( "input[name=" + name + "]:radio" )
495
- .attr( 'previousValue', false );
496
- jQuery( this ).attr( 'previousValue', 'checked' );
497
- }
498
- });
499
- if ( typeof aiosp_data.pointers != 'undefined' ) {
500
-
501
- /**
502
- * @since 1.0.0
503
- * @param $index.
504
- * @param $value.
505
- * @return mixed.
506
- */
507
- jQuery.each( aiosp_data.pointers, function( index, value ) {
508
- if ( value != 'undefined' && value.pointer_text != '' ) {
509
- aioseop_show_pointer( index, value );
510
- }
511
- });
512
- }
513
-
514
- /**
515
- * @since 1.0.0
516
- * @param $e.
517
- * @return boolean.
518
- */
519
- jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" )
520
- .delegate("input[name='Submit']", "click", function( e ) {
521
- e.preventDefault();
522
- return false;
523
- });
524
-
525
- /**
526
- * @since 1.0.0
527
- * @param $e.
528
- * @return boolean.
529
- */
530
- jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" )
531
- .delegate( "input[name='Submit']", "click", function( e ) {
532
- e.preventDefault();
533
- aioseop_handle_post_url(
534
- 'aioseop_ajax_save_settings',
535
- 'ajax_settings_message',
536
- jQuery( 'form#aiosp_settings_form' ).serialize(),
537
- function() {
538
- jQuery( '.wp-has-current-submenu' ).fadeIn( 'fast', function() {
539
- aioseop_handle_ajax_call(
540
- 'aioseop_ajax_get_menu_links',
541
- 'ajax_settings_message',
542
- jQuery.param( {target: '.wp-has-current-submenu > ul'} )
543
- );
544
- });
545
- } );
546
- return false;
547
- });
548
-
549
- /**
550
- * @since 1.0.0
551
- * @param $e.
552
- * @return boolean.
553
- */
554
- jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" )
555
- .delegate("input[name='Submit']", "click", function( e ) {
556
- e.preventDefault();
557
- return false;
558
- });
559
-
560
- /**
561
- * @since 1.0.0
562
- * @param $e.
563
- * @return boolean.
564
- */
565
- jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" )
566
- .delegate( "input[name='Submit']", "click", function( e ) {
567
- e.preventDefault();
568
- aioseop_handle_post_url(
569
- 'aioseop_ajax_save_settings',
570
- 'ajax_settings_message',
571
- jQuery( 'form#aiosp_settings_form' ).serialize(),
572
- function() {
573
- jQuery( '.wp-has-current-submenu' ).fadeIn( 'fast', function() {
574
- aioseop_handle_ajax_call(
575
- 'aioseop_ajax_get_menu_links',
576
- 'ajax_settings_message',
577
- jQuery.param( {target: '.wp-has-current-submenu > ul'} )
578
- );
579
- });
580
- } );
581
- return false;
582
- });
583
-
584
- var selectors =
585
- "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div";
586
-
587
- /**
588
- * @since 1.0.0
589
- * @return boolean.
590
- */
591
- jQuery( "div#aiosp_sitemap_addl_pages_metabox" )
592
- .delegate( "input[name='Submit']", "click", function() {
593
- aioseop_handle_post_url(
594
- 'aioseop_ajax_save_url',
595
- 'sitemap_addl_pages',
596
- jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' )
597
- .serialize()
598
- );
599
- return false;
600
- });
601
-
602
- /**
603
- * @since 1.0.0
604
- * @return boolean.
605
- */
606
- jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" )
607
- .delegate( "input[name='Submit']", "click", function() {
608
- aioseop_handle_post_url(
609
- 'aioseop_ajax_save_url',
610
- 'video_sitemap_addl_pages',
611
- jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select')
612
- .serialize()
613
- );
614
- return false;
615
- });
616
-
617
- /**
618
- * @since 1.0.0
619
- * @param $e.
620
- * @return boolean.
621
- */
622
- jQuery( "div#aiosp_sitemap_addl_pages_metabox" )
623
- .delegate("a.aiosp_delete_url", "click", function( e ) {
624
- e.preventDefault();
625
- aioseop_handle_post_url(
626
- 'aioseop_ajax_delete_url',
627
- 'sitemap_addl_pages',
628
- jQuery( this ).attr( "title" )
629
- );
630
- return false;
631
- });
632
-
633
- /**
634
- * @since 1.0.0
635
- * @param $e.
636
- * @return boolean.
637
- */
638
- jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" )
639
- .delegate( "a.aiosp_delete_url", "click", function( e ) {
640
- e.preventDefault();
641
- aioseop_handle_post_url(
642
- 'aioseop_ajax_delete_url',
643
- 'video_sitemap_addl_pages',
644
- jQuery( this ).attr( "title" )
645
- );
646
- return false;
647
- });
648
-
649
- /**
650
- * @since 1.0.0
651
- * @param $e.
652
- * @return boolean.
653
- */
654
- jQuery( "div#aiosp_opengraph_scan_header" )
655
- .delegate( "input[name='aiosp_opengraph_scan_header']", "click", function( e ) {
656
- e.preventDefault();
657
- aioseop_handle_post_url(
658
- 'aioseop_ajax_scan_header',
659
- 'opengraph_scan_header',
660
- jQuery( 'div#aiosp_opengraph_scan_header' ).serialize()
661
- );
662
- return false;
663
- });
664
-
665
- /**
666
- * @since 1.0.0
667
- */
668
- jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' )
669
- .click(function() {
670
- jQuery( this )
671
- .parents( 'div:eq(0)' )
672
- .find( ':checkbox' )
673
- .prop( 'checked', this.checked );
674
- });
675
-
676
- /**
677
- * @since 1.0.0
678
- */
679
- jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' )
680
- .click(function () {
681
- if ( ! this.checked )
682
- jQuery( this )
683
- .parents( 'div:eq(0)' )
684
- .find( 'input[value="all"]:checkbox' )
685
- .prop( 'checked', this.checked );
686
- });
687
-
688
- /**
689
- * @since 1.0.0
690
- */
691
- jQuery( ".aioseop_tab:not(:first)" ).hide();
692
-
693
- /**
694
- * @since 1.0.0
695
- */
696
- jQuery( ".aioseop_tab:first" ).show();
697
-
698
- /**
699
- * @since 1.0.0
700
- * @return boolean.
701
- */
702
- jQuery( "a.aioseop_header_tab" ).click(function() {
703
- var stringref = jQuery( this ).attr( "href" ).split( '#' )[1];
704
- jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' );
705
- jQuery( '.aioseop_tab#' + stringref ).show( 'slow' );
706
- jQuery( '.aioseop_header_tab[href!="#'+ stringref +'"]' ).removeClass( 'active' );
707
- jQuery( '.aioseop_header_tab[href="#' + stringref +'"]' ).addClass( 'active' );
708
- return false;
709
- });
710
- });
711
-
712
-
713
- jQuery(document).ready( function() {
714
- // TODO: consider moving EVERYTHING that needs ready() to this function
715
- initAll(jQuery);
716
- });
717
-
718
- function initAll($){
719
- if ( $('.aiseop-date').length > 0 && $('.aiseop-date').eq(0).prop('type').toLowerCase() === 'text' ) {
720
- $('.aiseop-date').datepicker({
721
- dateFormat: "yy-mm-dd"
722
- });
723
- }
724
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Controls all the styling of the plugin.
3
+ *
4
+ * AIOSEOP Updates class.
5
+ * @author Michael Torbert.
6
+ * @author Semper Fi Web Design.
7
+ * @copyright https://semperplugins.com
8
+ * @version 1.0.0
9
+ */
10
+ if ( typeof aiosp_data != 'undefined' ) {
11
+
12
+ /**
13
+ * @since 1.0.0
14
+ * @param int $index.
15
+ * @param $value
16
+ */
17
+ jQuery.each(
18
+ aiosp_data, function( index, value ) {
19
+ // aiosp_data[index] = value.json.replace(/&quot;/g, '"');
20
+ // aiosp_data[index] = jQuery.parseJSON( value );
21
+ if ( index == 0 ) {
22
+ if ( typeof value.condshow == 'undefined' ) {
23
+ aiosp_data[ index ].condshow = [];
24
+ }
25
+ } else {
26
+ if ( typeof value.condshow != 'undefined' ) {
27
+ aiosp_data[ 0 ].condshow =
28
+ jQuery.merge( aiosp_data[0].condshow, value.condshow );
29
+ }
30
+ }
31
+ }
32
+ );
33
+ aiosp_data = aiosp_data[0];
34
+ }
35
+
36
+ /**
37
+ * @summary Changes visibility.
38
+ *
39
+ * @since 1.0.0
40
+ * @param int $id.
41
+ */
42
+ function toggleVisibility( id ) {
43
+ var e = document.getElementById( id );
44
+ if ( e.style.display == 'block' ) {
45
+ e.style.display = 'none';
46
+ } else {
47
+ e.style.display = 'block';
48
+ }
49
+ }
50
+
51
+ /**
52
+ * @summary Counts characters.
53
+ *
54
+ * @since 1.0.0
55
+ * @param String $field.
56
+ * @param Int $cntfield.
57
+ * @return Mixed.
58
+ */
59
+ function countChars( field, cntfield ) {
60
+ var extra = 0;
61
+ var field_size;
62
+ if ( ( field.name == 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) {
63
+ extra = aiosp_title_extra;
64
+ }
65
+ cntfield.value = field.value.length + extra;
66
+ if ( typeof field.size != 'undefined' ) {
67
+ field_size = field.size;
68
+ } else {
69
+ field_size = field.rows * field.cols;
70
+ }
71
+ if ( field_size < 10 ) {
72
+ return;
73
+ }
74
+ if ( cntfield.value > field_size ) {
75
+ cntfield.style.color = "#fff";
76
+ cntfield.style.backgroundColor = "#f00";
77
+ } else {
78
+ if ( cntfield.value > ( field_size - 91 ) ) {
79
+ cntfield.style.color = "#515151";
80
+ cntfield.style.backgroundColor = "#ff0";
81
+ } else {
82
+ cntfield.style.color = "#515151";
83
+ cntfield.style.backgroundColor = "#eee";
84
+ }
85
+ }
86
+ }
87
+
88
+ /**
89
+ * @summary Returns the fields value.
90
+ *
91
+ * @since 1.0.0
92
+ * @param String $field.
93
+ * @return Mixed.
94
+ */
95
+ function aioseop_get_field_value( field ) {
96
+ if ( field.length == 0 ) {
97
+ return field;
98
+ }
99
+ cur = jQuery( '[name=' + field + ']' );
100
+ if ( cur.length == 0 ) {
101
+ return field;
102
+ }
103
+ type = cur.attr( 'type' );
104
+ if ( type == "checkbox" || type == "radio" ) {
105
+ cur = jQuery( 'input[name=' + field + ']:checked' );
106
+ }
107
+ return cur.val();
108
+ }
109
+
110
+ /**
111
+ * @summary Returns the fields value.
112
+ *
113
+ * @since 1.0.0
114
+ * @param String $field.
115
+ * @return Mixed.
116
+ */
117
+ function aioseop_get_field_values( field ) {
118
+ arr = [];
119
+ cur = jQuery( '[name=' + field + ']' );
120
+ if ( cur.length == 0 ) {
121
+ return field;
122
+ }
123
+ type = cur.attr( 'type' );
124
+ if ( type == "checkbox" || type == "radio" ) {
125
+ jQuery( 'input[name=' + field + ']:checked' ).each(
126
+ function() {
127
+ arr.push( jQuery( this ).val() );
128
+ }
129
+ );
130
+ }
131
+ if ( arr.length <= 0 ) {
132
+ arr.push( cur.val() );
133
+ }
134
+ return arr;
135
+ }
136
+
137
+ /**
138
+ * @summary Evaluates condshow logic.
139
+ *
140
+ * @since 1.0.0
141
+ * @param String $statement.
142
+ * @return Mixed.
143
+ */
144
+ function aioseop_eval_condshow_logic( statement ) {
145
+ var lhs, rhs;
146
+ if ( ( typeof statement ) == 'object' ) {
147
+ lhs = statement.lhs;
148
+ rhs = statement.rhs;
149
+ if ( lhs !== null && ( ( typeof lhs ) == 'object' ) ) {
150
+ lhs = aioseop_eval_condshow_logic( lhs );
151
+ }
152
+ if ( rhs !== null && ( typeof rhs ) == 'object' ) {
153
+ rhs = aioseop_eval_condshow_logic( rhs );
154
+ }
155
+ lhs = aioseop_get_field_value( lhs );
156
+ rhs = aioseop_get_field_value( rhs );
157
+ switch ( statement.op ) {
158
+ case 'NOT':
159
+ return ( ! lhs );
160
+ case 'AND':
161
+ return ( lhs && rhs );
162
+ case 'OR' :
163
+ return ( lhs || rhs );
164
+ case '==' :
165
+ return ( lhs == rhs );
166
+ case '!=' :
167
+ return ( lhs != rhs );
168
+ default :
169
+ return null;
170
+ }
171
+ }
172
+ return statement;
173
+ }
174
+
175
+ /**
176
+ * @summary Evaluates condshow logic.
177
+ *
178
+ * @since 1.0.0
179
+ * @param String $index.
180
+ * @param $value.
181
+ * @return Mixed.
182
+ */
183
+ function aioseop_do_condshow_match( index, value ) {
184
+ if ( typeof value != 'undefined' ) {
185
+ matches = true;
186
+ jQuery.each(
187
+ value, function(subopt, setting) {
188
+ var statement;
189
+ if ( ( typeof setting ) == 'object' ) {
190
+ statement = aioseop_eval_condshow_logic( setting );
191
+ if ( ! statement ) {
192
+ matches = false;
193
+ }
194
+ } else {
195
+ if ( subopt.match( /\\\[\\\]/ ) ) { // special case for these -- pdb
196
+ cur = aioseop_get_field_values( subopt );
197
+ if ( jQuery.inArray( setting, cur, 0 ) < 0 ) {
198
+ matches = false;
199
+ }
200
+ } else {
201
+ cur = aioseop_get_field_value( subopt );
202
+ if ( cur != setting ) {
203
+ matches = false;
204
+ }
205
+ }
206
+ }
207
+ }
208
+ );
209
+ if ( matches ) {
210
+ jQuery( '#' + index + '_wrapper' ).show();
211
+ } else {
212
+ jQuery( '#' + index + '_wrapper' ).hide();
213
+ }
214
+ return matches;
215
+ }
216
+ return false;
217
+ }
218
+
219
+ /**
220
+ * @summary Adds condshow handlers.
221
+ *
222
+ * @since 1.0.0
223
+ * @param String $index.
224
+ * @param $value.
225
+ */
226
+ function aioseop_add_condshow_handlers( index, value ) {
227
+ if ( typeof value != 'undefined' ) {
228
+ jQuery.each(
229
+ value, function(subopt, setting) {
230
+ jQuery( '[name=' + subopt + ']' ).bind(
231
+ "change keyup", function() {
232
+ aioseop_do_condshow_match( index, value );
233
+ }
234
+ );
235
+ }
236
+ );
237
+ }
238
+ }
239
+
240
+ /**
241
+ * @summary Does condshow.
242
+ *
243
+ * @since 1.0.0
244
+ * @param $condshow.
245
+ */
246
+ function aioseop_do_condshow( condshow ) {
247
+ if ( typeof aiosp_data.condshow != 'undefined' ) {
248
+ jQuery.each(
249
+ aiosp_data.condshow, function( index, value ) {
250
+ aioseop_do_condshow_match( index, value );
251
+ aioseop_add_condshow_handlers( index, value );
252
+ }
253
+ );
254
+ }
255
+ }
256
+
257
+ /**
258
+ * @since 1.0.0
259
+ */
260
+ jQuery( document ).ready(
261
+ function() {
262
+ if ( typeof aiosp_data != 'undefined' ) {
263
+ if ( typeof aiosp_data.condshow != 'undefined' ) {
264
+ aioseop_do_condshow( aiosp_data.condshow );
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Turns on image checker on custom url change.
270
+ * @since 2.3.16
271
+ */
272
+ jQuery( '.aioseop_upload_image_label' ).on(
273
+ 'change', function() {
274
+ this.checker = jQuery( this ).parent().find( '.aioseop_upload_image_checker' );
275
+ if ( this.checker.length > 0 ) {
276
+ this.checker.val( 1 );
277
+ }
278
+ }
279
+ );
280
+ }
281
+ );
282
+
283
+ /**
284
+ * @summary Custom jQuery plugin that enables image uploader in wordpress.
285
+ *
286
+ * @since 2.3.13
287
+ * @since 2.4.14 Added success callback and options.
288
+ * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/
289
+ *
290
+ * @param object options Plugin options.
291
+ */
292
+ jQuery.fn.aioseopImageUploader = function( options ) {
293
+ // Keep reference to this.
294
+ var self = this;
295
+
296
+ // Options
297
+ self.options = jQuery.extend(
298
+ {
299
+ success: undefined,
300
+ }, options
301
+ );
302
+
303
+ // Set input target when to update image url value
304
+ self.target = jQuery( self ).next();
305
+
306
+ // Uploader per image button
307
+ // * Having only one uploader was causing problems when multiple image buttons where in place
308
+ self.uploader = wp.media(
309
+ {
310
+ title: 'Choose Image',
311
+ button: {
312
+ text: 'Choose Image'
313
+ },
314
+ multiple: false
315
+ }
316
+ );
317
+
318
+ /**
319
+ * Event handler that will be called when an image is selected from media uploader.
320
+ */
321
+ self.onSelect = function() {
322
+ var url = self.uploader.state().get( 'selection' ).first().toJSON().url;
323
+ if ( self.target.length >= 0 ) {
324
+ jQuery( self.target ).val( url );
325
+ }
326
+ if ( self.options.success !== undefined ) {
327
+ self.options.success( url, self );
328
+ }
329
+ };
330
+
331
+ /**
332
+ * Click event handler.
333
+ * @param object e Click event.
334
+ */
335
+ self.onClick = function( e ) {
336
+ e.preventDefault();
337
+ self.uploader.open();
338
+ };
339
+
340
+ // Set uploader select handler
341
+ self.uploader.on( 'select', self.onSelect );
342
+
343
+ // Set click handler
344
+ jQuery( self ).click( self.onClick );
345
+ };
346
+
347
+ /**
348
+ * @summary Javascript for using WP media uploader. Indentifies which DOM should use custom uploader plugin.
349
+ *
350
+ * @see http://www.webmaster-source.com/2013/02/06/using-the-wordpress-3-5-media-uploader-in-your-plugin-or-theme/
351
+ * @since ?
352
+ * @since 2.3.11.2 Use WP 3.5 new media uploader
353
+ * @since 2.3.13 Fixed issue #[740](https://github.com/semperfiwebdesign/all-in-one-seo-pack/issues/740)
354
+ *
355
+ */
356
+ jQuery( document ).ready(
357
+ function($){
358
+
359
+ jQuery( '.aioseop_upload_image_button' ).each(
360
+ function() {
361
+ jQuery( this ).aioseopImageUploader(
362
+ {
363
+ success: function( url, el ) {
364
+ // Update checker
365
+ if ( jQuery( el ).prev().length > 0 ) {
366
+ jQuery( el ).prev().val( 1 );
367
+ }
368
+ },
369
+ }
370
+ );
371
+ }
372
+ );
373
+
374
+ }
375
+ );
376
+
377
+ /**
378
+ * @summary workaround for bug that causes radio inputs to lose settings when meta box is dragged.
379
+ *
380
+ * props to commentluv for this fix
381
+ * @author commentluv.
382
+ * @link https://core.trac.wordpress.org/ticket/16972
383
+ * @since 1.0.0
384
+ */
385
+ jQuery( document ).ready(
386
+ function() {
387
+
388
+ // listen for drag drop of metaboxes , bind mousedown to .hndle so it only fires when starting to drag
389
+ jQuery( '.hndle' ).mousedown(
390
+ function() {
391
+
392
+ // set live event listener for mouse up on the content .wrap and wait a tick to give the dragged div time to settle before firing the reclick function
393
+ jQuery( '.wrap' ).mouseup(
394
+ function() {
395
+ aiosp_store_radio();
396
+ setTimeout( function() {
397
+ aiosp_reclick_radio();
398
+ }, 50 );
399
+ }
400
+ );
401
+ }
402
+ );
403
+ }
404
+ );
405
+
406
+ /**
407
+ * @summary Stores object of all radio buttons that are checked for entire form.
408
+ *
409
+ * @since 1.0.0
410
+ */
411
+ function aiosp_store_radio() {
412
+ var radioshack = {};
413
+ jQuery( 'input[type="radio"]' ).each(
414
+ function() {
415
+ if ( jQuery( this ).is( ':checked' ) ) {
416
+ radioshack[ jQuery( this ).attr( 'name' ) ] = jQuery( this ).val();
417
+ }
418
+ jQuery( document ).data( 'radioshack', radioshack );
419
+ }
420
+ );
421
+ }
422
+
423
+ /**
424
+ * @summary Detects mouseup and restore all radio buttons that were checked.
425
+ *
426
+ * @since 1.0.0
427
+ */
428
+ function aiosp_reclick_radio() {
429
+
430
+ // gets the object of checked radio button names and values
431
+ var radios = jQuery( document ).data( 'radioshack' );
432
+
433
+ // steps thru each object element and trigger a click on it's corresponding radio button
434
+ for ( var key in radios ) {
435
+ jQuery( 'input[name="' + key + '"]' )
436
+ .filter( '[value="' + radios[ key ] + '"]' )
437
+ .trigger( 'click' );
438
+ }
439
+ // unbinds the event listener on .wrap (prevents clicks on inputs from triggering function)
440
+ jQuery( '.wrap' ).unbind( 'mouseup' );
441
+ }
442
+
443
+ /**
444
+ * @summary Handdles ajax call.
445
+ *
446
+ * @since 1.0.0
447
+ * @param $action.
448
+ * @param $setting.
449
+ * @param $options.
450
+ * @param $success.
451
+ */
452
+ function aioseop_handle_ajax_call( action, settings, options, success ) {
453
+ var aioseop_sack = new sack( ajaxurl );
454
+ aioseop_sack.execute = 1;
455
+ aioseop_sack.method = 'POST';
456
+ aioseop_sack.setVar( "action", action );
457
+ aioseop_sack.setVar( "settings", settings );
458
+ aioseop_sack.setVar( "options", options );
459
+ if ( typeof success != 'undefined' ) {
460
+ aioseop_sack.onCompletion = success;
461
+ }
462
+ aioseop_sack.setVar(
463
+ "nonce-aioseop",
464
+ jQuery( 'input[name="nonce-aioseop"]' ).val()
465
+ );
466
+ aioseop_sack.setVar(
467
+ "nonce-aioseop-edit",
468
+ jQuery( 'input[name="nonce-aioseop-edit"]' ).val()
469
+ );
470
+ aioseop_sack.onError = function() {
471
+ alert( 'Ajax error on saving.' );
472
+ };
473
+ aioseop_sack.runAJAX();
474
+ }
475
+
476
+ /**
477
+ * @summary Handdles posts URL.
478
+ *
479
+ * @since 1.0.0
480
+ * @param $action.
481
+ * @param $setting.
482
+ * @param $options.
483
+ * @param $success.
484
+ */
485
+ function aioseop_handle_post_url( action, settings, options, success) {
486
+ jQuery( "div#aiosp_" + settings ).fadeOut(
487
+ 'fast', function() {
488
+ var loading = '<label class="aioseop_loading aioseop_' + settings + '_loading"></label> Please wait...';
489
+ jQuery( "div#aiosp_" + settings ).fadeIn(
490
+ 'fast', function() {
491
+ aioseop_handle_ajax_call( action, settings, options, success );
492
+ }
493
+ );
494
+ jQuery( "div#aiosp_" + settings ).html( loading );
495
+ }
496
+ );
497
+ }
498
+
499
+ /**
500
+ * @summary Handles when AIOSEOP is overflowed.
501
+ *
502
+ * @since 1.0.0
503
+ * @param $element.
504
+ * @return mixed.
505
+ */
506
+ function aioseop_is_overflowed( element ) {
507
+ return element.scrollHeight > element.clientHeight || element.scrollWidth > element.clientWidth;
508
+ }
509
+
510
+ /**
511
+ * @summary Handles when overflowed border.
512
+ *
513
+ * @since 1.0.0
514
+ * @param $el.
515
+ */
516
+ function aioseop_overflow_border( el ) {
517
+ if ( aioseop_is_overflowed( el ) ) {
518
+ el.className = 'aioseop_option_div aioseop_overflowed';
519
+ } else {
520
+ el.className = 'aioseop_option_div';
521
+ }
522
+ }
523
+
524
+ /**
525
+ * @since 1.0.0
526
+ * @return mixed.
527
+ */
528
+ jQuery( document ).ready(
529
+ function() {
530
+ jQuery( "#poststuff .aioseop_radio_type input[type='radio']" ).on(
531
+ 'click', function() {
532
+ var previousValue = jQuery( this ).attr( 'previousValue' );
533
+ var name = jQuery( this ).attr( 'name' );
534
+ if ( typeof previousValue == 'undefined' ) {
535
+ if ( jQuery( this ).prop( "checked" ) ) {
536
+ jQuery( this ).prop( 'checked', true );
537
+ jQuery( this ).attr( 'previousValue', 'checked' );
538
+ } else {
539
+ jQuery( this ).prop( 'checked', false );
540
+ jQuery( this ).attr( 'previousValue', false );
541
+ }
542
+ return;
543
+ }
544
+ if ( previousValue == 'checked' ) {
545
+ jQuery( this ).prop( 'checked', false );
546
+ jQuery( this ).attr( 'previousValue', false );
547
+ } else {
548
+ jQuery( "input[name=" + name + "]:radio" )
549
+ .attr( 'previousValue', false );
550
+ jQuery( this ).attr( 'previousValue', 'checked' );
551
+ }
552
+ }
553
+ );
554
+ if ( typeof aiosp_data.pointers != 'undefined' ) {
555
+
556
+ /**
557
+ * @since 1.0.0
558
+ * @param $index.
559
+ * @param $value.
560
+ * @return mixed.
561
+ */
562
+ jQuery.each(
563
+ aiosp_data.pointers, function( index, value ) {
564
+ if ( value != 'undefined' && value.pointer_text != '' ) {
565
+ aioseop_show_pointer( index, value );
566
+ }
567
+ }
568
+ );
569
+ }
570
+
571
+ /**
572
+ * @since 1.0.0
573
+ * @param $e.
574
+ * @return boolean.
575
+ */
576
+ jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" )
577
+ .delegate(
578
+ "input[name='Submit']", "click", function( e ) {
579
+ e.preventDefault();
580
+ return false;
581
+ }
582
+ );
583
+
584
+ /**
585
+ * @since 1.0.0
586
+ * @param $e.
587
+ * @return boolean.
588
+ */
589
+ jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-modules-aioseop_feature_manager #aiosp_settings_form" )
590
+ .delegate(
591
+ "input[name='Submit']", "click", function( e ) {
592
+ e.preventDefault();
593
+ aioseop_handle_post_url(
594
+ 'aioseop_ajax_save_settings',
595
+ 'ajax_settings_message',
596
+ jQuery( 'form#aiosp_settings_form' ).serialize(),
597
+ function() {
598
+ jQuery( '.wp-has-current-submenu' ).fadeIn(
599
+ 'fast', function() {
600
+ aioseop_handle_ajax_call(
601
+ 'aioseop_ajax_get_menu_links',
602
+ 'ajax_settings_message',
603
+ jQuery.param( {target: '.wp-has-current-submenu > ul'} )
604
+ );
605
+ }
606
+ );
607
+ }
608
+ );
609
+ return false;
610
+ }
611
+ );
612
+
613
+ /**
614
+ * @since 1.0.0
615
+ * @param $e.
616
+ * @return boolean.
617
+ */
618
+ jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left" )
619
+ .delegate(
620
+ "input[name='Submit']", "click", function( e ) {
621
+ e.preventDefault();
622
+ return false;
623
+ }
624
+ );
625
+
626
+ /**
627
+ * @since 1.0.0
628
+ * @param $e.
629
+ * @return boolean.
630
+ */
631
+ jQuery( ".all-in-one-seo_page_all-in-one-seo-pack-pro-modules-aioseop_feature_manager #aiosp_settings_form" )
632
+ .delegate(
633
+ "input[name='Submit']", "click", function( e ) {
634
+ e.preventDefault();
635
+ aioseop_handle_post_url(
636
+ 'aioseop_ajax_save_settings',
637
+ 'ajax_settings_message',
638
+ jQuery( 'form#aiosp_settings_form' ).serialize(),
639
+ function() {
640
+ jQuery( '.wp-has-current-submenu' ).fadeIn(
641
+ 'fast', function() {
642
+ aioseop_handle_ajax_call(
643
+ 'aioseop_ajax_get_menu_links',
644
+ 'ajax_settings_message',
645
+ jQuery.param( {target: '.wp-has-current-submenu > ul'} )
646
+ );
647
+ }
648
+ );
649
+ }
650
+ );
651
+ return false;
652
+ }
653
+ );
654
+
655
+ var selectors =
656
+ "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div";
657
+
658
+ /**
659
+ * @since 1.0.0
660
+ * @return boolean.
661
+ */
662
+ jQuery( "div#aiosp_sitemap_addl_pages_metabox" )
663
+ .delegate(
664
+ "input[name='Submit']", "click", function() {
665
+ aioseop_handle_post_url(
666
+ 'aioseop_ajax_save_url',
667
+ 'sitemap_addl_pages',
668
+ jQuery( 'div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select' )
669
+ .serialize()
670
+ );
671
+ return false;
672
+ }
673
+ );
674
+
675
+ /**
676
+ * @since 1.0.0
677
+ * @return boolean.
678
+ */
679
+ jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" )
680
+ .delegate(
681
+ "input[name='Submit']", "click", function() {
682
+ aioseop_handle_post_url(
683
+ 'aioseop_ajax_save_url',
684
+ 'video_sitemap_addl_pages',
685
+ jQuery( 'div#aiosp_video_sitemap_addl_pages_metabox input, div#aiosp_video_sitemap_addl_pages_metabox select' )
686
+ .serialize()
687
+ );
688
+ return false;
689
+ }
690
+ );
691
+
692
+ /**
693
+ * @since 1.0.0
694
+ * @param $e.
695
+ * @return boolean.
696
+ */
697
+ jQuery( "div#aiosp_sitemap_addl_pages_metabox" )
698
+ .delegate(
699
+ "a.aiosp_delete_url", "click", function( e ) {
700
+ e.preventDefault();
701
+ aioseop_handle_post_url(
702
+ 'aioseop_ajax_delete_url',
703
+ 'sitemap_addl_pages',
704
+ jQuery( this ).attr( "title" )
705
+ );
706
+ return false;
707
+ }
708
+ );
709
+
710
+ /**
711
+ * @since 1.0.0
712
+ * @param $e.
713
+ * @return boolean.
714
+ */
715
+ jQuery( "div#aiosp_video_sitemap_addl_pages_metabox" )
716
+ .delegate(
717
+ "a.aiosp_delete_url", "click", function( e ) {
718
+ e.preventDefault();
719
+ aioseop_handle_post_url(
720
+ 'aioseop_ajax_delete_url',
721
+ 'video_sitemap_addl_pages',
722
+ jQuery( this ).attr( "title" )
723
+ );
724
+ return false;
725
+ }
726
+ );
727
+
728
+ /**
729
+ * @since 1.0.0
730
+ * @param $e.
731
+ * @return boolean.
732
+ */
733
+ jQuery( "div#aiosp_opengraph_scan_header" )
734
+ .delegate(
735
+ "input[name='aiosp_opengraph_scan_header']", "click", function( e ) {
736
+ e.preventDefault();
737
+ aioseop_handle_post_url(
738
+ 'aioseop_ajax_scan_header',
739
+ 'opengraph_scan_header',
740
+ jQuery( 'div#aiosp_opengraph_scan_header' ).serialize()
741
+ );
742
+ return false;
743
+ }
744
+ );
745
+
746
+ /**
747
+ * @since 1.0.0
748
+ */
749
+ jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value="all"], input[name="aiosp_video_sitemap_posttypes[]"][value="all"], input[name="aiosp_sitemap_taxonomies[]"][value="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value="all"]' )
750
+ .click(
751
+ function() {
752
+ jQuery( this )
753
+ .parents( 'div:eq(0)' )
754
+ .find( ':checkbox' )
755
+ .prop( 'checked', this.checked );
756
+ }
757
+ );
758
+
759
+ /**
760
+ * @since 1.0.0
761
+ */
762
+ jQuery( 'input[name="aiosp_sitemap_posttypes[]"][value!="all"], input[name="aiosp_video_sitemap_posttypes[]"][value!="all"], input[name="aiosp_sitemap_taxonomies[]"][value!="all"], input[name="aiosp_video_sitemap_taxonomies[]"][value!="all"]' )
763
+ .click(
764
+ function () {
765
+ if ( ! this.checked ) {
766
+ jQuery( this )
767
+ .parents( 'div:eq(0)' )
768
+ .find( 'input[value="all"]:checkbox' )
769
+ .prop( 'checked', this.checked );
770
+ }
771
+ }
772
+ );
773
+
774
+ /**
775
+ * @since 1.0.0
776
+ */
777
+ jQuery( ".aioseop_tab:not(:first)" ).hide();
778
+
779
+ /**
780
+ * @since 1.0.0
781
+ */
782
+ jQuery( ".aioseop_tab:first" ).show();
783
+
784
+ /**
785
+ * @since 1.0.0
786
+ * @return boolean.
787
+ */
788
+ jQuery( "a.aioseop_header_tab" ).click(
789
+ function() {
790
+ var stringref = jQuery( this ).attr( "href" ).split( '#' )[1];
791
+ jQuery( '.aioseop_tab:not(#' + stringref + ')' ).hide( 'slow' );
792
+ jQuery( '.aioseop_tab#' + stringref ).show( 'slow' );
793
+ jQuery( '.aioseop_header_tab[href!="#' + stringref + '"]' ).removeClass( 'active' );
794
+ jQuery( '.aioseop_header_tab[href="#' + stringref + '"]' ).addClass( 'active' );
795
+ return false;
796
+ }
797
+ );
798
+ }
799
+ );
800
+
801
+
802
+ jQuery( document ).ready(
803
+ function() {
804
+ // TODO: consider moving EVERYTHING that needs ready() to this function
805
+ initAll( jQuery );
806
+ }
807
+ );
808
+
809
+ function initAll($){
810
+ if ( $( '.aiseop-date' ).length > 0 && $( '.aiseop-date' ).eq( 0 ).prop( 'type' ).toLowerCase() === 'text' ) {
811
+ $( '.aiseop-date' ).datepicker(
812
+ {
813
+ dateFormat: "yy-mm-dd"
814
+ }
815
+ );
816
+ }
817
+ }
js/quickedit_functions.js CHANGED
@@ -5,9 +5,9 @@ jQuery(document).on( 'click', '.visibility-notice', function() {
5
  data: {
6
  action: 'aioseo_dismiss_visibility_notice'
7
  }
8
- })
9
 
10
- })
11
 
12
  jQuery(document).on( 'click', '.yst_notice', function() {
13
 
@@ -16,9 +16,9 @@ jQuery(document).on( 'click', '.yst_notice', function() {
16
  data: {
17
  action: 'aioseo_dismiss_yst_notice'
18
  }
19
- })
20
 
21
- })
22
 
23
  jQuery(document).on( 'click', '.woo-upgrade-notice', function() {
24
 
@@ -27,9 +27,9 @@ jQuery(document).on( 'click', '.woo-upgrade-notice', function() {
27
  data: {
28
  action: 'aioseo_dismiss_woo_upgrade_notice'
29
  }
30
- })
31
 
32
- })
33
 
34
  jQuery(document).on( 'click', '.sitemap_max_urls_notice', function() {
35
 
@@ -38,9 +38,9 @@ jQuery(document).on( 'click', '.sitemap_max_urls_notice', function() {
38
  data: {
39
  action: 'aioseo_dismiss_sitemap_max_url_notice'
40
  }
41
- })
42
 
43
- })
44
 
45
 
46
  function aioseop_ajax_edit_meta_form( post_id, meta, nonce ) {
@@ -84,9 +84,9 @@ function handle_post_meta( p, t, m, n ) {
84
  aioseop_sack.setVar( "_nonce", n );
85
  aioseop_sack.onError = function() {alert('Ajax error on saving title'); };
86
  aioseop_sack.runAJAX();
87
- })
88
  jQuery("div#aioseop_"+m+"_"+p).html(loading);
89
  jQuery("div#aioseop_"+m+"_"+p).attr( "class", "aioseop_mpc_admin_meta_options" );
90
 
91
- })
92
  }
5
  data: {
6
  action: 'aioseo_dismiss_visibility_notice'
7
  }
8
+ });
9
 
10
+ });
11
 
12
  jQuery(document).on( 'click', '.yst_notice', function() {
13
 
16
  data: {
17
  action: 'aioseo_dismiss_yst_notice'
18
  }
19
+ });
20
 
21
+ });
22
 
23
  jQuery(document).on( 'click', '.woo-upgrade-notice', function() {
24
 
27
  data: {
28
  action: 'aioseo_dismiss_woo_upgrade_notice'
29
  }
30
+ });
31
 
32
+ });
33
 
34
  jQuery(document).on( 'click', '.sitemap_max_urls_notice', function() {
35
 
38
  data: {
39
  action: 'aioseo_dismiss_sitemap_max_url_notice'
40
  }
41
+ });
42
 
43
+ });
44
 
45
 
46
  function aioseop_ajax_edit_meta_form( post_id, meta, nonce ) {
84
  aioseop_sack.setVar( "_nonce", n );
85
  aioseop_sack.onError = function() {alert('Ajax error on saving title'); };
86
  aioseop_sack.runAJAX();
87
+ });
88
  jQuery("div#aioseop_"+m+"_"+p).html(loading);
89
  jQuery("div#aioseop_"+m+"_"+p).attr( "class", "aioseop_mpc_admin_meta_options" );
90
 
91
+ });
92
  }
js/welcome.js CHANGED
@@ -1,32 +1,32 @@
1
  (function($) {
2
 
3
- $(document).on( 'click', '.nav-tab-wrapper a', function() {
4
- $('section').hide();
5
- $('section').eq($(this).index()).show();
6
-
7
-
8
- //alert($('section'));
9
- if($(this).attr('className') == 'nav-tab-active') {
10
- // $(this).removeClass('nav-tab-active');
11
- // $(this).addClass('nav-tab-active');
12
- }else{
13
- // $(this).addClass('nav-tab-active');
14
- // $(this).removeClass('nav-tab-active');
15
- }
16
- // $(this).addClass('nav-tab-active');
17
- // $(this).eq($(this).index()).removeClass('nav-tab-active');
18
- //$(this).removeClass('nav-tab-active');
19
- return false;
20
- })
21
-
22
- $("a.nav-tab").click(function() {
23
-
24
- $("a.nav-tab").removeClass('nav-tab-active');
25
- $(this).addClass('nav-tab-active');
26
-
27
- });
28
-
29
-
30
-
31
 
32
  })( jQuery );
1
  (function($) {
2
 
3
+ $( document ).on(
4
+ 'click', '.nav-tab-wrapper a', function() {
5
+ $( 'section' ).hide();
6
+ $( 'section' ).eq( $( this ).index() ).show();
7
+
8
+ // alert($('section'));
9
+ if ($( this ).attr( 'className' ) == 'nav-tab-active') {
10
+ // $(this).removeClass('nav-tab-active');
11
+ // $(this).addClass('nav-tab-active');
12
+ } else {
13
+ // $(this).addClass('nav-tab-active');
14
+ // $(this).removeClass('nav-tab-active');
15
+ }
16
+ // $(this).addClass('nav-tab-active');
17
+ // $(this).eq($(this).index()).removeClass('nav-tab-active');
18
+ // $(this).removeClass('nav-tab-active');
19
+ return false;
20
+ }
21
+ );
22
+
23
+ $( "a.nav-tab" ).click(
24
+ function() {
25
+
26
+ $( "a.nav-tab" ).removeClass( 'nav-tab-active' );
27
+ $( this ).addClass( 'nav-tab-active' );
28
+
29
+ }
30
+ );
31
 
32
  })( jQuery );
modules/aioseop_bad_robots.php CHANGED
@@ -90,13 +90,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
90
  status_header( 503 );
91
  $ip = $this->validate_ip( $_SERVER['REMOTE_ADDR'] );
92
  $user_agent = $_SERVER['HTTP_USER_AGENT'];
93
- $this->blocked_message( sprintf( __( 'Blocked bot with IP %s -- matched user agent %s found in blocklist.', 'all-in-one-seo-pack' ), $ip, $user_agent ) );
94
  exit();
95
  } elseif ( $this->option_isset( 'block_refer' ) && $this->is_bad_referer() ) {
96
  status_header( 503 );
97
  $ip = $this->validate_ip( $_SERVER['REMOTE_ADDR'] );
98
  $referer = $_SERVER['HTTP_REFERER'];
99
- $this->blocked_message( sprintf( __( 'Blocked bot with IP %s -- matched referer %s found in blocklist.', 'all-in-one-seo-pack' ), $ip, $referer ) );
100
  }
101
  }
102
  }
@@ -134,7 +134,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
134
  */
135
  function filter_bad_referlist( $referlist ) {
136
  if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'block_refer' ) && $this->option_isset( 'referlist' ) ) {
137
- $referlist = preg_split('/\r\n|[\r\n]/', $this->options["{$this->prefix}referlist"] );
138
  }
139
 
140
  return $referlist;
@@ -147,7 +147,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
147
  */
148
  function filter_bad_botlist( $botlist ) {
149
  if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'blocklist' ) ) {
150
- $botlist = preg_split('/\r\n|[\r\n]/', $this->options["{$this->prefix}blocklist"] );
151
  }
152
 
153
  return $botlist;
@@ -165,16 +165,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
165
  return; // Only log if track blocks is checked.
166
  }
167
 
168
- if ( empty( $this->options["{$this->prefix}blocked_log"] ) ) {
169
- $this->options["{$this->prefix}blocked_log"] = '';
170
  }
171
- $this->options["{$this->prefix}blocked_log"] = date( 'Y-m-d H:i:s' ) . " {$msg}\n" . $this->options["{$this->prefix}blocked_log"];
172
- if ( $this->strlen( $this->options["{$this->prefix}blocked_log"] ) > 4096 ) {
173
- $end = $this->strrpos( $this->options["{$this->prefix}blocked_log"], "\n" );
174
  if ( false === $end ) {
175
  $end = 4096;
176
  }
177
- $this->options["{$this->prefix}blocked_log"] = $this->substr( $this->options["{$this->prefix}blocked_log"], 0, $end );
178
  }
179
  $this->update_class_option( $this->options );
180
  }
@@ -192,8 +192,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
192
  function filter_display_options( $options ) {
193
 
194
  if ( $this->option_isset( 'blocked_log' ) ) {
195
- if ( preg_match( '/\<(\?php|script)/', $options["{$this->prefix}blocked_log"] ) ) {
196
- $options["{$this->prefix}blocked_log"] = "Probable XSS attempt detected!\n" . $options["{$this->prefix}blocked_log"];
197
  }
198
  }
199
 
90
  status_header( 503 );
91
  $ip = $this->validate_ip( $_SERVER['REMOTE_ADDR'] );
92
  $user_agent = $_SERVER['HTTP_USER_AGENT'];
93
+ $this->blocked_message( sprintf( __( 'Blocked bot with IP %1$s -- matched user agent %2$s found in blocklist.', 'all-in-one-seo-pack' ), $ip, $user_agent ) );
94
  exit();
95
  } elseif ( $this->option_isset( 'block_refer' ) && $this->is_bad_referer() ) {
96
  status_header( 503 );
97
  $ip = $this->validate_ip( $_SERVER['REMOTE_ADDR'] );
98
  $referer = $_SERVER['HTTP_REFERER'];
99
+ $this->blocked_message( sprintf( __( 'Blocked bot with IP %1$s -- matched referer %2$s found in blocklist.', 'all-in-one-seo-pack' ), $ip, $referer ) );
100
  }
101
  }
102
  }
134
  */
135
  function filter_bad_referlist( $referlist ) {
136
  if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'block_refer' ) && $this->option_isset( 'referlist' ) ) {
137
+ $referlist = preg_split( '/\r\n|[\r\n]/', $this->options[ "{$this->prefix}referlist" ] );
138
  }
139
 
140
  return $referlist;
147
  */
148
  function filter_bad_botlist( $botlist ) {
149
  if ( $this->option_isset( 'edit_blocks' ) && $this->option_isset( 'blocklist' ) ) {
150
+ $botlist = preg_split( '/\r\n|[\r\n]/', $this->options[ "{$this->prefix}blocklist" ] );
151
  }
152
 
153
  return $botlist;
165
  return; // Only log if track blocks is checked.
166
  }
167
 
168
+ if ( empty( $this->options[ "{$this->prefix}blocked_log" ] ) ) {
169
+ $this->options[ "{$this->prefix}blocked_log" ] = '';
170
  }
171
+ $this->options[ "{$this->prefix}blocked_log" ] = date( 'Y-m-d H:i:s' ) . " {$msg}\n" . $this->options[ "{$this->prefix}blocked_log" ];
172
+ if ( $this->strlen( $this->options[ "{$this->prefix}blocked_log" ] ) > 4096 ) {
173
+ $end = $this->strrpos( $this->options[ "{$this->prefix}blocked_log" ], "\n" );
174
  if ( false === $end ) {
175
  $end = 4096;
176
  }
177
+ $this->options[ "{$this->prefix}blocked_log" ] = $this->substr( $this->options[ "{$this->prefix}blocked_log" ], 0, $end );
178
  }
179
  $this->update_class_option( $this->options );
180
  }
192
  function filter_display_options( $options ) {
193
 
194
  if ( $this->option_isset( 'blocked_log' ) ) {
195
+ if ( preg_match( '/\<(\?php|script)/', $options[ "{$this->prefix}blocked_log" ] ) ) {
196
+ $options[ "{$this->prefix}blocked_log" ] = "Probable XSS attempt detected!\n" . $options[ "{$this->prefix}blocked_log" ];
197
  }
198
  }
199
 
modules/aioseop_feature_manager.php CHANGED
@@ -85,7 +85,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
85
  // Default - Default value of the field.
86
  // Initial_options - Initial option list used for selects and multiselects.
87
  // Other supported options: class, id, style -- allows you to set these HTML attributes on the field.
88
-
89
  $this->default_options = array();
90
  $this->module_info = apply_filters( 'aioseop_module_info', $this->module_info );
91
  $mod[] = 'coming_soon';
@@ -94,7 +93,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
94
  if ( 'performance' === $m && ! is_super_admin() ) {
95
  continue;
96
  }
97
- $this->default_options["enable_$m"] = array(
98
  'name' => $this->module_info[ $m ]['name'],
99
  'help_text' => $this->module_info[ $m ]['description'],
100
  'type' => 'custom',
@@ -104,12 +103,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
104
  );
105
 
106
  if ( ! empty( $this->module_info[ $m ]['image'] ) ) {
107
- $this->default_options["enable_$m"]['image'] = $this->module_info[ $m ]['image'];
108
  }
109
  if ( ! empty( $this->module_info[ $m ] ) ) {
110
  foreach ( array( 'save', 'default' ) as $option ) {
111
  if ( isset( $this->module_info[ $m ][ $option ] ) ) {
112
- $this->default_options["enable_$m"][ $option ] = $this->module_info[ $m ][ $option ];
113
  }
114
  }
115
  }
85
  // Default - Default value of the field.
86
  // Initial_options - Initial option list used for selects and multiselects.
87
  // Other supported options: class, id, style -- allows you to set these HTML attributes on the field.
 
88
  $this->default_options = array();
89
  $this->module_info = apply_filters( 'aioseop_module_info', $this->module_info );
90
  $mod[] = 'coming_soon';
93
  if ( 'performance' === $m && ! is_super_admin() ) {
94
  continue;
95
  }
96
+ $this->default_options[ "enable_$m" ] = array(
97
  'name' => $this->module_info[ $m ]['name'],
98
  'help_text' => $this->module_info[ $m ]['description'],
99
  'type' => 'custom',
103
  );
104
 
105
  if ( ! empty( $this->module_info[ $m ]['image'] ) ) {
106
+ $this->default_options[ "enable_$m" ]['image'] = $this->module_info[ $m ]['image'];
107
  }
108
  if ( ! empty( $this->module_info[ $m ] ) ) {
109
  foreach ( array( 'save', 'default' ) as $option ) {
110
  if ( isset( $this->module_info[ $m ][ $option ] ) ) {
111
+ $this->default_options[ "enable_$m" ][ $option ] = $this->module_info[ $m ][ $option ];
112
  }
113
  }
114
  }
modules/aioseop_importer_exporter.php CHANGED
@@ -1,575 +1,576 @@
1
- <?php
2
-
3
- if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
4
-
5
-
6
- /**
7
- * Class All_in_One_SEO_Pack_Importer_Exporter
8
- */
9
- class All_in_One_SEO_Pack_Importer_Exporter extends All_in_One_SEO_Pack_Module {
10
-
11
-
12
- /**
13
- * All_in_One_SEO_Pack_Importer_Exporter constructor.
14
- */
15
- function __construct() {
16
- $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module
17
- $this->prefix = 'aiosp_importer_exporter_'; // option prefix
18
- $this->file = __FILE__;
19
- parent::__construct();
20
- $help_text = Array(
21
- 'import_submit' => __(
22
- "Select a valid All in One SEO Pack ini file and click 'Import' to import options from a previous state or install of All in One SEO Pack.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
23
- 'all-in-one-seo-pack'
24
- ),
25
- 'export_choices' => __(
26
- "You may choose to export settings from active modules, and content from post data.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
27
- 'all-in-one-seo-pack'
28
- ),
29
- 'export_post_types' => __(
30
- "Select which Post Types you want to export your All in One SEO Pack meta data for.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
31
- 'all-in-one-seo-pack'
32
- ),
33
- );
34
- $this->warnings = Array();
35
- $this->default_options = array(
36
- 'import_submit' => Array(
37
- 'name' => __( 'Import', 'all-in-one-seo-pack' ),
38
- 'default' => '',
39
- 'type' => 'file',
40
- 'save' => false,
41
- ),
42
- 'export_choices' => Array(
43
- 'name' => __( 'Export Settings', 'all-in-one-seo-pack' ),
44
- 'type' => 'multicheckbox',
45
- 'initial_options' => Array(
46
- 1 => __( 'General Settings', 'all-in-one-seo-pack' ),
47
- + 2 => __( 'Post Data', 'all-in-one-seo-pack' ),
48
- ),
49
- ),
50
- 'export_post_types' => Array(
51
- 'name' => __( 'Export Post Types:', 'all-in-one-seo-pack' ),
52
- 'default' => Array(
53
- 'post' => 'post',
54
- 'page' => 'page',
55
- ),
56
- 'type' => 'multicheckbox',
57
- 'initial_options' => $this->get_post_type_titles(
58
- Array( '_builtin' => false )
59
- ),
60
- ),
61
- 'import_export_help' => Array(
62
- 'type' => 'html',
63
- 'label' => 'none',
64
- 'default' => __(
65
- 'Note: If General Settings is checked, the
66
- General Settings, the Feature Manager settings,
67
- and the following currently active modules will
68
- have their settings data exported:',
69
- 'all-in-one-seo-pack'
70
- ) . '<br />',
71
- ),
72
- );
73
- if ( ! empty( $help_text ) ) {
74
- foreach ( $help_text as $k => $v ) {
75
- $this->default_options[ $k ]['help_text'] = $v;
76
- }
77
- }
78
- $this->layout = Array(
79
- 'default' => Array(
80
- 'name' => $this->name,
81
- 'help_link' => 'https://semperplugins.com/documentation/importer-exporter-module/',
82
- 'options' => array_keys( $this->default_options ),
83
- ),
84
- );
85
-
86
- // load initial options / set defaults
87
- add_action( 'admin_init', Array( $this, 'debug_post_types' ), 5 );
88
- }
89
-
90
-
91
- function settings_page_init() {
92
- add_filter(
93
- $this->prefix . 'submit_options',
94
- Array( $this, 'filter_submit' )
95
- );
96
- }
97
-
98
-
99
- /**
100
- * @param $submit
101
- *
102
- * @return array
103
- */
104
- function filter_submit( $submit ) {
105
- $submit['Submit']['value'] = __(
106
- 'Import',
107
- 'all-in-one-seo-pack'
108
- )
109
- . ' &raquo;';
110
-
111
- return Array(
112
- 'export_submit' => Array(
113
- 'type' => 'submit',
114
- 'class' => 'button-primary',
115
- 'value' => __( 'Export', 'all-in-one-seo-pack' ) . ' &raquo;',
116
- ),
117
- ) + $submit;
118
- }
119
-
120
-
121
- function debug_post_types() {
122
- $post_types = $this->get_post_type_titles();
123
- $rempost = array(
124
- 'customize_changeset' => 1,
125
- 'custom_css' => 1,
126
- 'revision' => 1,
127
- 'nav_menu_item' => 1,
128
- );
129
- $this->default_options['export_post_types']['initial_options'] = array_diff_key(
130
- $post_types,
131
- $rempost
132
- );
133
- global $aioseop_modules;
134
- if ( ! empty( $aioseop_modules ) ) {
135
- $modules = $aioseop_modules->get_loaded_module_list();
136
- if ( ! empty( $modules ) && ! empty( $modules['feature_manager'] ) ) {
137
- unset( $modules['feature_manager'] );
138
- }
139
- if ( ! empty( $modules ) ) {
140
- $this->default_options['import_export_help']['default'] .= "<ul>\n";
141
- foreach ( $modules as $m ) {
142
- $module = $aioseop_modules->return_module( $m );
143
- $this->default_options['import_export_help']['default'] .=
144
- "\t<li>" . $module->name . "</li>\n";
145
- }
146
- $this->default_options['import_export_help']['default'] .= "\n</ul>\n";
147
- } else {
148
- $this->default_options['import_export_help']['default'] .= '<br />'
149
- . __(
150
- 'There are no other modules currently loaded!',
151
- 'all-in-one-seo-pack'
152
- );
153
- }
154
- }
155
- $this->default_options['import_export_help']['default'] .= '<br />'
156
- . __(
157
- 'You may change this by activating or deactivating
158
- modules in the Feature Manager.',
159
- 'all-in-one-seo-pack'
160
- );
161
- $this->update_options();
162
- if ( ! empty( $_REQUEST['export_submit'] ) ) {
163
- $this->do_importer_exporter();
164
- } else {
165
- add_action(
166
- $this->prefix . 'settings_update',
167
- Array( $this, 'do_importer_exporter' )
168
- );
169
- }
170
- }
171
-
172
-
173
- /**
174
- * @param $args
175
- *
176
- * @return string
177
- */
178
- function importer_exporter_export( $args ) {
179
-
180
- // Adds all settings to settings file
181
- $name = $this->get_option_name();
182
- $buf = '[' . $this->get_option_name() . "]\n";
183
- if ( ! empty( $this->options ) ) {
184
- foreach ( $this->options as $key => $value ) {
185
- $buf .= "$key = '" . str_replace(
186
- "'",
187
- "\'",
188
- trim( serialize( $value ) )
189
- ) . "'\n";
190
- }
191
- }
192
-
193
- return $buf;
194
- }
195
-
196
-
197
- function show_import_warnings() {
198
-
199
- echo '<div class="error fade" style="width:52%">';
200
-
201
- if ( is_array( $this->warnings ) ) {
202
- foreach ( $this->warnings as $warning ) {
203
- echo "<p>" . wp_kses( wp_unslash( $warning ), 'b, strong, i, em' ) . "</p>";
204
- }
205
- }
206
- echo '</div>';
207
- }
208
-
209
-
210
- /**
211
- * @param $array
212
- *
213
- * @return array
214
- */
215
- function parse_ini_helper( $array ) {
216
- $returnArray = array();
217
- if ( is_array( $array ) ) {
218
- foreach ( $array as $key => $value ) {
219
- $e = explode( ':', $key );
220
- if ( ! empty( $e[1] ) ) {
221
- $x = array();
222
- foreach ( $e as $tk => $tv ) {
223
- $x[ $tk ] = trim( $tv );
224
- }
225
- $x = array_reverse( $x, true );
226
- foreach ( $x as $k => $v ) {
227
- $c = $x[0];
228
- if ( empty( $returnArray[ $c ] ) ) {
229
- $returnArray[ $c ] = array();
230
- }
231
- if ( isset( $returnArray[ $x[1] ] ) ) {
232
- $returnArray[ $c ] = array_merge(
233
- $returnArray[ $c ], $returnArray[ $x[1] ]
234
- );
235
- }
236
- if ( $k === 0 ) {
237
- $returnArray[ $c ] = array_merge(
238
- $returnArray[ $c ], $array[ $key ]
239
- );
240
- }
241
- }
242
- } else {
243
- $returnArray[ $key ] = $array[ $key ];
244
- }
245
- }
246
- }
247
-
248
- return $returnArray;
249
- }
250
-
251
-
252
- /**
253
- * @param $array
254
- *
255
- * @return array
256
- */
257
- function recursive_parse( $array ) {
258
- $returnArray = array();
259
- if ( is_array( $array ) ) {
260
- foreach ( $array as $key => $value ) {
261
- if ( is_array( $value ) ) {
262
- $array[ $key ] = $this->recursive_parse( $value );
263
- }
264
- $x = explode( '.', $key );
265
- if ( ! empty( $x[1] ) ) {
266
- $x = array_reverse( $x, true );
267
- if ( isset( $returnArray[ $key ] ) ) {
268
- unset( $returnArray[ $key ] );
269
- }
270
- if ( ! isset( $returnArray[ $x[0] ] ) ) {
271
- $returnArray[ $x[0] ] = array();
272
- }
273
- $first = true;
274
- foreach ( $x as $k => $v ) {
275
- if ( $first === true ) {
276
- $b = $array[ $key ];
277
- $first = false;
278
- }
279
- $b = array( $v => $b );
280
- }
281
- $returnArray[ $x[0] ] = array_merge_recursive(
282
- $returnArray[ $x[0] ], $b[ $x[0] ]
283
- );
284
- } else {
285
- $returnArray[ $key ] = $array[ $key ];
286
- }
287
- }
288
- }
289
-
290
- return $returnArray;
291
- }
292
-
293
-
294
- /**
295
- * @param $assoc_arr
296
- * @param bool $has_sections
297
- *
298
- * @return string
299
- */
300
- function get_ini_file( $assoc_arr, $has_sections = true ) {
301
- $content = '';
302
- if ( $has_sections ) {
303
- foreach ( $assoc_arr as $key => $elem ) {
304
- $content .= '[' . $key . "]\n";
305
- foreach ( $elem as $key2 => $elem2 ) {
306
- if ( is_array( $elem2 ) ) {
307
- for ( $i = 0; $i < count( $elem2 ); $i ++ ) {
308
- $content .= $key2 . "[] = \"" . $elem2[ $i ] . "\"\n";
309
- }
310
- } else if ( $elem2 == '' ) {
311
- $content .= $key2 . " = \n";
312
- } else {
313
- $content .= $key2 . " = \"" . $elem2 . "\"\n";
314
- }
315
- }
316
- }
317
- } else {
318
- foreach ( $assoc_arr as $key => $elem ) {
319
- if ( is_array( $elem ) ) {
320
- for ( $i = 0; $i < count( $elem ); $i ++ ) {
321
- $content .= $key2 . "[] = \"" . $elem[ $i ] . "\"\n";
322
- }
323
- } else if ( $elem == '' ) {
324
- $content .= $key2 . " = \n";
325
- } else {
326
- $content .= $key2 . " = \"" . $elem . "\"\n";
327
- }
328
- }
329
- }
330
-
331
- return $content;
332
- }
333
-
334
-
335
- /**
336
- * @param $string
337
- *
338
- * @return array
339
- */
340
- function parse_ini_advanced( $string ) {
341
- return $this->recursive_parse(
342
- $this->parse_ini_helper(
343
- parse_ini_string( $string, true )
344
- )
345
- );
346
- }
347
-
348
-
349
- function do_importer_exporter() {
350
- $submit = null;
351
- $count = 0;
352
- $post_exists = null;
353
- $post_warning = null;
354
- global $aioseop_options, $aiosp, $aioseop_module_list;
355
- if ( isset( $_REQUEST['nonce-aioseop'] ) ) {
356
- $nonce = $_REQUEST['nonce-aioseop'];
357
- }
358
- $post_fields = Array(
359
- 'keywords',
360
- 'description',
361
- 'title',
362
- 'meta',
363
- 'disable',
364
- 'disable',
365
- 'disable_analytics',
366
- 'togglekeywords',
367
- );
368
- if ( ! empty( $_FILES['aiosp_importer_exporter_import_submit']['tmp_name'] ) ) {
369
- $submit = 'Import';
370
- }
371
- if ( ! empty( $_REQUEST['export_submit'] ) ) {
372
- $submit = 'Export';
373
- }
374
- if ( ( $submit != null ) && wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
375
- switch ( $submit ) {
376
- case 'Import':
377
- try {
378
- // Parses export file
379
- $file = $this->get_sanitized_file(
380
- $_FILES['aiosp_importer_exporter_import_submit']['tmp_name']
381
- );
382
- $section = Array();
383
- $section_label = null;
384
- foreach ( $file as $line_number => $line ) {
385
- $line = trim( $line );
386
- $matches = Array();
387
- if ( empty( $line ) ) {
388
- continue;
389
- }
390
- if ( $line[0] == ';' ) {
391
- continue;
392
- }
393
- if ( preg_match( "/^\[(\S+)\]$/", $line, $label ) ) {
394
- $section_label = strval( $label[1] );
395
- if ( $section_label == 'post_data' ) {
396
- $count ++;
397
- }
398
- if ( ! isset( $section[ $section_label ] ) ) {
399
- $section[ $section_label ] = Array();
400
- }
401
- } elseif ( preg_match( "/^(\S+)\s*=\s*'(.*)'$/", $line, $matches ) ) {
402
- if ( $section_label == 'post_data' ) {
403
- $section[ $section_label ][ $count ][ $matches[1] ] = $matches[2];
404
- } else {
405
- $section[ $section_label ][ $matches[1] ] = $matches[2];
406
- }
407
- } elseif ( preg_match( "/^(\S+)\s*=\s*NULL$/", $line, $matches ) ) {
408
- if ( $section_label == 'post_data' ) {
409
- $section[ $section_label ][ $count ][ $matches[1] ] = null;
410
- } else {
411
- $section[ $section_label ][ $matches[1] ] = null;
412
- }
413
- } else {
414
- $this->warnings[] = sprintf(
415
- __(
416
- '<b>Warning:</b> Line not matched: <b>"%s"</b>, On Line: <b>%s</b>',
417
- 'all-in-one-seo-pack'
418
- ),
419
- $line,
420
- $line_number
421
- );
422
- }
423
- }
424
-
425
- // Updates Plugin Settings
426
- if ( is_array( $section ) ) {
427
- foreach ( $section as $label => $module_options ) {
428
- if ( is_array( $module_options ) ) {
429
- foreach ( $module_options as $key => $value ) {
430
-
431
- // Updates Post Data
432
- if ( $label == 'post_data' ) {
433
- $post_exists = post_exists(
434
- $module_options[ $key ]['post_title'],
435
- '',
436
- $module_options[ $key ]['post_date']
437
- );
438
- $target = get_post( $post_exists );
439
- if ( ( ! empty( $module_options[ $key ]['post_type'] ) )
440
- && $post_exists != null
441
- ) {
442
- if ( is_array( $value ) ) {
443
- foreach ( $value as $field_name => $field_value ) {
444
- if ( substr( $field_name, 1, 7 ) == 'aioseop' ) {
445
- if ( $value ) {
446
- update_post_meta(
447
- $target->ID,
448
- $field_name,
449
- maybe_unserialize( $field_value )
450
- );
451
- } else {
452
- delete_post_meta(
453
- $target->ID,
454
- $field_name
455
- );
456
- }
457
- }
458
- }
459
- }
460
- $post_exists = null;
461
- } else {
462
- $target_title = $module_options[ $key ]['post_title'];
463
- $post_warning = sprintf(
464
- __(
465
- '<b>Warning:</b> This following post could not be found: <b>"%s"</b>',
466
- 'all-in-one-seo-pack'
467
- ),
468
- $target_title
469
- );
470
- }
471
- if ( $post_warning != null ) {
472
- $this->warnings[] = $post_warning;
473
- $post_warning = null;
474
- }
475
-
476
- // Updates Module Settings
477
- } else {
478
- $module_options[ $key ] = str_replace(
479
- Array( "\'", '\n', '\r' ),
480
- Array( "'", "\n", "\r" ),
481
- maybe_unserialize( $value )
482
- );
483
- }
484
- }
485
-
486
- // Updates Module Settings
487
- $this->update_class_option(
488
- $module_options,
489
- $label
490
- );
491
- }
492
- }
493
- }
494
- } catch ( Exception $e ) {
495
- // Shows only one warning when compromised file is imported
496
- $this->warnings = array();
497
- $this->warnings[] = $e->getMessage();
498
- add_action(
499
- $this->prefix . 'settings_header_errors',
500
- array( $this, 'show_import_warnings' )
501
- );
502
- break;
503
- }
504
-
505
- // Shows all errors found
506
- if ( ! empty( $this->warnings ) ) {
507
- add_action(
508
- $this->prefix . 'settings_header',
509
- Array( $this, 'show_import_warnings' ),
510
- 5
511
- );
512
- }
513
-
514
- break;
515
- case 'Export':
516
-
517
- // Creates Files Contents
518
- $settings_file = 'settings_aioseop.ini';
519
- $buf = '; ' . __(
520
- 'Settings export file for All in One SEO Pack', '
521
- all-in-one-seo-pack'
522
- ) . "\n";
523
-
524
- // Adds all settings to settings file
525
- $buf = $aiosp->settings_export( $buf );
526
- $buf = apply_filters( 'aioseop_export_settings', $buf );
527
-
528
- // Sends File to browser
529
- $strlength = strlen( $buf );
530
- header( 'Content-type: application/ini' );
531
- header( "Content-Disposition: attachment; filename=$settings_file" );
532
- header( 'Content-Length: ' . $strlength );
533
- echo $buf;
534
- die();
535
- break;
536
- }
537
- }
538
- }
539
-
540
-
541
- function settings_update() {
542
- }
543
-
544
- /**
545
- * Returns sanitized imported file.
546
- *
547
- * @since
548
- *
549
- * @param string $filename Path to where the uploaded file is located.
550
- *
551
- * @return array Sanitized file as array.
552
- * @throws Exception
553
- */
554
- private function get_sanitized_file( $filename ) {
555
- $file = file( $filename );
556
- for ( $i = count( $file ) - 1; $i >= 0; -- $i ) {
557
- // Remove insecured lines
558
- if ( preg_match( '/\<(\?php|script)/', $file[ $i ] ) ) {
559
- throw new Exception( __(
560
- '<b>Security warning:</b> Your file looks compromised. Please check the file for any script-injection.',
561
- 'all-in-one-seo-pack'
562
- ) );
563
- }
564
- // Apply security filters
565
- $file[ $i ] = strip_tags( trim( $file[ $i ] ) );
566
- // Remove empty lines
567
- if ( empty( $file[ $i ] ) ) {
568
- unset( $file[ $i ] );
569
- }
570
- }
571
-
572
- return $file;
573
- }
574
- }
575
- }
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
4
+
5
+
6
+ /**
7
+ * Class All_in_One_SEO_Pack_Importer_Exporter
8
+ */
9
+ class All_in_One_SEO_Pack_Importer_Exporter extends All_in_One_SEO_Pack_Module {
10
+
11
+
12
+ /**
13
+ * All_in_One_SEO_Pack_Importer_Exporter constructor.
14
+ */
15
+ function __construct() {
16
+ $this->name = __( 'Importer & Exporter', 'all-in-one-seo-pack' ); // Human-readable name of the module
17
+ $this->prefix = 'aiosp_importer_exporter_'; // option prefix
18
+ $this->file = __FILE__;
19
+ parent::__construct();
20
+ $help_text = array(
21
+ 'import_submit' => __(
22
+ "Select a valid All in One SEO Pack ini file and click 'Import' to import options from a previous state or install of All in One SEO Pack.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
23
+ 'all-in-one-seo-pack'
24
+ ),
25
+ 'export_choices' => __(
26
+ "You may choose to export settings from active modules, and content from post data.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
27
+ 'all-in-one-seo-pack'
28
+ ),
29
+ 'export_post_types' => __(
30
+ "Select which Post Types you want to export your All in One SEO Pack meta data for.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
31
+ 'all-in-one-seo-pack'
32
+ ),
33
+ );
34
+ $this->warnings = array();
35
+ $this->default_options = array(
36
+ 'import_submit' => array(
37
+ 'name' => __( 'Import', 'all-in-one-seo-pack' ),
38
+ 'default' => '',
39
+ 'type' => 'file',
40
+ 'save' => false,
41
+ ),
42
+ 'export_choices' => array(
43
+ 'name' => __( 'Export Settings', 'all-in-one-seo-pack' ),
44
+ 'type' => 'multicheckbox',
45
+ 'initial_options' => array(
46
+ 1 => __( 'General Settings', 'all-in-one-seo-pack' ),
47
+ + 2 => __( 'Post Data', 'all-in-one-seo-pack' ),
48
+ ),
49
+ ),
50
+ 'export_post_types' => array(
51
+ 'name' => __( 'Export Post Types:', 'all-in-one-seo-pack' ),
52
+ 'default' => array(
53
+ 'post' => 'post',
54
+ 'page' => 'page',
55
+ ),
56
+ 'type' => 'multicheckbox',
57
+ 'initial_options' => $this->get_post_type_titles(
58
+ array( '_builtin' => false )
59
+ ),
60
+ ),
61
+ 'import_export_help' => array(
62
+ 'type' => 'html',
63
+ 'label' => 'none',
64
+ 'default' => __(
65
+ 'Note: If General Settings is checked, the
66
+ General Settings, the Feature Manager settings,
67
+ and the following currently active modules will
68
+ have their settings data exported:',
69
+ 'all-in-one-seo-pack'
70
+ ) . '<br />',
71
+ ),
72
+ );
73
+ if ( ! empty( $help_text ) ) {
74
+ foreach ( $help_text as $k => $v ) {
75
+ $this->default_options[ $k ]['help_text'] = $v;
76
+ }
77
+ }
78
+ $this->layout = array(
79
+ 'default' => array(
80
+ 'name' => $this->name,
81
+ 'help_link' => 'https://semperplugins.com/documentation/importer-exporter-module/',
82
+ 'options' => array_keys( $this->default_options ),
83
+ ),
84
+ );
85
+
86
+ // load initial options / set defaults
87
+ add_action( 'admin_init', array( $this, 'debug_post_types' ), 5 );
88
+ }
89
+
90
+
91
+ function settings_page_init() {
92
+ add_filter(
93
+ $this->prefix . 'submit_options',
94
+ array( $this, 'filter_submit' )
95
+ );
96
+ }
97
+
98
+
99
+ /**
100
+ * @param $submit
101
+ *
102
+ * @return array
103
+ */
104
+ function filter_submit( $submit ) {
105
+ $submit['Submit']['value'] = __(
106
+ 'Import',
107
+ 'all-in-one-seo-pack'
108
+ )
109
+ . ' &raquo;';
110
+
111
+ return array(
112
+ 'export_submit' => array(
113
+ 'type' => 'submit',
114
+ 'class' => 'button-primary',
115
+ 'value' => __( 'Export', 'all-in-one-seo-pack' ) . ' &raquo;',
116
+ ),
117
+ ) + $submit;
118
+ }
119
+
120
+
121
+ function debug_post_types() {
122
+ $post_types = $this->get_post_type_titles();
123
+ $rempost = array(
124
+ 'customize_changeset' => 1,
125
+ 'custom_css' => 1,
126
+ 'revision' => 1,
127
+ 'nav_menu_item' => 1,
128
+ );
129
+ $this->default_options['export_post_types']['initial_options'] = array_diff_key(
130
+ $post_types,
131
+ $rempost
132
+ );
133
+ global $aioseop_modules;
134
+ if ( ! empty( $aioseop_modules ) ) {
135
+ $modules = $aioseop_modules->get_loaded_module_list();
136
+ if ( ! empty( $modules ) && ! empty( $modules['feature_manager'] ) ) {
137
+ unset( $modules['feature_manager'] );
138
+ }
139
+ if ( ! empty( $modules ) ) {
140
+ $this->default_options['import_export_help']['default'] .= "<ul>\n";
141
+ foreach ( $modules as $m ) {
142
+ $module = $aioseop_modules->return_module( $m );
143
+ $this->default_options['import_export_help']['default'] .=
144
+ "\t<li>" . $module->name . "</li>\n";
145
+ }
146
+ $this->default_options['import_export_help']['default'] .= "\n</ul>\n";
147
+ } else {
148
+ $this->default_options['import_export_help']['default'] .= '<br />'
149
+ . __(
150
+ 'There are no other modules currently loaded!',
151
+ 'all-in-one-seo-pack'
152
+ );
153
+ }
154
+ }
155
+ $this->default_options['import_export_help']['default'] .= '<br />'
156
+ . __(
157
+ 'You may change this by activating or deactivating
158
+ modules in the Feature Manager.',
159
+ 'all-in-one-seo-pack'
160
+ );
161
+ $this->update_options();
162
+ if ( ! empty( $_REQUEST['export_submit'] ) ) {
163
+ $this->do_importer_exporter();
164
+ } else {
165
+ add_action(
166
+ $this->prefix . 'settings_update',
167
+ array( $this, 'do_importer_exporter' )
168
+ );
169
+ }
170
+ }
171
+
172
+
173
+ /**
174
+ * @param $args
175
+ *
176
+ * @return string
177
+ */
178
+ function importer_exporter_export( $args ) {
179
+
180
+ // Adds all settings to settings file
181
+ $name = $this->get_option_name();
182
+ $buf = '[' . $this->get_option_name() . "]\n";
183
+ if ( ! empty( $this->options ) ) {
184
+ foreach ( $this->options as $key => $value ) {
185
+ $buf .= "$key = '" . str_replace(
186
+ "'",
187
+ "\'",
188
+ trim( serialize( $value ) )
189
+ ) . "'\n";
190
+ }
191
+ }
192
+
193
+ return $buf;
194
+ }
195
+
196
+
197
+ function show_import_warnings() {
198
+
199
+ echo '<div class="error fade" style="width:52%">';
200
+
201
+ if ( is_array( $this->warnings ) ) {
202
+ foreach ( $this->warnings as $warning ) {
203
+ echo '<p>' . wp_kses( wp_unslash( $warning ), 'b, strong, i, em' ) . '</p>';
204
+ }
205
+ }
206
+ echo '</div>';
207
+ }
208
+
209
+
210
+ /**
211
+ * @param $array
212
+ *
213
+ * @return array
214
+ */
215
+ function parse_ini_helper( $array ) {
216
+ $returnArray = array();
217
+ if ( is_array( $array ) ) {
218
+ foreach ( $array as $key => $value ) {
219
+ $e = explode( ':', $key );
220
+ if ( ! empty( $e[1] ) ) {
221
+ $x = array();
222
+ foreach ( $e as $tk => $tv ) {
223
+ $x[ $tk ] = trim( $tv );
224
+ }
225
+ $x = array_reverse( $x, true );
226
+ foreach ( $x as $k => $v ) {
227
+ $c = $x[0];
228
+ if ( empty( $returnArray[ $c ] ) ) {
229
+ $returnArray[ $c ] = array();
230
+ }
231
+ if ( isset( $returnArray[ $x[1] ] ) ) {
232
+ $returnArray[ $c ] = array_merge(
233
+ $returnArray[ $c ], $returnArray[ $x[1] ]
234
+ );
235
+ }
236
+ if ( $k === 0 ) {
237
+ $returnArray[ $c ] = array_merge(
238
+ $returnArray[ $c ], $array[ $key ]
239
+ );
240
+ }
241
+ }
242
+ } else {
243
+ $returnArray[ $key ] = $array[ $key ];
244
+ }
245
+ }
246
+ }
247
+
248
+ return $returnArray;
249
+ }
250
+
251
+
252
+ /**
253
+ * @param $array
254
+ *
255
+ * @return array
256
+ */
257
+ function recursive_parse( $array ) {
258
+ $returnArray = array();
259
+ if ( is_array( $array ) ) {
260
+ foreach ( $array as $key => $value ) {
261
+ if ( is_array( $value ) ) {
262
+ $array[ $key ] = $this->recursive_parse( $value );
263
+ }
264
+ $x = explode( '.', $key );
265
+ if ( ! empty( $x[1] ) ) {
266
+ $x = array_reverse( $x, true );
267
+ if ( isset( $returnArray[ $key ] ) ) {
268
+ unset( $returnArray[ $key ] );
269
+ }
270
+ if ( ! isset( $returnArray[ $x[0] ] ) ) {
271
+ $returnArray[ $x[0] ] = array();
272
+ }
273
+ $first = true;
274
+ foreach ( $x as $k => $v ) {
275
+ if ( $first === true ) {
276
+ $b = $array[ $key ];
277
+ $first = false;
278
+ }
279
+ $b = array( $v => $b );
280
+ }
281
+ $returnArray[ $x[0] ] = array_merge_recursive(
282
+ $returnArray[ $x[0] ], $b[ $x[0] ]
283
+ );
284
+ } else {
285
+ $returnArray[ $key ] = $array[ $key ];
286
+ }
287
+ }
288
+ }
289
+
290
+ return $returnArray;
291
+ }
292
+
293
+
294
+ /**
295
+ * @param $assoc_arr
296
+ * @param bool $has_sections
297
+ *
298
+ * @return string
299
+ */
300
+ function get_ini_file( $assoc_arr, $has_sections = true ) {
301
+ $content = '';
302
+ if ( $has_sections ) {
303
+ foreach ( $assoc_arr as $key => $elem ) {
304
+ $content .= '[' . $key . "]\n";
305
+ foreach ( $elem as $key2 => $elem2 ) {
306
+ if ( is_array( $elem2 ) ) {
307
+ for ( $i = 0; $i < count( $elem2 ); $i ++ ) {
308
+ $content .= $key2 . '[] = "' . $elem2[ $i ] . "\"\n";
309
+ }
310
+ } elseif ( $elem2 == '' ) {
311
+ $content .= $key2 . " = \n";
312
+ } else {
313
+ $content .= $key2 . ' = "' . $elem2 . "\"\n";
314
+ }
315
+ }
316
+ }
317
+ } else {
318
+ foreach ( $assoc_arr as $key => $elem ) {
319
+ if ( is_array( $elem ) ) {
320
+ for ( $i = 0; $i < count( $elem ); $i ++ ) {
321
+ $content .= $key2 . '[] = "' . $elem[ $i ] . "\"\n";
322
+ }
323
+ } elseif ( $elem == '' ) {
324
+ $content .= $key2 . " = \n";
325
+ } else {
326
+ $content .= $key2 . ' = "' . $elem . "\"\n";
327
+ }
328
+ }
329
+ }
330
+
331
+ return $content;
332
+ }
333
+
334
+
335
+ /**
336
+ * @param $string
337
+ *
338
+ * @return array
339
+ */
340
+ function parse_ini_advanced( $string ) {
341
+ return $this->recursive_parse(
342
+ $this->parse_ini_helper(
343
+ parse_ini_string( $string, true )
344
+ )
345
+ );
346
+ }
347
+
348
+
349
+ function do_importer_exporter() {
350
+ $submit = null;
351
+ $count = 0;
352
+ $post_exists = null;
353
+ $post_warning = null;
354
+ global $aioseop_options, $aiosp, $aioseop_module_list;
355
+ if ( isset( $_REQUEST['nonce-aioseop'] ) ) {
356
+ $nonce = $_REQUEST['nonce-aioseop'];
357
+ }
358
+ $post_fields = array(
359
+ 'keywords',
360
+ 'description',
361
+ 'title',
362
+ 'meta',
363
+ 'disable',
364
+ 'disable',
365
+ 'disable_analytics',
366
+ 'togglekeywords',
367
+ );
368
+ if ( ! empty( $_FILES['aiosp_importer_exporter_import_submit']['tmp_name'] ) ) {
369
+ $submit = 'Import';
370
+ }
371
+ if ( ! empty( $_REQUEST['export_submit'] ) ) {
372
+ $submit = 'Export';
373
+ }
374
+ if ( ( $submit != null ) && wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
375
+ switch ( $submit ) {
376
+ case 'Import':
377
+ try {
378
+ // Parses export file
379
+ $file = $this->get_sanitized_file(
380
+ $_FILES['aiosp_importer_exporter_import_submit']['tmp_name']
381
+ );
382
+ $section = array();
383
+ $section_label = null;
384
+ foreach ( $file as $line_number => $line ) {
385
+ $line = trim( $line );
386
+ $matches = array();
387
+ if ( empty( $line ) ) {
388
+ continue;
389
+ }
390
+ if ( $line[0] == ';' ) {
391
+ continue;
392
+ }
393
+ if ( preg_match( '/^\[(\S+)\]$/', $line, $label ) ) {
394
+ $section_label = strval( $label[1] );
395
+ if ( $section_label == 'post_data' ) {
396
+ $count ++;
397
+ }
398
+ if ( ! isset( $section[ $section_label ] ) ) {
399
+ $section[ $section_label ] = array();
400
+ }
401
+ } elseif ( preg_match( "/^(\S+)\s*=\s*'(.*)'$/", $line, $matches ) ) {
402
+ if ( $section_label == 'post_data' ) {
403
+ $section[ $section_label ][ $count ][ $matches[1] ] = $matches[2];
404
+ } else {
405
+ $section[ $section_label ][ $matches[1] ] = $matches[2];
406
+ }
407
+ } elseif ( preg_match( '/^(\S+)\s*=\s*NULL$/', $line, $matches ) ) {
408
+ if ( $section_label == 'post_data' ) {
409
+ $section[ $section_label ][ $count ][ $matches[1] ] = null;
410
+ } else {
411
+ $section[ $section_label ][ $matches[1] ] = null;
412
+ }
413
+ } else {
414
+ $this->warnings[] = sprintf(
415
+ __(
416
+ '<b>Warning:</b> Line not matched: <b>"%1$s"</b>, On Line: <b>%2$s</b>',
417
+ 'all-in-one-seo-pack'
418
+ ),
419
+ $line,
420
+ $line_number
421
+ );
422
+ }
423
+ }
424
+
425
+ // Updates Plugin Settings
426
+ if ( is_array( $section ) ) {
427
+ foreach ( $section as $label => $module_options ) {
428
+ if ( is_array( $module_options ) ) {
429
+ foreach ( $module_options as $key => $value ) {
430
+
431
+ // Updates Post Data
432
+ if ( $label == 'post_data' ) {
433
+ $post_exists = post_exists(
434
+ $module_options[ $key ]['post_title'],
435
+ '',
436
+ $module_options[ $key ]['post_date']
437
+ );
438
+ $target = get_post( $post_exists );
439
+ if ( ( ! empty( $module_options[ $key ]['post_type'] ) )
440
+ && $post_exists != null
441
+ ) {
442
+ if ( is_array( $value ) ) {
443
+ foreach ( $value as $field_name => $field_value ) {
444
+ if ( substr( $field_name, 1, 7 ) == 'aioseop' ) {
445
+ if ( $value ) {
446
+ update_post_meta(
447
+ $target->ID,
448
+ $field_name,
449
+ maybe_unserialize( $field_value )
450
+ );
451
+ } else {
452
+ delete_post_meta(
453
+ $target->ID,
454
+ $field_name
455
+ );
456
+ }
457
+ }
458
+ }
459
+ }
460
+ $post_exists = null;
461
+ } else {
462
+ $target_title = $module_options[ $key ]['post_title'];
463
+ $post_warning = sprintf(
464
+ __(
465
+ '<b>Warning:</b> This following post could not be found: <b>"%s"</b>',
466
+ 'all-in-one-seo-pack'
467
+ ),
468
+ $target_title
469
+ );
470
+ }
471
+ if ( $post_warning != null ) {
472
+ $this->warnings[] = $post_warning;
473
+ $post_warning = null;
474
+ }
475
+
476
+ // Updates Module Settings
477
+ } else {
478
+ $module_options[ $key ] = str_replace(
479
+ array( "\'", '\n', '\r' ),
480
+ array( "'", "\n", "\r" ),
481
+ maybe_unserialize( $value )
482
+ );
483
+ }
484
+ }
485
+
486
+ // Updates Module Settings
487
+ $this->update_class_option(
488
+ $module_options,
489
+ $label
490
+ );
491
+ }
492
+ }
493
+ }
494
+ } catch ( Exception $e ) {
495
+ // Shows only one warning when compromised file is imported
496
+ $this->warnings = array();
497
+ $this->warnings[] = $e->getMessage();
498
+ add_action(
499
+ $this->prefix . 'settings_header_errors',
500
+ array( $this, 'show_import_warnings' )
501
+ );
502
+ break;
503
+ }
504
+
505
+ // Shows all errors found
506
+ if ( ! empty( $this->warnings ) ) {
507
+ add_action(
508
+ $this->prefix . 'settings_header',
509
+ array( $this, 'show_import_warnings' ),
510
+ 5
511
+ );
512
+ }
513
+
514
+ break;
515
+ case 'Export':
516
+ // Creates Files Contents
517
+ $settings_file = 'settings_aioseop.ini';
518
+ $buf = '; ' . __(
519
+ 'Settings export file for All in One SEO Pack', '
520
+ all-in-one-seo-pack'
521
+ ) . "\n";
522
+
523
+ // Adds all settings to settings file
524
+ $buf = $aiosp->settings_export( $buf );
525
+ $buf = apply_filters( 'aioseop_export_settings', $buf );
526
+
527
+ // Sends File to browser
528
+ $strlength = strlen( $buf );
529
+ header( 'Content-type: application/ini' );
530
+ header( "Content-Disposition: attachment; filename=$settings_file" );
531
+ header( 'Content-Length: ' . $strlength );
532
+ echo $buf;
533
+ die();
534
+ break;
535
+ }
536
+ }
537
+ }
538
+
539
+
540
+ function settings_update() {
541
+ }
542
+
543
+ /**
544
+ * Returns sanitized imported file.
545
+ *
546
+ * @since
547
+ *
548
+ * @param string $filename Path to where the uploaded file is located.
549
+ *
550
+ * @return array Sanitized file as array.
551
+ * @throws Exception
552
+ */
553
+ private function get_sanitized_file( $filename ) {
554
+ $file = file( $filename );
555
+ for ( $i = count( $file ) - 1; $i >= 0; -- $i ) {
556
+ // Remove insecured lines
557
+ if ( preg_match( '/\<(\?php|script)/', $file[ $i ] ) ) {
558
+ throw new Exception(
559
+ __(
560
+ '<b>Security warning:</b> Your file looks compromised. Please check the file for any script-injection.',
561
+ 'all-in-one-seo-pack'
562
+ )
563
+ );
564
+ }
565
+ // Apply security filters
566
+ $file[ $i ] = strip_tags( trim( $file[ $i ] ) );
567
+ // Remove empty lines
568
+ if ( empty( $file[ $i ] ) ) {
569
+ unset( $file[ $i ] );
570
+ }
571
+ }
572
+
573
+ return $file;
574
+ }
575
+ }
576
+ }
modules/aioseop_opengraph.php CHANGED
@@ -1,1702 +1,1730 @@
1
- <?php
2
- /**
3
- * The Opengraph class.
4
- *
5
- * @package All-in-One-SEO-Pack
6
- * @version 2.3.16
7
- */
8
- if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
9
- class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
10
- var $fb_object_types;
11
- var $type;
12
-
13
- /**
14
- * Module constructor.
15
- *
16
- * @since 2.3.14 Added display filter.
17
- * @since 2.3.16 #1066 Force init on constructor.
18
- */
19
- function __construct() {
20
- add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
21
-
22
- $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
23
- $this->prefix = 'aiosp_opengraph_'; // option prefix
24
- $this->file = __FILE__; // the current file
25
- $this->fb_object_types = Array(
26
- 'Activities' => Array(
27
- 'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
28
- 'sport' => __( 'Sport', 'all-in-one-seo-pack' ),
29
- ),
30
- 'Businesses' => Array(
31
- 'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
32
- 'company' => __( 'Company', 'all-in-one-seo-pack' ),
33
- 'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
34
- 'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
35
- 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' ),
36
- ),
37
- 'Groups' => Array(
38
- 'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
39
- 'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
40
- 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' ),
41
- ),
42
- 'Organizations' => Array(
43
- 'band' => __( 'Band', 'all-in-one-seo-pack' ),
44
- 'government' => __( 'Government', 'all-in-one-seo-pack' ),
45
- 'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
46
- 'school' => __( 'School', 'all-in-one-seo-pack' ),
47
- 'university' => __( 'University', 'all-in-one-seo-pack' ),
48
- ),
49
- 'People' => Array(
50
- 'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
51
- 'athlete' => __( 'Athlete', 'all-in-one-seo-pack' ),
52
- 'author' => __( 'Author', 'all-in-one-seo-pack' ),
53
- 'director' => __( 'Director', 'all-in-one-seo-pack' ),
54
- 'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
55
- 'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
56
- 'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
57
- 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' ),
58
- ),
59
- 'Places' => Array(
60
- 'city' => __( 'City', 'all-in-one-seo-pack' ),
61
- 'country' => __( 'Country', 'all-in-one-seo-pack' ),
62
- 'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
63
- 'state_province' => __( 'State Province', 'all-in-one-seo-pack' ),
64
- ),
65
- 'Products and Entertainment' => Array(
66
- 'album' => __( 'Album', 'all-in-one-seo-pack' ),
67
- 'book' => __( 'Book', 'all-in-one-seo-pack' ),
68
- 'drink' => __( 'Drink', 'all-in-one-seo-pack' ),
69
- 'food' => __( 'Food', 'all-in-one-seo-pack' ),
70
- 'game' => __( 'Game', 'all-in-one-seo-pack' ),
71
- 'movie' => __( 'Movie', 'all-in-one-seo-pack' ),
72
- 'product' => __( 'Product', 'all-in-one-seo-pack' ),
73
- 'song' => __( 'Song', 'all-in-one-seo-pack' ),
74
- 'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
75
- 'episode' => __( 'Episode', 'all-in-one-seo-pack' ),
76
- ),
77
- 'Websites' => Array(
78
- 'article' => __( 'Article', 'all-in-one-seo-pack' ),
79
- 'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
80
- 'website' => __( 'Website', 'all-in-one-seo-pack' ),
81
- ),
82
- );
83
- parent::__construct();
84
-
85
- $this->help_text = Array(
86
- "setmeta" => __( "Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all-in-one-seo-pack' ),
87
- "key" => __( "Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/", 'all-in-one-seo-pack' ),
88
- "appid" => __( "Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register", 'all-in-one-seo-pack' ),
89
- "title_shortcodes" => __( "Run shortcodes that appear in social title meta tags.", 'all-in-one-seo-pack' ),
90
- "description_shortcodes" => __( "Run shortcodes that appear in social description meta tags.", 'all-in-one-seo-pack' ),
91
- "sitename" => __( "The Site Name is the name that is used to identify your website.", 'all-in-one-seo-pack' ),
92
- "hometitle" => __( "The Home Title is the Open Graph title for your home page.", 'all-in-one-seo-pack' ),
93
- "description" => __( "The Home Description is the Open Graph description for your home page.", 'all-in-one-seo-pack' ),
94
- "homeimage" => __( "The Home Image is the Open Graph image for your home page.", 'all-in-one-seo-pack' ),
95
- "generate_descriptions" => __( "This option will auto generate your Open Graph descriptions from your post content instead of your post excerpt. WooCommerce users should read the documentation regarding this setting.", 'all-in-one-seo-pack' ),
96
- "defimg" => __( "This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.", 'all-in-one-seo-pack' ),
97
- "fallback" => __( "This option lets you fall back to the default image if no image could be found above.", 'all-in-one-seo-pack' ),
98
- "dimg" => __( "This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.", 'all-in-one-seo-pack' ),
99
- "dimgwidth" => __( "This option lets you set a default width for your images, where unspecified.", 'all-in-one-seo-pack' ),
100
- "dimgheight" => __( "This option lets you set a default height for your images, where unspecified.", 'all-in-one-seo-pack' ),
101
- "meta_key" => __( "Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.", 'all-in-one-seo-pack' ),
102
- "image" => __( "This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.", 'all-in-one-seo-pack' ),
103
- "customimg" => __( "This option lets you upload an image to use as the Open Graph image for this Page or Post.", 'all-in-one-seo-pack' ),
104
- "imagewidth" => __( "Enter the width for your Open Graph image in pixels (i.e. 600).", 'all-in-one-seo-pack' ),
105
- "imageheight" => __( "Enter the height for your Open Graph image in pixels (i.e. 600).", 'all-in-one-seo-pack' ),
106
- "video" => __( "This option lets you specify a link to the Open Graph video used on this Page or Post.", 'all-in-one-seo-pack' ),
107
- "videowidth" => __( "Enter the width for your Open Graph video in pixels (i.e. 600).", 'all-in-one-seo-pack' ),
108
- "videoheight" => __( "Enter the height for your Open Graph video in pixels (i.e. 600).", 'all-in-one-seo-pack' ),
109
- "defcard" => __( "Select the default type of Twitter Card to display.", 'all-in-one-seo-pack' ),
110
- "setcard" => __( "Select the Twitter Card type to use for this Page or Post, overriding the default setting.", 'all-in-one-seo-pack' ),
111
- "twitter_site" => __( "Enter the Twitter username associated with your website here.", 'all-in-one-seo-pack' ),
112
- "twitter_creator" => __( "Allows your authors to be identified by their Twitter usernames as content creators on the Twitter cards for their posts.", 'all-in-one-seo-pack' ),
113
- "twitter_domain" => __( "Enter the name of your website here.", 'all-in-one-seo-pack' ),
114
- "customimg_twitter" => __( "This option lets you upload an image to use as the Twitter image for this Page or Post.", 'all-in-one-seo-pack' ),
115
- "gen_tags" => __( "Automatically generate article tags for Facebook type article when not provided.", 'all-in-one-seo-pack' ),
116
- "gen_keywords" => __( "Use keywords in generated article tags.", 'all-in-one-seo-pack' ),
117
- "gen_categories" => __( "Use categories in generated article tags.", 'all-in-one-seo-pack' ),
118
- "gen_post_tags" => __( "Use post tags in generated article tags.", 'all-in-one-seo-pack' ),
119
- "types" => __( "Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.", 'all-in-one-seo-pack' ),
120
- "title" => __( "This is the Open Graph title of this Page or Post.", 'all-in-one-seo-pack' ),
121
- "desc" => __( "This is the Open Graph description of this Page or Post.", 'all-in-one-seo-pack' ),
122
- "category" => __( "Select the Open Graph type that best describes the content of this Page or Post.", 'all-in-one-seo-pack' ),
123
- "facebook_debug" => __( "Press this button to have Facebook re-fetch and debug this page.", 'all-in-one-seo-pack' ),
124
- "section" => __( "This Open Graph meta allows you to add a general section name that best describes this content.", 'all-in-one-seo-pack' ),
125
- "tag" => __( "This Open Graph meta allows you to add a list of keywords that best describe this content.", 'all-in-one-seo-pack' ),
126
- "facebook_publisher" => __( "Link articles to the Facebook page associated with your website.", 'all-in-one-seo-pack' ),
127
- "facebook_author" => __( "Allows your authors to be identified by their Facebook pages as content authors on the Opengraph meta for their articles.", 'all-in-one-seo-pack' ),
128
- "person_or_org" => __( "Are the social profile links for your website for a person or an organization?", 'all-in-one-seo-pack' ),
129
- "profile_links" => __( "Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack' ),
130
- "social_name" => __( "Add the name of the person or organization who owns these profiles.", 'all-in-one-seo-pack' ),
131
- );
132
-
133
- $this->help_anchors = Array(
134
- 'title_shortcodes' => '#run-shortcodes-in-title',
135
- 'description_shortcodes' => '#run-shortcodes-in-description',
136
- 'generate_descriptions' => '#auto-generate-og-descriptions',
137
- 'setmeta' => '#use-aioseo-title-and-description',
138
- 'sitename' => '#site-name',
139
- 'hometitle' => '#home-title-and-description',
140
- 'description' => '#home-title-and-description',
141
- 'homeimage' => '#home-image',
142
- 'defimg' => '#select-og-image-source',
143
- 'fallback' => '#use-default-if-no-image-found',
144
- 'dimg' => '#default-og-image',
145
- 'dimgwidth' => '#default-image-width',
146
- 'dimgheight' => '#default-image-height',
147
- 'meta_key' => '#use-custom-field-for-image',
148
- 'profile_links' => '#social-profile-links',
149
- 'person_or_org' => '#social-profile-links',
150
- 'social_name' => '#social-profile-links',
151
- 'key' => '#facebook-admin-id',
152
- 'appid' => '#facebook-app-id',
153
- 'gen_tags' => '#automatically-generate-article-tags',
154
- 'gen_keywords' => '#use-keywords-in-article-tags',
155
- 'gen_categories' => '#use-categories-in-article-tags',
156
- 'gen_post_tags' => '#use-post-tags-in-article-tags',
157
- 'facebook_publisher' => '#show-facebook-publisher-on-articles',
158
- 'facebook_author' => '#show-facebook-author-on-articles',
159
- 'types' => '#enable-facebook-meta-for',
160
- 'defcard' => '#default-twitter-card',
161
- 'twitter_site' => '#twitter-site',
162
- 'twitter_creator' => '#show-twitter-author',
163
- 'twitter_domain' => '#twitter-domain',
164
- 'scan_header' => '#scan-social-meta',
165
- 'title' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#title',
166
- 'desc' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#description',
167
- 'image' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#image',
168
- 'customimg' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-image',
169
- 'imagewidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
170
- 'imageheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
171
- 'video' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-video',
172
- 'videowidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
173
- 'videoheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
174
- 'category' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-object-type',
175
- 'facebook_debug' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-debug',
176
- 'section' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-section',
177
- 'tag' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-tags',
178
- 'setcard' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#twitter-card-type',
179
- 'customimg_twitter' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-twitter-image',
180
- );
181
-
182
- if ( is_admin() ) {
183
- add_action( 'admin_init', Array( $this, 'admin_init' ), 5 );
184
- } else {
185
- add_action( 'wp', Array( $this, 'type_setup' ) );
186
- }
187
-
188
- if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
189
- $this->do_opengraph();
190
- }
191
- // Set variables after wordpress load.
192
- add_action( 'init', array( &$this, 'init' ), 999999 );
193
- add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
194
- // Force refresh of Facebook cache.
195
- add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
196
- add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
197
- add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
198
- // Adds special filters
199
- add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
200
- // Call to init to generate menus
201
- $this->init();
202
- }
203
-
204
- /**
205
- * Hook called after wordpress has been loaded.
206
- * @since 2.4.14
207
- */
208
- public function init() {
209
- $count_desc = __( ' characters. Open Graph allows up to a maximum of %s chars for the %s.', 'all-in-one-seo-pack' );
210
- // Create default options
211
- $this->default_options = array(
212
- 'scan_header' => array(
213
- 'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
214
- 'type' => 'custom',
215
- 'save' => true,
216
- ),
217
- 'setmeta' => array(
218
- 'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
219
- 'type' => 'checkbox',
220
- ),
221
- 'key' => array(
222
- 'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
223
- 'default' => '',
224
- 'type' => 'text',
225
- ),
226
- 'appid' => array(
227
- 'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
228
- 'default' => '',
229
- 'type' => 'text',
230
- ),
231
- 'title_shortcodes' => array(
232
- 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ),
233
- ),
234
- 'description_shortcodes' => array(
235
- 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ),
236
- ),
237
- 'sitename' => array(
238
- 'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
239
- 'default' => get_bloginfo( 'name' ),
240
- 'type' => 'text',
241
- ),
242
- 'hometitle' => array(
243
- 'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
244
- 'default' => '',
245
- 'type' => 'textarea',
246
- 'condshow' => array(
247
- 'aiosp_opengraph_setmeta' => array(
248
- 'lhs' => 'aiosp_opengraph_setmeta',
249
- 'op' => '!=',
250
- 'rhs' => 'on',
251
- ),
252
- ),
253
- ),
254
- 'description' => array(
255
- 'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
256
- 'default' => '',
257
- 'type' => 'textarea',
258
- 'condshow' => array(
259
- 'aiosp_opengraph_setmeta' => array(
260
- 'lhs' => 'aiosp_opengraph_setmeta',
261
- 'op' => '!=',
262
- 'rhs' => 'on',
263
- ),
264
- ),
265
- ),
266
- 'homeimage' => array(
267
- 'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
268
- 'type' => 'image',
269
- ),
270
- 'generate_descriptions' => array(
271
- 'name' => __( 'Use Content For Autogenerated OG Descriptions', 'all-in-one-seo-pack' ),
272
- 'default' => 0,
273
- ),
274
- 'defimg' => array(
275
- 'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
276
- 'type' => 'select',
277
- 'initial_options' => array(
278
- '' => __( 'Default Image' ),
279
- 'featured' => __( 'Featured Image' ),
280
- 'attach' => __( 'First Attached Image' ),
281
- 'content' => __( 'First Image In Content' ),
282
- 'custom' => __( 'Image From Custom Field' ),
283
- 'author' => __( 'Post Author Image' ),
284
- 'auto' => __( 'First Available Image' ),
285
- ),
286
- ),
287
- 'fallback' => array(
288
- 'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
289
- 'type' => 'checkbox',
290
- ),
291
- 'dimg' => array(
292
- 'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
293
- 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
294
- 'type' => 'image',
295
- ),
296
- 'dimgwidth' => array(
297
- 'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
298
- 'type' => 'text',
299
- 'default' => '',
300
- ),
301
- 'dimgheight' => array(
302
- 'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
303
- 'type' => 'text',
304
- 'default' => '',
305
- ),
306
- 'meta_key' => array(
307
- 'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
308
- 'type' => 'text',
309
- 'default' => '',
310
- ),
311
- 'image' => array(
312
- 'name' => __( 'Image', 'all-in-one-seo-pack' ),
313
- 'type' => 'radio',
314
- 'initial_options' => array(
315
- 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">'
316
- ),
317
- ),
318
- 'customimg' => array(
319
- 'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
320
- 'type' => 'image',
321
- ),
322
- 'imagewidth' => array(
323
- 'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
324
- 'type' => 'text',
325
- 'default' => '',
326
- ),
327
- 'imageheight' => array(
328
- 'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
329
- 'type' => 'text',
330
- 'default' => '',
331
- ),
332
- 'video' => array(
333
- 'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
334
- 'type' => 'text',
335
- ),
336
- 'videowidth' => array(
337
- 'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
338
- 'type' => 'text',
339
- 'default' => '',
340
- 'condshow' => array(
341
- 'aioseop_opengraph_settings_video' => array(
342
- 'lhs' => 'aioseop_opengraph_settings_video',
343
- 'op' => '!=',
344
- 'rhs' => '',
345
- ),
346
- ),
347
- ),
348
- 'videoheight' => array(
349
- 'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
350
- 'type' => 'text',
351
- 'default' => '',
352
- 'condshow' => array(
353
- 'aioseop_opengraph_settings_video' => array(
354
- 'lhs' => 'aioseop_opengraph_settings_video',
355
- 'op' => '!=',
356
- 'rhs' => '',
357
- ),
358
- ),
359
- ),
360
- 'defcard' => array(
361
- 'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
362
- 'type' => 'select',
363
- 'default' => 'summary',
364
- 'initial_options' => array(
365
- 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
366
- 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' )
367
- /* REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
368
- 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
369
- */
370
- ),
371
- ),
372
- 'setcard' => array(
373
- 'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
374
- 'type' => 'select',
375
- 'initial_options' => array(
376
- 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
377
- 'summary' => __( 'Summary', 'all-in-one-seo-pack' )
378
- /* REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
379
- 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
380
- */
381
- ),
382
- ),
383
- 'twitter_site' => array(
384
- 'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
385
- 'type' => 'text',
386
- 'default' => '',
387
- ),
388
- 'twitter_creator' => array(
389
- 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' )
390
- ),
391
- 'twitter_domain' => array(
392
- 'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
393
- 'type' => 'text',
394
- 'default' => '',
395
- ),
396
- 'customimg_twitter' => array(
397
- 'name' => __( 'Custom Twitter Image', 'all-in-one-seo-pack' ),
398
- 'type' => 'image',
399
- ),
400
- 'gen_tags' => array(
401
- 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' )
402
- ),
403
- 'gen_keywords' => array(
404
- 'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
405
- 'default' => 'on',
406
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
407
- ),
408
- 'gen_categories' => array(
409
- 'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
410
- 'default' => 'on',
411
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
412
- ),
413
- 'gen_post_tags' => array(
414
- 'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
415
- 'default' => 'on',
416
- 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
417
- ),
418
- 'types' => array(
419
- 'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
420
- 'type' => 'multicheckbox',
421
- 'default' => array( 'post' => 'post', 'page' => 'page' ),
422
- 'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
423
- ),
424
- 'title' => array(
425
- 'name' => __( 'Title', 'all-in-one-seo-pack' ),
426
- 'default' => '',
427
- 'type' => 'text',
428
- 'size' => 95,
429
- 'count' => 1,
430
- 'count_desc' => $count_desc,
431
- ),
432
- 'desc' => array(
433
- 'name' => __( 'Description', 'all-in-one-seo-pack' ),
434
- 'default' => '',
435
- 'type' => 'textarea',
436
- 'cols' => 250,
437
- 'rows' => 4,
438
- 'count' => 1,
439
- 'count_desc' => $count_desc,
440
- ),
441
- 'category' => array(
442
- 'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
443
- 'type' => 'select',
444
- 'style' => '',
445
- 'default' => '',
446
- 'initial_options' => $this->fb_object_types,
447
- ),
448
- 'facebook_debug' => array(
449
- 'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
450
- 'type' => 'html',
451
- 'save' => false,
452
- 'default' => $this->get_facebook_debug(),
453
- ),
454
- 'section' => array(
455
- 'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
456
- 'type' => 'text',
457
- 'default' => '',
458
- 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
459
- ),
460
- 'tag' => array(
461
- 'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
462
- 'type' => 'text',
463
- 'default' => '',
464
- 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
465
- ),
466
- 'facebook_publisher' => array(
467
- 'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
468
- 'type' => 'text',
469
- 'default' => '',
470
- ),
471
- 'facebook_author'=> array(
472
- 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' )
473
- ),
474
- 'profile_links' => array(
475
- 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
476
- 'type' => 'textarea',
477
- 'cols' => 60,
478
- 'rows' => 5,
479
- ),
480
- 'person_or_org' => array(
481
- 'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
482
- 'type' => 'radio',
483
- 'initial_options' => array(
484
- 'person' => __( 'Person', 'all-in-one-seo-pack' ),
485
- 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
486
- ),
487
- ),
488
- 'social_name' => array(
489
- 'name' => __( "Associated Name", 'all-in-one-seo-pack' ),
490
- 'type' => 'text',
491
- 'default' => "",
492
- ),
493
- );
494
- // load initial options / set defaults
495
- $this->update_options();
496
- $display = Array();
497
- if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
498
- $display = $this->options['aiosp_opengraph_types'];
499
- }
500
- $this->locations = array(
501
- 'opengraph' => Array(
502
- 'name' => $this->name,
503
- 'prefix' => 'aiosp_',
504
- 'type' => 'settings',
505
- 'options' => Array(
506
- 'scan_header',
507
- 'setmeta',
508
- 'key',
509
- 'appid',
510
- 'sitename',
511
- 'title_shortcodes',
512
- 'description_shortcodes',
513
- 'hometitle',
514
- 'description',
515
- 'homeimage',
516
- 'generate_descriptions',
517
- 'defimg',
518
- 'fallback',
519
- 'dimg',
520
- 'dimgwidth',
521
- 'dimgheight',
522
- 'meta_key',
523
- 'defcard',
524
- 'profile_links',
525
- 'person_or_org',
526
- 'social_name',
527
- 'twitter_site',
528
- 'twitter_creator',
529
- 'twitter_domain',
530
- 'gen_tags',
531
- 'gen_keywords',
532
- 'gen_categories',
533
- 'gen_post_tags',
534
- 'types',
535
- 'facebook_publisher',
536
- 'facebook_author',
537
- ),
538
- ),
539
- 'settings' => Array(
540
- 'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
541
- 'type' => 'metabox',
542
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/',
543
- 'options' => Array(
544
- 'title',
545
- 'desc',
546
- 'image',
547
- 'customimg',
548
- 'imagewidth',
549
- 'imageheight',
550
- 'video',
551
- 'videowidth',
552
- 'videoheight',
553
- 'category',
554
- 'facebook_debug',
555
- 'section',
556
- 'tag',
557
- 'setcard',
558
- 'customimg_twitter',
559
- ),
560
- 'display' => apply_filters( 'aioseop_opengraph_display', $display ),
561
- 'prefix' => 'aioseop_opengraph_',
562
- ),
563
- );
564
- $this->layout = Array(
565
- 'home' => Array(
566
- 'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
567
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
568
- 'options' => Array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage' ),
569
- ),
570
- 'image' => Array(
571
- 'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
572
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
573
- 'options' => Array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
574
- ),
575
- 'links' => Array(
576
- 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
577
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
578
- 'options' => Array( 'profile_links', 'person_or_org', 'social_name' ),
579
- ),
580
- 'facebook' => Array(
581
- 'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
582
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
583
- 'options' => Array(
584
- 'key',
585
- 'appid',
586
- 'types',
587
- 'gen_tags',
588
- 'gen_keywords',
589
- 'gen_categories',
590
- 'gen_post_tags',
591
- 'facebook_publisher',
592
- 'facebook_author',
593
- ),
594
- ),
595
- 'twitter' => Array(
596
- 'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
597
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
598
- 'options' => Array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
599
- ),
600
- 'default' => Array(
601
- 'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
602
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
603
- 'options' => Array() // this is set below, to the remaining options -- pdb
604
- ),
605
- 'scan_meta' => Array(
606
- 'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
607
- 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
608
- 'options' => Array( 'scan_header' ),
609
- ),
610
- );
611
- $other_options = Array();
612
- foreach ( $this->layout as $k => $v ) {
613
- $other_options = array_merge( $other_options, $v['options'] );
614
- }
615
-
616
- $this->layout['default']['options'] = array_diff( array_keys( $this->default_options ), $other_options );
617
- }
618
-
619
- /**
620
- * Forces FaceBook OpenGraph to refresh its cache when a post is changed to
621
- *
622
- * @param $new_status
623
- * @param $old_status
624
- * @param $post
625
- *
626
- * @todo this and force_fb_refresh_update can probably have the remote POST extracted out.
627
- *
628
- * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
629
- * @since 2.3.11
630
- */
631
- function force_fb_refresh_transition( $new_status, $old_status, $post ) {
632
- if ( 'publish' !== $new_status ) {
633
- return;
634
- }
635
- if ( 'future' !== $old_status ) {
636
- return;
637
- }
638
-
639
- $current_post_type = get_post_type();
640
-
641
- // Only ping Facebook if Social SEO is enabled on this post type.
642
- if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
643
- $post_url = aioseop_get_permalink( $post->ID );
644
- $endpoint = sprintf( 'https://graph.facebook.com/?%s', http_build_query( array(
645
- 'id' => $post_url,
646
- 'scrape' => true,
647
- ) ) );
648
- wp_remote_post( $endpoint, array( 'blocking' => false ) );
649
- }
650
- }
651
-
652
- /**
653
- * Forces FaceBook OpenGraph refresh on update.
654
- *
655
- * @param $post_id
656
- * @param $post_after
657
- *
658
- * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
659
- * @since 2.3.11
660
- */
661
- function force_fb_refresh_update( $post_id, $post_after ) {
662
-
663
- $current_post_type = get_post_type();
664
-
665
- // Only ping Facebook if Social SEO is enabled on this post type.
666
- if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
667
- $post_url = aioseop_get_permalink( $post_id );
668
- $endpoint = sprintf( 'https://graph.facebook.com/?%s', http_build_query( array(
669
- 'id' => $post_url,
670
- 'scrape' => true,
671
- ) ) );
672
- wp_remote_post( $endpoint, array( 'blocking' => false ) );
673
- }
674
- }
675
-
676
- function settings_page_init() {
677
- add_filter( 'aiosp_output_option', Array( $this, 'display_custom_options' ), 10, 2 );
678
- }
679
-
680
- function filter_options( $options, $location ) {
681
- if ( $location == 'settings' ) {
682
- $prefix = $this->get_prefix( $location ) . $location . '_';
683
- list( $legacy, $images ) = $this->get_all_images( $options );
684
- if ( isset( $options ) && isset( $options["{$prefix}image"] ) ) {
685
- $thumbnail = $options["{$prefix}image"];
686
- if ( ctype_digit( (string) $thumbnail ) || ( $thumbnail == 'post' ) ) {
687
- if ( $thumbnail == 'post' ) {
688
- $thumbnail = $images['post1'];
689
- } else if ( ! empty( $legacy[ $thumbnail ] ) ) {
690
- $thumbnail = $legacy[ $thumbnail ];
691
- }
692
- }
693
- $options["{$prefix}image"] = $thumbnail;
694
- }
695
- if ( empty( $options[ $prefix . 'image' ] ) ) {
696
- $img = array_keys( $images );
697
- if ( ! empty( $img ) && ! empty( $img[1] ) ) {
698
- $options[ $prefix . 'image' ] = $img[1];
699
- }
700
- }
701
- }
702
-
703
- return $options;
704
- }
705
-
706
- /**
707
- * Applies filter to module settings.
708
- *
709
- * @since 2.3.11
710
- * @since 2.4.14 Added filter for description and title placeholders.
711
- * @since 2.3.15 do_shortcode on description.
712
- *
713
- * @see [plugin]\admin\aioseop_module_class.php > display_options()
714
- */
715
- function filter_settings( $settings, $location, $current ) {
716
- global $aiosp, $post;
717
- if ( $location == 'opengraph' || $location == 'settings' ) {
718
- $prefix = $this->get_prefix( $location ) . $location . '_';
719
- if ( $location == 'opengraph' ) {
720
- return $settings;
721
- }
722
- if ( $location == 'settings' ) {
723
- list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
724
- $opts = Array( 'title', 'desc' );
725
- $current_post_type = get_post_type();
726
- if ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) {
727
- $flat_type_list = Array();
728
- foreach ( $this->fb_object_types as $k => $v ) {
729
- if ( is_array( $v ) ) {
730
- $flat_type_list = array_merge( $flat_type_list, $v );
731
- } else {
732
- $flat_type_list[ $k ] = $v;
733
- }
734
- }
735
- $settings[ $prefix . 'category' ]['initial_options'] = array_merge( Array(
736
- $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
737
- . $flat_type_list[ $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ],
738
- ),
739
- $settings[ $prefix . 'category' ]['initial_options'] );
740
- }
741
- if ( isset( $this->options["aiosp_opengraph_defcard"] ) ) {
742
- $settings[ $prefix . 'setcard' ]['default'] = $this->options["aiosp_opengraph_defcard"];
743
- }
744
- $info = $aiosp->get_page_snippet_info();
745
- extract( $info );
746
-
747
- // Description options
748
- if ( is_object( $post ) )
749
- // Always show excerpt
750
- $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
751
- ? $aiosp->trim_excerpt_without_filters(
752
- $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
753
- 1000
754
- )
755
- : $aiosp->trim_excerpt_without_filters(
756
- $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ),
757
- 1000
758
- );
759
-
760
- // Add filters
761
- $description = apply_filters( 'aioseop_description', $description );
762
- // Add placholders
763
- $settings["{$prefix}title"]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
764
- $settings["{$prefix}desc"]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
765
- }
766
- if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
767
- foreach ( $opts as $opt ) {
768
- if ( isset( $settings[ $prefix . $opt ] ) ) {
769
- $settings[ $prefix . $opt ]['type'] = 'hidden';
770
- $settings[ $prefix . $opt ]['label'] = 'none';
771
- $settings[ $prefix . $opt ]['help_text'] = '';
772
- unset( $settings[ $prefix . $opt ]['count'] );
773
- }
774
- }
775
- }
776
- }
777
-
778
- return $settings;
779
- }
780
-
781
- /**
782
- * Applies filter to module options.
783
- * These will display in the "Social Settings" object tab.
784
- * filter:{prefix}override_options
785
- *
786
- * @since 2.3.11
787
- * @since 2.4.14 Overrides empty og:type values.
788
- *
789
- * @see [plugin]\admin\aioseop_module_class.php > display_options()
790
- *
791
- * @global array $aioseop_options Plugin options.
792
- *
793
- * @param array $options Current options.
794
- * @param string $location Location where filter is called.
795
- * @param array $settings Settings.
796
- *
797
- * @return array
798
- */
799
- function override_options( $options, $location, $settings ) {
800
- global $aioseop_options;
801
- // Prepare default and prefix
802
- $prefix = $this->get_prefix( $location ) . $location . '_';
803
- $opts = array();
804
- foreach ( $settings as $k => $v ) {
805
- if ( $v['save'] ) {
806
- $opts[ $k ] = $v['default'];
807
- }
808
- }
809
- foreach ( $options as $k => $v ) {
810
- switch ($k) {
811
- case $prefix . 'category':
812
- if ( empty( $v ) ) {
813
- // Get post type
814
- $type = isset( get_current_screen()->post_type )
815
- ? get_current_screen()->post_type
816
- : null;
817
- // Assign default from plugin options
818
- if ( ! empty( $type )
819
- && isset( $aioseop_options['modules'] )
820
- && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
821
- && isset( $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_'.$type.'_fb_object_type'] )
822
- )
823
- $options[ $prefix . 'category' ] =
824
- $aioseop_options['modules']['aiosp_opengraph_options']['aiosp_opengraph_'.$type.'_fb_object_type'];
825
- continue;
826
- }
827
- break;
828
- }
829
- if ( $v === null ) {
830
- unset( $options[ $k ] );
831
- }
832
- }
833
- $options = wp_parse_args( $options, $opts );
834
-
835
- return $options;
836
- }
837
-
838
- /**
839
- * Applies filter to metabox settings before they are saved.
840
- * Sets custom as default if a custom image is uploaded.
841
- * filter:{prefix}filter_metabox_options
842
- * filter:{prefix}filter_term_metabox_options
843
- *
844
- * @since 2.3.11
845
- * @since 2.4.14 Fixes for aioseop-pro #67 and other bugs found.
846
- *
847
- * @see [plugin]\admin\aioseop_module_class.php > save_post_data()
848
- * @see [this file] > save_tax_data()
849
- *
850
- * @param array $options List of current options.
851
- * @param string $location Location where filter is called.
852
- * @param int $id Either post_id or term_id.
853
- *
854
- * @return array
855
- */
856
- function filter_metabox_options( $options, $location, $post_id ) {
857
- if ( $location == 'settings' ) {
858
- $prefix = $this->get_prefix( $location ) . $location . '_';
859
- if ( isset( $options[ $prefix . 'customimg_checker' ] )
860
- && $options[ $prefix . 'customimg_checker' ]
861
- ) {
862
- $options[ $prefix . 'image' ] = $options[ $prefix . 'customimg' ];
863
- }
864
- }
865
- return $options;
866
- }
867
-
868
- /** Custom settings **/
869
- function display_custom_options( $buf, $args ) {
870
- if ( $args['name'] == 'aiosp_opengraph_scan_header' ) {
871
- $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;">';
872
- $args['options']['type'] = 'submit';
873
- $args['attr'] = " class='button-primary' ";
874
- $args['value'] = $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
875
- $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
876
- $buf .= '<br /><br />' . $this->get_option_html( $args );
877
- $buf .= '</div></div></div>';
878
- }
879
-
880
- return $buf;
881
- }
882
-
883
- function add_attributes( $output ) { // avoid having duplicate meta tags
884
- $type = $this->type;
885
- if ( empty( $type ) ) {
886
- $type = 'website';
887
- }
888
-
889
- $schema_types = Array(
890
- 'album' => 'MusicAlbum',
891
- 'article' => 'Article',
892
- 'bar' => 'BarOrPub',
893
- 'blog' => 'Blog',
894
- 'book' => 'Book',
895
- 'cafe' => 'CafeOrCoffeeShop',
896
- 'city' => 'City',
897
- 'country' => 'Country',
898
- 'episode' => 'Episode',
899
- 'food' => 'FoodEvent',
900
- 'game' => 'Game',
901
- 'hotel' => 'Hotel',
902
- 'landmark' => 'LandmarksOrHistoricalBuildings',
903
- 'movie' => 'Movie',
904
- 'product' => 'Product',
905
- 'profile' => 'ProfilePage',
906
- 'restaurant' => 'Restaurant',
907
- 'school' => 'School',
908
- 'sport' => 'SportsEvent',
909
- 'website' => 'WebSite',
910
- );
911
-
912
- if ( ! empty( $schema_types[ $type ] ) ) {
913
- $type = $schema_types[ $type ];
914
- } else {
915
- $type = 'WebSite';
916
- }
917
-
918
- $attributes = apply_filters( $this->prefix . 'attributes', Array(
919
- 'itemscope',
920
- 'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
921
- 'prefix="og: http://ogp.me/ns#"'
922
- ) );
923
-
924
- foreach ( $attributes as $attr ) {
925
- if ( strpos( $output, $attr ) === false ) {
926
- $output .= "\n\t$attr ";
927
- }
928
- }
929
-
930
- return $output;
931
- }
932
-
933
- /**
934
- * Add our social meta.
935
- *
936
- * @since 1.0.0
937
- * @since 2.3.11.5 Support for multiple fb_admins.
938
- * @since 2.3.13 Adds filter:aioseop_description on description.
939
- * @since 2.4.14 Fixes for aioseop-pro #67.
940
- * @since 2.3.15 Always do_shortcode on descriptions, removed for titles.
941
- *
942
- * @global object $post Current WP_Post object.
943
- * @global object $aiosp All in one seo plugin object.
944
- * @global array $aioseop_options All in one seo plugin options.
945
- * @global object $wp_query WP_Query global instance.
946
- */
947
- function add_meta() {
948
- global $post, $aiosp, $aioseop_options, $wp_query;
949
- $metabox = $this->get_current_options( array(), 'settings' );
950
- $key = $this->options['aiosp_opengraph_key'];
951
- $dimg = $this->options['aiosp_opengraph_dimg'];
952
- $current_post_type = get_post_type();
953
- $title = $description = $image = $video = '';
954
- $type = $this->type;
955
- $sitename = $this->options['aiosp_opengraph_sitename'];
956
-
957
- $appid = isset( $this->options['aiosp_opengraph_appid'] ) ? $this->options['aiosp_opengraph_appid'] : '';
958
-
959
- if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
960
- $first_page = false;
961
- if ( $aiosp->get_page_number() < 2 ) {
962
- $first_page = true;
963
- }
964
- } else {
965
- $first_page = true;
966
- }
967
- $url = $aiosp->aiosp_mrt_get_url( $wp_query );
968
- $url = apply_filters( 'aioseop_canonical_url', $url );
969
-
970
- $setmeta = $this->options['aiosp_opengraph_setmeta'];
971
- $social_links = '';
972
- if ( is_front_page() ) {
973
- $title = $this->options['aiosp_opengraph_hometitle'];
974
- if ( $first_page ) {
975
- $description = $this->options['aiosp_opengraph_description'];
976
- if ( empty( $description ) ){
977
- $description = get_bloginfo( 'description' );
978
- }
979
- }
980
- if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
981
- $thumbnail = $this->options['aiosp_opengraph_homeimage'];
982
- } else {
983
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
984
- }
985
-
986
- /* If Use AIOSEO Title and Desc Selected */
987
- if ( $setmeta ) {
988
- $title = $aiosp->wp_title();
989
- if ( $first_page ) {
990
- $description = $aiosp->get_aioseop_description( $post );
991
- }
992
- }
993
-
994
- /* Add some defaults */
995
- if ( empty( $title ) ) {
996
- $title = get_bloginfo( 'name' );
997
- }
998
- if ( empty( $sitename ) ) {
999
- $sitename = get_bloginfo( 'name' );
1000
- }
1001
-
1002
- if ( empty( $description ) && $first_page && ! empty( $post ) && ! post_password_required( $post ) ) {
1003
-
1004
- if ( ! empty( $post->post_content ) || ! empty( $post->post_excerpt ) ) {
1005
- $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ), 1000 );
1006
-
1007
- if ( ! empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) {
1008
- $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
1009
- }
1010
- }
1011
- }
1012
-
1013
- if ( empty( $description ) && $first_page ) {
1014
- $description = get_bloginfo( 'description' );
1015
- }
1016
- if ( ! empty( $this->options['aiosp_opengraph_profile_links'] ) ) {
1017
- $social_links = $this->options['aiosp_opengraph_profile_links'];
1018
- if ( ! empty( $this->options['aiosp_opengraph_social_name'] ) ) {
1019
- $social_name = $this->options['aiosp_opengraph_social_name'];
1020
- }else{
1021
- $social_name = '';
1022
- }
1023
- if ( $this->options['aiosp_opengraph_person_or_org'] == 'person' ) {
1024
- $social_type = "Person";
1025
- } else {
1026
- $social_type = "Organization";
1027
- }
1028
- }
1029
- } elseif ( is_singular() && $this->option_isset( 'types' )
1030
- && is_array( $this->options['aiosp_opengraph_types'] )
1031
- && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1032
- ) {
1033
-
1034
- if ( $type == 'article' ) {
1035
- if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1036
- $section = $metabox['aioseop_opengraph_settings_section'];
1037
- }
1038
- if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1039
- $tag = $metabox['aioseop_opengraph_settings_tag'];
1040
- }
1041
- if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1042
- $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1043
- }
1044
- }
1045
-
1046
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1047
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1048
- }
1049
-
1050
- if ( $type == 'article' && ! empty( $post ) ) {
1051
- if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1052
- $author = get_the_author_meta( 'facebook', $post->post_author );
1053
- }
1054
-
1055
- if ( isset( $post->post_date ) ) {
1056
- $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date ) );
1057
- }
1058
-
1059
- if ( isset( $post->post_modified ) ) {
1060
- $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified ) );
1061
- }
1062
- }
1063
-
1064
- $image = $metabox['aioseop_opengraph_settings_image'];
1065
- $video = $metabox['aioseop_opengraph_settings_video'];
1066
- $title = $metabox['aioseop_opengraph_settings_title'];
1067
- $description = $metabox['aioseop_opengraph_settings_desc'];
1068
-
1069
- /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1070
- global $aiosp;
1071
- if ( empty( $title ) ) {
1072
- $title = $aiosp->wp_title();
1073
- }
1074
- if ( empty( $description ) ) {
1075
- $description = trim( strip_tags( get_post_meta( $post->ID, "_aioseop_description", true ) ) );
1076
- }
1077
-
1078
- /* Add default title */
1079
- if ( empty( $title ) ) {
1080
- $title = get_the_title();
1081
- }
1082
-
1083
- // Add default description.
1084
- if ( empty( $description ) && ! post_password_required( $post ) ) {
1085
-
1086
- $description = $post->post_excerpt;
1087
-
1088
- if ( $this->options['aiosp_opengraph_generate_descriptions'] || empty( $description ) ){
1089
- $description = $post->post_content;
1090
- }
1091
-
1092
- }
1093
- if ( empty( $type ) ) {
1094
- $type = 'article';
1095
- }
1096
- } else if ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1097
- if ( isset( $this->options['aioseop_opengraph_settings_category'] ) )
1098
- $type = $this->options['aioseop_opengraph_settings_category'];
1099
- if ( isset( $metabox['aioseop_opengraph_settings_category'] ) )
1100
- $type = $metabox['aioseop_opengraph_settings_category'];
1101
- if ( $type == 'article' ) {
1102
- if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1103
- $section = $metabox['aioseop_opengraph_settings_section'];
1104
- }
1105
- if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1106
- $tag = $metabox['aioseop_opengraph_settings_tag'];
1107
- }
1108
- if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1109
- $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1110
- }
1111
- }
1112
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1113
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1114
- }
1115
- if ( $type == 'article' && ! empty( $post ) ) {
1116
- if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1117
- $author = get_the_author_meta( 'facebook', $post->post_author );
1118
- }
1119
- if ( isset( $post->post_date ) ) {
1120
- $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date ) );
1121
- }
1122
- if ( isset( $post->post_modified ) ) {
1123
- $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified ) );
1124
- }
1125
- }
1126
- $image = $metabox['aioseop_opengraph_settings_image'];
1127
- $video = $metabox['aioseop_opengraph_settings_video'];
1128
- $title = $metabox['aioseop_opengraph_settings_title'];
1129
- $description = $metabox['aioseop_opengraph_settings_desc'];
1130
- /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1131
- global $aiosp;
1132
- if ( empty( $title ) ) {
1133
- $title = $aiosp->wp_title();
1134
- }
1135
- if ( empty( $description ) ) {
1136
- $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1137
- $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1138
- $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1139
- }
1140
- // Add default title
1141
- if ( empty( $title ) ) {
1142
- $title = get_the_title();
1143
- }
1144
- // Add default description.
1145
- if ( empty( $description ) && ! post_password_required( $post ) ) {
1146
- $description = get_queried_object()->description;
1147
- }
1148
- if ( empty( $type ) ) {
1149
- $type = 'website';
1150
- }
1151
- } else if ( is_home() && ! is_front_page() ) {
1152
- // This is the blog page but not the homepage.
1153
- global $aiosp;
1154
- $image = $metabox['aioseop_opengraph_settings_image'];
1155
- $video = $metabox['aioseop_opengraph_settings_video'];
1156
- $title = $metabox['aioseop_opengraph_settings_title'];
1157
- $description = $metabox['aioseop_opengraph_settings_desc'];
1158
-
1159
- if ( empty( $description ) ) {
1160
- // If there's not social description, fall back to the SEO description.
1161
- $description = trim( strip_tags( get_post_meta( get_option( 'page_for_posts' ), '_aioseop_description', true ) ) );
1162
- }
1163
- if ( empty( $title ) ) {
1164
- $title = $aiosp->wp_title();
1165
- }
1166
- } else {
1167
- return;
1168
- }
1169
-
1170
- if ( $type === 'article' && !empty( $post ) && is_singular() ) {
1171
- if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1172
- if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1173
- $keywords = $aiosp->get_main_keywords();
1174
- $keywords = $this->apply_cf_fields( $keywords );
1175
- $keywords = apply_filters( 'aioseop_keywords', $keywords );
1176
- if ( ! empty( $keywords ) && ! empty( $tag ) ) {
1177
- $tag .= ',' . $keywords;
1178
- } elseif ( empty( $tag ) ) {
1179
- $tag = $keywords;
1180
- }
1181
- }
1182
- $tag = $aiosp->keyword_string_to_list( $tag );
1183
- if ( ! empty( $this->options['aiosp_opengraph_gen_categories'] ) ) {
1184
- $tag = array_merge( $tag, $aiosp->get_all_categories( $post->ID ) );
1185
- }
1186
- if ( ! empty( $this->options['aiosp_opengraph_gen_post_tags'] ) ) {
1187
- $tag = array_merge( $tag, $aiosp->get_all_tags( $post->ID ) );
1188
- }
1189
- }
1190
- if ( ! empty( $tag ) ) {
1191
- $tag = $aiosp->clean_keyword_list( $tag );
1192
- }
1193
- }
1194
-
1195
- if ( ! empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
1196
- $title = do_shortcode( $title );
1197
- }
1198
- if ( ! empty( $description ) ) {
1199
- $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
1200
- if ( ! empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
1201
- $description = do_shortcode( $description );
1202
- }
1203
- $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );
1204
- }
1205
-
1206
- $title = $this->apply_cf_fields( $title );
1207
- $description = $this->apply_cf_fields( $description );
1208
-
1209
- /* Data Validation */
1210
- $title = strip_tags( esc_attr( $title ) );
1211
- $sitename = strip_tags( esc_attr( $sitename ) );
1212
- $description = strip_tags( esc_attr( $description ) );
1213
-
1214
- if ( empty( $thumbnail ) && ! empty( $image ) ) {
1215
- $thumbnail = $image;
1216
- }
1217
-
1218
- /* Get the first image attachment on the post */
1219
- // if( empty($thumbnail) ) $thumbnail = $this->get_the_image();
1220
-
1221
- /* Add user supplied default image */
1222
- if ( empty( $thumbnail ) ) {
1223
- if ( empty( $this->options['aiosp_opengraph_defimg'] ) ) {
1224
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1225
- } else {
1226
- switch ( $this->options['aiosp_opengraph_defimg'] ) {
1227
- case 'featured' :
1228
- $thumbnail = $this->get_the_image_by_post_thumbnail();
1229
- break;
1230
- case 'attach' :
1231
- $thumbnail = $this->get_the_image_by_attachment();
1232
- break;
1233
- case 'content' :
1234
- $thumbnail = $this->get_the_image_by_scan();
1235
- break;
1236
- case 'custom' :
1237
- $meta_key = $this->options['aiosp_opengraph_meta_key'];
1238
- if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1239
- $meta_key = explode( ',', $meta_key );
1240
- $thumbnail = $this->get_the_image_by_meta_key( Array(
1241
- 'post_id' => $post->ID,
1242
- 'meta_key' => $meta_key,
1243
- ) );
1244
- }
1245
- break;
1246
- case 'auto' :
1247
- $thumbnail = $this->get_the_image();
1248
- break;
1249
- case 'author' :
1250
- $thumbnail = $this->get_the_image_by_author();
1251
- break;
1252
- default :
1253
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1254
- }
1255
- }
1256
- }
1257
-
1258
- if ( ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) ) {
1259
- $thumbnail = $this->options['aiosp_opengraph_dimg'];
1260
- }
1261
-
1262
- if ( ! empty( $thumbnail ) ) {
1263
- $thumbnail = esc_url( $thumbnail );
1264
- $thumbnail = set_url_scheme( $thumbnail );
1265
- }
1266
-
1267
- $width = $height = '';
1268
- if ( ! empty( $thumbnail ) ) {
1269
- if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1270
- $width = $metabox['aioseop_opengraph_settings_imagewidth'];
1271
- }
1272
- if ( ! empty( $metabox['aioseop_opengraph_settings_imageheight'] ) ) {
1273
- $height = $metabox['aioseop_opengraph_settings_imageheight'];
1274
- }
1275
- if ( empty( $width ) && ! empty( $this->options['aiosp_opengraph_dimgwidth'] ) ) {
1276
- $width = $this->options['aiosp_opengraph_dimgwidth'];
1277
- }
1278
- if ( empty( $height ) && ! empty( $this->options['aiosp_opengraph_dimgheight'] ) ) {
1279
- $height = $this->options['aiosp_opengraph_dimgheight'];
1280
- }
1281
- }
1282
-
1283
- if ( ! empty( $video ) ) {
1284
- if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1285
- $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
1286
- }
1287
- if ( ! empty( $metabox['aioseop_opengraph_settings_videoheight'] ) ) {
1288
- $videoheight = $metabox['aioseop_opengraph_settings_videoheight'];
1289
- }
1290
- }
1291
-
1292
- $card = 'summary';
1293
- if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1294
- $card = $this->options['aiosp_opengraph_defcard'];
1295
- }
1296
-
1297
- if ( ! empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) {
1298
- $card = $metabox['aioseop_opengraph_settings_setcard'];
1299
- }
1300
-
1301
- //support for changing legacy twitter cardtype-photo to summary large image
1302
- if ( $card == 'photo' ) {
1303
- $card = 'summary_large_image';
1304
- }
1305
-
1306
- $site = $domain = $creator = '';
1307
-
1308
- if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1309
- $site = $this->options['aiosp_opengraph_twitter_site'];
1310
- $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
1311
- }
1312
-
1313
- if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1314
- $domain = $this->options['aiosp_opengraph_twitter_domain'];
1315
- }
1316
-
1317
- if ( ! empty( $post ) && isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) {
1318
- $creator = get_the_author_meta( 'twitter', $post->post_author );
1319
- $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1320
- }
1321
-
1322
- if ( ! empty( $thumbnail ) ) {
1323
- $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1324
- }
1325
-
1326
- if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1327
- // Set Twitter image from custom.
1328
- $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1329
- }
1330
-
1331
- // Apply last filters.
1332
- $description = apply_filters( 'aioseop_description', $description );
1333
-
1334
- $meta = Array(
1335
- 'facebook' => Array(
1336
- 'title' => 'og:title',
1337
- 'type' => 'og:type',
1338
- 'url' => 'og:url',
1339
- 'thumbnail' => 'og:image',
1340
- 'width' => 'og:image:width',
1341
- 'height' => 'og:image:height',
1342
- 'video' => 'og:video',
1343
- 'videowidth' => 'og:video:width',
1344
- 'videoheight' => 'og:video:height',
1345
- 'sitename' => 'og:site_name',
1346
- 'key' => 'fb:admins',
1347
- 'appid' => 'fb:app_id',
1348
- 'description' => 'og:description',
1349
- 'section' => 'article:section',
1350
- 'tag' => 'article:tag',
1351
- 'publisher' => 'article:publisher',
1352
- 'author' => 'article:author',
1353
- 'published_time' => 'article:published_time',
1354
- 'modified_time' => 'article:modified_time',
1355
- ),
1356
- 'twitter' => Array(
1357
- 'card' => 'twitter:card',
1358
- 'site' => 'twitter:site',
1359
- 'creator' => 'twitter:creator',
1360
- 'domain' => 'twitter:domain',
1361
- 'title' => 'twitter:title',
1362
- 'description' => 'twitter:description',
1363
- 'twitter_thumbnail' => 'twitter:image',
1364
- ),
1365
- );
1366
-
1367
- // Only show if "use schema.org markup is checked".
1368
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
1369
- $meta['google+'] = Array( 'thumbnail' => 'image' );
1370
- }
1371
-
1372
- $tags = Array(
1373
- 'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
1374
- 'twitter' => Array( 'name' => 'name', 'value' => 'content' ),
1375
- 'google+' => Array( 'name' => 'itemprop', 'value' => 'content' ),
1376
- );
1377
-
1378
- foreach ( $meta as $t => $data ) {
1379
- foreach ( $data as $k => $v ) {
1380
- if ( empty( $$k ) ) {
1381
- $$k = '';
1382
- }
1383
- $filtered_value = $$k;
1384
- $filtered_value = apply_filters( $this->prefix . 'meta', $filtered_value, $t, $k );
1385
- if ( ! empty( $filtered_value ) ) {
1386
- if ( ! is_array( $filtered_value ) ) {
1387
- $filtered_value = Array( $filtered_value );
1388
- }
1389
-
1390
- /**
1391
- * This is to accomodate multiple fb:admins on separate lines.
1392
- * @TODO Eventually we'll want to put this in its own function so things like images work too.
1393
- */
1394
- if ( 'key' === $k ){
1395
- $fbadmins = explode( ',', str_replace(' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1396
- foreach( $fbadmins as $fbadmin){
1397
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
1398
- }
1399
- } else {
1400
- // For everything else.
1401
- foreach ( $filtered_value as $f ) {
1402
- echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $f . '" />' . "\n";
1403
- }
1404
- }
1405
- }
1406
- }
1407
- }
1408
- $social_link_schema = '';
1409
- if ( ! empty( $social_links ) ) {
1410
- $home_url = esc_url( get_home_url() );
1411
- $social_links = explode( "\n", $social_links );
1412
- foreach ( $social_links as $k => $v ) {
1413
- $v = trim( $v );
1414
- if ( empty( $v ) ) {
1415
- unset( $social_links[ $k ] );
1416
- } else {
1417
- $v = esc_url( $v );
1418
- $social_links[ $k ] = $v;
1419
- }
1420
- }
1421
- $social_links = join( '","', $social_links );
1422
- $social_link_schema = <<<END
1423
- <script type="application/ld+json">
1424
- { "@context" : "http://schema.org",
1425
- "@type" : "{$social_type}",
1426
- "name" : "{$social_name}",
1427
- "url" : "{$home_url}",
1428
- "sameAs" : ["{$social_links}"]
1429
- }
1430
- </script>
1431
-
1432
- END;
1433
- }
1434
- echo apply_filters( 'aiosp_opengraph_social_link_schema', $social_link_schema );
1435
- }
1436
-
1437
- /**
1438
- * Do / adds opengraph properties to meta.
1439
- * @since 2.3.11
1440
- *
1441
- * @global array $aioseop_options AIOSEOP plugin options.
1442
- */
1443
- public function do_opengraph() {
1444
- global $aioseop_options;
1445
- if ( ! empty( $aioseop_options )
1446
- && ! empty( $aioseop_options['aiosp_schema_markup'] )
1447
- )
1448
- add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1449
- if ( ! defined( 'DOING_AJAX' ) ) {
1450
- add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1451
- // Add social meta to AMP plugin.
1452
- if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true )
1453
- add_action( 'amp_post_template_head', array( &$this, 'add_meta' ), 12 );
1454
- }
1455
- }
1456
-
1457
- /**
1458
- * Set up types.
1459
- *
1460
- * @since ?
1461
- * @since 2.3.15 Change to website for homepage and blog post index page, default to object.
1462
- */
1463
- function type_setup() {
1464
- $this->type = 'object'; // Default to type object if we don't have some other rule.
1465
-
1466
- if ( is_home() || is_front_page() ) {
1467
- $this->type = 'website'; // Home page and blog page should be website.
1468
- } elseif ( is_singular() && $this->option_isset( 'types' ) ) {
1469
- $metabox = $this->get_current_options( Array(), 'settings' );
1470
- $current_post_type = get_post_type();
1471
- if ( ! empty( $metabox['aioseop_opengraph_settings_category'] ) ) {
1472
- $this->type = $metabox['aioseop_opengraph_settings_category'];
1473
- } elseif ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) {
1474
- $this->type = $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"];
1475
- }
1476
- }
1477
- }
1478
-
1479
- /**
1480
- * Inits hooks and others for admin init.
1481
- * action:admin_init.
1482
- *
1483
- * @since 2.3.11
1484
- * @since 2.4.14 Refactored function name, and new filter added for defaults and missing term metabox.
1485
- */
1486
- function admin_init() {
1487
- add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1488
- add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1489
- add_filter( $this->get_prefix( 'settings' ) . 'default_options', array( &$this, 'filter_default_options' ), 10, 2 );
1490
- add_filter( $this->get_prefix( 'settings' ) . 'filter_metabox_options', array(
1491
- &$this,
1492
- 'filter_metabox_options',
1493
- ), 10, 3 );
1494
- add_filter( $this->get_prefix( 'settings' ) . 'filter_term_metabox_options', array(
1495
- &$this,
1496
- 'filter_metabox_options',
1497
- ), 10, 3 );
1498
- $post_types = $this->get_post_type_titles();
1499
- $rempost = array( 'revision' => 1, 'nav_menu_item' => 1, 'custom_css' => 1, 'customize_changeset' => 1 );
1500
- $post_types = array_diff_key( $post_types, $rempost );
1501
- $this->default_options['types']['initial_options'] = $post_types;
1502
- foreach ( $post_types as $slug => $name ) {
1503
- $field = $slug . '_fb_object_type';
1504
- $this->default_options[ $field ] = Array(
1505
- 'name' => "$name " . __( 'Object Type', 'all-in-one-seo-pack' ) . "<br />($slug)",
1506
- 'type' => 'select',
1507
- 'style' => '',
1508
- 'initial_options' => $this->fb_object_types,
1509
- 'default' => 'article',
1510
- 'condshow' => Array( 'aiosp_opengraph_types\[\]' => $slug ),
1511
- );
1512
- $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1513
- $this->help_anchors[ $field ] = '#content-object-types';
1514
- $this->locations['opengraph']['options'][] = $field;
1515
- $this->layout['facebook']['options'][] = $field;
1516
- }
1517
- $this->setting_options();
1518
- $this->add_help_text_links();
1519
-
1520
- }
1521
-
1522
- function get_all_images( $options = null, $p = null ) {
1523
- static $img = Array();
1524
- if ( ! is_array( $options ) ) {
1525
- $options = Array();
1526
- }
1527
- if ( ! empty( $this->options['aiosp_opengraph_meta_key'] ) ) {
1528
- $options['meta_key'] = $this->options['aiosp_opengraph_meta_key'];
1529
- }
1530
- if ( empty( $img ) ) {
1531
- $size = apply_filters( 'post_thumbnail_size', 'large' );
1532
- $default = $this->get_the_image_by_default();
1533
- if ( ! empty( $default ) ) {
1534
- $default = set_url_scheme( $default );
1535
- $img[ $default ] = 0;
1536
- }
1537
- $img = array_merge( $img, parent::get_all_images( $options, null ) );
1538
- }
1539
-
1540
- if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1541
- $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1542
- }
1543
-
1544
- if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1545
- $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1546
- $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1547
- }
1548
-
1549
- if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1550
- $image["author"] = $author_img;
1551
- }
1552
- $image = array_flip( $img );
1553
- $images = Array();
1554
- if ( ! empty( $image ) ) {
1555
- foreach ( $image as $k => $v ) {
1556
- $images[ $v ] = '<img height=150 src="' . $v . '">';
1557
- }
1558
- }
1559
-
1560
- return Array( $image, $images );
1561
- }
1562
-
1563
- function get_the_image_by_author( $options = null, $p = null ) {
1564
- if ( $p === null ) {
1565
- global $post;
1566
- } else {
1567
- $post = $p;
1568
- }
1569
- if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
1570
- $matches = Array();
1571
- $get_avatar = get_avatar( $post->post_author, 300 );
1572
- if ( preg_match( "/src='(.*?)'/i", $get_avatar, $matches ) ) {
1573
- return $matches[1];
1574
- }
1575
- }
1576
-
1577
- return false;
1578
- }
1579
-
1580
- function get_the_image( $options = null, $p = null ) {
1581
- $meta_key = $this->options['aiosp_opengraph_meta_key'];
1582
-
1583
- return parent::get_the_image( Array( 'meta_key' => $meta_key ), $p );
1584
- }
1585
-
1586
- function get_the_image_by_default( $args = array() ) {
1587
- return $this->options['aiosp_opengraph_dimg'];
1588
- }
1589
-
1590
- function settings_update() {
1591
-
1592
- }
1593
-
1594
- /**
1595
- * Enqueue our file upload scripts and styles.
1596
- * @param $hook
1597
- */
1598
- function og_admin_enqueue_scripts($hook){
1599
-
1600
- if ( 'all-in-one-seo_page_aiosp_opengraph' != $hook && 'term.php' != $hook ) {
1601
- // Only enqueue if we're on the social module settings page.
1602
- return;
1603
- }
1604
-
1605
- wp_enqueue_script('media-upload');
1606
- wp_enqueue_script('thickbox');
1607
- wp_enqueue_style('thickbox');
1608
- wp_enqueue_media();
1609
- }
1610
-
1611
- function save_tax_data( $term_id, $tt_id, $taxonomy ) {
1612
- static $update = false;
1613
- if ( $update )
1614
- return;
1615
- if ( $this->locations !== null ) {
1616
- foreach ( $this->locations as $k => $v ) {
1617
- if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
1618
- $opts = $this->default_options( $k );
1619
- $options = array();
1620
- $update = false;
1621
- foreach ( $opts as $l => $o ) {
1622
- if ( isset( $_POST[ $l ] ) ) {
1623
- $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
1624
- $options[ $l ] = esc_attr( $options[ $l ] );
1625
- $update = true;
1626
- }
1627
- }
1628
- if ( $update ) {
1629
- $prefix = $this->get_prefix( $k );
1630
- $options = apply_filters( $prefix . 'filter_term_metabox_options', $options, $k, $term_id );
1631
- update_term_meta( $term_id, '_' . $prefix . $k, $options );
1632
- }
1633
- }
1634
- }
1635
- }
1636
- }
1637
-
1638
- /**
1639
- * Returns the placeholder filtered and ready for DOM display.
1640
- * filter:aioseop_opengraph_placeholder
1641
- * @since 2.4.14
1642
- *
1643
- * @param mixed $placeholder Placeholder to be filtered.
1644
- * @param string $type Type of the value to be filtered.
1645
- *
1646
- * @return string
1647
- */
1648
- public function filter_placeholder( $placeholder, $type = 'text' ) {
1649
- return strip_tags( trim( $placeholder ) );
1650
- }
1651
-
1652
- /**
1653
- * Returns filtered default options.
1654
- * filter:{prefix}default_options
1655
- * @since 2.4.13
1656
- *
1657
- * @param array $options Default options.
1658
- * @param string $location Location.
1659
- *
1660
- * @return array
1661
- */
1662
- public function filter_default_options( $options, $location ) {
1663
- if ( $location === 'settings' ) {
1664
- $prefix = $this->get_prefix( $location ) . $location . '_';
1665
- // Add image checker as default
1666
- $options[ $prefix . 'customimg_checker' ] = 0;
1667
- }
1668
- return $options;
1669
- }
1670
-
1671
- /**
1672
- * Returns facebook debug script and link.
1673
- * @since 2.4.14
1674
- *
1675
- * @return string
1676
- */
1677
- private function get_facebook_debug() {
1678
- ob_start();
1679
- ?>
1680
- <script>
1681
- jQuery(document).ready(function() {
1682
- var snippet = jQuery("#aioseop_snippet_link");
1683
- if ( snippet.length === 0 ) {
1684
- jQuery( "#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
1685
- } else {
1686
- snippet = snippet.html();
1687
- jQuery("#aioseop_opengraph_settings_facebook_debug")
1688
- .attr( "href", "https://developers.facebook.com/tools/debug/sharing/?q=" + snippet );
1689
- }
1690
- });
1691
- </script>
1692
- <a name="aioseop_opengraph_settings_facebook_debug"
1693
- id="aioseop_opengraph_settings_facebook_debug"
1694
- class="button-primary"
1695
- href=""
1696
- target="_blank"
1697
- ><?php echo __( 'Debug This Post', 'all-in-one-seo-pack' ); ?></a>
1698
- <?php
1699
- return ob_get_clean();
1700
- }
1701
- }
1702
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Opengraph class.
4
+ *
5
+ * @package All-in-One-SEO-Pack
6
+ * @version 2.3.16
7
+ */
8
+ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
9
+ class All_in_One_SEO_Pack_Opengraph extends All_in_One_SEO_Pack_Module {
10
+ var $fb_object_types;
11
+ var $type;
12
+
13
+ /**
14
+ * Module constructor.
15
+ *
16
+ * @since 2.3.14 Added display filter.
17
+ * @since 2.3.16 #1066 Force init on constructor.
18
+ */
19
+ function __construct() {
20
+ add_action( 'admin_enqueue_scripts', array( $this, 'og_admin_enqueue_scripts' ) );
21
+
22
+ $this->name = __( 'Social Meta', 'all-in-one-seo-pack' ); // Human-readable name of the plugin
23
+ $this->prefix = 'aiosp_opengraph_'; // option prefix
24
+ $this->file = __FILE__; // the current file
25
+ $this->fb_object_types = array(
26
+ 'Activities' => array(
27
+ 'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
28
+ 'sport' => __( 'Sport', 'all-in-one-seo-pack' ),
29
+ ),
30
+ 'Businesses' => array(
31
+ 'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
32
+ 'company' => __( 'Company', 'all-in-one-seo-pack' ),
33
+ 'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
34
+ 'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
35
+ 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' ),
36
+ ),
37
+ 'Groups' => array(
38
+ 'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
39
+ 'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
40
+ 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' ),
41
+ ),
42
+ 'Organizations' => array(
43
+ 'band' => __( 'Band', 'all-in-one-seo-pack' ),
44
+ 'government' => __( 'Government', 'all-in-one-seo-pack' ),
45
+ 'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
46
+ 'school' => __( 'School', 'all-in-one-seo-pack' ),
47
+ 'university' => __( 'University', 'all-in-one-seo-pack' ),
48
+ ),
49
+ 'People' => array(
50
+ 'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
51
+ 'athlete' => __( 'Athlete', 'all-in-one-seo-pack' ),
52
+ 'author' => __( 'Author', 'all-in-one-seo-pack' ),
53
+ 'director' => __( 'Director', 'all-in-one-seo-pack' ),
54
+ 'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
55
+ 'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
56
+ 'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
57
+ 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' ),
58
+ ),
59
+ 'Places' => array(
60
+ 'city' => __( 'City', 'all-in-one-seo-pack' ),
61
+ 'country' => __( 'Country', 'all-in-one-seo-pack' ),
62
+ 'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
63
+ 'state_province' => __( 'State Province', 'all-in-one-seo-pack' ),
64
+ ),
65
+ 'Products and Entertainment' => array(
66
+ 'album' => __( 'Album', 'all-in-one-seo-pack' ),
67
+ 'book' => __( 'Book', 'all-in-one-seo-pack' ),
68
+ 'drink' => __( 'Drink', 'all-in-one-seo-pack' ),
69
+ 'food' => __( 'Food', 'all-in-one-seo-pack' ),
70
+ 'game' => __( 'Game', 'all-in-one-seo-pack' ),
71
+ 'movie' => __( 'Movie', 'all-in-one-seo-pack' ),
72
+ 'product' => __( 'Product', 'all-in-one-seo-pack' ),
73
+ 'song' => __( 'Song', 'all-in-one-seo-pack' ),
74
+ 'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
75
+ 'episode' => __( 'Episode', 'all-in-one-seo-pack' ),
76
+ ),
77
+ 'Websites' => array(
78
+ 'article' => __( 'Article', 'all-in-one-seo-pack' ),
79
+ 'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
80
+ 'website' => __( 'Website', 'all-in-one-seo-pack' ),
81
+ ),
82
+ );
83
+ parent::__construct();
84
+
85
+ $this->help_text = array(
86
+ 'setmeta' => __( 'Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.', 'all-in-one-seo-pack' ),
87
+ 'key' => __( 'Enter your Facebook Admin ID here. You can enter multiple IDs separated by a comma. You can look up your Facebook ID using this tool http://findmyfbid.com/', 'all-in-one-seo-pack' ),
88
+ 'appid' => __( 'Enter your Facebook App ID here. Information about how to get your Facebook App ID can be found at https://developers.facebook.com/docs/apps/register', 'all-in-one-seo-pack' ),
89
+ 'title_shortcodes' => __( 'Run shortcodes that appear in social title meta tags.', 'all-in-one-seo-pack' ),
90
+ 'description_shortcodes' => __( 'Run shortcodes that appear in social description meta tags.', 'all-in-one-seo-pack' ),
91
+ 'sitename' => __( 'The Site Name is the name that is used to identify your website.', 'all-in-one-seo-pack' ),
92
+ 'hometitle' => __( 'The Home Title is the Open Graph title for your home page.', 'all-in-one-seo-pack' ),
93
+ 'description' => __( 'The Home Description is the Open Graph description for your home page.', 'all-in-one-seo-pack' ),
94
+ 'homeimage' => __( 'The Home Image is the Open Graph image for your home page.', 'all-in-one-seo-pack' ),
95
+ 'generate_descriptions' => __( 'This option will auto generate your Open Graph descriptions from your post content instead of your post excerpt. WooCommerce users should read the documentation regarding this setting.', 'all-in-one-seo-pack' ),
96
+ 'defimg' => __( 'This option lets you choose which image will be displayed by default for the Open Graph image. You may override this on individual posts.', 'all-in-one-seo-pack' ),
97
+ 'fallback' => __( 'This option lets you fall back to the default image if no image could be found above.', 'all-in-one-seo-pack' ),
98
+ 'dimg' => __( 'This option sets a default image that can be used for the Open Graph image. You can upload an image, select an image from your Media Library or paste the URL of an image here.', 'all-in-one-seo-pack' ),
99
+ 'dimgwidth' => __( 'This option lets you set a default width for your images, where unspecified.', 'all-in-one-seo-pack' ),
100
+ 'dimgheight' => __( 'This option lets you set a default height for your images, where unspecified.', 'all-in-one-seo-pack' ),
101
+ 'meta_key' => __( 'Enter the name of a custom field (or multiple field names separated by commas) to use that field to specify the Open Graph image on Pages or Posts.', 'all-in-one-seo-pack' ),
102
+ 'image' => __( 'This option lets you select the Open Graph image that will be used for this Page or Post, overriding the default settings.', 'all-in-one-seo-pack' ),
103
+ 'customimg' => __( 'This option lets you upload an image to use as the Open Graph image for this Page or Post.', 'all-in-one-seo-pack' ),
104
+ 'imagewidth' => __( 'Enter the width for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
105
+ 'imageheight' => __( 'Enter the height for your Open Graph image in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
106
+ 'video' => __( 'This option lets you specify a link to the Open Graph video used on this Page or Post.', 'all-in-one-seo-pack' ),
107
+ 'videowidth' => __( 'Enter the width for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
108
+ 'videoheight' => __( 'Enter the height for your Open Graph video in pixels (i.e. 600).', 'all-in-one-seo-pack' ),
109
+ 'defcard' => __( 'Select the default type of Twitter Card to display.', 'all-in-one-seo-pack' ),
110
+ 'setcard' => __( 'Select the Twitter Card type to use for this Page or Post, overriding the default setting.', 'all-in-one-seo-pack' ),
111
+ 'twitter_site' => __( 'Enter the Twitter username associated with your website here.', 'all-in-one-seo-pack' ),
112
+ 'twitter_creator' => __( 'Allows your authors to be identified by their Twitter usernames as content creators on the Twitter cards for their posts.', 'all-in-one-seo-pack' ),
113
+ 'twitter_domain' => __( 'Enter the name of your website here.', 'all-in-one-seo-pack' ),
114
+ 'customimg_twitter' => __( 'This option lets you upload an image to use as the Twitter image for this Page or Post.', 'all-in-one-seo-pack' ),
115
+ 'gen_tags' => __( 'Automatically generate article tags for Facebook type article when not provided.', 'all-in-one-seo-pack' ),
116
+ 'gen_keywords' => __( 'Use keywords in generated article tags.', 'all-in-one-seo-pack' ),
117
+ 'gen_categories' => __( 'Use categories in generated article tags.', 'all-in-one-seo-pack' ),
118
+ 'gen_post_tags' => __( 'Use post tags in generated article tags.', 'all-in-one-seo-pack' ),
119
+ 'types' => __( 'Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.', 'all-in-one-seo-pack' ),
120
+ 'title' => __( 'This is the Open Graph title of this Page or Post.', 'all-in-one-seo-pack' ),
121
+ 'desc' => __( 'This is the Open Graph description of this Page or Post.', 'all-in-one-seo-pack' ),
122
+ 'category' => __( 'Select the Open Graph type that best describes the content of this Page or Post.', 'all-in-one-seo-pack' ),
123
+ 'facebook_debug' => __( 'Press this button to have Facebook re-fetch and debug this page.', 'all-in-one-seo-pack' ),
124
+ 'section' => __( 'This Open Graph meta allows you to add a general section name that best describes this content.', 'all-in-one-seo-pack' ),
125
+ 'tag' => __( 'This Open Graph meta allows you to add a list of keywords that best describe this content.', 'all-in-one-seo-pack' ),
126
+ 'facebook_publisher' => __( 'Link articles to the Facebook page associated with your website.', 'all-in-one-seo-pack' ),
127
+ 'facebook_author' => __( 'Allows your authors to be identified by their Facebook pages as content authors on the Opengraph meta for their articles.', 'all-in-one-seo-pack' ),
128
+ 'person_or_org' => __( 'Are the social profile links for your website for a person or an organization?', 'all-in-one-seo-pack' ),
129
+ 'profile_links' => __( "Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack' ),
130
+ 'social_name' => __( 'Add the name of the person or organization who owns these profiles.', 'all-in-one-seo-pack' ),
131
+ );
132
+
133
+ $this->help_anchors = array(
134
+ 'title_shortcodes' => '#run-shortcodes-in-title',
135
+ 'description_shortcodes' => '#run-shortcodes-in-description',
136
+ 'generate_descriptions' => '#auto-generate-og-descriptions',
137
+ 'setmeta' => '#use-aioseo-title-and-description',
138
+ 'sitename' => '#site-name',
139
+ 'hometitle' => '#home-title-and-description',
140
+ 'description' => '#home-title-and-description',
141
+ 'homeimage' => '#home-image',
142
+ 'defimg' => '#select-og-image-source',
143
+ 'fallback' => '#use-default-if-no-image-found',
144
+ 'dimg' => '#default-og-image',
145
+ 'dimgwidth' => '#default-image-width',
146
+ 'dimgheight' => '#default-image-height',
147
+ 'meta_key' => '#use-custom-field-for-image',
148
+ 'profile_links' => '#social-profile-links',
149
+ 'person_or_org' => '#social-profile-links',
150
+ 'social_name' => '#social-profile-links',
151
+ 'key' => '#facebook-admin-id',
152
+ 'appid' => '#facebook-app-id',
153
+ 'gen_tags' => '#automatically-generate-article-tags',
154
+ 'gen_keywords' => '#use-keywords-in-article-tags',
155
+ 'gen_categories' => '#use-categories-in-article-tags',
156
+ 'gen_post_tags' => '#use-post-tags-in-article-tags',
157
+ 'facebook_publisher' => '#show-facebook-publisher-on-articles',
158
+ 'facebook_author' => '#show-facebook-author-on-articles',
159
+ 'types' => '#enable-facebook-meta-for',
160
+ 'defcard' => '#default-twitter-card',
161
+ 'twitter_site' => '#twitter-site',
162
+ 'twitter_creator' => '#show-twitter-author',
163
+ 'twitter_domain' => '#twitter-domain',
164
+ 'scan_header' => '#scan-social-meta',
165
+ 'title' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#title',
166
+ 'desc' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#description',
167
+ 'image' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#image',
168
+ 'customimg' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-image',
169
+ 'imagewidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
170
+ 'imageheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
171
+ 'video' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-video',
172
+ 'videowidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
173
+ 'videoheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
174
+ 'category' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-object-type',
175
+ 'facebook_debug' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-debug',
176
+ 'section' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-section',
177
+ 'tag' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-tags',
178
+ 'setcard' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#twitter-card-type',
179
+ 'customimg_twitter' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-twitter-image',
180
+ );
181
+
182
+ if ( is_admin() ) {
183
+ add_action( 'admin_init', array( $this, 'admin_init' ), 5 );
184
+ } else {
185
+ add_action( 'wp', array( $this, 'type_setup' ) );
186
+ }
187
+
188
+ if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {
189
+ $this->do_opengraph();
190
+ }
191
+ // Set variables after WordPress load.
192
+ add_action( 'init', array( &$this, 'init' ), 999999 );
193
+ add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
194
+ // Force refresh of Facebook cache.
195
+ add_action( 'post_updated', array( &$this, 'force_fb_refresh_update' ), 10, 3 );
196
+ add_action( 'transition_post_status', array( &$this, 'force_fb_refresh_transition' ), 10, 3 );
197
+ add_action( 'edited_term', array( &$this, 'save_tax_data' ), 10, 3 );
198
+ // Adds special filters
199
+ add_filter( 'aioseop_opengraph_placeholder', array( &$this, 'filter_placeholder' ) );
200
+ // Call to init to generate menus
201
+ $this->init();
202
+ }
203
+
204
+ /**
205
+ * Hook called after WordPress has been loaded.
206
+ * @since 2.4.14
207
+ */
208
+ public function init() {
209
+ $count_desc = __( ' characters. Open Graph allows up to a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
210
+ // Create default options
211
+ $this->default_options = array(
212
+ 'scan_header' => array(
213
+ 'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
214
+ 'type' => 'custom',
215
+ 'save' => true,
216
+ ),
217
+ 'setmeta' => array(
218
+ 'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
219
+ 'type' => 'checkbox',
220
+ ),
221
+ 'key' => array(
222
+ 'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
223
+ 'default' => '',
224
+ 'type' => 'text',
225
+ ),
226
+ 'appid' => array(
227
+ 'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
228
+ 'default' => '',
229
+ 'type' => 'text',
230
+ ),
231
+ 'title_shortcodes' => array(
232
+ 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ),
233
+ ),
234
+ 'description_shortcodes' => array(
235
+ 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ),
236
+ ),
237
+ 'sitename' => array(
238
+ 'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
239
+ 'default' => get_bloginfo( 'name' ),
240
+ 'type' => 'text',
241
+ ),
242
+ 'hometitle' => array(
243
+ 'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
244
+ 'default' => '',
245
+ 'type' => 'textarea',
246
+ 'condshow' => array(
247
+ 'aiosp_opengraph_setmeta' => array(
248
+ 'lhs' => 'aiosp_opengraph_setmeta',
249
+ 'op' => '!=',
250
+ 'rhs' => 'on',
251
+ ),
252
+ ),
253
+ ),
254
+ 'description' => array(
255
+ 'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
256
+ 'default' => '',
257
+ 'type' => 'textarea',
258
+ 'condshow' => array(
259
+ 'aiosp_opengraph_setmeta' => array(
260
+ 'lhs' => 'aiosp_opengraph_setmeta',
261
+ 'op' => '!=',
262
+ 'rhs' => 'on',
263
+ ),
264
+ ),
265
+ ),
266
+ 'homeimage' => array(
267
+ 'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
268
+ 'type' => 'image',
269
+ ),
270
+ 'generate_descriptions' => array(
271
+ 'name' => __( 'Use Content For Autogenerated OG Descriptions', 'all-in-one-seo-pack' ),
272
+ 'default' => 0,
273
+ ),
274
+ 'defimg' => array(
275
+ 'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
276
+ 'type' => 'select',
277
+ 'initial_options' => array(
278
+ '' => __( 'Default Image' ),
279
+ 'featured' => __( 'Featured Image' ),
280
+ 'attach' => __( 'First Attached Image' ),
281
+ 'content' => __( 'First Image In Content' ),
282
+ 'custom' => __( 'Image From Custom Field' ),
283
+ 'author' => __( 'Post Author Image' ),
284
+ 'auto' => __( 'First Available Image' ),
285
+ ),
286
+ ),
287
+ 'fallback' => array(
288
+ 'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
289
+ 'type' => 'checkbox',
290
+ ),
291
+ 'dimg' => array(
292
+ 'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
293
+ 'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
294
+ 'type' => 'image',
295
+ ),
296
+ 'dimgwidth' => array(
297
+ 'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
298
+ 'type' => 'text',
299
+ 'default' => '',
300
+ ),
301
+ 'dimgheight' => array(
302
+ 'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
303
+ 'type' => 'text',
304
+ 'default' => '',
305
+ ),
306
+ 'meta_key' => array(
307
+ 'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
308
+ 'type' => 'text',
309
+ 'default' => '',
310
+ ),
311
+ 'image' => array(
312
+ 'name' => __( 'Image', 'all-in-one-seo-pack' ),
313
+ 'type' => 'radio',
314
+ 'initial_options' => array(
315
+ 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">',
316
+ ),
317
+ ),
318
+ 'customimg' => array(
319
+ 'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
320
+ 'type' => 'image',
321
+ ),
322
+ 'imagewidth' => array(
323
+ 'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
324
+ 'type' => 'text',
325
+ 'default' => '',
326
+ ),
327
+ 'imageheight' => array(
328
+ 'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
329
+ 'type' => 'text',
330
+ 'default' => '',
331
+ ),
332
+ 'video' => array(
333
+ 'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
334
+ 'type' => 'text',
335
+ ),
336
+ 'videowidth' => array(
337
+ 'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
338
+ 'type' => 'text',
339
+ 'default' => '',
340
+ 'condshow' => array(
341
+ 'aioseop_opengraph_settings_video' => array(
342
+ 'lhs' => 'aioseop_opengraph_settings_video',
343
+ 'op' => '!=',
344
+ 'rhs' => '',
345
+ ),
346
+ ),
347
+ ),
348
+ 'videoheight' => array(
349
+ 'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
350
+ 'type' => 'text',
351
+ 'default' => '',
352
+ 'condshow' => array(
353
+ 'aioseop_opengraph_settings_video' => array(
354
+ 'lhs' => 'aioseop_opengraph_settings_video',
355
+ 'op' => '!=',
356
+ 'rhs' => '',
357
+ ),
358
+ ),
359
+ ),
360
+ 'defcard' => array(
361
+ 'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
362
+ 'type' => 'select',
363
+ 'default' => 'summary',
364
+ 'initial_options' => array(
365
+ 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
366
+ 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
367
+
368
+ /*
369
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
370
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
371
+ */
372
+ ),
373
+ ),
374
+ 'setcard' => array(
375
+ 'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
376
+ 'type' => 'select',
377
+ 'initial_options' => array(
378
+ 'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
379
+ 'summary' => __( 'Summary', 'all-in-one-seo-pack' ),
380
+
381
+ /*
382
+ REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE
383
+ 'photo' => __( 'Photo', 'all-in-one-seo-pack' )
384
+ */
385
+ ),
386
+ ),
387
+ 'twitter_site' => array(
388
+ 'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
389
+ 'type' => 'text',
390
+ 'default' => '',
391
+ ),
392
+ 'twitter_creator' => array(
393
+ 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' ),
394
+ ),
395
+ 'twitter_domain' => array(
396
+ 'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
397
+ 'type' => 'text',
398
+ 'default' => '',
399
+ ),
400
+ 'customimg_twitter' => array(
401
+ 'name' => __( 'Custom Twitter Image', 'all-in-one-seo-pack' ),
402
+ 'type' => 'image',
403
+ ),
404
+ 'gen_tags' => array(
405
+ 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' ),
406
+ ),
407
+ 'gen_keywords' => array(
408
+ 'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
409
+ 'default' => 'on',
410
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
411
+ ),
412
+ 'gen_categories' => array(
413
+ 'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
414
+ 'default' => 'on',
415
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
416
+ ),
417
+ 'gen_post_tags' => array(
418
+ 'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
419
+ 'default' => 'on',
420
+ 'condshow' => array( 'aiosp_opengraph_gen_tags' => 'on' ),
421
+ ),
422
+ 'types' => array(
423
+ 'name' => __( 'Enable Facebook Meta for Post Types', 'all-in-one-seo-pack' ),
424
+ 'type' => 'multicheckbox',
425
+ 'default' => array( 'post' => 'post', 'page' => 'page' ),
426
+ 'initial_options' => $this->get_post_type_titles( array( '_builtin' => false ) ),
427
+ ),
428
+ 'title' => array(
429
+ 'name' => __( 'Title', 'all-in-one-seo-pack' ),
430
+ 'default' => '',
431
+ 'type' => 'text',
432
+ 'size' => 95,
433
+ 'count' => 1,
434
+ 'count_desc' => $count_desc,
435
+ ),
436
+ 'desc' => array(
437
+ 'name' => __( 'Description', 'all-in-one-seo-pack' ),
438
+ 'default' => '',
439
+ 'type' => 'textarea',
440
+ 'cols' => 250,
441
+ 'rows' => 4,
442
+ 'count' => 1,
443
+ 'count_desc' => $count_desc,
444
+ ),
445
+ 'category' => array(
446
+ 'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
447
+ 'type' => 'select',
448
+ 'style' => '',
449
+ 'default' => '',
450
+ 'initial_options' => $this->fb_object_types,
451
+ ),
452
+ 'facebook_debug' => array(
453
+ 'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
454
+ 'type' => 'html',
455
+ 'save' => false,
456
+ 'default' => $this->get_facebook_debug(),
457
+ ),
458
+ 'section' => array(
459
+ 'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
460
+ 'type' => 'text',
461
+ 'default' => '',
462
+ 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
463
+ ),
464
+ 'tag' => array(
465
+ 'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
466
+ 'type' => 'text',
467
+ 'default' => '',
468
+ 'condshow' => array( 'aioseop_opengraph_settings_category' => 'article' ),
469
+ ),
470
+ 'facebook_publisher' => array(
471
+ 'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
472
+ 'type' => 'text',
473
+ 'default' => '',
474
+ ),
475
+ 'facebook_author' => array(
476
+ 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ),
477
+ ),
478
+ 'profile_links' => array(
479
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
480
+ 'type' => 'textarea',
481
+ 'cols' => 60,
482
+ 'rows' => 5,
483
+ ),
484
+ 'person_or_org' => array(
485
+ 'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
486
+ 'type' => 'radio',
487
+ 'initial_options' => array(
488
+ 'person' => __( 'Person', 'all-in-one-seo-pack' ),
489
+ 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
490
+ ),
491
+ ),
492
+ 'social_name' => array(
493
+ 'name' => __( 'Associated Name', 'all-in-one-seo-pack' ),
494
+ 'type' => 'text',
495
+ 'default' => '',
496
+ ),
497
+ );
498
+ // load initial options / set defaults
499
+ $this->update_options();
500
+ $display = array();
501
+ if ( isset( $this->options['aiosp_opengraph_types'] ) && ! empty( $this->options['aiosp_opengraph_types'] ) ) {
502
+ $display = $this->options['aiosp_opengraph_types'];
503
+ }
504
+ $this->locations = array(
505
+ 'opengraph' => array(
506
+ 'name' => $this->name,
507
+ 'prefix' => 'aiosp_',
508
+ 'type' => 'settings',
509
+ 'options' => array(
510
+ 'scan_header',
511
+ 'setmeta',
512
+ 'key',
513
+ 'appid',
514
+ 'sitename',
515
+ 'title_shortcodes',
516
+ 'description_shortcodes',
517
+ 'hometitle',
518
+ 'description',
519
+ 'homeimage',
520
+ 'generate_descriptions',
521
+ 'defimg',
522
+ 'fallback',
523
+ 'dimg',
524
+ 'dimgwidth',
525
+ 'dimgheight',
526
+ 'meta_key',
527
+ 'defcard',
528
+ 'profile_links',
529
+ 'person_or_org',
530
+ 'social_name',
531
+ 'twitter_site',
532
+ 'twitter_creator',
533
+ 'twitter_domain',
534
+ 'gen_tags',
535
+ 'gen_keywords',
536
+ 'gen_categories',
537
+ 'gen_post_tags',
538
+ 'types',
539
+ 'facebook_publisher',
540
+ 'facebook_author',
541
+ ),
542
+ ),
543
+ 'settings' => array(
544
+ 'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
545
+ 'type' => 'metabox',
546
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/',
547
+ 'options' => array(
548
+ 'title',
549
+ 'desc',
550
+ 'image',
551
+ 'customimg',
552
+ 'imagewidth',
553
+ 'imageheight',
554
+ 'video',
555
+ 'videowidth',
556
+ 'videoheight',
557
+ 'category',
558
+ 'facebook_debug',
559
+ 'section',
560
+ 'tag',
561
+ 'setcard',
562
+ 'customimg_twitter',
563
+ ),
564
+ 'display' => apply_filters( 'aioseop_opengraph_display', $display ),
565
+ 'prefix' => 'aioseop_opengraph_',
566
+ ),
567
+ );
568
+ $this->layout = array(
569
+ 'home' => array(
570
+ 'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
571
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
572
+ 'options' => array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage' ),
573
+ ),
574
+ 'image' => array(
575
+ 'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
576
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
577
+ 'options' => array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
578
+ ),
579
+ 'links' => array(
580
+ 'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
581
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#social-profile-links',
582
+ 'options' => array( 'profile_links', 'person_or_org', 'social_name' ),
583
+ ),
584
+ 'facebook' => array(
585
+ 'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
586
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
587
+ 'options' => array(
588
+ 'key',
589
+ 'appid',
590
+ 'types',
591
+ 'gen_tags',
592
+ 'gen_keywords',
593
+ 'gen_categories',
594
+ 'gen_post_tags',
595
+ 'facebook_publisher',
596
+ 'facebook_author',
597
+ ),
598
+ ),
599
+ 'twitter' => array(
600
+ 'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
601
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
602
+ 'options' => array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
603
+ ),
604
+ 'default' => array(
605
+ 'name' => __( 'Advanced Settings', 'all-in-one-seo-pack' ),
606
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
607
+ 'options' => array(), // this is set below, to the remaining options -- pdb
608
+ ),
609
+ 'scan_meta' => array(
610
+ 'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
611
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
612
+ 'options' => array( 'scan_header' ),
613
+ ),
614
+ );
615
+ $other_options = array();
616
+ foreach ( $this->layout as $k => $v ) {
617
+ $other_options = array_merge( $other_options, $v['options'] );
618
+ }
619
+
620
+ $this->layout['default']['options'] = array_diff( array_keys( $this->default_options ), $other_options );
621
+ }
622
+
623
+ /**
624
+ * Forces FaceBook OpenGraph to refresh its cache when a post is changed to
625
+ *
626
+ * @param $new_status
627
+ * @param $old_status
628
+ * @param $post
629
+ *
630
+ * @todo this and force_fb_refresh_update can probably have the remote POST extracted out.
631
+ *
632
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
633
+ * @since 2.3.11
634
+ */
635
+ function force_fb_refresh_transition( $new_status, $old_status, $post ) {
636
+ if ( 'publish' !== $new_status ) {
637
+ return;
638
+ }
639
+ if ( 'future' !== $old_status ) {
640
+ return;
641
+ }
642
+
643
+ $current_post_type = get_post_type();
644
+
645
+ // Only ping Facebook if Social SEO is enabled on this post type.
646
+ if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
647
+ $post_url = aioseop_get_permalink( $post->ID );
648
+ $endpoint = sprintf(
649
+ 'https://graph.facebook.com/?%s', http_build_query(
650
+ array(
651
+ 'id' => $post_url,
652
+ 'scrape' => true,
653
+ )
654
+ )
655
+ );
656
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
657
+ }
658
+ }
659
+
660
+ /**
661
+ * Forces FaceBook OpenGraph refresh on update.
662
+ *
663
+ * @param $post_id
664
+ * @param $post_after
665
+ *
666
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
667
+ * @since 2.3.11
668
+ */
669
+ function force_fb_refresh_update( $post_id, $post_after ) {
670
+
671
+ $current_post_type = get_post_type();
672
+
673
+ // Only ping Facebook if Social SEO is enabled on this post type.
674
+ if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
675
+ $post_url = aioseop_get_permalink( $post_id );
676
+ $endpoint = sprintf(
677
+ 'https://graph.facebook.com/?%s', http_build_query(
678
+ array(
679
+ 'id' => $post_url,
680
+ 'scrape' => true,
681
+ )
682
+ )
683
+ );
684
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
685
+ }
686
+ }
687
+
688
+ function settings_page_init() {
689
+ add_filter( 'aiosp_output_option', array( $this, 'display_custom_options' ), 10, 2 );
690
+ }
691
+
692
+ function filter_options( $options, $location ) {
693
+ if ( $location == 'settings' ) {
694
+ $prefix = $this->get_prefix( $location ) . $location . '_';
695
+ list( $legacy, $images ) = $this->get_all_images( $options );
696
+ if ( isset( $options ) && isset( $options[ "{$prefix}image" ] ) ) {
697
+ $thumbnail = $options[ "{$prefix}image" ];
698
+ if ( ctype_digit( (string) $thumbnail ) || ( $thumbnail == 'post' ) ) {
699
+ if ( $thumbnail == 'post' ) {
700
+ $thumbnail = $images['post1'];
701
+ } elseif ( ! empty( $legacy[ $thumbnail ] ) ) {
702
+ $thumbnail = $legacy[ $thumbnail ];
703
+ }
704
+ }
705
+ $options[ "{$prefix}image" ] = $thumbnail;
706
+ }
707
+ if ( empty( $options[ $prefix . 'image' ] ) ) {
708
+ $img = array_keys( $images );
709
+ if ( ! empty( $img ) && ! empty( $img[1] ) ) {
710
+ $options[ $prefix . 'image' ] = $img[1];
711
+ }
712
+ }
713
+ }
714
+
715
+ return $options;
716
+ }
717
+
718
+ /**
719
+ * Applies filter to module settings.
720
+ *
721
+ * @since 2.3.11
722
+ * @since 2.4.14 Added filter for description and title placeholders.
723
+ * @since 2.3.15 do_shortcode on description.
724
+ *
725
+ * @see [plugin]\admin\aioseop_module_class.php > display_options()
726
+ */
727
+ function filter_settings( $settings, $location, $current ) {
728
+ global $aiosp, $post;
729
+ if ( $location == 'opengraph' || $location == 'settings' ) {
730
+ $prefix = $this->get_prefix( $location ) . $location . '_';
731
+ if ( $location == 'opengraph' ) {
732
+ return $settings;
733
+ }
734
+ if ( $location == 'settings' ) {
735
+ list( $legacy, $settings[ $prefix . 'image' ]['initial_options'] ) = $this->get_all_images( $current );
736
+ $opts = array( 'title', 'desc' );
737
+ $current_post_type = get_post_type();
738
+ if ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
739
+ $flat_type_list = array();
740
+ foreach ( $this->fb_object_types as $k => $v ) {
741
+ if ( is_array( $v ) ) {
742
+ $flat_type_list = array_merge( $flat_type_list, $v );
743
+ } else {
744
+ $flat_type_list[ $k ] = $v;
745
+ }
746
+ }
747
+ $settings[ $prefix . 'category' ]['initial_options'] = array_merge(
748
+ array(
749
+ $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
750
+ . $flat_type_list[ $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ],
751
+ ),
752
+ $settings[ $prefix . 'category' ]['initial_options']
753
+ );
754
+ }
755
+ if ( isset( $this->options['aiosp_opengraph_defcard'] ) ) {
756
+ $settings[ $prefix . 'setcard' ]['default'] = $this->options['aiosp_opengraph_defcard'];
757
+ }
758
+ $info = $aiosp->get_page_snippet_info();
759
+ // @codingStandardsIgnoreStart
760
+ extract( $info );
761
+ // @codingStandardsIgnoreEnd
762
+
763
+ // Description options
764
+ if ( is_object( $post ) ) {
765
+ // Always show excerpt
766
+ $description = empty( $this->options['aiosp_opengraph_generate_descriptions'] )
767
+ ? $aiosp->trim_excerpt_without_filters(
768
+ $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ),
769
+ 1000
770
+ )
771
+ : $aiosp->trim_excerpt_without_filters(
772
+ $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ),
773
+ 1000
774
+ );
775
+ }
776
+
777
+ // Add filters
778
+ $description = apply_filters( 'aioseop_description', $description );
779
+ // Add placholders
780
+ $settings[ "{$prefix}title" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $title );
781
+ $settings[ "{$prefix}desc" ]['placeholder'] = apply_filters( 'aioseop_opengraph_placeholder', $description );
782
+ }
783
+ if ( isset( $current[ $prefix . 'setmeta' ] ) && $current[ $prefix . 'setmeta' ] ) {
784
+ foreach ( $opts as $opt ) {
785
+ if ( isset( $settings[ $prefix . $opt ] ) ) {
786
+ $settings[ $prefix . $opt ]['type'] = 'hidden';
787
+ $settings[ $prefix . $opt ]['label'] = 'none';
788
+ $settings[ $prefix . $opt ]['help_text'] = '';
789
+ unset( $settings[ $prefix . $opt ]['count'] );
790
+ }
791
+ }
792
+ }
793
+ }
794
+
795
+ return $settings;
796
+ }
797
+
798
+ /**
799
+ * Applies filter to module options.
800
+ * These will display in the "Social Settings" object tab.
801
+ * filter:{prefix}override_options
802
+ *
803
+ * @since 2.3.11
804
+ * @since 2.4.14 Overrides empty og:type values.
805
+ *
806
+ * @see [plugin]\admin\aioseop_module_class.php > display_options()
807
+ *
808
+ * @global array $aioseop_options Plugin options.
809
+ *
810
+ * @param array $options Current options.
811
+ * @param string $location Location where filter is called.
812
+ * @param array $settings Settings.
813
+ *
814
+ * @return array
815
+ */
816
+ function override_options( $options, $location, $settings ) {
817
+ global $aioseop_options;
818
+ // Prepare default and prefix
819
+ $prefix = $this->get_prefix( $location ) . $location . '_';
820
+ $opts = array();
821
+ foreach ( $settings as $k => $v ) {
822
+ if ( $v['save'] ) {
823
+ $opts[ $k ] = $v['default'];
824
+ }
825
+ }
826
+ foreach ( $options as $k => $v ) {
827
+ switch ( $k ) {
828
+ case $prefix . 'category':
829
+ if ( empty( $v ) ) {
830
+ // Get post type
831
+ $type = isset( get_current_screen()->post_type )
832
+ ? get_current_screen()->post_type
833
+ : null;
834
+ // Assign default from plugin options
835
+ if ( ! empty( $type )
836
+ && isset( $aioseop_options['modules'] )
837
+ && isset( $aioseop_options['modules']['aiosp_opengraph_options'] )
838
+ && isset( $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ] )
839
+ ) {
840
+ $options[ $prefix . 'category' ] =
841
+ $aioseop_options['modules']['aiosp_opengraph_options'][ 'aiosp_opengraph_' . $type . '_fb_object_type' ];
842
+ }
843
+ continue;
844
+ }
845
+ break;
846
+ }
847
+ if ( $v === null ) {
848
+ unset( $options[ $k ] );
849
+ }
850
+ }
851
+ $options = wp_parse_args( $options, $opts );
852
+
853
+ return $options;
854
+ }
855
+
856
+ /**
857
+ * Applies filter to metabox settings before they are saved.
858
+ * Sets custom as default if a custom image is uploaded.
859
+ * filter:{prefix}filter_metabox_options
860
+ * filter:{prefix}filter_term_metabox_options
861
+ *
862
+ * @since 2.3.11
863
+ * @since 2.4.14 Fixes for aioseop-pro #67 and other bugs found.
864
+ *
865
+ * @see [plugin]\admin\aioseop_module_class.php > save_post_data()
866
+ * @see [this file] > save_tax_data()
867
+ *
868
+ * @param array $options List of current options.
869
+ * @param string $location Location where filter is called.
870
+ * @param int $id Either post_id or term_id.
871
+ *
872
+ * @return array
873
+ */
874
+ function filter_metabox_options( $options, $location, $post_id ) {
875
+ if ( $location == 'settings' ) {
876
+ $prefix = $this->get_prefix( $location ) . $location . '_';
877
+ if ( isset( $options[ $prefix . 'customimg_checker' ] )
878
+ && $options[ $prefix . 'customimg_checker' ]
879
+ ) {
880
+ $options[ $prefix . 'image' ] = $options[ $prefix . 'customimg' ];
881
+ }
882
+ }
883
+ return $options;
884
+ }
885
+
886
+ /** Custom settings **/
887
+ function display_custom_options( $buf, $args ) {
888
+ if ( $args['name'] == 'aiosp_opengraph_scan_header' ) {
889
+ $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;">';
890
+ $args['options']['type'] = 'submit';
891
+ $args['attr'] = " class='button-primary' ";
892
+ $args['value'] = $args['options']['default'] = __( 'Scan Now', 'all-in-one-seo-pack' );
893
+ $buf .= __( 'Scan your site for duplicate social meta tags.', 'all-in-one-seo-pack' );
894
+ $buf .= '<br /><br />' . $this->get_option_html( $args );
895
+ $buf .= '</div></div></div>';
896
+ }
897
+
898
+ return $buf;
899
+ }
900
+
901
+ function add_attributes( $output ) {
902
+ // avoid having duplicate meta tags
903
+ $type = $this->type;
904
+ if ( empty( $type ) ) {
905
+ $type = 'website';
906
+ }
907
+
908
+ $schema_types = array(
909
+ 'album' => 'MusicAlbum',
910
+ 'article' => 'Article',
911
+ 'bar' => 'BarOrPub',
912
+ 'blog' => 'Blog',
913
+ 'book' => 'Book',
914
+ 'cafe' => 'CafeOrCoffeeShop',
915
+ 'city' => 'City',
916
+ 'country' => 'Country',
917
+ 'episode' => 'Episode',
918
+ 'food' => 'FoodEvent',
919
+ 'game' => 'Game',
920
+ 'hotel' => 'Hotel',
921
+ 'landmark' => 'LandmarksOrHistoricalBuildings',
922
+ 'movie' => 'Movie',
923
+ 'product' => 'Product',
924
+ 'profile' => 'ProfilePage',
925
+ 'restaurant' => 'Restaurant',
926
+ 'school' => 'School',
927
+ 'sport' => 'SportsEvent',
928
+ 'website' => 'WebSite',
929
+ );
930
+
931
+ if ( ! empty( $schema_types[ $type ] ) ) {
932
+ $type = $schema_types[ $type ];
933
+ } else {
934
+ $type = 'WebSite';
935
+ }
936
+
937
+ $attributes = apply_filters(
938
+ $this->prefix . 'attributes', array(
939
+ 'itemscope',
940
+ 'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
941
+ 'prefix="og: http://ogp.me/ns#"',
942
+ )
943
+ );
944
+
945
+ foreach ( $attributes as $attr ) {
946
+ if ( strpos( $output, $attr ) === false ) {
947
+ $output .= "\n\t$attr ";
948
+ }
949
+ }
950
+
951
+ return $output;
952
+ }
953
+
954
+ /**
955
+ * Add our social meta.
956
+ *
957
+ * @since 1.0.0
958
+ * @since 2.3.11.5 Support for multiple fb_admins.
959
+ * @since 2.3.13 Adds filter:aioseop_description on description.
960
+ * @since 2.4.14 Fixes for aioseop-pro #67.
961
+ * @since 2.3.15 Always do_shortcode on descriptions, removed for titles.
962
+ *
963
+ * @global object $post Current WP_Post object.
964
+ * @global object $aiosp All in one seo plugin object.
965
+ * @global array $aioseop_options All in one seo plugin options.
966
+ * @global object $wp_query WP_Query global instance.
967
+ */
968
+ function add_meta() {
969
+ global $post, $aiosp, $aioseop_options, $wp_query;
970
+ $metabox = $this->get_current_options( array(), 'settings' );
971
+ $key = $this->options['aiosp_opengraph_key'];
972
+ $dimg = $this->options['aiosp_opengraph_dimg'];
973
+ $current_post_type = get_post_type();
974
+ $title = $description = $image = $video = '';
975
+ $type = $this->type;
976
+ $sitename = $this->options['aiosp_opengraph_sitename'];
977
+
978
+ $appid = isset( $this->options['aiosp_opengraph_appid'] ) ? $this->options['aiosp_opengraph_appid'] : '';
979
+
980
+ if ( ! empty( $aioseop_options['aiosp_hide_paginated_descriptions'] ) ) {
981
+ $first_page = false;
982
+ if ( $aiosp->get_page_number() < 2 ) {
983
+ $first_page = true;
984
+ }
985
+ } else {
986
+ $first_page = true;
987
+ }
988
+ $url = $aiosp->aiosp_mrt_get_url( $wp_query );
989
+ $url = apply_filters( 'aioseop_canonical_url', $url );
990
+
991
+ $setmeta = $this->options['aiosp_opengraph_setmeta'];
992
+ $social_links = '';
993
+ if ( is_front_page() ) {
994
+ $title = $this->options['aiosp_opengraph_hometitle'];
995
+ if ( $first_page ) {
996
+ $description = $this->options['aiosp_opengraph_description'];
997
+ if ( empty( $description ) ) {
998
+ $description = get_bloginfo( 'description' );
999
+ }
1000
+ }
1001
+ if ( ! empty( $this->options['aiosp_opengraph_homeimage'] ) ) {
1002
+ $thumbnail = $this->options['aiosp_opengraph_homeimage'];
1003
+ } else {
1004
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1005
+ }
1006
+
1007
+ /* If Use AIOSEO Title and Desc Selected */
1008
+ if ( $setmeta ) {
1009
+ $title = $aiosp->wp_title();
1010
+ if ( $first_page ) {
1011
+ $description = $aiosp->get_aioseop_description( $post );
1012
+ }
1013
+ }
1014
+
1015
+ /* Add some defaults */
1016
+ if ( empty( $title ) ) {
1017
+ $title = get_bloginfo( 'name' );
1018
+ }
1019
+ if ( empty( $sitename ) ) {
1020
+ $sitename = get_bloginfo( 'name' );
1021
+ }
1022
+
1023
+ if ( empty( $description ) && $first_page && ! empty( $post ) && ! post_password_required( $post ) ) {
1024
+
1025
+ if ( ! empty( $post->post_content ) || ! empty( $post->post_excerpt ) ) {
1026
+ $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_excerpt ) ), 1000 );
1027
+
1028
+ if ( ! empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) {
1029
+ $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
1030
+ }
1031
+ }
1032
+ }
1033
+
1034
+ if ( empty( $description ) && $first_page ) {
1035
+ $description = get_bloginfo( 'description' );
1036
+ }
1037
+ if ( ! empty( $this->options['aiosp_opengraph_profile_links'] ) ) {
1038
+ $social_links = $this->options['aiosp_opengraph_profile_links'];
1039
+ if ( ! empty( $this->options['aiosp_opengraph_social_name'] ) ) {
1040
+ $social_name = $this->options['aiosp_opengraph_social_name'];
1041
+ } else {
1042
+ $social_name = '';
1043
+ }
1044
+ if ( $this->options['aiosp_opengraph_person_or_org'] == 'person' ) {
1045
+ $social_type = 'Person';
1046
+ } else {
1047
+ $social_type = 'Organization';
1048
+ }
1049
+ }
1050
+ } elseif ( is_singular() && $this->option_isset( 'types' )
1051
+ && is_array( $this->options['aiosp_opengraph_types'] )
1052
+ && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] )
1053
+ ) {
1054
+
1055
+ if ( $type == 'article' ) {
1056
+ if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1057
+ $section = $metabox['aioseop_opengraph_settings_section'];
1058
+ }
1059
+ if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1060
+ $tag = $metabox['aioseop_opengraph_settings_tag'];
1061
+ }
1062
+ if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1063
+ $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1064
+ }
1065
+ }
1066
+
1067
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1068
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1069
+ }
1070
+
1071
+ if ( $type == 'article' && ! empty( $post ) ) {
1072
+ if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1073
+ $author = get_the_author_meta( 'facebook', $post->post_author );
1074
+ }
1075
+
1076
+ if ( isset( $post->post_date ) ) {
1077
+ $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date ) );
1078
+ }
1079
+
1080
+ if ( isset( $post->post_modified ) ) {
1081
+ $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified ) );
1082
+ }
1083
+ }
1084
+
1085
+ $image = $metabox['aioseop_opengraph_settings_image'];
1086
+ $video = $metabox['aioseop_opengraph_settings_video'];
1087
+ $title = $metabox['aioseop_opengraph_settings_title'];
1088
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1089
+
1090
+ /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1091
+ global $aiosp;
1092
+ if ( empty( $title ) ) {
1093
+ $title = $aiosp->wp_title();
1094
+ }
1095
+ if ( empty( $description ) ) {
1096
+ $description = trim( strip_tags( get_post_meta( $post->ID, '_aioseop_description', true ) ) );
1097
+ }
1098
+
1099
+ /* Add default title */
1100
+ if ( empty( $title ) ) {
1101
+ $title = get_the_title();
1102
+ }
1103
+
1104
+ // Add default description.
1105
+ if ( empty( $description ) && ! post_password_required( $post ) ) {
1106
+
1107
+ $description = $post->post_excerpt;
1108
+
1109
+ if ( $this->options['aiosp_opengraph_generate_descriptions'] || empty( $description ) ) {
1110
+ $description = $post->post_content;
1111
+ }
1112
+ }
1113
+ if ( empty( $type ) ) {
1114
+ $type = 'article';
1115
+ }
1116
+ } elseif ( AIOSEOPPRO && ( is_category() || is_tag() || is_tax() ) ) {
1117
+ if ( isset( $this->options['aioseop_opengraph_settings_category'] ) ) {
1118
+ $type = $this->options['aioseop_opengraph_settings_category'];
1119
+ }
1120
+ if ( isset( $metabox['aioseop_opengraph_settings_category'] ) ) {
1121
+ $type = $metabox['aioseop_opengraph_settings_category'];
1122
+ }
1123
+ if ( $type == 'article' ) {
1124
+ if ( ! empty( $metabox['aioseop_opengraph_settings_section'] ) ) {
1125
+ $section = $metabox['aioseop_opengraph_settings_section'];
1126
+ }
1127
+ if ( ! empty( $metabox['aioseop_opengraph_settings_tag'] ) ) {
1128
+ $tag = $metabox['aioseop_opengraph_settings_tag'];
1129
+ }
1130
+ if ( ! empty( $this->options['aiosp_opengraph_facebook_publisher'] ) ) {
1131
+ $publisher = $this->options['aiosp_opengraph_facebook_publisher'];
1132
+ }
1133
+ }
1134
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1135
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1136
+ }
1137
+ if ( $type == 'article' && ! empty( $post ) ) {
1138
+ if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
1139
+ $author = get_the_author_meta( 'facebook', $post->post_author );
1140
+ }
1141
+ if ( isset( $post->post_date ) ) {
1142
+ $published_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_date ) );
1143
+ }
1144
+ if ( isset( $post->post_modified ) ) {
1145
+ $modified_time = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $post->post_modified ) );
1146
+ }
1147
+ }
1148
+ $image = $metabox['aioseop_opengraph_settings_image'];
1149
+ $video = $metabox['aioseop_opengraph_settings_video'];
1150
+ $title = $metabox['aioseop_opengraph_settings_title'];
1151
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1152
+ /* Add AIOSEO variables if Site Title and Desc from AIOSEOP not selected */
1153
+ global $aiosp;
1154
+ if ( empty( $title ) ) {
1155
+ $title = $aiosp->wp_title();
1156
+ }
1157
+ if ( empty( $description ) ) {
1158
+ $term_id = isset( $_GET['tag_ID'] ) ? (int) $_GET['tag_ID'] : 0;
1159
+ $term_id = $term_id ? $term_id : get_queried_object()->term_id;
1160
+ $description = trim( strip_tags( get_term_meta( $term_id, '_aioseop_description', true ) ) );
1161
+ }
1162
+ // Add default title
1163
+ if ( empty( $title ) ) {
1164
+ $title = get_the_title();
1165
+ }
1166
+ // Add default description.
1167
+ if ( empty( $description ) && ! post_password_required( $post ) ) {
1168
+ $description = get_queried_object()->description;
1169
+ }
1170
+ if ( empty( $type ) ) {
1171
+ $type = 'website';
1172
+ }
1173
+ } elseif ( is_home() && ! is_front_page() ) {
1174
+ // This is the blog page but not the homepage.
1175
+ global $aiosp;
1176
+ $image = $metabox['aioseop_opengraph_settings_image'];
1177
+ $video = $metabox['aioseop_opengraph_settings_video'];
1178
+ $title = $metabox['aioseop_opengraph_settings_title'];
1179
+ $description = $metabox['aioseop_opengraph_settings_desc'];
1180
+
1181
+ if ( empty( $description ) ) {
1182
+ // If there's not social description, fall back to the SEO description.
1183
+ $description = trim( strip_tags( get_post_meta( get_option( 'page_for_posts' ), '_aioseop_description', true ) ) );
1184
+ }
1185
+ if ( empty( $title ) ) {
1186
+ $title = $aiosp->wp_title();
1187
+ }
1188
+ } else {
1189
+ return;
1190
+ }
1191
+
1192
+ if ( $type === 'article' && ! empty( $post ) && is_singular() ) {
1193
+ if ( ! empty( $this->options['aiosp_opengraph_gen_tags'] ) ) {
1194
+ if ( ! empty( $this->options['aiosp_opengraph_gen_keywords'] ) ) {
1195
+ $keywords = $aiosp->get_main_keywords();
1196
+ $keywords = $this->apply_cf_fields( $keywords );
1197
+ $keywords = apply_filters( 'aioseop_keywords', $keywords );
1198
+ if ( ! empty( $keywords ) && ! empty( $tag ) ) {
1199
+ $tag .= ',' . $keywords;
1200
+ } elseif ( empty( $tag ) ) {
1201
+ $tag = $keywords;
1202
+ }
1203
+ }
1204
+ $tag = $aiosp->keyword_string_to_list( $tag );
1205
+ if ( ! empty( $this->options['aiosp_opengraph_gen_categories'] ) ) {
1206
+ $tag = array_merge( $tag, $aiosp->get_all_categories( $post->ID ) );
1207
+ }
1208
+ if ( ! empty( $this->options['aiosp_opengraph_gen_post_tags'] ) ) {
1209
+ $tag = array_merge( $tag, $aiosp->get_all_tags( $post->ID ) );
1210
+ }
1211
+ }
1212
+ if ( ! empty( $tag ) ) {
1213
+ $tag = $aiosp->clean_keyword_list( $tag );
1214
+ }
1215
+ }
1216
+
1217
+ if ( ! empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
1218
+ $title = do_shortcode( $title );
1219
+ }
1220
+ if ( ! empty( $description ) ) {
1221
+ $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
1222
+ if ( ! empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
1223
+ $description = do_shortcode( $description );
1224
+ }
1225
+ $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );
1226
+ }
1227
+
1228
+ $title = $this->apply_cf_fields( $title );
1229
+ $description = $this->apply_cf_fields( $description );
1230
+
1231
+ /* Data Validation */
1232
+ $title = strip_tags( esc_attr( $title ) );
1233
+ $sitename = strip_tags( esc_attr( $sitename ) );
1234
+ $description = strip_tags( esc_attr( $description ) );
1235
+
1236
+ if ( empty( $thumbnail ) && ! empty( $image ) ) {
1237
+ $thumbnail = $image;
1238
+ }
1239
+
1240
+ // Add user supplied default image.
1241
+ if ( empty( $thumbnail ) ) {
1242
+ if ( empty( $this->options['aiosp_opengraph_defimg'] ) ) {
1243
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1244
+ } else {
1245
+ switch ( $this->options['aiosp_opengraph_defimg'] ) {
1246
+ case 'featured':
1247
+ $thumbnail = $this->get_the_image_by_post_thumbnail();
1248
+ break;
1249
+ case 'attach':
1250
+ $thumbnail = $this->get_the_image_by_attachment();
1251
+ break;
1252
+ case 'content':
1253
+ $thumbnail = $this->get_the_image_by_scan();
1254
+ break;
1255
+ case 'custom':
1256
+ $meta_key = $this->options['aiosp_opengraph_meta_key'];
1257
+ if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1258
+ $meta_key = explode( ',', $meta_key );
1259
+ $thumbnail = $this->get_the_image_by_meta_key(
1260
+ array(
1261
+ 'post_id' => $post->ID,
1262
+ 'meta_key' => $meta_key,
1263
+ )
1264
+ );
1265
+ }
1266
+ break;
1267
+ case 'auto':
1268
+ $thumbnail = $this->get_the_image();
1269
+ break;
1270
+ case 'author':
1271
+ $thumbnail = $this->get_the_image_by_author();
1272
+ break;
1273
+ default:
1274
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1275
+ }
1276
+ }
1277
+ }
1278
+
1279
+ if ( ( empty( $thumbnail ) && ! empty( $this->options['aiosp_opengraph_fallback'] ) ) ) {
1280
+ $thumbnail = $this->options['aiosp_opengraph_dimg'];
1281
+ }
1282
+
1283
+ if ( ! empty( $thumbnail ) ) {
1284
+ $thumbnail = esc_url( $thumbnail );
1285
+ $thumbnail = set_url_scheme( $thumbnail );
1286
+ }
1287
+
1288
+ $width = $height = '';
1289
+ if ( ! empty( $thumbnail ) ) {
1290
+ if ( ! empty( $metabox['aioseop_opengraph_settings_imagewidth'] ) ) {
1291
+ $width = $metabox['aioseop_opengraph_settings_imagewidth'];
1292
+ }
1293
+ if ( ! empty( $metabox['aioseop_opengraph_settings_imageheight'] ) ) {
1294
+ $height = $metabox['aioseop_opengraph_settings_imageheight'];
1295
+ }
1296
+ if ( empty( $width ) && ! empty( $this->options['aiosp_opengraph_dimgwidth'] ) ) {
1297
+ $width = $this->options['aiosp_opengraph_dimgwidth'];
1298
+ }
1299
+ if ( empty( $height ) && ! empty( $this->options['aiosp_opengraph_dimgheight'] ) ) {
1300
+ $height = $this->options['aiosp_opengraph_dimgheight'];
1301
+ }
1302
+ }
1303
+
1304
+ if ( ! empty( $video ) ) {
1305
+ if ( ! empty( $metabox['aioseop_opengraph_settings_videowidth'] ) ) {
1306
+ $videowidth = $metabox['aioseop_opengraph_settings_videowidth'];
1307
+ }
1308
+ if ( ! empty( $metabox['aioseop_opengraph_settings_videoheight'] ) ) {
1309
+ $videoheight = $metabox['aioseop_opengraph_settings_videoheight'];
1310
+ }
1311
+ }
1312
+
1313
+ $card = 'summary';
1314
+ if ( ! empty( $this->options['aiosp_opengraph_defcard'] ) ) {
1315
+ $card = $this->options['aiosp_opengraph_defcard'];
1316
+ }
1317
+
1318
+ if ( ! empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) {
1319
+ $card = $metabox['aioseop_opengraph_settings_setcard'];
1320
+ }
1321
+
1322
+ // support for changing legacy twitter cardtype-photo to summary large image
1323
+ if ( $card == 'photo' ) {
1324
+ $card = 'summary_large_image';
1325
+ }
1326
+
1327
+ $site = $domain = $creator = '';
1328
+
1329
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1330
+ $site = $this->options['aiosp_opengraph_twitter_site'];
1331
+ $site = AIOSEOP_Opengraph_Public::prepare_twitter_username( $site );
1332
+ }
1333
+
1334
+ if ( ! empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) {
1335
+ $domain = $this->options['aiosp_opengraph_twitter_domain'];
1336
+ }
1337
+
1338
+ if ( ! empty( $post ) && isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) {
1339
+ $creator = get_the_author_meta( 'twitter', $post->post_author );
1340
+ $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1341
+ }
1342
+
1343
+ if ( ! empty( $thumbnail ) ) {
1344
+ $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1345
+ }
1346
+
1347
+ if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1348
+ // Set Twitter image from custom.
1349
+ $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1350
+ }
1351
+
1352
+ // Apply last filters.
1353
+ $description = apply_filters( 'aioseop_description', $description );
1354
+
1355
+ $meta = array(
1356
+ 'facebook' => array(
1357
+ 'title' => 'og:title',
1358
+ 'type' => 'og:type',
1359
+ 'url' => 'og:url',
1360
+ 'thumbnail' => 'og:image',
1361
+ 'width' => 'og:image:width',
1362
+ 'height' => 'og:image:height',
1363
+ 'video' => 'og:video',
1364
+ 'videowidth' => 'og:video:width',
1365
+ 'videoheight' => 'og:video:height',
1366
+ 'sitename' => 'og:site_name',
1367
+ 'key' => 'fb:admins',
1368
+ 'appid' => 'fb:app_id',
1369
+ 'description' => 'og:description',
1370
+ 'section' => 'article:section',
1371
+ 'tag' => 'article:tag',
1372
+ 'publisher' => 'article:publisher',
1373
+ 'author' => 'article:author',
1374
+ 'published_time' => 'article:published_time',
1375
+ 'modified_time' => 'article:modified_time',
1376
+ ),
1377
+ 'twitter' => array(
1378
+ 'card' => 'twitter:card',
1379
+ 'site' => 'twitter:site',
1380
+ 'creator' => 'twitter:creator',
1381
+ 'domain' => 'twitter:domain',
1382
+ 'title' => 'twitter:title',
1383
+ 'description' => 'twitter:description',
1384
+ 'twitter_thumbnail' => 'twitter:image',
1385
+ ),
1386
+ );
1387
+
1388
+ // Only show if "use schema.org markup is checked".
1389
+ if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
1390
+ $meta['google+'] = array( 'thumbnail' => 'image' );
1391
+ }
1392
+
1393
+ $tags = array(
1394
+ 'facebook' => array( 'name' => 'property', 'value' => 'content' ),
1395
+ 'twitter' => array( 'name' => 'name', 'value' => 'content' ),
1396
+ 'google+' => array( 'name' => 'itemprop', 'value' => 'content' ),
1397
+ );
1398
+
1399
+ foreach ( $meta as $t => $data ) {
1400
+ foreach ( $data as $k => $v ) {
1401
+ if ( empty( $$k ) ) {
1402
+ $$k = '';
1403
+ }
1404
+ $filtered_value = $$k;
1405
+ $filtered_value = apply_filters( $this->prefix . 'meta', $filtered_value, $t, $k );
1406
+ if ( ! empty( $filtered_value ) ) {
1407
+ if ( ! is_array( $filtered_value ) ) {
1408
+ $filtered_value = array( $filtered_value );
1409
+ }
1410
+
1411
+ /**
1412
+ * This is to accomodate multiple fb:admins on separate lines.
1413
+ * @TODO Eventually we'll want to put this in its own function so things like images work too.
1414
+ */
1415
+ if ( 'key' === $k ) {
1416
+ $fbadmins = explode( ',', str_replace( ' ', '', $filtered_value[0] ) ); // Trim spaces then turn comma-separated values into an array.
1417
+ foreach ( $fbadmins as $fbadmin ) {
1418
+ echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $fbadmin . '" />' . "\n";
1419
+ }
1420
+ } else {
1421
+ // For everything else.
1422
+ foreach ( $filtered_value as $f ) {
1423
+ echo '<meta ' . $tags[ $t ]['name'] . '="' . $v . '" ' . $tags[ $t ]['value'] . '="' . $f . '" />' . "\n";
1424
+ }
1425
+ }
1426
+ }
1427
+ }
1428
+ }
1429
+ $social_link_schema = '';
1430
+ if ( ! empty( $social_links ) ) {
1431
+ $home_url = esc_url( get_home_url() );
1432
+ $social_links = explode( "\n", $social_links );
1433
+ foreach ( $social_links as $k => $v ) {
1434
+ $v = trim( $v );
1435
+ if ( empty( $v ) ) {
1436
+ unset( $social_links[ $k ] );
1437
+ } else {
1438
+ $v = esc_url( $v );
1439
+ $social_links[ $k ] = $v;
1440
+ }
1441
+ }
1442
+ $social_links = join( '","', $social_links );
1443
+ $social_link_schema = <<<END
1444
+ <script type="application/ld+json">
1445
+ { "@context" : "http://schema.org",
1446
+ "@type" : "{$social_type}",
1447
+ "name" : "{$social_name}",
1448
+ "url" : "{$home_url}",
1449
+ "sameAs" : ["{$social_links}"]
1450
+ }
1451
+ </script>
1452
+
1453
+ END;
1454
+ }
1455
+ echo apply_filters( 'aiosp_opengraph_social_link_schema', $social_link_schema );
1456
+ }
1457
+
1458
+ /**
1459
+ * Do / adds opengraph properties to meta.
1460
+ * @since 2.3.11
1461
+ *
1462
+ * @global array $aioseop_options AIOSEOP plugin options.
1463
+ */
1464
+ public function do_opengraph() {
1465
+ global $aioseop_options;
1466
+ if ( ! empty( $aioseop_options )
1467
+ && ! empty( $aioseop_options['aiosp_schema_markup'] )
1468
+ ) {
1469
+ add_filter( 'language_attributes', array( &$this, 'add_attributes' ) );
1470
+ }
1471
+ if ( ! defined( 'DOING_AJAX' ) ) {
1472
+ add_action( 'aioseop_modules_wp_head', array( &$this, 'add_meta' ), 5 );
1473
+ // Add social meta to AMP plugin.
1474
+ if ( apply_filters( 'aioseop_enable_amp_social_meta', true ) === true ) {
1475
+ add_action( 'amp_post_template_head', array( &$this, 'add_meta' ), 12 );
1476
+ }
1477
+ }
1478
+ }
1479
+
1480
+ /**
1481
+ * Set up types.
1482
+ *
1483
+ * @since ?
1484
+ * @since 2.3.15 Change to website for homepage and blog post index page, default to object.
1485
+ */
1486
+ function type_setup() {
1487
+ $this->type = 'object'; // Default to type object if we don't have some other rule.
1488
+
1489
+ if ( is_home() || is_front_page() ) {
1490
+ $this->type = 'website'; // Home page and blog page should be website.
1491
+ } elseif ( is_singular() && $this->option_isset( 'types' ) ) {
1492
+ $metabox = $this->get_current_options( array(), 'settings' );
1493
+ $current_post_type = get_post_type();
1494
+ if ( ! empty( $metabox['aioseop_opengraph_settings_category'] ) ) {
1495
+ $this->type = $metabox['aioseop_opengraph_settings_category'];
1496
+ } elseif ( isset( $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ] ) ) {
1497
+ $this->type = $this->options[ "aiosp_opengraph_{$current_post_type}_fb_object_type" ];
1498
+ }
1499
+ }
1500
+ }
1501
+
1502
+ /**
1503
+ * Inits hooks and others for admin init.
1504
+ * action:admin_init.
1505
+ *
1506
+ * @since 2.3.11
1507
+ * @since 2.4.14 Refactored function name, and new filter added for defaults and missing term metabox.
1508
+ */
1509
+ function admin_init() {
1510
+ add_filter( $this->prefix . 'display_settings', array( &$this, 'filter_settings' ), 10, 3 );
1511
+ add_filter( $this->prefix . 'override_options', array( &$this, 'override_options' ), 10, 3 );
1512
+ add_filter( $this->get_prefix( 'settings' ) . 'default_options', array( &$this, 'filter_default_options' ), 10, 2 );
1513
+ add_filter(
1514
+ $this->get_prefix( 'settings' ) . 'filter_metabox_options', array(
1515
+ &$this,
1516
+ 'filter_metabox_options',
1517
+ ), 10, 3
1518
+ );
1519
+ add_filter(
1520
+ $this->get_prefix( 'settings' ) . 'filter_term_metabox_options', array(
1521
+ &$this,
1522
+ 'filter_metabox_options',
1523
+ ), 10, 3
1524
+ );
1525
+ $post_types = $this->get_post_type_titles();
1526
+ $rempost = array( 'revision' => 1, 'nav_menu_item' => 1, 'custom_css' => 1, 'customize_changeset' => 1 );
1527
+ $post_types = array_diff_key( $post_types, $rempost );
1528
+ $this->default_options['types']['initial_options'] = $post_types;
1529
+ foreach ( $post_types as $slug => $name ) {
1530
+ $field = $slug . '_fb_object_type';
1531
+ $this->default_options[ $field ] = array(
1532
+ 'name' => "$name " . __( 'Object Type', 'all-in-one-seo-pack' ) . "<br />($slug)",
1533
+ 'type' => 'select',
1534
+ 'style' => '',
1535
+ 'initial_options' => $this->fb_object_types,
1536
+ 'default' => 'article',
1537
+ 'condshow' => array( 'aiosp_opengraph_types\[\]' => $slug ),
1538
+ );
1539
+ $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1540
+ $this->help_anchors[ $field ] = '#content-object-types';
1541
+ $this->locations['opengraph']['options'][] = $field;
1542
+ $this->layout['facebook']['options'][] = $field;
1543
+ }
1544
+ $this->setting_options();
1545
+ $this->add_help_text_links();
1546
+
1547
+ }
1548
+
1549
+ function get_all_images( $options = null, $p = null ) {
1550
+ static $img = array();
1551
+ if ( ! is_array( $options ) ) {
1552
+ $options = array();
1553
+ }
1554
+ if ( ! empty( $this->options['aiosp_opengraph_meta_key'] ) ) {
1555
+ $options['meta_key'] = $this->options['aiosp_opengraph_meta_key'];
1556
+ }
1557
+ if ( empty( $img ) ) {
1558
+ $size = apply_filters( 'post_thumbnail_size', 'large' );
1559
+ $default = $this->get_the_image_by_default();
1560
+ if ( ! empty( $default ) ) {
1561
+ $default = set_url_scheme( $default );
1562
+ $img[ $default ] = 0;
1563
+ }
1564
+ $img = array_merge( $img, parent::get_all_images( $options, null ) );
1565
+ }
1566
+
1567
+ if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1568
+ $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1569
+ }
1570
+
1571
+ if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1572
+ $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1573
+ $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1574
+ }
1575
+
1576
+ if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1577
+ $image['author'] = $author_img;
1578
+ }
1579
+ $image = array_flip( $img );
1580
+ $images = array();
1581
+ if ( ! empty( $image ) ) {
1582
+ foreach ( $image as $k => $v ) {
1583
+ $images[ $v ] = '<img height=150 src="' . $v . '">';
1584
+ }
1585
+ }
1586
+
1587
+ return array( $image, $images );
1588
+ }
1589
+
1590
+ function get_the_image_by_author( $options = null, $p = null ) {
1591
+ if ( $p === null ) {
1592
+ global $post;
1593
+ } else {
1594
+ $post = $p;
1595
+ }
1596
+ if ( ! empty( $post ) && ! empty( $post->post_author ) ) {
1597
+ $matches = array();
1598
+ $get_avatar = get_avatar( $post->post_author, 300 );
1599
+ if ( preg_match( "/src='(.*?)'/i", $get_avatar, $matches ) ) {
1600
+ return $matches[1];
1601
+ }
1602
+ }
1603
+
1604
+ return false;
1605
+ }
1606
+
1607
+ function get_the_image( $options = null, $p = null ) {
1608
+ $meta_key = $this->options['aiosp_opengraph_meta_key'];
1609
+
1610
+ return parent::get_the_image( array( 'meta_key' => $meta_key ), $p );
1611
+ }
1612
+
1613
+ function get_the_image_by_default( $args = array() ) {
1614
+ return $this->options['aiosp_opengraph_dimg'];
1615
+ }
1616
+
1617
+ function settings_update() {
1618
+
1619
+ }
1620
+
1621
+ /**
1622
+ * Enqueue our file upload scripts and styles.
1623
+ * @param $hook
1624
+ */
1625
+ function og_admin_enqueue_scripts( $hook ) {
1626
+
1627
+ if ( 'all-in-one-seo_page_aiosp_opengraph' != $hook && 'term.php' != $hook ) {
1628
+ // Only enqueue if we're on the social module settings page.
1629
+ return;
1630
+ }
1631
+
1632
+ wp_enqueue_script( 'media-upload' );
1633
+ wp_enqueue_script( 'thickbox' );
1634
+ wp_enqueue_style( 'thickbox' );
1635
+ wp_enqueue_media();
1636
+ }
1637
+
1638
+ function save_tax_data( $term_id, $tt_id, $taxonomy ) {
1639
+ static $update = false;
1640
+ if ( $update ) {
1641
+ return;
1642
+ }
1643
+ if ( $this->locations !== null ) {
1644
+ foreach ( $this->locations as $k => $v ) {
1645
+ if ( isset( $v['type'] ) && ( $v['type'] === 'metabox' ) ) {
1646
+ $opts = $this->default_options( $k );
1647
+ $options = array();
1648
+ $update = false;
1649
+ foreach ( $opts as $l => $o ) {
1650
+ if ( isset( $_POST[ $l ] ) ) {
1651
+ $options[ $l ] = stripslashes_deep( $_POST[ $l ] );
1652
+ $options[ $l ] = esc_attr( $options[ $l ] );
1653
+ $update = true;
1654
+ }
1655
+ }
1656
+ if ( $update ) {
1657
+ $prefix = $this->get_prefix( $k );
1658
+ $options = apply_filters( $prefix . 'filter_term_metabox_options', $options, $k, $term_id );
1659
+ update_term_meta( $term_id, '_' . $prefix . $k, $options );
1660
+ }
1661
+ }
1662
+ }
1663
+ }
1664
+ }
1665
+
1666
+ /**
1667
+ * Returns the placeholder filtered and ready for DOM display.
1668
+ * filter:aioseop_opengraph_placeholder
1669
+ * @since 2.4.14
1670
+ *
1671
+ * @param mixed $placeholder Placeholder to be filtered.
1672
+ * @param string $type Type of the value to be filtered.
1673
+ *
1674
+ * @return string
1675
+ */
1676
+ public function filter_placeholder( $placeholder, $type = 'text' ) {
1677
+ return strip_tags( trim( $placeholder ) );
1678
+ }
1679
+
1680
+ /**
1681
+ * Returns filtered default options.
1682
+ * filter:{prefix}default_options
1683
+ * @since 2.4.13
1684
+ *
1685
+ * @param array $options Default options.
1686
+ * @param string $location Location.
1687
+ *
1688
+ * @return array
1689
+ */
1690
+ public function filter_default_options( $options, $location ) {
1691
+ if ( $location === 'settings' ) {
1692
+ $prefix = $this->get_prefix( $location ) . $location . '_';
1693
+ // Add image checker as default
1694
+ $options[ $prefix . 'customimg_checker' ] = 0;
1695
+ }
1696
+ return $options;
1697
+ }
1698
+
1699
+ /**
1700
+ * Returns facebook debug script and link.
1701
+ * @since 2.4.14
1702
+ *
1703
+ * @return string
1704
+ */
1705
+ private function get_facebook_debug() {
1706
+ ob_start();
1707
+ ?>
1708
+ <script>
1709
+ jQuery(document).ready(function() {
1710
+ var snippet = jQuery("#aioseop_snippet_link");
1711
+ if ( snippet.length === 0 ) {
1712
+ jQuery( "#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
1713
+ } else {
1714
+ snippet = snippet.html();
1715
+ jQuery("#aioseop_opengraph_settings_facebook_debug")
1716
+ .attr( "href", "https://developers.facebook.com/tools/debug/sharing/?q=" + snippet );
1717
+ }
1718
+ });
1719
+ </script>
1720
+ <a name="aioseop_opengraph_settings_facebook_debug"
1721
+ id="aioseop_opengraph_settings_facebook_debug"
1722
+ class="button-primary"
1723
+ href=""
1724
+ target="_blank"
1725
+ ><?php echo __( 'Debug This Post', 'all-in-one-seo-pack' ); ?></a>
1726
+ <?php
1727
+ return ob_get_clean();
1728
+ }
1729
+ }
1730
+ }
modules/aioseop_performance.php CHANGED
@@ -163,7 +163,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
163
  global $wpdb;
164
  global $wp_version;
165
 
166
- $sqlversion = $wpdb->get_var( "SELECT VERSION() AS version" );
167
  $mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
168
  if ( is_array( $mysqlinfo ) ) {
169
  $sql_mode = $mysqlinfo[0]->Value;
@@ -225,7 +225,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
225
  } else {
226
  $ms = __( 'No', 'all-in-one-seo-pack' );
227
  }
228
-
229
  } else {
230
  $ms = __( 'N/A', 'all-in-one-seo-pack' );
231
  }
@@ -241,31 +240,31 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
241
  $perm_struct = get_option( 'permalink_structure' );
242
 
243
  $debug_info = array(
244
- __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
245
  __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
246
- __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
247
- __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
248
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
249
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
250
- __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
251
- __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
252
- __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
253
- __( 'PHP Max Post Size', 'all-in-one-seo-pack' ) => $post_max,
254
  __( 'PHP Max Script Execute Time', 'all-in-one-seo-pack' ) => $max_execute,
255
- __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
256
- __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
257
- __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
258
  __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
259
  __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
260
- __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
261
- __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
262
  __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
263
- __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
264
  __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
265
- __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
266
- __( 'Front Page Displays', 'all-in-one-seo-pack' ) => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
267
- __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
268
- __( 'Permalink Setting', 'all-in-one-seo-pack' ) => $perm_struct,
269
  );
270
  $debug_info['Active Plugins'] = null;
271
  $active_plugins = $inactive_plugins = array();
@@ -312,11 +311,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
312
  if ( wp_mkdir_p( $dir ) ) {
313
  $file_path = $dir . 'settings_aioseop-' . date( 'Y-m-d' ) . '-' . time() . '.ini';
314
  if ( ! file_exists( $file_path ) ) {
 
315
  if ( $file_handle = @fopen( $file_path, 'w' ) ) {
 
316
  global $aiosp;
317
  $buf = '; ' . __(
318
- 'Settings export file for All in One SEO Pack', 'all-in-one-seo-pack'
319
- ) . "\n";
320
 
321
  // Adds all settings and posts data to settings file
322
  add_filter( 'aioseop_export_settings_exporter_post_types', array( $this, 'get_exporter_post_types' ) );
@@ -349,7 +350,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
349
  function get_email_input() {
350
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
351
  $buf = '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '"><input name="sfwd_debug_nonce" type="hidden" value="' .
352
- $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
353
  return $buf;
354
  }
355
 
163
  global $wpdb;
164
  global $wp_version;
165
 
166
+ $sqlversion = $wpdb->get_var( 'SELECT VERSION() AS version' );
167
  $mysqlinfo = $wpdb->get_results( "SHOW VARIABLES LIKE 'sql_mode'" );
168
  if ( is_array( $mysqlinfo ) ) {
169
  $sql_mode = $mysqlinfo[0]->Value;
225
  } else {
226
  $ms = __( 'No', 'all-in-one-seo-pack' );
227
  }
 
228
  } else {
229
  $ms = __( 'N/A', 'all-in-one-seo-pack' );
230
  }
240
  $perm_struct = get_option( 'permalink_structure' );
241
 
242
  $debug_info = array(
243
+ __( 'Operating System', 'all-in-one-seo-pack' ) => PHP_OS,
244
  __( 'Server', 'all-in-one-seo-pack' ) => $_SERVER['SERVER_SOFTWARE'],
245
+ __( 'Memory usage', 'all-in-one-seo-pack' ) => $memory_usage,
246
+ __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
247
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
248
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
249
+ __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
250
+ __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
251
+ __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
252
+ __( 'PHP Max Post Size', 'all-in-one-seo-pack' ) => $post_max,
253
  __( 'PHP Max Script Execute Time', 'all-in-one-seo-pack' ) => $max_execute,
254
+ __( 'PHP Exif support', 'all-in-one-seo-pack' ) => $exif,
255
+ __( 'PHP IPTC support', 'all-in-one-seo-pack' ) => $iptc,
256
+ __( 'PHP XML support', 'all-in-one-seo-pack' ) => $xml,
257
  __( 'Site URL', 'all-in-one-seo-pack' ) => $siteurl,
258
  __( 'Home URL', 'all-in-one-seo-pack' ) => $homeurl,
259
+ __( 'WordPress Version', 'all-in-one-seo-pack' ) => $wp_version,
260
+ __( 'WordPress DB Version', 'all-in-one-seo-pack' ) => $db_version,
261
  __( 'Multisite', 'all-in-one-seo-pack' ) => $ms,
262
+ __( 'Active Theme', 'all-in-one-seo-pack' ) => $theme['Name'] . ' ' . $theme['Version'],
263
  __( 'Site Title', 'all-in-one-seo-pack' ) => $site_title,
264
+ __( 'Site Language', 'all-in-one-seo-pack' ) => $language,
265
+ __( 'Front Page Displays', 'all-in-one-seo-pack' ) => $front_displays === 'page' ? $front_displays . ' [ID = ' . $page_on_front . ']' : $front_displays,
266
+ __( 'Search Engine Visibility', 'all-in-one-seo-pack' ) => $blog_public,
267
+ __( 'Permalink Setting', 'all-in-one-seo-pack' ) => $perm_struct,
268
  );
269
  $debug_info['Active Plugins'] = null;
270
  $active_plugins = $inactive_plugins = array();
311
  if ( wp_mkdir_p( $dir ) ) {
312
  $file_path = $dir . 'settings_aioseop-' . date( 'Y-m-d' ) . '-' . time() . '.ini';
313
  if ( ! file_exists( $file_path ) ) {
314
+ // @codingStandardsIgnoreStart
315
  if ( $file_handle = @fopen( $file_path, 'w' ) ) {
316
+ // @codingStandardsIgnoreEnd
317
  global $aiosp;
318
  $buf = '; ' . __(
319
+ 'Settings export file for All in One SEO Pack', 'all-in-one-seo-pack'
320
+ ) . "\n";
321
 
322
  // Adds all settings and posts data to settings file
323
  add_filter( 'aioseop_export_settings_exporter_post_types', array( $this, 'get_exporter_post_types' ) );
350
  function get_email_input() {
351
  $nonce = wp_create_nonce( 'sfwd-debug-nonce' );
352
  $buf = '<input name="sfwd_debug_send_email" type="text" value="" placeholder="' . __( 'E-mail debug information', 'all-in-one-seo-pack' ) . '"><input name="sfwd_debug_nonce" type="hidden" value="' .
353
+ $nonce . '"><input name="sfwd_debug_submit" type="submit" value="' . __( 'Submit', 'all-in-one-seo-pack' ) . '" class="button-primary">';
354
  return $buf;
355
  }
356
 
modules/aioseop_robots.php CHANGED
@@ -14,7 +14,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
14
  $this->file = __FILE__; // the current file
15
  parent::__construct();
16
 
17
- $help_text = Array(
18
  'additional' => __( 'Rule Type', 'all-in-one-seo-pack' ),
19
  'useragent' => __( 'User Agent', 'all-in-one-seo-pack' ),
20
  'path' => __( 'Directory Path', 'all-in-one-seo-pack' ),
@@ -22,29 +22,29 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
22
  );
23
 
24
  $this->default_options = array(
25
- 'usage' => Array(
26
  'type' => 'html',
27
  'label' => 'none',
28
  'default' => __( 'Use the rule builder below to add rules to create a new Robots.txt file.  If you already have a Robots.txt file you should use the File Editor feature in All in One SEO Pack to edit it or you can delete your current Robots.txt file and start a new one with the rule builder below.', 'all-in-one-seo-pack' ),
29
  'save' => false,
30
  ),
31
- 'additional' => Array(
32
  'name' => __( 'Rule Type', 'all-in-one-seo-pack' ),
33
  'save' => false,
34
  'type' => 'select',
35
- 'initial_options' => Array( 'allow' => 'Allow', 'block' => 'Block' ),
36
  ),
37
- 'useragent' => Array(
38
  'name' => __( 'User Agent', 'all-in-one-seo-pack' ),
39
  'save' => false,
40
  'type' => 'text',
41
  ),
42
- 'path' => Array(
43
  'name' => __( 'Directory Path', 'all-in-one-seo-pack' ),
44
  'save' => false,
45
  'type' => 'text',
46
  ),
47
- 'robotgen' => Array(
48
  'name' => __( 'Generate Robots.txt', 'all-in-one-seo-pack' ),
49
  'save' => false,
50
  'default' => '',
@@ -54,44 +54,44 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
54
  'label' => 'none',
55
  'readonly' => 'readonly',
56
  ),
57
- 'Submit_Preview' => Array(
58
  'type' => 'submit',
59
  'class' => 'button-primary MRL',
60
  'name' => __( 'Add Rule', 'all-in-one-seo-pack' ) . ' &raquo;',
61
  'nowrap' => 1,
62
  ),
63
- 'Submit_Update' => Array(
64
  'type' => 'submit',
65
  'class' => 'button-primary',
66
  'name' => __( 'Save Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
67
  'nowrap' => 1,
68
  ),
69
- 'Submit_Delete' => Array(
70
  'type' => 'submit',
71
  'class' => 'button-primary',
72
  'name' => __( 'Delete Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
73
  'nowrap' => 1,
74
  ),
75
- 'optusage' => Array(
76
  'type' => 'html',
77
  'label' => 'none',
78
  'default' => __( 'Click the Optimize button below and All in One SEO Pack will analyze your Robots.txt file to make sure it complies with the standards for Robots.txt files.  The results will be displayed in a table below.', 'all-in-one-seo-pack' ),
79
  'save' => false,
80
  ),
81
- 'Submit_Opt_Update' => Array(
82
  'type' => 'submit',
83
  'class' => 'button-primary',
84
  'name' => __( 'Update Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
85
  'nowrap' => 1,
86
  'style' => 'margin-left: 20px;',
87
  ),
88
- 'Submit_Opt_Preview' => Array(
89
  'type' => 'submit',
90
  'class' => 'button-primary',
91
  'name' => __( 'Disregard Changes', 'all-in-one-seo-pack' ) . ' &raquo;',
92
  'nowrap' => 1,
93
  ),
94
- 'Submit_Optimize' => Array(
95
  'type' => 'submit',
96
  'class' => 'button-primary',
97
  'name' => __( 'Optimize', 'all-in-one-seo-pack' ) . ' &raquo;',
@@ -105,10 +105,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
105
  }
106
 
107
  $this->locations = array(
108
- 'generator' => Array(
109
- 'name' => "Robots.txt",
110
  'type' => 'settings',
111
- 'options' => Array(
112
  'usage',
113
  'additional',
114
  'useragent',
@@ -125,10 +125,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
125
  ),
126
  );
127
 
128
- $this->layout = Array(
129
- 'default' => Array(
130
  'name' => __( 'Create a Robots.txt File', 'all-in-one-seo-pack' ),
131
- 'options' => Array(
132
  'usage',
133
  'additional',
134
  'useragent',
@@ -137,30 +137,30 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
137
  'Submit_Update',
138
  'Submit_Delete',
139
  'robotgen',
140
- ) // this is set below, to the remaining options -- pdb
141
  ),
142
  );
143
- $this->layout['optimize'] = Array(
144
  'name' => __( 'Optimize your Robots.txt File', 'all-in-one-seo-pack' ),
145
- 'options' => Array( 'optusage', 'Submit_Optimize' ),
146
  );
147
  if ( isset( $_POST['Submit_Optimize'] ) ) {
148
- $this->layout['optimize']['options'] = Array(
149
  'optusage',
150
  'Submit_Opt_Update',
151
  'Submit_Opt_Preview',
152
  'robothtml',
153
  );
154
- $this->default_options['optusage']['default'] = __( "Your Robots.txt file has been optimized.  Here are the results and recommendations.  Click the Update Robots.txt File button below to write these changes to your Robots.txt file.  Click the Disregard Changes button to ignore these recommendations and keep your current Robots.txt file.", 'all-in-one-seo-pack' );
155
  }
156
 
157
  // load initial options / set defaults
158
  $this->update_options();
159
 
160
- add_action( $this->prefix . 'settings_update', Array( $this, 'do_robots' ), 10, 2 );
161
- add_filter( $this->prefix . 'display_options', Array( $this, 'filter_options' ), 10, 2 );
162
- add_filter( $this->prefix . 'submit_options', Array( $this, 'filter_submit' ), 10, 2 );
163
- add_filter( $this->prefix . 'display_settings', Array( $this, 'filter_settings' ), 10, 2 );
164
  }
165
 
166
  function filter_settings( $settings, $location ) {
@@ -171,7 +171,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
171
  $settings[ $prefix . 'robotgen' ]['type'] = 'hidden';
172
  $settings[ $prefix . 'robotgen' ]['label'] = 'none';
173
  $settings[ $prefix . 'robotgen' ]['help_text'] = '';
174
- $settings[ $prefix . 'robothtml' ] = Array(
175
  'name' => __( 'Robots.txt', 'all-in-one-seo-pack' ),
176
  'save' => false,
177
  'default' => '',
@@ -239,7 +239,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
239
  $options[ $prefix . 'robotgen' ] = $robotgen;
240
  }
241
  if ( empty( $options[ $prefix . 'robotgen' ] ) ) {
242
- $options = $this->load_files( $options, Array( 'robotgen' => 'robots.txt' ), $prefix );
243
  }
244
  }
245
  }
@@ -257,7 +257,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
257
  $options[ $prefix . 'robotgen' ] = '';
258
  }
259
  if ( isset( $_POST['Submit_Preview'] ) && ( ( $options[ $prefix . 'robotgen' ] == $allow_rule ) ||
260
- ( $options[ $prefix . 'robotgen' ] == $block_rule ) )
261
  ) {
262
  $options[ $prefix . 'robotgen' ] = '';
263
  }
@@ -267,16 +267,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
267
  $options[ $prefix . 'robotgen' ] .= $allow_rule;
268
  }
269
  }
270
- foreach ( Array( 'ad' => 'additional', 'ua' => 'useragent', 'dp' => 'path' ) as $k => $v ) {
271
  if ( isset( $_POST[ $prefix . $v ] ) ) {
272
  $$k = $_POST[ $prefix . $v ];
273
  }
274
  }
275
  if ( ! empty( $ad ) && ! empty( $ua ) && ! empty( $dp ) ) {
276
  if ( $ad === 'allow' ) {
277
- $ad = "Allow: ";
278
  } else {
279
- $ad = "Disallow: ";
280
  }
281
  $options[ $prefix . 'robotgen' ] .= "User-agent: $ua\n$ad $dp\n\n";
282
  }
@@ -296,9 +296,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
296
  }
297
  $options[ $prefix . 'robotgen' ] = $this->output_robots( $rules );
298
  $file2 = explode( "\n", $options[ $prefix . 'robotgen' ] );
299
- $options[ $prefix . 'robothtml' ] = '<table width=100%><tr><td valign=top width=45%>' . $this->annotate_robots_html( $file, true, __( "Current File", 'all-in-one-seo-pack' ) ) . '</td><td><span style="font-size: xx-large">&#8594;</span></td><td valign=top>' . $this->annotate_robots_html( $file2, true, __( "Proposed Changes", 'all-in-one-seo-pack' ) ) . '</td></tr></table>';
300
  } else {
301
- $options[ $prefix . 'robothtml' ] = $this->annotate_robots_html( $file, true, __( "Current File", 'all-in-one-seo-pack' ) );
302
  }
303
  }
304
 
@@ -311,9 +311,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
311
  }
312
  if ( $location === 'generator' ) {
313
  if ( isset( $_POST['Submit_Update'] ) || isset( $_POST['Submit_Opt_Update'] ) ) {
314
- $this->save_files( Array( 'robotgen' => 'robots.txt' ), $prefix );
315
  } elseif ( isset( $_POST['Submit_Delete'] ) ) {
316
- $this->delete_files( Array( 'robotgen' => 'robots.txt' ) );
317
  }
318
  }
319
  }
@@ -323,29 +323,29 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
323
  if ( ! empty( $robots ) ) {
324
  $buf = '<table class="widefat" ><thead>';
325
  if ( ! empty( $title ) ) {
326
- $buf .= "<tr><th colspan=3>" . $title . "</th></tr>";
327
  }
328
  $buf .= '<tr class="aioseop_optimize_thread">';
329
  $buf .= '<th style="width:5%;"></th><th style="width:78%;"><span class="column_label" >Parameter</span></th>';
330
  $buf .= '<th><span class="" >Status</span></th></tr></thead>';
331
- $buf .= "<tbody>";
332
 
333
  foreach ( $robots as $r ) {
334
  $class = 'robots';
335
- $status = "#9cf975";
336
  $help = '';
337
  if ( ! $r['valid'] || ! $r['strict'] ) {
338
  if ( ! $r['strict'] ) {
339
  $class .= ' quirks';
340
- $status = "yellow";
341
  }
342
  if ( ! $r['valid'] ) {
343
  $class .= ' invalid';
344
- $status = "#f9534a";
345
  }
346
  if ( $show_help ) {
347
  $help = '<a style="cursor:pointer;" class="' . $class . '" title="Click for Help!" onclick="toggleVisibility(\'aiosp_robots_main_legend_tip\');" title="Click for Help">'
348
- . '<div class="aioseop_tip_icon"></div></a>';
349
  }
350
  }
351
  $buf .= "<tr class='entry-row {$class}'><td>{$help}</td><td><span class='entry_label'>{$r['content']}</td><td><div style='background:{$status};'></div></td></tr>";
@@ -372,12 +372,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
372
 
373
  function annotate_robots( $robots ) {
374
  $state = 0;
375
- $rules = Array();
376
  foreach ( $robots as $l ) {
377
  $l = trim( $l );
378
  if ( empty( $l[0] ) ) {
379
  if ( $state > 1 ) {
380
- $rules[] = Array(
381
  'state' => 0,
382
  'type' => 'blank',
383
  'content' => $l,
@@ -390,7 +390,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
390
  if ( $state < 1 ) {
391
  $state = 1;
392
  }
393
- $rules[] = Array(
394
  'state' => $state,
395
  'type' => 'comment',
396
  'content' => $l,
@@ -399,7 +399,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
399
  );
400
  } elseif ( stripos( $l, 'sitemap' ) === 0 ) {
401
  $state = 2;
402
- $rules[] = Array(
403
  'state' => $state,
404
  'type' => 'sitemap',
405
  'content' => $l,
@@ -408,7 +408,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
408
  );
409
  } elseif ( stripos( $l, 'crawl-delay' ) === 0 ) {
410
  $state = 3;
411
- $rules[] = Array(
412
  'state' => $state,
413
  'type' => 'crawl-delay',
414
  'content' => $l,
@@ -417,7 +417,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
417
  );
418
  } elseif ( stripos( $l, 'user-agent' ) === 0 ) {
419
  $state = 3;
420
- $rules[] = Array(
421
  'state' => $state,
422
  'type' => 'user-agent',
423
  'content' => $l,
@@ -426,7 +426,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
426
  );
427
  } elseif ( stripos( $l, 'useragent' ) === 0 ) {
428
  $state = 3;
429
- $rules[] = Array(
430
  'state' => $state,
431
  'type' => 'user-agent',
432
  'content' => $l,
@@ -435,7 +435,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
435
  );
436
  } elseif ( stripos( $l, 'disallow' ) === 0 ) {
437
  if ( $state < 3 ) {
438
- $rules[] = Array(
439
  'state' => $state,
440
  'type' => 'disallow',
441
  'content' => $l,
@@ -445,7 +445,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
445
  continue;
446
  }
447
  $state = 3;
448
- $rules[] = Array(
449
  'state' => $state,
450
  'type' => 'disallow',
451
  'content' => $l,
@@ -454,7 +454,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
454
  );
455
  } elseif ( stripos( $l, 'allow' ) === 0 ) {
456
  if ( $state < 3 ) {
457
- $rules[] = Array(
458
  'state' => $state,
459
  'type' => 'allow',
460
  'content' => $l,
@@ -464,7 +464,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
464
  continue;
465
  }
466
  $state = 3;
467
- $rules[] = Array(
468
  'state' => $state,
469
  'type' => 'allow',
470
  'content' => $l,
@@ -472,7 +472,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
472
  'strict' => false,
473
  );
474
  } else {
475
- $rules[] = Array(
476
  'state' => $state,
477
  'type' => 'unknown',
478
  'content' => $l,
@@ -487,11 +487,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
487
 
488
  function parse_annotated_robots( $robots ) {
489
  $state = 0;
490
- $rules = Array();
491
- $opts = Array( 'sitemap', 'crawl-delay', 'user-agent', 'allow', 'disallow', 'comment' );
492
- $rule = Array();
493
  foreach ( $opts as $o ) {
494
- $rule[ $o ] = Array();
495
  }
496
  $blank_rule = $rule;
497
  foreach ( $robots as $l ) {
@@ -499,7 +499,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
499
  case 'blank':
500
  if ( $state >= 1 ) {
501
  if ( ( $state === 1 ) && ( empty( $rule['user-agent'] ) ) ) {
502
- $rule['user-agent'] = Array( null );
503
  }
504
  $rules[] = $rule;
505
  $rule = $blank_rule;
@@ -540,7 +540,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
540
  $state = $l['state'];
541
  }
542
  if ( ( $state === 1 ) && ( empty( $rule['user-agent'] ) ) ) {
543
- $rule['user-agent'] = Array( null );
544
  }
545
  if ( $state >= 1 ) {
546
  $rules[] = $rule;
@@ -554,15 +554,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
554
  }
555
 
556
  function get_robot_user_agents( $rules ) {
557
- $opts = Array( 'sitemap', 'crawl-delay', 'user-agent', 'allow', 'disallow', 'comment' );
558
- $user_agents = Array();
559
  foreach ( $rules as $r ) {
560
  if ( ! empty( $r['sitemap'] ) && empty( $r['user-agent'] ) ) {
561
- $r['user-agent'] = Array( null );
562
  }
563
  foreach ( $r['user-agent'] as $ua ) {
564
  if ( ! isset( $user_agents[ $ua ] ) ) {
565
- $user_agents[ $ua ] = Array();
566
  }
567
  foreach ( $opts as $o ) {
568
  if ( ! isset( $user_agents[ $ua ][ $o ] ) ) {
@@ -578,9 +578,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
578
  }
579
 
580
  function flatten_user_agents( $user_agents ) {
581
- $rules = Array();
582
  foreach ( $user_agents as $ua => $r ) {
583
- $r['user-agent'] = Array( $ua );
584
  $rules[] = $r;
585
  }
586
 
14
  $this->file = __FILE__; // the current file
15
  parent::__construct();
16
 
17
+ $help_text = array(
18
  'additional' => __( 'Rule Type', 'all-in-one-seo-pack' ),
19
  'useragent' => __( 'User Agent', 'all-in-one-seo-pack' ),
20
  'path' => __( 'Directory Path', 'all-in-one-seo-pack' ),
22
  );
23
 
24
  $this->default_options = array(
25
+ 'usage' => array(
26
  'type' => 'html',
27
  'label' => 'none',
28
  'default' => __( 'Use the rule builder below to add rules to create a new Robots.txt file.  If you already have a Robots.txt file you should use the File Editor feature in All in One SEO Pack to edit it or you can delete your current Robots.txt file and start a new one with the rule builder below.', 'all-in-one-seo-pack' ),
29
  'save' => false,
30
  ),
31
+ 'additional' => array(
32
  'name' => __( 'Rule Type', 'all-in-one-seo-pack' ),
33
  'save' => false,
34
  'type' => 'select',
35
+ 'initial_options' => array( 'allow' => 'Allow', 'block' => 'Block' ),
36
  ),
37
+ 'useragent' => array(
38
  'name' => __( 'User Agent', 'all-in-one-seo-pack' ),
39
  'save' => false,
40
  'type' => 'text',
41
  ),
42
+ 'path' => array(
43
  'name' => __( 'Directory Path', 'all-in-one-seo-pack' ),
44
  'save' => false,
45
  'type' => 'text',
46
  ),
47
+ 'robotgen' => array(
48
  'name' => __( 'Generate Robots.txt', 'all-in-one-seo-pack' ),
49
  'save' => false,
50
  'default' => '',
54
  'label' => 'none',
55
  'readonly' => 'readonly',
56
  ),
57
+ 'Submit_Preview' => array(
58
  'type' => 'submit',
59
  'class' => 'button-primary MRL',
60
  'name' => __( 'Add Rule', 'all-in-one-seo-pack' ) . ' &raquo;',
61
  'nowrap' => 1,
62
  ),
63
+ 'Submit_Update' => array(
64
  'type' => 'submit',
65
  'class' => 'button-primary',
66
  'name' => __( 'Save Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
67
  'nowrap' => 1,
68
  ),
69
+ 'Submit_Delete' => array(
70
  'type' => 'submit',
71
  'class' => 'button-primary',
72
  'name' => __( 'Delete Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
73
  'nowrap' => 1,
74
  ),
75
+ 'optusage' => array(
76
  'type' => 'html',
77
  'label' => 'none',
78
  'default' => __( 'Click the Optimize button below and All in One SEO Pack will analyze your Robots.txt file to make sure it complies with the standards for Robots.txt files.  The results will be displayed in a table below.', 'all-in-one-seo-pack' ),
79
  'save' => false,
80
  ),
81
+ 'Submit_Opt_Update' => array(
82
  'type' => 'submit',
83
  'class' => 'button-primary',
84
  'name' => __( 'Update Robots.txt File', 'all-in-one-seo-pack' ) . ' &raquo;',
85
  'nowrap' => 1,
86
  'style' => 'margin-left: 20px;',
87
  ),
88
+ 'Submit_Opt_Preview' => array(
89
  'type' => 'submit',
90
  'class' => 'button-primary',
91
  'name' => __( 'Disregard Changes', 'all-in-one-seo-pack' ) . ' &raquo;',
92
  'nowrap' => 1,
93
  ),
94
+ 'Submit_Optimize' => array(
95
  'type' => 'submit',
96
  'class' => 'button-primary',
97
  'name' => __( 'Optimize', 'all-in-one-seo-pack' ) . ' &raquo;',
105
  }
106
 
107
  $this->locations = array(
108
+ 'generator' => array(
109
+ 'name' => 'Robots.txt',
110
  'type' => 'settings',
111
+ 'options' => array(
112
  'usage',
113
  'additional',
114
  'useragent',
125
  ),
126
  );
127
 
128
+ $this->layout = array(
129
+ 'default' => array(
130
  'name' => __( 'Create a Robots.txt File', 'all-in-one-seo-pack' ),
131
+ 'options' => array(
132
  'usage',
133
  'additional',
134
  'useragent',
137
  'Submit_Update',
138
  'Submit_Delete',
139
  'robotgen',
140
+ ), // this is set below, to the remaining options -- pdb
141
  ),
142
  );
143
+ $this->layout['optimize'] = array(
144
  'name' => __( 'Optimize your Robots.txt File', 'all-in-one-seo-pack' ),
145
+ 'options' => array( 'optusage', 'Submit_Optimize' ),
146
  );
147
  if ( isset( $_POST['Submit_Optimize'] ) ) {
148
+ $this->layout['optimize']['options'] = array(
149
  'optusage',
150
  'Submit_Opt_Update',
151
  'Submit_Opt_Preview',
152
  'robothtml',
153
  );
154
+ $this->default_options['optusage']['default'] = __( 'Your Robots.txt file has been optimized.  Here are the results and recommendations.  Click the Update Robots.txt File button below to write these changes to your Robots.txt file.  Click the Disregard Changes button to ignore these recommendations and keep your current Robots.txt file.', 'all-in-one-seo-pack' );
155
  }
156
 
157
  // load initial options / set defaults
158
  $this->update_options();
159
 
160
+ add_action( $this->prefix . 'settings_update', array( $this, 'do_robots' ), 10, 2 );
161
+ add_filter( $this->prefix . 'display_options', array( $this, 'filter_options' ), 10, 2 );
162
+ add_filter( $this->prefix . 'submit_options', array( $this, 'filter_submit' ), 10, 2 );
163
+ add_filter( $this->prefix . 'display_settings', array( $this, 'filter_settings' ), 10, 2 );
164
  }
165
 
166
  function filter_settings( $settings, $location ) {
171
  $settings[ $prefix . 'robotgen' ]['type'] = 'hidden';
172
  $settings[ $prefix . 'robotgen' ]['label'] = 'none';
173
  $settings[ $prefix . 'robotgen' ]['help_text'] = '';
174
+ $settings[ $prefix . 'robothtml' ] = array(
175
  'name' => __( 'Robots.txt', 'all-in-one-seo-pack' ),
176
  'save' => false,
177
  'default' => '',
239
  $options[ $prefix . 'robotgen' ] = $robotgen;
240
  }
241
  if ( empty( $options[ $prefix . 'robotgen' ] ) ) {
242
+ $options = $this->load_files( $options, array( 'robotgen' => 'robots.txt' ), $prefix );
243
  }
244
  }
245
  }
257
  $options[ $prefix . 'robotgen' ] = '';
258
  }
259
  if ( isset( $_POST['Submit_Preview'] ) && ( ( $options[ $prefix . 'robotgen' ] == $allow_rule ) ||
260
+ ( $options[ $prefix . 'robotgen' ] == $block_rule ) )
261
  ) {
262
  $options[ $prefix . 'robotgen' ] = '';
263
  }
267
  $options[ $prefix . 'robotgen' ] .= $allow_rule;
268
  }
269
  }
270
+ foreach ( array( 'ad' => 'additional', 'ua' => 'useragent', 'dp' => 'path' ) as $k => $v ) {
271
  if ( isset( $_POST[ $prefix . $v ] ) ) {
272
  $$k = $_POST[ $prefix . $v ];
273
  }
274
  }
275
  if ( ! empty( $ad ) && ! empty( $ua ) && ! empty( $dp ) ) {
276
  if ( $ad === 'allow' ) {
277
+ $ad = 'Allow: ';
278
  } else {
279
+ $ad = 'Disallow: ';
280
  }
281
  $options[ $prefix . 'robotgen' ] .= "User-agent: $ua\n$ad $dp\n\n";
282
  }
296
  }
297
  $options[ $prefix . 'robotgen' ] = $this->output_robots( $rules );
298
  $file2 = explode( "\n", $options[ $prefix . 'robotgen' ] );
299
+ $options[ $prefix . 'robothtml' ] = '<table width=100%><tr><td valign=top width=45%>' . $this->annotate_robots_html( $file, true, __( 'Current File', 'all-in-one-seo-pack' ) ) . '</td><td><span style="font-size: xx-large">&#8594;</span></td><td valign=top>' . $this->annotate_robots_html( $file2, true, __( 'Proposed Changes', 'all-in-one-seo-pack' ) ) . '</td></tr></table>';
300
  } else {
301
+ $options[ $prefix . 'robothtml' ] = $this->annotate_robots_html( $file, true, __( 'Current File', 'all-in-one-seo-pack' ) );
302
  }
303
  }
304
 
311
  }
312
  if ( $location === 'generator' ) {
313
  if ( isset( $_POST['Submit_Update'] ) || isset( $_POST['Submit_Opt_Update'] ) ) {
314
+ $this->save_files( array( 'robotgen' => 'robots.txt' ), $prefix );
315
  } elseif ( isset( $_POST['Submit_Delete'] ) ) {
316
+ $this->delete_files( array( 'robotgen' => 'robots.txt' ) );
317
  }
318
  }
319
  }
323
  if ( ! empty( $robots ) ) {
324
  $buf = '<table class="widefat" ><thead>';
325
  if ( ! empty( $title ) ) {
326
+ $buf .= '<tr><th colspan=3>' . $title . '</th></tr>';
327
  }
328
  $buf .= '<tr class="aioseop_optimize_thread">';
329
  $buf .= '<th style="width:5%;"></th><th style="width:78%;"><span class="column_label" >Parameter</span></th>';
330
  $buf .= '<th><span class="" >Status</span></th></tr></thead>';
331
+ $buf .= '<tbody>';
332
 
333
  foreach ( $robots as $r ) {
334
  $class = 'robots';
335
+ $status = '#9cf975';
336
  $help = '';
337
  if ( ! $r['valid'] || ! $r['strict'] ) {
338
  if ( ! $r['strict'] ) {
339
  $class .= ' quirks';
340
+ $status = 'yellow';
341
  }
342
  if ( ! $r['valid'] ) {
343
  $class .= ' invalid';
344
+ $status = '#f9534a';
345
  }
346
  if ( $show_help ) {
347
  $help = '<a style="cursor:pointer;" class="' . $class . '" title="Click for Help!" onclick="toggleVisibility(\'aiosp_robots_main_legend_tip\');" title="Click for Help">'
348
+ . '<div class="aioseop_tip_icon"></div></a>';
349
  }
350
  }
351
  $buf .= "<tr class='entry-row {$class}'><td>{$help}</td><td><span class='entry_label'>{$r['content']}</td><td><div style='background:{$status};'></div></td></tr>";
372
 
373
  function annotate_robots( $robots ) {
374
  $state = 0;
375
+ $rules = array();
376
  foreach ( $robots as $l ) {
377
  $l = trim( $l );
378
  if ( empty( $l[0] ) ) {
379
  if ( $state > 1 ) {
380
+ $rules[] = array(
381
  'state' => 0,
382
  'type' => 'blank',
383
  'content' => $l,
390
  if ( $state < 1 ) {
391
  $state = 1;
392
  }
393
+ $rules[] = array(
394
  'state' => $state,
395
  'type' => 'comment',
396
  'content' => $l,
399
  );
400
  } elseif ( stripos( $l, 'sitemap' ) === 0 ) {
401
  $state = 2;
402
+ $rules[] = array(
403
  'state' => $state,
404
  'type' => 'sitemap',
405
  'content' => $l,
408
  );
409
  } elseif ( stripos( $l, 'crawl-delay' ) === 0 ) {
410
  $state = 3;
411
+ $rules[] = array(
412
  'state' => $state,
413
  'type' => 'crawl-delay',
414
  'content' => $l,
417
  );
418
  } elseif ( stripos( $l, 'user-agent' ) === 0 ) {
419
  $state = 3;
420
+ $rules[] = array(
421
  'state' => $state,
422
  'type' => 'user-agent',
423
  'content' => $l,
426
  );
427
  } elseif ( stripos( $l, 'useragent' ) === 0 ) {
428
  $state = 3;
429
+ $rules[] = array(
430
  'state' => $state,
431
  'type' => 'user-agent',
432
  'content' => $l,
435
  );
436
  } elseif ( stripos( $l, 'disallow' ) === 0 ) {
437
  if ( $state < 3 ) {
438
+ $rules[] = array(
439
  'state' => $state,
440
  'type' => 'disallow',
441
  'content' => $l,
445
  continue;
446
  }
447
  $state = 3;
448
+ $rules[] = array(
449
  'state' => $state,
450
  'type' => 'disallow',
451
  'content' => $l,
454
  );
455
  } elseif ( stripos( $l, 'allow' ) === 0 ) {
456
  if ( $state < 3 ) {
457
+ $rules[] = array(
458
  'state' => $state,
459
  'type' => 'allow',
460
  'content' => $l,
464
  continue;
465
  }
466
  $state = 3;
467
+ $rules[] = array(
468
  'state' => $state,
469
  'type' => 'allow',
470
  'content' => $l,
472
  'strict' => false,
473
  );
474
  } else {
475
+ $rules[] = array(
476
  'state' => $state,
477
  'type' => 'unknown',
478
  'content' => $l,
487
 
488
  function parse_annotated_robots( $robots ) {
489
  $state = 0;
490
+ $rules = array();
491
+ $opts = array( 'sitemap', 'crawl-delay', 'user-agent', 'allow', 'disallow', 'comment' );
492
+ $rule = array();
493
  foreach ( $opts as $o ) {
494
+ $rule[ $o ] = array();
495
  }
496
  $blank_rule = $rule;
497
  foreach ( $robots as $l ) {
499
  case 'blank':
500
  if ( $state >= 1 ) {
501
  if ( ( $state === 1 ) && ( empty( $rule['user-agent'] ) ) ) {
502
+ $rule['user-agent'] = array( null );
503
  }
504
  $rules[] = $rule;
505
  $rule = $blank_rule;
540
  $state = $l['state'];
541
  }
542
  if ( ( $state === 1 ) && ( empty( $rule['user-agent'] ) ) ) {
543
+ $rule['user-agent'] = array( null );
544
  }
545
  if ( $state >= 1 ) {
546
  $rules[] = $rule;
554
  }
555
 
556
  function get_robot_user_agents( $rules ) {
557
+ $opts = array( 'sitemap', 'crawl-delay', 'user-agent', 'allow', 'disallow', 'comment' );
558
+ $user_agents = array();
559
  foreach ( $rules as $r ) {
560
  if ( ! empty( $r['sitemap'] ) && empty( $r['user-agent'] ) ) {
561
+ $r['user-agent'] = array( null );
562
  }
563
  foreach ( $r['user-agent'] as $ua ) {
564
  if ( ! isset( $user_agents[ $ua ] ) ) {
565
+ $user_agents[ $ua ] = array();
566
  }
567
  foreach ( $opts as $o ) {
568
  if ( ! isset( $user_agents[ $ua ][ $o ] ) ) {
578
  }
579
 
580
  function flatten_user_agents( $user_agents ) {
581
+ $rules = array();
582
  foreach ( $user_agents as $ua => $r ) {
583
+ $r['user-agent'] = array( $ua );
584
  $rules[] = $r;
585
  }
586
 
modules/aioseop_sitemap.php CHANGED
@@ -66,7 +66,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
66
  'gzipped' => __( 'Create a compressed sitemap file in .xml.gz format.', 'all-in-one-seo-pack' ),
67
  'robots' => __( 'Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all-in-one-seo-pack' ),
68
  'rewrite' => __( 'Dynamically creates the XML sitemap instead of using a static file.', 'all-in-one-seo-pack' ),
69
- 'addl_url' => __( 'URL to the page.', 'all-in-one-seo-pack' ),
70
  'addl_prio' => __( 'The priority of the page.', 'all-in-one-seo-pack' ),
71
  'addl_freq' => __( 'The frequency of the page.', 'all-in-one-seo-pack' ),
72
  'addl_mod' => __( 'Last modified date of the page.', 'all-in-one-seo-pack' ),
@@ -207,7 +207,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
207
 
208
  $arr[ $k . '_' . $opt ] = array(
209
  'name' => $this->ucwords( $val ),
210
- 'help_text' => sprintf( __( 'Manually set the %s of your %s.', 'all-in-one-seo-pack' ), $v, $val ),
211
  'type' => 'select',
212
  'initial_options' => $iopts,
213
  'default' => 'no',
@@ -306,10 +306,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
306
 
307
  $this->add_help_text_links();
308
 
309
- add_action( 'after_doing_aioseop_updates', array(
310
- $this,
311
- 'do_sitemaps',
312
- ) ); // Update static sitemap when AIOSEOP is upgrade to new version.
 
 
313
  add_action( 'init', array( $this, 'load_sitemap_options' ) );
314
  add_action( $this->prefix . 'settings_update', array( $this, 'do_sitemaps' ) );
315
  add_filter( $this->prefix . 'display_settings', array( $this, 'update_post_data' ) );
@@ -339,18 +341,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
339
 
340
  $options = $this->options;
341
 
342
- if ( isset( $options["{$this->prefix}indexes"] ) && 'on ' !== $options["{$this->prefix}indexes"] &&
343
- 1001 < $options["{$this->prefix}max_posts"] ) {
344
 
345
  $post_counts = $num_terms = 0;
346
 
347
- $post_counts = $this->get_total_post_count( array(
348
- 'post_type' => $options["{$this->prefix}posttypes"],
349
- 'post_status' => 'publish',
350
- ) );
 
 
351
 
352
- $term_counts = $this->get_all_term_counts( array( 'taxonomy' => $options["{$this->prefix}taxonomies"] ) );
353
- if( isset( $term_counts ) && is_array( $term_counts ) ){
354
  $num_terms = array_sum( $term_counts );
355
  }
356
 
@@ -362,7 +366,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
362
 
363
  $aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
364
 
365
- printf( '
 
366
  <div id="message" class="notice-warning notice is-dismissible aioseop-notice sitemap_max_urls_notice visibility-notice">
367
  <p>
368
  <strong>%1$s</strong><br />
@@ -370,7 +375,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
370
  </p>
371
  </div>',
372
  __( 'Notice: To avoid problems with your XML Sitemap, we strongly recommend you enable Sitemap Indexes and set the Maximum Posts per Sitemap Page to 1000.', 'all-in-one-seo-pack' ),
373
- sprintf( __( '%s Click here%s to make these recommended changes.', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/modules/aioseop_sitemap.php" ) ) ), '</a>' ) );
 
374
  }
375
  }
376
 
@@ -389,8 +395,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
389
  }
390
 
391
  $posttypes = array();
392
- if ( ! empty( $this->options["{$this->prefix}posttypes"] ) ) {
393
- $posttypes = $this->options["{$this->prefix}posttypes"];
394
  }
395
 
396
  if ( ! in_array( $post->post_type, $posttypes, true ) ) {
@@ -458,17 +464,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
458
  function load_sitemap_options() {
459
  // Load initial options / set defaults.
460
  $this->update_options();
461
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
462
- if ( $this->options["{$this->prefix}max_posts"] && ( $this->options["{$this->prefix}max_posts"] > 0 ) && ( $this->options["{$this->prefix}max_posts"] < 50000 ) ) {
463
- $this->max_posts = $this->options["{$this->prefix}max_posts"];
464
  }
465
  }
466
 
467
  if ( is_multisite() ) {
468
- $this->options["{$this->prefix}rewrite"] = 'On';
469
  }
470
 
471
- if ( $this->options["{$this->prefix}rewrite"] ) {
472
  $this->setup_rewrites();
473
  }
474
 
@@ -544,54 +550,62 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
544
  $tax_name = __( ' Taxonomy', 'all-in-one-seo-pack' );
545
  foreach ( $post_type_titles as $k => $v ) {
546
  $key = 'prio_post_' . $k;
547
- $this->default_options = aioseop_array_insert_after( $this->default_options, 'prio_post', array(
548
- $key => array(
549
- 'name' => $v . $post_name,
550
- 'help_text' => $prio_help . $v . $post_name,
551
- 'type' => 'select',
552
- 'initial_options' => $this->prio,
553
- 'default' => 'no',
554
- 'condshow' => array( "{$this->prefix}prio_post" => 'sel' ),
555
- ),
556
- ) );
 
 
557
  $this->layout['priorities']['options'][] = $key;
558
  $key = 'freq_post_' . $k;
559
- $this->default_options = aioseop_array_insert_after( $this->default_options, 'freq_post', array(
560
- $key => array(
561
- 'name' => $v . $post_name,
562
- 'help_text' => $freq_help . $v . $post_name,
563
- 'type' => 'select',
564
- 'initial_options' => $this->freq,
565
- 'default' => 'no',
566
- 'condshow' => array( "{$this->prefix}freq_post" => 'sel' ),
567
- ),
568
- ) );
 
 
569
  $this->layout['frequencies']['options'][] = $key;
570
  }
571
  foreach ( $taxonomy_titles as $k => $v ) {
572
  $key = 'prio_taxonomies_' . $k;
573
- $this->default_options = aioseop_array_insert_after( $this->default_options, 'prio_taxonomies', array(
574
- $key => array(
575
- 'name' => $v . $tax_name,
576
- 'help_text' => $prio_help . $v . $tax_name,
577
- 'type' => 'select',
578
- 'initial_options' => $this->prio,
579
- 'default' => 'no',
580
- 'condshow' => array( "{$this->prefix}prio_taxonomies" => 'sel' ),
581
- ),
582
- ) );
 
 
583
  $this->layout['priorities']['options'][] = $key;
584
  $key = 'freq_taxonomies_' . $k;
585
- $this->default_options = aioseop_array_insert_after( $this->default_options, 'freq_taxonomies', array(
586
- $key => array(
587
- 'name' => $v . $tax_name,
588
- 'help_text' => $freq_help . $v . $tax_name,
589
- 'type' => 'select',
590
- 'initial_options' => $this->freq,
591
- 'default' => 'no',
592
- 'condshow' => array( "{$this->prefix}freq_taxonomies" => 'sel' ),
593
- ),
594
- ) );
 
 
595
  $this->layout['frequencies']['options'][] = $key;
596
  }
597
  $this->update_options();
@@ -684,7 +698,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
684
 
685
  $options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your sitemap', 'all-in-one-seo-pack' ) . '</a>' );
686
  $options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created with content and images.', 'all-in-one-seo-pack' );
687
- if ( '0' !== get_option( 'blog_public' ) ){
688
  $options[ $this->prefix . 'link' ] .= ' ' . __( 'Changes are automatically submitted to search engines.', 'all-in-one-seo-pack' );
689
  }
690
 
@@ -720,11 +734,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
720
  if ( ! isset( $this->default_options['posttypes']['initial_options'] ) ) {
721
  $this->add_post_types();
722
  }
723
- if ( is_array( $options["{$this->prefix}posttypes"] ) && in_array( 'all', $options["{$this->prefix}posttypes"] ) && is_array( $this->default_options['posttypes']['initial_options'] ) ) {
724
- $options["{$this->prefix}posttypes"] = array_keys( $this->default_options['posttypes']['initial_options'] );
725
  }
726
- if ( is_array( $options["{$this->prefix}taxonomies"] ) && in_array( 'all', $options["{$this->prefix}taxonomies"] ) && is_array( $this->default_options['taxonomies']['initial_options'] ) ) {
727
- $options["{$this->prefix}taxonomies"] = array_keys( $this->default_options['taxonomies']['initial_options'] );
728
  }
729
  $opt = $this->prefix . 'filename';
730
  if ( isset( $options[ $opt ] ) && ! empty( $options[ $opt ] ) ) {
@@ -795,14 +809,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
795
  if ( $this->is_aioseop_active_on_blog( $blog_id ) ) {
796
  $options = get_blog_option( $blog_id, $this->parent_option );
797
  if ( ! empty( $options ) && ! empty( $options['modules'] ) && ! empty( $options['modules']['aiosp_feature_manager_options'] )
798
- && ! empty( $options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] )
799
- && ! empty( $options['modules'][ $option_name ] )
800
  ) {
801
  global $wpdb;
802
  $sitemap_options = $options['modules'][ $option_name ];
803
  $siteurl = '';
804
  if ( defined( 'SUNRISE' ) && SUNRISE && is_object( $wpdb ) && isset( $wpdb->dmtable ) && ! empty( $wpdb->dmtable ) ) {
 
805
  $domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '$blog_id' AND active = 1 LIMIT 1" );
 
806
  if ( $domain ) {
807
  if ( false == isset( $_SERVER['HTTPS'] ) ) {
808
  $_SERVER['HTTPS'] = 'Off';
@@ -814,8 +830,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
814
  if ( ! $siteurl ) {
815
  $siteurl = get_home_url( $blog_id );
816
  }
817
- $url = $siteurl . '/' . $sitemap_options["{$this->prefix}filename"] . '.xml';
818
- if ( $sitemap_options["{$this->prefix}gzipped"] ) {
819
  $url .= '.gz';
820
  }
821
  $siteurls[] = $url;
@@ -888,10 +904,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
888
  $scan1 = $scan2 = '';
889
  $files = array();
890
 
891
- if ( ! empty( $this->options["{$this->prefix}filename"] ) ) {
892
- $scan1 = get_home_path() . $this->options["{$this->prefix}filename"] . '*.xml';
893
- if ( ! empty( $this->options["{$this->prefix}gzipped"] ) ) {
894
- $scan2 .= get_home_path() . $this->options["{$this->prefix}filename"] . '*.xml.gz';
895
  }
896
 
897
  if ( empty( $scan1 ) && empty( $scan2 ) ) {
@@ -924,13 +940,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
924
  */
925
  function do_sitemap_scan() {
926
  $msg = '';
927
- if ( ! empty( $this->options["{$this->prefix}rewrite"] ) && ( get_option( 'permalink_structure' ) === '' ) ) {
928
  $msg = '<p>' . __( 'Warning: dynamic sitemap generation must have permalinks enabled.', 'all-in-one-seo-pack' ) . '</p>';
929
  }
930
  if ( ! empty( $_POST['aioseop_sitemap_rename_files'] ) || ! empty( $_POST['aioseop_sitemap_delete_files'] ) ) {
931
  $nonce = $_POST['nonce-aioseop'];
932
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
933
- die ( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
934
  }
935
  if ( ! empty( $_POST['aioseop_sitemap_conflict'] ) ) {
936
  $files = $this->scan_match_files();
@@ -956,7 +972,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
956
  } else {
957
  $ren = $this->rename_file( $ren_file, $ren_to );
958
  if ( $ren ) {
959
- $msg .= '<p>' . sprintf( __( 'Renamed %s to %s.', 'all-in-one-seo-pack' ), $ren_file, $ren_to ) . '</p>';
960
  }
961
  }
962
  } else {
@@ -1036,11 +1052,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1036
  }
1037
  if ( ! empty( $file ) ) {
1038
  $matches = array();
1039
- if ( preg_match( '/<!-- ' . sprintf( $this->comment_string, '(.*)', '(.*)', '(.*)' ) . ' -->/',
1040
- $file, $matches ) ) {
1041
- if ( ! empty( $this->options["{$this->prefix}rewrite"] ) ) {
1042
- $msg .= '<p>' . sprintf( __( "Warning: a static sitemap '%s' generated by All in One SEO Pack %s on %s already exists that may conflict with dynamic sitemap generation.", 'all-in-one-seo-pack' ),
1043
- $f, $matches[2], $matches[3] ) . "</p>\n";
 
 
 
 
1044
  $problem_files[] = $f;
1045
  }
1046
  } else {
@@ -1123,15 +1143,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1123
  function get_rewrite_rules() {
1124
  $sitemap_rules_normal = $sitemap_rules_gzipped = array();
1125
  $sitemap_rules_normal = array(
1126
- $this->options["{$this->prefix}filename"] . '.xml' => "index.php?{$this->prefix}path=root",
1127
- $this->options["{$this->prefix}filename"] . '_(.+)_(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1128
- $this->options["{$this->prefix}filename"] . '_(.+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
1129
  );
1130
- if ( $this->options["{$this->prefix}gzipped"] ) {
1131
  $sitemap_rules_gzipped = array(
1132
- $this->options["{$this->prefix}filename"] . '.xml.gz' => "index.php?{$this->prefix}gzipped=1&{$this->prefix}path=root.gz",
1133
- $this->options["{$this->prefix}filename"] . '_(.+)_(\d+).xml.gz' => 'index.php?' . $this->prefix . 'path=$matches[1].gz&' . $this->prefix . 'page=$matches[2]',
1134
- $this->options["{$this->prefix}filename"] . '_(.+).xml.gz' => 'index.php?' . $this->prefix . 'path=$matches[1].gz',
1135
  );
1136
  }
1137
  $sitemap_rules = $sitemap_rules_gzipped + $sitemap_rules_normal;
@@ -1180,7 +1200,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1180
  */
1181
  function query_var_hook( $vars ) {
1182
  $vars[] = "{$this->prefix}path";
1183
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1184
  $vars[] = "{$this->prefix}page";
1185
  }
1186
 
@@ -1226,22 +1246,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1226
  */
1227
  function sitemap_output_hook( $query ) {
1228
  $page = 0;
1229
- if ( $this->options["{$this->prefix}rewrite"] && ! empty( $query->query_vars["{$this->prefix}path"] ) ) {
1230
 
1231
  // Make dynamic sitemap.
1232
-
1233
- if ( ! empty( $query->query_vars["{$this->prefix}page"] ) ) {
1234
- $page = $query->query_vars["{$this->prefix}page"] - 1;
1235
  }
1236
  $this->start_memory_usage = memory_get_peak_usage();
1237
- $sitemap_type = $query->query_vars["{$this->prefix}path"];
1238
  $gzipped = false;
1239
  if ( $this->substr( $sitemap_type, - 3 ) === '.gz' ) {
1240
  $gzipped = true;
1241
  $sitemap_type = $this->substr( $sitemap_type, 0, - 3 );
1242
  }
1243
  $blog_charset = get_option( 'blog_charset' );
1244
- if ( $this->options["{$this->prefix}gzipped"] && $gzipped ) {
1245
  header( "Content-Type: application/x-gzip; charset=$blog_charset", true );
1246
  } else {
1247
  $gzipped = false;
@@ -1263,7 +1282,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1263
  $this->log_stats( $sitemap_type, $gzipped );
1264
  exit();
1265
 
1266
-
1267
  }
1268
  }
1269
 
@@ -1290,12 +1308,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1290
  */
1291
  function get_sitemap_data( $sitemap_type, $page = 0 ) {
1292
  $sitemap_data = array();
1293
- if ( $this->options["{$this->prefix}indexes"] ) {
1294
- $posttypes = $this->options["{$this->prefix}posttypes"];
1295
  if ( empty( $posttypes ) ) {
1296
  $posttypes = array();
1297
  }
1298
- $taxonomies = $this->options["{$this->prefix}taxonomies"];
1299
  if ( empty( $taxonomies ) ) {
1300
  $taxonomies = array();
1301
  }
@@ -1348,10 +1366,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1348
  function get_sitemap_url() {
1349
 
1350
  $gz = '';
1351
- if ( $this->options["{$this->prefix}gzipped"] ) {
1352
  $gz .= '.gz';
1353
  }
1354
- $url = aioseop_home_url( '/' . $this->options["{$this->prefix}filename"] . ".xml$gz" );
1355
 
1356
  return $url;
1357
  }
@@ -1384,10 +1402,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1384
  $response = wp_remote_get( $notify_url[ $k ] . urlencode( $url ) );
1385
  if ( is_array( $response ) && ! empty( $response['response'] ) && ! empty( $response['response']['code'] ) ) {
1386
  if ( 200 != $response['response']['code'] ) {
1387
- $this->debug_message( sprintf( __( 'Failed to notify %s about changes to your sitemap at %s, error code %s.', 'all-in-one-seo-pack' ), $k, $url, $response['response']['code'] ) );
1388
  }
1389
  } else {
1390
- $this->debug_message( sprintf( __( 'Failed to notify %s about changes to your sitemap at %s, unable to access via wp_remote_get().', 'all-in-one-seo-pack' ), $k, $url ) );
1391
  }
1392
  }
1393
  }
@@ -1414,24 +1432,24 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1414
  $this->options = $aioseop_options['modules'][ "{$this->prefix}options" ];
1415
  }
1416
 
1417
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1418
- if ( $this->options["{$this->prefix}max_posts"] && ( $this->options["{$this->prefix}max_posts"] > 0 ) && ( $this->options["{$this->prefix}max_posts"] < 50000 ) ) {
1419
- $this->max_posts = $this->options["{$this->prefix}max_posts"];
1420
  } else {
1421
  $this->max_posts = 50000;
1422
  }
1423
  } else {
1424
  $this->max_posts = 50000;
1425
  }
1426
- if ( ! $this->options["{$this->prefix}rewrite"] ) {
1427
- if ( $this->options["{$this->prefix}indexes"] ) {
1428
  $this->do_indexed_sitemaps();
1429
  } else {
1430
  $this->log_start();
1431
- $comment = sprintf( "file '%s' statically", $this->options["{$this->prefix}filename"] );
1432
  $sitemap = $this->do_simple_sitemap( $comment );
1433
- $this->write_sitemaps( $this->options["{$this->prefix}filename"], $sitemap );
1434
- $this->log_stats( 'root', $this->options["{$this->prefix}gzipped"], false );
1435
  }
1436
  } else {
1437
  delete_transient( "{$this->prefix}rules_flushed" );
@@ -1467,7 +1485,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1467
  */
1468
  function write_sitemaps( $filename, $contents ) {
1469
  $this->write_sitemap( $filename . '.xml', $contents );
1470
- if ( $this->options["{$this->prefix}gzipped"] ) {
1471
  $this->write_sitemap( $filename . '.xml.gz', $contents, true );
1472
  }
1473
  }
@@ -1604,54 +1622,56 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1604
  function get_sitemap_index_filenames() {
1605
  $files = array();
1606
  $options = $this->options;
1607
- $prefix = $options["{$this->prefix}filename"];
1608
  $suffix = '.xml';
1609
- if ( $options["{$this->prefix}gzipped"] ) {
1610
  $suffix .= '.gz';
1611
  }
1612
- if ( empty( $options["{$this->prefix}posttypes"] ) ) {
1613
- $options["{$this->prefix}posttypes"] = array();
1614
  }
1615
- if ( empty( $options["{$this->prefix}taxonomies"] ) ) {
1616
- $options["{$this->prefix}taxonomies"] = array();
1617
  }
1618
- $options["{$this->prefix}posttypes"] = array_diff( $options["{$this->prefix}posttypes"], array( 'all' ) );
1619
- $options["{$this->prefix}taxonomies"] = array_diff( $options["{$this->prefix}taxonomies"], array( 'all' ) );
1620
 
1621
  $files[] = array( 'loc' => aioseop_home_url( '/' . $prefix . '_addl' . $suffix ) );
1622
 
1623
- if ( ! empty( $options["{$this->prefix}posttypes"] ) ) {
1624
  $prio = $this->get_default_priority( 'post' );
1625
  $freq = $this->get_default_frequency( 'post' );
1626
- $post_counts = $this->get_all_post_counts( array(
1627
- 'post_type' => $options["{$this->prefix}posttypes"],
1628
- 'post_status' => 'publish',
1629
- ) );
 
 
1630
 
1631
- foreach ( $options["{$this->prefix}posttypes"] as $sm ) {
1632
  if ( 0 == $post_counts[ $sm ] ) {
1633
  continue;
1634
  }
1635
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1636
  if ( $post_counts[ $sm ] > $this->max_posts ) {
1637
  $count = 1;
1638
  for ( $post_count = 0; $post_count < $post_counts[ $sm ]; $post_count += $this->max_posts ) {
1639
  $files[] = array(
1640
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ),
1641
  'priority' => $prio,
1642
  'changefreq' => $freq,
1643
  );
1644
  }
1645
  } else {
1646
  $files[] = array(
1647
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ),
1648
  'priority' => $prio,
1649
  'changefreq' => $freq,
1650
  );
1651
  }
1652
  } else {
1653
  $files[] = array(
1654
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ),
1655
  'priority' => $prio,
1656
  'changefreq' => $freq,
1657
  );
@@ -1660,43 +1680,43 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1660
  }
1661
  if ( $this->option_isset( 'archive' ) ) {
1662
  $files[] = array(
1663
- 'loc' => aioseop_home_url ( '/' . $prefix . '_archive' . $suffix ),
1664
  'priority' => $this->get_default_priority( 'archive' ),
1665
  'changefreq' => $this->get_default_frequency( 'archive' ),
1666
  );
1667
  }
1668
  if ( $this->option_isset( 'author' ) ) {
1669
  $files[] = array(
1670
- 'loc' => aioseop_home_url ( '/' . $prefix . '_author' . $suffix ),
1671
  'priority' => $this->get_default_priority( 'author' ),
1672
  'changefreq' => $this->get_default_frequency( 'author' ),
1673
  );
1674
  }
1675
 
1676
- if ( ! empty( $options["{$this->prefix}taxonomies"] ) ) {
1677
- foreach ( $options["{$this->prefix}taxonomies"] as $sm ) {
1678
  $term_count = wp_count_terms( $sm, array( 'hide_empty' => true ) );
1679
  if ( ! is_wp_error( $term_count ) && ( $term_count > 0 ) ) {
1680
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1681
  if ( $term_count > $this->max_posts ) {
1682
  $count = 1;
1683
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
1684
  $files[] = array(
1685
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ),
1686
  'priority' => $this->get_default_priority( 'taxonomies' ),
1687
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1688
  );
1689
  }
1690
  } else {
1691
  $files[] = array(
1692
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ),
1693
  'priority' => $this->get_default_priority( 'taxonomies' ),
1694
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1695
  );
1696
  }
1697
  } else {
1698
  $files[] = array(
1699
- 'loc' => aioseop_home_url ( '/' . $prefix . '_' . $sm . $suffix ),
1700
  'priority' => $this->get_default_priority( 'taxonomies' ),
1701
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1702
  );
@@ -1730,16 +1750,16 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1730
  function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1731
  if ( empty( $filename ) ) {
1732
  if ( 'root' === $sitemap_type ) {
1733
- $filename = $this->options["{$this->prefix}filename"];
1734
  } else {
1735
- $filename = $this->options["{$this->prefix}filename"] . '_' . $sitemap_type;
1736
  }
1737
  }
1738
  if ( empty( $comment ) ) {
1739
  $comment = "file '%s' statically";
1740
  }
1741
  $sitemap_data = $this->get_sitemap_data( $sitemap_type, $page );
1742
- if ( ( 'root' === $sitemap_type ) && ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1743
  return $this->build_sitemap_index( $sitemap_data, sprintf( $comment, $filename ) );
1744
  } else {
1745
  return $this->build_sitemap( $sitemap_data, sprintf( $comment, $filename ) );
@@ -1757,9 +1777,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1757
  function do_write_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1758
  if ( empty( $filename ) ) {
1759
  if ( 'root' === $sitemap_type ) {
1760
- $filename = $this->options["{$this->prefix}filename"];
1761
  } else {
1762
- $filename = $this->options["{$this->prefix}filename"] . '_' . $sitemap_type;
1763
  }
1764
  }
1765
  if ( empty( $comment ) ) {
@@ -1785,28 +1805,30 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1785
  $this->do_write_sitemap( 'author' );
1786
  }
1787
 
1788
- if ( ( ! isset( $options["{$this->prefix}posttypes"] ) ) || ( ! is_array( $options["{$this->prefix}posttypes"] ) ) ) {
1789
- $options["{$this->prefix}posttypes"] = array();
1790
  }
1791
- if ( ( ! isset( $options["{$this->prefix}taxonomies"] ) ) || ( ! is_array( $options["{$this->prefix}taxonomies"] ) ) ) {
1792
- $options["{$this->prefix}taxonomies"] = array();
1793
  }
1794
- $options["{$this->prefix}posttypes"] = array_diff( $options["{$this->prefix}posttypes"], array( 'all' ) );
1795
- $options["{$this->prefix}taxonomies"] = array_diff( $options["{$this->prefix}taxonomies"], array( 'all' ) );
1796
 
1797
- if ( ! empty( $options["{$this->prefix}posttypes"] ) ) {
1798
- $post_counts = $this->get_all_post_counts( array(
1799
- 'post_type' => $options["{$this->prefix}posttypes"],
1800
- 'post_status' => 'publish',
1801
- ) );
1802
- foreach ( $options["{$this->prefix}posttypes"] as $posttype ) {
 
 
1803
  if ( 0 === $post_counts[ $posttype ] ) {
1804
  continue;
1805
  }
1806
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) && ( $post_counts[ $posttype ] > $this->max_posts ) ) {
1807
  $count = 1;
1808
  for ( $post_count = 0; $post_count < $post_counts[ $posttype ]; $post_count += $this->max_posts ) {
1809
- $this->do_write_sitemap( $posttype, $count - 1, $options["{$this->prefix}filename"] . "_{$posttype}_{$count}" );
1810
  $count ++;
1811
  }
1812
  } else {
@@ -1815,15 +1837,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1815
  }
1816
  }
1817
 
1818
- if ( ! empty( $options["{$this->prefix}taxonomies"] ) ) {
1819
- foreach ( $options["{$this->prefix}taxonomies"] as $taxonomy ) {
1820
  $term_count = wp_count_terms( $taxonomy, array( 'hide_empty' => true ) );
1821
  if ( ! is_wp_error( $term_count ) && ( $term_count > 0 ) ) {
1822
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
1823
  if ( $term_count > $this->max_posts ) {
1824
  $count = 1;
1825
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
1826
- $this->do_write_sitemap( $taxonomy, $tc, $options["{$this->prefix}filename"] . "_{$taxonomy}_{$count}" );
1827
  $count ++;
1828
  }
1829
  } else {
@@ -1835,7 +1857,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1835
  }
1836
  }
1837
  }
1838
- $this->log_stats( 'indexed', $options["{$this->prefix}gzipped"], false );
1839
  }
1840
 
1841
  function remove_posts_page( $postspageid ) {
@@ -1873,13 +1895,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1873
  function get_simple_sitemap() {
1874
  $child = $this->get_child_sitemap_urls();
1875
  $options = $this->options;
1876
- if ( is_array( $options["{$this->prefix}posttypes"] ) ) {
1877
- $options["{$this->prefix}posttypes"] = array_diff( $options["{$this->prefix}posttypes"], array( 'all' ) );
1878
  }
1879
- if ( is_array( $options["{$this->prefix}taxonomies"] ) ) {
1880
- $options["{$this->prefix}taxonomies"] = array_diff( $options["{$this->prefix}taxonomies"], array( 'all' ) );
1881
  }
1882
- $prio = $this->get_all_post_priority_data( $options["{$this->prefix}posttypes"] );
1883
 
1884
  $posts = $postspageid = (int) get_option( 'page_for_posts' ); // It's 0 if posts are on homepage, otherwise it's the id of the posts page.
1885
 
@@ -1933,7 +1955,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1933
  if ( is_array( $home ) ) {
1934
  array_unshift( $prio, $home );
1935
  }
1936
- $terms = get_terms( $options["{$this->prefix}taxonomies"], $this->get_tax_args() );
1937
  $prio2 = $this->get_term_priority_data( $terms );
1938
  $prio3 = $this->get_addl_pages_only();
1939
  $prio = array_merge( $child, $prio, $prio2, $prio3 );
@@ -2011,11 +2033,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2011
  $xsl_url = $this->get_sitemap_xsl();
2012
 
2013
  $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $xsl_url . '"?>' . "\r\n"
2014
- . '<urlset ';
2015
- $namespaces = apply_filters( $this->prefix . 'xml_namespace', array(
2016
- 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9',
2017
- 'xmlns:image' => 'http://www.google.com/schemas/sitemap-image/1.1',
2018
- ) );
 
 
2019
  if ( ! empty( $namespaces ) ) {
2020
  $ns = array();
2021
  foreach ( $namespaces as $k => $v ) {
@@ -2459,7 +2483,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2459
  if ( $days < $max_days ) {
2460
  $int_days_max = $max_days - $prev_days;
2461
  $int_days = $days - $prev_days;
2462
- $prio = $interval + ( ( int ) ( 3 * ( ( $max_days - $int_days ) / $int_days_max ) ) / 10.0 );
2463
  $changefreq = $change;
2464
  break;
2465
  }
@@ -2494,10 +2518,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2494
  }
2495
  }
2496
  if ( ! empty( $archives ) ) {
2497
- return $this->get_prio_from_posts( $archives, $this->get_default_priority( 'archive', true ), $this->get_default_frequency( 'archive', true ), array(
2498
- $this,
2499
- 'get_archive_link_from_post',
2500
- ) );
 
 
2501
  }
2502
 
2503
  return $archives;
@@ -2543,10 +2569,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2543
  }
2544
  }
2545
 
2546
- return $this->get_prio_from_posts( $authors, $this->get_default_priority( 'author', true ), $this->get_default_frequency( 'author', true ), array(
2547
- $this,
2548
- 'get_author_link_from_post',
2549
- ) );
 
 
2550
  }
2551
 
2552
  /**
@@ -2850,7 +2878,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2850
  }
2851
 
2852
  // make the url absolute, if its relative.
2853
- $image = aiosp_common::absolutize_url( $image );
2854
 
2855
  $extn = pathinfo( $url, PATHINFO_EXTENSION );
2856
  $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
@@ -2920,7 +2948,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2920
  if ( $this->option_isset( 'excl_categories' ) ) {
2921
  $args['exclude'] = $this->options[ $this->prefix . 'excl_categories' ];
2922
  }
2923
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
2924
  $args['number'] = $this->max_posts;
2925
  $args['offset'] = $page * $this->max_posts;
2926
 
@@ -2988,7 +3016,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2988
  */
2989
  function get_all_post_priority_data( $include = 'any', $status = 'publish', $page = 0 ) {
2990
  $posts = $page_query = array();
2991
- if ( ! empty( $this->options["{$this->prefix}indexes"] ) ) {
2992
  $page_query = array( 'offset' => $page * $this->max_posts );
2993
  }
2994
  if ( ( 'publish' === $status ) && ( 'attachment' === $include ) ) {
@@ -3294,7 +3322,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
3294
  if ( ! empty( $q->posts ) ) {
3295
  $args['exclude'] = array_merge( $args['exclude'], $q->posts );
3296
  }
3297
- $this->excludes = array_merge( $args['exclude'] , $exclude_slugs ); // Add excluded slugs and IDs to class var.
3298
 
3299
  // TODO: consider using WP_Query instead of get_posts to improve efficiency.
3300
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
66
  'gzipped' => __( 'Create a compressed sitemap file in .xml.gz format.', 'all-in-one-seo-pack' ),
67
  'robots' => __( 'Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all-in-one-seo-pack' ),
68
  'rewrite' => __( 'Dynamically creates the XML sitemap instead of using a static file.', 'all-in-one-seo-pack' ),
69
+ 'addl_url' => __( 'URL to the page. This field accepts relative URLs or absolute URLs with the protocol specified.', 'all-in-one-seo-pack' ),
70
  'addl_prio' => __( 'The priority of the page.', 'all-in-one-seo-pack' ),
71
  'addl_freq' => __( 'The frequency of the page.', 'all-in-one-seo-pack' ),
72
  'addl_mod' => __( 'Last modified date of the page.', 'all-in-one-seo-pack' ),
207
 
208
  $arr[ $k . '_' . $opt ] = array(
209
  'name' => $this->ucwords( $val ),
210
+ 'help_text' => sprintf( __( 'Manually set the %1$s of your %2$s.', 'all-in-one-seo-pack' ), $v, $val ),
211
  'type' => 'select',
212
  'initial_options' => $iopts,
213
  'default' => 'no',
306
 
307
  $this->add_help_text_links();
308
 
309
+ add_action(
310
+ 'after_doing_aioseop_updates', array(
311
+ $this,
312
+ 'do_sitemaps',
313
+ )
314
+ ); // Update static sitemap when AIOSEOP is upgrade to new version.
315
  add_action( 'init', array( $this, 'load_sitemap_options' ) );
316
  add_action( $this->prefix . 'settings_update', array( $this, 'do_sitemaps' ) );
317
  add_filter( $this->prefix . 'display_settings', array( $this, 'update_post_data' ) );
341
 
342
  $options = $this->options;
343
 
344
+ if ( isset( $options[ "{$this->prefix}indexes" ] ) && 'on ' !== $options[ "{$this->prefix}indexes" ] &&
345
+ 1001 < $options[ "{$this->prefix}max_posts" ] ) {
346
 
347
  $post_counts = $num_terms = 0;
348
 
349
+ $post_counts = $this->get_total_post_count(
350
+ array(
351
+ 'post_type' => $options[ "{$this->prefix}posttypes" ],
352
+ 'post_status' => 'publish',
353
+ )
354
+ );
355
 
356
+ $term_counts = $this->get_all_term_counts( array( 'taxonomy' => $options[ "{$this->prefix}taxonomies" ] ) );
357
+ if ( isset( $term_counts ) && is_array( $term_counts ) ) {
358
  $num_terms = array_sum( $term_counts );
359
  }
360
 
366
 
367
  $aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
368
 
369
+ printf(
370
+ '
371
  <div id="message" class="notice-warning notice is-dismissible aioseop-notice sitemap_max_urls_notice visibility-notice">
372
  <p>
373
  <strong>%1$s</strong><br />
375
  </p>
376
  </div>',
377
  __( 'Notice: To avoid problems with your XML Sitemap, we strongly recommend you enable Sitemap Indexes and set the Maximum Posts per Sitemap Page to 1000.', 'all-in-one-seo-pack' ),
378
+ sprintf( __( '%1$s Click here%2$s to make these recommended changes.', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/modules/aioseop_sitemap.php" ) ) ), '</a>' )
379
+ );
380
  }
381
  }
382
 
395
  }
396
 
397
  $posttypes = array();
398
+ if ( ! empty( $this->options[ "{$this->prefix}posttypes" ] ) ) {
399
+ $posttypes = $this->options[ "{$this->prefix}posttypes" ];
400
  }
401
 
402
  if ( ! in_array( $post->post_type, $posttypes, true ) ) {
464
  function load_sitemap_options() {
465
  // Load initial options / set defaults.
466
  $this->update_options();
467
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
468
+ if ( $this->options[ "{$this->prefix}max_posts" ] && ( $this->options[ "{$this->prefix}max_posts" ] > 0 ) && ( $this->options[ "{$this->prefix}max_posts" ] < 50000 ) ) {
469
+ $this->max_posts = $this->options[ "{$this->prefix}max_posts" ];
470
  }
471
  }
472
 
473
  if ( is_multisite() ) {
474
+ $this->options[ "{$this->prefix}rewrite" ] = 'On';
475
  }
476
 
477
+ if ( $this->options[ "{$this->prefix}rewrite" ] ) {
478
  $this->setup_rewrites();
479
  }
480
 
550
  $tax_name = __( ' Taxonomy', 'all-in-one-seo-pack' );
551
  foreach ( $post_type_titles as $k => $v ) {
552
  $key = 'prio_post_' . $k;
553
+ $this->default_options = aioseop_array_insert_after(
554
+ $this->default_options, 'prio_post', array(
555
+ $key => array(
556
+ 'name' => $v . $post_name,
557
+ 'help_text' => $prio_help . $v . $post_name,
558
+ 'type' => 'select',
559
+ 'initial_options' => $this->prio,
560
+ 'default' => 'no',
561
+ 'condshow' => array( "{$this->prefix}prio_post" => 'sel' ),
562
+ ),
563
+ )
564
+ );
565
  $this->layout['priorities']['options'][] = $key;
566
  $key = 'freq_post_' . $k;
567
+ $this->default_options = aioseop_array_insert_after(
568
+ $this->default_options, 'freq_post', array(
569
+ $key => array(
570
+ 'name' => $v . $post_name,
571
+ 'help_text' => $freq_help . $v . $post_name,
572
+ 'type' => 'select',
573
+ 'initial_options' => $this->freq,
574
+ 'default' => 'no',
575
+ 'condshow' => array( "{$this->prefix}freq_post" => 'sel' ),
576
+ ),
577
+ )
578
+ );
579
  $this->layout['frequencies']['options'][] = $key;
580
  }
581
  foreach ( $taxonomy_titles as $k => $v ) {
582
  $key = 'prio_taxonomies_' . $k;
583
+ $this->default_options = aioseop_array_insert_after(
584
+ $this->default_options, 'prio_taxonomies', array(
585
+ $key => array(
586
+ 'name' => $v . $tax_name,
587
+ 'help_text' => $prio_help . $v . $tax_name,
588
+ 'type' => 'select',
589
+ 'initial_options' => $this->prio,
590
+ 'default' => 'no',
591
+ 'condshow' => array( "{$this->prefix}prio_taxonomies" => 'sel' ),
592
+ ),
593
+ )
594
+ );
595
  $this->layout['priorities']['options'][] = $key;
596
  $key = 'freq_taxonomies_' . $k;
597
+ $this->default_options = aioseop_array_insert_after(
598
+ $this->default_options, 'freq_taxonomies', array(
599
+ $key => array(
600
+ 'name' => $v . $tax_name,
601
+ 'help_text' => $freq_help . $v . $tax_name,
602
+ 'type' => 'select',
603
+ 'initial_options' => $this->freq,
604
+ 'default' => 'no',
605
+ 'condshow' => array( "{$this->prefix}freq_taxonomies" => 'sel' ),
606
+ ),
607
+ )
608
+ );
609
  $this->layout['frequencies']['options'][] = $key;
610
  }
611
  $this->update_options();
698
 
699
  $options[ $this->prefix . 'link' ] = sprintf( __( 'Click here to %s.', 'all-in-one-seo-pack' ), '<a href="' . esc_url( $url ) . '" target="_blank">' . __( 'view your sitemap', 'all-in-one-seo-pack' ) . '</a>' );
700
  $options[ $this->prefix . 'link' ] .= __( ' Your sitemap has been created with content and images.', 'all-in-one-seo-pack' );
701
+ if ( '0' !== get_option( 'blog_public' ) ) {
702
  $options[ $this->prefix . 'link' ] .= ' ' . __( 'Changes are automatically submitted to search engines.', 'all-in-one-seo-pack' );
703
  }
704
 
734
  if ( ! isset( $this->default_options['posttypes']['initial_options'] ) ) {
735
  $this->add_post_types();
736
  }
737
+ if ( is_array( $options[ "{$this->prefix}posttypes" ] ) && in_array( 'all', $options[ "{$this->prefix}posttypes" ] ) && is_array( $this->default_options['posttypes']['initial_options'] ) ) {
738
+ $options[ "{$this->prefix}posttypes" ] = array_keys( $this->default_options['posttypes']['initial_options'] );
739
  }
740
+ if ( is_array( $options[ "{$this->prefix}taxonomies" ] ) && in_array( 'all', $options[ "{$this->prefix}taxonomies" ] ) && is_array( $this->default_options['taxonomies']['initial_options'] ) ) {
741
+ $options[ "{$this->prefix}taxonomies" ] = array_keys( $this->default_options['taxonomies']['initial_options'] );
742
  }
743
  $opt = $this->prefix . 'filename';
744
  if ( isset( $options[ $opt ] ) && ! empty( $options[ $opt ] ) ) {
809
  if ( $this->is_aioseop_active_on_blog( $blog_id ) ) {
810
  $options = get_blog_option( $blog_id, $this->parent_option );
811
  if ( ! empty( $options ) && ! empty( $options['modules'] ) && ! empty( $options['modules']['aiosp_feature_manager_options'] )
812
+ && ! empty( $options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] )
813
+ && ! empty( $options['modules'][ $option_name ] )
814
  ) {
815
  global $wpdb;
816
  $sitemap_options = $options['modules'][ $option_name ];
817
  $siteurl = '';
818
  if ( defined( 'SUNRISE' ) && SUNRISE && is_object( $wpdb ) && isset( $wpdb->dmtable ) && ! empty( $wpdb->dmtable ) ) {
819
+ // @codingStandardsIgnoreStart
820
  $domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '$blog_id' AND active = 1 LIMIT 1" );
821
+ // @codingStandardsIgnoreEnd
822
  if ( $domain ) {
823
  if ( false == isset( $_SERVER['HTTPS'] ) ) {
824
  $_SERVER['HTTPS'] = 'Off';
830
  if ( ! $siteurl ) {
831
  $siteurl = get_home_url( $blog_id );
832
  }
833
+ $url = $siteurl . '/' . $sitemap_options[ "{$this->prefix}filename" ] . '.xml';
834
+ if ( $sitemap_options[ "{$this->prefix}gzipped" ] ) {
835
  $url .= '.gz';
836
  }
837
  $siteurls[] = $url;
904
  $scan1 = $scan2 = '';
905
  $files = array();
906
 
907
+ if ( ! empty( $this->options[ "{$this->prefix}filename" ] ) ) {
908
+ $scan1 = get_home_path() . $this->options[ "{$this->prefix}filename" ] . '*.xml';
909
+ if ( ! empty( $this->options[ "{$this->prefix}gzipped" ] ) ) {
910
+ $scan2 .= get_home_path() . $this->options[ "{$this->prefix}filename" ] . '*.xml.gz';
911
  }
912
 
913
  if ( empty( $scan1 ) && empty( $scan2 ) ) {
940
  */
941
  function do_sitemap_scan() {
942
  $msg = '';
943
+ if ( ! empty( $this->options[ "{$this->prefix}rewrite" ] ) && ( get_option( 'permalink_structure' ) === '' ) ) {
944
  $msg = '<p>' . __( 'Warning: dynamic sitemap generation must have permalinks enabled.', 'all-in-one-seo-pack' ) . '</p>';
945
  }
946
  if ( ! empty( $_POST['aioseop_sitemap_rename_files'] ) || ! empty( $_POST['aioseop_sitemap_delete_files'] ) ) {
947
  $nonce = $_POST['nonce-aioseop'];
948
  if ( ! wp_verify_nonce( $nonce, 'aioseop-nonce' ) ) {
949
+ die( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all-in-one-seo-pack' ) );
950
  }
951
  if ( ! empty( $_POST['aioseop_sitemap_conflict'] ) ) {
952
  $files = $this->scan_match_files();
972
  } else {
973
  $ren = $this->rename_file( $ren_file, $ren_to );
974
  if ( $ren ) {
975
+ $msg .= '<p>' . sprintf( __( 'Renamed %1$s to %2$s.', 'all-in-one-seo-pack' ), $ren_file, $ren_to ) . '</p>';
976
  }
977
  }
978
  } else {
1052
  }
1053
  if ( ! empty( $file ) ) {
1054
  $matches = array();
1055
+ if ( preg_match(
1056
+ '/<!-- ' . sprintf( $this->comment_string, '(.*)', '(.*)', '(.*)' ) . ' -->/',
1057
+ $file, $matches
1058
+ ) ) {
1059
+ if ( ! empty( $this->options[ "{$this->prefix}rewrite" ] ) ) {
1060
+ $msg .= '<p>' . sprintf(
1061
+ __( "Warning: a static sitemap '%1\$s' generated by All in One SEO Pack %2\$s on %3\$s already exists that may conflict with dynamic sitemap generation.", 'all-in-one-seo-pack' ),
1062
+ $f, $matches[2], $matches[3]
1063
+ ) . "</p>\n";
1064
  $problem_files[] = $f;
1065
  }
1066
  } else {
1143
  function get_rewrite_rules() {
1144
  $sitemap_rules_normal = $sitemap_rules_gzipped = array();
1145
  $sitemap_rules_normal = array(
1146
+ $this->options[ "{$this->prefix}filename" ] . '.xml' => "index.php?{$this->prefix}path=root",
1147
+ $this->options[ "{$this->prefix}filename" ] . '_(.+)_(\d+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]&' . $this->prefix . 'page=$matches[2]',
1148
+ $this->options[ "{$this->prefix}filename" ] . '_(.+).xml' => 'index.php?' . $this->prefix . 'path=$matches[1]',
1149
  );
1150
+ if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1151
  $sitemap_rules_gzipped = array(
1152
+ $this->options[ "{$this->prefix}filename" ] . '.xml.gz' => "index.php?{$this->prefix}gzipped=1&{$this->prefix}path=root.gz",
1153
+ $this->options[ "{$this->prefix}filename" ] . '_(.+)_(\d+).xml.gz' => 'index.php?' . $this->prefix . 'path=$matches[1].gz&' . $this->prefix . 'page=$matches[2]',
1154
+ $this->options[ "{$this->prefix}filename" ] . '_(.+).xml.gz' => 'index.php?' . $this->prefix . 'path=$matches[1].gz',
1155
  );
1156
  }
1157
  $sitemap_rules = $sitemap_rules_gzipped + $sitemap_rules_normal;
1200
  */
1201
  function query_var_hook( $vars ) {
1202
  $vars[] = "{$this->prefix}path";
1203
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1204
  $vars[] = "{$this->prefix}page";
1205
  }
1206
 
1246
  */
1247
  function sitemap_output_hook( $query ) {
1248
  $page = 0;
1249
+ if ( $this->options[ "{$this->prefix}rewrite" ] && ! empty( $query->query_vars[ "{$this->prefix}path" ] ) ) {
1250
 
1251
  // Make dynamic sitemap.
1252
+ if ( ! empty( $query->query_vars[ "{$this->prefix}page" ] ) ) {
1253
+ $page = $query->query_vars[ "{$this->prefix}page" ] - 1;
 
1254
  }
1255
  $this->start_memory_usage = memory_get_peak_usage();
1256
+ $sitemap_type = $query->query_vars[ "{$this->prefix}path" ];
1257
  $gzipped = false;
1258
  if ( $this->substr( $sitemap_type, - 3 ) === '.gz' ) {
1259
  $gzipped = true;
1260
  $sitemap_type = $this->substr( $sitemap_type, 0, - 3 );
1261
  }
1262
  $blog_charset = get_option( 'blog_charset' );
1263
+ if ( $this->options[ "{$this->prefix}gzipped" ] && $gzipped ) {
1264
  header( "Content-Type: application/x-gzip; charset=$blog_charset", true );
1265
  } else {
1266
  $gzipped = false;
1282
  $this->log_stats( $sitemap_type, $gzipped );
1283
  exit();
1284
 
 
1285
  }
1286
  }
1287
 
1308
  */
1309
  function get_sitemap_data( $sitemap_type, $page = 0 ) {
1310
  $sitemap_data = array();
1311
+ if ( $this->options[ "{$this->prefix}indexes" ] ) {
1312
+ $posttypes = $this->options[ "{$this->prefix}posttypes" ];
1313
  if ( empty( $posttypes ) ) {
1314
  $posttypes = array();
1315
  }
1316
+ $taxonomies = $this->options[ "{$this->prefix}taxonomies" ];
1317
  if ( empty( $taxonomies ) ) {
1318
  $taxonomies = array();
1319
  }
1366
  function get_sitemap_url() {
1367
 
1368
  $gz = '';
1369
+ if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1370
  $gz .= '.gz';
1371
  }
1372
+ $url = aioseop_home_url( '/' . $this->options[ "{$this->prefix}filename" ] . ".xml$gz" );
1373
 
1374
  return $url;
1375
  }
1402
  $response = wp_remote_get( $notify_url[ $k ] . urlencode( $url ) );
1403
  if ( is_array( $response ) && ! empty( $response['response'] ) && ! empty( $response['response']['code'] ) ) {
1404
  if ( 200 != $response['response']['code'] ) {
1405
+ $this->debug_message( sprintf( __( 'Failed to notify %1$s about changes to your sitemap at %2$s, error code %3$s.', 'all-in-one-seo-pack' ), $k, $url, $response['response']['code'] ) );
1406
  }
1407
  } else {
1408
+ $this->debug_message( sprintf( __( 'Failed to notify %1$s about changes to your sitemap at %2$s, unable to access via wp_remote_get().', 'all-in-one-seo-pack' ), $k, $url ) );
1409
  }
1410
  }
1411
  }
1432
  $this->options = $aioseop_options['modules'][ "{$this->prefix}options" ];
1433
  }
1434
 
1435
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1436
+ if ( $this->options[ "{$this->prefix}max_posts" ] && ( $this->options[ "{$this->prefix}max_posts" ] > 0 ) && ( $this->options[ "{$this->prefix}max_posts" ] < 50000 ) ) {
1437
+ $this->max_posts = $this->options[ "{$this->prefix}max_posts" ];
1438
  } else {
1439
  $this->max_posts = 50000;
1440
  }
1441
  } else {
1442
  $this->max_posts = 50000;
1443
  }
1444
+ if ( ! $this->options[ "{$this->prefix}rewrite" ] ) {
1445
+ if ( $this->options[ "{$this->prefix}indexes" ] ) {
1446
  $this->do_indexed_sitemaps();
1447
  } else {
1448
  $this->log_start();
1449
+ $comment = sprintf( "file '%s' statically", $this->options[ "{$this->prefix}filename" ] );
1450
  $sitemap = $this->do_simple_sitemap( $comment );
1451
+ $this->write_sitemaps( $this->options[ "{$this->prefix}filename" ], $sitemap );
1452
+ $this->log_stats( 'root', $this->options[ "{$this->prefix}gzipped" ], false );
1453
  }
1454
  } else {
1455
  delete_transient( "{$this->prefix}rules_flushed" );
1485
  */
1486
  function write_sitemaps( $filename, $contents ) {
1487
  $this->write_sitemap( $filename . '.xml', $contents );
1488
+ if ( $this->options[ "{$this->prefix}gzipped" ] ) {
1489
  $this->write_sitemap( $filename . '.xml.gz', $contents, true );
1490
  }
1491
  }
1622
  function get_sitemap_index_filenames() {
1623
  $files = array();
1624
  $options = $this->options;
1625
+ $prefix = $options[ "{$this->prefix}filename" ];
1626
  $suffix = '.xml';
1627
+ if ( $options[ "{$this->prefix}gzipped" ] ) {
1628
  $suffix .= '.gz';
1629
  }
1630
+ if ( empty( $options[ "{$this->prefix}posttypes" ] ) ) {
1631
+ $options[ "{$this->prefix}posttypes" ] = array();
1632
  }
1633
+ if ( empty( $options[ "{$this->prefix}taxonomies" ] ) ) {
1634
+ $options[ "{$this->prefix}taxonomies" ] = array();
1635
  }
1636
+ $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
1637
+ $options[ "{$this->prefix}taxonomies" ] = array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) );
1638
 
1639
  $files[] = array( 'loc' => aioseop_home_url( '/' . $prefix . '_addl' . $suffix ) );
1640
 
1641
+ if ( ! empty( $options[ "{$this->prefix}posttypes" ] ) ) {
1642
  $prio = $this->get_default_priority( 'post' );
1643
  $freq = $this->get_default_frequency( 'post' );
1644
+ $post_counts = $this->get_all_post_counts(
1645
+ array(
1646
+ 'post_type' => $options[ "{$this->prefix}posttypes" ],
1647
+ 'post_status' => 'publish',
1648
+ )
1649
+ );
1650
 
1651
+ foreach ( $options[ "{$this->prefix}posttypes" ] as $sm ) {
1652
  if ( 0 == $post_counts[ $sm ] ) {
1653
  continue;
1654
  }
1655
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1656
  if ( $post_counts[ $sm ] > $this->max_posts ) {
1657
  $count = 1;
1658
  for ( $post_count = 0; $post_count < $post_counts[ $sm ]; $post_count += $this->max_posts ) {
1659
  $files[] = array(
1660
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ),
1661
  'priority' => $prio,
1662
  'changefreq' => $freq,
1663
  );
1664
  }
1665
  } else {
1666
  $files[] = array(
1667
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
1668
  'priority' => $prio,
1669
  'changefreq' => $freq,
1670
  );
1671
  }
1672
  } else {
1673
  $files[] = array(
1674
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
1675
  'priority' => $prio,
1676
  'changefreq' => $freq,
1677
  );
1680
  }
1681
  if ( $this->option_isset( 'archive' ) ) {
1682
  $files[] = array(
1683
+ 'loc' => aioseop_home_url( '/' . $prefix . '_archive' . $suffix ),
1684
  'priority' => $this->get_default_priority( 'archive' ),
1685
  'changefreq' => $this->get_default_frequency( 'archive' ),
1686
  );
1687
  }
1688
  if ( $this->option_isset( 'author' ) ) {
1689
  $files[] = array(
1690
+ 'loc' => aioseop_home_url( '/' . $prefix . '_author' . $suffix ),
1691
  'priority' => $this->get_default_priority( 'author' ),
1692
  'changefreq' => $this->get_default_frequency( 'author' ),
1693
  );
1694
  }
1695
 
1696
+ if ( ! empty( $options[ "{$this->prefix}taxonomies" ] ) ) {
1697
+ foreach ( $options[ "{$this->prefix}taxonomies" ] as $sm ) {
1698
  $term_count = wp_count_terms( $sm, array( 'hide_empty' => true ) );
1699
  if ( ! is_wp_error( $term_count ) && ( $term_count > 0 ) ) {
1700
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1701
  if ( $term_count > $this->max_posts ) {
1702
  $count = 1;
1703
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
1704
  $files[] = array(
1705
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . '_' . ( $count ++ ) . $suffix ),
1706
  'priority' => $this->get_default_priority( 'taxonomies' ),
1707
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1708
  );
1709
  }
1710
  } else {
1711
  $files[] = array(
1712
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
1713
  'priority' => $this->get_default_priority( 'taxonomies' ),
1714
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1715
  );
1716
  }
1717
  } else {
1718
  $files[] = array(
1719
+ 'loc' => aioseop_home_url( '/' . $prefix . '_' . $sm . $suffix ),
1720
  'priority' => $this->get_default_priority( 'taxonomies' ),
1721
  'changefreq' => $this->get_default_frequency( 'taxonomies' ),
1722
  );
1750
  function do_build_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1751
  if ( empty( $filename ) ) {
1752
  if ( 'root' === $sitemap_type ) {
1753
+ $filename = $this->options[ "{$this->prefix}filename" ];
1754
  } else {
1755
+ $filename = $this->options[ "{$this->prefix}filename" ] . '_' . $sitemap_type;
1756
  }
1757
  }
1758
  if ( empty( $comment ) ) {
1759
  $comment = "file '%s' statically";
1760
  }
1761
  $sitemap_data = $this->get_sitemap_data( $sitemap_type, $page );
1762
+ if ( ( 'root' === $sitemap_type ) && ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1763
  return $this->build_sitemap_index( $sitemap_data, sprintf( $comment, $filename ) );
1764
  } else {
1765
  return $this->build_sitemap( $sitemap_data, sprintf( $comment, $filename ) );
1777
  function do_write_sitemap( $sitemap_type, $page = 0, $filename = '', $comment = '' ) {
1778
  if ( empty( $filename ) ) {
1779
  if ( 'root' === $sitemap_type ) {
1780
+ $filename = $this->options[ "{$this->prefix}filename" ];
1781
  } else {
1782
+ $filename = $this->options[ "{$this->prefix}filename" ] . '_' . $sitemap_type;
1783
  }
1784
  }
1785
  if ( empty( $comment ) ) {
1805
  $this->do_write_sitemap( 'author' );
1806
  }
1807
 
1808
+ if ( ( ! isset( $options[ "{$this->prefix}posttypes" ] ) ) || ( ! is_array( $options[ "{$this->prefix}posttypes" ] ) ) ) {
1809
+ $options[ "{$this->prefix}posttypes" ] = array();
1810
  }
1811
+ if ( ( ! isset( $options[ "{$this->prefix}taxonomies" ] ) ) || ( ! is_array( $options[ "{$this->prefix}taxonomies" ] ) ) ) {
1812
+ $options[ "{$this->prefix}taxonomies" ] = array();
1813
  }
1814
+ $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
1815
+ $options[ "{$this->prefix}taxonomies" ] = array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) );
1816
 
1817
+ if ( ! empty( $options[ "{$this->prefix}posttypes" ] ) ) {
1818
+ $post_counts = $this->get_all_post_counts(
1819
+ array(
1820
+ 'post_type' => $options[ "{$this->prefix}posttypes" ],
1821
+ 'post_status' => 'publish',
1822
+ )
1823
+ );
1824
+ foreach ( $options[ "{$this->prefix}posttypes" ] as $posttype ) {
1825
  if ( 0 === $post_counts[ $posttype ] ) {
1826
  continue;
1827
  }
1828
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) && ( $post_counts[ $posttype ] > $this->max_posts ) ) {
1829
  $count = 1;
1830
  for ( $post_count = 0; $post_count < $post_counts[ $posttype ]; $post_count += $this->max_posts ) {
1831
+ $this->do_write_sitemap( $posttype, $count - 1, $options[ "{$this->prefix}filename" ] . "_{$posttype}_{$count}" );
1832
  $count ++;
1833
  }
1834
  } else {
1837
  }
1838
  }
1839
 
1840
+ if ( ! empty( $options[ "{$this->prefix}taxonomies" ] ) ) {
1841
+ foreach ( $options[ "{$this->prefix}taxonomies" ] as $taxonomy ) {
1842
  $term_count = wp_count_terms( $taxonomy, array( 'hide_empty' => true ) );
1843
  if ( ! is_wp_error( $term_count ) && ( $term_count > 0 ) ) {
1844
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
1845
  if ( $term_count > $this->max_posts ) {
1846
  $count = 1;
1847
  for ( $tc = 0; $tc < $term_count; $tc += $this->max_posts ) {
1848
+ $this->do_write_sitemap( $taxonomy, $tc, $options[ "{$this->prefix}filename" ] . "_{$taxonomy}_{$count}" );
1849
  $count ++;
1850
  }
1851
  } else {
1857
  }
1858
  }
1859
  }
1860
+ $this->log_stats( 'indexed', $options[ "{$this->prefix}gzipped" ], false );
1861
  }
1862
 
1863
  function remove_posts_page( $postspageid ) {
1895
  function get_simple_sitemap() {
1896
  $child = $this->get_child_sitemap_urls();
1897
  $options = $this->options;
1898
+ if ( is_array( $options[ "{$this->prefix}posttypes" ] ) ) {
1899
+ $options[ "{$this->prefix}posttypes" ] = array_diff( $options[ "{$this->prefix}posttypes" ], array( 'all' ) );
1900
  }
1901
+ if ( is_array( $options[ "{$this->prefix}taxonomies" ] ) ) {
1902
+ $options[ "{$this->prefix}taxonomies" ] = array_diff( $options[ "{$this->prefix}taxonomies" ], array( 'all' ) );
1903
  }
1904
+ $prio = $this->get_all_post_priority_data( $options[ "{$this->prefix}posttypes" ] );
1905
 
1906
  $posts = $postspageid = (int) get_option( 'page_for_posts' ); // It's 0 if posts are on homepage, otherwise it's the id of the posts page.
1907
 
1955
  if ( is_array( $home ) ) {
1956
  array_unshift( $prio, $home );
1957
  }
1958
+ $terms = get_terms( $options[ "{$this->prefix}taxonomies" ], $this->get_tax_args() );
1959
  $prio2 = $this->get_term_priority_data( $terms );
1960
  $prio3 = $this->get_addl_pages_only();
1961
  $prio = array_merge( $child, $prio, $prio2, $prio3 );
2033
  $xsl_url = $this->get_sitemap_xsl();
2034
 
2035
  $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $xsl_url . '"?>' . "\r\n"
2036
+ . '<urlset ';
2037
+ $namespaces = apply_filters(
2038
+ $this->prefix . 'xml_namespace', array(
2039
+ 'xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9',
2040
+ 'xmlns:image' => 'http://www.google.com/schemas/sitemap-image/1.1',
2041
+ )
2042
+ );
2043
  if ( ! empty( $namespaces ) ) {
2044
  $ns = array();
2045
  foreach ( $namespaces as $k => $v ) {
2483
  if ( $days < $max_days ) {
2484
  $int_days_max = $max_days - $prev_days;
2485
  $int_days = $days - $prev_days;
2486
+ $prio = $interval + ( (int) ( 3 * ( ( $max_days - $int_days ) / $int_days_max ) ) / 10.0 );
2487
  $changefreq = $change;
2488
  break;
2489
  }
2518
  }
2519
  }
2520
  if ( ! empty( $archives ) ) {
2521
+ return $this->get_prio_from_posts(
2522
+ $archives, $this->get_default_priority( 'archive', true ), $this->get_default_frequency( 'archive', true ), array(
2523
+ $this,
2524
+ 'get_archive_link_from_post',
2525
+ )
2526
+ );
2527
  }
2528
 
2529
  return $archives;
2569
  }
2570
  }
2571
 
2572
+ return $this->get_prio_from_posts(
2573
+ $authors, $this->get_default_priority( 'author', true ), $this->get_default_frequency( 'author', true ), array(
2574
+ $this,
2575
+ 'get_author_link_from_post',
2576
+ )
2577
+ );
2578
  }
2579
 
2580
  /**
2878
  }
2879
 
2880
  // make the url absolute, if its relative.
2881
+ $image = aiosp_common::absolutize_url( $image );
2882
 
2883
  $extn = pathinfo( $url, PATHINFO_EXTENSION );
2884
  $allowed = apply_filters( 'aioseop_allowed_image_extensions', self::$image_extensions );
2948
  if ( $this->option_isset( 'excl_categories' ) ) {
2949
  $args['exclude'] = $this->options[ $this->prefix . 'excl_categories' ];
2950
  }
2951
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
2952
  $args['number'] = $this->max_posts;
2953
  $args['offset'] = $page * $this->max_posts;
2954
 
3016
  */
3017
  function get_all_post_priority_data( $include = 'any', $status = 'publish', $page = 0 ) {
3018
  $posts = $page_query = array();
3019
+ if ( ! empty( $this->options[ "{$this->prefix}indexes" ] ) ) {
3020
  $page_query = array( 'offset' => $page * $this->max_posts );
3021
  }
3022
  if ( ( 'publish' === $status ) && ( 'attachment' === $include ) ) {
3322
  if ( ! empty( $q->posts ) ) {
3323
  $args['exclude'] = array_merge( $args['exclude'], $q->posts );
3324
  }
3325
+ $this->excludes = array_merge( $args['exclude'], $exclude_slugs ); // Add excluded slugs and IDs to class var.
3326
 
3327
  // TODO: consider using WP_Query instead of get_posts to improve efficiency.
3328
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
modules/aioseop_video_sitemap.php CHANGED
@@ -3,7 +3,7 @@
3
  * Loads video sitemap class.
4
  *
5
  * @package All-in-One-SEO-Pack
6
- *
7
  */
8
 
9
  if ( AIOSEOPPRO ) {
3
  * Loads video sitemap class.
4
  *
5
  * @package All-in-One-SEO-Pack
6
+ *
7
  */
8
 
9
  if ( AIOSEOPPRO ) {
public/google-analytics.php CHANGED
@@ -10,7 +10,9 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
10
  *
11
  * @since 2.3.14 #921 Autotrack added and class refactored.
12
  */
 
13
  class aioseop_google_analytics extends All_in_One_SEO_Pack_Module {
 
14
 
15
  /**
16
  * @todo Rather than extending the module base class,
@@ -64,10 +66,11 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
64
  ) ) {
65
  $autotrack = apply_filters(
66
  'aiosp_google_autotrack',
67
- AIOSEOP_PLUGIN_URL . 'public/js/autotrack.js'
68
  );
69
- ?><script async src="<?php echo $autotrack ?>"></script>
70
- <?php // Requested indent #921
 
71
  }
72
  $analytics = ob_get_clean();
73
  }
@@ -121,7 +124,7 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
121
  $extra_options = array();
122
  if ( ! empty( $domain_list ) ) {
123
  $extra_options[] = 'ga(\'require\', \'linker\');';
124
- $extra_options[] = 'ga(\'linker:autoLink\', ['. $domain_list . '] );';
125
  }
126
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
127
  if ( ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
@@ -154,11 +157,14 @@ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
154
  $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
155
  ob_start()
156
  ?>
157
- <script type="text/javascript" <?php echo preg_replace( '/\s+/', ' ', apply_filters( 'aioseop_ga_attributes', '' ) ) ?>>
158
  window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
159
- ga('create', '<?php echo $analytics_id ?>'<?php echo $domain ?><?php echo $js_options ?>);
160
  // Plugins
161
- <?php foreach ( $extra_options as $option ) : ?><?php echo $option ?><?php endforeach ?>
 
 
 
162
 
163
  ga('send', 'pageview');
164
  </script>
10
  *
11
  * @since 2.3.14 #921 Autotrack added and class refactored.
12
  */
13
+ // @codingStandardsIgnoreStart
14
  class aioseop_google_analytics extends All_in_One_SEO_Pack_Module {
15
+ // @codingStandardsIgnoreEnd
16
 
17
  /**
18
  * @todo Rather than extending the module base class,
66
  ) ) {
67
  $autotrack = apply_filters(
68
  'aiosp_google_autotrack',
69
+ AIOSEOP_PLUGIN_URL . 'public/js/vendor/autotrack.js'
70
  );
71
+ ?><script async src="<?php echo $autotrack; ?>"></script>
72
+ <?php
73
+ // Requested indent #921
74
  }
75
  $analytics = ob_get_clean();
76
  }
124
  $extra_options = array();
125
  if ( ! empty( $domain_list ) ) {
126
  $extra_options[] = 'ga(\'require\', \'linker\');';
127
+ $extra_options[] = 'ga(\'linker:autoLink\', [' . $domain_list . '] );';
128
  }
129
  if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
130
  if ( ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
157
  $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
158
  ob_start()
159
  ?>
160
+ <script type="text/javascript" <?php echo preg_replace( '/\s+/', ' ', apply_filters( 'aioseop_ga_attributes', '' ) ); ?>>
161
  window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
162
+ ga('create', '<?php echo $analytics_id; ?>'<?php echo $domain; ?><?php echo $js_options; ?>);
163
  // Plugins
164
+ <?php
165
+ foreach ( $extra_options as $option ) :
166
+ ?>
167
+ <?php echo $option; ?><?php endforeach ?>
168
 
169
  ga('send', 'pageview');
170
  </script>
public/opengraph.php CHANGED
@@ -26,9 +26,8 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
26
  */
27
  public static function prepare_twitter_username( $twitter_profile ) {
28
 
29
- //$twitter_profile = 'https://twitter.com/sdfsdfsf'; //testing purposes only, remove for release
30
-
31
- //test for valid twitter username, with or without @
32
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
33
 
34
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
@@ -36,7 +35,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
36
  return $twitter_profile;
37
  }
38
 
39
- //check if it has twitter.com
40
  if ( strpos( $twitter_profile, 'twitter.com' ) ) {
41
 
42
  $twitter_profile = esc_url( $twitter_profile );
@@ -51,7 +50,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
51
  }
52
  }
53
 
54
- //if all else fails, just send it back
55
  return $twitter_profile;
56
 
57
  }
@@ -71,8 +70,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
71
  return $twitter_profile;
72
  }
73
 
74
- //extract the twitter username from the url
75
-
76
  $parsed_twitter_profile = wp_parse_url( $twitter_profile );
77
 
78
  $path = $parsed_twitter_profile['path'];
@@ -93,7 +91,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
93
  * TODO- this claims to just validate, but it's actually validating and adding the AT symbol as needed rather than returning true/false
94
  */
95
  public static function validate_twitter_profile( $twitter_profile ) {
96
- //test for valid twitter username, with or without @
97
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
98
 
99
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
@@ -110,7 +108,7 @@ if ( ! class_exists( 'AIOSEOP_Opengraph_Public' ) ) {
110
  * @since 2.3.5
111
  */
112
  public static function prepend_at_symbol( $twitter_profile ) {
113
- //checks for @ in the beginning, if it's not there adds it
114
  if ( '@' !== $twitter_profile[0] ) {
115
  $twitter_profile = '@' . $twitter_profile;
116
  }
26
  */
27
  public static function prepare_twitter_username( $twitter_profile ) {
28
 
29
+ // $twitter_profile = 'https://twitter.com/sdfsdfsf'; //testing purposes only, remove for release
30
+ // test for valid twitter username, with or without @
 
31
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
32
 
33
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
35
  return $twitter_profile;
36
  }
37
 
38
+ // check if it has twitter.com
39
  if ( strpos( $twitter_profile, 'twitter.com' ) ) {
40
 
41
  $twitter_profile = esc_url( $twitter_profile );
50
  }
51
  }
52
 
53
+ // if all else fails, just send it back
54
  return $twitter_profile;
55
 
56
  }
70
  return $twitter_profile;
71
  }
72
 
73
+ // extract the twitter username from the url
 
74
  $parsed_twitter_profile = wp_parse_url( $twitter_profile );
75
 
76
  $path = $parsed_twitter_profile['path'];
91
  * TODO- this claims to just validate, but it's actually validating and adding the AT symbol as needed rather than returning true/false
92
  */
93
  public static function validate_twitter_profile( $twitter_profile ) {
94
+ // test for valid twitter username, with or without @
95
  if ( preg_match( '/^(\@)?[A-Za-z0-9_]+$/', $twitter_profile ) ) {
96
 
97
  $twitter_profile = self::prepend_at_symbol( $twitter_profile );
108
  * @since 2.3.5
109
  */
110
  public static function prepend_at_symbol( $twitter_profile ) {
111
+ // checks for @ in the beginning, if it's not there adds it
112
  if ( '@' !== $twitter_profile[0] ) {
113
  $twitter_profile = '@' . $twitter_profile;
114
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
- Stable tag: 2.4.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.4
6
  Tested up to: 4.9
7
+ Stable tag: 2.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10