All in One SEO Pack - Version 2.3.9.2

Version Description

Download this release

Release Info

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

Code changes from version 2.3.8 to 2.3.9.2

Files changed (52) hide show
  1. admin/aioseop_module_class.php +57 -52
  2. admin/display/credits-content.php +107 -0
  3. admin/display/welcome-content.php +39 -0
  4. admin/display/welcome.php +98 -0
  5. admin/meta_import.php +4 -3
  6. aioseop_class.php +23 -284
  7. all_in_one_seo_pack.php +494 -475
  8. css/aiosp_admin.css +19 -0
  9. css/modules/aioseop_module.css +30 -16
  10. css/welcome.css +129 -0
  11. i18n/all-in-one-seo-pack-af.mo +0 -0
  12. i18n/all-in-one-seo-pack-ar.mo +0 -0
  13. i18n/all-in-one-seo-pack-ary.mo +0 -0
  14. i18n/all-in-one-seo-pack-bg_BG.mo +0 -0
  15. i18n/all-in-one-seo-pack-ca.mo +0 -0
  16. i18n/all-in-one-seo-pack-de_DE.mo +0 -0
  17. i18n/all-in-one-seo-pack-en_AU.mo +0 -0
  18. i18n/all-in-one-seo-pack-en_CA.mo +0 -0
  19. i18n/all-in-one-seo-pack-en_GB.mo +0 -0
  20. i18n/all-in-one-seo-pack-en_NZ.mo +0 -0
  21. i18n/all-in-one-seo-pack-fa_IR.mo +0 -0
  22. i18n/all-in-one-seo-pack-fi.mo +0 -0
  23. i18n/all-in-one-seo-pack-fr_BE.mo +0 -0
  24. i18n/all-in-one-seo-pack-hi_IN.mo +0 -0
  25. i18n/all-in-one-seo-pack-hr.mo +0 -0
  26. i18n/all-in-one-seo-pack-hu_HU.mo +0 -0
  27. i18n/all-in-one-seo-pack-it_IT.mo +0 -0
  28. i18n/all-in-one-seo-pack-ko_KR.mo +0 -0
  29. i18n/all-in-one-seo-pack-nb_NO.mo +0 -0
  30. i18n/all-in-one-seo-pack-nl_NL.mo +0 -0
  31. i18n/all-in-one-seo-pack-nn_NO.mo +0 -0
  32. i18n/all-in-one-seo-pack-pl_PL.mo +0 -0
  33. i18n/all-in-one-seo-pack-pt_BR.mo +0 -0
  34. i18n/all-in-one-seo-pack-pt_PT.mo +0 -0
  35. i18n/all-in-one-seo-pack-ro_RO.mo +0 -0
  36. i18n/all-in-one-seo-pack-ru_RU.mo +0 -0
  37. i18n/all-in-one-seo-pack-sl_SL.mo +0 -0
  38. i18n/all-in-one-seo-pack-sq.mo +0 -0
  39. i18n/all-in-one-seo-pack-tr_TR.mo +0 -0
  40. i18n/all-in-one-seo-pack-vi.mo +0 -0
  41. i18n/all-in-one-seo-pack-zh_CN.mo +0 -0
  42. inc/aioseop_functions.php +1 -52
  43. inc/aioseop_updates_class.php +63 -9
  44. inc/aiosp_common.php +5 -1
  45. inc/extlib/JSON.php +0 -804
  46. js/welcome.js +32 -0
  47. modules/aioseop_feature_manager.php +1 -1
  48. modules/aioseop_opengraph.php +143 -101
  49. modules/aioseop_performance.php +0 -6
  50. public/front.php +21 -1
  51. public/google-analytics.php +266 -0
  52. readme.txt +4 -3
admin/aioseop_module_class.php CHANGED
@@ -263,7 +263,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
263
  * @return array
264
  *
265
  * @author Adrien aka Gaarf & contributors
266
- * @see http://gaarf.info/2009/08/13/xml-string-to-php-array/
267
  */
268
  function html_string_to_array( $xmlstr ) {
269
  if ( ! class_exists( 'DOMDocument' ) ) {
@@ -420,11 +420,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
420
  $botlist = array(
421
  'Yahoo! Slurp' => 'crawl.yahoo.net',
422
  'googlebot' => '.googlebot.com',
423
- 'msnbot' => 'search.msn.com'
424
  );
425
  $botlist = apply_filters( $this->prefix . 'botlist', $botlist );
426
  if ( ! empty( $botlist ) ) {
427
- if( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
428
  return false;
429
  }
430
  $ua = $_SERVER['HTTP_USER_AGENT'];
@@ -533,9 +533,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
533
  'Python-urllib',
534
  'QueryN Metasearch',
535
  'RepoMonkey',
536
- 'RMA',
537
  'SemrushBot',
538
- 'SeznamBot',
539
  'SISTRIX',
540
  'sitecheck.Internetseer.com',
541
  'SiteSnagger',
@@ -589,7 +587,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
589
  'SemrushBot',
590
  'serf',
591
  'Unknown',
592
- 'uptime files'
593
  );
594
 
595
  return $botlist;
@@ -599,7 +597,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
599
  $botlist = $this->default_bad_bots();
600
  $botlist = apply_filters( $this->prefix . 'badbotlist', $botlist );
601
  if ( ! empty( $botlist ) ) {
602
- if( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
603
  return false;
604
  }
605
  $ua = $_SERVER['HTTP_USER_AGENT'];
@@ -638,7 +636,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
638
  'best-seo-solution.com',
639
  'buy-cheap-online.info',
640
  'site3.free-share-buttons.com',
641
- 'webmaster-traffic.com'
642
  );
643
 
644
  return $referlist;
@@ -795,7 +793,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
795
  $general_settings = true;
796
  }
797
  if ( $ex == 2 && isset( $_REQUEST['aiosp_importer_exporter_export_post_types'] ) ) {
798
- $post_types = $_REQUEST['aiosp_importer_exporter_export_post_types'];
799
  }
800
  }
801
  }
@@ -803,7 +801,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
803
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
804
  $buf .= $this->post_data_export( '_aioseop', array(
805
  'posts_per_page' => - 1,
806
- 'post_type' => $post_types
807
  ) );
808
  }
809
 
@@ -820,12 +818,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
820
  $value = "'" . str_replace( array( "'", "\n", "\r" ), array(
821
  "\'",
822
  '\n',
823
- '\r'
824
  ), trim( serialize( $value ) ) ) . "'";
825
  } else {
826
  $value = str_replace( array( "\n", "\r" ), array(
827
  '\n',
828
- '\r'
829
  ), trim( var_export( $value, true ) ) );
830
  }
831
  $buf .= "$key = $value\n";
@@ -1151,14 +1149,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1151
 
1152
  $meta_key = '';
1153
  if ( is_array( $options ) && isset( $options['meta_key'] ) ) {
1154
- $meta_key = $options['meta_key'];
1155
  }
1156
 
1157
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1158
  $meta_key = explode( ',', $meta_key );
1159
  $image = $this->get_the_image_by_meta_key( array(
1160
  'post_id' => $post->ID,
1161
- 'meta_key' => $meta_key
1162
  ) );
1163
  if ( ! empty( $image ) ) {
1164
  $img[] = array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
@@ -1176,7 +1174,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1176
  $wp_query->is_single = true;
1177
  }
1178
  if ( get_option( 'show_on_front' ) == 'page' && $post->ID == get_option( 'page_for_posts' ) ) {
1179
- $wp_query->is_home = true;
1180
  }
1181
  $args['options']['type'] = 'html';
1182
  $args['options']['nowrap'] = false;
@@ -1189,7 +1187,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1189
  'post_type' => 'attachment',
1190
  'post_mime_type' => 'image',
1191
  'order' => 'ASC',
1192
- 'orderby' => 'menu_order ID'
1193
  ) );
1194
  if ( ! empty( $attachments ) ) {
1195
  foreach ( $attachments as $id => $attachment ) {
@@ -1241,14 +1239,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1241
 
1242
  $meta_key = '';
1243
  if ( is_array( $options ) && isset( $options['meta_key'] ) ) {
1244
- $meta_key = $options['meta_key'];
1245
  }
1246
 
1247
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1248
  $meta_key = explode( ',', $meta_key );
1249
  $image = $this->get_the_image_by_meta_key( array(
1250
  'post_id' => $post->ID,
1251
- 'meta_key' => $meta_key
1252
  ) );
1253
  }
1254
  if ( empty( $image ) ) {
@@ -1308,7 +1306,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1308
  return false;
1309
  }
1310
 
1311
- $size = apply_filters( 'post_thumbnail_size', 'large' );
 
1312
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1313
 
1314
  return $image[0];
@@ -1328,11 +1327,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1328
  'post_type' => 'attachment',
1329
  'post_mime_type' => 'image',
1330
  'order' => 'ASC',
1331
- 'orderby' => 'menu_order ID'
1332
  ) );
1333
 
1334
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1335
- $image = wp_get_attachment_image_src( $post->ID, 'large' );
 
 
1336
  }
1337
 
1338
  /* If no attachments or image is found, return false. */
@@ -1346,7 +1347,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1346
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1347
  foreach ( $attachments as $id => $attachment ) {
1348
  if ( ++ $i == 1 ) {
1349
- $image = wp_get_attachment_image_src( $id, 'large' );
 
 
1350
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1351
  break;
1352
  }
@@ -1443,8 +1446,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1443
  if ( empty( $screen ) ) {
1444
  $bail = true;
1445
  }
1446
- if ( ( $screen->base != 'post' ) && ( $screen->base != 'term' ) && ( $screen->base != 'edit-tags' ) && ( $screen->base != 'toplevel_page_shopp-products' ) ) {
1447
- $bail = true;
 
 
1448
  }
1449
  $prefix = $this->get_prefix();
1450
  $bail = apply_filters( $prefix . 'bail_on_enqueue', $bail, $screen );
@@ -1461,13 +1466,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1461
  $this->form = apply_filters( $prefix . 'set_form_on_enqueue', $this->form, $screen );
1462
  foreach ( $this->locations as $k => $v ) {
1463
  if ( $v['type'] === 'metabox' && isset( $v['display'] ) && ! empty( $v['display'] ) ) {
1464
- $enqueue_scripts = false;
1465
- $enqueue_scripts = ( ( ( $screen->base == 'toplevel_page_shopp-products' ) && in_array( 'shopp_product', $v['display'] ) ) ) || in_array( $screen->post_type, $v['display'] );
1466
- $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
1467
- if ( $enqueue_scripts ) {
1468
- add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
1469
- add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ), 20 );
1470
- add_action( 'admin_print_scripts', array( $this, 'enqueue_styles' ), 20 );
1471
  }
1472
  }
1473
  }
@@ -1591,7 +1596,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1591
  'title' => $name,
1592
  'id' => $hookname,
1593
  'href' => $url,
1594
- 'order' => $this->menu_order()
1595
  ) );
1596
  } else {
1597
  foreach ( $this->locations as $k => $v ) {
@@ -1602,7 +1607,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1602
  'title' => $name,
1603
  'id' => $hookname,
1604
  'href' => $url,
1605
- 'order' => $this->menu_order()
1606
  ) );
1607
  } else {
1608
  if ( ! empty( $v['menu_name'] ) ) {
@@ -1615,7 +1620,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1615
  'title' => $name,
1616
  'id' => $this->get_prefix( $k ) . $k,
1617
  'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ),
1618
- 'order' => $this->menu_order()
1619
  ) );
1620
  }
1621
  }
@@ -1655,7 +1660,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1655
  if ( $this->locations === null ) {
1656
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1657
  $this,
1658
- 'display_settings_page'
1659
  ) );
1660
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
1661
 
@@ -1671,7 +1676,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1671
  }
1672
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1673
  $this,
1674
- 'display_settings_page'
1675
  ) );
1676
  } else {
1677
  if ( ! empty( $v['menu_name'] ) ) {
@@ -1681,7 +1686,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1681
  }
1682
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $this->get_prefix( $k ) . $k, array(
1683
  $this,
1684
- "display_settings_page_$k"
1685
  ) );
1686
  }
1687
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
@@ -1715,7 +1720,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1715
  'post_type' => $posttype,
1716
  'context' => $v['context'],
1717
  'priority' => $v['priority'],
1718
- 'callback_args' => $v
1719
  );
1720
  } else {
1721
  $title = $v['name'];
@@ -1727,7 +1732,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1727
  }
1728
  add_meta_box( $v['prefix'] . $k, $title, array(
1729
  $this,
1730
- 'display_metabox'
1731
  ), $posttype, $v['context'], $v['priority'], $v );
1732
  }
1733
  }
@@ -1780,7 +1785,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1780
  'group' => "\t<b>%s</b><br>\n%s\n",
1781
  'item' => "\t<label class='aioseop_option_setting_label'><input type='$type' %s name='%s' value='%s' %s> %s</label>\n",
1782
  'item_args' => array( 'sel', 'name', 'v', 'attr', 'subopt' ),
1783
- 'selected' => 'checked '
1784
  );
1785
  } else {
1786
  $strings = array(
@@ -1788,7 +1793,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1788
  'group' => "\t<optgroup label='%s'>\n%s\t</optgroup>\n",
1789
  'item' => "\t<option %s value='%s'>%s</option>\n",
1790
  'item_args' => array( 'sel', 'v', 'subopt' ),
1791
- 'selected' => 'selected '
1792
  );
1793
  }
1794
  $setsel = $strings['selected'];
@@ -1851,7 +1856,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1851
  'textarea',
1852
  'text',
1853
  'submit',
1854
- 'hidden'
1855
  ) ) && is_string( $value )
1856
  ) {
1857
  $value = esc_attr( $value );
@@ -1974,7 +1979,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1974
  $defaults = $meta_args['args']['default_options'];
1975
  }
1976
  if ( ! empty( $meta_args['callback_args'] ) && ! empty( $meta_args['callback_args']['help_link'] ) ) {
1977
- $help_link = $meta_args['callback_args']['help_link'];
1978
  }
1979
  if ( ! empty( $help_link ) ) {
1980
  echo "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $help_link . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
@@ -2046,7 +2051,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2046
  'options' => $opts,
2047
  'attr' => $attr,
2048
  'value' => $opt,
2049
- 'prefix' => $prefix
2050
  );
2051
  if ( ! empty( $opts['nowrap'] ) ) {
2052
  echo $this->get_option_html( $args );
@@ -2212,19 +2217,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2212
  'location' => array( 'type' => 'hidden', 'value' => $location ),
2213
  'nonce-aioseop' => array(
2214
  'type' => 'hidden',
2215
- 'value' => wp_create_nonce( 'aioseop-nonce' )
2216
  ),
2217
  'page_options' => array( 'type' => 'hidden', 'value' => 'aiosp_home_description' ),
2218
  'Submit' => array(
2219
  'type' => 'submit',
2220
  'class' => 'button-primary',
2221
- 'value' => __( 'Update Options', 'all-in-one-seo-pack' ) . ' &raquo;'
2222
  ),
2223
  'Submit_Default' => array(
2224
  'type' => 'submit',
2225
  'class' => 'button-secondary',
2226
- 'value' => __( sprintf( 'Reset %s Settings to Defaults', $name ), 'all-in-one-seo-pack' ) . ' &raquo;'
2227
- )
2228
  );
2229
  $submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
2230
  foreach ( $submit_options as $k => $s ) {
@@ -2239,7 +2244,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2239
  'name' => $k,
2240
  'options' => $s,
2241
  'attr' => $class,
2242
- 'value' => $s['value']
2243
  ) );
2244
  }
2245
  ?>
@@ -2258,7 +2263,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2258
  }
2259
  add_meta_box( $this->get_prefix( $location ) . $l . '_metabox', $title, array(
2260
  $this,
2261
- 'display_options'
2262
  ),
2263
  "{$this->prefix}settings", 'advanced', 'default', $lopts );
2264
  }
@@ -2266,7 +2271,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2266
  } else {
2267
  add_meta_box( $this->get_prefix( $location ) . 'metabox', $name, array(
2268
  $this,
2269
- 'display_options'
2270
  ), "{$this->prefix}settings", 'advanced' );
2271
  }
2272
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
@@ -2285,7 +2290,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2285
  'name' => $k,
2286
  'options' => $s,
2287
  'attr' => $class,
2288
- 'value' => $s['value']
2289
  ) );
2290
  }
2291
  ?> </p>
263
  * @return array
264
  *
265
  * @author Adrien aka Gaarf & contributors
266
+ * @see http://gaarf.info/2009/08/13/xml-string-to-php-array/
267
  */
268
  function html_string_to_array( $xmlstr ) {
269
  if ( ! class_exists( 'DOMDocument' ) ) {
420
  $botlist = array(
421
  'Yahoo! Slurp' => 'crawl.yahoo.net',
422
  'googlebot' => '.googlebot.com',
423
+ 'msnbot' => 'search.msn.com',
424
  );
425
  $botlist = apply_filters( $this->prefix . 'botlist', $botlist );
426
  if ( ! empty( $botlist ) ) {
427
+ if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
428
  return false;
429
  }
430
  $ua = $_SERVER['HTTP_USER_AGENT'];
533
  'Python-urllib',
534
  'QueryN Metasearch',
535
  'RepoMonkey',
 
536
  'SemrushBot',
 
537
  'SISTRIX',
538
  'sitecheck.Internetseer.com',
539
  'SiteSnagger',
587
  'SemrushBot',
588
  'serf',
589
  'Unknown',
590
+ 'uptime files',
591
  );
592
 
593
  return $botlist;
597
  $botlist = $this->default_bad_bots();
598
  $botlist = apply_filters( $this->prefix . 'badbotlist', $botlist );
599
  if ( ! empty( $botlist ) ) {
600
+ if ( ! isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
601
  return false;
602
  }
603
  $ua = $_SERVER['HTTP_USER_AGENT'];
636
  'best-seo-solution.com',
637
  'buy-cheap-online.info',
638
  'site3.free-share-buttons.com',
639
+ 'webmaster-traffic.com',
640
  );
641
 
642
  return $referlist;
793
  $general_settings = true;
794
  }
795
  if ( $ex == 2 && isset( $_REQUEST['aiosp_importer_exporter_export_post_types'] ) ) {
796
+ $post_types = $_REQUEST['aiosp_importer_exporter_export_post_types'];
797
  }
798
  }
799
  }
801
  if ( ( $post_types != null ) && ( $this === $aiosp ) ) {
802
  $buf .= $this->post_data_export( '_aioseop', array(
803
  'posts_per_page' => - 1,
804
+ 'post_type' => $post_types,
805
  ) );
806
  }
807
 
818
  $value = "'" . str_replace( array( "'", "\n", "\r" ), array(
819
  "\'",
820
  '\n',
821
+ '\r',
822
  ), trim( serialize( $value ) ) ) . "'";
823
  } else {
824
  $value = str_replace( array( "\n", "\r" ), array(
825
  '\n',
826
+ '\r',
827
  ), trim( var_export( $value, true ) ) );
828
  }
829
  $buf .= "$key = $value\n";
1149
 
1150
  $meta_key = '';
1151
  if ( is_array( $options ) && isset( $options['meta_key'] ) ) {
1152
+ $meta_key = $options['meta_key'];
1153
  }
1154
 
1155
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1156
  $meta_key = explode( ',', $meta_key );
1157
  $image = $this->get_the_image_by_meta_key( array(
1158
  'post_id' => $post->ID,
1159
+ 'meta_key' => $meta_key,
1160
  ) );
1161
  if ( ! empty( $image ) ) {
1162
  $img[] = array( 'type' => 'meta_key', 'id' => $meta_key, 'link' => $image );
1174
  $wp_query->is_single = true;
1175
  }
1176
  if ( get_option( 'show_on_front' ) == 'page' && $post->ID == get_option( 'page_for_posts' ) ) {
1177
+ $wp_query->is_home = true;
1178
  }
1179
  $args['options']['type'] = 'html';
1180
  $args['options']['nowrap'] = false;
1187
  'post_type' => 'attachment',
1188
  'post_mime_type' => 'image',
1189
  'order' => 'ASC',
1190
+ 'orderby' => 'menu_order ID',
1191
  ) );
1192
  if ( ! empty( $attachments ) ) {
1193
  foreach ( $attachments as $id => $attachment ) {
1239
 
1240
  $meta_key = '';
1241
  if ( is_array( $options ) && isset( $options['meta_key'] ) ) {
1242
+ $meta_key = $options['meta_key'];
1243
  }
1244
 
1245
  if ( ! empty( $meta_key ) && ! empty( $post ) ) {
1246
  $meta_key = explode( ',', $meta_key );
1247
  $image = $this->get_the_image_by_meta_key( array(
1248
  'post_id' => $post->ID,
1249
+ 'meta_key' => $meta_key,
1250
  ) );
1251
  }
1252
  if ( empty( $image ) ) {
1306
  return false;
1307
  }
1308
 
1309
+ $size = apply_filters( 'post_thumbnail_size', 'large' ); // Check if someone is using built-in WP filter.
1310
+ $size = apply_filters( 'aioseop_thumbnail_size', $size );
1311
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1312
 
1313
  return $image[0];
1327
  'post_type' => 'attachment',
1328
  'post_mime_type' => 'image',
1329
  'order' => 'ASC',
1330
+ 'orderby' => 'menu_order ID',
1331
  ) );
1332
 
1333
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1334
+ $size = 'large';
1335
+ $size = apply_filters( 'aioseop_attachment_size', $size );
1336
+ $image = wp_get_attachment_image_src( $post->ID, $size );
1337
  }
1338
 
1339
  /* If no attachments or image is found, return false. */
1347
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1348
  foreach ( $attachments as $id => $attachment ) {
1349
  if ( ++ $i == 1 ) {
1350
+ $size = 'large';
1351
+ $size = apply_filters( 'aioseop_attachment_size', $size );
1352
+ $image = wp_get_attachment_image_src( $id, $size );
1353
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1354
  break;
1355
  }
1446
  if ( empty( $screen ) ) {
1447
  $bail = true;
1448
  }
1449
+ if( $bail != true ){
1450
+ if ( ( $screen->base != 'post' ) && ( $screen->base != 'term' ) && ( $screen->base != 'edit-tags' ) && ( $screen->base != 'toplevel_page_shopp-products' ) ) {
1451
+ $bail = true;
1452
+ }
1453
  }
1454
  $prefix = $this->get_prefix();
1455
  $bail = apply_filters( $prefix . 'bail_on_enqueue', $bail, $screen );
1466
  $this->form = apply_filters( $prefix . 'set_form_on_enqueue', $this->form, $screen );
1467
  foreach ( $this->locations as $k => $v ) {
1468
  if ( $v['type'] === 'metabox' && isset( $v['display'] ) && ! empty( $v['display'] ) ) {
1469
+ $enqueue_scripts = false;
1470
+ $enqueue_scripts = ( ( ( $screen->base == 'toplevel_page_shopp-products' ) && in_array( 'shopp_product', $v['display'] ) ) ) || in_array( $screen->post_type, $v['display'] );
1471
+ $enqueue_scripts = apply_filters( $prefix . 'enqueue_metabox_scripts', $enqueue_scripts, $screen, $v );
1472
+ if ( $enqueue_scripts ) {
1473
+ add_filter( 'aioseop_localize_script_data', array( $this, 'localize_script_data' ) );
1474
+ add_action( 'admin_print_scripts', array( $this, 'enqueue_scripts' ), 20 );
1475
+ add_action( 'admin_print_scripts', array( $this, 'enqueue_styles' ), 20 );
1476
  }
1477
  }
1478
  }
1596
  'title' => $name,
1597
  'id' => $hookname,
1598
  'href' => $url,
1599
+ 'order' => $this->menu_order(),
1600
  ) );
1601
  } else {
1602
  foreach ( $this->locations as $k => $v ) {
1607
  'title' => $name,
1608
  'id' => $hookname,
1609
  'href' => $url,
1610
+ 'order' => $this->menu_order(),
1611
  ) );
1612
  } else {
1613
  if ( ! empty( $v['menu_name'] ) ) {
1620
  'title' => $name,
1621
  'id' => $this->get_prefix( $k ) . $k,
1622
  'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ),
1623
+ 'order' => $this->menu_order(),
1624
  ) );
1625
  }
1626
  }
1660
  if ( $this->locations === null ) {
1661
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1662
  $this,
1663
+ 'display_settings_page',
1664
  ) );
