All in One SEO Pack - Version 2.3.11

Version Description

Download this release

Release Info

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

Code changes from version 2.3.10.2 to 2.3.11

Files changed (62) hide show
  1. admin/aioseop_module_class.php +380 -38
  2. admin/display/dashboard_widget.php +6 -2
  3. admin/display/general-metaboxes.php +29 -29
  4. admin/display/welcome-content.php +46 -16
  5. admin/display/welcome.php +29 -4
  6. admin/meta_import.php +4 -2
  7. aioseop_class.php +100 -154
  8. all_in_one_seo_pack.php +11 -19
  9. css/aiosp_admin.css +34 -0
  10. css/modules/aioseop_module-rtl.css +4 -0
  11. css/modules/aioseop_module.css +13 -0
  12. i18n/all-in-one-seo-pack-ar.mo +0 -0
  13. i18n/all-in-one-seo-pack-art_xemoji.mo +0 -0
  14. i18n/all-in-one-seo-pack-ary.mo +0 -0
  15. i18n/all-in-one-seo-pack-bg_BG.mo +0 -0
  16. i18n/all-in-one-seo-pack-ca.mo +0 -0
  17. i18n/all-in-one-seo-pack-de_DE.mo +0 -0
  18. i18n/all-in-one-seo-pack-el.mo +0 -0
  19. i18n/all-in-one-seo-pack-en_AU.mo +0 -0
  20. i18n/all-in-one-seo-pack-en_CA.mo +0 -0
  21. i18n/all-in-one-seo-pack-en_GB.mo +0 -0
  22. i18n/all-in-one-seo-pack-en_NZ.mo +0 -0
  23. i18n/all-in-one-seo-pack-es_ES.mo +0 -0
  24. i18n/all-in-one-seo-pack-fa_IR.mo +0 -0
  25. i18n/all-in-one-seo-pack-fi.mo +0 -0
  26. i18n/all-in-one-seo-pack-fr_CA.mo +0 -0
  27. i18n/all-in-one-seo-pack-fr_FR.mo +0 -0
  28. i18n/all-in-one-seo-pack-hi_IN.mo +0 -0
  29. i18n/all-in-one-seo-pack-hr.mo +0 -0
  30. i18n/all-in-one-seo-pack-hu_HU.mo +0 -0
  31. i18n/all-in-one-seo-pack-id_ID.mo +0 -0
  32. i18n/all-in-one-seo-pack-it_IT.mo +0 -0
  33. i18n/all-in-one-seo-pack-ko_KR.mo +0 -0
  34. i18n/all-in-one-seo-pack-lv.mo +0 -0
  35. i18n/all-in-one-seo-pack-nb_NO.mo +0 -0
  36. i18n/all-in-one-seo-pack-nl_BE.mo +0 -0
  37. i18n/all-in-one-seo-pack-nl_NL.mo +0 -0
  38. i18n/all-in-one-seo-pack-nn_NO.mo +0 -0
  39. i18n/all-in-one-seo-pack-oci.mo +0 -0
  40. i18n/all-in-one-seo-pack-pl_PL.mo +0 -0
  41. i18n/all-in-one-seo-pack-pt_PT.mo +0 -0
  42. i18n/all-in-one-seo-pack-ro_RO.mo +0 -0
  43. i18n/all-in-one-seo-pack-ru_RU.mo +0 -0
  44. i18n/all-in-one-seo-pack-sl_SL.mo +0 -0
  45. i18n/all-in-one-seo-pack-sq.mo +0 -0
  46. i18n/all-in-one-seo-pack-tr_TR.mo +0 -0
  47. i18n/all-in-one-seo-pack-vi.mo +0 -0
  48. i18n/all-in-one-seo-pack-zh_CN.mo +0 -0
  49. images/amazon.jpg +0 -0
  50. images/donate.jpg +0 -0
  51. images/twitter.jpg +0 -0
  52. inc/aioseop_functions.php +2 -98
  53. inc/aiosp_common.php +17 -7
  54. js/modules/aioseop_module.js +2 -2
  55. js/quickedit_functions.js +1 -1
  56. modules/aioseop_feature_manager.php +1 -1
  57. modules/aioseop_importer_exporter.php +4 -6
  58. modules/aioseop_opengraph.php +77 -21
  59. modules/aioseop_performance.php +2 -2
  60. modules/aioseop_robots.php +1 -1
  61. modules/aioseop_sitemap.php +51 -20
  62. readme.txt +1 -1
admin/aioseop_module_class.php CHANGED
@@ -2,10 +2,12 @@
2
  /**
3
  * @package All-in-One-SEO-Pack
4
  */
5
- /**
6
- * The module base class; handles settings, options, menus, metaboxes, etc.
7
- */
8
  if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
 
 
 
 