1665
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
1666
 
1676
  }
1677
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
1678
  $this,
1679
+ 'display_settings_page',
1680
  ) );
1681
  } else {
1682
  if ( ! empty( $v['menu_name'] ) ) {
1686
  }
1687
  $hookname = add_submenu_page( $parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $this->get_prefix( $k ) . $k, array(
1688
  $this,
1689
+ "display_settings_page_$k",
1690
  ) );
1691
  }
1692
  add_action( "load-{$hookname}", array( $this, 'add_page_hooks' ) );
1720
  'post_type' => $posttype,
1721
  'context' => $v['context'],
1722
  'priority' => $v['priority'],
1723
+ 'callback_args' => $v,
1724
  );
1725
  } else {
1726
  $title = $v['name'];
1732
  }
1733
  add_meta_box( $v['prefix'] . $k, $title, array(
1734
  $this,
1735
+ 'display_metabox',
1736
  ), $posttype, $v['context'], $v['priority'], $v );
1737
  }
1738
  }
1785
  'group' => "\t<b>%s</b><br>\n%s\n",
1786
  'item' => "\t<label class='aioseop_option_setting_label'><input type='$type' %s name='%s' value='%s' %s> %s</label>\n",
1787
  'item_args' => array( 'sel', 'name', 'v', 'attr', 'subopt' ),
1788
+ 'selected' => 'checked ',
1789
  );
1790
  } else {
1791
  $strings = array(
1793
  'group' => "\t<optgroup label='%s'>\n%s\t</optgroup>\n",
1794
  'item' => "\t<option %s value='%s'>%s</option>\n",
1795
  'item_args' => array( 'sel', 'v', 'subopt' ),
1796
+ 'selected' => 'selected ',
1797
  );
1798
  }
1799
  $setsel = $strings['selected'];
1856
  'textarea',
1857
  'text',
1858
  'submit',
1859
+ 'hidden',
1860
  ) ) && is_string( $value )
1861
  ) {
1862
  $value = esc_attr( $value );
1979
  $defaults = $meta_args['args']['default_options'];
1980
  }
1981
  if ( ! empty( $meta_args['callback_args'] ) && ! empty( $meta_args['callback_args']['help_link'] ) ) {
1982
+ $help_link = $meta_args['callback_args']['help_link'];
1983
  }
1984
  if ( ! empty( $help_link ) ) {
1985
  echo "<a class='aioseop_help_text_link aioseop_meta_box_help' target='_blank' href='" . $help_link . "'><span>" . __( 'Help', 'all-in-one-seo-pack' ) . '</span></a>';
2051
  'options' => $opts,
2052
  'attr' => $attr,
2053
  'value' => $opt,
2054
+ 'prefix' => $prefix,
2055
  );
2056
  if ( ! empty( $opts['nowrap'] ) ) {
2057
  echo $this->get_option_html( $args );
2217
  'location' => array( 'type' => 'hidden', 'value' => $location ),
2218
  'nonce-aioseop' => array(
2219
  'type' => 'hidden',
2220
+ 'value' => wp_create_nonce( 'aioseop-nonce' ),
2221
  ),
2222
  'page_options' => array( 'type' => 'hidden', 'value' => 'aiosp_home_description' ),
2223
  'Submit' => array(
2224
  'type' => 'submit',
2225
  'class' => 'button-primary',
2226
+ 'value' => __( 'Update Options', 'all-in-one-seo-pack' ) . ' &raquo;',
2227
  ),
2228
  'Submit_Default' => array(
2229
  'type' => 'submit',
2230
  'class' => 'button-secondary',
2231
+ 'value' => __( sprintf( 'Reset %s Settings to Defaults', $name ), 'all-in-one-seo-pack' ) . ' &raquo;',
2232
+ ),
2233
  );
2234
  $submit_options = apply_filters( "{$this->prefix}submit_options", $submit_options, $location );
2235
  foreach ( $submit_options as $k => $s ) {
2244
  'name' => $k,
2245
  'options' => $s,
2246
  'attr' => $class,
2247
+ 'value' => $s['value'],
2248
  ) );
2249
  }
2250
  ?>
2263
  }
2264
  add_meta_box( $this->get_prefix( $location ) . $l . '_metabox', $title, array(
2265
  $this,
2266
+ 'display_options',
2267
  ),
2268
  "{$this->prefix}settings", 'advanced', 'default', $lopts );
2269
  }
2271
  } else {
2272
  add_meta_box( $this->get_prefix( $location ) . 'metabox', $name, array(
2273
  $this,
2274
+ 'display_options',
2275
  ), "{$this->prefix}settings", 'advanced' );
2276
  }
2277
  do_meta_boxes( "{$this->prefix}settings", 'advanced', $location );
2290
  'name' => $k,
2291
  'options' => $s,
2292
  'attr' => $class,
2293
+ 'value' => $s['value'],
2294
  ) );
2295
  }
2296
  ?> </p>
admin/display/credits-content.php ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap credits-wrap">
2
+
3
+ <p class="about-description"><?php _e( 'All in One SEO Pack is created by a worldwide network of friendly folks like these.', 'all-in-one-seo-pack' ); ?></p>
4
+
5
+ <h3 class="wp-people-group"><?php _e( 'Project Leaders', 'all-in-one-seo-pack' ); ?></h3>
6
+ <ul class="wp-people-group " id="wp-people-group-project-leaders">
7
+ <li class="wp-person" id="wp-person-michaeltorbert">
8
+ <a class="web" href="https://profiles.wordpress.org/hallsofmontezuma" target="_blank"><img alt="" class="gravatar" src="https://s.gravatar.com/avatar/f41419cf5cfdbb071a8d591ac9976bf3?s=60">
9
+ Michael Torbert</a>
10
+ <span class="title"><?php _e( 'Project Lead', 'all-in-one-seo-pack' ); ?></span>
11
+ </li>
12
+ <li class="wp-person" id="wp-person-stevemortiboy">
13
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/wpsmort"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/40e33d813c16a63500675d851b0cbf3a?s=60">
14
+ Steve Mortiboy</a>
15
+ <span class="title"><?php _e( 'Project Manager', 'all-in-one-seo-pack' ); ?></span>
16
+ </li>
17
+ </ul>
18
+
19
+ <h3 class="wp-people-group"><?php printf( esc_html__( 'Core Team', 'all-in-one-seo-pack' ) ); ?></h3>
20
+ <ul class="wp-people-group " id="wp-people-group-contributors">
21
+ <li class="wp-person" id="wp-person-arnaudbroes">
22
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/arnaudbroes"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/0ce0d554c2b0bd61d326e15c8dcde756?s=60">
23
+ Arnaud Broes</a>
24
+ <span class="title"><?php _e( 'Development Team', 'buddypress' ); ?></span>
25
+ </li>
26
+ <li class="wp-person" id="wp-person-yuqianliu">
27
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/yuqianl"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/8f971bea2b6c483fd1099e558013a7d0?s=60">
28
+ Yuqian Liu</a>
29
+ <span class="title"><?php _e( 'Development Team', 'buddypress' ); ?></span>
30
+ </li>
31
+ <li class="wp-person" id="wp-person-aaronbrodney">
32
+ <a class="web" target="_blank" href="https://github.com/theycalledmetaz"><img alt="" class="gravatar" src="https://avatars3.githubusercontent.com/u/8225725?v=3&s=60">
33
+ Aaron Brodney</a>
34
+ <span class="title"><?php _e( 'Development Team', 'buddypress' ); ?></span>
35
+ </li>
36
+ </ul>
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 printf( __('Want to see your name and picture here as a community developer? Open a new issue on Github to report a bug or request a feature or find an issue and submit code!')); ?>
41
+ <a href="https://github.com/semperfiwebdesign/all-in-one-seo-pack" target="_blank">Click here to go to Github</a>
42
+ </li>
43
+ <li class="wp-person" id="wp-person-dougalcampbell">
44
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/dougal/"><img alt="" class="gravatar" src="https://www.gravatar.com/avatar/81717a172b6918071fbea1a52483294b?s=60">
45
+ Dougal Campbell</a>
46
+ </li>
47
+ <li class="wp-person" id="wp-person-alejandromostajo">
48
+ <a class="web" target="_blank" href="https://github.com/amostajo"><img alt="" class="gravatar" src="https://avatars1.githubusercontent.com/u/1645908?s=60">
49
+ Alejandro Mostajo</a>
50
+ </li>
51
+ <li class="wp-person" id="joelrd">
52
+ <a class="web" target="_blank" href="https://github.com/joelrd"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/16063717?s=60">
53
+ Joelrd</a>
54
+ </li>
55
+ <li class="wp-person" id="carlalexander">
56
+ <a class="web" target="_blank" href="https://profiles.wordpress.org/carlalexander/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/5a4758faa5ba6c1322bdfb0f6ebcf56c?s=60">
57
+ Carl Alexander</a>
58
+ </li>
59
+ </ul>
60
+
61
+ <h3 class="wp-people-group dashicons-before dashicons-translation"><?php printf( esc_html__( 'Translators Contributors and Translation Editors', 'all-in-one-seo-pack' ), '1.2' ); ?></h3>
62
+ <p class="wp-credits-list">
63
+ <a href="https://profiles.wordpress.org/pierrelannoy/" target="_blank">Pierre Lannoy</a>,
64
+ <a href="https://profiles.wordpress.org/sonjanyc/" target="_blank">Sonja Leix</a>,
65
+ <a href="https://profiles.wordpress.org/dev-ide/" target="_blank">Adil El hallaoui</a>,
66
+ <a href="https://profiles.wordpress.org/simonie/" target="_blank">simonie</a>,
67
+ <a href="https://profiles.wordpress.org/lenasterg/" target="_blank">lenasterg</a>,
68
+ <a href="https://profiles.wordpress.org/arnaudbroes/" target="_blank">Arnaud Broes</a>,
69
+ <a href="https://profiles.wordpress.org/pixolin/" target="_blank">Bego Mario Garde</a>,
70
+ <a href="https://profiles.wordpress.org/wp-yogi/" target="_blank">wp-yogi</a>,
71
+ <a href="https://profiles.wordpress.org/wpsmort/" target="_blank">Steve Mortiboy</a>,
72
+ <a href="https://profiles.wordpress.org/webaware/" target="_blank">webaware</a>,
73
+ <a href="https://profiles.wordpress.org/escribirelmundo/" target="_blank">escribirelmundo</a>,
74
+ <a href="https://profiles.wordpress.org/casiepa/" target="_blank">Pascal Casier</a>,
75
+ <a href="https://profiles.wordpress.org/nurron/" target="_blank">Nurron Shodiqin</a>,
76
+ <a href="https://profiles.wordpress.org/aprmndr/" target="_blank">Alyssa Primandaru</a>,
77
+ <a href="https://profiles.wordpress.org/facestoro/" target="_blank">facestoro</a>,
78
+ <a href="https://profiles.wordpress.org/yuqianl/" target="_blank">Dawa Torbert</a>,
79
+ <a href="https://profiles.wordpress.org/hallsofmontezuma/" target="_blank">Michael Torbert</a>,
80
+ <a href="https://profiles.wordpress.org/istvanzseller/" target="_blank">Istvan Zseller</a>,
81
+ <a href="https://profiles.wordpress.org/paaljoachim" target="_blank">Paal Joachim Romdahl</a>,
82
+ <a href="https://profiles.wordpress.org/almaz/" target="_blank">Almaz Mannanov</a>,
83
+ <a href="https://profiles.wordpress.org/vide13 /" target="_blank">vide13</a>,
84
+ <a href="https://profiles.wordpress.org/yuraz/" target="_blank">Jurica Zuanovic</a>,
85
+ <a href="https://profiles.wordpress.org/arhipaiva/" target="_blank">arhipaiva</a>,
86
+ <a href="https://profiles.wordpress.org/maximanikin/" target="_blank">Maxim Anikin</a>,
87
+ <a href="https://profiles.wordpress.org/petya/" target="_blank">Petya Raykovska</a>,
88
+ <a href="https://profiles.wordpress.org/hathanh0809/" target="_blank">hathanh0809</a>,
89
+ <a href="https://profiles.wordpress.org/cedric3131/" target="_blank">Cédric Valmary</a>,
90
+ <a href="https://profiles.wordpress.org/smitka/" target="_blank">Vladimir Smitka</a>,
91
+ <a href="https://profiles.wordpress.org/brewtal/" target="_blank">Paul P.</a>,
92
+ <a href="https://profiles.wordpress.org/wpaleks/" target="_blank">Aleksander Savkovic</a>,
93
+ <a href="https://profiles.wordpress.org/diogosanches/" target="_blank">Diogo Sanches</a>,
94
+ <a href="https://profiles.wordpress.org/klemenfajs/" target="_blank">Klemen Fajs</a>,
95
+ <a href="https://profiles.wordpress.org/adriancastellanos/" target="_blank">Adrian Castellanos</a>,
96
+ <a href="https://profiles.wordpress.org/exilhamburger/" target="_blank">exilhamburger</a>,
97
+ <a href="https://profiles.wordpress.org/garyj/" target="_blank">Gary Jones</a>,
98
+ <a href="https://profiles.wordpress.org/fernandot/" target="_blank">Fernando Tellado</a>,
99
+ <a href="https://profiles.wordpress.org/hiwhatsup/" target="_blank">Carlos Zuniga</a>,
100
+ <a href="https://profiles.wordpress.org/fxbenard/" target="_blank">François Bernard</a>,
101
+ <a href="https://profiles.wordpress.org/jack0falltrades/" target="_blank">jack0falltrades</a>,
102
+ <a href="https://profiles.wordpress.org/dancaragea/" target="_blank">Dan Caragea</a>,
103
+ <a href="https://profiles.wordpress.org/kyla81975/" target="_blank">kyla81975</a>,
104
+ <a href="https://profiles.wordpress.org/arildknudsen1/" target="_blank">Arild Knudsen</a>.
105
+ </p>
106
+
107
+ </div>
admin/display/welcome-content.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="welcome-panel" class="">
2
+ <div class="welcome-panel-content">
3
+ <div class="welcome-panel-column-container">
4
+ <div class="welcome-panel-column">
5
+ <h3><?php echo esc_html( __( 'Support All in One SEO Pack', 'all-in-one-seo-pack' ) ); ?></h3>
6
+ <p class="message"><?php echo esc_html( __( "There are may ways you can help support All in One SEO Pack.", 'all-in-one-seo-pack' ) ); ?></p>
7
+ <p class="message aioseop-message"><?php echo esc_html( __( "Upgrade to All in One SEO Pack Pro to access priority support and premium features.", 'all-in-one-seo-pack' ) ); ?></p>
8
+ <p class="call-to-action"><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome" target="_blank" class="button button-primary button-orange"><?php echo __('Upgrade','all-in-one-seo-pack'); ?></a></p>
9
+ <p class="message aioseop-message"><?php echo esc_html( __( "Help translate All in One SEO Pack into your language.", 'all-in-one-seo-pack' ) ); ?></p>
10
+ <p class="call-to-action"><a href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack" class="button button-primary" target="_blank"><?php echo __('Translate','all-in-one-seo-pack'); ?></a></p>
11
+ <p class="message aioseop-message"><?php echo esc_html( __( "Become a beta tester and help test new features.", 'all-in-one-seo-pack' ) ); ?></p>
12
+ <p class="call-to-action"><a href="https://semperplugins.com/contact/" class="button button-primary" target="_blank"><?php echo __('Register','all-in-one-seo-pack'); ?></a></p>
13
+ </div>
14
+
15
+ <div class="welcome-panel-column">
16
+ <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
17
+ <ul>
18
+ <li><a href="https://semperplugins.com/documentation/quick-start-guide/" target="_blank"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a></li>
19
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/" target="_blank"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a></li>
20
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/" target="_blank"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a></li>
21
+ <li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/" target="_blank"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a></li>
22
+ <li><a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/" target="_blank"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a></li>
23
+ <li><a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/" target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a></li>
24
+ <li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/" target="_blank"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a></li>
25
+ </ul>
26
+ </div>
27
+
28
+ <div class="welcome-panel-column">
29
+ <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
30
+ <ul>
31
+ <li><a href="https://semperplugins.com/documentation/" target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a></li>
32
+ <li><a href="https://semperplugins.com/videos/" target="_blank"><?php echo __( 'You can get access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a></li>
33
+ <li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome" target="_blank"><?php echo __( 'You can control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a></li>
34
+ </ul>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ <p><a href="/wp-admin/admin.php?page=all-in-one-seo-pack%2Faioseop_class.php">Continue to the General Settings</a> &raquo;</p>
39
+ </div>
admin/display/welcome.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'aioseop_welcome' ) ) {
4
+
5
+ class aioseop_welcome {
6
+ function __construct() {
7
+
8
+ if ( AIOSEOPPRO ) {
9
+ return;
10
+ }
11
+
12
+ add_action( 'admin_menu', array( $this, 'add_menus' ) );
13
+ add_action( 'admin_head', array( $this, 'remove_pages' ) );
14
+ add_action( 'admin_enqueue_scripts', array( $this, 'welcome_screen_assets' ) );
15
+
16
+ }
17
+
18
+ function welcome_screen_assets( $hook ) {
19
+
20
+ if ( 'dashboard_page_aioseop-about' == $hook ) {
21
+
22
+ wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . '/css/welcome.css' );
23
+ wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . '/js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true );
24
+ }
25
+ }
26
+
27
+ function remove_pages() {
28
+ remove_submenu_page( 'index.php', 'aioseop-about' );
29
+ remove_submenu_page( 'index.php', 'aioseop-credits' );
30
+ }
31
+
32
+ function add_menus() {
33
+ add_dashboard_page(
34
+ __( 'Welcome to All in One SEO Pack', 'all-in-one-seo-pack' ),
35
+ __( 'Welcome to All in One SEO Pack', 'all-in-one-seo-pack' ),
36
+ 'manage_options',
37
+ 'aioseop-about',
38
+ array( $this, 'about_screen' )
39
+ );
40
+
41
+ }
42
+
43
+ function init() {
44
+
45
+ if ( AIOSEOPPRO ) {
46
+ return;
47
+ }
48
+
49
+ if ( ! is_admin() ) {
50
+ return;
51
+ }
52
+
53
+ if ( ! current_user_can( 'manage_options' ) ) {
54
+ return;
55
+ }
56
+
57
+ wp_safe_redirect( add_query_arg( array( 'page' => 'aioseop-about' ), admin_url( 'index.php' ) ) );
58
+ exit;
59
+ }
60
+
61
+ function about_screen() {
62
+
63
+ $version = AIOSEOP_VERSION;
64
+
65
+ ?>
66
+
67
+ <div class="wrap about-wrap">
68
+ <h1><?php printf( esc_html__( 'Welcome to All in One SEO Pack %s', 'all-in-one-seo-pack' ), $version ); ?></h1>
69
+ <div
70
+ class="about-text"><?php printf( esc_html__( 'All in One SEO Pack %s contains new features, bug fixes, increased security, and tons of under the hood performance improvements.', 'all-in-one-seo-pack' ), $version ); ?></div>
71
+
72
+ <h2 class="nav-tab-wrapper">
73
+ <a class="nav-tab nav-tab-active" id="aioseop-about"
74
+ href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-about' ), 'index.php' ) ) ); ?>">
75
+ <?php esc_html_e( 'What&#8217;s New', 'all-in-one-seo-pack' ); ?>
76
+ </a>
77
+ <a class="nav-tab" id="aioseop-credits"
78
+ href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-credits' ), 'index.php' ) ) ); ?>">
79
+ <?php esc_html_e( 'Credits', 'all-in-one-seo-pack' ); ?>
80
+ </a>
81
+ </h2>
82
+
83
+
84
+ <div id='sections'>
85
+ <section><?php include_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome-content.php' ); ?></section>
86
+ <section><?php include_once( AIOSEOP_PLUGIN_DIR . 'admin/display/credits-content.php' ); ?></section>
87
+ </div>
88
+
89
+ </div>
90
+
91
+
92
+ <?php
93
+
94
+ }
95
+
96
+ }
97
+
98
+ }
admin/meta_import.php CHANGED
@@ -475,9 +475,10 @@ function aiosp_seometa_import() {
475
  */
476
  $_aiosp_seometa_plugins = array(
477
  // alphabatized
478
- 'Add Meta Tags' => array(
479
- 'META Description' => 'description',
480
- 'META Keywords' => 'keywords',
 
481
  ),
482
  'All in One SEO Pack' => array(
483
  'Custom Doctitle' => '_aioseop_title',
475
  */
476
  $_aiosp_seometa_plugins = array(
477
  // alphabatized
478
+ 'Add Meta Tags' => array(
479
+ 'Custom Doctitle' => '_amt_title',
480
+ 'META Description' => '_amt_description',
481
+ 'META Keywords' => '_amt_keywords',
482
  ),
483
  'All in One SEO Pack' => array(
484
  'Custom Doctitle' => '_aioseop_title',
aioseop_class.php CHANGED
@@ -194,7 +194,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
194
  'google_set_site_name' => __( 'Add markup to tell Google the preferred name for your website.', 'all-in-one-seo-pack' ),
195
  'google_connect' => __( 'Press the connect button to connect with Google Analytics; or if already connected, press the disconnect button to disable and remove any stored analytics credentials.', 'all-in-one-seo-pack' ),
196
  'google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
197
- 'ga_use_universal_analytics' => __( 'Use the new Universal Analytics tracking code for Google Analytics.', 'all-in-one-seo-pack' ),
198
  'ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
199
  'ga_domain' => __( 'Enter your domain name without the http:// to set your cookie domain.', 'all-in-one-seo-pack' ),
200
  'ga_multi_domain' => __( 'Use this option to enable tracking of multiple or additional domains.', 'all-in-one-seo-pack' ),
@@ -228,6 +227,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
228
  'dont_truncate_descriptions' => __( 'Check this to prevent your Description from being truncated regardless of its length.', 'all-in-one-seo-pack' ),
229
  'schema_markup' => __( 'Check this to support Schema.org markup, i.e., itemprop on supported metadata.', 'all-in-one-seo-pack' ),
230
  'unprotect_meta' => __( "Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.", 'all-in-one-seo-pack' ),
 
231
  'ex_pages' => __( 'Enter a comma separated list of pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage here and it will be excluded from All in One SEO Pack.', 'all-in-one-seo-pack' ),
232
  'post_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Posts. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
233
  'page_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
@@ -287,7 +287,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
287
  'google_enable_publisher' => '#display-publisher-meta-on-front-page',
288
  'google_specify_publisher' => '#specify-publisher-url',
289
  'google_analytics_id' => 'http://semperplugins.com/documentation/setting-up-google-analytics/',
290
- 'ga_use_universal_analytics' => '#use-universal-analytics',
291
  'ga_domain' => '#tracking-domain',
292
  'ga_multi_domain' => '#track-multiple-domains-additional-domains',
293
  'ga_addl_domains' => '#track-multiple-domains-additional-domains',
@@ -318,6 +317,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
318
  'hide_paginated_descriptions' => '#remove-descriptions-for-paginated-pages',
319
  'dont_truncate_descriptions' => '#never-shorten-long-descriptions',
320
  'unprotect_meta' => '#unprotect-post-meta-fields',
 
321
  'ex_pages' => '#exclude-pages',
322
  'post_meta_tags' => '#additional-post-headers',
323
  'page_meta_tags' => '#additional-page-headers',
@@ -679,17 +679,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
679
  'type' => 'text',
680
  'placeholder' => 'UA-########-#',
681
  ),
682
- 'ga_use_universal_analytics' => array(
683
- 'name' => __( 'Use Universal Analytics:', 'all-in-one-seo-pack' ),
684
- 'default' => 0,
685
- 'condshow' => array(
686
- 'aiosp_google_analytics_id' => array(
687
- 'lhs' => 'aiosp_google_analytics_id',
688
- 'op' => '!=',
689
- 'rhs' => '',
690
- ),
691
- ),
692
- ),
693
  'ga_advanced_options' => array(
694
  'name' => __( 'Advanced Analytics Options:', 'all-in-one-seo-pack' ),
695
  'default' => 'on',
@@ -812,7 +801,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
812
  'op' => '!=',
813
  'rhs' => '',
814
  ),
815
- 'aiosp_ga_use_universal_analytics' => 'on',
816
  'aiosp_ga_advanced_options' => 'on',
817
  ),
818
  ),
@@ -906,6 +894,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
906
  'name' => __( 'Unprotect Post Meta Fields:', 'all-in-one-seo-pack' ),
907
  'default' => 0,
908
  ),
 
 
 
 
909
  'ex_pages' => array(
910
  'name' => __( 'Exclude Pages:', 'all-in-one-seo-pack' ),
911
  'type' => 'textarea',
@@ -1138,7 +1130,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1138
  'google_specify_publisher',
1139
  // "google_connect",
1140
  'google_analytics_id',
1141
- 'ga_use_universal_analytics',
1142
  'ga_advanced_options',
1143
  'ga_domain',
1144
  'ga_multi_domain',
@@ -1182,6 +1173,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1182
  'hide_paginated_descriptions',
1183
  'dont_truncate_descriptions',
1184
  'unprotect_meta',
 
1185
  'ex_pages',
1186
  'post_meta_tags',
1187
  'page_meta_tags',
@@ -2372,8 +2364,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2372
  $name = single_term_title( '', false );
2373
  }
2374
  // Apparently we're already ucwordsing this elsewhere, and doing it a second time messes it up... why aren't we just doing this at the end?
2375
- // if ( ( $tax == 'category' ) && ( !empty( $aioseop_options['aiosp_cap_cats'] ) ) )
2376
- // $name = $this->ucwords( $name );
 
2377
 
2378
  return $this->internationalize( $name );
2379
  }
@@ -3797,7 +3790,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3797
  $description = apply_filters( 'aioseop_description_full', $this->apply_description_format( $description, $post ) );
3798
  $desc_attr = '';
3799
  if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
3800
- $desc_attr = 'itemprop="description"';
3801
  }
3802
  $desc_attr = apply_filters( 'aioseop_description_attributes', $desc_attr );
3803
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
@@ -4338,247 +4331,7 @@ EOF;
4338
  }
4339
 
4340
  function aiosp_google_analytics() {
4341
- global $aioseop_options;
4342
- $analytics = '';
4343
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_exclude_users'] ) ) {
4344
- if ( is_user_logged_in() ) {
4345
- global $current_user;
4346
- if ( empty( $current_user ) ) {
4347
- wp_get_current_user();
4348
- }
4349
- if ( ! empty( $current_user ) ) {
4350
- $intersect = array_intersect( $aioseop_options['aiosp_ga_exclude_users'], $current_user->roles );
4351
- if ( ! empty( $intersect ) ) {
4352
- return;
4353
- }
4354
- }
4355
- }
4356
- }
4357
- if ( ! empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
4358
- ob_start();
4359
- $analytics = $this->universal_analytics();
4360
- echo $analytics;
4361
- if ( empty( $analytics ) ) {
4362
- ?>
4363
- <script type="text/javascript">
4364
- var _gaq = _gaq || [];
4365
- <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_link_attribution'] ) ) {
4366
- ?> var pluginUrl =
4367
- '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
4368
- _gaq.push(['_require', 'inpage_linkid', pluginUrl]);
4369
- <?php
4370
- }
4371
- ?> _gaq.push(['_setAccount', '<?php
4372
- echo $aioseop_options['aiosp_google_analytics_id'];
4373
- ?>']);
4374
- <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_anonymize_ip'] ) ) {
4375
- ?> _gaq.push(['_gat._anonymizeIp']);
4376
- <?php
4377
- }
4378
- ?>
4379
- <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_multi_domain'] ) ) {
4380
- ?> _gaq.push(['_setAllowLinker', true]);
4381
- <?php
4382
- }
4383
- ?>
4384
- <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_domain'] ) ) {
4385
- $domain = $this->get_analytics_domain();
4386
- ?> _gaq.push(['_setDomainName', '<?php echo $domain; ?>']);
4387
- <?php
4388
- }
4389
- ?> _gaq.push(['_trackPageview']);
4390
- (function () {
4391
- var ga = document.createElement('script');
4392
- ga.type = 'text/javascript';
4393
- ga.async = true;
4394
- <?php
4395
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
4396
- ?> ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
4397
- <?php
4398
- } else {
4399
- ?> ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
4400
- <?php
4401
- }
4402
- ?> var s = document.getElementsByTagName('script')[0];
4403
- s.parentNode.insertBefore(ga, s);
4404
- })();
4405
- </script>
4406
- <?php
4407
- }
4408
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && $aioseop_options['aiosp_ga_track_outbound_links'] ) { ?>
4409
- <script type="text/javascript">
4410
- function recordOutboundLink(link, category, action) {
4411
- <?php if ( ! empty( $aioseop_options['aiosp_ga_use_universal_analytics'] ) ) { ?>
4412
- ga('send', 'event', category, action);
4413
- <?php }
4414
- if ( empty( $aioseop_options['aiosp_ga_use_universal_analytics'] ) ) { ?>
4415
- _gat._getTrackerByName()._trackEvent(category, action);
4416
- <?php } ?>
4417
- if (link.target == '_blank') return true;
4418
- setTimeout('document.location = "' + link.href + '"', 100);
4419
- return false;
4420
- }
4421
- /* use regular Javascript for this */
4422
- function getAttr(ele, attr) {
4423
- var result = (ele.getAttribute && ele.getAttribute(attr)) || null;
4424
- if (!result) {
4425
- var attrs = ele.attributes;
4426
- var length = attrs.length;
4427
- for (var i = 0; i < length; i++)
4428
- if (attr[i].nodeName === attr) result = attr[i].nodeValue;
4429
- }
4430
- return result;
4431
- }
4432
-
4433
- function aiosp_addLoadEvent(func) {
4434
- var oldonload = window.onload;
4435
- if (typeof window.onload != 'function') {
4436
- window.onload = func;
4437
- } else {
4438
- window.onload = function () {
4439
- if (oldonload) {
4440
- oldonload();
4441
- }
4442
- func();
4443
- }
4444
- }
4445
- }
4446
-
4447
- function aiosp_addEvent(element, evnt, funct) {
4448
- if (element.attachEvent)
4449
- return element.attachEvent('on' + evnt, funct);
4450
- else
4451
- return element.addEventListener(evnt, funct, false);
4452
- }
4453
-
4454
- aiosp_addLoadEvent(function () {
4455
- var links = document.getElementsByTagName('a');
4456
- for (var x = 0; x < links.length; x++) {
4457
- if (typeof links[x] == 'undefined') continue;
4458
- aiosp_addEvent(links[x], 'onclick', function () {
4459
- var mydomain = new RegExp(document.domain, 'i');
4460
- href = getAttr(this, 'href');
4461
- if (href && href.toLowerCase().indexOf('http') === 0 && !mydomain.test(href)) {
4462
- recordOutboundLink(this, 'Outbound Links', href);
4463
- }
4464
- });
4465
- }
4466
- });
4467
- </script>
4468
- <?php
4469
- }
4470
- $analytics = ob_get_clean();
4471
- }
4472
- echo apply_filters( 'aiosp_google_analytics', $analytics );
4473
- do_action( 'after_aiosp_google_analytics' );
4474
- }
4475
-
4476
- /**
4477
- * @return string
4478
- */
4479
- function universal_analytics() {
4480
- global $aioseop_options;
4481
- $analytics = '';
4482
- if ( ! empty( $aioseop_options['aiosp_ga_use_universal_analytics'] ) ) {
4483
- $allow_linker = $cookie_domain = $domain = $addl_domains = $domain_list = '';
4484
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
4485
- $cookie_domain = $this->get_analytics_domain();
4486
- }
4487
- if ( ! empty( $cookie_domain ) ) {
4488
- $cookie_domain = esc_js( $cookie_domain );
4489
- $cookie_domain = "'cookieDomain': '{$cookie_domain}'";
4490
- }
4491
- if ( empty( $cookie_domain ) ) {
4492
- $domain = ", 'auto'";
4493
- }
4494
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_multi_domain'] ) ) {
4495
- $allow_linker = "'allowLinker': true";
4496
- if ( ! empty( $aioseop_options['aiosp_ga_addl_domains'] ) ) {
4497
- $addl_domains = trim( $aioseop_options['aiosp_ga_addl_domains'] );
4498
- $addl_domains = preg_split( '/[\s,]+/', $addl_domains );
4499
- if ( ! empty( $addl_domains ) ) {
4500
- foreach ( $addl_domains as $d ) {
4501
- $d = $this->sanitize_domain( $d );
4502
- if ( ! empty( $d ) ) {
4503
- if ( ! empty( $domain_list ) ) {
4504
- $domain_list .= ', ';
4505
- }
4506
- $domain_list .= "'" . $d . "'";
4507
- }
4508
- }
4509
- }
4510
- }
4511
- }
4512
- $extra_options = '';
4513
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
4514
- $extra_options .= "ga('require', 'displayfeatures');";
4515
- }
4516
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_enhanced_ecommerce'] ) ) {
4517
- if ( ! empty( $extra_options ) ) {
4518
- $extra_options .= "\n\t\t\t";
4519
- }
4520
- $extra_options .= "ga('require', 'ec');";
4521
- }
4522
- if ( ! empty( $domain_list ) ) {
4523
- if ( ! empty( $extra_options ) ) {
4524
- $extra_options .= "\n\t\t\t";
4525
- }
4526
- $extra_options .= "ga('require', 'linker');\n\t\t\tga('linker:autoLink', [{$domain_list}] );";
4527
- }
4528
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_link_attribution'] ) ) {
4529
- if ( ! empty( $extra_options ) ) {
4530
- $extra_options .= "\n\t\t\t";
4531
- }
4532
- $extra_options .= "ga('require', 'linkid', 'linkid.js');";
4533
- }
4534
-
4535
- if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_anonymize_ip'] ) ) {
4536
- if ( ! empty( $extra_options ) ) {
4537
- $extra_options .= "\n\t\t\t";
4538
- }
4539
- $extra_options .= "ga('set', 'anonymizeIp', true);";
4540
- }
4541
- $js_options = array();
4542
- foreach ( array( 'cookie_domain', 'allow_linker' ) as $opts ) {
4543
- if ( ! empty( $$opts ) ) {
4544
- $js_options[] = $$opts;
4545
- }
4546
- }
4547
- if ( ! empty( $js_options ) ) {
4548
- $js_options = join( ',', $js_options );
4549
- $js_options = ', { ' . $js_options . ' } ';
4550
- } else {
4551
- $js_options = '';
4552
- }
4553
- $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
4554
- $analytics = <<<EOF
4555
- <script>
4556
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4557
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4558
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
4559
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
4560
-
4561
- ga('create', '{$analytics_id}'{$domain}{$js_options});
4562
- {$extra_options}
4563
- ga('send', 'pageview');
4564
- </script>
4565
-
4566
- EOF;
4567
- }
4568
-
4569
- return $analytics;
4570
- }
4571
-
4572
- /**
4573
- * @return mixed|string
4574
- */
4575
- function get_analytics_domain() {
4576
- global $aioseop_options;
4577
- if ( ! empty( $aioseop_options['aiosp_ga_domain'] ) ) {
4578
- return $this->sanitize_domain( $aioseop_options['aiosp_ga_domain'] );
4579
- }
4580
-
4581
- return '';
4582
  }
4583
 