9
  abstract class All_in_One_SEO_Pack_Module {
10
  public static $instance = null;
11
  protected $plugin_name;
@@ -35,6 +37,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
35
 
36
  /**
37
  * Handles calls to display_settings_page_{$location}, does error checking.
 
 
 
 
 
38
  */
39
  function __call( $name, $arguments ) {
40
  if ( $this->strpos( $name, 'display_settings_page_' ) === 0 ) {
@@ -47,6 +54,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
47
  throw new Exception( $error );
48
  }
49
 
 
 
 
50
  function __construct() {
51
  if ( empty( $this->file ) ) {
52
  $this->file = __FILE__;
@@ -80,6 +90,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
80
 
81
  /**
82
  * Update options for module, stored individually or together.
 
 
 
 
 
83
  */
84
  function update_class_option( $option_data, $option_name = false ) {
85
  if ( $option_name == false ) {
@@ -100,6 +115,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
100
 
101
  /**
102
  * Delete options for module, stored individually or together.
 
 
 
 
103
  */
104
  function delete_class_option( $delete = false ) {
105
  $option_name = $this->get_option_name();
@@ -130,7 +149,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
130
 
131
  /**
132
  * Convenience function to see if an option is set.
 
133
  * @param string $option
 
 
 
 
134
  */
135
  function option_isset( $option, $location = null ) {
136
  $prefix = $this->get_prefix( $location );
@@ -139,7 +163,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
139
  return ( isset( $this->options[ $opt ] ) && $this->options[ $opt ] );
140
  }
141
 
142
- /*** Case conversion; handle non UTF-8 encodings and fallback ***/
 
 
 
 
 
 
143
 
144
  function convert_case( $str, $mode = 'upper' ) {
145
  static $charset = null;
@@ -190,6 +220,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
190
  /**
191
  * Convert a string to lower case
192
  * Compatible with mb_strtolower(), an UTF-8 friendly replacement for strtolower()
 
 
 
 
193
  */
194
  function strtolower( $str ) {
195
  return $this->convert_case( $str, 'lower' );
@@ -198,6 +232,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
198
  /**
199
  * Convert a string to upper case
200
  * Compatible with mb_strtoupper(), an UTF-8 friendly replacement for strtoupper()
 
 
 
 
201
  */
202
  function strtoupper( $str ) {
203
  return $this->convert_case( $str, 'upper' );
@@ -206,6 +244,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
206
  /**
207
  * Convert a string to title case
208
  * Compatible with mb_convert_case(), an UTF-8 friendly replacement for ucwords()
 
 
 
 
209
  */
210
  function ucwords( $str ) {
211
  return $this->convert_case( $str, 'title' );
@@ -213,6 +255,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
213
 
214
  /**
215
  * Wrapper for strlen() - uses mb_strlen() if possible.
 
 
 
 
216
  */
217
  function strlen( $string ) {
218
  if ( function_exists( 'mb_strlen' ) ) {
@@ -224,6 +270,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
224
 
225
  /**
226
  * Wrapper for substr() - uses mb_substr() if possible.
 
 
 
 
 
 
227
  */
228
  function substr( $string, $start = 0, $length = 2147483647 ) {
229
  $args = func_get_args();
@@ -236,7 +288,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
236
 
237
  /**
238
  * Wrapper for strpos() - uses mb_strpos() if possible.
 
 
239
  * @param string $needle
 
 
 
 
240
  */
241
  function strpos( $haystack, $needle, $offset = 0 ) {
242
  if ( function_exists( 'mb_strpos' ) ) {
@@ -248,7 +306,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
248
 
249
  /**
250
  * Wrapper for strrpos() - uses mb_strrpos() if possible.
 
 
251
  * @param string $needle
 
 
 
 
252
  */
253
  function strrpos( $haystack, $needle, $offset = 0 ) {
254
  if ( function_exists( 'mb_strrpos' ) ) {
@@ -279,6 +343,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
279
  }
280
  }
281
 
 
 
 
 
 
282
  function xml_string_to_array( $xmlstr ) {
283
  if ( ! class_exists( 'DOMDocument' ) ) {
284
  return array();
@@ -292,6 +361,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
292
 
293
  /**
294
  * @param DOMElement $node
 
 
295
  */
296
  function domnode_to_array( $node ) {
297
  switch ( $node->nodeType ) {
@@ -342,11 +413,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
342
  return $output;
343
  }
344
 
345
- /*** adds support for using %cf_(name of field)% for using custom fields / Advanced Custom Fields in titles / descriptions etc. ***/
 
 
 
 
 
346
  function apply_cf_fields( $format ) {
347
  return preg_replace_callback( '/%cf_([^%]*?)%/', array( $this, 'cf_field_replace' ), $format );
348
  }
349
 
 
 
 
 
 
350
  function cf_field_replace( $matches ) {
351
  $result = '';
352
  if ( ! empty( $matches ) ) {
@@ -391,6 +472,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
391
 
392
  /**
393
  * Checks if the plugin is active on a given blog by blogid on a multisite.
 
 
 
 
394
  */
395
  function is_aioseop_active_on_blog( $bid = false ) {
396
  global $blog_id;
@@ -407,6 +492,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
407
  return in_array( AIOSEOP_PLUGIN_BASENAME, (array) get_blog_option( $bid, 'active_plugins', array() ) );
408
  }
409
 
 
 
 
 
 
 
410
  function quote_list_for_regex( $list, $quote = '/' ) {
411
  $regex = '';
412
  $cont = 0;
@@ -422,6 +513,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
422
  }
423
 
424
  // original code thanks to Sean M. Brown -- http://smbrown.wordpress.com/2009/04/29/verify-googlebot-forward-reverse-dns/
 
 
 
425
  function is_good_bot() {
426
  $botlist = array(
427
  'Yahoo! Slurp' => 'crawl.yahoo.net',
@@ -455,6 +549,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
455
  }
456
  }
457
 
 
 
 
458
  function default_bad_bots() {
459
  $botlist = array(
460
  'Abonti',
@@ -599,6 +696,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
599
  return $botlist;
600
  }
601
 
 
 
 
602
  function is_bad_bot() {
603
  $botlist = $this->default_bad_bots();
604
  $botlist = apply_filters( $this->prefix . 'badbotlist', $botlist );
@@ -616,6 +716,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
616
  return false;
617
  }
618
 
 
 
 
619
  function default_bad_referers() {
620
  $referlist = array(
621
  'semalt.com',
@@ -648,6 +751,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
648
  return $referlist;
649
  }
650
 
 
 
 
651
  function is_bad_referer() {
652
  $referlist = $this->default_bad_referers();
653
  $referlist = apply_filters( $this->prefix . 'badreferlist', $referlist );
@@ -663,6 +769,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
663
  return false;
664
  }
665
 
 
 
 
666
  function allow_bot() {
667
  $allow_bot = true;
668
  if ( ( ! $this->is_good_bot() ) && $this->is_bad_bot() && ! is_user_logged_in() ) {
@@ -674,6 +783,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
674
 
675
  /**
676
  * Displays tabs for tabbed locations on a settings page.
 
 
677
  */
678
  function display_tabs( $location ) {
679
  if ( ( $location != null ) && isset( $locations[ $location ]['tabs'] ) ) {
@@ -699,6 +810,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
699
  }
700
  }
701
 
 
 
 
 
 
702
  function get_object_labels( $post_objs ) {
703
  $pt = array_keys( $post_objs );
704
  $post_types = array();
@@ -713,6 +829,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
713
  return $post_types;
714
  }
715
 
 
 
 
 
 
716
  function get_term_labels( $post_objs ) {
717
  $post_types = array();
718
  foreach ( $post_objs as $p ) {
@@ -724,20 +845,40 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
724
  return $post_types;
725
  }
726
 
 
 
 
 
 
727
  function get_post_type_titles( $args = array() ) {
728
  return $this->get_object_labels( get_post_types( $args, 'objects' ) );
729
  }
730
 
 
 
 
 
 
731
  function get_taxonomy_titles( $args = array() ) {
732
  return $this->get_object_labels( get_taxonomies( $args, 'objects' ) );
733
  }
734
 
 
 
 
 
 
735
  function get_category_titles( $args = array() ) {
736
  return $this->get_term_labels( get_categories( $args ) );
737
  }
738
 
739
  /**
740
  * Helper function for exporting settings on post data.
 
 
 
 
 
741
  */
742
  function post_data_export( $prefix = '_aioseop', $query = array( 'posts_per_page' => - 1 ) ) {
743
  $buf = '';
@@ -783,6 +924,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
783
 
784
  /**
785
  * Handles exporting settings data for a module.
 
 
 
 
786
  */
787
  function settings_export( $buf ) {
788
  global $aiosp;
@@ -848,6 +993,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
848
 
849
  /**
850
  * Print a basic error message.
 
 
 
 
851
  */
852
  function output_error( $error ) {
853
  echo "<div class='aioseop_module error'>$error</div>";
@@ -857,6 +1006,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
857
 
858
  /***
859
  * Backwards compatibility - see http://php.net/manual/en/function.str-getcsv.php
 
 
 
 
 
 
 
860
  */
861
  function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = "\\" ) {
862
  $fp = fopen( 'php://memory', 'r+' );
@@ -870,6 +1026,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
870
 
871
  /***
872
  * Helper function to convert csv in key/value pair format to an associative array.
 
 
 
 
873
  */
874
  function csv_to_array( $csv ) {
875
  $args = array();
@@ -888,7 +1048,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
888
  return $args;
889
  }
890
 
891
- /** Allow modules to use WP Filesystem if available and desired, fall back to PHP filesystem access otherwise. */
 
 
 
 
 
 
 
 
892
  function use_wp_filesystem( $method = '', $form_fields = false, $url = '', $error = false ) {
893
  if ( empty( $method ) ) {
894
  $this->credentials = request_filesystem_credentials( $url );
@@ -935,7 +1103,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
935
 
936
  /**
937
  * See if a file exists using WP Filesystem.
 
938
  * @param string $filename
 
 
939
  */
940
  function file_exists( $filename ) {
941
  $wpfs = $this->get_filesystem_object();
@@ -948,6 +1119,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
948
 
949
  /**
950
  * See if the directory entry is a file using WP Filesystem.
 
 
 
 
951
  */
952
  function is_file( $filename ) {
953
  $wpfs = $this->get_filesystem_object();
@@ -960,6 +1135,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
960
 
961
  /**
962
  * List files in a directory using WP Filesystem.
 
 
 
 
963
  */
964
  function scandir( $path ) {
965
  $wpfs = $this->get_filesystem_object();
@@ -977,6 +1156,14 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
977
 
978
  /**
979
  * Load a file through WP Filesystem; implement basic support for offset and maxlen.
 
 
 
 
 
 
 
 
980
  */
981
  function load_file( $filename, $use_include_path = false, $context = null, $offset = - 1, $maxlen = - 1 ) {
982
  $wpfs = $this->get_filesystem_object();
@@ -1010,7 +1197,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1010
 
1011
  /**
1012
  * Save a file through WP Filesystem.
 
1013
  * @param string $filename
 
 
 
 
1014
  */
1015
  function save_file( $filename, $contents ) {
1016
  $failed_str = __( sprintf( "Failed to write file %s!\n", $filename ), 'all-in-one-seo-pack' );
@@ -1034,7 +1226,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1034
 
1035
  /**
1036
  * Delete a file through WP Filesystem.
 
1037
  * @param string $filename
 
 
1038
  */
1039
  function delete_file( $filename ) {
1040
  $wpfs = $this->get_filesystem_object();
@@ -1055,8 +1250,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1055
 
1056
  /**
1057
  * Rename a file through WP Filesystem.
 
1058
  * @param string $filename
1059
  * @param string $newname
 
 
1060
  */
1061
  function rename_file( $filename, $newname ) {
1062
  $wpfs = $this->get_filesystem_object();
@@ -1083,6 +1281,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1083
 
1084
  /**
1085
  * Load multiple files.
 
 
 
 
 
 
1086
  */
1087
  function load_files( $options, $opts, $prefix ) {
1088
  foreach ( $opts as $opt => $file ) {
@@ -1099,6 +1303,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1099
 
1100
  /**
1101
  * Save multiple files.
 
 
 
1102
  */
1103
  function save_files( $opts, $prefix ) {
1104
  foreach ( $opts as $opt => $file ) {
@@ -1113,6 +1320,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1113
 
1114
  /**
1115
  * Delete multiple files.
 
 
1116
  */
1117
  function delete_files( $opts ) {
1118
  foreach ( $opts as $opt => $file ) {
@@ -1121,6 +1330,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1121
  }
1122
  }
1123
 
 
 
 
 
 
 
1124
  function get_all_images_by_type( $options = null, $p = null ) {
1125
  $img = array();
1126
  if ( empty( $img ) ) {
@@ -1224,10 +1439,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1224
  return $img;
1225
  }
1226
 
 
 
 
 
 
 
1227
  function get_all_images( $options = null, $p = null ) {
1228
  $img = $this->get_all_images_by_type( $options, $p );
1229
  $legacy = array();
1230
  foreach ( $img as $k => $v ) {
 
1231
  if ( $v['type'] == 'featured' ) {
1232
  $legacy[ $v['link'] ] = 1;
1233
  } else {
@@ -1238,7 +1460,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1238
  return $legacy;
1239
  }
1240
 
1241
- /*** Thanks to Justin Tadlock for the original get-the-image code - http://themehybrid.com/plugins/get-the-image ***/
 
 
 
 
 
 
1242
 
1243
  function get_the_image( $options = null, $p = null ) {
1244
 
@@ -1276,10 +1504,20 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1276
  return $image;
1277
  }
1278
 
 
 
 
 
 
1279
  function get_the_image_by_default( $p = null ) {
1280
  return '';
1281
  }
1282
 
 
 
 
 
 
1283
  function get_the_image_by_meta_key( $args = array() ) {
1284
 
1285
  /* If $meta_key is not an array. */
@@ -1300,6 +1538,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1300
  return false;
1301
  }
1302
 
 
 
 
 
 
1303
  function get_the_image_by_post_thumbnail( $p = null ) {
1304
 
1305
  if ( $p === null ) {
@@ -1318,12 +1561,17 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1318
  }
1319
 
1320
  $size = apply_filters( 'post_thumbnail_size', 'large' ); // Check if someone is using built-in WP filter.
1321
- $size = apply_filters( 'aioseop_thumbnail_size', $size );
1322
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1323
 
1324
  return $image[0];
1325
  }
1326
 
 
 
 
 
 
1327
  function get_the_image_by_attachment( $p = null ) {
1328
 
1329
  if ( $p === null ) {
@@ -1342,8 +1590,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1342
  ) );
1343
 
1344
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1345
- $size = 'large';
1346
- $size = apply_filters( 'aioseop_attachment_size', $size );
1347
  $image = wp_get_attachment_image_src( $post->ID, $size );
1348
  }
1349
 
@@ -1358,8 +1606,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1358
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1359
  foreach ( $attachments as $id => $attachment ) {
1360
  if ( ++ $i == 1 ) {
1361
- $size = 'large';
1362
- $size = apply_filters( 'aioseop_attachment_size', $size );
1363
  $image = wp_get_attachment_image_src( $id, $size );
1364
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1365
  break;
@@ -1372,6 +1620,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1372
 
1373
  }
1374
 
 
 
 
 
 
1375
  function get_the_image_by_scan( $p = null ) {
1376
 
1377
  if ( $p === null ) {
@@ -1391,11 +1644,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1391
  return false;
1392
  }
1393
 
1394
- /** crude approximization of whether current user is an admin */
1395
- function is_admin() {
1396
- return current_user_can( 'level_8' );
1397
- }
1398
-
1399
  function help_text_helper( &$default_options, $options, $help_link = '' ) {
1400
  foreach ( $options as $o ) {
1401
  $ht = '';
@@ -1408,7 +1661,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1408
  $ha = '';
1409
  $hl = $help_link;
1410
  if ( strpos( $o, 'ga_' ) === 0 ) { // special case -- pdb
1411
- $hl = 'http://semperplugins.com/documentation/advanced-google-analytics-settings/';
1412
  }
1413
  if ( ! empty( $this->help_anchors[ $o ] ) ) {
1414
  $ha = $this->help_anchors[ $o ];
@@ -1457,7 +1710,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1457
  if ( empty( $screen ) ) {
1458
  $bail = true;
1459
  }
1460
- if( $bail != true ){
1461
  if ( ( $screen->base != 'post' ) && ( $screen->base != 'term' ) && ( $screen->base != 'edit-tags' ) && ( $screen->base != 'toplevel_page_shopp-products' ) ) {
1462
  $bail = true;
1463
  }
@@ -1523,6 +1776,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1523
  }
1524
  }
1525
 
 
 
 
 
 
1526
  function localize_script_data( $data ) {
1527
  if ( ! is_array( $data ) ) {
1528
  $data = array( 0 => $data );
@@ -1583,6 +1841,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1583
  add_action( $this->prefix . 'settings_header', array( $this, 'display_tabs' ) );
1584
  }
1585
 
 
 
 
1586
  function get_admin_links() {
1587
  if ( ! empty( $this->menu_name ) ) {
1588
  $name = $this->menu_name;
@@ -1656,12 +1917,21 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1656
 
1657
  /**
1658
  * Collect metabox data together for tabbed metaboxes.
 
 
 
 
1659
  */
1660
  function filter_return_metaboxes( $args ) {
1661
  return array_merge( $args, $this->post_metaboxes );
1662
  }
1663
 
1664
- /** Add submenu for module, call page hooks, set up metaboxes. */
 
 
 
 
 
1665
  function add_menu( $parent_slug ) {
1666
  if ( ! empty( $this->menu_name ) ) {
1667
  $name = $this->menu_name;
@@ -1754,6 +2024,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1754
 
1755
  /**
1756
  * Update postmeta for metabox.
 
 
1757
  */
1758
  function save_post_data( $post_id ) {
1759
  static $update = false;
@@ -1785,12 +2057,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1785
 
1786
  /**
1787
  * Outputs radio buttons, checkboxes, selects, multiselects, handles groups.
 
 
 
 
1788
  */
1789
  function do_multi_input( $args ) {
1790
  extract( $args );
1791
  $buf1 = '';
1792
  $type = $options['type'];
1793
- if ( ( $type == 'radio' ) || ( $type == 'checkbox' ) ) {
 
 
 
 
 
 
 
 
 
1794
  $strings = array(
1795
  'block' => "%s\n",
1796
  'group' => "\t<b>%s</b><br>\n%s\n",
@@ -1798,15 +2083,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1798
  'item_args' => array( 'sel', 'name', 'v', 'attr', 'subopt' ),
1799
  'selected' => 'checked ',
1800
  );
1801
- } else {
1802
- $strings = array(
1803
- 'block' => "<select name='$name' $attr>%s\n</select>\n",
1804
- 'group' => "\t<optgroup label='%s'>\n%s\t</optgroup>\n",
1805
- 'item' => "\t<option %s value='%s'>%s</option>\n",
1806
- 'item_args' => array( 'sel', 'v', 'subopt' ),
1807
- 'selected' => 'selected ',
1808
- );
1809
  }
 
1810
  $setsel = $strings['selected'];
1811
  if ( isset( $options['initial_options'] ) && is_array( $options['initial_options'] ) ) {
1812
  foreach ( $options['initial_options'] as $l => $option ) {
@@ -1851,6 +2129,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1851
 
1852
  /**
1853
  * Outputs a setting item for settings pages and metaboxes.
 
 
 
 
1854
  */
1855
  function get_option_html( $args ) {
1856
  static $n = 0;
@@ -1948,13 +2230,19 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1948
 
1949
  /**
1950
  * Format a row for an option on a settings page.
 
 
 
 
 
 
1951
  */
1952
  function get_option_row( $name, $opts, $args ) {
1953
  $label_text = $input_attr = $help_text_2 = $id_attr = '';
 
 
1954
  if ( $opts['label'] == 'top' ) {
1955
  $align = 'left';
1956
- } else {
1957
- $align = 'right';
1958
  }
1959
  if ( isset( $opts['id'] ) ) {
1960
  $id_attr .= " id=\"{$opts['id']}_div\" ";
@@ -1980,6 +2268,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1980
 
1981
  /**
1982
  * Display options for settings pages and metaboxes, allows for filtering settings, custom display options.
 
 
 
1983
  */
1984
  function display_options( $location = null, $meta_args = null ) {
1985
  static $location_settings = array();
@@ -2079,6 +2370,11 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2079
  }
2080
  }
2081
 
 
 
 
 
 
2082
  function sanitize_domain( $domain ) {
2083
  $domain = trim( $domain );
2084
  $domain = $this->strtolower( $domain );
@@ -2092,7 +2388,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2092
  return $domain;
2093
  }
2094
 
2095
- /** Sanitize options */
 
 
 
2096
  function sanitize_options( $location = null ) {
2097
  foreach ( $this->setting_options( $location ) as $k => $v ) {
2098
  if ( isset( $this->options[ $k ] ) ) {
@@ -2129,6 +2428,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2129
 
2130
  /**
2131
  * Display metaboxes with display_options()
 
 
 
2132
  */
2133
  function display_metabox( $post, $metabox ) {
2134
  $this->display_options( $metabox['args']['location'], $metabox );
@@ -2136,6 +2438,9 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2136
 
2137
  /**
2138
  * Handle resetting options to defaults.
 
 
 
2139
  */
2140
  function reset_options( $location = null, $delete = false ) {
2141
  if ( $delete === true ) {
@@ -2149,7 +2454,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2149
  $this->update_class_option( $this->options );
2150
  }
2151
 
2152
- /** handle option resetting and updating */
 
 
 
 
 
2153
  function handle_settings_updates( $location = null ) {
2154
  $message = '';
2155
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
@@ -2189,7 +2499,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2189
  return $message;
2190
  }
2191
 
2192
- /** Update / reset settings, printing options, sanitizing, posting back */
 
 
 
2193
  function display_settings_page( $location = null ) {
2194
  if ( $location != null ) {
2195
  $location_info = $this->locations[ $location ];
@@ -2314,6 +2627,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2314
 
2315
  /**
2316
  * Get the prefix used for a given location.
 
 
 
 
2317
  */
2318
  function get_prefix( $location = null ) {
2319
  if ( ( $location != null ) && isset( $this->locations[ $location ]['prefix'] ) ) {
@@ -2323,7 +2640,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2323
  return $this->prefix;
2324
  }
2325
 
2326
- /** Sets up initial settings */
 
 
 
 
 
 
2327
  function setting_options( $location = null, $defaults = null ) {
2328
  if ( $defaults === null ) {
2329
  $defaults = $this->default_options;
@@ -2426,7 +2749,13 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2426
  return $opts;
2427
  }
2428
 
2429
- /** Generates just the default option names and values */
 
 
 
 
 
 
2430
  function default_options( $location = null, $defaults = null ) {
2431
  $options = $this->setting_options( $location, $defaults );
2432
  $opts = array();
@@ -2439,7 +2768,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2439
  return $opts;
2440
  }
2441
 
2442
- /** Gets the current options stored for a given location. */
 
 
 
 
 
 
 
 
2443
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
2444
  $prefix = $this->get_prefix( $location );
2445
  $get_opts = '';
@@ -2476,7 +2813,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
2476
  return $opts;
2477
  }
2478
 
2479
- /** Updates the options array in the module; loads saved settings with get_option() or uses defaults */
 
 
 
 
 
2480
  function update_options( $opts = array(), $location = null, $defaults = null ) {
2481
  if ( $location === null ) {
2482
  $type = 'settings';
2
  /**
3
  * @package All-in-One-SEO-Pack
4
  */
5
+
 
 
6
  if ( ! class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
7
+
8
+ /**
9
+ * The module base class; handles settings, options, menus, metaboxes, etc.
10
+ */
11
  abstract class All_in_One_SEO_Pack_Module {
12
  public static $instance = null;
13
  protected $plugin_name;
37
 
38
  /**
39
  * Handles calls to display_settings_page_{$location}, does error checking.
40
+ *
41
+ * @param $name
42
+ * @param $arguments
43
+ *
44
+ * @throws Exception
45
  */
46
  function __call( $name, $arguments ) {
47
  if ( $this->strpos( $name, 'display_settings_page_' ) === 0 ) {
54
  throw new Exception( $error );
55
  }
56
 
57
+ /**
58
+ * All_in_One_SEO_Pack_Module constructor.
59
+ */
60
  function __construct() {
61
  if ( empty( $this->file ) ) {
62
  $this->file = __FILE__;
90
 
91
  /**
92
  * Update options for module, stored individually or together.
93
+ *
94
+ * @param $option_data
95
+ * @param bool $option_name
96
+ *
97
+ * @return bool
98
  */
99
  function update_class_option( $option_data, $option_name = false ) {
100
  if ( $option_name == false ) {
115
 
116
  /**
117
  * Delete options for module, stored individually or together.
118
+ *
119
+ * @param bool $delete
120
+ *
121
+ * @return bool
122
  */
123
  function delete_class_option( $delete = false ) {
124
  $option_name = $this->get_option_name();
149
 
150
  /**
151
  * Convenience function to see if an option is set.
152
+ *
153
  * @param string $option
154
+ *
155
+ * @param null $location
156
+ *
157
+ * @return bool
158
  */
159
  function option_isset( $option, $location = null ) {
160
  $prefix = $this->get_prefix( $location );
163
  return ( isset( $this->options[ $opt ] ) && $this->options[ $opt ] );
164
  }
165
 
166
+ /*** Case conversion; handle non UTF-8 encodings and fallback **
167
+ *
168
+ * @param $str
169
+ * @param string $mode
170
+ *
171
+ * @return string
172
+ */
173
 
174
  function convert_case( $str, $mode = 'upper' ) {
175
  static $charset = null;
220
  /**
221
  * Convert a string to lower case
222
  * Compatible with mb_strtolower(), an UTF-8 friendly replacement for strtolower()
223
+ *
224
+ * @param $str
225
+ *
226
+ * @return string
227
  */
228
  function strtolower( $str ) {
229
  return $this->convert_case( $str, 'lower' );
232
  /**
233
  * Convert a string to upper case
234
  * Compatible with mb_strtoupper(), an UTF-8 friendly replacement for strtoupper()
235
+ *
236
+ * @param $str
237
+ *
238
+ * @return string
239
  */
240
  function strtoupper( $str ) {
241
  return $this->convert_case( $str, 'upper' );
244
  /**
245
  * Convert a string to title case
246
  * Compatible with mb_convert_case(), an UTF-8 friendly replacement for ucwords()
247
+ *
248
+ * @param $str
249
+ *
250
+ * @return string
251
  */
252
  function ucwords( $str ) {
253
  return $this->convert_case( $str, 'title' );
255
 
256
  /**
257
  * Wrapper for strlen() - uses mb_strlen() if possible.
258
+ *
259
+ * @param $string
260
+ *
261
+ * @return int
262
  */
263
  function strlen( $string ) {
264
  if ( function_exists( 'mb_strlen' ) ) {
270
 
271
  /**
272
  * Wrapper for substr() - uses mb_substr() if possible.
273
+ *
274
+ * @param $string
275
+ * @param int $start
276
+ * @param int $length
277
+ *
278
+ * @return mixed
279
  */
280
  function substr( $string, $start = 0, $length = 2147483647 ) {
281
  $args = func_get_args();
288
 
289
  /**
290
  * Wrapper for strpos() - uses mb_strpos() if possible.
291
+ *
292
+ * @param $haystack
293
  * @param string $needle
294
+ *
295
+ * @param int $offset
296
+ *
297
+ * @return bool|int
298
  */
299
  function strpos( $haystack, $needle, $offset = 0 ) {
300
  if ( function_exists( 'mb_strpos' ) ) {
306
 
307
  /**
308
  * Wrapper for strrpos() - uses mb_strrpos() if possible.
309
+ *
310
+ * @param $haystack
311
  * @param string $needle
312
+ *
313
+ * @param int $offset
314
+ *
315
+ * @return bool|int
316
  */
317
  function strrpos( $haystack, $needle, $offset = 0 ) {
318
  if ( function_exists( 'mb_strrpos' ) ) {
343
  }
344
  }
345
 
346
+ /**
347
+ * @param $xmlstr
348
+ *
349
+ * @return array|string
350
+ */
351
  function xml_string_to_array( $xmlstr ) {
352
  if ( ! class_exists( 'DOMDocument' ) ) {
353
  return array();
361
 
362
  /**
363
  * @param DOMElement $node
364
+ *
365
+ * @return array|string
366
  */
367
  function domnode_to_array( $node ) {
368
  switch ( $node->nodeType ) {
413
  return $output;
414
  }
415
 
416
+ /*** adds support for using %cf_(name of field)% for using custom fields / Advanced Custom Fields in titles / descriptions etc. **
417
+ *
418
+ * @param $format
419
+ *
420
+ * @return mixed
421
+ */
422
  function apply_cf_fields( $format ) {
423
  return preg_replace_callback( '/%cf_([^%]*?)%/', array( $this, 'cf_field_replace' ), $format );
424
  }
425
 
426
+ /**
427
+ * @param $matches
428
+ *
429
+ * @return bool|mixed|string
430
+ */
431
  function cf_field_replace( $matches ) {
432
  $result = '';
433
  if ( ! empty( $matches ) ) {
472
 
473
  /**
474
  * Checks if the plugin is active on a given blog by blogid on a multisite.
475
+ *
476
+ * @param bool $bid
477
+ *
478
+ * @return bool
479
  */
480
  function is_aioseop_active_on_blog( $bid = false ) {
481
  global $blog_id;
492
  return in_array( AIOSEOP_PLUGIN_BASENAME, (array) get_blog_option( $bid, 'active_plugins', array() ) );
493
  }
494
 
495
+ /**
496
+ * @param $list
497
+ * @param string $quote
498
+ *
499
+ * @return string
500
+ */
501
  function quote_list_for_regex( $list, $quote = '/' ) {
502
  $regex = '';
503
  $cont = 0;
513
  }
514
 
515
  // original code thanks to Sean M. Brown -- http://smbrown.wordpress.com/2009/04/29/verify-googlebot-forward-reverse-dns/
516
+ /**
517
+ * @return bool
518
+ */
519
  function is_good_bot() {
520
  $botlist = array(
521
  'Yahoo! Slurp' => 'crawl.yahoo.net',
549
  }
550
  }
551
 
552
+ /**
553
+ * @return array
554
+ */
555
  function default_bad_bots() {
556
  $botlist = array(
557
  'Abonti',
696
  return $botlist;
697
  }
698
 
699
+ /**
700
+ * @return bool
701
+ */
702
  function is_bad_bot() {
703
  $botlist = $this->default_bad_bots();
704
  $botlist = apply_filters( $this->prefix . 'badbotlist', $botlist );
716
  return false;
717
  }
718
 
719
+ /**
720
+ * @return array
721
+ */
722
  function default_bad_referers() {
723
  $referlist = array(
724
  'semalt.com',
751
  return $referlist;
752
  }
753
 
754
+ /**
755
+ * @return bool
756
+ */
757
  function is_bad_referer() {
758
  $referlist = $this->default_bad_referers();
759
  $referlist = apply_filters( $this->prefix . 'badreferlist', $referlist );
769
  return false;
770
  }
771
 
772
+ /**
773
+ * @return mixed|void
774
+ */
775
  function allow_bot() {
776
  $allow_bot = true;
777
  if ( ( ! $this->is_good_bot() ) && $this->is_bad_bot() && ! is_user_logged_in() ) {
783
 
784
  /**
785
  * Displays tabs for tabbed locations on a settings page.
786
+ *
787
+ * @param $location
788
  */
789
  function display_tabs( $location ) {
790
  if ( ( $location != null ) && isset( $locations[ $location ]['tabs'] ) ) {
810
  }
811
  }
812
 
813
+ /**
814
+ * @param $post_objs
815
+ *
816
+ * @return array
817
+ */
818
  function get_object_labels( $post_objs ) {
819
  $pt = array_keys( $post_objs );
820
  $post_types = array();
829
  return $post_types;
830
  }
831
 
832
+ /**
833
+ * @param $post_objs
834
+ *
835
+ * @return array
836
+ */
837
  function get_term_labels( $post_objs ) {
838
  $post_types = array();
839
  foreach ( $post_objs as $p ) {
845
  return $post_types;
846
  }
847
 
848
+ /**
849
+ * @param array $args
850
+ *
851
+ * @return array
852
+ */
853
  function get_post_type_titles( $args = array() ) {
854
  return $this->get_object_labels( get_post_types( $args, 'objects' ) );
855
  }
856
 
857
+ /**
858
+ * @param array $args
859
+ *
860
+ * @return array
861
+ */
862
  function get_taxonomy_titles( $args = array() ) {
863
  return $this->get_object_labels( get_taxonomies( $args, 'objects' ) );
864
  }
865
 
866
+ /**
867
+ * @param array $args
868
+ *
869
+ * @return array
870
+ */
871
  function get_category_titles( $args = array() ) {
872
  return $this->get_term_labels( get_categories( $args ) );
873
  }
874
 
875
  /**
876
  * Helper function for exporting settings on post data.
877
+ *
878
+ * @param string $prefix
879
+ * @param array $query
880
+ *
881
+ * @return string
882
  */
883
  function post_data_export( $prefix = '_aioseop', $query = array( 'posts_per_page' => - 1 ) ) {
884
  $buf = '';
924
 
925
  /**
926
  * Handles exporting settings data for a module.
927
+ *
928
+ * @param $buf
929
+ *
930
+ * @return string
931
  */
932
  function settings_export( $buf ) {
933
  global $aiosp;
993
 
994
  /**
995
  * Print a basic error message.
996
+ *
997
+ * @param $error
998
+ *
999
+ * @return bool
1000
  */
1001
  function output_error( $error ) {
1002
  echo "<div class='aioseop_module error'>$error</div>";
1006
 
1007
  /***
1008
  * Backwards compatibility - see http://php.net/manual/en/function.str-getcsv.php
1009
+ *
1010
+ * @param $input
1011
+ * @param string $delimiter
1012
+ * @param string $enclosure
1013
+ * @param string $escape
1014
+ *
1015
+ * @return array
1016
  */
1017
  function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = "\\" ) {
1018
  $fp = fopen( 'php://memory', 'r+' );
1026
 
1027
  /***
1028
  * Helper function to convert csv in key/value pair format to an associative array.
1029
+ *
1030
+ * @param $csv
1031
+ *
1032
+ * @return array
1033
  */
1034
  function csv_to_array( $csv ) {
1035
  $args = array();
1048
  return $args;
1049
  }
1050
 
1051
+ /** Allow modules to use WP Filesystem if available and desired, fall back to PHP filesystem access otherwise.
1052
+ *
1053
+ * @param string $method
1054
+ * @param bool $form_fields
1055
+ * @param string $url
1056
+ * @param bool $error
1057
+ *
1058
+ * @return bool
1059
+ */
1060
  function use_wp_filesystem( $method = '', $form_fields = false, $url = '', $error = false ) {
1061
  if ( empty( $method ) ) {
1062
  $this->credentials = request_filesystem_credentials( $url );
1103
 
1104
  /**
1105
  * See if a file exists using WP Filesystem.
1106
+ *
1107
  * @param string $filename
1108
+ *
1109
+ * @return bool
1110
  */
1111
  function file_exists( $filename ) {
1112
  $wpfs = $this->get_filesystem_object();
1119
 
1120
  /**
1121
  * See if the directory entry is a file using WP Filesystem.
1122
+ *
1123
+ * @param $filename
1124
+ *
1125
+ * @return bool
1126
  */
1127
  function is_file( $filename ) {
1128
  $wpfs = $this->get_filesystem_object();
1135
 
1136
  /**
1137
  * List files in a directory using WP Filesystem.
1138
+ *
1139
+ * @param $path
1140
+ *
1141
+ * @return array|bool
1142
  */
1143
  function scandir( $path ) {
1144
  $wpfs = $this->get_filesystem_object();
1156
 
1157
  /**
1158
  * Load a file through WP Filesystem; implement basic support for offset and maxlen.
1159
+ *
1160
+ * @param $filename
1161
+ * @param bool $use_include_path
1162
+ * @param null $context
1163
+ * @param int $offset
1164
+ * @param int $maxlen
1165
+ *
1166
+ * @return bool|mixed
1167
  */
1168
  function load_file( $filename, $use_include_path = false, $context = null, $offset = - 1, $maxlen = - 1 ) {
1169
  $wpfs = $this->get_filesystem_object();
1197
 
1198
  /**
1199
  * Save a file through WP Filesystem.
1200
+ *
1201
  * @param string $filename
1202
+ *
1203
+ * @param $contents
1204
+ *
1205
+ * @return bool
1206
  */
1207
  function save_file( $filename, $contents ) {
1208
  $failed_str = __( sprintf( "Failed to write file %s!\n", $filename ), 'all-in-one-seo-pack' );
1226
 
1227
  /**
1228
  * Delete a file through WP Filesystem.
1229
+ *
1230
  * @param string $filename
1231
+ *
1232
+ * @return bool
1233
  */
1234
  function delete_file( $filename ) {
1235
  $wpfs = $this->get_filesystem_object();
1250
 
1251
  /**
1252
  * Rename a file through WP Filesystem.
1253
+ *
1254
  * @param string $filename
1255
  * @param string $newname
1256
+ *
1257
+ * @return bool
1258
  */
1259
  function rename_file( $filename, $newname ) {
1260
  $wpfs = $this->get_filesystem_object();
1281
 
1282
  /**
1283
  * Load multiple files.
1284
+ *
1285
+ * @param $options
1286
+ * @param $opts
1287
+ * @param $prefix
1288
+ *
1289
+ * @return mixed
1290
  */
1291
  function load_files( $options, $opts, $prefix ) {
1292
  foreach ( $opts as $opt => $file ) {
1303
 
1304
  /**
1305
  * Save multiple files.
1306
+ *
1307
+ * @param $opts
1308
+ * @param $prefix
1309
  */
1310
  function save_files( $opts, $prefix ) {
1311
  foreach ( $opts as $opt => $file ) {
1320
 
1321
  /**
1322
  * Delete multiple files.
1323
+ *
1324
+ * @param $opts
1325
  */
1326
  function delete_files( $opts ) {
1327
  foreach ( $opts as $opt => $file ) {
1330
  }
1331
  }
1332
 
1333
+ /**
1334
+ * @param null $options
1335
+ * @param null $p
1336
+ *
1337
+ * @return array
1338
+ */
1339
  function get_all_images_by_type( $options = null, $p = null ) {
1340
  $img = array();
1341
  if ( empty( $img ) ) {
1439
  return $img;
1440
  }
1441
 
1442
+ /**
1443
+ * @param null $options
1444
+ * @param null $p
1445
+ *
1446
+ * @return array
1447
+ */
1448
  function get_all_images( $options = null, $p = null ) {
1449
  $img = $this->get_all_images_by_type( $options, $p );
1450
  $legacy = array();
1451
  foreach ( $img as $k => $v ) {
1452
+ $v['link'] = set_url_scheme($v['link']);
1453
  if ( $v['type'] == 'featured' ) {
1454
  $legacy[ $v['link'] ] = 1;
1455
  } else {
1460
  return $legacy;
1461
  }
1462
 
1463
+ /*** Thanks to Justin Tadlock for the original get-the-image code - http://themehybrid.com/plugins/get-the-image **
1464
+ *
1465
+ * @param null $options
1466
+ * @param null $p
1467
+ *
1468
+ * @return bool|mixed|string
1469
+ */
1470
 
1471
  function get_the_image( $options = null, $p = null ) {
1472
 
1504
  return $image;
1505
  }
1506
 
1507
+ /**
1508
+ * @param null $p
1509
+ *
1510
+ * @return string
1511
+ */
1512
  function get_the_image_by_default( $p = null ) {
1513
  return '';
1514
  }
1515
 
1516
+ /**
1517
+ * @param array $args
1518
+ *
1519
+ * @return bool|mixed
1520
+ */
1521
  function get_the_image_by_meta_key( $args = array() ) {
1522
 
1523
  /* If $meta_key is not an array. */
1538
  return false;
1539
  }
1540
 
1541
+ /**
1542
+ * @param null $p
1543
+ *
1544
+ * @return bool
1545
+ */
1546
  function get_the_image_by_post_thumbnail( $p = null ) {
1547
 
1548
  if ( $p === null ) {
1561
  }
1562
 
1563
  $size = apply_filters( 'post_thumbnail_size', 'large' ); // Check if someone is using built-in WP filter.
1564
+ $size = apply_filters( 'aioseop_thumbnail_size', $size );
1565
  $image = wp_get_attachment_image_src( $post_thumbnail_id, $size );
1566
 
1567
  return $image[0];
1568
  }
1569
 
1570
+ /**
1571
+ * @param null $p
1572
+ *
1573
+ * @return bool
1574
+ */
1575
  function get_the_image_by_attachment( $p = null ) {
1576
 
1577
  if ( $p === null ) {
1590
  ) );
1591
 
1592
  if ( empty( $attachments ) && 'attachment' == get_post_type( $post->ID ) ) {
1593
+ $size = 'large';
1594
+ $size = apply_filters( 'aioseop_attachment_size', $size );
1595
  $image = wp_get_attachment_image_src( $post->ID, $size );
1596
  }
1597
 
1606
  /* Loop through each attachment. Once the $order_of_image (default is '1') is reached, break the loop. */
1607
  foreach ( $attachments as $id => $attachment ) {
1608
  if ( ++ $i == 1 ) {
1609
+ $size = 'large';
1610
+ $size = apply_filters( 'aioseop_attachment_size', $size );
1611
  $image = wp_get_attachment_image_src( $id, $size );
1612
  $alt = trim( strip_tags( get_post_field( 'post_excerpt', $id ) ) );
1613
  break;
1620
 
1621
  }
1622
 
1623
+ /**
1624
+ * @param null $p
1625
+ *
1626
+ * @return bool
1627
+ */
1628
  function get_the_image_by_scan( $p = null ) {
1629
 
1630
  if ( $p === null ) {
1644
  return false;
1645
  }
1646
 
1647
+ /**
1648
+ * @param $default_options
1649
+ * @param $options
1650
+ * @param string $help_link
1651
+ */
1652
  function help_text_helper( &$default_options, $options, $help_link = '' ) {
1653
  foreach ( $options as $o ) {
1654
  $ht = '';
1661
  $ha = '';
1662
  $hl = $help_link;
1663
  if ( strpos( $o, 'ga_' ) === 0 ) { // special case -- pdb
1664
+ $hl = 'https://semperplugins.com/documentation/advanced-google-analytics-settings/';
1665
  }
1666
  if ( ! empty( $this->help_anchors[ $o ] ) ) {
1667
  $ha = $this->help_anchors[ $o ];
1710
  if ( empty( $screen ) ) {
1711
  $bail = true;
1712
  }
1713
+ if ( $bail != true ) {
1714
  if ( ( $screen->base != 'post' ) && ( $screen->base != 'term' ) && ( $screen->base != 'edit-tags' ) && ( $screen->base != 'toplevel_page_shopp-products' ) ) {
1715
  $bail = true;
1716
  }
1776
  }
1777
  }
1778
 
1779
+ /**
1780
+ * @param $data
1781
+ *
1782
+ * @return array
1783
+ */
1784
  function localize_script_data( $data ) {
1785
  if ( ! is_array( $data ) ) {
1786
  $data = array( 0 => $data );
1841
  add_action( $this->prefix . 'settings_header', array( $this, 'display_tabs' ) );
1842
  }
1843
 
1844
+ /**
1845
+ * @return array
1846
+ */
1847
  function get_admin_links() {
1848
  if ( ! empty( $this->menu_name ) ) {
1849
  $name = $this->menu_name;
1917
 
1918
  /**
1919
  * Collect metabox data together for tabbed metaboxes.
1920
+ *
1921
+ * @param $args
1922
+ *
1923
+ * @return array
1924
  */
1925
  function filter_return_metaboxes( $args ) {
1926
  return array_merge( $args, $this->post_metaboxes );
1927
  }
1928
 
1929
+ /** Add submenu for module, call page hooks, set up metaboxes.
1930
+ *
1931
+ * @param $parent_slug
1932
+ *
1933
+ * @return bool
1934
+ */
1935
  function add_menu( $parent_slug ) {
1936
  if ( ! empty( $this->menu_name ) ) {
1937
  $name = $this->menu_name;
2024
 
2025
  /**
2026
  * Update postmeta for metabox.
2027
+ *
2028
+ * @param $post_id
2029
  */
2030
  function save_post_data( $post_id ) {
2031
  static $update = false;
2057
 
2058
  /**
2059
  * Outputs radio buttons, checkboxes, selects, multiselects, handles groups.
2060
+ *
2061
+ * @param $args
2062
+ *
2063
+ * @return string
2064
  */
2065
  function do_multi_input( $args ) {
2066
  extract( $args );
2067
  $buf1 = '';
2068
  $type = $options['type'];
2069
+
2070
+ $strings = array(
2071
+ 'block' => "<select name='$name' $attr>%s\n</select>\n",
2072
+ 'group' => "\t<optgroup label='%s'>\n%s\t</optgroup>\n",
2073
+ 'item' => "\t<option %s value='%s'>%s</option>\n",
2074
+ 'item_args' => array( 'sel', 'v', 'subopt' ),
2075
+ 'selected' => 'selected ',
2076
+ );
2077
+
2078
+ if ( ( $type === 'radio' ) || ( $type === 'checkbox' ) ) {
2079
  $strings = array(
2080
  'block' => "%s\n",
2081
  'group' => "\t<b>%s</b><br>\n%s\n",
2083
  'item_args' => array( 'sel', 'name', 'v', 'attr', 'subopt' ),
2084
  'selected' => 'checked ',
2085
  );
 
 
 
 
 
 
 
 
2086
  }
2087
+
2088
  $setsel = $strings['selected'];
2089
  if ( isset( $options['initial_options'] ) && is_array( $options['initial_options'] ) ) {
2090
  foreach ( $options['initial_options'] as $l => $option ) {
2129
 
2130
  /**
2131
  * Outputs a setting item for settings pages and metaboxes.
2132
+ *
2133
+ * @param $args
2134
+ *
2135
+ * @return string
2136
  */
2137
  function get_option_html( $args ) {
2138
  static $n = 0;
2230
 
2231
  /**
2232
  * Format a row for an option on a settings page.
2233
+ *
2234
+ * @param $name
2235
+ * @param $opts
2236
+ * @param $args
2237
+ *
2238
+ * @return string
2239
  */
2240
  function get_option_row( $name, $opts, $args ) {
2241
  $label_text = $input_attr = $help_text_2 = $id_attr = '';
2242
+
2243
+ $align = 'right';
2244
  if ( $opts['label'] == 'top' ) {
2245
  $align = 'left';
 
 
2246
  }
2247
  if ( isset( $opts['id'] ) ) {
2248
  $id_attr .= " id=\"{$opts['id']}_div\" ";
2268
 
2269
  /**
2270
  * Display options for settings pages and metaboxes, allows for filtering settings, custom display options.
2271
+ *
2272
+ * @param null $location
2273
+ * @param null $meta_args
2274
  */
2275
  function display_options( $location = null, $meta_args = null ) {
2276
  static $location_settings = array();
2370
  }
2371
  }
2372
 
2373
+ /**
2374
+ * @param $domain
2375
+ *
2376
+ * @return mixed|string
2377
+ */
2378
  function sanitize_domain( $domain ) {
2379
  $domain = trim( $domain );
2380
  $domain = $this->strtolower( $domain );
2388
  return $domain;
2389
  }
2390
 
2391
+ /** Sanitize options
2392
+ *
2393
+ * @param null $location
2394
+ */
2395
  function sanitize_options( $location = null ) {
2396
  foreach ( $this->setting_options( $location ) as $k => $v ) {
2397
  if ( isset( $this->options[ $k ] ) ) {
2428
 
2429
  /**
2430
  * Display metaboxes with display_options()
2431
+ *
2432
+ * @param $post
2433
+ * @param $metabox
2434
  */
2435
  function display_metabox( $post, $metabox ) {
2436
  $this->display_options( $metabox['args']['location'], $metabox );
2438
 
2439
  /**
2440
  * Handle resetting options to defaults.
2441
+ *
2442
+ * @param null $location
2443
+ * @param bool $delete
2444
  */
2445
  function reset_options( $location = null, $delete = false ) {
2446
  if ( $delete === true ) {
2454
  $this->update_class_option( $this->options );
2455
  }
2456
 
2457
+ /** handle option resetting and updating
2458
+ *
2459
+ * @param null $location
2460
+ *
2461
+ * @return mixed|string|void
2462
+ */
2463
  function handle_settings_updates( $location = null ) {
2464
  $message = '';
2465
  if ( ( isset( $_POST['action'] ) && $_POST['action'] == 'aiosp_update_module' &&
2499
  return $message;
2500
  }
2501
 
2502
+ /** Update / reset settings, printing options, sanitizing, posting back
2503
+ *
2504
+ * @param null $location
2505
+ */
2506
  function display_settings_page( $location = null ) {
2507
  if ( $location != null ) {
2508
  $location_info = $this->locations[ $location ];
2627
 
2628
  /**
2629
  * Get the prefix used for a given location.
2630
+ *
2631
+ * @param null $location
2632
+ *
2633
+ * @return
2634
  */
2635
  function get_prefix( $location = null ) {
2636
  if ( ( $location != null ) && isset( $this->locations[ $location ]['prefix'] ) ) {
2640
  return $this->prefix;
2641
  }
2642
 
2643
+ /** Sets up initial settings
2644
+ *
2645
+ * @param null $location
2646
+ * @param null $defaults
2647
+ *
2648
+ * @return array
2649
+ */
2650
  function setting_options( $location = null, $defaults = null ) {
2651
  if ( $defaults === null ) {
2652
  $defaults = $this->default_options;
2749
  return $opts;
2750
  }
2751
 
2752
+ /** Generates just the default option names and values
2753
+ *
2754
+ * @param null $location
2755
+ * @param null $defaults
2756
+ *
2757
+ * @return array
2758
+ */
2759
  function default_options( $location = null, $defaults = null ) {
2760
  $options = $this->setting_options( $location, $defaults );
2761
  $opts = array();
2768
  return $opts;
2769
  }
2770
 
2771
+ /** Gets the current options stored for a given location.
2772
+ *
2773
+ * @param array $opts
2774
+ * @param null $location
2775
+ * @param null $defaults
2776
+ * @param null $post
2777
+ *
2778
+ * @return array
2779
+ */
2780
  function get_current_options( $opts = array(), $location = null, $defaults = null, $post = null ) {
2781
  $prefix = $this->get_prefix( $location );
2782
  $get_opts = '';
2813
  return $opts;
2814
  }
2815
 
2816
+ /** Updates the options array in the module; loads saved settings with get_option() or uses defaults
2817
+ *
2818
+ * @param array $opts
2819
+ * @param null $location
2820
+ * @param null $defaults
2821
+ */
2822
  function update_options( $opts = array(), $location = null, $defaults = null ) {
2823
  if ( $location === null ) {
2824
  $type = 'settings';
admin/display/dashboard_widget.php CHANGED
@@ -9,6 +9,9 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
9
  */
10
  class aioseop_dashboard_widget {
11
 
 
 
 
12
  function __construct() {
13
  add_action( "wp_dashboard_setup", array( $this, 'aioseop_add_dashboard_widget' ) );
14
  }
@@ -30,11 +33,11 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
30
  /**
31
  * @since 2.3.10.2
32
  */
33
- function show_widget(){
34
 
35
  $show = true;
36
 
37
- if( apply_filters( 'aioseo_show_seo_news', true) === false ){
38
  // API filter hook to disable showing SEO News dashboard widget.
39
  return false;
40
  }
@@ -60,6 +63,7 @@ if ( ! class_exists( 'aioseop_dashboard_widget' ) ) {
60
  $rss = fetch_feed( "https://www.semperplugins.com/feed/" );
61
  if ( is_wp_error( $rss ) ) {
62
  echo '{Temporarily unable to load feed.}';
 
63
  return;
64
  }
65
  $rss_items = $rss->get_items( 0, 4 ); // Show four items.
9
  */
10
  class aioseop_dashboard_widget {
11
 
12
+ /**
13
+ * Add the action to the constructor.
14
+ */
15
  function __construct() {
16
  add_action( "wp_dashboard_setup", array( $this, 'aioseop_add_dashboard_widget' ) );
17
  }
33
  /**
34
  * @since 2.3.10.2
35
  */
36
+ function show_widget() {
37
 
38
  $show = true;
39
 
40
+ if ( apply_filters( 'aioseo_show_seo_news', true ) === false ) {
41
  // API filter hook to disable showing SEO News dashboard widget.
42
  return false;
43
  }
63
  $rss = fetch_feed( "https://www.semperplugins.com/feed/" );
64
  if ( is_wp_error( $rss ) ) {
65
  echo '{Temporarily unable to load feed.}';
66
+
67
  return;
68
  }
69
  $rss_items = $rss->get_items( 0, 4 ); // Show four items.
admin/display/general-metaboxes.php CHANGED
@@ -13,7 +13,6 @@ class aiosp_metaboxes {
13
 
14
  }
15
 
16
-
17
  /**
18
  * @param $add
19
  * @param $meta
@@ -25,8 +24,7 @@ class aiosp_metaboxes {
25
  ?>
26
  <div class="aioseop_metabox_text">
27
  <p><h2
28
- style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2><?php sprintf( __( 'by %s of %s.', 'all-in-one-seo-pack' ), 'Michael Torbert', '<a target="_blank" title="Semper Fi Web Design"
29
- href="https://semperfiwebdesign.com/">Semper Fi Web Design</a>' ); ?>.</p>
30
  <?php
31
  global $current_user;
32
  $user_id = $current_user->ID;
@@ -41,7 +39,7 @@ class aiosp_metaboxes {
41
  if ( ! AIOSEOPPRO ) {
42
  ?>
43
  <p>
44
- <strong><?php echo aiosp_common::get_upgrade_hyperlink( 'side', __( 'Pro Version', 'all-in-one-seo-pack' ), __( 'UPGRADE TO PRO VERSION', 'all-in-one-seo-pack' ), '_blank' ); ?></strong>
45
  </p>
46
  <?php } ?>
47
  </div>
@@ -52,37 +50,20 @@ class aiosp_metaboxes {
52
 
53
  <?php if ( ! AIOSEOPPRO ) { ?>
54
  <div class="aioseop_metabox_text">
55
- <p>If you like this plugin and find it useful, help keep this plugin free and actively
56
- developed by clicking the <a
57
- href="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"
58
- target="_blank"><strong>donate</strong></a> button or send me a gift from my <a
59
- href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank">
60
- <strong>Amazon wishlist</strong></a>. Also, don't forget to follow me on <a
61
- href="https://twitter.com/michaeltorbert/"
62
- target="_blank"><strong>Twitter</strong></a>.
63
  </p>
64
  </div>
65
  <?php } ?>
66
 
67
  <div class="aioseop_metabox_feature">
68
 
69
- <?php if ( ! AIOSEOPPRO ) { ?>
70
- <a target="_blank" title="<?php _e( 'Donate', 'all-in-one-seo-pack' ); ?>"
71
- href="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">
72
- <img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/donate.jpg"
73
- alt="<?php _e( 'Donate with Paypal', 'all-in-one-seo-pack' ); ?>"/> </a>
74
- <a target="_blank" title="Amazon Wish List"
75
- href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web">
76
- <img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/amazon.jpg"
77
- alt="<?php _e( 'My Amazon Wish List', 'all-in-one-seo-pack' ); ?>"/> </a>
78
- <?php } ?>
79
-
80
- <a target="_blank" title="<?php _e( 'Follow us on Facebook', 'all-in-one-seo-pack' ); ?>"
81
- href="https://www.facebook.com/aioseopack/"><span
82
- class="aioseop_follow_button aioseop_facebook_follow"></span></a>
83
- <a target="_blank" title="<?php _e( 'Follow us on Twitter', 'all-in-one-seo-pack' ); ?>"
84
- href="https://twitter.com/aioseopack"><span
85
- class="aioseop_follow_button aioseop_twitter_follow"></span></a>
86
  </div><?php
87
 
88
  $aiosp_trans = new AIOSEOP_Translations();
@@ -164,5 +145,24 @@ class aiosp_metaboxes {
164
  echo '</div>';
165
  }
166
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  }
13
 
14
  }
15
 
 
16
  /**
17
  * @param $add
18
  * @param $meta
24
  ?>
25
  <div class="aioseop_metabox_text">
26
  <p><h2
27
+ style="display:inline;"><?php echo AIOSEOP_PLUGIN_NAME; ?></h2></p>
 
28
  <?php
29
  global $current_user;
30
  $user_id = $current_user->ID;
39
  if ( ! AIOSEOPPRO ) {
40
  ?>
41
  <p>
42
+ <strong><?php echo aiosp_common::get_upgrade_hyperlink( 'side', __( 'Pro Version', 'all-in-one-seo-pack' ), __( 'CLICK HERE', 'all-in-one-seo-pack' ), '_blank' ); ?> to upgrade to Pro Version and get:</strong>
43
  </p>
44
  <?php } ?>
45
  </div>
50
 
51
  <?php if ( ! AIOSEOPPRO ) { ?>
52
  <div class="aioseop_metabox_text">
53
+ <p>
54
+ <?php self::pro_meta_content(); ?>
 
 
 
 
 
 
55
  </p>
56
  </div>
57
  <?php } ?>
58
 
59
  <div class="aioseop_metabox_feature">
60
 
61
+ <div class="aiosp-di">
62
+ <a class="dashicons di-twitter" target="_blank" href="https://twitter.com/aioseopack" title="Follow me on Twitter"></a>
63
+
64
+ <a class="dashicons di-facebook" target="_blank" href="https://www.facebook.com/aioseopack" title="Follow me on Facebook"></a>
65
+ </div>
66
+
 
 
 
 
 
 
 
 
 
 
 
67
  </div><?php
68
 
69
  $aiosp_trans = new AIOSEOP_Translations();
145
  echo '</div>';
146
  }
147
 
148
+ static function pro_meta_content() {
149
+
150
+ echo '<ul>';
151
+
152
+ if ( class_exists( 'WooCommerce' ) ) {
153
+ echo '<li>Advanced support for WooCommerce</li>';
154
+ }else{
155
+ echo '<li>Advanced support for e-commerce</li>';
156
+ }
157
+
158
+ echo '<li>Video SEO Module</li>';
159
+ echo '<li>SEO for Categories, Tags and Custom Taxonomies</li>';
160
+ echo '<li>Access to Video Screencasts</li>';
161
+ echo '<li>Access to Premium Support Forums</li>';
162
+ echo '<li>Access to Knowledge Center</li>';
163
+
164
+ echo '</ul>';
165
+
166
+ }
167
 
168
  }
admin/display/welcome-content.php CHANGED
@@ -3,35 +3,65 @@
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 many 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
  </div>
12
 
13
  <div class="welcome-panel-column">
14
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
15
  <ul>
16
- <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>
17
- <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>
18
- <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>
19
- <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>
20
- <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>
21
- <li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/" target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a></li>
22
- <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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  </ul>
24
  </div>
25
 
26
  <div class="welcome-panel-column">
27
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
28
  <ul>
29
- <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>
30
- <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>
31
- <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>
 
 
 
 
 
 
32
  </ul>
33
  </div>
34
  </div>
35
  </div>
36
- <p><a href="/wp-admin/admin.php?page=all-in-one-seo-pack%2Faioseop_class.php"><?php _e( 'Continue to the General Settings', 'all-in-one-seo-pack' ); ?></a> &raquo;</p>
 
 
37
  </div>
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 many 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
9
+ href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
10
+ target="_blank"
11
+ class="button button-primary button-orange"><?php echo __( 'Upgrade', 'all-in-one-seo-pack' ); ?></a>
12
+ </p>
13
+ <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>
14
+ <p class="call-to-action"><a
15
+ href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack"
16
+ class="button button-primary"
17
+ target="_blank"><?php echo __( 'Translate', 'all-in-one-seo-pack' ); ?></a></p>
18
  </div>
19
 
20
  <div class="welcome-panel-column">
21
  <h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
22
  <ul>
23
+ <li><a href="https://semperplugins.com/documentation/quick-start-guide/"
24
+ target="_blank"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a>
25
+ </li>
26
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
27
+ target="_blank"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
28
+ </li>
29
+ <li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
30
+ target="_blank"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
31
+ </li>
32
+ <li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
33
+ target="_blank"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
34
+ </li>
35
+ <li>
36
+ <a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
37
+ target="_blank"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
38
+ </li>
39
+ <li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
40
+ target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
41
+ </li>
42
+ <li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/"
43
+ target="_blank"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
44
+ </li>
45
  </ul>
46
  </div>
47
 
48
  <div class="welcome-panel-column">
49
  <h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
50
  <ul>
51
+ <li><a href="https://semperplugins.com/documentation/"
52
+ target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
53
+ </li>
54
+ <li><a href="https://semperplugins.com/videos/"
55
+ target="_blank"><?php echo __( 'You can get access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
56
+ </li>
57
+ <li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
58
+ target="_blank"><?php echo __( 'You can control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
59
+ </li>
60
  </ul>
61
  </div>
62
  </div>
63
  </div>
64
+ <p>
65
+ <a href=" <?php echo get_admin_url( null, 'admin.php?page=' . AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class.php' ); ?> "><?php _e( 'Continue to the General Settings', 'all-in-one-seo-pack' ); ?></a> &raquo;
66
+ </p>
67
  </div>
admin/display/welcome.php CHANGED
@@ -2,7 +2,13 @@
2
 
3
  if ( ! class_exists( 'aioseop_welcome' ) ) {
4
 
 
 
 
5
  class aioseop_welcome {
 
 
 
6
  function __construct() {
7
 
8
  if ( AIOSEOPPRO ) {
@@ -15,6 +21,11 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
15
 
16
  }
17
 
 
 
 
 
 
18
  function welcome_screen_assets( $hook ) {
19
 
20
  if ( 'dashboard_page_aioseop-about' === $hook ) {
@@ -24,11 +35,17 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
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' ),
@@ -40,7 +57,12 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
40
 
41
  }
42
 
43
- function init( $activate = FALSE ) {
 
 
 
 
 
44
 
45
  if ( AIOSEOPPRO ) {
46
  return;
@@ -59,12 +81,12 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
59
  return;
60
  }
61
  $seen = 0;
62
- $seen = get_user_meta( get_current_user_id(), 'aioseop_seen_about_page', true);
63
- if( get_user_meta( get_current_user_id(), 'aioseop_seen_about_page', true) === AIOSEOP_VERSION && $activate !== TRUE ){
64
  return;
65
  }
66
 
67
- update_user_meta( get_current_user_id(), 'aioseop_seen_about_page', AIOSEOP_VERSION);
68
 
69
  aiosp_common::clear_wpe_cache();
70
 
@@ -72,6 +94,9 @@ if ( ! class_exists( 'aioseop_welcome' ) ) {
72
  exit;
73
  }
74
 
 
 
 
75
  function about_screen() {
76
  aiosp_common::clear_wpe_cache();
77
  $version = AIOSEOP_VERSION;
2
 
3
  if ( ! class_exists( 'aioseop_welcome' ) ) {
4
 
5
+ /**
6
+ * Class aioseop_welcome
7
+ */
8
  class aioseop_welcome {
9
+ /**
10
+ * Constructor to add the actions.
11
+ */
12
  function __construct() {
13
 
14
  if ( AIOSEOPPRO ) {
21
 
22
  }
23
 
24
+ /**
25
+ * Enqueues style and script.
26
+ *
27
+ * @param $hook
28
+ */
29
  function welcome_screen_assets( $hook ) {
30
 
31
  if ( 'dashboard_page_aioseop-about' === $hook ) {
35
  }
36
  }
37
 
38
+ /**
39
+ * Removes unneeded pages.
40
+ */
41
  function remove_pages() {
42
  remove_submenu_page( 'index.php', 'aioseop-about' );
43
  remove_submenu_page( 'index.php', 'aioseop-credits' );
44
  }
45
 
46
+ /**
47
+ * Adds (hidden) menu.
48
+ */
49
  function add_menus() {
50
  add_dashboard_page(
51
  __( 'Welcome to All in One SEO Pack', 'all-in-one-seo-pack' ),
57
 
58
  }
59
 
60
+ /**
61
+ * Initial stuff.
62
+ *
63
+ * @param bool $activate
64
+ */
65
+ function init( $activate = false ) {
66
 
67
  if ( AIOSEOPPRO ) {
68
  return;
81
  return;
82
  }
83
  $seen = 0;
84
+ $seen = get_user_meta( get_current_user_id(), 'aioseop_seen_about_page', true );
85
+ if ( AIOSEOP_VERSION === get_user_meta( get_current_user_id(), 'aioseop_seen_about_page', true ) && true !== $activate ) {
86
  return;
87
  }
88
 
89
+ update_user_meta( get_current_user_id(), 'aioseop_seen_about_page', AIOSEOP_VERSION );
90
 
91
  aiosp_common::clear_wpe_cache();
92
 
94
  exit;
95
  }
96
 
97
+ /**
98
+ * Outputs the about screen.
99
+ */
100
  function about_screen() {
101
  aiosp_common::clear_wpe_cache();
102
  $version = AIOSEOP_VERSION;
admin/meta_import.php CHANGED
@@ -38,7 +38,9 @@ if ( class_exists( 'WPSEO_Import_Hooks' ) ) {
38
  }
39
  }
40
  } else {
41
- add_action( 'init', 'mi_aioseop_yst_detected_notice_dismissed' );
 
 
42
  }
43
 
44
  /**
@@ -162,7 +164,7 @@ function aiosp_seometa_admin() {
162
  </p>
163
 
164
  <p><span
165
- class="row-title"><?php printf( esc_html__( 'Before performing an import, we strongly recommend that you make a backup of your site. We use and recommend %s BackupBuddy %s for backups.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'http://semperfiwebdesign.com/backupbuddy/' ) ), '</a>' ); ?></span>
166
  </p>
167
 
168
 
38
  }
39
  }
40
  } else {
41
+ if(is_admin()) {
42
+ add_action( 'init', 'mi_aioseop_yst_detected_notice_dismissed' );
43
+ }
44
  }
45
 
46
  /**
164
  </p>
165
 
166
  <p><span
167
+ class="row-title"><?php printf( esc_html__( 'Before performing an import, we strongly recommend that you make a backup of your site. We use and recommend %s BackupBuddy %s for backups.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperfiwebdesign.com/backupbuddy/' ) ), '</a>' ); ?></span>
168
  </p>
169
 
170
 
aioseop_class.php CHANGED
@@ -76,12 +76,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
76
  parent::__construct();
77
 
78
  $this->help_text = array(
79
- 'donate' => __( 'All donations support continued development of this free software.', 'all-in-one-seo-pack' ),
80
  'license_key' => __( 'This will be the license key received when the product was purchased. This is used for automatic upgrades.', 'all-in-one-seo-pack' ),
81
- 'can' => __( "This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by <a href=\'http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html\' target=\'_blank\'>Google</a>.", 'all-in-one-seo-pack' ),
82
  'no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
83
  'customize_canonical_links' => __( 'Checking this option will allow you to customize Canonical URLs for specific posts.', 'all-in-one-seo-pack' ),
84
- 'can_set_protocol' => __( 'Set protocol for canonical URLs.', 'all-in-one-seo-pack' ),
85
  'use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
86
  'do_log' => __( 'Check this and All in One SEO Pack will create a log of important events (all-in-one-seo-pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.', 'all-in-one-seo-pack' ),
87
  'home_title' => __( 'As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.', 'all-in-one-seo-pack' ),
@@ -102,7 +100,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
102
  __( "%page_author_login% - This page's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
103
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
104
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
105
- __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li></ul>',
 
106
  'page_title_format' =>
107
  __( 'This controls the format of the title tag for Pages.<br />The following macros are supported:', 'all-in-one-seo-pack' )
108
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -111,7 +110,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
111
  __( "%page_author_login% - This page's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
112
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
113
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
114
- __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li></ul>',
 
115
  'post_title_format' =>
116
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
117
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -122,7 +122,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
122
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
123
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
125
- __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li></ul>',
 
126
  'category_title_format' =>
127
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
128
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -162,7 +163,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
162
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
163
  __( '%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all-in-one-seo-pack' ) . '</li><li>' .
164
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
165
- __( '%wp_title% - The original wordpress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '</li></ul>',
 
166
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
167
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
168
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
@@ -178,9 +180,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
178
  'taxactive' => __( 'Use these checkboxes to select which Taxonomies you want to use All in One SEO Pack with.', 'all-in-one-seo-pack' ),
179
  'cposttitles' => __( 'This allows you to set the title tags for each Custom Post Type.', 'all-in-one-seo-pack' ),
180
  'posttypecolumns' => __( 'This lets you select which screens display the SEO Title, SEO Keywords and SEO Description columns.', 'all-in-one-seo-pack' ),
181
- 'google_verify' => __( "Enter your verification code here to verify your site with Google Webmaster Tools.<br /><a href='http://semperplugins.com/documentation/google-webmaster-tools-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
182
- 'bing_verify' => __( "Enter your verification code here to verify your site with Bing Webmaster Tools.<br /><a href='http://semperplugins.com/documentation/bing-webmaster-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
183
- 'pinterest_verify' => __( "Enter your verification code here to verify your site with Pinterest.<br /><a href='http://semperplugins.com/documentation/pinterest-site-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
184
  'google_publisher' => __( 'Enter your Google+ Profile URL here to add the rel=“author” tag to your site for Google authorship. It is recommended that the URL you enter here should be your personal Google+ profile. Use the Advanced Authorship Options below if you want greater control over the use of authorship.', 'all-in-one-seo-pack' ),
185
  'google_disable_profile' => __( 'Check this to remove the Google Plus field from the user profile screen.', 'all-in-one-seo-pack' ),
186
  'google_author_advanced' => __( 'Enable this to display advanced options for controlling Google Plus authorship information on your website.', 'all-in-one-seo-pack' ),
@@ -237,7 +239,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
237
  'can' => '#canonical-urls',
238
  'no_paged_canonical_links' => '#no-pagination-for-canonical-urls',
239
  'customize_canonical_links' => '#enable-custom-canonical-urls',
240
- 'can_set_protocol' => '#set-protocol-for-canonical-urls',
241
  'use_original_title' => '#use-original-title',
242
  'schema_markup' => '#use-schema-markup',
243
  'do_log' => '#log-important-events',
@@ -280,7 +281,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
280
  'google_author_location' => '#display-google-authorship',
281
  'google_enable_publisher' => '#display-publisher-meta-on-front-page',
282
  'google_specify_publisher' => '#specify-publisher-url',
283
- 'google_analytics_id' => 'http://semperplugins.com/documentation/setting-up-google-analytics/',
284
  'ga_domain' => '#tracking-domain',
285
  'ga_multi_domain' => '#track-multiple-domains-additional-domains',
286
  'ga_addl_domains' => '#track-multiple-domains-additional-domains',
@@ -329,8 +330,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
329
  'nofollow' => __( 'Check this box to ask search engines not to follow links from this page.', 'all-in-one-seo-pack' ),
330
  'noodp' => __( 'Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all-in-one-seo-pack' ),
331
  'noydir' => __( 'Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page.', 'all-in-one-seo-pack' ),
332
- 'titleatr' => __( 'Set the title attribute for menu links.', 'all-in-one-seo-pack' ),
333
- 'menulabel' => __( 'Set the label for this page menu item.', 'all-in-one-seo-pack' ),
334
  'sitemap_exclude' => __( "Don't display this page in the sitemap.", 'all-in-one-seo-pack' ),
335
  'disable' => __( 'Disable SEO on this page.', 'all-in-one-seo-pack' ),
336
  'disable_analytics' => __( 'Disable Google Analytics on this page.', 'all-in-one-seo-pack' ),
@@ -341,9 +340,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
341
  'name' => __( 'License Key:', 'all-in-one-seo-pack' ),
342
  'type' => 'text',
343
  ),
344
- 'donate' => array(
345
- 'name' => __( 'I enjoy this plugin and have made a donation:', 'all-in-one-seo-pack' ),
346
- ),
347
  'home_title' => array(
348
  'name' => __( 'Home Title:', 'all-in-one-seo-pack' ),
349
  'default' => null,
@@ -403,17 +399,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
403
  'default' => 0,
404
  'condshow' => array( 'aiosp_can' => 'on' ),
405
  ),
406
- 'can_set_protocol' => array(
407
- 'name' => __( 'Set Protocol For Canonical URLs:', 'all-in-one-seo-pack' ),
408
- 'type' => 'radio',
409
- 'default' => 'auto',
410
- 'initial_options' => array(
411
- 'auto' => __( 'Auto', 'all-in-one-seo-pack' ),
412
- 'http' => __( 'HTTP', 'all-in-one-seo-pack' ),
413
- 'https' => __( 'HTTPS', 'all-in-one-seo-pack' ),
414
- ),
415
- 'condshow' => array( 'aiosp_can' => 'on' ),
416
- ),
417
  'rewrite_titles' => array(
418
  'name' => __( 'Rewrite Titles:', 'all-in-one-seo-pack' ),
419
  'default' => 1,
@@ -915,9 +900,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
915
  ),
916
  );
917
 
918
- if ( AIOSEOPPRO ) {
919
- unset( $this->default_options['donate'] );
920
- } else {
921
  unset( $this->default_options['license_key'] );
922
  unset( $this->default_options['taxactive'] );
923
  }
@@ -928,7 +911,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
928
  'name' => $this->plugin_name,
929
  'type' => 'metabox',
930
  'prefix' => '',
931
- 'help_link' => 'http://semperplugins.com/sections/postpage-settings/',
932
  'options' => array(
933
  'edit',
934
  'nonce-aioseop-edit',
@@ -942,8 +925,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
942
  'nofollow',
943
  'noodp',
944
  'noydir',
945
- 'titleatr',
946
- 'menulabel',
947
  'sitemap_exclude',
948
  'disable',
949
  'disable_analytics',
@@ -1022,16 +1003,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1022
  ),
1023
  'noodp' => array( 'name' => __( 'Robots Meta NOODP', 'all-in-one-seo-pack' ) ),
1024
  'noydir' => array( 'name' => __( 'Robots Meta NOYDIR', 'all-in-one-seo-pack' ) ),
1025
- 'titleatr' => array(
1026
- 'name' => __( 'Title Attribute', 'all-in-one-seo-pack' ),
1027
- 'type' => 'text',
1028
- 'size' => 60,
1029
- ),
1030
- 'menulabel' => array(
1031
- 'name' => __( 'Menu Label', 'all-in-one-seo-pack' ),
1032
- 'type' => 'text',
1033
- 'size' => 60,
1034
- ),
1035
  'sitemap_exclude' => array( 'name' => __( 'Exclude From Sitemap', 'all-in-one-seo-pack' ) ),
1036
  'disable' => array( 'name' => __( 'Disable on this page/post', 'all-in-one-seo-pack' ) ),
1037
  'disable_analytics' => array(
@@ -1083,22 +1054,22 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1083
  ),
1084
  'cpt' => array(
1085
  'name' => __( 'Custom Post Type Settings', 'all-in-one-seo-pack' ),
1086
- 'help_link' => 'http://semperplugins.com/documentation/custom-post-type-settings/',
1087
  'options' => array( 'enablecpost', 'cpostadvanced', 'taxactive', 'cpostactive', 'cposttitles' ),
1088
  ),
1089
  'display' => array(
1090
  'name' => __( 'Display Settings', 'all-in-one-seo-pack' ),
1091
- 'help_link' => 'http://semperplugins.com/documentation/display-settings/',
1092
  'options' => array( 'posttypecolumns' ),
1093
  ),
1094
  'webmaster' => array(
1095
  'name' => __( 'Webmaster Verification', 'all-in-one-seo-pack' ),
1096
- 'help_link' => 'http://semperplugins.com/sections/webmaster-verification/',
1097
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify' ),
1098
  ),
1099
  'google' => array(
1100
  'name' => __( 'Google Settings', 'all-in-one-seo-pack' ),
1101
- 'help_link' => 'http://semperplugins.com/documentation/google-settings/',
1102
  'options' => array(
1103
  'google_publisher',
1104
  'google_disable_profile',
@@ -1125,7 +1096,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1125
  ),
1126
  'noindex' => array(
1127
  'name' => __( 'Noindex Settings', 'all-in-one-seo-pack' ),
1128
- 'help_link' => 'http://semperplugins.com/documentation/noindex-settings/',
1129
  'options' => array(
1130
  'cpostnoindex',
1131
  'cpostnofollow',
@@ -1164,7 +1135,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1164
  ),
1165
  'keywords' => array(
1166
  'name' => __( 'Keyword Settings', 'all-in-one-seo-pack' ),
1167
- 'help_link' => 'http://semperplugins.com/documentation/keyword-settings/',
1168
  'options' => array(
1169
  'togglekeywords',
1170
  'use_categories',
@@ -1250,6 +1221,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1250
  if ( strpos( $title_format, '%page_title%' ) !== false ) {
1251
  $title_format = str_replace( '%page_title%', $replace_title, $title_format );
1252
  }
 
 
 
1253
  if ( $w->is_category || $w->is_tag || $w->is_tax ) {
1254
  if ( AIOSEOPPRO && ! empty( $_GET ) && ! empty( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && function_exists( 'wp_get_split_terms' ) ) {
1255
  $term_id = intval( $_GET['tag_ID'] );
@@ -1514,8 +1488,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1514
  'nofollow',
1515
  'noodp',
1516
  'noydir',
1517
- 'titleatr',
1518
- 'menulabel',
1519
  );
1520
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
1521
  unset( $optlist['custom_link'] );
@@ -2146,6 +2118,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2146
  if ( strpos( $new_title, "%{$type}_author_lastname%" ) !== false ) {
2147
  $new_title = str_replace( "%{$type}_author_lastname%", $this->ucwords( $authordata->last_name ), $new_title );
2148
  }
 
 
 
2149
  $title = trim( $new_title );
2150
 
2151
  return $title;
@@ -2768,16 +2743,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
2768
  if ( apply_filters( 'aioseop_canonical_url_pagination', $show_page ) ) {
2769
  $link = $this->get_paged( $link );
2770
  }
2771
- if ( ! empty( $link ) ) {
2772
- global $aioseop_options;
2773
- if ( isset( $aioseop_options['aiosp_can_set_protocol'] ) && ( 'auto' !== $aioseop_options['aiosp_can_set_protocol'] ) ) {
2774
- if ( 'http' === $aioseop_options['aiosp_can_set_protocol'] ) {
2775
- $link = preg_replace( '/^https:/i', 'http:', $link );
2776
- } elseif ( 'https' === $aioseop_options['aiosp_can_set_protocol'] ) {
2777
- $link = preg_replace( '/^http:/i', 'https:', $link );
2778
- }
2779
- }
2780
- }
2781
 
2782
  return $link;
2783
  }
@@ -3019,8 +2984,6 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3019
  'nofollow',
3020
  'noodp',
3021
  'noydir',
3022
- 'titleatr',
3023
- 'menulabel',
3024
  );
3025
  foreach ( $optlist as $f ) {
3026
  $meta = get_term_meta( $term_id, '_aioseop_' . $f, true );
@@ -3035,7 +2998,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3035
  function add_page_icon() {
3036
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
3037
  wp_enqueue_style( 'wp-pointer' );
3038
- $this->add_admin_pointers();
3039
 
3040
  wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css' );
3041
  ?>
@@ -3087,43 +3050,57 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3087
  }
3088
 
3089
  function add_admin_pointers() {
 
 
3090
  if ( AIOSEOPPRO ) {
3091
- $this->pointers['aioseop_menu_236'] = array(
3092
- 'pointer_target' => '#toplevel_page_all-in-one-seo-pack-pro-aioseop_class',
3093
- 'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3094
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3095
- 'pointer_edge' => 'top',
3096
- 'pointer_align' => 'left',
3097
- 'pointer_scope' => 'global',
3098
- );
3099
- $this->pointers['aioseop_welcome_230'] = array(
3100
- 'pointer_target' => '#aioseop_top_button',
3101
- 'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3102
- . '</h3><p>' . __( 'New in 2.4: Improved support for taxonomies, Woocommerce and massive performance improvements under the hood! Please review your settings on each options page!', 'all-in-one-seo-pack' ) . '</p>',
3103
- 'pointer_edge' => 'bottom',
3104
- 'pointer_align' => 'left',
3105
- 'pointer_scope' => 'local',
3106
- );
3107
- $this->filter_pointers();
3108
- } else {
3109
- $this->pointers['aioseop_menu_220'] = array(
3110
- 'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
3111
- 'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3112
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3113
- 'pointer_edge' => 'top',
3114
- 'pointer_align' => 'left',
3115
- 'pointer_scope' => 'global',
3116
- );
3117
- $this->pointers['aioseop_welcome_220'] = array(
3118
- 'pointer_target' => '#aioseop_top_button',
3119
- 'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3120
- . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New since 2.2: Control who accesses your site with the new Robots.txt Editor and File Editor modules! Enable them from the Feature Manager. Remember to review your settings, we have added some new ones!', 'all-in-one-seo-pack' ) . '</p>',
3121
- 'pointer_edge' => 'bottom',
3122
- 'pointer_align' => 'left',
3123
- 'pointer_scope' => 'local',
3124
- );
3125
- $this->filter_pointers();
3126
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3127
  }
3128
 
3129
  function add_page_hooks() {
@@ -3216,6 +3193,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3216
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
3217
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3218
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li>' .
 
3219
  '</ul>';
3220
  $this->help_anchors[ $field ] = '#custom-titles';
3221
  $this->layout['cpt']['options'][] = $field;
@@ -3427,12 +3405,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3427
  if ( ! is_object( $aioseop_sitemap ) ) {
3428
  unset( $settings['aiosp_sitemap_exclude'] );
3429
  }
3430
- if ( is_object( $post ) ) {
3431
- if ( $post->post_type != 'page' ) {
3432
- unset( $settings["{$prefix}titleatr"] );
3433
- unset( $settings["{$prefix}menulabel"] );
3434
- }
3435
- }
3436
  if ( ! empty( $this->options[ $this->prefix . 'togglekeywords' ] ) ) {
3437
  unset( $settings["{$prefix}keywords"] );
3438
  unset( $settings["{$prefix}togglekeywords"] );
@@ -3571,6 +3544,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3571
  }
3572
  }
3573
 
 
 
3574
  if ( $aiosp_disable ) {
3575
  if ( ! $aiosp_disable_analytics ) {
3576
  if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
@@ -3677,11 +3652,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3677
  if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
3678
  add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
3679
  }
3680
- add_filter( 'wp_list_pages', 'aioseop_list_pages' );
3681
  add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
3682
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
3683
- add_filter( 'wp_list_pages_excludes', 'aioseop_get_pages_start' );
3684
- add_filter( 'get_pages', 'aioseop_get_pages' );
3685
  }
3686
  }
3687
 
@@ -3722,7 +3694,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3722
  </p>
3723
  </div>',
3724
  __( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
3725
- sprintf( __( '%s Upgrade%s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo' ) ), '</a>' ) );
3726
 
3727
  } elseif ( ! class_exists( 'WooCommerce' ) && ! empty( $aioseop_woo_upgrade_notice_dismissed ) ) {
3728
  delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
@@ -3827,11 +3799,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
3827
  $meta_string .= "\n";
3828
  }
3829
  $keywords = wp_filter_nohtml_kses( str_replace( '"', '', $keywords ) );
3830
- $key_attr = '';
3831
- if ( ! empty( $aioseop_options['aiosp_schema_markup'] ) ) {
3832
- $key_attr = 'itemprop="keywords"';
3833
- }
3834
- $key_attr = apply_filters( 'aioseop_keywords_attributes', $key_attr );
3835
  $meta_string .= sprintf( "<meta name=\"keywords\" %s content=\"%s\" />\n", $key_attr, $keywords );
3836
  }
3837
  }
@@ -4026,13 +3994,15 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
4026
  if ( strpos( $description, '%post_title%' ) !== false ) {
4027
  $description = str_replace( '%post_title%', $this->get_aioseop_title( $post ), $description );
4028
  }
4029
-
 
 
4030
 
4031
  /*this was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
4032
  *on the roadmap is to have a better hierarchy for attachment description pulling
4033
  * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
4034
  */
4035
-
4036
  return $description;
4037
  }
4038
 
@@ -4311,6 +4281,7 @@ EOF;
4311
  * @return string $url
4312
  *
4313
  * @since 2.3.5
 
4314
  */
4315
  function validate_url_scheme( $url ) {
4316
 
@@ -4318,14 +4289,12 @@ EOF;
4318
 
4319
  global $aioseop_options;
4320
 
4321
- if( ! isset( $aioseop_options['aiosp_can_set_protocol'] ) ){
4322
- return $url; // Just send the url back if there's nothing there.
4323
- }
4324
 
4325
- if ( $aioseop_options['aiosp_can_set_protocol'] == 'http' ) {
4326
  $url = preg_replace( '/^https:/i', 'http:', $url );
4327
  }
4328
- if ( $aioseop_options['aiosp_can_set_protocol'] == 'https' ) {
4329
  $url = preg_replace( '/^http:/i', 'https:', $url );
4330
  }
4331
 
@@ -4382,8 +4351,6 @@ EOF;
4382
  'nofollow',
4383
  'noodp',
4384
  'noydir',
4385
- 'titleatr',
4386
- 'menulabel',
4387
  );
4388
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4389
  unset( $optlist['custom_link'] );
@@ -4404,8 +4371,6 @@ EOF;
4404
  'nofollow',
4405
  'noodp',
4406
  'noydir',
4407
- 'titleatr',
4408
- 'menulabel',
4409
  );
4410
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4411
  unset( $optlist['custom_link'] );
@@ -4414,11 +4379,9 @@ EOF;
4414
  delete_post_meta( $id, "_aioseop_{$f}" );
4415
  }
4416
 
4417
- if ( $this->is_admin() ) {
4418
  delete_post_meta( $id, '_aioseop_sitemap_exclude' );
4419
  delete_post_meta( $id, '_aioseop_disable' );
4420
  delete_post_meta( $id, '_aioseop_disable_analytics' );
4421
- }
4422
 
4423
  foreach ( $optlist as $f ) {
4424
  $var = "aiosp_$f";
@@ -4427,10 +4390,10 @@ EOF;
4427
  add_post_meta( $id, $field, $$var );
4428
  }
4429
  }
4430
- if ( isset( $aiosp_sitemap_exclude ) && ! empty( $aiosp_sitemap_exclude ) && $this->is_admin() ) {
4431
  add_post_meta( $id, '_aioseop_sitemap_exclude', $aiosp_sitemap_exclude );
4432
  }
4433
- if ( isset( $aiosp_disable ) && ! empty( $aiosp_disable ) && $this->is_admin() ) {
4434
  add_post_meta( $id, '_aioseop_disable', $aiosp_disable );
4435
  if ( isset( $aiosp_disable_analytics ) && ! empty( $aiosp_disable_analytics ) ) {
4436
  add_post_meta( $id, '_aioseop_disable_analytics', $aiosp_disable_analytics );
@@ -4530,7 +4493,7 @@ EOF;
4530
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
4531
  'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
4532
  'id' => 'aioseop-pro-upgrade',
4533
- 'href' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
4534
  'meta' => array( 'target' => '_blank' ),
4535
  ) );
4536
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
@@ -4600,8 +4563,6 @@ EOF;
4600
  'nofollow',
4601
  'noodp',
4602
  'noydir',
4603
- 'titleatr',
4604
- 'menulabel',
4605
  );
4606
  foreach ( $optlist as $f ) {
4607
  $field = "aiosp_$f";
@@ -4619,8 +4580,6 @@ EOF;
4619
  'nofollow',
4620
  'noodp',
4621
  'noydir',
4622
- 'titleatr',
4623
- 'menulabel',
4624
  );
4625
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4626
  unset( $optlist['custom_link'] );
@@ -4629,7 +4588,7 @@ EOF;
4629
  delete_term_meta( $id, "_aioseop_{$f}" );
4630
  }
4631
 
4632
- if ( $this->is_admin() ) {
4633
  delete_term_meta( $id, '_aioseop_sitemap_exclude' );
4634
  delete_term_meta( $id, '_aioseop_disable' );
4635
  delete_term_meta( $id, '_aioseop_disable_analytics' );
@@ -4642,10 +4601,10 @@ EOF;
4642
  add_term_meta( $id, $field, $$var );
4643
  }
4644
  }
4645
- if ( isset( $aiosp_sitemap_exclude ) && ! empty( $aiosp_sitemap_exclude ) && $this->is_admin() ) {
4646
  add_term_meta( $id, '_aioseop_sitemap_exclude', $aiosp_sitemap_exclude );
4647
  }
4648
- if ( isset( $aiosp_disable ) && ! empty( $aiosp_disable ) && $this->is_admin() ) {
4649
  add_term_meta( $id, '_aioseop_disable', $aiosp_disable );
4650
  if ( isset( $aiosp_disable_analytics ) && ! empty( $aiosp_disable_analytics ) ) {
4651
  add_term_meta( $id, '_aioseop_disable_analytics', $aiosp_disable_analytics );
@@ -4668,6 +4627,8 @@ EOF;
4668
 
4669
  $this->update_options();
4670
 
 
 
4671
  $this->add_admin_pointers();
4672
  if ( ! empty( $this->pointers ) ) {
4673
  foreach ( $this->pointers as $k => $p ) {
@@ -4676,12 +4637,9 @@ EOF;
4676
  }
4677
  }
4678
  }
 
4679
 
4680
- $donated = false;
4681
  if ( isset( $_POST ) && isset( $_POST['module'] ) && isset( $_POST['nonce-aioseop'] ) && ( $_POST['module'] == 'All_in_One_SEO_Pack' ) && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) {
4682
- if ( isset( $_POST['aiosp_donate'] ) ) {
4683
- $donated = $_POST['aiosp_donate'];
4684
- }
4685
  if ( isset( $_POST['Submit'] ) && AIOSEOPPRO ) {
4686
  if ( isset( $_POST['aiosp_custom_menu_order'] ) ) {
4687
  $custom_menu_order = $_POST['aiosp_custom_menu_order'];
@@ -4692,9 +4650,6 @@ EOF;
4692
  $custom_menu_order = true;
4693
  }
4694
  } else {
4695
- if ( isset( $this->options['aiosp_donate'] ) ) {
4696
- $donated = $this->options['aiosp_donate'];
4697
- }
4698
  if ( isset( $this->options['aiosp_custom_menu_order'] ) ) {
4699
  $custom_menu_order = $this->options['aiosp_custom_menu_order'];
4700
  }
@@ -4705,15 +4660,6 @@ EOF;
4705
  add_filter( 'menu_order', array( $this, 'set_menu_order' ), 11 );
4706
  }
4707
 
4708
- if ( $donated ) {
4709
- // Thank you for your donation.
4710
- $this->pointers['aioseop_donate'] = array(
4711
- 'pointer_target' => '#aiosp_donate_wrapper',
4712
- 'pointer_text' => '<h3>' . __( 'Thank you!', 'all-in-one-seo-pack' )
4713
- . '</h3><p>' . __( 'Thank you for your donation, it helps keep this plugin free and actively developed!', 'all-in-one-seo-pack' ) . '</p>',
4714
- );
4715
- }
4716
-
4717
  if ( ! AIOSEOPPRO ) {
4718
  if ( ! empty( $this->pointers ) ) {
4719
  foreach ( $this->pointers as $k => $p ) {
76
  parent::__construct();
77
 
78
  $this->help_text = array(
 
79
  'license_key' => __( 'This will be the license key received when the product was purchased. This is used for automatic upgrades.', 'all-in-one-seo-pack' ),
80
+ 'can' => __( "This option will automatically generate Canonical URLs for your entire WordPress installation. This will help to prevent duplicate content penalties by Google", 'all-in-one-seo-pack' ),
81
  'no_paged_canonical_links' => __( 'Checking this option will set the Canonical URL for all paginated content to the first page.', 'all-in-one-seo-pack' ),
82
  'customize_canonical_links' => __( 'Checking this option will allow you to customize Canonical URLs for specific posts.', 'all-in-one-seo-pack' ),
 
83
  'use_original_title' => __( 'Use wp_title to get the title used by the theme; this is disabled by default. If you use this option, set your title formats appropriately, as your theme might try to do its own title SEO as well.', 'all-in-one-seo-pack' ),
84
  'do_log' => __( 'Check this and All in One SEO Pack will create a log of important events (all-in-one-seo-pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.', 'all-in-one-seo-pack' ),
85
  'home_title' => __( 'As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.', 'all-in-one-seo-pack' ),
100
  __( "%page_author_login% - This page's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
101
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
102
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
103
+ __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
104
+ __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li></ul>',
105
  'page_title_format' =>
106
  __( 'This controls the format of the title tag for Pages.<br />The following macros are supported:', 'all-in-one-seo-pack' )
107
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
110
  __( "%page_author_login% - This page's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
111
  __( "%page_author_nicename% - This page's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
112
  __( "%page_author_firstname% - This page's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
113
+ __( "%page_author_lastname% - This page's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
114
+ __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li></ul>',
115
  'post_title_format' =>
116
  __( 'This controls the format of the title tag for Posts.<br />The following macros are supported:', 'all-in-one-seo-pack' )
117
  . '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
122
  __( "%post_author_login% - This post's author' login", 'all-in-one-seo-pack' ) . '</li><li>' .
123
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
124
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
125
+ __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
126
+ __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li></ul>',
127
  'category_title_format' =>
128
  __( 'This controls the format of the title tag for Category Archives.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
129
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
163
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
164
  __( '%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set', 'all-in-one-seo-pack' ) . '</li><li>' .
165
  __( '%post_title% - The original title of the post', 'all-in-one-seo-pack' ) . '</li><li>' .
166
+ __( '%wp_title% - The original wordpress title, e.g. post_title for posts', 'all-in-one-seo-pack' ) . '</li><li>' .
167
+ __( '%current_date% - The current date (localized)', 'all-in-one-seo-pack' ) . '</li></ul>',
168
  '404_title_format' => __( 'This controls the format of the title tag for the 404 page.<br />The following macros are supported:', 'all-in-one-seo-pack' ) .
169
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all-in-one-seo-pack' ) . '</li><li>' .
170
  __( '%blog_description% - Your blog description', 'all-in-one-seo-pack' ) . '</li><li>' .
180
  'taxactive' => __( 'Use these checkboxes to select which Taxonomies you want to use All in One SEO Pack with.', 'all-in-one-seo-pack' ),
181
  'cposttitles' => __( 'This allows you to set the title tags for each Custom Post Type.', 'all-in-one-seo-pack' ),
182
  'posttypecolumns' => __( 'This lets you select which screens display the SEO Title, SEO Keywords and SEO Description columns.', 'all-in-one-seo-pack' ),
183
+ 'google_verify' => __( "Enter your verification code here to verify your site with Google Webmaster Tools.<br /><a href='https://semperplugins.com/documentation/google-webmaster-tools-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
184
+ 'bing_verify' => __( "Enter your verification code here to verify your site with Bing Webmaster Tools.<br /><a href='https://semperplugins.com/documentation/bing-webmaster-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
185
+ 'pinterest_verify' => __( "Enter your verification code here to verify your site with Pinterest.<br /><a href='https://semperplugins.com/documentation/pinterest-site-verification/' target='_blank'>Click here for documentation on this setting</a>", 'all-in-one-seo-pack' ),
186
  'google_publisher' => __( 'Enter your Google+ Profile URL here to add the rel=“author” tag to your site for Google authorship. It is recommended that the URL you enter here should be your personal Google+ profile. Use the Advanced Authorship Options below if you want greater control over the use of authorship.', 'all-in-one-seo-pack' ),
187
  'google_disable_profile' => __( 'Check this to remove the Google Plus field from the user profile screen.', 'all-in-one-seo-pack' ),
188
  'google_author_advanced' => __( 'Enable this to display advanced options for controlling Google Plus authorship information on your website.', 'all-in-one-seo-pack' ),
239
  'can' => '#canonical-urls',
240
  'no_paged_canonical_links' => '#no-pagination-for-canonical-urls',
241
  'customize_canonical_links' => '#enable-custom-canonical-urls',
 
242
  'use_original_title' => '#use-original-title',
243
  'schema_markup' => '#use-schema-markup',
244
  'do_log' => '#log-important-events',
281
  'google_author_location' => '#display-google-authorship',
282
  'google_enable_publisher' => '#display-publisher-meta-on-front-page',
283
  'google_specify_publisher' => '#specify-publisher-url',
284
+ 'google_analytics_id' => 'https://semperplugins.com/documentation/setting-up-google-analytics/',
285
  'ga_domain' => '#tracking-domain',
286
  'ga_multi_domain' => '#track-multiple-domains-additional-domains',
287
  'ga_addl_domains' => '#track-multiple-domains-additional-domains',
330
  'nofollow' => __( 'Check this box to ask search engines not to follow links from this page.', 'all-in-one-seo-pack' ),
331
  'noodp' => __( 'Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all-in-one-seo-pack' ),
332
  'noydir' => __( 'Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page.', 'all-in-one-seo-pack' ),
 
 
333
  'sitemap_exclude' => __( "Don't display this page in the sitemap.", 'all-in-one-seo-pack' ),
334
  'disable' => __( 'Disable SEO on this page.', 'all-in-one-seo-pack' ),
335
  'disable_analytics' => __( 'Disable Google Analytics on this page.', 'all-in-one-seo-pack' ),
340
  'name' => __( 'License Key:', 'all-in-one-seo-pack' ),
341
  'type' => 'text',
342
  ),
 
 
 
343
  'home_title' => array(
344
  'name' => __( 'Home Title:', 'all-in-one-seo-pack' ),
345
  'default' => null,
399
  'default' => 0,
400
  'condshow' => array( 'aiosp_can' => 'on' ),
401
  ),
 
 
 
 
 
 
 
 
 
 
 
402
  'rewrite_titles' => array(
403
  'name' => __( 'Rewrite Titles:', 'all-in-one-seo-pack' ),
404
  'default' => 1,
900
  ),
901
  );
902
 
903
+ if ( ! AIOSEOPPRO ) {
 
 
904
  unset( $this->default_options['license_key'] );
905
  unset( $this->default_options['taxactive'] );
906
  }
911
  'name' => $this->plugin_name,
912
  'type' => 'metabox',
913
  'prefix' => '',
914
+ 'help_link' => 'https://semperplugins.com/sections/postpage-settings/',
915
  'options' => array(
916
  'edit',
917
  'nonce-aioseop-edit',
925
  'nofollow',
926
  'noodp',
927
  'noydir',
 
 
928
  'sitemap_exclude',
929
  'disable',
930
  'disable_analytics',
1003
  ),
1004
  'noodp' => array( 'name' => __( 'Robots Meta NOODP', 'all-in-one-seo-pack' ) ),
1005
  'noydir' => array( 'name' => __( 'Robots Meta NOYDIR', 'all-in-one-seo-pack' ) ),
 
 
 
 
 
 
 
 
 
 
1006
  'sitemap_exclude' => array( 'name' => __( 'Exclude From Sitemap', 'all-in-one-seo-pack' ) ),
1007
  'disable' => array( 'name' => __( 'Disable on this page/post', 'all-in-one-seo-pack' ) ),
1008
  'disable_analytics' => array(
1054
  ),
1055
  'cpt' => array(
1056
  'name' => __( 'Custom Post Type Settings', 'all-in-one-seo-pack' ),
1057
+ 'help_link' => 'https://semperplugins.com/documentation/custom-post-type-settings/',
1058
  'options' => array( 'enablecpost', 'cpostadvanced', 'taxactive', 'cpostactive', 'cposttitles' ),
1059
  ),
1060
  'display' => array(
1061
  'name' => __( 'Display Settings', 'all-in-one-seo-pack' ),
1062
+ 'help_link' => 'https://semperplugins.com/documentation/display-settings/',
1063
  'options' => array( 'posttypecolumns' ),
1064
  ),
1065
  'webmaster' => array(
1066
  'name' => __( 'Webmaster Verification', 'all-in-one-seo-pack' ),
1067
+ 'help_link' => 'https://semperplugins.com/sections/webmaster-verification/',
1068
  'options' => array( 'google_verify', 'bing_verify', 'pinterest_verify' ),
1069
  ),
1070
  'google' => array(
1071
  'name' => __( 'Google Settings', 'all-in-one-seo-pack' ),
1072
+ 'help_link' => 'https://semperplugins.com/documentation/google-settings/',
1073
  'options' => array(
1074
  'google_publisher',
1075
  'google_disable_profile',
1096
  ),
1097
  'noindex' => array(
1098
  'name' => __( 'Noindex Settings', 'all-in-one-seo-pack' ),
1099
+ 'help_link' => 'https://semperplugins.com/documentation/noindex-settings/',
1100
  'options' => array(
1101
  'cpostnoindex',
1102
  'cpostnofollow',
1135
  ),
1136
  'keywords' => array(
1137
  'name' => __( 'Keyword Settings', 'all-in-one-seo-pack' ),
1138
+ 'help_link' => 'https://semperplugins.com/documentation/keyword-settings/',
1139
  'options' => array(
1140
  'togglekeywords',
1141
  'use_categories',
1221
  if ( strpos( $title_format, '%page_title%' ) !== false ) {
1222
  $title_format = str_replace( '%page_title%', $replace_title, $title_format );
1223
  }
1224
+ if ( strpos( $title_format, '%current_date%' ) !== false ) {
1225
+ $title_format = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $title_format );
1226
+ }
1227
  if ( $w->is_category || $w->is_tag || $w->is_tax ) {
1228
  if ( AIOSEOPPRO && ! empty( $_GET ) && ! empty( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && function_exists( 'wp_get_split_terms' ) ) {
1229
  $term_id = intval( $_GET['tag_ID'] );
1488
  'nofollow',
1489
  'noodp',
1490
  'noydir',
 
 
1491
  );
1492
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
1493
  unset( $optlist['custom_link'] );
2118
  if ( strpos( $new_title, "%{$type}_author_lastname%" ) !== false ) {
2119
  $new_title = str_replace( "%{$type}_author_lastname%", $this->ucwords( $authordata->last_name ), $new_title );
2120
  }
2121
+ if ( strpos( $new_title, "%current_date%" ) !== false ){
2122
+ $new_title = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $new_title );
2123
+ }
2124
  $title = trim( $new_title );
2125
 
2126
  return $title;
2743
  if ( apply_filters( 'aioseop_canonical_url_pagination', $show_page ) ) {
2744
  $link = $this->get_paged( $link );
2745
  }
 
 
 
 
 
 
 
 
 
 
2746
 
2747
  return $link;
2748
  }
2984
  'nofollow',
2985
  'noodp',
2986
  'noydir',
 
 
2987
  );
2988
  foreach ( $optlist as $f ) {
2989
  $meta = get_term_meta( $term_id, '_aioseop_' . $f, true );
2998
  function add_page_icon() {
2999
  wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
3000
  wp_enqueue_style( 'wp-pointer' );
3001
+ //$this->add_admin_pointers();
3002
 
3003
  wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css' );
3004
  ?>
3050
  }
3051
 
3052
  function add_admin_pointers() {
3053
+
3054
+ $pro = '';
3055
  if ( AIOSEOPPRO ) {
3056
+ $pro = '-pro';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3057
  }
3058
+
3059
+ $this->pointers['aioseop_menu_2640'] = array(
3060
+ 'pointer_target' => "#toplevel_page_all-in-one-seo-pack$pro-aioseop_class",
3061
+ 'pointer_text' => '<h3>' . __( 'Review Your Settings', 'all-in-one-seo-pack' )
3062
+ . '</h3><p>' . sprintf( __( 'Welcome to version %s. Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION ) . '</p>',
3063
+ 'pointer_edge' => 'top',
3064
+ 'pointer_align' => 'left',
3065
+ 'pointer_scope' => 'global',
3066
+ );
3067
+
3068
+ $this->pointers['aioseop_menu_2361'] = array(
3069
+ 'pointer_target' => '#aioseop_top_button',
3070
+ 'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3071
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack Pro ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3072
+ 'pointer_edge' => 'top',
3073
+ 'pointer_align' => 'left',
3074
+ 'pointer_scope' => 'global',
3075
+ );
3076
+ $this->pointers['aioseop_welcome_230'] = array(
3077
+ 'pointer_target' => '#aioseop_top_button',
3078
+ 'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3079
+ . '</h3><p>' . __( 'New in 2.4: Improved support for taxonomies, Woocommerce and massive performance improvements under the hood! Please review your settings on each options page!', 'all-in-one-seo-pack' ) . '</p>',
3080
+ 'pointer_edge' => 'bottom',
3081
+ 'pointer_align' => 'left',
3082
+ 'pointer_scope' => 'local',
3083
+ );
3084
+ $this->filter_pointers();
3085
+
3086
+ $this->pointers['aioseop_menu_2205'] = array(
3087
+ 'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
3088
+ 'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3089
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! Please review your settings, as we\'re always adding new features for you!', 'all-in-one-seo-pack' ) . '</p>',
3090
+ 'pointer_edge' => 'top',
3091
+ 'pointer_align' => 'left',
3092
+ 'pointer_scope' => 'global',
3093
+ );
3094
+ $this->pointers['aioseop_welcome_220534'] = array(
3095
+ 'pointer_target' => '#aioseop_top_button',
3096
+ 'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all-in-one-seo-pack' ), AIOSEOP_VERSION )
3097
+ . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New since 2.2: Control who accesses your site with the new Robots.txt Editor and File Editor modules! Enable them from the Feature Manager. Remember to review your settings, we have added some new ones!', 'all-in-one-seo-pack' ) . '</p>',
3098
+ 'pointer_edge' => 'bottom',
3099
+ 'pointer_align' => 'left',
3100
+ 'pointer_scope' => 'local',
3101
+ );
3102
+ $this->filter_pointers();
3103
+
3104
  }
3105
 
3106
  function add_page_hooks() {
3193
  __( "%post_author_nicename% - This post's author' nicename", 'all-in-one-seo-pack' ) . '</li><li>' .
3194
  __( "%post_author_firstname% - This post's author' first name (capitalized)", 'all-in-one-seo-pack' ) . '</li><li>' .
3195
  __( "%post_author_lastname% - This post's author' last name (capitalized)", 'all-in-one-seo-pack' ) . '</li>' .
3196
+ __( "%current_date% - The current date (localized)", 'all-in-one-seo-pack' ) . '</li></ul>' .
3197
  '</ul>';
3198
  $this->help_anchors[ $field ] = '#custom-titles';
3199
  $this->layout['cpt']['options'][] = $field;
3405
  if ( ! is_object( $aioseop_sitemap ) ) {
3406
  unset( $settings['aiosp_sitemap_exclude'] );
3407
  }
3408
+
 
 
 
 
 
3409
  if ( ! empty( $this->options[ $this->prefix . 'togglekeywords' ] ) ) {
3410
  unset( $settings["{$prefix}keywords"] );
3411
  unset( $settings["{$prefix}togglekeywords"] );
3544
  }
3545
  }
3546
 
3547
+ $aiosp_disable = apply_filters( 'aiosp_disable', $aiosp_disable ); // API filter to disable AIOSEOP.
3548
+
3549
  if ( $aiosp_disable ) {
3550
  if ( ! $aiosp_disable_analytics ) {
3551
  if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
3652
  if ( aioseop_option_isset( 'aiosp_google_analytics_id' ) ) {
3653
  add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
3654
  }
 
3655
  add_action( 'wp_head', array( $this, 'wp_head' ), apply_filters( 'aioseop_wp_head_priority', 1 ) );
3656
  add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
 
 
3657
  }
3658
  }
3659
 
3694
  </p>
3695
  </div>',
3696
  __( 'We\'ve detected you\'re running WooCommerce.', 'all-in-one-seo-pack' ),
3697
+ sprintf( __( '%s Upgrade%s to All in One SEO Pack Pro for increased SEO compatibility for your products.', 'all-in-one-seo-pack' ), sprintf( '<a target="_blank" href="%s">', esc_url( 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo' ) ), '</a>' ) );
3698
 
3699
  } elseif ( ! class_exists( 'WooCommerce' ) && ! empty( $aioseop_woo_upgrade_notice_dismissed ) ) {
3700
  delete_user_meta( get_current_user_id(), 'aioseop_woo_upgrade_notice_dismissed' );
3799
  $meta_string .= "\n";
3800
  }
3801
  $keywords = wp_filter_nohtml_kses( str_replace( '"', '', $keywords ) );
3802
+ $key_attr = apply_filters( 'aioseop_keywords_attributes', '' );
 
 
 
 
3803
  $meta_string .= sprintf( "<meta name=\"keywords\" %s content=\"%s\" />\n", $key_attr, $keywords );
3804
  }
3805
  }
3994
  if ( strpos( $description, '%post_title%' ) !== false ) {
3995
  $description = str_replace( '%post_title%', $this->get_aioseop_title( $post ), $description );
3996
  }
3997
+ if ( strpos( $description, '%current_date%' ) !== false ) {
3998
+ $description = str_replace( '%current_date%', date_i18n( get_option( 'date_format' ) ), $description );
3999
+ }
4000
 
4001
  /*this was intended to make attachment descriptions unique if pulling from the parent... let's remove it and see if there are any problems
4002
  *on the roadmap is to have a better hierarchy for attachment description pulling
4003
  * if ($aioseop_options['aiosp_can']) $description = $this->make_unique_att_desc($description);
4004
  */
4005
+ $description = $this->apply_cf_fields($description);
4006
  return $description;
4007
  }
4008
 
4281
  * @return string $url
4282
  *
4283
  * @since 2.3.5
4284
+ * @since 2.3.11 Removed check for legacy protocol setting. Added filter.
4285
  */
4286
  function validate_url_scheme( $url ) {
4287
 
4289
 
4290
  global $aioseop_options;
4291
 
4292
+ $scheme = apply_filters( 'aioseop_canonical_protocol', false );
 
 
4293
 
4294
+ if ( 'http' === $scheme ) {
4295
  $url = preg_replace( '/^https:/i', 'http:', $url );
4296
  }
4297
+ if ( 'https' === $scheme ) {
4298
  $url = preg_replace( '/^http:/i', 'https:', $url );
4299
  }
4300
 
4351
  'nofollow',
4352
  'noodp',
4353
  'noydir',
 
 
4354
  );
4355
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4356
  unset( $optlist['custom_link'] );
4371
  'nofollow',
4372
  'noodp',
4373
  'noydir',
 
 
4374
  );
4375
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4376
  unset( $optlist['custom_link'] );
4379
  delete_post_meta( $id, "_aioseop_{$f}" );
4380
  }
4381
 
 
4382
  delete_post_meta( $id, '_aioseop_sitemap_exclude' );
4383
  delete_post_meta( $id, '_aioseop_disable' );
4384
  delete_post_meta( $id, '_aioseop_disable_analytics' );
 
4385
 
4386
  foreach ( $optlist as $f ) {
4387
  $var = "aiosp_$f";
4390
  add_post_meta( $id, $field, $$var );
4391
  }
4392
  }
4393
+ if ( isset( $aiosp_sitemap_exclude ) && ! empty( $aiosp_sitemap_exclude ) ) {
4394
  add_post_meta( $id, '_aioseop_sitemap_exclude', $aiosp_sitemap_exclude );
4395
  }
4396
+ if ( isset( $aiosp_disable ) && ! empty( $aiosp_disable ) ) {
4397
  add_post_meta( $id, '_aioseop_disable', $aiosp_disable );
4398
  if ( isset( $aiosp_disable_analytics ) && ! empty( $aiosp_disable_analytics ) ) {
4399
  add_post_meta( $id, '_aioseop_disable_analytics', $aiosp_disable_analytics );
4493
  'parent' => AIOSEOP_PLUGIN_DIRNAME,
4494
  'title' => __( 'Upgrade To Pro', 'all-in-one-seo-pack' ),
4495
  'id' => 'aioseop-pro-upgrade',
4496
+ 'href' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=menu',
4497
  'meta' => array( 'target' => '_blank' ),
4498
  ) );
4499
  // add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
4563
  'nofollow',
4564
  'noodp',
4565
  'noydir',
 
 
4566
  );
4567
  foreach ( $optlist as $f ) {
4568
  $field = "aiosp_$f";
4580
  'nofollow',
4581
  'noodp',
4582
  'noydir',
 
 
4583
  );
4584
  if ( ! ( ! empty( $this->options['aiosp_can'] ) ) && ( ! empty( $this->options['aiosp_customize_canonical_links'] ) ) ) {
4585
  unset( $optlist['custom_link'] );
4588
  delete_term_meta( $id, "_aioseop_{$f}" );
4589
  }
4590
 
4591
+ if ( current_user_can( 'activate_plugins' ) ) {
4592
  delete_term_meta( $id, '_aioseop_sitemap_exclude' );
4593
  delete_term_meta( $id, '_aioseop_disable' );
4594
  delete_term_meta( $id, '_aioseop_disable_analytics' );
4601
  add_term_meta( $id, $field, $$var );
4602
  }
4603
  }
4604
+ if ( isset( $aiosp_sitemap_exclude ) && ! empty( $aiosp_sitemap_exclude ) && current_user_can( 'activate_plugins' ) ) {
4605
  add_term_meta( $id, '_aioseop_sitemap_exclude', $aiosp_sitemap_exclude );
4606
  }
4607
+ if ( isset( $aiosp_disable ) && ! empty( $aiosp_disable ) && current_user_can( 'activate_plugins' ) ) {
4608
  add_term_meta( $id, '_aioseop_disable', $aiosp_disable );
4609
  if ( isset( $aiosp_disable_analytics ) && ! empty( $aiosp_disable_analytics ) ) {
4610
  add_term_meta( $id, '_aioseop_disable_analytics', $aiosp_disable_analytics );
4627
 
4628
  $this->update_options();
4629
 
4630
+ // For now we're removing admin pointers.
4631
+ /*
4632
  $this->add_admin_pointers();
4633
  if ( ! empty( $this->pointers ) ) {
4634
  foreach ( $this->pointers as $k => $p ) {
4637
  }
4638
  }
4639
  }
4640
+ */
4641
 
 
4642
  if ( isset( $_POST ) && isset( $_POST['module'] ) && isset( $_POST['nonce-aioseop'] ) && ( $_POST['module'] == 'All_in_One_SEO_Pack' ) && wp_verify_nonce( $_POST['nonce-aioseop'], 'aioseop-nonce' ) ) {
 
 
 
4643
  if ( isset( $_POST['Submit'] ) && AIOSEOPPRO ) {
4644
  if ( isset( $_POST['aiosp_custom_menu_order'] ) ) {
4645
  $custom_menu_order = $_POST['aiosp_custom_menu_order'];
4650
  $custom_menu_order = true;
4651
  }
4652
  } else {
 
 
 
4653
  if ( isset( $this->options['aiosp_custom_menu_order'] ) ) {
4654
  $custom_menu_order = $this->options['aiosp_custom_menu_order'];
4655
  }
4660
  add_filter( 'menu_order', array( $this, 'set_menu_order' ), 11 );
4661
  }
4662
 
 
 
 
 
 
 
 
 
 
4663
  if ( ! AIOSEOPPRO ) {
4664
  if ( ! empty( $this->pointers ) ) {
4665
  foreach ( $this->pointers as $k => $p ) {
all_in_one_seo_pack.php CHANGED
@@ -1,11 +1,11 @@
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.10.2
7
  Author: Michael Torbert
8
- Author URI: http://michaeltorbert.com
9
  Text Domain: all-in-one-seo-pack
10
  Domain Path: /i18n/
11
  */
@@ -31,14 +31,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
31
  * The original WordPress SEO plugin.
32
  *
33
  * @package All-in-One-SEO-Pack
34
- * @version 2.3.10.2
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
38
  define( 'AIOSEOPPRO', false );
39
  }
40
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
- define( 'AIOSEOP_VERSION', '2.3.10.2' );
42
  }
43
  global $aioseop_plugin_name;
44
  $aioseop_plugin_name = 'All in One SEO Pack';
@@ -215,7 +215,7 @@ if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
215
  if ( AIOSEOPPRO ) {
216
 
217
  require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
218
- $aiosp_update_url = 'http://semperplugins.com/upgrade_plugins.php';
219
  if( defined( 'AIOSEOP_UPDATE_URL' ) ) {
220
  $aiosp_update_url = AIOSEOP_UPDATE_URL;
221
  }
@@ -232,8 +232,8 @@ if ( AIOSEOPPRO ) {
232
  } else {
233
  $aioseop_update_checker->license_key = '';
234
  }
235
- $aioseop_update_checker->options_page = 'all-in-one-seo-pack-pro/aioseop_class.php';
236
- $aioseop_update_checker->renewal_page = 'http://semperplugins.com/all-in-one-seo-pack-pro-support-updates-renewal/';
237
 
238
  $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
239
  }
@@ -280,14 +280,6 @@ if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {
280
  if ( ! AIOSEOPPRO ) {
281
 
282
  $action_links = array(
283
- 'donatelink' => array(
284
- 'label' => __( 'Donate', 'all-in-one-seo-pack' ),
285
- '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',
286
- ),
287
- 'amazon' => array(
288
- 'label' => __( 'Amazon Wishlist', 'all-in-one-seo-pack' ),
289
- 'url' => 'https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web',
290
- ),
291
 
292
  );
293
 
@@ -322,12 +314,12 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
322
 
323
  'forum' => array(
324
  'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
325
- 'url' => 'http://semperplugins.com/support/',
326
  ),
327
 
328
  'docs' => array(
329
  'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
330
- 'url' => 'http://semperplugins.com/documentation/',
331
  ),
332
 
333
  );
@@ -338,7 +330,7 @@ if ( ! function_exists( 'aiosp_add_action_links' ) ) {
338
  $action_links['proupgrade'] =
339
  array(
340
  'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
341
- 'url' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
342
 
343
  );
344
  }
1
  <?php
2
  /*
3
  Plugin Name: All In One SEO Pack
4
+ Plugin URI: https://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.11
7
  Author: Michael Torbert
8
+ Author URI: https://michaeltorbert.com
9
  Text Domain: all-in-one-seo-pack
10
  Domain Path: /i18n/
11
  */
31
  * The original WordPress SEO plugin.
32
  *
33
  * @package All-in-One-SEO-Pack
34
+ * @version 2.3.11
35
  */
36
 
37
  if ( ! defined( 'AIOSEOPPRO' ) ) {
38
  define( 'AIOSEOPPRO', false );
39
  }
40
  if ( ! defined( 'AIOSEOP_VERSION' ) ) {
41
+ define( 'AIOSEOP_VERSION', '2.3.11' );
42
  }
43
  global $aioseop_plugin_name;
44
  $aioseop_plugin_name = 'All in One SEO Pack';
215
  if ( AIOSEOPPRO ) {
216
 
217
  require( AIOSEOP_PLUGIN_DIR . 'pro/sfwd_update_checker.php' );
218
+ $aiosp_update_url = 'https://semperplugins.com/upgrade_plugins.php';
219
  if( defined( 'AIOSEOP_UPDATE_URL' ) ) {
220
  $aiosp_update_url = AIOSEOP_UPDATE_URL;
221
  }
232
  } else {
233
  $aioseop_update_checker->license_key = '';
234
  }
235
+ $aioseop_update_checker->options_page = AIOSEOP_PLUGIN_DIRNAME . "/aioseop_class.php";
236
+ $aioseop_update_checker->renewal_page = 'https://semperplugins.com/all-in-one-seo-pack-pro-support-updates-renewal/';
237
 
238
  $aioseop_update_checker->addQueryArgFilter( array( $aioseop_update_checker, 'add_secret_key' ) );
239
  }
280
  if ( ! AIOSEOPPRO ) {
281
 
282
  $action_links = array(
 
 
 
 
 
 
 
 
283
 
284
  );
285
 
314
 
315
  'forum' => array(
316
  'label' => __( 'Support Forum', 'all-in-one-seo-pack' ),
317
+ 'url' => 'https://semperplugins.com/support/',
318
  ),
319
 
320
  'docs' => array(
321
  'label' => __( 'Documentation', 'all-in-one-seo-pack' ),
322
+ 'url' => 'https://semperplugins.com/documentation/',
323
  ),
324
 
325
  );
330
  $action_links['proupgrade'] =
331
  array(
332
  'label' => __( 'Upgrade to Pro', 'all-in-one-seo-pack' ),
333
+ 'url' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=plugins',
334
 
335
  );
336
  }
css/aiosp_admin.css CHANGED
@@ -93,3 +93,37 @@ li#wp-admin-bar-aioseop-pro-upgrade a.ab-item {
93
  font-size: 110%;
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  font-size: 110%;
94
  }
95
 
96
+ /* Dashicons in sidebar */
97
+
98
+ .aiosp-di .dashicons {
99
+ margin:1px;
100
+ line-height: 1;
101
+ width: 42px;
102
+ height:36px;
103
+ color:#fff;
104
+ padding:3px;
105
+ vertical-align:middle;
106
+ }
107
+ .aiosp-di .dashicons:before {
108
+ -webkit-font-smoothing:antialiased;
109
+ font:400 30px/1 dashicons;
110
+ line-height: 38px;
111
+ }
112
+ .aiosp-di .dashicons.di-facebook {
113
+ margin:0;
114
+ }
115
+ .aiosp-di .dashicons.di-facebook:before {
116
+ content:"\f304";
117
+ font-size:52px;
118
+ }
119
+ .aiosp-di .dashicons.di-twitter:before {
120
+ content:"\f301"
121
+ }
122
+ .aiosp-di .dashicons.di-facebook {
123
+ color: #3B5998;
124
+ }
125
+ .aiosp-di .dashicons.di-twitter {
126
+ width: 36px;
127
+ background-color:#00aced;
128
+ border-radius:2px;
129
+ }
css/modules/aioseop_module-rtl.css CHANGED
@@ -313,3 +313,7 @@ form#aiosp_settings_form,
313
  float: right !important;
314
  margin-bottom: 5px !important;
315
  }
 
 
 
 
313
  float: right !important;
314
  margin-bottom: 5px !important;
315
  }
316
+
317
+ #aioseop-about .aioseop_metabox_text ul {
318
+ padding-right: 15px;
319
+ }
css/modules/aioseop_module.css CHANGED
@@ -395,6 +395,11 @@ div.aioseop_tip_icon:before {
395
  border: 1px solid #DDD;
396
  }
397
 
 
 
 
 
 
398
  .aioseop input[readonly] {
399
  background-color: #EEE;
400
  margin: 5px 0 5px 0 !important;
@@ -1002,6 +1007,14 @@ table.aioseop_table td, table.aioseop_table th {
1002
  margin: 0 23px 0 13px;
1003
  }
1004
 
 
 
 
 
 
 
 
 
1005
  .aioseop_top_label {
1006
  width: 96%;
1007
  margin: 0 10px;
395
  border: 1px solid #DDD;
396
  }
397
 
398
+ #aioseop-about .aioseop_metabox_text ul {
399
+ list-style-type: disc;
400
+ padding-left: 15px;
401
+ }
402
+
403
  .aioseop input[readonly] {
404
  background-color: #EEE;
405
  margin: 5px 0 5px 0 !important;
1007
  margin: 0 23px 0 13px;
1008
  }
1009
 
1010
+ #aiosp_sitemap_status_metabox .handlediv.button-link {
1011
+ display: none;
1012
+ }
1013
+
1014
+ #aiosp_sitemap_status_metabox.closed .inside {
1015
+ display: block;
1016
+ }
1017
+
1018
  .aioseop_top_label {
1019
  width: 96%;
1020
  margin: 0 10px;
i18n/all-in-one-seo-pack-ar.mo DELETED
Binary file
i18n/all-in-one-seo-pack-art_xemoji.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ary.mo DELETED
Binary file
i18n/all-in-one-seo-pack-bg_BG.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ca.mo DELETED
Binary file
i18n/all-in-one-seo-pack-de_DE.mo DELETED
Binary file
i18n/all-in-one-seo-pack-el.mo DELETED
Binary file
i18n/all-in-one-seo-pack-en_AU.mo DELETED
Binary file
i18n/all-in-one-seo-pack-en_CA.mo DELETED
Binary file
i18n/all-in-one-seo-pack-en_GB.mo DELETED
Binary file
i18n/all-in-one-seo-pack-en_NZ.mo DELETED
Binary file
i18n/all-in-one-seo-pack-es_ES.mo DELETED
Binary file
i18n/all-in-one-seo-pack-fa_IR.mo DELETED
Binary file
i18n/all-in-one-seo-pack-fi.mo DELETED
Binary file
i18n/all-in-one-seo-pack-fr_CA.mo DELETED
Binary file
i18n/all-in-one-seo-pack-fr_FR.mo DELETED
Binary file
i18n/all-in-one-seo-pack-hi_IN.mo DELETED
Binary file
i18n/all-in-one-seo-pack-hr.mo DELETED
Binary file
i18n/all-in-one-seo-pack-hu_HU.mo DELETED
Binary file
i18n/all-in-one-seo-pack-id_ID.mo DELETED
Binary file
i18n/all-in-one-seo-pack-it_IT.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ko_KR.mo DELETED
Binary file
i18n/all-in-one-seo-pack-lv.mo DELETED
Binary file
i18n/all-in-one-seo-pack-nb_NO.mo DELETED
Binary file
i18n/all-in-one-seo-pack-nl_BE.mo DELETED
Binary file
i18n/all-in-one-seo-pack-nl_NL.mo DELETED
Binary file
i18n/all-in-one-seo-pack-nn_NO.mo DELETED
Binary file
i18n/all-in-one-seo-pack-oci.mo DELETED
Binary file
i18n/all-in-one-seo-pack-pl_PL.mo DELETED
Binary file
i18n/all-in-one-seo-pack-pt_PT.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ro_RO.mo DELETED
Binary file
i18n/all-in-one-seo-pack-ru_RU.mo DELETED
Binary file
i18n/all-in-one-seo-pack-sl_SL.mo DELETED
Binary file
i18n/all-in-one-seo-pack-sq.mo DELETED
Binary file
i18n/all-in-one-seo-pack-tr_TR.mo DELETED
Binary file
i18n/all-in-one-seo-pack-vi.mo DELETED
Binary file
i18n/all-in-one-seo-pack-zh_CN.mo DELETED
Binary file
images/amazon.jpg DELETED
Binary file
images/donate.jpg DELETED
Binary file
images/twitter.jpg DELETED
Binary file
inc/aioseop_functions.php CHANGED
@@ -211,7 +211,7 @@ if ( ! function_exists( 'aioseop_admin_head' ) ) {
211
  width: 100%;
212
  }
213
 
214
- .aioseop_mpc_admin_meta_options.editing {
215
  max-height: initial;
216
  overflow: visible;
217
  }
@@ -558,12 +558,11 @@ if ( ! function_exists( 'aioseop_ajax_scan_header' ) ) {
558
  $meta .= "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
559
  . '<p>' . __( 'All in One SEO Pack has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' )
560
  . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in All in One SEO Pack Feature Manager.', 'all-in-one-seo-pack' )
561
- . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook, Google and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
562
 
563
  foreach (
564
  Array(
565
  'https://developers.facebook.com/tools/debug',
566
- 'http://www.google.com/webmasters/tools/richsnippets',
567
  'https://dev.twitter.com/docs/cards/validation/validator',
568
  ) as $link
569
  ) {
@@ -795,101 +794,6 @@ if ( ! function_exists( 'aioseop_mrt_exclude_this_page' ) ) {
795
  }
796
  }
797
 
798
- if ( ! function_exists( 'aioseop_get_pages_start' ) ) {
799
-
800
- /**
801
- * @param $excludes
802
- *
803
- * @return mixed
804
- */
805
- function aioseop_get_pages_start( $excludes ) {
806
- global $aioseop_get_pages_start;
807
- $aioseop_get_pages_start = 1;
808
-
809
- return $excludes;
810
- }
811
- }
812
-
813
- if ( ! function_exists( 'aioseop_get_pages' ) ) {
814
-
815
- /**
816
- * @param $pages
817
- *
818
- * @return mixed
819
- */
820
- function aioseop_get_pages( $pages ) {
821
- global $aioseop_get_pages_start;
822
- if ( ! $aioseop_get_pages_start ) {
823
- return $pages;
824
- }
825
- foreach ( $pages as $k => $v ) {
826
- $postID = $v->ID;
827
- $menulabel = stripslashes( get_post_meta( $postID, '_aioseop_menulabel', true ) );
828
- if ( $menulabel ) {
829
- $pages[ $k ]->post_title = $menulabel;
830
- }
831
- }
832
- $aioseop_get_pages_start = 0;
833
-
834
- return $pages;
835
- }
836
- }
837
-
838
- // The following two functions are GPLed from Sarah G's Page Menu Editor, http://wordpress.org/extend/plugins/page-menu-editor/.
839
- if ( ! function_exists( 'aioseop_list_pages' ) ) {
840
- /**
841
- * Adds stuff to the HTML in list_pages.
842
- * @TODO See if we still use, or even want, these functions.
843
- *
844
- * @param $content
845
- *
846
- * @return mixed
847
- */
848
- function aioseop_list_pages( $content ) {
849
- global $wp_version;
850
- $matches = array();
851
- if ( preg_match_all( '/<li class="page_item page-item-(\d+)/i', $content, $matches ) ) {
852
- update_postmeta_cache( array_values( $matches[1] ) );
853
- unset( $matches );
854
- if ( $wp_version >= 3.3 ) {
855
- $pattern = '@<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)">@is';
856
- } else {
857
- $pattern = '@<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)" title="([^\"]+)">@is';
858
- }
859
-
860
- return preg_replace_callback( $pattern, 'aioseop_filter_callback', $content );
861
- }
862
-
863
- return $content;
864
- }
865
- }
866
-
867
- if ( ! function_exists( 'aioseop_filter_callback' ) ) {
868
-
869
- /**
870
- * @param $matches
871
- *
872
- * @return string
873
- */
874
- function aioseop_filter_callback( $matches ) {
875
- if ( $matches[1] && ! empty( $matches[1] ) ) {
876
- $postID = $matches[1];
877
- }
878
- if ( empty( $postID ) ) {
879
- $postID = get_option( 'page_on_front' );
880
- }
881
- $title_attrib = stripslashes( get_post_meta( $postID, '_aioseop_titleatr', true ) );
882
- if ( empty( $title_attrib ) && ! empty( $matches[4] ) ) {
883
- $title_attrib = $matches[4];
884
- }
885
- if ( ! empty( $title_attrib ) ) {
886
- $title_attrib = ' title="' . strip_tags( $title_attrib ) . '"';
887
- }
888
-
889
- return '<li class="page_item page-item-' . $postID . $matches[2] . '"><a href="' . $matches[3] . '"' . $title_attrib . '>';
890
- }
891
- }
892
-
893
  if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
894
 
895
  /**
211
  width: 100%;
212
  }
213
 
214
+ .aioseop_mpc_admin_meta_options.aio_editing {
215
  max-height: initial;
216
  overflow: visible;
217
  }
558
  $meta .= "<p><div class='aioseop_meta_info'><h3 style='padding:5px;margin-bottom:0px;'>" . __( 'What Does This Mean?', 'all-in-one-seo-pack' ) . "</h3><div style='padding:5px;padding-top:0px;'>"
559
  . '<p>' . __( 'All in One SEO Pack has detected that a plugin(s) or theme is also outputting social meta tags on your site. You can view this social meta in the source code of your site (check your browser help for instructions on how to view source code).', 'all-in-one-seo-pack' )
560
  . '</p><p>' . __( 'You may prefer to use the social meta tags that are being output by the other plugin(s) or theme. If so, then you should deactivate this Social Meta feature in All in One SEO Pack Feature Manager.', 'all-in-one-seo-pack' )
561
+ . '</p><p>' . __( 'You should avoid duplicate social meta tags. You can use these free tools from Facebook and Twitter to validate your social meta and check for errors:', 'all-in-one-seo-pack' ) . '</p>';
562
 
563
  foreach (
564
  Array(
565
  'https://developers.facebook.com/tools/debug',
 
566
  'https://dev.twitter.com/docs/cards/validation/validator',
567
  ) as $link
568
  ) {
794
  }
795
  }
796
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
  if ( ! function_exists( 'aioseop_add_contactmethods' ) ) {
798
 
799
  /**
inc/aiosp_common.php CHANGED
@@ -3,21 +3,28 @@
3
  /**
4
  * @package All-in-One-SEO-Pack
5
  */
 
 
 
 
 
 
 
6
  class aiosp_common {
7
 
8
  /**
9
  * aiosp_common constructor.
10
  *
11
- * These are commonly used functions that can be pulled from anywhere.
12
- * (or in some cases they're functions waiting for a home)
13
- *
14
  */
15
  function __construct() {
16
- //construct
17
  }
18
 
19
- static function clear_wpe_cache(){
20
- if( class_exists( 'WpeCommon') ){
 
 
 
21
  WpeCommon::purge_memcached();
22
  WpeCommon::clear_maxcdn_cache();
23
  WpeCommon::purge_varnish_cache();
@@ -67,7 +74,7 @@ class aiosp_common {
67
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
68
 
69
  //build URL
70
- $url = 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/';
71
  if ( $location ) {
72
  $url .= '?loc=' . $location;
73
  }
@@ -92,6 +99,9 @@ class aiosp_common {
92
  return $hyperlink;
93
  }
94
 
 
 
 
95
  static function get_upgrade_url() {
96
  //put build URL stuff in here
97
  }
3
  /**
4
  * @package All-in-One-SEO-Pack
5
  */
6
+
7
+ /**
8
+ * Class aiosp_common
9
+ *
10
+ * These are commonly used functions that can be pulled from anywhere.
11
+ * (or in some cases they're functions waiting for a home)
12
+ */
13
  class aiosp_common {
14
 
15
  /**
16
  * aiosp_common constructor.
17
  *
 
 
 
18
  */
19
  function __construct() {
20
+
21
  }
22
 
23
+ /**
24
+ * Clears WP Engine cache.
25
+ */
26
+ static function clear_wpe_cache() {
27
+ if ( class_exists( 'WpeCommon' ) ) {
28
  WpeCommon::purge_memcached();
29
  WpeCommon::clear_maxcdn_cache();
30
  WpeCommon::purge_varnish_cache();
74
  $affiliate_id = apply_filters( 'aiosp_aff_id', $affiliate_id );
75
 
76
  //build URL
77
+ $url = 'https://semperplugins.com/all-in-one-seo-pack-pro-version/';
78
  if ( $location ) {
79
  $url .= '?loc=' . $location;
80
  }
99
  return $hyperlink;
100
  }
101
 
102
+ /**
103
+ * Gets the upgrade to Pro version URL.
104
+ */
105
  static function get_upgrade_url() {
106
  //put build URL stuff in here
107
  }
js/modules/aioseop_module.js CHANGED
@@ -4,7 +4,7 @@
4
  * AIOSEOP Updates class.
5
  * @author Michael Torbert.
6
  * @author Semper Fi Web Design.
7
- * @copyright http://semperplugins.com
8
  * @version 1.0.0
9
  */
10
  if ( typeof aiosp_data != 'undefined' ) {
@@ -272,7 +272,7 @@ jQuery( document ).ready(function() {
272
  *
273
  * props to commentluv for this fix
274
  * @author commentluv.
275
- * @link http://core.trac.wordpress.org/ticket/16972
276
  * @since 1.0.0
277
  */
278
  jQuery( document ).ready(function() {
4
  * AIOSEOP Updates class.
5
  * @author Michael Torbert.
6
  * @author Semper Fi Web Design.
7
+ * @copyright https://semperplugins.com
8
  * @version 1.0.0
9
  */
10
  if ( typeof aiosp_data != 'undefined' ) {
272
  *
273
  * props to commentluv for this fix
274
  * @author commentluv.
275
+ * @link https://core.trac.wordpress.org/ticket/16972
276
  * @since 1.0.0
277
  */
278
  jQuery( document ).ready(function() {
js/quickedit_functions.js CHANGED
@@ -44,7 +44,7 @@ function aioseop_ajax_edit_meta_form( post_id, meta, nonce ) {
44
  input += '<img src="' + aioseopadmin.imgUrl+'delete.png" border="0" alt="" title="'+meta+'" /></a>';
45
  input += '</label>';
46
  uform.html( input );
47
- uform.attr( "class", "aioseop_mpc_admin_meta_options editing" );
48
  jQuery('#aioseop_'+meta+'_cancel_' + post_id).click(function() {
49
  uform.html( element );
50
  uform.attr( "class", "aioseop_mpc_admin_meta_options" );
44
  input += '<img src="' + aioseopadmin.imgUrl+'delete.png" border="0" alt="" title="'+meta+'" /></a>';
45
  input += '</label>';
46
  uform.html( input );
47
+ uform.attr( "class", "aioseop_mpc_admin_meta_options aio_editing" );
48
  jQuery('#aioseop_'+meta+'_cancel_' + post_id).click(function() {
49
  uform.html( element );
50
  uform.attr( "class", "aioseop_mpc_admin_meta_options" );
modules/aioseop_feature_manager.php CHANGED
@@ -117,7 +117,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
117
  $this->layout = array(
118
  'default' => array(
119
  'name' => $this->name,
120
- 'help_link' => 'http://semperplugins.com/documentation/feature-manager/',
121
  'options' => array_keys( $this->default_options ),
122
  ),
123
  );
117
  $this->layout = array(
118
  'default' => array(
119
  'name' => $this->name,
120
+ 'help_link' => 'https://semperplugins.com/documentation/feature-manager/',
121
  'options' => array_keys( $this->default_options ),
122
  ),
123
  );
modules/aioseop_importer_exporter.php CHANGED
@@ -19,15 +19,15 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
19
  parent::__construct();
20
  $help_text = Array(
21
  'import_submit' => __(
22
- "Select a valid All in One SEO Pack ini file and click 'Import' to import options from a previous state or install of All in One SEO Pack.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
23
  'all-in-one-seo-pack'
24
  ),
25
  'export_choices' => __(
26
- "You may choose to export settings from active modules, and content from post data.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
27
  'all-in-one-seo-pack'
28
  ),
29
  'export_post_types' => __(
30
- "Select which Post Types you want to export your All in One SEO Pack meta data for.<br /><a href='http://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
31
  'all-in-one-seo-pack'
32
  ),
33
  );
@@ -78,7 +78,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
78
  $this->layout = Array(
79
  'default' => Array(
80
  'name' => $this->name,
81
- 'help_link' => 'http://semperplugins.com/documentation/importer-exporter-module/',
82
  'options' => array_keys( $this->default_options ),
83
  ),
84
  );
@@ -362,8 +362,6 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Importer_Exporter' ) ) {
362
  'disable',
363
  'disable',
364
  'disable_analytics',
365
- 'titleatr',
366
- 'menulabel',
367
  'togglekeywords',
368
  );
369
  if ( ! empty( $_FILES['aiosp_importer_exporter_import_submit']['tmp_name'] ) ) {
19
  parent::__construct();
20
  $help_text = Array(
21
  'import_submit' => __(
22
+ "Select a valid All in One SEO Pack ini file and click 'Import' to import options from a previous state or install of All in One SEO Pack.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
23
  'all-in-one-seo-pack'
24
  ),
25
  'export_choices' => __(
26
+ "You may choose to export settings from active modules, and content from post data.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
27
  'all-in-one-seo-pack'
28
  ),
29
  'export_post_types' => __(
30
+ "Select which Post Types you want to export your All in One SEO Pack meta data for.<br /><a href='https://semperplugins.com/documentation/importer-exporter-module/' target='_blank'>Click here for documentation on this setting</a>",
31
  'all-in-one-seo-pack'
32
  ),
33
  );
78
  $this->layout = Array(
79
  'default' => Array(
80
  'name' => $this->name,
81
+ 'help_link' => 'https://semperplugins.com/documentation/importer-exporter-module/',
82
  'options' => array_keys( $this->default_options ),
83
  ),
84
  );
362
  'disable',
363
  'disable',
364
  'disable_analytics',
 
 
365
  'togglekeywords',
366
  );
367
  if ( ! empty( $_FILES['aiosp_importer_exporter_import_submit']['tmp_name'] ) ) {
modules/aioseop_opengraph.php CHANGED
@@ -114,7 +114,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
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' ),
118
  "gen_post_tags" => __( "Use post tags in generated article tags.", 'all-in-one-seo-pack' ),
119
  "types" => __( "Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.", 'all-in-one-seo-pack' ),
120
  "title" => __( "This is the Open Graph title of this Page or Post.", 'all-in-one-seo-pack' ),
@@ -430,7 +430,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
430
  jQuery( "#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
431
  } else {
432
  snippet = snippet.html();
433
- jQuery("#aioseop_opengraph_settings_facebook_debug").attr( "href", "https://developers.facebook.com/tools/debug/og/object?q=" + snippet );
434
  }
435
  });
436
  </script>
@@ -555,27 +555,27 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
555
  $this->layout = Array(
556
  'default' => Array(
557
  'name' => __( 'General Settings', 'all-in-one-seo-pack' ),
558
- 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/',
559
  'options' => Array() // this is set below, to the remaining options -- pdb
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',
@@ -591,12 +591,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
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
  );
@@ -618,8 +618,68 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
618
  $this->do_opengraph();
619
  }
620
 
621
- // Avoid having duplicate meta tags
622
- add_filter( 'jetpack_enable_open_graph', '__return_false' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
  }
624
 
625
  function settings_page_init() {
@@ -797,18 +857,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
797
  $type = 'WebSite';
798
  }
799
 
800
- $attr_array = Array();
801
-
802
- // Don't show this schema.org if the AMP plugin is active.
803
- if ( ! function_exists( 'amp_init' ) ) {
804
- $attr_array = Array(
805
  'itemscope',
806
  'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
807
- 'prefix="og: http://ogp.me/ns#"',
808
- );
809
- }
810
 
811
- $attributes = apply_filters( $this->prefix . 'attributes', $attr_array );
812
  foreach ( $attributes as $attr ) {
813
  if ( strpos( $output, $attr ) === false ) {
814
  $output .= "\n\t$attr ";
@@ -1049,6 +1103,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1049
 
1050
  if ( ! empty( $thumbnail ) ) {
1051
  $thumbnail = esc_url( $thumbnail );
 
1052
  }
1053
 
1054
  $width = $height = '';
@@ -1110,7 +1165,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Opengraph' ) ) {
1110
 
1111
  if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1112
  // Set Twitter image from custom.
1113
- $twitter_thumbnail = $metabox['aioseop_opengraph_settings_customimg_twitter'];
1114
  }
1115
 
1116
  $meta = Array(
@@ -1308,6 +1363,7 @@ END;
1308
  $size = apply_filters( 'post_thumbnail_size', 'large' );
1309
  $default = $this->get_the_image_by_default();
1310
  if ( ! empty( $default ) ) {
 
1311
  $img[ $default ] = 0;
1312
  }
1313
  $img = array_merge( $img, parent::get_all_images( $options, null ) );
114
  "customimg_twitter" => __( "This option lets you upload an image to use as the Twitter image for this Page or Post.", 'all-in-one-seo-pack' ),
115
  "gen_tags" => __( "Automatically generate article tags for Facebook type article when not provided.", 'all-in-one-seo-pack' ),
116
  "gen_keywords" => __( "Use keywords in generated article tags.", 'all-in-one-seo-pack' ),
117
+ "gen_categories" => __( "Use categories in generated article tags.", 'all-in-one-seo-pack' ),
118
  "gen_post_tags" => __( "Use post tags in generated article tags.", 'all-in-one-seo-pack' ),
119
  "types" => __( "Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.", 'all-in-one-seo-pack' ),
120
  "title" => __( "This is the Open Graph title of this Page or Post.", 'all-in-one-seo-pack' ),
430
  jQuery( "#aioseop_opengraph_settings_facebook_debug_wrapper").hide();
431
  } else {
432
  snippet = snippet.html();
433
+ jQuery("#aioseop_opengraph_settings_facebook_debug").attr( "href", "https://developers.facebook.com/tools/debug/sharing/?q=" + snippet );
434
  }
435
  });
436
  </script>
555
  $this->layout = Array(
556
  'default' => Array(
557
  'name' => __( 'General Settings', 'all-in-one-seo-pack' ),
558
+ 'help_link' => 'https://semperplugins.com/documentation/social-meta-module/',
559
  'options' => Array() // this is set below, to the remaining options -- pdb
560
  ),
561
  'home' => Array(
562
  'name' => __( 'Home Page Settings', 'all-in-one-seo-pack' ),
563
+ 'help_link' => 'https://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' => 'https://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' => 'https://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' => 'https://semperplugins.com/documentation/social-meta-module/#facebook-settings',
579
  'options' => Array(
580
  'key',
581
  'appid',
591
  ),
592
  'twitter' => Array(
593
  'name' => __( 'Twitter Settings', 'all-in-one-seo-pack' ),
594
+ 'help_link' => 'https://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' => 'https://semperplugins.com/documentation/social-meta-module/#scan_meta',
600
  'options' => Array( 'scan_header' ),
601
  ),
602
  );
618
  $this->do_opengraph();
619
  }
620
 
621
+ add_filter( 'jetpack_enable_open_graph', '__return_false' ); // Avoid having duplicate meta tags
622
+
623
+ // Force refresh of Facebook cache.
624
+ add_action( 'post_updated', array( $this, 'force_fb_refresh_update' ), 10, 3 );
625
+ add_action( 'transition_post_status', array( $this, 'force_fb_refresh_transition' ), 10, 3 );
626
+ }
627
+
628
+ /**
629
+ * Forces FaceBook OpenGraph to refresh its cache when a post is changed to
630
+ *
631
+ * @param $new_status
632
+ * @param $old_status
633
+ * @param $post
634
+ *
635
+ * @todo this and force_fb_refresh_update can probably have the remote POST extracted out.
636
+ *
637
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
638
+ * @since 2.3.11
639
+ */
640
+ function force_fb_refresh_transition( $new_status, $old_status, $post ) {
641
+ if ( 'publish' !== $new_status ) {
642
+ return;
643
+ }
644
+ if ( 'future' !== $old_status ) {
645
+ return;
646
+ }
647
+
648
+ $current_post_type = get_post_type();
649
+
650
+ // Only ping Facebook if Social SEO is enabled on this post type.
651
+ if ( $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
652
+ $post_url = get_permalink( $post->ID );
653
+ $endpoint = sprintf( 'https://graph.facebook.com/?%s', http_build_query( array(
654
+ 'id' => $post_url,
655
+ 'scrape' => true,
656
+ ) ) );
657
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
658
+ }
659
+ }
660
+
661
+ /**
662
+ * Forces FaceBook OpenGraph refresh on update.
663
+ *
664
+ * @param $post_ID
665
+ * @param $post_after
666
+ *
667
+ * @see https://developers.facebook.com/docs/sharing/opengraph/using-objects#update
668
+ * @since 2.3.11
669
+ */
670
+ function force_fb_refresh_update( $post_ID, $post_after ) {
671
+
672
+ $current_post_type = get_post_type();
673
+
674
+ // Only ping Facebook if Social SEO is enabled on this post type.
675
+ if ( 'publish' === $post_after->post_status && $this->option_isset( 'types' ) && is_array( $this->options['aiosp_opengraph_types'] ) && in_array( $current_post_type, $this->options['aiosp_opengraph_types'] ) ) {
676
+ $post_url = get_permalink( $post_ID );
677
+ $endpoint = sprintf( 'https://graph.facebook.com/?%s', http_build_query( array(
678
+ 'id' => $post_url,
679
+ 'scrape' => true,
680
+ ) ) );
681
+ wp_remote_post( $endpoint, array( 'blocking' => false ) );
682
+ }
683
  }
684
 
685
  function settings_page_init() {
857
  $type = 'WebSite';
858
  }
859
 
860
+ $attributes = apply_filters( $this->prefix . 'attributes', Array(
 
 
 
 
861
  'itemscope',
862
  'itemtype="http://schema.org/' . ucfirst( $type ) . '"',
863
+ 'prefix="og: http://ogp.me/ns#"'
864
+ ) );
 
865
 
 
866
  foreach ( $attributes as $attr ) {
867
  if ( strpos( $output, $attr ) === false ) {
868
  $output .= "\n\t$attr ";
1103
 
1104
  if ( ! empty( $thumbnail ) ) {
1105
  $thumbnail = esc_url( $thumbnail );
1106
+ $thumbnail = set_url_scheme( $thumbnail );
1107
  }
1108
 
1109
  $width = $height = '';
1165
 
1166
  if ( isset( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) && ! empty( $metabox['aioseop_opengraph_settings_customimg_twitter'] ) ) {
1167
  // Set Twitter image from custom.
1168
+ $twitter_thumbnail = set_url_scheme( $metabox['aioseop_opengraph_settings_customimg_twitter'] );
1169
  }
1170
 
1171
  $meta = Array(
1363
  $size = apply_filters( 'post_thumbnail_size', 'large' );
1364
  $default = $this->get_the_image_by_default();
1365
  if ( ! empty( $default ) ) {
1366
+ $default = set_url_scheme( $default );
1367
  $img[ $default ] = 0;
1368
  }
1369
  $img = array_merge( $img, parent::get_all_images( $options, null ) );
modules/aioseop_performance.php CHANGED
@@ -73,7 +73,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
73
  $this->layout = array(
74
  'default' => array(
75
  'name' => $this->name,
76
- 'help_link' => 'http://semperplugins.com/documentation/performance-settings/',
77
  'options' => array_keys( $this->default_options ),
78
  ),
79
  );
@@ -84,7 +84,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
84
 
85
  $this->layout['system_status'] = array(
86
  'name' => __( 'System Status', 'all-in-one-seo-pack' ),
87
- 'help_link' => 'http://semperplugins.com/documentation/performance-settings/',
88
  'options' => array_keys( $system_status ),
89
  );
90
 
73
  $this->layout = array(
74
  'default' => array(
75
  'name' => $this->name,
76
+ 'help_link' => 'https://semperplugins.com/documentation/performance-settings/',
77
  'options' => array_keys( $this->default_options ),
78
  ),
79
  );
84
 
85
  $this->layout['system_status'] = array(
86
  'name' => __( 'System Status', 'all-in-one-seo-pack' ),
87
+ 'help_link' => 'https://semperplugins.com/documentation/performance-settings/',
88
  'options' => array_keys( $system_status ),
89
  );
90
 
modules/aioseop_robots.php CHANGED
@@ -360,7 +360,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Robots' ) ) {
360
  <li>' . __( 'The yellow indicator means that a non-standard extension was recognized; not all crawlers may recognize it or interpret it the same way. The Allow and Sitemap directives are commonly used by Google and Yahoo.', 'all-in-one-seo-pack' ) . '</li>
361
  <li>' . __( 'The red indicator means that the syntax is invalid for a robots.txt file.', 'all-in-one-seo-pack' ) . '</li>
362
  </ul>
363
- <a target="_blank" rel="nofollow" href="http://wikipedia.org/wiki/Robots_exclusion_standard#Nonstandard_extensions">' . __( 'More Information', 'all-in-one-seo-pack' ) . '</a>
364
  </div>';
365
  }
366
  } else {
360
  <li>' . __( 'The yellow indicator means that a non-standard extension was recognized; not all crawlers may recognize it or interpret it the same way. The Allow and Sitemap directives are commonly used by Google and Yahoo.', 'all-in-one-seo-pack' ) . '</li>
361
  <li>' . __( 'The red indicator means that the syntax is invalid for a robots.txt file.', 'all-in-one-seo-pack' ) . '</li>
362
  </ul>
363
+ <a target="_blank" rel="nofollow" href="https://wikipedia.org/wiki/Robots_exclusion_standard#Nonstandard_extensions">' . __( 'More Information', 'all-in-one-seo-pack' ) . '</a>
364
  </div>';
365
  }
366
  } else {
modules/aioseop_sitemap.php CHANGED
@@ -22,6 +22,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
22
  var $freq;
23
  var $freq_sel;
24
  var $extra_sitemaps;
 
25
 
26
  /**
27
  * All_in_One_SEO_Pack_Sitemap constructor.
@@ -141,12 +142,12 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
141
  $this->layout = array(
142
  'status' => array(
143
  'name' => __( 'Sitemap Status', 'all-in-one-seo-pack' ),
144
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/',
145
  'options' => array_keys( $status_options ),
146
  ),
147
  'default' => array(
148
  'name' => $this->name,
149
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/',
150
  'options' => array_keys( $this->default_options ),
151
  ),
152
  );
@@ -266,25 +267,25 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
266
 
267
  $this->layout['addl_pages'] = array(
268
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
269
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
270
  'options' => array_keys( $addl_options ),
271
  );
272
 
273
  $this->layout['excl_pages'] = array(
274
  'name' => __( 'Excluded Items', 'all-in-one-seo-pack' ),
275
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
276
  'options' => array_keys( $excl_options ),
277
  );
278
 
279
  $this->layout['priorities'] = array(
280
  'name' => __( 'Priorities', 'all-in-one-seo-pack' ),
281
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies',
282
  'options' => array_keys( $prio_options ),
283
  );
284
 
285
  $this->layout['frequencies'] = array(
286
  'name' => __( 'Frequencies', 'all-in-one-seo-pack' ),
287
- 'help_link' => 'http://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies',
288
  'options' => array_keys( $freq_options ),
289
  );
290
 
@@ -345,7 +346,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
345
  *
346
  * Add new intervals of a week and a month.
347
  *
348
- * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
349
  *
350
  * @param $schedules
351
  *
@@ -1302,8 +1303,8 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1302
  }
1303
 
1304
  $notify_url = array(
1305
- 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap=',
1306
- 'bing' => 'http://www.bing.com/webmaster/ping.aspx?siteMap=',
1307
  );
1308
 
1309
  $notify_url = apply_filters( 'aioseo_sitemap_ping_urls', $notify_url );
@@ -1761,18 +1762,54 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1761
  $this->log_stats( 'indexed', $options["{$this->prefix}gzipped"], false );
1762
  }
1763
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1764
  /**
1765
  * Get simple sitemap.
1766
  *
1767
  * @return array
1768
  */
1769
  function get_simple_sitemap() {
 
 
 
 
 
 
 
 
 
 
1770
  $home = array(
1771
  'loc' => get_home_url(),
1772
  'priority' => $this->get_default_priority( 'homepage' ),
1773
  'changefreq' => $this->get_default_frequency( 'homepage' ),
1774
  );
1775
- $posts = get_option( 'page_for_posts' );
 
 
1776
  $this->paginate = false;
1777
  if ( $posts ) {
1778
  $posts = $this->get_permalink( $posts );
@@ -1786,15 +1823,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1786
  );
1787
  }
1788
  }
1789
- $child = $this->get_child_sitemap_urls();
1790
- $options = $this->options;
1791
- if ( is_array( $options["{$this->prefix}posttypes"] ) ) {
1792
- $options["{$this->prefix}posttypes"] = array_diff( $options["{$this->prefix}posttypes"], array( 'all' ) );
1793
- }
1794
- if ( is_array( $options["{$this->prefix}taxonomies"] ) ) {
1795
- $options["{$this->prefix}taxonomies"] = array_diff( $options["{$this->prefix}taxonomies"], array( 'all' ) );
1796
- }
1797
- $prio = $this->get_all_post_priority_data( $options["{$this->prefix}posttypes"] );
1798
  if ( $this->option_isset( 'archive' ) ) {
1799
  $prio = array_merge( $prio, $this->get_archive_prio_data() );
1800
  }
@@ -1818,9 +1847,10 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
1818
  }
1819
  }
1820
  }
1821
- if ( is_array( $posts ) ) {
1822
  array_unshift( $prio, $posts );
1823
  }
 
1824
  if ( is_array( $home ) ) {
1825
  array_unshift( $prio, $home );
1826
  }
@@ -2912,6 +2942,7 @@ if ( ! class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
2912
  if ( ! empty( $q->posts ) ) {
2913
  $args['exclude'] = array_merge( $args['exclude'], $q->posts );
2914
  }
 
2915
 
2916
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
2917
  if ( ! empty( $exclude_slugs ) ) {
22
  var $freq;
23
  var $freq_sel;
24
  var $extra_sitemaps;
25
+ var $excludes = array();
26
 
27
  /**
28
  * All_in_One_SEO_Pack_Sitemap constructor.
142
  $this->layout = array(
143
  'status' => array(
144
  'name' => __( 'Sitemap Status', 'all-in-one-seo-pack' ),
145
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/',
146
  'options' => array_keys( $status_options ),
147
  ),
148
  'default' => array(
149
  'name' => $this->name,
150
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/',
151
  'options' => array_keys( $this->default_options ),
152
  ),
153
  );
267
 
268
  $this->layout['addl_pages'] = array(
269
  'name' => __( 'Additional Pages', 'all-in-one-seo-pack' ),
270
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#additional-pages',
271
  'options' => array_keys( $addl_options ),
272
  );
273
 
274
  $this->layout['excl_pages'] = array(
275
  'name' => __( 'Excluded Items', 'all-in-one-seo-pack' ),
276
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#excluded-items',
277
  'options' => array_keys( $excl_options ),
278
  );
279
 
280
  $this->layout['priorities'] = array(
281
  'name' => __( 'Priorities', 'all-in-one-seo-pack' ),
282
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies',
283
  'options' => array_keys( $prio_options ),
284
  );
285
 
286
  $this->layout['frequencies'] = array(
287
  'name' => __( 'Frequencies', 'all-in-one-seo-pack' ),
288
+ 'help_link' => 'https://semperplugins.com/documentation/xml-sitemaps-module/#priorities-and-frequencies',
289
  'options' => array_keys( $freq_options ),
290
  );
291
 
346
  *
347
  * Add new intervals of a week and a month.
348
  *
349
+ * @link https://codex.wordpress.org/Plugin_API/Filter_Reference/cron_schedules
350
  *
351
  * @param $schedules
352
  *
1303
  }
1304
 
1305
  $notify_url = array(
1306
+ 'google' => 'https://www.google.com/webmasters/sitemaps/ping?sitemap=',
1307
+ 'bing' => 'https://www.bing.com/webmaster/ping.aspx?siteMap=',
1308
  );
1309
 
1310
  $notify_url = apply_filters( 'aioseo_sitemap_ping_urls', $notify_url );
1762
  $this->log_stats( 'indexed', $options["{$this->prefix}gzipped"], false );
1763
  }
1764
 
1765
+ function remove_posts_page( $postspageid ) {
1766
+ if ( in_array( $postspageid, $this->excludes ) ) {
1767
+ return true;
1768
+ }
1769
+
1770
+ if ( in_array( get_post_field( 'post_name', $postspageid ), $this->excludes ) ) {
1771
+ return true;
1772
+ }
1773
+
1774
+ return false;
1775
+ }
1776
+
1777
+ function remove_homepage( $homepage_id ) {
1778
+ if ( in_array( $homepage_id, $this->excludes ) ) {
1779
+
1780
+ return true;
1781
+ }
1782
+ if ( in_array( get_post_field( 'post_name', $homepage_id ), $this->excludes ) ) {
1783
+ return true;
1784
+ }
1785
+
1786
+ return false;
1787
+ }
1788
+
1789
  /**
1790
  * Get simple sitemap.
1791
  *
1792
  * @return array
1793
  */
1794
  function get_simple_sitemap() {
1795
+ $child = $this->get_child_sitemap_urls();
1796
+ $options = $this->options;
1797
+ if ( is_array( $options["{$this->prefix}posttypes"] ) ) {
1798
+ $options["{$this->prefix}posttypes"] = array_diff( $options["{$this->prefix}posttypes"], array( 'all' ) );
1799
+ }
1800
+ if ( is_array( $options["{$this->prefix}taxonomies"] ) ) {
1801
+ $options["{$this->prefix}taxonomies"] = array_diff( $options["{$this->prefix}taxonomies"], array( 'all' ) );
1802
+ }
1803
+ $prio = $this->get_all_post_priority_data( $options["{$this->prefix}posttypes"] );
1804
+
1805
  $home = array(
1806
  'loc' => get_home_url(),
1807
  'priority' => $this->get_default_priority( 'homepage' ),
1808
  'changefreq' => $this->get_default_frequency( 'homepage' ),
1809
  );
1810
+
1811
+ $posts = $postspageid = get_option( 'page_for_posts' ); // It's 0 if posts are on homepage, otherwise it's the id of the posts page.
1812
+
1813
  $this->paginate = false;
1814
  if ( $posts ) {
1815
  $posts = $this->get_permalink( $posts );
1823
  );
1824
  }
1825
  }
1826
+
 
 
 
 
 
 
 
 
1827
  if ( $this->option_isset( 'archive' ) ) {
1828
  $prio = array_merge( $prio, $this->get_archive_prio_data() );
1829
  }
1847
  }
1848
  }
1849
  }
1850
+ if ( is_array( $posts ) && $this->remove_posts_page( $postspageid ) !== true ) {
1851
  array_unshift( $prio, $posts );
1852
  }
1853
+
1854
  if ( is_array( $home ) ) {
1855
  array_unshift( $prio, $home );
1856
  }
2942
  if ( ! empty( $q->posts ) ) {
2943
  $args['exclude'] = array_merge( $args['exclude'], $q->posts );
2944
  }
2945
+ $this->excludes = array_merge( $args['exclude'] , $exclude_slugs ); // Add excluded slugs and IDs to class var.
2946
 
2947
  $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
2948
  if ( ! empty( $exclude_slugs ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
- Stable tag: 2.3.10.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: seo, all in one seo, google, twitter, page, image seo, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, google sitemap, sitemaps, robots meta, yahoo, bing, news sitemaps, multisite, canonical, nofollow, noindex, keywords, description, webmaster tools, google webmaster tools, google analytics
5
  Requires at least: 4.0
6
  Tested up to: 4.6
7
+ Stable tag: 2.3.11
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10