4584
  /**
@@ -4754,16 +4507,20 @@ EOF;
4754
 
4755
  $aioseop_admin_menu = 1;
4756
  if ( ! is_admin() && ! empty( $post ) ) {
 
4757
  $blog_page = aiosp_common::get_blog_page( $post );
4758
  if ( ! empty( $blog_page ) ) {
4759
  $post = $blog_page;
4760
  }
4761
- $wp_admin_bar->add_menu( array(
4762
- 'id' => 'aiosp_edit_' . $post->ID,
4763
- 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4764
- 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4765
- 'href' => get_edit_post_link( $post->ID ) . '#aiosp',
4766
- ) );
 
 
 
4767
  }
4768
  }
4769
  }
@@ -5104,30 +4861,12 @@ EOF;
5104
  </script>
5105
  <?php if ( ! AIOSEOPPRO ) { ?>
5106
  <div class="aioseop_advert aioseop_nopad_all">
5107
- <?php $adid = mt_rand( 21, 23 );
5108
-
5109
- if ( $adid == 23 ) { ?>
5110
- <div
5111
- style="height: 220px; background-image: url('https://www.wincher.com/Content/Images/plugin/wp/banner30.jpg')">
5112
- <form style="position: relative; top: 170px; left: 40px;"
5113
- action="https://www.wincher.com/FastReg" method="post" target="_blank">
5114
- <input type="hidden" name="adreferer" value="banner<?php echo $adid; ?>"/>
5115
- <input type="hidden" name="referer" value="all-in-one-seo-pack"/>
5116
- <input type="text" name="email" placeholder="Email"
5117
- style="padding-left: 7px; height: 30px; width: 290px; border: solid 1px #DDD;"/>
5118
- <input type="submit" name="sub" value="Sign up!"
5119
- style="height: 30px; width: 90px; background-color: #42DA76; color: #FFF; font-weight: bold; border:none; margin-left:5px;"/>
5120
- </form>
5121
- </div>
5122
- <?
5123
- } else {
5124
- ?>
5125
  <a href="https://www.wincher.com/?referer=all-in-one-seo-pack&adreferer=banner<?php echo $adid; ?>"
5126
  target="_blank">
5127
  <div class=wincherad id=wincher<?php echo $adid; ?>>
5128
  </div>
5129
  </a>
5130
- <?php } ?>
5131
  </div>
5132
  <div class="aioseop_advert headwaythemes">
5133
  <div>
194
  'google_set_site_name' => __( 'Add markup to tell Google the preferred name for your website.', 'all-in-one-seo-pack' ),
195
  'google_connect' => __( 'Press the connect button to connect with Google Analytics; or if already connected, press the disconnect button to disable and remove any stored analytics credentials.', 'all-in-one-seo-pack' ),
196
  'google_analytics_id' => __( 'Enter your Google Analytics ID here to track visitor behavior on your site using Google Analytics.', 'all-in-one-seo-pack' ),
 
197
  'ga_advanced_options' => __( 'Check to use advanced Google Analytics options.', 'all-in-one-seo-pack' ),
198
  'ga_domain' => __( 'Enter your domain name without the http:// to set your cookie domain.', 'all-in-one-seo-pack' ),
199
  'ga_multi_domain' => __( 'Use this option to enable tracking of multiple or additional domains.', 'all-in-one-seo-pack' ),
227
  'dont_truncate_descriptions' => __( 'Check this to prevent your Description from being truncated regardless of its length.', 'all-in-one-seo-pack' ),
228
  'schema_markup' => __( 'Check this to support Schema.org markup, i.e., itemprop on supported metadata.', 'all-in-one-seo-pack' ),
229
  'unprotect_meta' => __( "Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.", 'all-in-one-seo-pack' ),
230
+ 'redirect_attachement_parent' => __( 'Redirect attachment pages to post parent.', 'all-in-one-seo-pack' ),
231
  'ex_pages' => __( 'Enter a comma separated list of pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage here and it will be excluded from All in One SEO Pack.', 'all-in-one-seo-pack' ),
232
  'post_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Posts. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
233
  'page_meta_tags' => __( 'What you enter here will be copied verbatim to the header of all Pages. You can enter whatever additional headers you want here, even references to stylesheets.', 'all-in-one-seo-pack' ),
287
  'google_enable_publisher' => '#display-publisher-meta-on-front-page',
288
  'google_specify_publisher' => '#specify-publisher-url',
289
  'google_analytics_id' => 'http://semperplugins.com/documentation/setting-up-google-analytics/',
 
290
  'ga_domain' => '#tracking-domain',
291
  'ga_multi_domain' => '#track-multiple-domains-additional-domains',
292
  'ga_addl_domains' => '#track-multiple-domains-additional-domains',
317
  'hide_paginated_descriptions' => '#remove-descriptions-for-paginated-pages',
318
  'dont_truncate_descriptions' => '#never-shorten-long-descriptions',
319
  'unprotect_meta' => '#unprotect-post-meta-fields',
320
+ 'redirect_attachement_parent' => '#redirect-attachments-to-post-parent',
321
  'ex_pages' => '#exclude-pages',
322
  'post_meta_tags' => '#additional-post-headers',
323
  'page_meta_tags' => '#additional-page-headers',
679
  'type' => 'text',
680
  'placeholder' => 'UA-########-#',
681
  ),
 
 
 
 
 
 
 
 
 
 
 
682
  'ga_advanced_options' => array(
683
  'name' => __( 'Advanced Analytics Options:', 'all-in-one-seo-pack' ),
684
  'default' => 'on',
801
  'op' => '!=',
802
  'rhs' => '',
803
  ),
 
804
  'aiosp_ga_advanced_options' => 'on',
805
  ),
806
  ),
894
  'name' => __( 'Unprotect Post Meta Fields:', 'all-in-one-seo-pack' ),
895
  'default' => 0,
896
  ),
897
+ 'redirect_attachement_parent' => array(
898
+ 'name' => __( 'Redirect Attachments to Post Parent:', 'all-in-one-seo-pack'),
899
+ 'default' => 0,
900
+ ),
901
  'ex_pages' => array(
902
  'name' => __( 'Exclude Pages:', 'all-in-one-seo-pack' ),
903
  'type' => 'textarea',
1130
  'google_specify_publisher',
1131
  // "google_connect",
1132
  'google_analytics_id',
 
1133
  'ga_advanced_options',
1134
  'ga_domain',
1135
  'ga_multi_domain',
1173
  'hide_paginated_descriptions',
1174
  'dont_truncate_descriptions',
1175
  'unprotect_meta',
1176
+ 'redirect_attachement_parent',
1177
  'ex_pages',
1178
  'post_meta_tags',
1179
  'page_meta_tags',
2364
  $name = single_term_title( '', false );
2365
  }
2366
  // Apparently we're already ucwordsing this elsewhere, and doing it a second time messes it up... why aren't we just doing this at the end?
2367
+ if ( ( $tax == 'category' ) && ( !empty( $aioseop_options['aiosp_cap_cats'] ) ) ){
2368
+ $name = $this->ucwords( $name );
2369
+ }
2370
 
2371
  return $this->internationalize( $name );
2372
  }
3790
  $description = apply_filters( 'aioseop_description_full', $this->apply_description_format( $description, $post ) );
3791
  $desc_attr = '';
3792
  if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
3793
+ $desc_attr = '';
3794
  }
3795
  $desc_attr = apply_filters( 'aioseop_description_attributes', $desc_attr );
3796
  $meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
4331
  }
4332
 
4333
  function aiosp_google_analytics() {
4334
+ new aioseop_google_analytics;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4335
  }
4336
 
4337
  /**
4507
 
4508
  $aioseop_admin_menu = 1;
4509
  if ( ! is_admin() && ! empty( $post ) ) {
4510
+
4511
  $blog_page = aiosp_common::get_blog_page( $post );
4512
  if ( ! empty( $blog_page ) ) {
4513
  $post = $blog_page;
4514
  }
4515
+ if( ! is_home() || ( ! is_front_page() && ! is_home() ) ) {
4516
+ // Don't show if we're on the home page and the home page is the latest posts.
4517
+ $wp_admin_bar->add_menu( array(
4518
+ 'id' => 'aiosp_edit_' . $post->ID,
4519
+ 'parent' => AIOSEOP_PLUGIN_DIRNAME,
4520
+ 'title' => __( 'Edit SEO', 'all-in-one-seo-pack' ),
4521
+ 'href' => get_edit_post_link( $post->ID ) . '#aiosp',
4522
+ ) );
4523
+ }
4524
  }
4525
  }
4526
  }
4861
  </script>
4862
  <?php if ( ! AIOSEOPPRO ) { ?>
4863
  <div class="aioseop_advert aioseop_nopad_all">
4864
+ <?php $adid = mt_rand( 21, 22 ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4865
  <a href="https://www.wincher.com/?referer=all-in-one-seo-pack&adreferer=banner<?php echo $adid; ?>"
4866
  target="_blank">
4867
  <div class=wincherad id=wincher<?php echo $adid; ?>>
4868
  </div>
4869
  </a>
 
4870
  </div>
4871
  <div class="aioseop_advert headwaythemes">
4872
  <div>
all_in_one_seo_pack.php CHANGED
@@ -1,475 +1,494 @@
1
- <?php
2
- /*
3
- Plugin Name: All In One SEO Pack
4
- Plugin URI: http://semperfiwebdesign.com
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. Almost 30 million downloads since 2007.
6
- Version: 2.3.8
7
- Author: Michael Torbert
8
- Author URI: http://michaeltorbert.com
9
- Text Domain: all-in-one-seo-pack
10
- Domain Path: /i18n/
11
- */
12
-
13
- /*
14
- Copyright (C) 2007-2016 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; either version 3 of the License, or
19
- (at your option) any later version.
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.3.8
36
- */
37
-
38
- if ( ! defined( 'AIOSEOPPRO' ) ) {
39
- define( 'AIOSEOPPRO', false );
40
- }
41
- if ( ! defined( 'AIOSEOP_VERSION' ) ) {
42
- define( 'AIOSEOP_VERSION', '2.3.8' );
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_init', '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
- // Do we need this? register_activation_hook(__FILE__,'aioseop_activate_pl');.
82
- if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
83
- define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
84
- } elseif ( AIOSEOP_PLUGIN_DIR !== plugin_dir_path( __FILE__ ) ) {
85
-
86
- /*
87
- This is not a great message.
88
- add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
89
- __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
90
- $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
91
- */
92
-
93
- return;
94
- }
95
-
96
- if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) ) {
97
- define( 'AIOSEOP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
98
- }
99
- if ( ! defined( 'AIOSEOP_PLUGIN_DIRNAME' ) ) {
100
- define( 'AIOSEOP_PLUGIN_DIRNAME', dirname( AIOSEOP_PLUGIN_BASENAME ) );
101
- }
102
- if ( ! defined( 'AIOSEOP_PLUGIN_URL' ) ) {
103
- define( 'AIOSEOP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
104
- }
105
- if ( ! defined( 'AIOSEOP_PLUGIN_IMAGES_URL' ) ) {
106
- define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
107
- }
108
- if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
109
- define( 'AIOSEOP_BASELINE_MEM_LIMIT', 268435456 );
110
- } // 256MB
111
- if ( ! defined( 'WP_CONTENT_URL' ) ) {
112
- define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
113
- }
114
- if ( ! defined( 'WP_ADMIN_URL' ) ) {
115
- define( 'WP_ADMIN_URL', site_url() . '/wp-admin' );
116
- }
117
- if ( ! defined( 'WP_CONTENT_DIR' ) ) {
118
- define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
119
- }
120
- if ( ! defined( 'WP_PLUGIN_URL' ) ) {
121
- define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
122
- }
123
- if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
124
- define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
125
- }
126
-
127
- global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
128
- $aioseop_get_pages_start = $aioseop_admin_menu = 0;
129
-
130
- if ( AIOSEOPPRO ) {
131
- global $aioseop_update_checker;
132
- }
133
-
134
- $aioseop_options = get_option( 'aioseop_options' );
135
-
136
- $aioseop_mem_limit = @ini_get( 'memory_limit' );
137
-
138
- if ( ! function_exists( 'aioseop_convert_bytestring' ) ) {
139
- /**
140
- * @param $byte_string
141
- *
142
- * @return int
143
- */
144
- function aioseop_convert_bytestring( $byte_string ) {
145
- $num = 0;
146
- preg_match( '/^\s*([0-9.]+)\s*([KMGTPE])B?\s*$/i', $byte_string, $matches );
147
- if ( ! empty( $matches ) ) {
148
- $num = (float) $matches[1];
149
- switch ( strtoupper( $matches[2] ) ) {
150
- case 'E':
151
- $num *= 1024;
152
- case 'P':
153
- $num *= 1024;
154
- case 'T':
155
- $num *= 1024;
156
- case 'G':
157
- $num *= 1024;
158
- case 'M':
159
- $num *= 1024;
160
- case 'K':
161
- $num *= 1024;
162
- }
163
- }
164
-
165
- return intval( $num );
166
- }
167
- }
168
-
169
- if ( is_array( $aioseop_options ) && isset( $aioseop_options['modules'] ) && isset( $aioseop_options['modules']['aiosp_performance_options'] ) ) {
170
- $perf_opts = $aioseop_options['modules']['aiosp_performance_options'];
171
- if ( isset( $perf_opts['aiosp_performance_memory_limit'] ) ) {
172
- $aioseop_mem_limit = $perf_opts['aiosp_performance_memory_limit'];
173
- }
174
- if ( isset( $perf_opts['aiosp_performance_execution_time'] ) && ( '' !== $perf_opts['aiosp_performance_execution_time'] ) ) {
175
- @ini_set( 'max_execution_time', (int) $perf_opts['aiosp_performance_execution_time'] );
176
- @set_time_limit( (int) $perf_opts['aiosp_performance_execution_time'] );
177
- }
178
- } else {
179
- $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
180
- if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit < AIOSEOP_BASELINE_MEM_LIMIT ) ) {
181
- $aioseop_mem_limit = AIOSEOP_BASELINE_MEM_LIMIT;
182
- }
183
- }
184
-
185
- if ( ! empty( $aioseop_mem_limit ) ) {
186
- if ( ! is_int( $aioseop_mem_limit ) ) {
187
- $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
188
- }
189
- if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit <= AIOSEOP_BASELINE_MEM_LIMIT ) ) {
190
- @ini_set( 'memory_limit', $aioseop_mem_limit );
191
- }
192
- }
193
-
194
- $aiosp_activation = false;
195
- $aioseop_module_list = array(
196
- 'sitemap',
197
- 'opengraph',
198
- 'robots',
199
- 'file_editor',
200
- 'importer_exporter',
201
- 'bad_robots',
202
- 'performance',
203
- ); // list all available modules here
204
-
205
- if ( AIOSEOPPRO ) {
206
- $aioseop_module_list[] = 'video_sitemap';
207
- }
208
-
209
- if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
210
- add_action( 'admin_notices', create_function( '', 'echo "<div class=\'error\'>The All In One SEO Pack class is already defined";'
211
- . "if ( class_exists( 'ReflectionClass' ) ) { \$r = new ReflectionClass( 'All_in_One_SEO_Pack' ); echo ' in ' . \$r->getFileName(); } "
212
- . ' echo ", preventing All In One SEO Pack from loading.</div>";' ) );
213
-
214
- return;
215
- }
216
-
217
- if ( AIOSEOPPRO ) {
218
-
219
- require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
220
- $aioseop_update_checker = new SFWD_Update_Checker(
221
- 'http://semperplugins.com/upgrade_plugins.php',
222
- __FILE__,
223
- 'aioseop'
224
- );
225
-
226
- $aioseop_update_checker->plugin_name = AIOSEOP_PLUGIN_NAME;
227
- $aioseop_update_checker->plugin_basename = AIOSEOP_PLUGIN_BASENAME;
228
- if ( ! empty( $aioseop_options['aiosp_license_key'] ) ) {
229
- $aioseop_update_checker->license_key = $aioseop_options['aiosp_license_key'];
230
- } else {
231
- $aioseop_update_checker->license_key = '';
232
- }
233
- $aioseop_update_checker->options_page = 'all-in-one-seo-pack-pro/aioseop_class.php';
234
- $aioseop_update_checker->renewal_page = 'http://semperplugins.com/all-in-one-seo-pack-pro-support-updates-renewal/';
235
-
236
- $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
237
- }
238
-
239
-
240
- if ( ! function_exists( 'aioseop_activate' ) ) {
241
-
242
- function aioseop_activate() {
243
-
244
- //Check if we just got activated.
245
- global $aiosp_activation;
246
- if ( AIOSEOPPRO ) {
247
- global $aioseop_update_checker;
248
- }
249
- $aiosp_activation = true;
250
-
251
- delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
252
-
253
- if ( AIOSEOPPRO ) {
254
- $aioseop_update_checker->checkForUpdates();
255
- }
256
- }
257
- }
258
-
259
- add_action( 'plugins_loaded', 'aioseop_init_class' );
260
-
261
- if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
262
-
263
- add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
264
-
265
- /**
266
- * @param $actions
267
- * @param $plugin_file
268
- *
269
- * @return array
270
- */
271
- function aiosp_plugin_row_meta( $actions, $plugin_file ) {
272
-
273
- if ( ! AIOSEOPPRO ) {
274
-
275
- $action_links = array(
276
- 'donatelink' => array(
277
- 'label' => __( 'Donate', 'all-in-one-seo-pack' ),
278
- 'url' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8',
279
- ),
280
- 'amazon' => array(
281
- 'label' => __( 'Amazon Wishlist', 'all-in-one-seo-pack' ),
282
- 'url' => 'https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web',
283
- ),
284
-
285
- );
286
-
287
- } else {
288
- $action_links = '';
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
-
308
- $aioseop_plugin_dirname = AIOSEOP_PLUGIN_DIRNAME;
309
- $action_links = array();
310
- $action_links = array(
311
- 'settings' => array(
312
- 'label' => __( 'SEO Settings', 'all-in-one-seo-pack' ),
313
- 'url' => get_admin_url( null, "admin.php?page=$aioseop_plugin_dirname/aioseop_class.php" ),
314
- ),
315
-
316
- 'forum' => array(
317
- 'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
318
- 'url' => 'http://semperplugins.com/support/',
319
- ),
320
-
321
- 'docs' => array(
322
- 'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
323
- 'url' => 'http://semperplugins.com/documentation/',
324
- ),
325
-
326
- );
327
-
328
- unset( $actions['edit'] );
329
-
330
- if ( ! AIOSEOPPRO ) {
331
- $action_links['proupgrade'] =
332
- array(
333
- 'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
334
- 'url' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
335
-
336
- );
337
- }
338
-
339
- return aiosp_action_links( $actions, $plugin_file, $action_links, 'before' );
340
- }
341
- }
342
-
343
- if ( ! function_exists( 'aiosp_action_links' ) ) {
344
-
345
- /**
346
- * @param $actions
347
- * @param $plugin_file
348
- * @param array $action_links
349
- * @param string $position
350
- *
351
- * @return array
352
- */
353
- function aiosp_action_links( $actions, $plugin_file, $action_links = array(), $position = 'after' ) {
354
- static $plugin;
355
- if ( ! isset( $plugin ) ) {
356
- $plugin = plugin_basename( __FILE__ );
357
- }
358
- if ( $plugin === $plugin_file && ! empty( $action_links ) ) {
359
- foreach ( $action_links as $key => $value ) {
360
- $link = array( $key => '<a href="' . $value['url'] . '">' . $value['label'] . '</a>' );
361
- if ( 'after' === $position ) {
362
- $actions = array_merge( $actions, $link );
363
- } else {
364
- $actions = array_merge( $link, $actions );
365
- }
366
- }//foreach
367
- }// if
368
- return $actions;
369
- }
370
- }
371
-
372
-
373
- if ( ! function_exists( 'aioseop_init_class' ) ) {
374
- function aioseop_init_class() {
375
- global $aiosp;
376
- load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
377
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
378
- require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
379
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_updates_class.php' );
380
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php' );
381
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/postedit.php' );
382
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/general-metaboxes.php' );
383
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/aiosp_common.php' );
384
- require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
385
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
386
- require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
387
- require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-init.php');
388
- require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
389
-
390
- if ( AIOSEOPPRO ) {
391
- require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_general.php' );
392
- require_once( AIOSEOP_PLUGIN_DIR . 'pro/functions_class.php' );
393
- require_once( AIOSEOP_PLUGIN_DIR . 'pro/aioseop_pro_updates_class.php' );
394
- }
395
- aiosp_seometa_import(); // call importer functions... this should be moved somewhere better
396
-
397
- $aiosp = new All_in_One_SEO_Pack();
398
-
399
- $aioseop_updates = new AIOSEOP_Updates();
400
-
401
- if ( AIOSEOPPRO ) {
402
- $aioseop_pro_updates = new AIOSEOP_Pro_Updates();
403
- add_action( 'admin_init', array( $aioseop_pro_updates, 'version_updates' ), 12 );
404
- }
405
-
406
- if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) ) {
407
- add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
408
- }
409
-
410
- add_action( 'init', array( $aiosp, 'add_hooks' ) );
411
- add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
412
-
413
- if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
414
- remove_action( 'init', array( $aiosp, 'add_hooks' ) );
415
- add_action( 'admin_init', 'aioseop_scan_post_header' );
416
- add_action( 'shutdown', 'aioseop_ajax_scan_header' ); // if the action doesn't run -- pdb
417
- include_once( ABSPATH . 'wp-admin/includes/screen.php' );
418
- global $current_screen;
419
- if ( class_exists( 'WP_Screen' ) ) {
420
- $current_screen = WP_Screen::get( 'front' );
421
- }
422
- }
423
- }
424
- }
425
-
426
- add_action( 'init', 'aioseop_load_modules', 1 );
427
- //add_action( 'after_setup_theme', 'aioseop_load_modules' );
428
-
429
- if ( is_admin() ) {
430
- add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
431
- add_action( 'wp_ajax_aioseop_ajax_save_url', 'aioseop_ajax_save_url' );
432
- add_action( 'wp_ajax_aioseop_ajax_delete_url', 'aioseop_ajax_delete_url' );
433
- add_action( 'wp_ajax_aioseop_ajax_scan_header', 'aioseop_ajax_scan_header' );
434
- if ( AIOSEOPPRO ) {
435
- add_action( 'wp_ajax_aioseop_ajax_facebook_debug', 'aioseop_ajax_facebook_debug' );
436
- }
437
- add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings' );
438
- add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links' );
439
- add_action( 'wp_ajax_aioseo_dismiss_yst_notice', 'aioseop_update_yst_detected_notice' );
440
- add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
441
- add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
442
- if ( AIOSEOPPRO ) {
443
- add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
444
- }
445
- }
446
-
447
- if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
448
- function aioseop_scan_post_header() {
449
- require_once( ABSPATH . WPINC . '/default-filters.php' );
450
- global $wp_query;
451
- $wp_query->query_vars['paged'] = 0;
452
- query_posts( 'post_type=post&posts_per_page=1' );
453
- if ( have_posts() ) {
454
- the_post();
455
- }
456
- }
457
- }
458
-
459
- require_once( AIOSEOP_PLUGIN_DIR . 'aioseop-init.php' );
460
-
461
- if ( ! function_exists( 'aioseop_install' ) ) {
462
- register_activation_hook( __FILE__, 'aioseop_install' );
463
-
464
- function aioseop_install() {
465
- aioseop_activate();
466
- }
467
- }
468
-
469
- if ( ! function_exists( 'disable_all_in_one_free' ) ) {
470
- function disable_all_in_one_free() {
471
- if ( AIOSEOPPRO && is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) {
472
- deactivate_plugins( 'all-in-one-seo-pack/all_in_one_seo_pack.php' );
473
- }
474
- }
475
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: All In One SEO Pack
4
+ Plugin URI: http://semperfiwebdesign.com
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. Almost 30 million downloads since 2007.
6
+ Version: 2.3.9.2
7
+ Author: Michael Torbert
8
+ Author URI: http://michaeltorbert.com
9
+ Text Domain: all-in-one-seo-pack
10
+ Domain Path: /i18n/
11
+ */
12
+
13
+ /*
14
+ Copyright (C) 2007-2016 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.3.9.2
35
+ */
36
+
37
+ if ( ! defined( 'AIOSEOPPRO' ) ) {
38
+ define( 'AIOSEOPPRO', false );
39
+ }
40
+ if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
+ define( 'AIOSEOP_VERSION', '2.3.9.2' );
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_init', '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
+ // Do we need this? register_activation_hook(__FILE__,'aioseop_activate_pl');.
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
+ /*
86
+ This is not a great message.
87
+ add_action( 'admin_notices', create_function( '', 'echo "' . "<div class='error'>" . sprintf(
88
+ __( "%s detected a conflict; please deactivate the plugin located in %s.", 'all-in-one-seo-pack' ),
89
+ $aioseop_plugin_name, AIOSEOP_PLUGIN_DIR ) . "</div>" . '";' ) );
90
+ */
91
+
92
+ return;
93
+ }
94
+
95
+ if ( ! defined( 'AIOSEOP_PLUGIN_BASENAME' ) ) {
96
+ define( 'AIOSEOP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
97
+ }
98
+ if ( ! defined( 'AIOSEOP_PLUGIN_DIRNAME' ) ) {
99
+ define( 'AIOSEOP_PLUGIN_DIRNAME', dirname( AIOSEOP_PLUGIN_BASENAME ) );
100
+ }
101
+ if ( ! defined( 'AIOSEOP_PLUGIN_URL' ) ) {
102
+ define( 'AIOSEOP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
103
+ }
104
+ if ( ! defined( 'AIOSEOP_PLUGIN_IMAGES_URL' ) ) {
105
+ define( 'AIOSEOP_PLUGIN_IMAGES_URL', AIOSEOP_PLUGIN_URL . 'images/' );
106
+ }
107
+ if ( ! defined( 'AIOSEOP_BASELINE_MEM_LIMIT' ) ) {
108
+ define( 'AIOSEOP_BASELINE_MEM_LIMIT', 268435456 );
109
+ } // 256MB
110
+ if ( ! defined( 'WP_CONTENT_URL' ) ) {
111
+ define( 'WP_CONTENT_URL', site_url() . '/wp-content' );
112
+ }
113
+ if ( ! defined( 'WP_ADMIN_URL' ) ) {
114
+ define( 'WP_ADMIN_URL', site_url() . '/wp-admin' );
115
+ }
116
+ if ( ! defined( 'WP_CONTENT_DIR' ) ) {
117
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
118
+ }
119
+ if ( ! defined( 'WP_PLUGIN_URL' ) ) {
120
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' );
121
+ }
122
+ if ( ! defined( 'WP_PLUGIN_DIR' ) ) {
123
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
124
+ }
125
+
126
+ global $aiosp, $aioseop_options, $aioseop_modules, $aioseop_module_list, $aiosp_activation, $aioseop_mem_limit, $aioseop_get_pages_start, $aioseop_admin_menu;
127
+ $aioseop_get_pages_start = $aioseop_admin_menu = 0;
128
+
129
+ if ( AIOSEOPPRO ) {
130
+ global $aioseop_update_checker;
131
+ }
132
+
133
+ $aioseop_options = get_option( 'aioseop_options' );
134
+
135
+ $aioseop_mem_limit = @ini_get( 'memory_limit' );
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
+ case 'P':
152
+ $num *= 1024;
153
+ case 'T':
154
+ $num *= 1024;
155
+ case 'G':
156
+ $num *= 1024;
157
+ case 'M':
158
+ $num *= 1024;
159
+ case 'K':
160
+ $num *= 1024;
161
+ }
162
+ }
163
+
164
+ return intval( $num );
165
+ }
166
+ }
167
+
168
+ if ( is_array( $aioseop_options ) && isset( $aioseop_options['modules'] ) && isset( $aioseop_options['modules']['aiosp_performance_options'] ) ) {
169
+ $perf_opts = $aioseop_options['modules']['aiosp_performance_options'];
170
+ if ( isset( $perf_opts['aiosp_performance_memory_limit'] ) ) {
171
+ $aioseop_mem_limit = $perf_opts['aiosp_performance_memory_limit'];
172
+ }
173
+ if ( isset( $perf_opts['aiosp_performance_execution_time'] ) && ( '' !== $perf_opts['aiosp_performance_execution_time'] ) ) {
174
+ @ini_set( 'max_execution_time', (int) $perf_opts['aiosp_performance_execution_time'] );
175
+ @set_time_limit( (int) $perf_opts['aiosp_performance_execution_time'] );
176
+ }
177
+ } else {
178
+ $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
179
+ if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit < AIOSEOP_BASELINE_MEM_LIMIT ) ) {
180
+ $aioseop_mem_limit = AIOSEOP_BASELINE_MEM_LIMIT;
181
+ }
182
+ }
183
+
184
+ if ( ! empty( $aioseop_mem_limit ) ) {
185
+ if ( ! is_int( $aioseop_mem_limit ) ) {
186
+ $aioseop_mem_limit = aioseop_convert_bytestring( $aioseop_mem_limit );
187
+ }
188
+ if ( ( $aioseop_mem_limit > 0 ) && ( $aioseop_mem_limit <= AIOSEOP_BASELINE_MEM_LIMIT ) ) {
189
+ @ini_set( 'memory_limit', $aioseop_mem_limit );
190
+ }
191
+ }
192
+
193
+ $aiosp_activation = false;
194
+ $aioseop_module_list = array(
195
+ 'sitemap',
196
+ 'opengraph',
197
+ 'robots',
198
+ 'file_editor',
199
+ 'importer_exporter',
200
+ 'bad_robots',
201
+ 'performance',
202
+ ); // list all available modules here
203
+
204
+ if ( AIOSEOPPRO ) {
205
+ $aioseop_module_list[] = 'video_sitemap';
206
+ }
207
+
208
+ if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
209
+ add_action( 'admin_notices', create_function( '', 'echo "<div class=\'error\'>The All In One SEO Pack class is already defined";'
210
+ . "if ( class_exists( 'ReflectionClass' ) ) { \$r = new ReflectionClass( 'All_in_One_SEO_Pack' ); echo ' in ' . \$r->getFileName(); } "
211
+ . ' echo ", preventing All In One SEO Pack from loading.</div>";' ) );
212
+
213
+ return;
214
+ }
215
+
216
+ if ( AIOSEOPPRO ) {
217
+
218
+ require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
219
+ $aioseop_update_checker = new SFWD_Update_Checker(
220
+ 'http://semperplugins.com/upgrade_plugins.php',
221
+ __FILE__,
222
+ 'aioseop'
223
+ );
224
+
225
+ $aioseop_update_checker->plugin_name = AIOSEOP_PLUGIN_NAME;
226
+ $aioseop_update_checker->plugin_basename = AIOSEOP_PLUGIN_BASENAME;
227
+ if ( ! empty( $aioseop_options['aiosp_license_key'] ) ) {
228
+ $aioseop_update_checker->license_key = $aioseop_options['aiosp_license_key'];
229
+ } else {
230
+ $aioseop_update_checker->license_key = '';
231
+ }
232
+ $aioseop_update_checker->options_page = 'all-in-one-seo-pack-pro/aioseop_class.php';
233
+ $aioseop_update_checker->renewal_page = 'http://semperplugins.com/all-in-one-seo-pack-pro-support-updates-renewal/';
234
+
235
+ $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
236
+ }
237
+
238
+
239
+ if ( ! function_exists( 'aioseop_activate' ) ) {
240
+
241
+ function aioseop_activate() {
242
+
243
+ //Check if we just got activated.
244
+ global $aiosp_activation;
245
+ if ( AIOSEOPPRO ) {
246
+ global $aioseop_update_checker;
247
+ }
248
+ $aiosp_activation = true;
249
+
250
+ if( ! is_network_admin() || !isset( $_GET['activate-multi'] ) ) {
251
+ set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
252
+ }
253
+
254
+ delete_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed' );
255
+
256
+ if ( AIOSEOPPRO ) {
257
+ $aioseop_update_checker->checkForUpdates();
258
+ }
259
+ }
260
+ }
261
+
262
+ add_action( 'plugins_loaded', 'aioseop_init_class' );
263
+
264
+ if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
265
+
266
+ add_filter( 'plugin_row_meta', 'aiosp_plugin_row_meta', 10, 2 );
267
+
268
+ /**
269
+ * @param $actions
270
+ * @param $plugin_file
271
+ *
272
+ * @return array
273
+ */
274
+ function aiosp_plugin_row_meta( $actions, $plugin_file ) {
275
+
276
+ if ( ! AIOSEOPPRO ) {
277
+
278
+ $action_links = array(
279
+ 'donatelink' => array(
280
+ 'label' => __( 'Donate', 'all-in-one-seo-pack' ),
281
+ 'url' => 'https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8',
282
+ ),
283
+ 'amazon' => array(
284
+ 'label' => __( 'Amazon Wishlist', 'all-in-one-seo-pack' ),
285
+ 'url' => 'https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web',
286
+ ),
287
+
288
+ );
289
+
290
+ } else {
291
+ $action_links = '';
292
+ }
293
+
294
+ return aiosp_action_links( $actions, $plugin_file, $action_links, 'after' );
295
+ }
296
+ }
297
+
298
+ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
299
+
300
+
301
+ add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'aiosp_add_action_links', 10, 2 );
302
+
303
+ /**
304
+ * @param $actions
305
+ * @param $plugin_file
306
+ *
307
+ * @return array
308
+ */
309
+ function aiosp_add_action_links( $actions, $plugin_file ) {
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' => 'http://semperplugins.com/support/',
322
+ ),
323
+
324
+ 'docs' => array(
325
+ 'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
326
+ 'url' => 'http://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' => 'http://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
+ function aioseop_init_class() {
377
+ global $aiosp;
378
+ load_plugin_textdomain( 'all-in-one-seo-pack', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n/' );
379
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_functions.php' );
380
+ require_once( AIOSEOP_PLUGIN_DIR . 'aioseop_class.php' );
381
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aioseop_updates_class.php' );
382
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/commonstrings.php' );
383
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/postedit.php' );
384
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/general-metaboxes.php' );
385
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/aiosp_common.php' );
386
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/meta_import.php' );
387
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/translations.php' );
388
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/opengraph.php' );
389
+ require_once( AIOSEOP_PLUGIN_DIR . 'inc/compatability/compat-init.php');
390
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/front.php' );
391
+ require_once( AIOSEOP_PLUGIN_DIR . 'public/google-analytics.php' );
392
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome.php' );
393
+
394
+ $aioseop_welcome = new aioseop_welcome(); // TODO move this to updates file.
395
+
396
+ if ( AIOSEOPPRO ) {
397
+ require_once( AIOSEOP_PLUGIN_DIR . 'pro/class-aio-pro-init.php' ); // Loads pro files and other pro init stuff.
398
+ }
399
+ aiosp_seometa_import(); // call importer functions... this should be moved somewhere better
400
+
401
+ $aiosp = new All_in_One_SEO_Pack();
402
+
403
+ $aioseop_updates = new AIOSEOP_Updates();
404
+
405
+ if ( AIOSEOPPRO ) {
406
+ $aioseop_pro_updates = new AIOSEOP_Pro_Updates();
407
+ add_action( 'admin_init', array( $aioseop_pro_updates, 'version_updates' ), 12 );
408
+ }
409
+
410
+ add_action( 'admin_init', 'aioseop_welcome' );
411
+
412
+ if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) ) {
413
+ add_filter( 'is_protected_meta', 'aioseop_unprotect_meta', 10, 3 );
414
+ }
415
+
416
+ add_action( 'init', array( $aiosp, 'add_hooks' ) );
417
+ add_action( 'admin_init', array( $aioseop_updates, 'version_updates' ), 11 );
418
+
419
+ if ( defined( 'DOING_AJAX' ) && ! empty( $_POST ) && ! empty( $_POST['action'] ) && 'aioseop_ajax_scan_header' === $_POST['action'] ) {
420
+ remove_action( 'init', array( $aiosp, 'add_hooks' ) );
421
+ add_action( 'admin_init', 'aioseop_scan_post_header' );
422
+ add_action( 'shutdown', 'aioseop_ajax_scan_header' ); // if the action doesn't run -- pdb
423
+ include_once( ABSPATH . 'wp-admin/includes/screen.php' );
424
+ global $current_screen;
425
+ if ( class_exists( 'WP_Screen' ) ) {
426
+ $current_screen = WP_Screen::get( 'front' );
427
+ }
428
+ }
429
+ }
430
+ }
431
+
432
+
433
+
434
+ if ( ! function_exists( 'aioseop_welcome' ) ){
435
+ function aioseop_welcome(){
436
+ if( get_transient( '_aioseop_activation_redirect') ){
437
+ $aioseop_welcome = new aioseop_welcome();
438
+ delete_transient( '_aioseop_activation_redirect' );
439
+ $aioseop_welcome->init();
440
+ }
441
+
442
+ }
443
+ }
444
+
445
+ add_action( 'init', 'aioseop_load_modules', 1 );
446
+ //add_action( 'after_setup_theme', 'aioseop_load_modules' );
447
+
448
+ if ( is_admin() ) {
449
+ add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
450
+ add_action( 'wp_ajax_aioseop_ajax_save_url', 'aioseop_ajax_save_url' );
451
+ add_action( 'wp_ajax_aioseop_ajax_delete_url', 'aioseop_ajax_delete_url' );
452
+ add_action( 'wp_ajax_aioseop_ajax_scan_header', 'aioseop_ajax_scan_header' );
453
+ if ( AIOSEOPPRO ) {
454
+ add_action( 'wp_ajax_aioseop_ajax_facebook_debug', 'aioseop_ajax_facebook_debug' );
455
+ }
456
+ add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings' );
457
+ add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links' );
458
+ add_action( 'wp_ajax_aioseo_dismiss_yst_notice', 'aioseop_update_yst_detected_notice' );
459
+ add_action( 'wp_ajax_aioseo_dismiss_visibility_notice', 'aioseop_update_user_visibilitynotice' );
460
+ add_action( 'wp_ajax_aioseo_dismiss_woo_upgrade_notice', 'aioseop_woo_upgrade_notice_dismissed' );
461
+ if ( AIOSEOPPRO ) {
462
+ add_action( 'wp_ajax_aioseop_ajax_update_oembed', 'aioseop_ajax_update_oembed' );
463
+ }
464
+ }
465
+
466
+ if ( ! function_exists( 'aioseop_scan_post_header' ) ) {
467
+ function aioseop_scan_post_header() {
468
+ require_once( ABSPATH . WPINC . '/default-filters.php' );
469
+ global $wp_query;
470
+ $wp_query->query_vars['paged'] = 0;
471
+ query_posts( 'post_type=post&posts_per_page=1' );
472
+ if ( have_posts() ) {
473
+ the_post();
474
+ }
475
+ }
476
+ }
477
+
478
+ require_once( AIOSEOP_PLUGIN_DIR . 'aioseop-init.php' );
479
+
480
+ if ( ! function_exists( 'aioseop_install' ) ) {
481
+ register_activation_hook( __FILE__, 'aioseop_install' );
482
+
483
+ function aioseop_install() {
484
+ aioseop_activate();
485
+ }
486
+ }
487
+
488
+ if ( ! function_exists( 'disable_all_in_one_free' ) ) {
489
+ function disable_all_in_one_free() {
490
+ if ( AIOSEOPPRO && is_plugin_active( 'all-in-one-seo-pack/all_in_one_seo_pack.php' ) ) {
491
+ deactivate_plugins( 'all-in-one-seo-pack/all_in_one_seo_pack.php' );
492
+ }
493
+ }
494
+ }
css/aiosp_admin.css CHANGED
@@ -74,3 +74,22 @@
74
  background-size: 32px 32px !important;
75
  }
76
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
css/modules/aioseop_module.css CHANGED
@@ -501,7 +501,7 @@ div.aioseop_feature {
501
  -moz-transition-duration: .4s;
502
  }
503
 
504
- .aioseop_feature #free-flag {
505
  float: right;
506
  margin-right: -7px;
507
  background: none repeat scroll 0 0 #D23D46;
@@ -510,27 +510,41 @@ div.aioseop_feature {
510
  position: relative;
511
  }
512
 
513
- .aioseop_feature #free-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 #free-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_coming_soon #free-flag {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
534
  display: none;
535
  }
536
 
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;
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
 
css/welcome.css ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
47
+
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
+
72
+ /*
73
+ * Welcome Panel
74
+ */
75
+ #welcome-panel > p {
76
+ margin-left: 15px;
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 {
87
+ margin-right: 0;
88
+ }
89
+
90
+ .welcome-panel-column p.aioseop-message {
91
+ width: 70%;
92
+ display: inline-block;
93
+ vertical-align: top;
94
+ }
95
+
96
+ .welcome-panel-column p.call-to-action {
97
+ display: inline-block;
98
+ width: 25%;
99
+ vertical-align: top;
100
+ margin-left: 3%;
101
+ margin-top: 13px;
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 {
115
+ margin-left: 20px;
116
+ }
117
+
118
+ .welcome-panel-column ul li {
119
+ margin-bottom: 12px;
120
+ list-style-type: square;
121
+ }
122
+
123
+ @media screen and (max-width: 850px) {
124
+ .welcome-panel-column {
125
+ width: 100%;
126
+ margin-right: 0;
127
+ display: block;
128
+ }
129
+ }
i18n/all-in-one-seo-pack-af.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ar.mo ADDED
Binary file
i18n/all-in-one-seo-pack-ary.mo ADDED
Binary file
i18n/all-in-one-seo-pack-bg_BG.mo ADDED
Binary file
i18n/all-in-one-seo-pack-ca.mo ADDED
Binary file
i18n/all-in-one-seo-pack-de_DE.mo ADDED
Binary file
i18n/all-in-one-seo-pack-en_AU.mo ADDED
Binary file
i18n/all-in-one-seo-pack-en_CA.mo ADDED
Binary file
i18n/all-in-one-seo-pack-en_GB.mo ADDED
Binary file
i18n/all-in-one-seo-pack-en_NZ.mo ADDED
Binary file
i18n/all-in-one-seo-pack-fa_IR.mo ADDED
Binary file
i18n/all-in-one-seo-pack-fi.mo ADDED
Binary file
i18n/all-in-one-seo-pack-fr_BE.mo DELETED
Binary file
i18n/all-in-one-seo-pack-hi_IN.mo ADDED
Binary file
i18n/all-in-one-seo-pack-hr.mo ADDED
Binary file
i18n/all-in-one-seo-pack-hu_HU.mo ADDED
Binary file
i18n/all-in-one-seo-pack-it_IT.mo ADDED
Binary file
i18n/all-in-one-seo-pack-ko_KR.mo ADDED
Binary file
i18n/all-in-one-seo-pack-nb_NO.mo ADDED
Binary file
i18n/all-in-one-seo-pack-nl_NL.mo ADDED
Binary file
i18n/all-in-one-seo-pack-nn_NO.mo ADDED
Binary file
i18n/all-in-one-seo-pack-pl_PL.mo ADDED
Binary file
i18n/all-in-one-seo-pack-pt_BR.mo ADDED
Binary file
i18n/all-in-one-seo-pack-pt_PT.mo ADDED
Binary file
i18n/all-in-one-seo-pack-ro_RO.mo ADDED
Binary file
i18n/all-in-one-seo-pack-ru_RU.mo ADDED
Binary file
i18n/all-in-one-seo-pack-sl_SL.mo ADDED
Binary file
i18n/all-in-one-seo-pack-sq.mo ADDED
Binary file
i18n/all-in-one-seo-pack-tr_TR.mo ADDED
Binary file
i18n/all-in-one-seo-pack-vi.mo ADDED
Binary file
i18n/all-in-one-seo-pack-zh_CN.mo ADDED
Binary file
inc/aioseop_functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * General functions file.
4
  *
5
  * We'll eventually move these to a better place, and figure out ones not being used anymore.
6
- *
7
  * @package All-in-One-SEO-Pack
8
  */
9
 
@@ -974,57 +974,6 @@ if ( ! function_exists( 'aioseop_array_insert_after' ) ) {
974
  }
975
  }
976
 
977
- if ( ! function_exists( 'aioseop_load_json_services' ) ) {
978
- /**
979
- * JSON support for PHP < 5.2.
980
- *
981
- * @TODO Do we really need to support < PHP 5.2 with the following functions??
982
- * @return null|Services_JSON
983
- */
984
- function aioseop_load_json_services() {
985
- static $services_json = null;
986
- if ( $services_json ) {
987
- return $services_json;
988
- }
989
- if ( ! class_exists( 'Services_JSON' ) ) {
990
- require_once( 'inc/extlib/JSON.php' );
991
- }
992
- if ( ! $services_json ) {
993
- $services_json = new Services_JSON();
994
- }
995
-
996
- return $services_json;
997
- }
998
- }
999
-
1000
- if ( ! function_exists( 'json_encode' ) ) {
1001
-
1002
- /**
1003
- * @param $arg
1004
- *
1005
- * @return mixed
1006
- */
1007
- function json_encode( $arg ) {
1008
- $services_json = aioseop_load_json_services();
1009
-
1010
- return $services_json->encode( $arg );
1011
- }
1012
- }
1013
-
1014
- if ( ! function_exists( 'json_decode' ) ) {
1015
-
1016
- /**
1017
- * @param $arg
1018
- *
1019
- * @return mixed
1020
- */
1021
- function json_decode( $arg ) {
1022
- $services_json = aioseop_load_json_services();
1023
-
1024
- return $services_json->decode( $arg );
1025
- }
1026
- }
1027
-
1028
  if ( ! function_exists( 'fnmatch' ) ) {
1029
  /**
1030
  * Support for fnmatch() doesn't exist on Windows pre PHP 5.3.
3
  * General functions file.
4
  *
5
  * We'll eventually move these to a better place, and figure out ones not being used anymore.
6
+ *
7
  * @package All-in-One-SEO-Pack
8
  */
9
 
974
  }
975
  }
976
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
977
  if ( ! function_exists( 'fnmatch' ) ) {
978
  /**
979
  * Support for fnmatch() doesn't exist on Windows pre PHP 5.3.
inc/aioseop_updates_class.php CHANGED
@@ -6,24 +6,22 @@
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
- * @version 1.0.0
12
  */
13
  class AIOSEOP_Updates {
14
 
15
  /**
16
  * Constructor
17
  *
18
- * @since 1.0.0
19
  */
20
  function __construct() {
 
21
  }
22
 
23
  /**
24
  * Updates version.
25
  *
26
- * @since 1.0.0
27
  * @global $aiosp , $aioseop_options.
28
  * @return null
29
  */
@@ -57,6 +55,12 @@ class AIOSEOP_Updates {
57
  $aioseop_options['last_active_version'] = AIOSEOP_VERSION;
58
  $aiosp->update_class_option( $aioseop_options );
59
  }
 
 
 
 
 
 
60
  }
61
 
62
  /**
@@ -66,14 +70,21 @@ class AIOSEOP_Updates {
66
  $this->do_feature_updates();
67
  }
68
 
 
 
 
 
 
 
 
 
69
 
70
  /**
71
  * Updates version.
72
  *
73
  * TODO: the compare here should be extracted into a function
74
  *
75
- * @since 1.0.0
76
- * @global $aioseop_options .
77
  *
78
  * @param String $old_version
79
  */
@@ -93,12 +104,19 @@ class AIOSEOP_Updates {
93
  $this->bad_bots_remove_yandex_201604();
94
  }
95
 
 
 
 
 
 
 
 
96
  }
97
 
98
  /**
99
  * Removes overzealous 'DOC' entry which is causing false-positive bad
100
  * bot blocking.
101
-
102
  * @since 2.3.3
103
  * @global $aiosp , $aioseop_options.
104
  */
@@ -181,9 +199,45 @@ class AIOSEOP_Updates {
181
  }
182
 
183
  /**
184
- * Updates features.
 
 
 
 
 
 
185
 
186
- * @since 1.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  * @return null
188
  *
189
  * if ( ! ( isset( $aioseop_options['version_feature_flags']['FEATURE_NAME'] ) &&
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
  */
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
+ set_transient( '_aioseop_activation_redirect', true, 30 ); // Sets 30 second transient for welcome screen redirect on activation.
61
+ }
62
+ add_action( 'admin_init', array( $this, 'aioseop_welcome' ) );
63
+
64
  }
65
 
66
  /**
70
  $this->do_feature_updates();
71
  }
72
 
73
+ function aioseop_welcome(){
74
+ if ( get_transient( '_aioseop_activation_redirect' ) ) {
75
+ $aioseop_welcome = new aioseop_welcome();
76
+ delete_transient( '_aioseop_activation_redirect' );
77
+ $aioseop_welcome->init();
78
+ }
79
+
80
+ }
81
 
82
  /**
83
  * Updates version.
84
  *
85
  * TODO: the compare here should be extracted into a function
86
  *
87
+ * @global $aioseop_options .
 
88
  *
89
  * @param String $old_version
90
  */
104
  $this->bad_bots_remove_yandex_201604();
105
  }
106
 
107
+ if (
108
+ ( ! AIOSEOPPRO && version_compare( $old_version, '2.3.9', '<' ) ) ||
109
+ ( AIOSEOPPRO && version_compare( $old_version, '2.4.9', '<' ) )
110
+ ) {
111
+ $this->bad_bots_remove_seznambot_201608();
112
+ }
113
+
114
  }
115
 
116
  /**
117
  * Removes overzealous 'DOC' entry which is causing false-positive bad
118
  * bot blocking.
119
+ *
120
  * @since 2.3.3
121
  * @global $aiosp , $aioseop_options.
122
  */
199
  }
200
 
201
  /**
202
+ * Remove 'SeznamBot' entry.
203
+ *
204
+ * @since 2.3.8
205
+ * @global $aiosp , $aioseop_options.
206
+ */
207
+ function bad_bots_remove_seznambot_201608() {
208
+ global $aiosp, $aioseop_options;
209
 
210
+ // Remove 'SeznamBot' from bad bots list to avoid false positives.
211
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
212
+ $list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
213
+ $list = str_replace( array(
214
+ "SeznamBot\r\n",
215
+ "SeznamBot\n",
216
+ ), '', $list );
217
+ $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
218
+ update_option( 'aioseop_options', $aioseop_options );
219
+ $aiosp->update_class_option( $aioseop_options );
220
+
221
+ if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) && 'on' === $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) {
222
+
223
+ if ( ! class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
224
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' );
225
+ require_once( AIOSEOP_PLUGIN_DIR . 'modules/aioseop_bad_robots.php' );
226
+ }
227
+
228
+ $aiosp_reset_htaccess = new All_in_One_SEO_Pack_Bad_Robots;
229
+ $aiosp_reset_htaccess->generate_htaccess_blocklist();
230
+ }
231
+
232
+ if ( ! isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) && extract_from_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker' ) ) {
233
+ insert_with_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker', '' );
234
+ }
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Updates features.
240
+ *
241
  * @return null
242
  *
243
  * if ( ! ( isset( $aioseop_options['version_feature_flags']['FEATURE_NAME'] ) &&
inc/aiosp_common.php CHANGED
@@ -52,7 +52,7 @@ class aiosp_common {
52
  *
53
  * @return string
54
  */
55
- static function get_upgrade_hyperlink( $location = '', $title = '', $anchor = '', $target = '', $class = '', $id = '' ) {
56
 
57
  $affiliate_id = '';
58
 
@@ -76,6 +76,10 @@ class aiosp_common {
76
  if ( $title ) {
77
  $hyperlink .= "title=\"$title\" ";
78
  }
 
 
 
 
79
  $hyperlink .= "href=\"$url\">$anchor</a>";
80
 
81
  return $hyperlink;
52
  *
53
  * @return string
54
  */
55
+ static function get_upgrade_hyperlink( $location = '', $title = '', $anchor = '', $target = '', $class = '', $id = 'aio-pro-update' ) {
56
 
57
  $affiliate_id = '';
58
 
76
  if ( $title ) {
77
  $hyperlink .= "title=\"$title\" ";
78
  }
79
+ if ( $id ) {
80
+ $hyperlink .= "id=\"$id\" ";
81
+ }
82
+
83
  $hyperlink .= "href=\"$url\">$anchor</a>";
84
 
85
  return $hyperlink;
inc/extlib/JSON.php DELETED
@@ -1,804 +0,0 @@
1
- <?php
2
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
-
4
- /**
5
- * Converts to and from JSON format.
6
- *
7
- * JSON (JavaScript Object Notation) is a lightweight data-interchange
8
- * format. It is easy for humans to read and write. It is easy for machines
9
- * to parse and generate. It is based on a subset of the JavaScript
10
- * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
11
- * This feature can also be found in Python. JSON is a text format that is
12
- * completely language independent but uses conventions that are familiar
13
- * to programmers of the C-family of languages, including C, C++, C#, Java,
14
- * JavaScript, Perl, TCL, and many others. These properties make JSON an
15
- * ideal data-interchange language.
16
- *
17
- * This package provides a simple encoder and decoder for JSON notation. It
18
- * is intended for use with client-side Javascript applications that make
19
- * use of HTTPRequest to perform server communication functions - data can
20
- * be encoded into JSON notation for use in a client-side javascript, or
21
- * decoded from incoming Javascript requests. JSON format is native to
22
- * Javascript, and can be directly eval()'ed with no further parsing
23
- * overhead
24
- *
25
- * All strings should be in ASCII or UTF-8 format!
26
- *
27
- * LICENSE: Redistribution and use in source and binary forms, with or
28
- * without modification, are permitted provided that the following
29
- * conditions are met: Redistributions of source code must retain the
30
- * above copyright notice, this list of conditions and the following
31
- * disclaimer. Redistributions in binary form must reproduce the above
32
- * copyright notice, this list of conditions and the following disclaimer
33
- * in the documentation and/or other materials provided with the
34
- * distribution.
35
- *
36
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
37
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
39
- * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
40
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
41
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
42
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
44
- * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
45
- * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
46
- * DAMAGE.
47
- *
48
- * @category
49
- * @package Services_JSON
50
- * @author Michal Migurski <mike-json@teczno.com>
51
- * @author Matt Knapp <mdknapp[at]gmail[dot]com>
52
- * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
53
- * @copyright 2005 Michal Migurski
54
- * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
55
- * @license http://www.opensource.org/licenses/bsd-license.php
56
- * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
57
- */
58
-
59
- /**
60
- * Marker constant for Services_JSON::decode(), used to flag stack state
61
- */
62
- define('SERVICES_JSON_SLICE', 1);
63
-
64
- /**
65
- * Marker constant for Services_JSON::decode(), used to flag stack state
66
- */
67
- define('SERVICES_JSON_IN_STR', 2);
68
-
69
- /**
70
- * Marker constant for Services_JSON::decode(), used to flag stack state
71
- */
72
- define('SERVICES_JSON_IN_ARR', 3);
73
-
74
- /**
75
- * Marker constant for Services_JSON::decode(), used to flag stack state
76
- */
77
- define('SERVICES_JSON_IN_OBJ', 4);
78
-
79
- /**
80
- * Marker constant for Services_JSON::decode(), used to flag stack state
81
- */
82
- define('SERVICES_JSON_IN_CMT', 5);
83
-
84
- /**
85
- * Behavior switch for Services_JSON::decode()
86
- */
87
- define('SERVICES_JSON_LOOSE_TYPE', 16);
88
-
89
- /**
90
- * Behavior switch for Services_JSON::decode()
91
- */
92
- define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
93
-
94
- /**
95
- * Converts to and from JSON format.
96
- *
97
- * Brief example of use:
98
- *
99
- * <code>
100
- * // create a new instance of Services_JSON
101
- * $json = new Services_JSON();
102
- *
103
- * // convert a complexe value to JSON notation, and send it to the browser
104
- * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
105
- * $output = $json->encode($value);
106
- *
107
- * print($output);
108
- * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
109
- *
110
- * // accept incoming POST data, assumed to be in JSON notation
111
- * $input = file_get_contents('php://input', 1000000);
112
- * $value = $json->decode($input);
113
- * </code>
114
- */
115
- class Services_JSON
116
- {
117
- /**
118
- * constructs a new JSON instance
119
- *
120
- * @param int $use object behavior flags; combine with boolean-OR
121
- *
122
- * possible values:
123
- * - SERVICES_JSON_LOOSE_TYPE: loose typing.
124
- * "{...}" syntax creates associative arrays
125
- * instead of objects in decode().
126
- * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
127
- * Values which can't be encoded (e.g. resources)
128
- * appear as NULL instead of throwing errors.
129
- * By default, a deeply-nested resource will
130
- * bubble up with an error, so all return values
131
- * from encode() should be checked with isError()
132
- */
133
- function Services_JSON($use = 0)
134
- {
135
- $this->use = $use;
136
- }
137
-
138
- /**
139
- * convert a string from one UTF-16 char to one UTF-8 char
140
- *
141
- * Normally should be handled by mb_convert_encoding, but
142
- * provides a slower PHP-only method for installations
143
- * that lack the multibye string extension.
144
- *
145
- * @param string $utf16 UTF-16 character
146
- * @return string UTF-8 character
147
- * @access private
148
- */
149
- function utf162utf8($utf16)
150
- {
151
- // oh please oh please oh please oh please oh please
152
- if(function_exists('mb_convert_encoding')) {
153
- return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
154
- }
155
-
156
- $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
157
-
158
- switch(true) {
159
- case ((0x7F & $bytes) == $bytes):
160
- // this case should never be reached, because we are in ASCII range
161
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
162
- return chr(0x7F & $bytes);
163
-
164
- case (0x07FF & $bytes) == $bytes:
165
- // return a 2-byte UTF-8 character
166
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
167
- return chr(0xC0 | (($bytes >> 6) & 0x1F))
168
- . chr(0x80 | ($bytes & 0x3F));
169
-
170
- case (0xFFFF & $bytes) == $bytes:
171
- // return a 3-byte UTF-8 character
172
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
173
- return chr(0xE0 | (($bytes >> 12) & 0x0F))
174
- . chr(0x80 | (($bytes >> 6) & 0x3F))
175
- . chr(0x80 | ($bytes & 0x3F));
176
- }
177
-
178
- // ignoring UTF-32 for now, sorry
179
- return '';
180
- }
181
-
182
- /**
183
- * convert a string from one UTF-8 char to one UTF-16 char
184
- *
185
- * Normally should be handled by mb_convert_encoding, but
186
- * provides a slower PHP-only method for installations
187
- * that lack the multibye string extension.
188
- *
189
- * @param string $utf8 UTF-8 character
190
- * @return string UTF-16 character
191
- * @access private
192
- */
193
- function utf82utf16($utf8)
194
- {
195
- // oh please oh please oh please oh please oh please
196
- if(function_exists('mb_convert_encoding')) {
197
- return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
198
- }
199
-
200
- switch(strlen($utf8)) {
201
- case 1:
202
- // this case should never be reached, because we are in ASCII range
203
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
204
- return $utf8;
205
-
206
- case 2:
207
- // return a UTF-16 character from a 2-byte UTF-8 char
208
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
209
- return chr(0x07 & (ord($utf8{0}) >> 2))
210
- . chr((0xC0 & (ord($utf8{0}) << 6))
211
- | (0x3F & ord($utf8{1})));
212
-
213
- case 3:
214
- // return a UTF-16 character from a 3-byte UTF-8 char
215
- // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
216
- return chr((0xF0 & (ord($utf8{0}) << 4))
217
- | (0x0F & (ord($utf8{1}) >> 2)))
218
- . chr((0xC0 & (ord($utf8{1}) << 6))
219
- | (0x7F & ord($utf8{2})));
220
- }
221
-
222
- // ignoring UTF-32 for now, sorry
223
- return '';
224
- }
225
-
226
- /**
227
- * encodes an arbitrary variable into JSON format
228
- *
229
- * @param mixed $var any number, boolean, string, array, or object to be encoded.
230
- * see argument 1 to Services_JSON() above for array-parsing behavior.
231
- * if var is a strng, note that encode() always expects it
232
- * to be in ASCII or UTF-8 format!
233
- *
234
- * @return mixed JSON string representation of input var or an error if a problem occurs
235
- * @access public
236
- */
237
- function encode($var)
238
- {
239
- switch (gettype($var)) {
240
- case 'boolean':
241
- return $var ? 'true' : 'false';
242
-
243
- case 'NULL':
244
- return 'null';
245
-
246
- case 'integer':
247
- return (int) $var;
248
-
249
- case 'double':
250
- case 'float':
251
- return (float) $var;
252
-
253
- case 'string':
254
- // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
255
- $ascii = '';
256
- $strlen_var = strlen($var);
257
-
258
- /*
259
- * Iterate over every character in the string,
260
- * escaping with a slash or encoding to UTF-8 where necessary
261
- */
262
- for ($c = 0; $c < $strlen_var; ++$c) {
263
-
264
- $ord_var_c = ord($var{$c});
265
-
266
- switch (true) {
267
- case $ord_var_c == 0x08:
268
- $ascii .= '\b';
269
- break;
270
- case $ord_var_c == 0x09:
271
- $ascii .= '\t';
272
- break;
273
- case $ord_var_c == 0x0A:
274
- $ascii .= '\n';
275
- break;
276
- case $ord_var_c == 0x0C:
277
- $ascii .= '\f';
278
- break;
279
- case $ord_var_c == 0x0D:
280
- $ascii .= '\r';
281
- break;
282
-
283
- case $ord_var_c == 0x22:
284
- case $ord_var_c == 0x2F:
285
- case $ord_var_c == 0x5C:
286
- // double quote, slash, slosh
287
- $ascii .= '\\'.$var{$c};
288
- break;
289
-
290
- case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
291
- // characters U-00000000 - U-0000007F (same as ASCII)
292
- $ascii .= $var{$c};
293
- break;
294
-
295
- case (($ord_var_c & 0xE0) == 0xC0):
296
- // characters U-00000080 - U-000007FF, mask 110XXXXX
297
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
298
- $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
299
- $c += 1;
300
- $utf16 = $this->utf82utf16($char);
301
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
302
- break;
303
-
304
- case (($ord_var_c & 0xF0) == 0xE0):
305
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
306
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
307
- $char = pack('C*', $ord_var_c,
308
- ord($var{$c + 1}),
309
- ord($var{$c + 2}));
310
- $c += 2;
311
- $utf16 = $this->utf82utf16($char);
312
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
313
- break;
314
-
315
- case (($ord_var_c & 0xF8) == 0xF0):
316
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
317
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
318
- $char = pack('C*', $ord_var_c,
319
- ord($var{$c + 1}),
320
- ord($var{$c + 2}),
321
- ord($var{$c + 3}));
322
- $c += 3;
323
- $utf16 = $this->utf82utf16($char);
324
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
325
- break;
326
-
327
- case (($ord_var_c & 0xFC) == 0xF8):
328
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
329
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
330
- $char = pack('C*', $ord_var_c,
331
- ord($var{$c + 1}),
332
- ord($var{$c + 2}),
333
- ord($var{$c + 3}),
334
- ord($var{$c + 4}));
335
- $c += 4;
336
- $utf16 = $this->utf82utf16($char);
337
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
338
- break;
339
-
340
- case (($ord_var_c & 0xFE) == 0xFC):
341
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
342
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
343
- $char = pack('C*', $ord_var_c,
344
- ord($var{$c + 1}),
345
- ord($var{$c + 2}),
346
- ord($var{$c + 3}),
347
- ord($var{$c + 4}),
348
- ord($var{$c + 5}));
349
- $c += 5;
350
- $utf16 = $this->utf82utf16($char);
351
- $ascii .= sprintf('\u%04s', bin2hex($utf16));
352
- break;
353
- }
354
- }
355
-
356
- return '"'.$ascii.'"';
357
-
358
- case 'array':
359
- /*
360
- * As per JSON spec if any array key is not an integer
361
- * we must treat the the whole array as an object. We
362
- * also try to catch a sparsely populated associative
363
- * array with numeric keys here because some JS engines
364
- * will create an array with empty indexes up to
365
- * max_index which can cause memory issues and because
366
- * the keys, which may be relevant, will be remapped
367
- * otherwise.
368
- *
369
- * As per the ECMA and JSON specification an object may
370
- * have any string as a property. Unfortunately due to
371
- * a hole in the ECMA specification if the key is a
372
- * ECMA reserved word or starts with a digit the
373
- * parameter is only accessible using ECMAScript's
374
- * bracket notation.
375
- */
376
-
377
- // treat as a JSON object
378
- if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
379
- $properties = array_map(array($this, 'name_value'),
380
- array_keys($var),
381
- array_values($var));
382
-
383
- foreach($properties as $property) {
384
- if(Services_JSON::isError($property)) {
385
- return $property;
386
- }
387
- }
388
-
389
- return '{' . join(',', $properties) . '}';
390
- }
391
-
392
- // treat it like a regular array
393
- $elements = array_map(array($this, 'encode'), $var);
394
-
395
- foreach($elements as $element) {
396
- if(Services_JSON::isError($element)) {
397
- return $element;
398
- }
399
- }
400
-
401
- return '[' . join(',', $elements) . ']';
402
-
403
- case 'object':
404
- $vars = get_object_vars($var);
405
-
406
- $properties = array_map(array($this, 'name_value'),
407
- array_keys($vars),
408
- array_values($vars));
409
-
410
- foreach($properties as $property) {
411
- if(Services_JSON::isError($property)) {
412
- return $property;
413
- }
414
- }
415
-
416
- return '{' . join(',', $properties) . '}';
417
-
418
- default:
419
- return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
420
- ? 'null'
421
- : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
422
- }
423
- }
424
-
425
- /**
426
- * array-walking function for use in generating JSON-formatted name-value pairs
427
- *
428
- * @param string $name name of key to use
429
- * @param mixed $value reference to an array element to be encoded
430
- *
431
- * @return string JSON-formatted name-value pair, like '"name":value'
432
- * @access private
433
- */
434
- function name_value($name, $value)
435
- {
436
- $encoded_value = $this->encode($value);
437
-
438
- if(Services_JSON::isError($encoded_value)) {
439
- return $encoded_value;
440
- }
441
-
442
- return $this->encode(strval($name)) . ':' . $encoded_value;
443
- }
444
-
445
- /**
446
- * reduce a string by removing leading and trailing comments and whitespace
447
- *
448
- * @param $str string string value to strip of comments and whitespace
449
- *
450
- * @return string string value stripped of comments and whitespace
451
- * @access private
452
- */
453
- function reduce_string($str)
454
- {
455
- $str = preg_replace(array(
456
-
457
- // eliminate single line comments in '// ...' form
458
- '#^\s*//(.+)$#m',
459
-
460
- // eliminate multi-line comments in '/* ... */' form, at start of string
461
- '#^\s*/\*(.+)\*/#Us',
462
-
463
- // eliminate multi-line comments in '/* ... */' form, at end of string
464
- '#/\*(.+)\*/\s*$#Us'
465
-
466
- ), '', $str);
467
-
468
- // eliminate extraneous space
469
- return trim($str);
470
- }
471
-
472
- /**
473
- * decodes a JSON string into appropriate variable
474
- *
475
- * @param string $str JSON-formatted string
476
- *
477
- * @return mixed number, boolean, string, array, or object
478
- * corresponding to given JSON input string.
479
- * See argument 1 to Services_JSON() above for object-output behavior.
480
- * Note that decode() always returns strings
481
- * in ASCII or UTF-8 format!
482
- * @access public
483
- */
484
- function decode($str)
485
- {
486
- $str = $this->reduce_string($str);
487
-
488
- switch (strtolower($str)) {
489
- case 'true':
490
- return true;
491
-
492
- case 'false':
493
- return false;
494
-
495
- case 'null':
496
- return null;
497
-
498
- default:
499
- $m = array();
500
-
501
- if (is_numeric($str)) {
502
- // Lookie-loo, it's a number
503
-
504
- // This would work on its own, but I'm trying to be
505
- // good about returning integers where appropriate:
506
- // return (float)$str;
507
-
508
- // Return float or int, as appropriate
509
- return ((float)$str == (integer)$str)
510
- ? (integer)$str
511
- : (float)$str;
512
-
513
- } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
514
- // STRINGS RETURNED IN UTF-8 FORMAT
515
- $delim = substr($str, 0, 1);
516
- $chrs = substr($str, 1, -1);
517
- $utf8 = '';
518
- $strlen_chrs = strlen($chrs);
519
-
520
- for ($c = 0; $c < $strlen_chrs; ++$c) {
521
-
522
- $substr_chrs_c_2 = substr($chrs, $c, 2);
523
- $ord_chrs_c = ord($chrs{$c});
524
-
525
- switch (true) {
526
- case $substr_chrs_c_2 == '\b':
527
- $utf8 .= chr(0x08);
528
- ++$c;
529
- break;
530
- case $substr_chrs_c_2 == '\t':
531
- $utf8 .= chr(0x09);
532
- ++$c;
533
- break;
534
- case $substr_chrs_c_2 == '\n':
535
- $utf8 .= chr(0x0A);
536
- ++$c;
537
- break;
538
- case $substr_chrs_c_2 == '\f':
539
- $utf8 .= chr(0x0C);
540
- ++$c;
541
- break;
542
- case $substr_chrs_c_2 == '\r':
543
- $utf8 .= chr(0x0D);
544
- ++$c;
545
- break;
546
-
547
- case $substr_chrs_c_2 == '\\"':
548
- case $substr_chrs_c_2 == '\\\'':
549
- case $substr_chrs_c_2 == '\\\\':
550
- case $substr_chrs_c_2 == '\\/':
551
- if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
552
- ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
553
- $utf8 .= $chrs{++$c};
554
- }
555
- break;
556
-
557
- case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
558
- // single, escaped unicode character
559
- $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
560
- . chr(hexdec(substr($chrs, ($c + 4), 2)));
561
- $utf8 .= $this->utf162utf8($utf16);
562
- $c += 5;
563
- break;
564
-
565
- case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
566
- $utf8 .= $chrs{$c};
567
- break;
568
-
569
- case ($ord_chrs_c & 0xE0) == 0xC0:
570
- // characters U-00000080 - U-000007FF, mask 110XXXXX
571
- //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
572
- $utf8 .= substr($chrs, $c, 2);
573
- ++$c;
574
- break;
575
-
576
- case ($ord_chrs_c & 0xF0) == 0xE0:
577
- // characters U-00000800 - U-0000FFFF, mask 1110XXXX
578
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
579
- $utf8 .= substr($chrs, $c, 3);
580
- $c += 2;
581
- break;
582
-
583
- case ($ord_chrs_c & 0xF8) == 0xF0:
584
- // characters U-00010000 - U-001FFFFF, mask 11110XXX
585
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
586
- $utf8 .= substr($chrs, $c, 4);
587
- $c += 3;
588
- break;
589
-
590
- case ($ord_chrs_c & 0xFC) == 0xF8:
591
- // characters U-00200000 - U-03FFFFFF, mask 111110XX
592
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
593
- $utf8 .= substr($chrs, $c, 5);
594
- $c += 4;
595
- break;
596
-
597
- case ($ord_chrs_c & 0xFE) == 0xFC:
598
- // characters U-04000000 - U-7FFFFFFF, mask 1111110X
599
- // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
600
- $utf8 .= substr($chrs, $c, 6);
601
- $c += 5;
602
- break;
603
-
604
- }
605
-
606
- }
607
-
608
- return $utf8;
609
-
610
- } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
611
- // array, or object notation
612
-
613
- if ($str{0} == '[') {
614
- $stk = array(SERVICES_JSON_IN_ARR);
615
- $arr = array();
616
- } else {
617
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
618
- $stk = array(SERVICES_JSON_IN_OBJ);
619
- $obj = array();
620
- } else {
621
- $stk = array(SERVICES_JSON_IN_OBJ);
622
- $obj = new stdClass();
623
- }
624
- }
625
-
626
- array_push($stk, array('what' => SERVICES_JSON_SLICE,
627
- 'where' => 0,
628
- 'delim' => false));
629
-
630
- $chrs = substr($str, 1, -1);
631
- $chrs = $this->reduce_string($chrs);
632
-
633
- if ($chrs == '') {
634
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
635
- return $arr;
636
-
637
- } else {
638
- return $obj;
639
-
640
- }
641
- }
642
-
643
- //print("\nparsing {$chrs}\n");
644
-
645
- $strlen_chrs = strlen($chrs);
646
-
647
- for ($c = 0; $c <= $strlen_chrs; ++$c) {
648
-
649
- $top = end($stk);
650
- $substr_chrs_c_2 = substr($chrs, $c, 2);
651
-
652
- if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
653
- // found a comma that is not inside a string, array, etc.,
654
- // OR we've reached the end of the character list
655
- $slice = substr($chrs, $top['where'], ($c - $top['where']));
656
- array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
657
- //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
658
-
659
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
660
- // we are in an array, so just push an element onto the stack
661
- array_push($arr, $this->decode($slice));
662
-
663
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
664
- // we are in an object, so figure
665
- // out the property name and set an
666
- // element in an associative array,
667
- // for now
668
- $parts = array();
669
-
670
- if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
671
- // "name":value pair
672
- $key = $this->decode($parts[1]);
673
- $val = $this->decode($parts[2]);
674
-
675
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
676
- $obj[$key] = $val;
677
- } else {
678
- $obj->$key = $val;
679
- }
680
- } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
681
- // name:value pair, where name is unquoted
682
- $key = $parts[1];
683
- $val = $this->decode($parts[2]);
684
-
685
- if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
686
- $obj[$key] = $val;
687
- } else {
688
- $obj->$key = $val;
689
- }
690
- }
691
-
692
- }
693
-
694
- } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
695
- // found a quote, and we are not inside a string
696
- array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
697
- //print("Found start of string at {$c}\n");
698
-
699
- } elseif (($chrs{$c} == $top['delim']) &&
700
- ($top['what'] == SERVICES_JSON_IN_STR) &&
701
- ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
702
- // found a quote, we're in a string, and it's not escaped
703
- // we know that it's not escaped becase there is _not_ an
704
- // odd number of backslashes at the end of the string so far
705
- array_pop($stk);
706
- //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
707
-
708
- } elseif (($chrs{$c} == '[') &&
709
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
710
- // found a left-bracket, and we are in an array, object, or slice
711
- array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
712
- //print("Found start of array at {$c}\n");
713
-
714
- } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
715
- // found a right-bracket, and we're in an array
716
- array_pop($stk);
717
- //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
718
-
719
- } elseif (($chrs{$c} == '{') &&
720
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
721
- // found a left-brace, and we are in an array, object, or slice
722
- array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
723
- //print("Found start of object at {$c}\n");
724
-
725
- } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
726
- // found a right-brace, and we're in an object
727
- array_pop($stk);
728
- //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
729
-
730
- } elseif (($substr_chrs_c_2 == '/*') &&
731
- in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
732
- // found a comment start, and we are in an array, object, or slice
733
- array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
734
- $c++;
735
- //print("Found start of comment at {$c}\n");
736
-
737
- } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
738
- // found a comment end, and we're in one now
739
- array_pop($stk);
740
- $c++;
741
-
742
- for ($i = $top['where']; $i <= $c; ++$i)
743
- $chrs = substr_replace($chrs, ' ', $i, 1);
744
-
745
- //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
746
-
747
- }
748
-
749
- }
750
-
751
- if (reset($stk) == SERVICES_JSON_IN_ARR) {
752
- return $arr;
753
-
754
- } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
755
- return $obj;
756
-
757
- }
758
-
759
- }
760
- }
761
- }
762
-
763
- /**
764
- * @todo Ultimately, this should just call PEAR::isError()
765
- */
766
- function isError($data, $code = null)
767
- {
768
- if (class_exists('pear')) {
769
- return PEAR::isError($data, $code);
770
- } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
771
- is_subclass_of($data, 'services_json_error'))) {
772
- return true;
773
- }
774
-
775
- return false;
776
- }
777
- }
778
-
779
- if (class_exists('PEAR_Error')) {
780
-
781
- class Services_JSON_Error extends PEAR_Error
782
- {
783
- function Services_JSON_Error($message = 'unknown error', $code = null,
784
- $mode = null, $options = null, $userinfo = null)
785
- {
786
- parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
787
- }
788
- }
789
-
790
- } else {
791
-
792
- /**
793
- * @todo Ultimately, this class shall be descended from PEAR_Error
794
- */
795
- class Services_JSON_Error
796
- {
797
- function Services_JSON_Error($message = 'unknown error', $code = null,
798
- $mode = null, $options = null, $userinfo = null)
799
- {
800
-
801
- }
802
- }
803
-
804
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/welcome.js ADDED
@@ -0,0 +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 );
modules/aioseop_feature_manager.php CHANGED
@@ -185,7 +185,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
185
  $args['attr'] .= " id='{$args['options']['id']}'";
186
  }
187
 
188
- return $buf . "<div {$args['attr']}><label for='{$args['name']}'><div id='free-flag'>FREE</div>{$name}{$img}{$desc}{$checkbox}</label></div>";
189
  }
190
  }
191
  }
185
  $args['attr'] .= " id='{$args['options']['id']}'";
186
  }
187
 
188
+ return $buf . "<div {$args['attr']}><label for='{$args['name']}'><div class='free flag'>FREE</div><div class='pro flag'>PRO</div>{$name}{$img}{$desc}{$checkbox}</label></div>";
189
  }
190
  }
191
  }
modules/aioseop_opengraph.php CHANGED
@@ -17,26 +17,26 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
17
  $this->fb_object_types = Array(
18
  'Activities' => Array(
19
  'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
20
- 'sport' => __( 'Sport', 'all-in-one-seo-pack' )
21
  ),
22
  'Businesses' => Array(
23
  'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
24
  'company' => __( 'Company', 'all-in-one-seo-pack' ),
25
  'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
26
  'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
27
- 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' )
28
  ),
29
  'Groups' => Array(
30
  'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
31
  'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
32
- 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' )
33
  ),
34
  'Organizations' => Array(
35
  'band' => __( 'Band', 'all-in-one-seo-pack' ),
36
  'government' => __( 'Government', 'all-in-one-seo-pack' ),
37
  'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
38
  'school' => __( 'School', 'all-in-one-seo-pack' ),
39
- 'university' => __( 'University', 'all-in-one-seo-pack' )
40
  ),
41
  'People' => Array(
42
  'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
@@ -46,13 +46,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
46
  'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
47
  'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
48
  'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
49
- 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' )
50
  ),
51
  'Places' => Array(
52
  'city' => __( 'City', 'all-in-one-seo-pack' ),
53
  'country' => __( 'Country', 'all-in-one-seo-pack' ),
54
  'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
55
- 'state_province' => __( 'State Province', 'all-in-one-seo-pack' )
56
  ),
57
  'Products and Entertainment' => Array(
58
  'album' => __( 'Album', 'all-in-one-seo-pack' ),
@@ -64,20 +64,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
64
  'product' => __( 'Product', 'all-in-one-seo-pack' ),
65
  'song' => __( 'Song', 'all-in-one-seo-pack' ),
66
  'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
67
- 'episode' => __( 'Episode', 'all-in-one-seo-pack' )
68
  ),
69
  'Websites' => Array(
70
  'article' => __( 'Article', 'all-in-one-seo-pack' ),
71
  'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
72
- 'website' => __( 'Website', 'all-in-one-seo-pack' )
73
- )
74
  );
75
  parent::__construct();
76
 
77
  $categories = Array(
78
  'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
79
  'website' => __( 'Website', 'all-in-one-seo-pack' ),
80
- 'article' => __( 'Article', 'all-in-one-seo-pack' )
81
  );
82
 
83
  $this->help_text = Array(
@@ -111,6 +111,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
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
  "gen_tags" => __( "Automatically generate article tags for Facebook type article when not provided.", 'all-in-one-seo-pack' ),
115
  "gen_keywords" => __( "Use keywords in generated article tags.", 'all-in-one-seo-pack' ),
116
  "gen_categories" => __( "Use catergories in generated article tags.", 'all-in-one-seo-pack' ),
@@ -126,23 +127,35 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
126
  "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' ),
127
  "person_or_org" => __( "Are the social profile links for your website for a person or an organization?", 'all-in-one-seo-pack' ),
128
  "profile_links" => __( "Add URLs for your website's social profiles here (Facebook, Twitter, Google+, Instagram, LinkedIn), one per line.", 'all-in-one-seo-pack' ),
129
- "social_name" => __( "Add the name of the person or organization who owns these profiles.", 'all-in-one-seo-pack' )
130
  );
131
 
132
  $this->help_anchors = Array(
 
 
133
  'generate_descriptions' => '#auto-generate-og-descriptions',
134
  'setmeta' => '#use-aioseo-title-and-description',
135
  'sitename' => '#site-name',
136
  'hometitle' => '#home-title-and-description',
137
  'description' => '#home-title-and-description',
138
  'homeimage' => '#home-image',
 
139
  'defimg' => '#select-og-image-source',
140
  'fallback' => '#use-default-if-no-image-found',
141
  'dimg' => '#default-og-image',
 
 
142
  'meta_key' => '#use-custom-field-for-image',
 
 
 
143
  'key' => '#facebook-admin-id',
144
  'appid' => '#facebook-app-id',
145
  'categories' => '#facebook-object-type',
 
 
 
 
146
  'facebook_publisher' => '#show-facebook-publisher-on-articles',
147
  'facebook_author' => '#show-facebook-author-on-articles',
148
  'types' => '#enable-facebook-meta-for',
@@ -151,7 +164,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
151
  'twitter_site' => '#twitter-site',
152
  'twitter_creator' => '#show-twitter-author',
153
  'twitter_domain' => '#twitter-domain',
154
- 'scan_header' => '#scan-social-meta'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  );
156
 
157
  $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all-in-one-seo-pack' );
@@ -159,28 +187,28 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
159
  'scan_header' => Array(
160
  'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
161
  'type' => 'custom',
162
- 'save' => true
163
  ),
164
  'setmeta' => Array(
165
  'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
166
- 'type' => 'checkbox'
167
  ),
168
  'key' => Array(
169
  'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
170
  'default' => '',
171
- 'type' => 'text'
172
  ),
173
  'appid' => Array(
174
  'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
175
  'default' => '',
176
- 'type' => 'text'
177
  ),
178
  'title_shortcodes' => Array( 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ) ),
179
  'description_shortcodes' => Array( 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ) ),
180
  'sitename' => Array(
181
  'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
182
  'default' => get_bloginfo( 'name' ),
183
- 'type' => 'text'
184
  ),
185
  'hometitle' => Array(
186
  'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
@@ -190,9 +218,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
190
  'aiosp_opengraph_setmeta' => Array(
191
  'lhs' => "aiosp_opengraph_setmeta",
192
  'op' => '!=',
193
- 'rhs' => 'on'
194
- )
195
- )
196
  ),
197
  'description' => Array(
198
  'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
@@ -202,23 +230,23 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
202
  'aiosp_opengraph_setmeta' => Array(
203
  'lhs' => "aiosp_opengraph_setmeta",
204
  'op' => '!=',
205
- 'rhs' => 'on'
206
- )
207
- )
208
  ),
209
  'homeimage' => Array(
210
  'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
211
- 'type' => 'image'
212
  ),
213
  'hometag' => Array(
214
  'name' => __( 'Home Article Tags', 'all-in-one-seo-pack' ),
215
  'type' => 'text',
216
  'default' => '',
217
- 'condshow' => Array( 'aiosp_opengraph_categories' => 'article' )
218
  ),
219
  'generate_descriptions' => Array(
220
  'name' => __( 'Autogenerate OG Descriptions', 'all-in-one-seo-pack' ),
221
- 'default' => 1
222
  ),
223
  'defimg' => Array(
224
  'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
@@ -230,61 +258,61 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
230
  'content' => __( 'First Image In Content' ),
231
  'custom' => __( 'Image From Custom Field' ),
232
  'author' => __( 'Post Author Image' ),
233
- 'auto' => __( 'First Available Image' )
234
- )
235
  ),
236
  'fallback' => Array(
237
  'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
238
- 'type' => 'checkbox'
239
  ),
240
  'dimg' => Array(
241
  'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
242
  'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
243
- 'type' => 'image'
244
  ),
245
  'dimgwidth' => Array(
246
  'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
247
  'type' => 'text',
248
- 'default' => ''
249
  ),
250
  'dimgheight' => Array(
251
  'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
252
  'type' => 'text',
253
- 'default' => ''
254
  ),
255
  'meta_key' => Array(
256
  'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
257
  'type' => 'text',
258
- 'default' => ''
259
  ),
260
  'categories' => Array(
261
  'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
262
  'type' => 'radio',
263
  'initial_options' => $categories,
264
- 'default' => 'blog'
265
  ),
266
  'image' => Array(
267
  'name' => __( 'Image', 'all-in-one-seo-pack' ),
268
  'type' => 'radio',
269
- 'initial_options' => Array( 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">' )
270
  ),
271
  'customimg' => Array(
272
  'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
273
- 'type' => 'image'
274
  ),
275
  'imagewidth' => Array(
276
  'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
277
  'type' => 'text',
278
- 'default' => ''
279
  ),
280
  'imageheight' => Array(
281
  'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
282
  'type' => 'text',
283
- 'default' => ''
284
  ),
285
  'video' => Array(
286
  'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
287
- 'type' => 'text'
288
  ),
289
  'videowidth' => Array(
290
  'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
@@ -294,9 +322,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
294
  'aioseop_opengraph_settings_video' => Array(
295
  'lhs' => "aioseop_opengraph_settings_video",
296
  'op' => '!=',
297
- 'rhs' => ''
298
- )
299
- )
300
  ),
301
  'videoheight' => Array(
302
  'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
@@ -306,9 +334,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
306
  'aioseop_opengraph_settings_video' => Array(
307
  'lhs' => "aioseop_opengraph_settings_video",
308
  'op' => '!=',
309
- 'rhs' => ''
310
- )
311
- )
312
  ),
313
  'defcard' => Array(
314
  'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
@@ -318,7 +346,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
318
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' )
319
  /*, *******REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE****** 'photo' => __( 'Photo', 'all-in-one-seo-pack' ) */
320
  ),
321
- 'default' => 'summary'
322
  ),
323
  'setcard' => Array(
324
  'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
@@ -327,40 +355,44 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
327
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
328
  'summary' => __( 'Summary', 'all-in-one-seo-pack' )
329
  /*, *******REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE****** 'photo' => __( 'Photo', 'all-in-one-seo-pack' ) */
330
- )
331
  ),
332
  'twitter_site' => Array(
333
  'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
334
  'type' => 'text',
335
- 'default' => ''
336
  ),
337
  'twitter_creator' => Array( 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' ) ),
338
  'twitter_domain' => Array(
339
  'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
340
  'type' => 'text',
341
- 'default' => ''
 
 
 
 
342
  ),
343
  'gen_tags' => Array( 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' ) ),
344
  'gen_keywords' => Array(
345
  'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
346
  'default' => 'on',
347
- 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' )
348
  ),
349
  'gen_categories' => Array(
350
  'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
351
  'default' => 'on',
352
- 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' )
353
  ),
354
  'gen_post_tags' => Array(
355
  'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
356
  'default' => 'on',
357
- 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' )
358
  ),
359
  'types' => Array(
360
  'name' => __( 'Enable Facebook Meta for', 'all-in-one-seo-pack' ),
361
  'type' => 'multicheckbox',
362
  'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
363
- 'default' => Array( 'post' => 'post', 'page' => 'page' )
364
  ),
365
  'title' => Array(
366
  'name' => __( 'Title', 'all-in-one-seo-pack' ),
@@ -368,7 +400,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
368
  'type' => 'text',
369
  'size' => 95,
370
  'count' => 1,
371
- 'count_desc' => $count_desc
372
  ),
373
  'desc' => Array(
374
  'name' => __( 'Description', 'all-in-one-seo-pack' ),
@@ -377,14 +409,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
377
  'cols' => 250,
378
  'rows' => 4,
379
  'count' => 1,
380
- 'count_desc' => $count_desc
381
  ),
382
  'category' => Array(
383
  'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
384
  'type' => 'select',
385
  'style' => '',
386
  'initial_options' => $this->fb_object_types,
387
- 'default' => ''
388
  ),
389
  'facebook_debug' => Array(
390
  'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
@@ -403,45 +435,45 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
403
  });
404
  </script>
405
  <a name="aioseop_opengraph_settings_facebook_debug" id="aioseop_opengraph_settings_facebook_debug" class="button-primary" href="" target=_blank>' . __( 'Debug This Post', 'all-in-one-seo-pack' )
406
- . '</a>'
407
  ),
408
 
409
  'section' => Array(
410
  'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
411
  'type' => 'text',
412
  'default' => '',
413
- 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' )
414
  ),
415
  'tag' => Array(
416
  'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
417
  'type' => 'text',
418
  'default' => '',
419
- 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' )
420
  ),
421
  'facebook_publisher' => Array(
422
  'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
423
  'type' => 'text',
424
- 'default' => ''
425
  ),
426
  'facebook_author' => Array( 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ) ),
427
  'profile_links' => Array(
428
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
429
  'type' => 'textarea',
430
  'cols' => 60,
431
- 'rows' => 5
432
  ),
433
  'person_or_org' => Array(
434
  'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
435
  'type' => 'radio',
436
  'initial_options' => Array(
437
  'person' => __( 'Person', 'all-in-one-seo-pack' ),
438
- 'org' => __( 'Organization', 'all-in-one-seo-pack' )
439
- )
440
  ),
441
  'social_name' => Array(
442
  'name' => __( "Associated Name", 'all-in-one-seo-pack' ),
443
  'type' => 'text',
444
- 'default' => ""
445
  ),
446
  );
447
 
@@ -491,13 +523,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
491
  'gen_post_tags',
492
  'types',
493
  'facebook_publisher',
494
- 'facebook_author'
495
- )
496
  ),
497
  'settings' => Array(
498
  'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
499
  'type' => 'metabox',
500
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#pagepost_settings',
501
  'options' => Array(
502
  'title',
503
  'desc',
@@ -512,11 +544,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
512
  'facebook_debug',
513
  'section',
514
  'tag',
515
- 'setcard'
 
516
  ),
517
  'display' => $display,
518
- 'prefix' => 'aioseop_opengraph_'
519
- )
520
  );
521
 
522
  $this->layout = Array(
@@ -527,22 +560,22 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
527
  ),
528
  'home' => Array(
529
  'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
530
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
531
- 'options' => Array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag' )
532
  ),
533
  'image' => Array(
534
  'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
535
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
536
- 'options' => Array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' )
537
  ),
538
  'links' => Array(
539
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
540
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
541
- 'options' => Array( 'profile_links', 'person_or_org', 'social_name' )
542
  ),
543
  'facebook' => Array(
544
  'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
545
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
546
  'options' => Array(
547
  'key',
548
  'appid',
@@ -553,19 +586,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
553
  'gen_post_tags',
554
  'categories',
555
  'facebook_publisher',
556
- 'facebook_author'
557
- )
558
  ),
559
  'twitter' => Array(
560
  'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
561
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
562
- 'options' => Array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' )
563
  ),
564
  'scan_meta' => Array(
565
  'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
566
  'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#scan_meta',
567
- 'options' => Array( 'scan_header' )
568
- )
569
  );
570
 
571
  $other_options = Array();
@@ -654,7 +687,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
654
  }
655
  $settings[ $prefix . 'category' ]['initial_options'] = array_merge( Array(
656
  $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
657
- . $flat_type_list[ $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ]
658
  ),
659
  $settings[ $prefix . 'category' ]['initial_options'] );
660
  }
@@ -755,7 +788,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
755
  'restaurant' => 'Restaurant',
756
  'school' => 'School',
757
  'sport' => 'SportsEvent',
758
- 'website' => 'WebSite'
759
  );
760
 
761
  if ( ! empty( $schema_types[ $type ] ) ) {
@@ -767,7 +800,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
767
  $attributes = apply_filters( $this->prefix . 'attributes', Array(
768
  'itemscope',
769
  'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
770
- 'prefix="og: http://ogp.me/ns#"'
771
  ) );
772
  foreach ( $attributes as $attr ) {
773
  if ( strpos( $output, $attr ) === false ) {
@@ -872,7 +905,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
872
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
873
  }
874
 
875
-
876
  if ( $type == 'article' && ! empty( $post ) ) {
877
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
878
  $author = get_the_author_meta( 'facebook', $post->post_author );
@@ -988,7 +1020,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
988
  $meta_key = explode( ',', $meta_key );
989
  $thumbnail = $this->get_the_image_by_meta_key( Array(
990
  'post_id' => $post->ID,
991
- 'meta_key' => $meta_key
992
  ) );
993
  }
994
  break;
@@ -1046,13 +1078,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1046
  $card = $metabox['aioseop_opengraph_settings_setcard'];
1047
  }
1048
 
1049
-
1050
  //support for changing legacy twitter cardtype-photo to summary large image
1051
  if ( $card == 'photo' ) {
1052
  $card = 'summary_large_image';
1053
  }
1054
 
1055
-
1056
  $site = $domain = $creator = '';
1057
 
1058
  if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
@@ -1069,6 +1099,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1069
  $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1070
  }
1071
 
 
 
 
 
 
 
 
1072
  $meta = Array(
1073
  'facebook' => Array(
1074
  'title' => 'og:title',
@@ -1092,13 +1129,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1092
  'modified_time' => 'article:modified_time',
1093
  ),
1094
  'twitter' => Array(
1095
- 'card' => 'twitter:card',
1096
- 'site' => 'twitter:site',
1097
- 'creator' => 'twitter:creator',
1098
- 'domain' => 'twitter:domain',
1099
- 'title' => 'twitter:title',
1100
- 'description' => 'twitter:description',
1101
- 'thumbnail' => 'twitter:image',
1102
  ),
1103
  );
1104
 
@@ -1107,7 +1144,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1107
  $meta['google+'] = Array( 'thumbnail' => 'image' );
1108
  }
1109
 
1110
-
1111
  // Add links to testing tools
1112
 
1113
  /*
@@ -1145,7 +1181,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1145
  $tags = Array(
1146
  'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
1147
  'twitter' => Array( 'name' => 'name', 'value' => 'content' ),
1148
- 'google+' => Array( 'name' => 'itemprop', 'value' => 'content' )
1149
  );
1150
 
1151
  foreach ( $meta as $t => $data ) {
@@ -1227,7 +1263,7 @@ END;
1227
  add_filter( $this->prefix . 'override_options', Array( $this, 'override_options' ), 10, 3 );
1228
  add_filter( $this->get_prefix( 'settings' ) . 'filter_metabox_options', Array(
1229
  $this,
1230
- 'filter_metabox_options'
1231
  ), 10, 3 );
1232
  $post_types = $this->get_post_type_titles();
1233
  $rempost = array( 'revision' => 1, 'nav_menu_item' => 1 );
@@ -1241,7 +1277,7 @@ END;
1241
  'style' => '',
1242
  'initial_options' => $this->fb_object_types,
1243
  'default' => 'article',
1244
- 'condshow' => Array( 'aiosp_opengraph_types\[\]' => $slug )
1245
  );
1246
  $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1247
  $this->help_anchors[ $field ] = '#content-object-types';
@@ -1273,6 +1309,12 @@ END;
1273
  if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1274
  $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1275
  }
 
 
 
 
 
 
1276
  if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1277
  $image["author"] = $author_img;
1278
  }
17
  $this->fb_object_types = Array(
18
  'Activities' => Array(
19
  'activity' => __( 'Activity', 'all-in-one-seo-pack' ),
20
+ 'sport' => __( 'Sport', 'all-in-one-seo-pack' ),
21
  ),
22
  'Businesses' => Array(
23
  'bar' => __( 'Bar', 'all-in-one-seo-pack' ),
24
  'company' => __( 'Company', 'all-in-one-seo-pack' ),
25
  'cafe' => __( 'Cafe', 'all-in-one-seo-pack' ),
26
  'hotel' => __( 'Hotel', 'all-in-one-seo-pack' ),
27
+ 'restaurant' => __( 'Restaurant', 'all-in-one-seo-pack' ),
28
  ),
29
  'Groups' => Array(
30
  'cause' => __( 'Cause', 'all-in-one-seo-pack' ),
31
  'sports_league' => __( 'Sports League', 'all-in-one-seo-pack' ),
32
+ 'sports_team' => __( 'Sports Team', 'all-in-one-seo-pack' ),
33
  ),
34
  'Organizations' => Array(
35
  'band' => __( 'Band', 'all-in-one-seo-pack' ),
36
  'government' => __( 'Government', 'all-in-one-seo-pack' ),
37
  'non_profit' => __( 'Non Profit', 'all-in-one-seo-pack' ),
38
  'school' => __( 'School', 'all-in-one-seo-pack' ),
39
+ 'university' => __( 'University', 'all-in-one-seo-pack' ),
40
  ),
41
  'People' => Array(
42
  'actor' => __( 'Actor', 'all-in-one-seo-pack' ),
46
  'musician' => __( 'Musician', 'all-in-one-seo-pack' ),
47
  'politician' => __( 'Politician', 'all-in-one-seo-pack' ),
48
  'profile' => __( 'Profile', 'all-in-one-seo-pack' ),
49
+ 'public_figure' => __( 'Public Figure', 'all-in-one-seo-pack' ),
50
  ),
51
  'Places' => Array(
52
  'city' => __( 'City', 'all-in-one-seo-pack' ),
53
  'country' => __( 'Country', 'all-in-one-seo-pack' ),
54
  'landmark' => __( 'Landmark', 'all-in-one-seo-pack' ),
55
+ 'state_province' => __( 'State Province', 'all-in-one-seo-pack' ),
56
  ),
57
  'Products and Entertainment' => Array(
58
  'album' => __( 'Album', 'all-in-one-seo-pack' ),
64
  'product' => __( 'Product', 'all-in-one-seo-pack' ),
65
  'song' => __( 'Song', 'all-in-one-seo-pack' ),
66
  'tv_show' => __( 'TV Show', 'all-in-one-seo-pack' ),
67
+ 'episode' => __( 'Episode', 'all-in-one-seo-pack' ),
68
  ),
69
  'Websites' => Array(
70
  'article' => __( 'Article', 'all-in-one-seo-pack' ),
71
  'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
72
+ 'website' => __( 'Website', 'all-in-one-seo-pack' ),
73
+ ),
74
  );
75
  parent::__construct();
76
 
77
  $categories = Array(
78
  'blog' => __( 'Blog', 'all-in-one-seo-pack' ),
79
  'website' => __( 'Website', 'all-in-one-seo-pack' ),
80
+ 'article' => __( 'Article', 'all-in-one-seo-pack' ),
81
  );
82
 
83
  $this->help_text = Array(
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 catergories in generated article tags.", '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
+ 'hometag' => '#home-article-tags',
143
  'defimg' => '#select-og-image-source',
144
  'fallback' => '#use-default-if-no-image-found',
145
  'dimg' => '#default-og-image',
146
+ 'dimgwidth' => '#default-image-width',
147
+ 'dimgheight' => '#default-image-height',
148
  'meta_key' => '#use-custom-field-for-image',
149
+ 'profile_links' => '#social-profile-links',
150
+ 'person_or_org' => '#social-profile-links',
151
+ 'social_name' => '#social-profile-links',
152
  'key' => '#facebook-admin-id',
153
  'appid' => '#facebook-app-id',
154
  'categories' => '#facebook-object-type',
155
+ 'gen_tags' => '#automatically-generate-article-tags',
156
+ 'gen_keywords' => '#use-keywords-in-article-tags',
157
+ 'gen_categories' => '#use-categories-in-article-tags',
158
+ 'gen_post_tags' => '#use-post-tags-in-article-tags',
159
  'facebook_publisher' => '#show-facebook-publisher-on-articles',
160
  'facebook_author' => '#show-facebook-author-on-articles',
161
  'types' => '#enable-facebook-meta-for',
164
  'twitter_site' => '#twitter-site',
165
  'twitter_creator' => '#show-twitter-author',
166
  'twitter_domain' => '#twitter-domain',
167
+ 'scan_header' => '#scan-social-meta',
168
+ 'title' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#title',
169
+ 'desc' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#description',
170
+ 'image' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#image',
171
+ 'customimg' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-image',
172
+ 'imagewidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
173
+ 'imageheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-image-width-height',
174
+ 'video' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-video',
175
+ 'videowidth' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
176
+ 'videoheight' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#specify-video-width-height',
177
+ 'category' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-object-type',
178
+ 'facebook_debug' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#facebook-debug',
179
+ 'section' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-section',
180
+ 'tag' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#article-tags',
181
+ 'setcard' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#twitter-card-type',
182
+ 'customimg_twitter' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/#custom-twitter-image',
183
  );
184
 
185
  $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all-in-one-seo-pack' );
187
  'scan_header' => Array(
188
  'name' => __( 'Scan Header', 'all-in-one-seo-pack' ),
189
  'type' => 'custom',
190
+ 'save' => true,
191
  ),
192
  'setmeta' => Array(
193
  'name' => __( 'Use AIOSEO Title and Description', 'all-in-one-seo-pack' ),
194
+ 'type' => 'checkbox',
195
  ),
196
  'key' => Array(
197
  'name' => __( 'Facebook Admin ID', 'all-in-one-seo-pack' ),
198
  'default' => '',
199
+ 'type' => 'text',
200
  ),
201
  'appid' => Array(
202
  'name' => __( 'Facebook App ID', 'all-in-one-seo-pack' ),
203
  'default' => '',
204
+ 'type' => 'text',
205
  ),
206
  'title_shortcodes' => Array( 'name' => __( 'Run Shortcodes In Title', 'all-in-one-seo-pack' ) ),
207
  'description_shortcodes' => Array( 'name' => __( 'Run Shortcodes In Description', 'all-in-one-seo-pack' ) ),
208
  'sitename' => Array(
209
  'name' => __( 'Site Name', 'all-in-one-seo-pack' ),
210
  'default' => get_bloginfo( 'name' ),
211
+ 'type' => 'text',
212
  ),
213
  'hometitle' => Array(
214
  'name' => __( 'Home Title', 'all-in-one-seo-pack' ),
218
  'aiosp_opengraph_setmeta' => Array(
219
  'lhs' => "aiosp_opengraph_setmeta",
220
  'op' => '!=',
221
+ 'rhs' => 'on',
222
+ ),
223
+ ),
224
  ),
225
  'description' => Array(
226
  'name' => __( 'Home Description', 'all-in-one-seo-pack' ),
230
  'aiosp_opengraph_setmeta' => Array(
231
  'lhs' => "aiosp_opengraph_setmeta",
232
  'op' => '!=',
233
+ 'rhs' => 'on',
234
+ ),
235
+ ),
236
  ),
237
  'homeimage' => Array(
238
  'name' => __( 'Home Image', 'all-in-one-seo-pack' ),
239
+ 'type' => 'image',
240
  ),
241
  'hometag' => Array(
242
  'name' => __( 'Home Article Tags', 'all-in-one-seo-pack' ),
243
  'type' => 'text',
244
  'default' => '',
245
+ 'condshow' => Array( 'aiosp_opengraph_categories' => 'article' ),
246
  ),
247
  'generate_descriptions' => Array(
248
  'name' => __( 'Autogenerate OG Descriptions', 'all-in-one-seo-pack' ),
249
+ 'default' => 1,
250
  ),
251
  'defimg' => Array(
252
  'name' => __( 'Select OG:Image Source', 'all-in-one-seo-pack' ),
258
  'content' => __( 'First Image In Content' ),
259
  'custom' => __( 'Image From Custom Field' ),
260
  'author' => __( 'Post Author Image' ),
261
+ 'auto' => __( 'First Available Image' ),
262
+ ),
263
  ),
264
  'fallback' => Array(
265
  'name' => __( 'Use Default If No Image Found', 'all-in-one-seo-pack' ),
266
+ 'type' => 'checkbox',
267
  ),
268
  'dimg' => Array(
269
  'name' => __( 'Default OG:Image', 'all-in-one-seo-pack' ),
270
  'default' => AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png',
271
+ 'type' => 'image',
272
  ),
273
  'dimgwidth' => Array(
274
  'name' => __( 'Default Image Width', 'all-in-one-seo-pack' ),
275
  'type' => 'text',
276
+ 'default' => '',
277
  ),
278
  'dimgheight' => Array(
279
  'name' => __( 'Default Image Height', 'all-in-one-seo-pack' ),
280
  'type' => 'text',
281
+ 'default' => '',
282
  ),
283
  'meta_key' => Array(
284
  'name' => __( 'Use Custom Field For Image', 'all-in-one-seo-pack' ),
285
  'type' => 'text',
286
+ 'default' => '',
287
  ),
288
  'categories' => Array(
289
  'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
290
  'type' => 'radio',
291
  'initial_options' => $categories,
292
+ 'default' => 'blog',
293
  ),
294
  'image' => Array(
295
  'name' => __( 'Image', 'all-in-one-seo-pack' ),
296
  'type' => 'radio',
297
+ 'initial_options' => Array( 0 => '<img style="width:50px;height:auto;display:inline-block;vertical-align:bottom;" src="' . AIOSEOP_PLUGIN_IMAGES_URL . 'default-user-image.png' . '">' ),
298
  ),
299
  'customimg' => Array(
300
  'name' => __( 'Custom Image', 'all-in-one-seo-pack' ),
301
+ 'type' => 'image',
302
  ),
303
  'imagewidth' => Array(
304
  'name' => __( 'Specify Image Width', 'all-in-one-seo-pack' ),
305
  'type' => 'text',
306
+ 'default' => '',
307
  ),
308
  'imageheight' => Array(
309
  'name' => __( 'Specify Image Height', 'all-in-one-seo-pack' ),
310
  'type' => 'text',
311
+ 'default' => '',
312
  ),
313
  'video' => Array(
314
  'name' => __( 'Custom Video', 'all-in-one-seo-pack' ),
315
+ 'type' => 'text',
316
  ),
317
  'videowidth' => Array(
318
  'name' => __( 'Specify Video Width', 'all-in-one-seo-pack' ),
322
  'aioseop_opengraph_settings_video' => Array(
323
  'lhs' => "aioseop_opengraph_settings_video",
324
  'op' => '!=',
325
+ 'rhs' => '',
326
+ ),
327
+ ),
328
  ),
329
  'videoheight' => Array(
330
  'name' => __( 'Specify Video Height', 'all-in-one-seo-pack' ),
334
  'aioseop_opengraph_settings_video' => Array(
335
  'lhs' => "aioseop_opengraph_settings_video",
336
  'op' => '!=',
337
+ 'rhs' => '',
338
+ ),
339
+ ),
340
  ),
341
  'defcard' => Array(
342
  'name' => __( 'Default Twitter Card', 'all-in-one-seo-pack' ),
346
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' )
347
  /*, *******REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE****** 'photo' => __( 'Photo', 'all-in-one-seo-pack' ) */
348
  ),
349
+ 'default' => 'summary',
350
  ),
351
  'setcard' => Array(
352
  'name' => __( 'Twitter Card Type', 'all-in-one-seo-pack' ),
355
  'summary_large_image' => __( 'Summary Large Image', 'all-in-one-seo-pack' ),
356
  'summary' => __( 'Summary', 'all-in-one-seo-pack' )
357
  /*, *******REMOVING THIS TWITTER CARD TYPE FROM SOCIAL META MODULE****** 'photo' => __( 'Photo', 'all-in-one-seo-pack' ) */
358
+ ),
359
  ),
360
  'twitter_site' => Array(
361
  'name' => __( 'Twitter Site', 'all-in-one-seo-pack' ),
362
  'type' => 'text',
363
+ 'default' => '',
364
  ),
365
  'twitter_creator' => Array( 'name' => __( 'Show Twitter Author', 'all-in-one-seo-pack' ) ),
366
  'twitter_domain' => Array(
367
  'name' => __( 'Twitter Domain', 'all-in-one-seo-pack' ),
368
  'type' => 'text',
369
+ 'default' => '',
370
+ ),
371
+ 'customimg_twitter' => Array(
372
+ 'name' => __( 'Custom Twitter Image', 'all-in-one-seo-pack' ),
373
+ 'type' => 'image',
374
  ),
375
  'gen_tags' => Array( 'name' => __( 'Automatically Generate Article Tags', 'all-in-one-seo-pack' ) ),
376
  'gen_keywords' => Array(
377
  'name' => __( 'Use Keywords In Article Tags', 'all-in-one-seo-pack' ),
378
  'default' => 'on',
379
+ 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' ),
380
  ),
381
  'gen_categories' => Array(
382
  'name' => __( 'Use Categories In Article Tags', 'all-in-one-seo-pack' ),
383
  'default' => 'on',
384
+ 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' ),
385
  ),
386
  'gen_post_tags' => Array(
387
  'name' => __( 'Use Post Tags In Article Tags', 'all-in-one-seo-pack' ),
388
  'default' => 'on',
389
+ 'condshow' => Array( 'aiosp_opengraph_gen_tags' => 'on' ),
390
  ),
391
  'types' => Array(
392
  'name' => __( 'Enable Facebook Meta for', 'all-in-one-seo-pack' ),
393
  'type' => 'multicheckbox',
394
  'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
395
+ 'default' => Array( 'post' => 'post', 'page' => 'page' ),
396
  ),
397
  'title' => Array(
398
  'name' => __( 'Title', 'all-in-one-seo-pack' ),
400
  'type' => 'text',
401
  'size' => 95,
402
  'count' => 1,
403
+ 'count_desc' => $count_desc,
404
  ),
405
  'desc' => Array(
406
  'name' => __( 'Description', 'all-in-one-seo-pack' ),
409
  'cols' => 250,
410
  'rows' => 4,
411
  'count' => 1,
412
+ 'count_desc' => $count_desc,
413
  ),
414
  'category' => Array(
415
  'name' => __( 'Facebook Object Type', 'all-in-one-seo-pack' ),
416
  'type' => 'select',
417
  'style' => '',
418
  'initial_options' => $this->fb_object_types,
419
+ 'default' => '',
420
  ),
421
  'facebook_debug' => Array(
422
  'name' => __( 'Facebook Debug', 'all-in-one-seo-pack' ),
435
  });
436
  </script>
437
  <a name="aioseop_opengraph_settings_facebook_debug" id="aioseop_opengraph_settings_facebook_debug" class="button-primary" href="" target=_blank>' . __( 'Debug This Post', 'all-in-one-seo-pack' )
438
+ . '</a>',
439
  ),
440
 
441
  'section' => Array(
442
  'name' => __( 'Article Section', 'all-in-one-seo-pack' ),
443
  'type' => 'text',
444
  'default' => '',
445
+ 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' ),
446
  ),
447
  'tag' => Array(
448
  'name' => __( 'Article Tags', 'all-in-one-seo-pack' ),
449
  'type' => 'text',
450
  'default' => '',
451
+ 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' ),
452
  ),
453
  'facebook_publisher' => Array(
454
  'name' => __( 'Show Facebook Publisher on Articles', 'all-in-one-seo-pack' ),
455
  'type' => 'text',
456
+ 'default' => '',
457
  ),
458
  'facebook_author' => Array( 'name' => __( 'Show Facebook Author on Articles', 'all-in-one-seo-pack' ) ),
459
  'profile_links' => Array(
460
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
461
  'type' => 'textarea',
462
  'cols' => 60,
463
+ 'rows' => 5,
464
  ),
465
  'person_or_org' => Array(
466
  'name' => __( 'Person or Organization?', 'all-in-one-seo-pack' ),
467
  'type' => 'radio',
468
  'initial_options' => Array(
469
  'person' => __( 'Person', 'all-in-one-seo-pack' ),
470
+ 'org' => __( 'Organization', 'all-in-one-seo-pack' ),
471
+ ),
472
  ),
473
  'social_name' => Array(
474
  'name' => __( "Associated Name", 'all-in-one-seo-pack' ),
475
  'type' => 'text',
476
+ 'default' => "",
477
  ),
478
  );
479
 
523
  'gen_post_tags',
524
  'types',
525
  'facebook_publisher',
526
+ 'facebook_author',
527
+ ),
528
  ),
529
  'settings' => Array(
530
  'name' => __( 'Social Settings', 'all-in-one-seo-pack' ),
531
  'type' => 'metabox',
532
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-settings-individual-pagepost-settings/',
533
  'options' => Array(
534
  'title',
535
  'desc',
544
  'facebook_debug',
545
  'section',
546
  'tag',
547
+ 'setcard',
548
+ 'customimg_twitter',
549
  ),
550
  'display' => $display,
551
+ 'prefix' => 'aioseop_opengraph_',
552
+ ),
553
  );
554
 
555
  $this->layout = Array(
560
  ),
561
  'home' => Array(
562
  'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
563
+ 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#use-aioseo-title-and-description',
564
+ 'options' => Array( 'setmeta', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag' ),
565
  ),
566
  'image' => Array(
567
  'name' => __( 'Image Settings', 'all-in-one-seo-pack' ),
568
+ 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#select-og-image-source',
569
+ 'options' => Array( 'defimg', 'fallback', 'dimg', 'dimgwidth', 'dimgheight', 'meta_key' ),
570
  ),
571
  'links' => Array(
572
  'name' => __( 'Social Profile Links', 'all-in-one-seo-pack' ),
573
+ 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#social-profile-links',
574
+ 'options' => Array( 'profile_links', 'person_or_org', 'social_name' ),
575
  ),
576
  'facebook' => Array(
577
  'name' => __( 'Facebook Settings', 'all-in-one-seo-pack' ),
578
+ 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#facebook-settings',
579
  'options' => Array(
580
  'key',
581
  'appid',
586
  'gen_post_tags',
587
  'categories',
588
  'facebook_publisher',
589
+ 'facebook_author',
590
+ ),
591
  ),
592
  'twitter' => Array(
593
  'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
594
+ 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#default-twitter-card',
595
+ 'options' => Array( 'defcard', 'setcard', 'twitter_site', 'twitter_creator', 'twitter_domain' ),
596
  ),
597
  'scan_meta' => Array(
598
  'name' => __( 'Scan Social Meta', 'all-in-one-seo-pack' ),
599
  'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#scan_meta',
600
+ 'options' => Array( 'scan_header' ),
601
+ ),
602
  );
603
 
604
  $other_options = Array();
687
  }
688
  $settings[ $prefix . 'category' ]['initial_options'] = array_merge( Array(
689
  $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] => __( 'Default ', 'all-in-one-seo-pack' ) . ' - '
690
+ . $flat_type_list[ $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ],
691
  ),
692
  $settings[ $prefix . 'category' ]['initial_options'] );
693
  }
788
  'restaurant' => 'Restaurant',
789
  'school' => 'School',
790
  'sport' => 'SportsEvent',
791
+ 'website' => 'WebSite',
792
  );
793
 
794
  if ( ! empty( $schema_types[ $type ] ) ) {
800
  $attributes = apply_filters( $this->prefix . 'attributes', Array(
801
  'itemscope',
802
  'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
803
+ 'prefix="og: http://ogp.me/ns#"',
804
  ) );
805
  foreach ( $attributes as $attr ) {
806
  if ( strpos( $output, $attr ) === false ) {
905
  $domain = $this->options['aiosp_opengraph_twitter_domain'];
906
  }
907
 
 
908
  if ( $type == 'article' && ! empty( $post ) ) {
909
  if ( isset( $post->post_author ) && ! empty( $this->options['aiosp_opengraph_facebook_author'] ) ) {
910
  $author = get_the_author_meta( 'facebook', $post->post_author );
1020
  $meta_key = explode( ',', $meta_key );
1021
  $thumbnail = $this->get_the_image_by_meta_key( Array(
1022
  'post_id' => $post->ID,
1023
+ 'meta_key' => $meta_key,
1024
  ) );
1025
  }
1026
  break;
1078
  $card = $metabox['aioseop_opengraph_settings_setcard'];
1079
  }
1080
 
 
1081
  //support for changing legacy twitter cardtype-photo to summary large image
1082
  if ( $card == 'photo' ) {
1083
  $card = 'summary_large_image';
1084
  }
1085
 
 
1086
  $site = $domain = $creator = '';
1087
 
1088
  if ( ! empty( $this->options['aiosp_opengraph_twitter_site'] ) ) {
1099
  $creator = AIOSEOP_Opengraph_Public::prepare_twitter_username( $creator );
1100
  }
1101
 
1102
+ $twitter_thumbnail = $thumbnail; // Default Twitter image if custom isn't set.
1103
+
1104
+ if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1105
+ // Set Twitter image from custom.
1106
+ $twitter_thumbnail = $metabox['aioseop_opengraph_settings_customimg_twitter'];
1107
+ }
1108
+
1109
  $meta = Array(
1110
  'facebook' => Array(
1111
  'title' => 'og:title',
1129
  'modified_time' => 'article:modified_time',
1130
  ),
1131
  'twitter' => Array(
1132
+ 'card' => 'twitter:card',
1133
+ 'site' => 'twitter:site',
1134
+ 'creator' => 'twitter:creator',
1135
+ 'domain' => 'twitter:domain',
1136
+ 'title' => 'twitter:title',
1137
+ 'description' => 'twitter:description',
1138
+ 'twitter_thumbnail' => 'twitter:image',
1139
  ),
1140
  );
1141
 
1144
  $meta['google+'] = Array( 'thumbnail' => 'image' );
1145
  }
1146
 
 
1147
  // Add links to testing tools
1148
 
1149
  /*
1181
  $tags = Array(
1182
  'facebook' => Array( 'name' => 'property', 'value' => 'content' ),
1183
  'twitter' => Array( 'name' => 'name', 'value' => 'content' ),
1184
+ 'google+' => Array( 'name' => 'itemprop', 'value' => 'content' ),
1185
  );
1186
 
1187
  foreach ( $meta as $t => $data ) {
1263
  add_filter( $this->prefix . 'override_options', Array( $this, 'override_options' ), 10, 3 );
1264
  add_filter( $this->get_prefix( 'settings' ) . 'filter_metabox_options', Array(
1265
  $this,
1266
+ 'filter_metabox_options',
1267
  ), 10, 3 );
1268
  $post_types = $this->get_post_type_titles();
1269
  $rempost = array( 'revision' => 1, 'nav_menu_item' => 1 );
1277
  'style' => '',
1278
  'initial_options' => $this->fb_object_types,
1279
  'default' => 'article',
1280
+ 'condshow' => Array( 'aiosp_opengraph_types\[\]' => $slug ),
1281
  );
1282
  $this->help_text[ $field ] = __( 'Choose a default value that best describes the content of your post type.', 'all-in-one-seo-pack' );
1283
  $this->help_anchors[ $field ] = '#content-object-types';
1309
  if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1310
  $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1311
  }
1312
+
1313
+ if ( ! empty( $options ) && ! empty( $options['aioseop_opengraph_settings_customimg'] ) ) {
1314
+ $img[ $options['aioseop_opengraph_settings_customimg'] ] = 'customimg';
1315
+ $img[ $options['aioseop_opengraph_settings_customimg_twitter'] ] = 'customimg_twitter';
1316
+ }
1317
+
1318
  if ( $author_img = $this->get_the_image_by_author( $p ) ) {
1319
  $image["author"] = $author_img;
1320
  }
modules/aioseop_performance.php CHANGED
@@ -169,11 +169,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
169
  if ( empty( $sql_mode ) ) {
170
  $sql_mode = __( 'Not set', 'all-in-one-seo-pack' );
171
  }
172
- if ( ini_get( 'safe_mode' ) ) {
173
- $safe_mode = __( 'On', 'all-in-one-seo-pack' );
174
- } else {
175
- $safe_mode = __( 'Off', 'all-in-one-seo-pack' );
176
- }
177
  if ( ini_get( 'allow_url_fopen' ) ) {
178
  $allow_url_fopen = __( 'On', 'all-in-one-seo-pack' );
179
  } else {
@@ -244,7 +239,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
244
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
245
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
246
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
247
- __( 'PHP Safe Mode', 'all-in-one-seo-pack' ) => $safe_mode,
248
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
249
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
250
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
169
  if ( empty( $sql_mode ) ) {
170
  $sql_mode = __( 'Not set', 'all-in-one-seo-pack' );
171
  }
 
 
 
 
 
172
  if ( ini_get( 'allow_url_fopen' ) ) {
173
  $allow_url_fopen = __( 'On', 'all-in-one-seo-pack' );
174
  } else {
239
  __( 'MYSQL Version', 'all-in-one-seo-pack' ) => $sqlversion,
240
  __( 'SQL Mode', 'all-in-one-seo-pack' ) => $sql_mode,
241
  __( 'PHP Version', 'all-in-one-seo-pack' ) => PHP_VERSION,
 
242
  __( 'PHP Allow URL fopen', 'all-in-one-seo-pack' ) => $allow_url_fopen,
243
  __( 'PHP Memory Limit', 'all-in-one-seo-pack' ) => $memory_limit,
244
  __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ) => $upload_max,
public/front.php CHANGED
@@ -3,7 +3,7 @@
3
  * Class for public facing code
4
  *
5
  * @package All-in-One-SEO-Pack
6
- * @since 2.3.6
7
  */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
@@ -21,6 +21,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
21
  public function __construct() {
22
 
23
  add_action( 'template_redirect', array( $this, 'noindex_follow_rss' ) );
 
24
 
25
  }
26
 
@@ -34,6 +35,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
34
  header( 'X-Robots-Tag: noindex, follow', true );
35
  }
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  }
3
  * Class for public facing code
4
  *
5
  * @package All-in-One-SEO-Pack
6
+ * @since 2.3.6
7
  */
8
 
9
  if ( ! class_exists( 'All_in_One_SEO_Pack_Front' ) ) {
21
  public function __construct() {
22
 
23
  add_action( 'template_redirect', array( $this, 'noindex_follow_rss' ) );
24
+ add_action( 'template_redirect', array( $this, 'redirect_attachment' ) );
25
 
26
  }
27
 
35
  header( 'X-Robots-Tag: noindex, follow', true );
36
  }
37
  }
38
+
39
+ /**
40
+ * Redirect attachment to parent post.
41
+ *
42
+ * @since 2.3.9
43
+ */
44
+ function redirect_attachment() {
45
+
46
+ global $aioseop_options;
47
+ if ( ! isset( $aioseop_options['aiosp_redirect_attachement_parent'] ) || $aioseop_options['aiosp_redirect_attachement_parent'] !== 'on' ) {
48
+ return false;
49
+ }
50
+
51
+ global $post;
52
+ if ( is_attachment() && ( ( is_object( $post ) && isset( $post->post_parent ) ) && ( is_numeric( $post->post_parent ) && $post->post_parent != 0 ) ) ) {
53
+ wp_safe_redirect( get_permalink( $post->post_parent ), 301 );
54
+ exit;
55
+ }
56
+ }
57
  }
58
 
59
  }
public/google-analytics.php ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'aioseop_google_analytics' ) ) {
4
+
5
+ require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php' ); // Include the module base class.
6
+
7
+ class aioseop_google_analytics extends All_in_One_SEO_Pack_Module {
8
+ // TODO Rather than extending the module base class, we should find a better way for the shared functions like moving them to our common functions class.
9
+
10
+ private $aiosp_ga_use_universal_analytics = true;
11
+
12
+ function __construct() {
13
+
14
+ $this->filter_universal();
15
+
16
+ $this->google_analytics();
17
+
18
+ }
19
+
20
+ function filter_universal() {
21
+ $aiosp_ga_use_universal_analytics = $this->aiosp_ga_use_universal_analytics;
22
+ $this->aiosp_ga_use_universal_analytics = apply_filters( 'aiosp_universal_analytics', $aiosp_ga_use_universal_analytics );
23
+ }
24
+
25
+ function google_analytics() {
26
+ global $aioseop_options;
27
+ $analytics = '';
28
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_exclude_users'] ) && is_user_logged_in() ) {
29
+ global $current_user;
30
+ if ( empty( $current_user ) ) {
31
+ wp_get_current_user();
32
+ }
33
+ if ( ! empty( $current_user ) ) {
34
+ $intersect = array_intersect( $aioseop_options['aiosp_ga_exclude_users'], $current_user->roles );
35
+ if ( ! empty( $intersect ) ) {
36
+ return;
37
+ }
38
+ }
39
+ }
40
+ if ( ! empty( $aioseop_options['aiosp_google_analytics_id'] ) ) {
41
+ ob_start();
42
+ $analytics = $this->universal_analytics();
43
+ echo $analytics;
44
+ if ( empty( $analytics ) ) {
45
+ ?>
46
+ <script type="text/javascript">
47
+ var _gaq = _gaq || [];
48
+ <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_link_attribution'] ) ) {
49
+ ?> var pluginUrl =
50
+ '//www.google-analytics.com/plugins/ga/inpage_linkid.js';
51
+ _gaq.push(['_require', 'inpage_linkid', pluginUrl]);
52
+ <?php
53
+ }
54
+ ?> _gaq.push(['_setAccount', '<?php
55
+ echo $aioseop_options['aiosp_google_analytics_id'];
56
+ ?>']);
57
+ <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_anonymize_ip'] ) ) {
58
+ ?> _gaq.push(['_gat._anonymizeIp']);
59
+ <?php
60
+ }
61
+ ?>
62
+ <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_multi_domain'] ) ) {
63
+ ?> _gaq.push(['_setAllowLinker', true]);
64
+ <?php
65
+ }
66
+ ?>
67
+ <?php if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_domain'] ) ) {
68
+ $domain = $this->get_analytics_domain();
69
+ ?> _gaq.push(['_setDomainName', '<?php echo $domain; ?>']);
70
+ <?php
71
+ }
72
+ ?> _gaq.push(['_trackPageview']);
73
+ (function () {
74
+ var ga = document.createElement('script');
75
+ ga.type = 'text/javascript';
76
+ ga.async = true;
77
+ <?php
78
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
79
+ ?> ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
80
+ <?php
81
+ } else {
82
+ ?> ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
83
+ <?php
84
+ }
85
+ ?> var s = document.getElementsByTagName('script')[0];
86
+ s.parentNode.insertBefore(ga, s);
87
+ })();
88
+ </script>
89
+ <?php
90
+ }
91
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && $aioseop_options['aiosp_ga_track_outbound_links'] ) { ?>
92
+ <script type="text/javascript">
93
+ function recordOutboundLink(link, category, action) {
94
+ <?php if ( $this->aiosp_ga_use_universal_analytics ) { ?>
95
+ ga('send', 'event', category, action);
96
+ <?php }
97
+ if ( ! $this->aiosp_ga_use_universal_analytics ) { ?>
98
+ _gat._getTrackerByName()._trackEvent(category, action);
99
+ <?php } ?>
100
+ if (link.target == '_blank') return true;
101
+ setTimeout('document.location = "' + link.href + '"', 100);
102
+ return false;
103
+ }
104
+ /* use regular Javascript for this */
105
+ function getAttr(ele, attr) {
106
+ var result = (ele.getAttribute && ele.getAttribute(attr)) || null;
107
+ if (!result) {
108
+ var attrs = ele.attributes;
109
+ var length = attrs.length;
110
+ for (var i = 0; i < length; i++)
111
+ if (attr[i].nodeName === attr) result = attr[i].nodeValue;
112
+ }
113
+ return result;
114
+ }
115
+
116
+ function aiosp_addLoadEvent(func) {
117
+ var oldonload = window.onload;
118
+ if (typeof window.onload != 'function') {
119
+ window.onload = func;
120
+ } else {
121
+ window.onload = function () {
122
+ if (oldonload) {
123
+ oldonload();
124
+ }
125
+ func();
126
+ }
127
+ }
128
+ }
129
+
130
+ function aiosp_addEvent(element, evnt, funct) {
131
+ if (element.attachEvent)
132
+ return element.attachEvent('on' + evnt, funct);
133
+ else
134
+ return element.addEventListener(evnt, funct, false);
135
+ }
136
+
137
+ aiosp_addLoadEvent(function () {
138
+ var links = document.getElementsByTagName('a');
139
+ for (var x = 0; x < links.length; x++) {
140
+ if (typeof links[x] == 'undefined') continue;
141
+ aiosp_addEvent(links[x], 'onclick', function () {
142
+ var mydomain = new RegExp(document.domain, 'i');
143
+ href = getAttr(this, 'href');
144
+ if (href && href.toLowerCase().indexOf('http') === 0 && !mydomain.test(href)) {
145
+ recordOutboundLink(this, 'Outbound Links', href);
146
+ }
147
+ });
148
+ }
149
+ });
150
+ </script>
151
+ <?php
152
+ }
153
+ $analytics = ob_get_clean();
154
+ }
155
+ echo apply_filters( 'aiosp_google_analytics', $analytics );
156
+ do_action( 'after_aiosp_google_analytics' );
157
+
158
+ }
159
+
160
+ function universal_analytics() {
161
+ global $aioseop_options;
162
+ $analytics = '';
163
+ if ( $this->aiosp_ga_use_universal_analytics ) {
164
+ $allow_linker = $cookie_domain = $domain = $addl_domains = $domain_list = '';
165
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) ) {
166
+ $cookie_domain = $this->get_analytics_domain();
167
+ }
168
+ if ( ! empty( $cookie_domain ) ) {
169
+ $cookie_domain = esc_js( $cookie_domain );
170
+ $cookie_domain = "'cookieDomain': '{$cookie_domain}'";
171
+ }
172
+ if ( empty( $cookie_domain ) ) {
173
+ $domain = ", 'auto'";
174
+ }
175
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_multi_domain'] ) ) {
176
+ $allow_linker = "'allowLinker': true";
177
+ if ( ! empty( $aioseop_options['aiosp_ga_addl_domains'] ) ) {
178
+ $addl_domains = trim( $aioseop_options['aiosp_ga_addl_domains'] );
179
+ $addl_domains = preg_split( '/[\s,]+/', $addl_domains );
180
+ if ( ! empty( $addl_domains ) ) {
181
+ foreach ( $addl_domains as $d ) {
182
+ $d = $this->sanitize_domain( $d );
183
+ if ( ! empty( $d ) ) {
184
+ if ( ! empty( $domain_list ) ) {
185
+ $domain_list .= ', ';
186
+ }
187
+ $domain_list .= "'" . $d . "'";
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ $extra_options = '';
194
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_display_advertising'] ) ) {
195
+ $extra_options .= "ga('require', 'displayfeatures');";
196
+ }
197
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_enhanced_ecommerce'] ) ) {
198
+ if ( ! empty( $extra_options ) ) {
199
+ $extra_options .= "\n\t\t\t";
200
+ }
201
+ $extra_options .= "ga('require', 'ec');";
202
+ }
203
+ if ( ! empty( $domain_list ) ) {
204
+ if ( ! empty( $extra_options ) ) {
205
+ $extra_options .= "\n\t\t\t";
206
+ }
207
+ $extra_options .= "ga('require', 'linker');\n\t\t\tga('linker:autoLink', [{$domain_list}] );";
208
+ }
209
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_link_attribution'] ) ) {
210
+ if ( ! empty( $extra_options ) ) {
211
+ $extra_options .= "\n\t\t\t";
212
+ }
213
+ $extra_options .= "ga('require', 'linkid', 'linkid.js');";
214
+ }
215
+
216
+ if ( ! empty( $aioseop_options['aiosp_ga_advanced_options'] ) && ! empty( $aioseop_options['aiosp_ga_anonymize_ip'] ) ) {
217
+ if ( ! empty( $extra_options ) ) {
218
+ $extra_options .= "\n\t\t\t";
219
+ }
220
+ $extra_options .= "ga('set', 'anonymizeIp', true);";
221
+ }
222
+ $js_options = array();
223
+ foreach ( array( 'cookie_domain', 'allow_linker' ) as $opts ) {
224
+ if ( ! empty( $$opts ) ) {
225
+ $js_options[] = $$opts;
226
+ }
227
+ }
228
+ if ( ! empty( $js_options ) ) {
229
+ $js_options = implode( ',', $js_options );
230
+ $js_options = ', { ' . $js_options . ' } ';
231
+ } else {
232
+ $js_options = '';
233
+ }
234
+ $analytics_id = esc_js( $aioseop_options['aiosp_google_analytics_id'] );
235
+ $analytics = <<<EOF
236
+ <script>
237
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
238
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
239
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
240
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
241
+
242
+ ga('create', '{$analytics_id}'{$domain}{$js_options});
243
+ {$extra_options}
244
+ ga('send', 'pageview');
245
+ </script>
246
+
247
+ EOF;
248
+ }
249
+
250
+ return $analytics;
251
+ }
252
+
253
+ /**
254
+ * @return mixed|string
255
+ */
256
+ function get_analytics_domain() {
257
+ global $aioseop_options;
258
+ if ( ! empty( $aioseop_options['aiosp_ga_domain'] ) ) {
259
+ return $this->sanitize_domain( $aioseop_options['aiosp_ga_domain'] );
260
+ }
261
+
262
+ return '';
263
+ }
264
+
265
+ }
266
+ }
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: hallsofmontezuma, wpsmort, dougal, pbaylies, arnaudbroes
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
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: 3.4
6
- Tested up to: 4.5
7
- Stable tag: 2.3.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -37,6 +37,7 @@ First created in 2007, see why AIOSEO is the most downloaded plugin for WordPres
37
  * You can override any title and set any META description and any META keywords you want.
38
  * Compatibility with many other plugins
39
  * Translated into 57 languages
 
40
 
41
  Follow me on Twitter to keep up with the latest updates [Michael
42
  Torbert](http://twitter.com/michaeltorbert/)
2
  Contributors: hallsofmontezuma, wpsmort, dougal, pbaylies, arnaudbroes
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
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.0
6
+ Tested up to: 4.6
7
+ Stable tag: 2.3.9.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
37
  * You can override any title and set any META description and any META keywords you want.
38
  * Compatibility with many other plugins
39
  * Translated into 57 languages
40
+ * PHP 7 100% Compatible
41
 
42
  Follow me on Twitter to keep up with the latest updates [Michael
43
  Torbert](http://twitter.com/michaeltorbert/)