All in One SEO Pack - Version 2.0.3

Version Description

Download this release

Release Info

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

Code changes from version 2.0.2 to 2.0.3

aioseop_class.php CHANGED
@@ -93,7 +93,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
93
  'default' => 1),
94
  "rewrite_titles"=> Array(
95
  'name' => __( 'Rewrite Titles:', 'all_in_one_seo_pack' ),
96
- 'help_text' => __( "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: “Blog Archive >> Blog Name >> Post Title” (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to “Post Title | Blog Name”. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string.", 'all_in_one_seo_pack' ),
97
  'default' => 1,
98
  'type' => 'radio',
99
  'initial_options' => Array( 1 => __( 'Enabled', 'all_in_one_seo_pack' ),
@@ -170,15 +170,28 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
170
  'default' => '%category_title% | %blog_title%',
171
  'condshow' => Array( "aiosp_rewrite_titles" => 1 ) ),
172
  "archive_title_format"=> Array(
173
- 'name' => __( 'Archive Title Format:', 'all_in_one_seo_pack' ),
174
  'help_text' =>
175
  __( 'The following macros are supported:', 'all_in_one_seo_pack' ) .
176
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all_in_one_seo_pack' ) . '</li><li>' .
177
  __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
178
- __( '%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack' ) . '</li></ul>',
 
 
 
179
  'type' => 'text',
180
  'default' => '%date% | %blog_title%',
181
  'condshow' => Array( "aiosp_rewrite_titles" => 1 ) ),
 
 
 
 
 
 
 
 
 
 
182
  "tag_title_format"=> Array(
183
  'name' => __( 'Tag Title Format:', 'all_in_one_seo_pack' ),
184
  'help_text' =>
@@ -253,6 +266,20 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
253
  'default' => array('post', 'page'),
254
  'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
255
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  "cposttitles" => Array(
257
  'name' => __( 'Custom titles:', 'all_in_one_seo_pack' ),
258
  'help_text' => __( 'Allows setting specific custom titles for all post types.', 'all_in_one_seo_pack' ),
@@ -333,9 +360,13 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
333
  'name' => __( 'Use noindex for Categories:', 'all_in_one_seo_pack' ),
334
  'help_text' => __( 'Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack' ),
335
  'default' => 1),
336
- "archive_noindex"=> Array(
337
- 'name' => __( 'Use noindex for Archives:', 'all_in_one_seo_pack' ),
338
- 'help_text' => __( 'Check this for excluding archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack' ),
 
 
 
 
339
  'default' => 1),
340
  "tags_noindex"=> Array(
341
  'name' => __( 'Use noindex for Tag Archives:', 'all_in_one_seo_pack' ),
@@ -382,7 +413,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
382
  $this->locations = Array(
383
  'default' => Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => null ),
384
  'aiosp' => Array( 'name' => $this->plugin_name, 'type' => 'metabox', 'prefix' => '',
385
- 'options' => Array( 'edit', 'nonce-aioseop-edit', 'upgrade', 'snippet', 'title', 'description', 'keywords', 'noindex', 'nofollow', 'titleatr', 'menulabel', 'disable', 'disable_analytics' ),
386
  'default_options' => Array(
387
  'edit' => Array( 'type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1 ),
388
  'nonce-aioseop-edit' => Array( 'type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1 ),
@@ -390,14 +421,29 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
390
  'default' => '<a target="__blank" href="http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/">'
391
  . __( 'Upgrade to All in One SEO Pack Pro Version', 'all_in_one_seo_pack' ) . '</a>'
392
  ),
393
- 'snippet' => Array( 'name' => __( 'Preview Snippet', 'all_in_one_seo_pack' ), 'type' => 'custom', 'help_text' => __( 'A preview of what this page might look like in search engine results.', 'all_in_one_seo_pack' ), 'label' => 'top', 'default' => '<div class="preview_snippet"><div id="aioseop_snippet"><h3><a>%s</a></h3><div><div><cite>%s</cite></div><span>%s</span></div></div></div>' ),
 
 
 
 
 
 
 
 
 
 
 
 
394
  'title' => Array( 'name' => __( 'Title', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'A custom title that shows up in the title tag for this page.', 'all_in_one_seo_pack' ), 'count' => true, 'size' => 60 ),
395
  'description' => Array( 'name' => __( 'Description', 'all_in_one_seo_pack' ), 'type' => 'textarea', 'help_text' => __( 'The META description for this page. This will override any autogenerated descriptions.', 'all_in_one_seo_pack' ), 'count' => true, 'cols' => 80, 'rows' => 2 ),
396
  'keywords' => Array( 'name' => __( 'Keywords (comma separated)', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'A comma separated list of your most important keywords for this page that will be written as META keywords.', 'all_in_one_seo_pack' ) ),
397
- 'noindex' => Array( 'name' => __( "Robots Meta NOINDEX", 'all_in_one_seo_pack' ), 'help_text' => __( 'Check this box to ask search engines not to index this page.', 'all_in_one_seo_pack' ) ),
398
- 'nofollow' => Array( 'name' => __( "Robots Meta NOFOLLOW", 'all_in_one_seo_pack' ), 'help_text' => __( 'Check this box to ask search engines not to follow links from this page.', 'all_in_one_seo_pack' ) ),
 
 
399
  'titleatr' => Array( 'name' => __( 'Title Attribute', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Set the title attribute for menu links.', 'all_in_one_seo_pack' ), 'size' => 60 ),
400
  'menulabel' => Array( 'name' => __( 'Menu Label', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Set the label for this page menu item.', 'all_in_one_seo_pack' ), 'size' => 60 ),
 
401
  'disable' => Array( 'name' => __( 'Disable on this page/post', 'all_in_one_seo_pack' ), 'help_text' => __( 'Disable SEO on this page.', 'all_in_one_seo_pack' ) ),
402
  'disable_analytics' => Array( 'name' => __( 'Disable Google Analytics', 'all_in_one_seo_pack' ), 'help_text' => __( 'Disable Google Analytics on this page.', 'all_in_one_seo_pack' ), 'condshow' => Array( 'aiosp_disable' => 'on' ) ) ),
403
  'display' => null )
@@ -418,7 +464,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
418
  ),
419
  'title' => Array(
420
  'name' => __( 'Title Settings', 'all_in_one_seo_pack' ),
421
- 'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format",
422
  "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format" )
423
  ),
424
  'cpt' => Array(
@@ -439,7 +485,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
439
  ),
440
  'noindex' => Array(
441
  'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ),
442
- 'options' => Array( 'category_noindex', 'archive_noindex', 'tags_noindex' )
443
  ),
444
  'advanced' => Array(
445
  'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ),
@@ -485,6 +531,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
485
  $args['options']['type'] = 'html';
486
  $args['options']['nowrap'] = false;
487
  $args['options']['save'] = false;
 
488
 
489
  $title = $this->wp_title();
490
  if ( empty( $title ) ) $title = $post->post_title;
@@ -493,10 +540,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
493
  $url = apply_filters( 'aioseop_canonical_url', $url );
494
  if ( !$url ) $url = get_permalink();
495
 
496
- $description = $this->get_post_description( $post );
497
 
498
- if ( strlen( $title ) > 70 ) $title = $this->trim_excerpt_without_filters( $title, 70 ) . '...';
499
- if ( strlen( $description ) > 156 ) $description = $this->trim_excerpt_without_filters( $description, 156 ) . '...';
500
 
501
  $args['value'] = sprintf( $args['value'], esc_attr( strip_tags( $title ) ), esc_url( $url ), esc_attr( strip_tags( $description ) ) );
502
  $buf = $this->get_option_row( $args['name'], $args['options'], $args );
@@ -517,6 +564,9 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
517
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
518
  background: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-16.png) no-repeat 6px 6px !important;
519
  }
 
 
 
520
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
521
  display: none;
522
  }
@@ -627,6 +677,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
627
  }
628
  $this->default_options["posttypecolumns"]['initial_options'] = $post_types;
629
  $this->default_options["cpostactive"]['initial_options'] = $post_types;
 
 
630
  foreach ( $post_types as $p => $pt ) {
631
  $field = $p . "_title_format";
632
  $name = $post_objs[$p]->labels->singular_name;
@@ -647,7 +699,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
647
  '</ul>',
648
  'type' => 'text',
649
  'default' => '%post_title% | %blog_title%',
650
- 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on', 'aiosp_cposttitles' => 'on' )
651
  );
652
  $this->layout['cpt']['options'][] = $field;
653
  }
@@ -659,14 +711,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
659
  }
660
 
661
  function add_admin_pointers() {
662
- $this->pointers['aioseop_menu_202'] = Array( 'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
663
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all_in_one_seo_pack' ), AIOSEOP_VERSION )
664
  . '</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>',
665
  'pointer_edge' => 'top',
666
  'pointer_align' => 'left',
667
  'pointer_scope' => 'global'
668
  );
669
- $this->pointers['aioseop_welcome_202'] = Array( 'pointer_target' => '#aioseop_top_button',
670
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all_in_one_seo_pack' ), AIOSEOP_VERSION )
671
  . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New in 2.0: manage your performance with our Performance module; enable it from our new feature manager! And please review your settings, we have added some new ones!', 'all_in_one_seo_pack' ) . '</p>',
672
  'pointer_edge' => 'bottom',
@@ -682,6 +734,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
682
 
683
  function enqueue_scripts() {
684
  add_filter( "{$this->prefix}display_settings", Array( $this, 'filter_settings' ), 10, 3 );
 
685
  parent::enqueue_scripts();
686
  }
687
 
@@ -705,14 +758,14 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
705
  $this->update_class_option( $this->options );
706
  }
707
 
708
- function get_current_options( $opts = Array(), $location = null, $defaults = null ) {
709
  if ( ( $location === 'aiosp' ) && ( $this->locations[$location]['type'] == 'metabox' ) ) {
710
  global $post;
711
  $post_id = $post;
712
  if ( is_object( $post_id ) )
713
  $post_id = $post_id->ID;
714
  $get_opts = $this->default_options( $location );
715
- foreach ( Array( 'keywords', 'description', 'title', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'titleatr', 'menulabel' ) as $f ) {
716
  $field = "aiosp_$f";
717
  $get_opts[$field] = htmlspecialchars( stripcslashes( get_post_meta( $post_id, '_aioseop_' . $f, true ) ) );
718
  }
@@ -732,8 +785,25 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
732
  unset( $settings["{$prefix}$opt"] );
733
 
734
  } elseif ( $location == 'aiosp' ) {
735
- global $post;
736
  $prefix = $this->get_prefix( $location ) . $location . '_';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
737
  if ( is_object( $post ) ) {
738
  if ( $post->post_type != 'page' ) {
739
  unset( $settings["{$prefix}titleatr"] );
@@ -751,6 +821,19 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
751
  }
752
 
753
  function filter_options( $options, $location ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
754
  if ( $location == null ) {
755
  $prefix = $this->prefix;
756
  if ( isset( $options["{$prefix}rewrite_titles"] ) && ( !empty( $options["{$prefix}rewrite_titles"] ) ) )
@@ -821,6 +904,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
821
  </div>
822
  <?php
823
  break;
 
 
 
 
 
 
824
  }
825
  echo "</div>";
826
  }
@@ -840,13 +929,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
840
 
841
  function template_redirect() {
842
  global $aioseop_options;
843
-
844
- $post = $this->get_queried_object();
845
-
846
- if( aioseop_mrt_exclude_this_page() ) return;
847
-
848
  if ( is_feed() ) return;
849
-
 
 
 
850
  if ( is_single() || is_page() ) {
851
  $aiosp_disable = htmlspecialchars(stripcslashes( get_post_meta( $post->ID, '_aioseop_disable', true ) ) );
852
  if ( $aiosp_disable ) {
@@ -874,7 +962,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
874
  if ( $force_rewrites )
875
  ob_start( array( $this, 'output_callback_for_title' ) );
876
  else
877
- add_filter( 'wp_title', array( $this, 'wp_title' ) );
878
  }
879
  }
880
 
@@ -909,7 +997,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
909
  add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
910
  add_filter( 'wp_list_pages', 'aioseop_list_pages' );
911
  add_action( 'wp_head', array( $this, 'wp_head') );
912
- add_action( 'template_redirect', array( $this, 'template_redirect' ) );
913
  add_filter( 'wp_list_pages_excludes', 'aioseop_get_pages_start' );
914
  add_filter( 'get_pages', 'aioseop_get_pages' );
915
  }
@@ -941,6 +1029,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
941
  global $aioseop_options;
942
  $post = $this->get_queried_object();
943
  $meta_string = null;
 
944
 
945
  if ( is_single() || is_page() ) {
946
  $aiosp_disable = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_disable', true ) ) );
@@ -969,8 +1058,8 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
969
  $active_handlers = array();
970
  }
971
  if (sizeof($active_handlers) > 0 &&
972
- strtolower( $active_handlers[sizeof( $active_handlers ) - 1] ) ==
973
- strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' ) ) {
974
  ob_end_flush();
975
  } else {
976
  $this->log( "another plugin interfering?" );
@@ -993,10 +1082,7 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
993
 
994
  $is_front_page_keywords = ( ( $is_front_page && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() ) || $this->is_static_front_page() );
995
 
996
- $page_for_posts = get_option( 'page_for_posts' );
997
- $blog_page = '';
998
- if ( $page_for_posts && ( !is_object( $post ) || ( $page_for_posts != $post->ID ) ) && is_home() )
999
- $blog_page = get_post( $page_for_posts );
1000
 
1001
  if ( $is_front_page_keywords )
1002
  $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );
@@ -1017,6 +1103,10 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1017
  else if ( $is_front_page )
1018
  $description = trim( stripcslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
1019
  else if ( is_single() || is_page() || is_home() || $this->is_static_posts_page() )
 
 
 
 
1020
  if ( $this->is_static_front_page() )
1021
  $description = trim( stripcslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
1022
  elseif ( !empty( $blog_page ) )
@@ -1024,11 +1114,12 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1024
  if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) )
1025
  $description = $this->get_post_description( $post );
1026
 
1027
- $description = apply_filters( 'aioseop_description', $description );
 
1028
 
1029
- if ( isset($description) && (strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) {
1030
  $description = trim( strip_tags( $description ) );
1031
- $description = str_replace( '"', '', $description );
1032
 
1033
  // replace newlines on mac / windows?
1034
  $description = str_replace( "\r\n", ' ', $description );
@@ -1078,17 +1169,29 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1078
 
1079
  $is_tag = is_tag();
1080
 
1081
- if ( ( is_category() && $aioseop_options['aiosp_category_noindex'] ) || ( !is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex'] ) || ( $aioseop_options['aiosp_tags_noindex'] && $is_tag ) ) {
 
 
1082
  $meta_string .= '<meta name="robots" content="noindex,follow" />' . "\n";
1083
  } else {
1084
  if ( is_single() || is_page() ) {
 
1085
  $aiosp_noindex = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_noindex', true ) ) );
1086
  $aiosp_nofollow = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_nofollow', true ) ) );
1087
- if ( $aiosp_noindex || $aiosp_nofollow ) {
 
 
1088
  $noindex = "index";
1089
  $nofollow = "follow";
1090
- if ( $aiosp_noindex ) $noindex = "no" . $noindex;
1091
- if ( $aiosp_nofollow ) $nofollow = "no" . $nofollow;
 
 
 
 
 
 
 
1092
  $meta_string .= '<meta name="robots" content="' . $noindex . ',' . $nofollow . '" />' . "\n";
1093
  }
1094
  }
@@ -1139,6 +1242,56 @@ class All_in_One_SEO_Pack extends All_in_One_SEO_Pack_Module {
1139
  $meta_string .= $home_meta;
1140
  }
1141
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1142
 
1143
  if ( $meta_string != null ) echo "$meta_string\n";
1144
 
@@ -1163,7 +1316,13 @@ function aiosp_google_analytics() {
1163
  }
1164
  ?>
1165
  <?php if ( !empty( $aioseop_options['aiosp_ga_domain'] ) ) {
1166
- ?> _gaq.push(['_setDomainName', '<?php echo $aioseop_options['aiosp_ga_domain']; ?>']);
 
 
 
 
 
 
1167
  <?php
1168
  }
1169
  ?> _gaq.push(['_trackPageview']);
@@ -1225,10 +1384,10 @@ function aiosp_google_analytics() {
1225
 
1226
  if ( get_query_var( 'm' ) ) {
1227
  $m = preg_replace( '/[^0-9]/', '', get_query_var( 'm' ) );
1228
- switch ( strlen( $m ) ) {
1229
  case 4: $link = get_year_link( $m ); break;
1230
- case 6: $link = get_month_link( substr( $m, 0, 4), substr($m, 4, 2 ) ); break;
1231
- case 8: $link = get_day_link( substr( $m, 0, 4 ), substr( $m, 4, 2 ), substr( $m, 6, 2 ) ); break;
1232
  default:
1233
  return false;
1234
  }
@@ -1287,7 +1446,10 @@ function aiosp_google_analytics() {
1287
  function yoast_get_paged( $link ) {
1288
  $page = $this->get_page_number();
1289
  if ( !empty( $page ) && $page > 1 ) {
1290
- $link = trailingslashit( $link ) ."page/". "$page";
 
 
 
1291
  $link = user_trailingslashit( $link, 'paged' );
1292
  }
1293
  return $link;
@@ -1321,23 +1483,56 @@ function aiosp_google_analytics() {
1321
  $description = preg_replace( "/\s\s+/u", " ", $description );
1322
  return $description;
1323
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1324
 
1325
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1326
  function replace_title( $content, $title ) {
1327
  $title = trim( strip_tags( $title ) );
1328
  $title_tag_start = "<title>";
1329
  $title_tag_end = "</title>";
1330
- $len_start = strlen( $title_tag_start );
1331
  $title = stripcslashes( trim( $title ) );
1332
- $start = strpos( $content, $title_tag_start );
1333
- $end = strpos( $content, $title_tag_end );
1334
 
1335
  $this->title_start = $start;
1336
  $this->title_end = $end;
1337
  $this->orig_title = $title;
1338
 
1339
  if ( $start && $end )
1340
- $header = substr( $content, 0, $start + $len_start ) . $title . substr( $content, $end );
1341
  else
1342
  $header = $content;
1343
 
@@ -1386,7 +1581,7 @@ function aiosp_google_analytics() {
1386
  $search = $this->capitalize( $search );
1387
  $title = $search;
1388
  } else if ( ( is_tax() || is_category() ) && !is_feed() ) {
1389
- $category_name = ucwords($this->internationalize( single_cat_title( '', false ) ) );
1390
  $title = $category_name;
1391
  } else if ( is_page() ) {
1392
  $title = $this->internationalize( single_post_title( '', false ) );
@@ -1436,7 +1631,7 @@ function aiosp_google_analytics() {
1436
  global $STagging;
1437
  $page = get_query_var( 'page' );
1438
  if ( $paged > $page ) $page = $paged;
1439
- if ( is_paged() || ( isset($STagging) && $STagging->is_tag_view() && $paged ) || $page ) {
1440
  $part = $this->internationalize( $aioseop_options['aiosp_paged_format'] );
1441
  if ( isset( $part ) || !empty( $part ) ) {
1442
  $part = " " . trim( $part );
@@ -1469,21 +1664,22 @@ function aiosp_google_analytics() {
1469
  $title_format = $this->get_post_title_format();
1470
  $authordata = get_userdata( $post->post_author );
1471
  $r_title = array( '%blog_title%', '%blog_description%', '%post_title%', '%category%', '%category_title%', '%post_author_login%', '%post_author_nicename%', '%post_author_firstname%', '%post_author_lastname%' );
1472
- $d_title = array( $this->internationalize( get_bloginfo('name') ), $this->internationalize( get_bloginfo( 'description' ) ), $title, $category, $category, $authordata->user_login, $authordata->user_nicename, ucwords( $authordata->first_name ), ucwords( $authordata->last_name ) );
1473
  $title = trim( str_replace( $r_title, $d_title, $title_format ) );
1474
  return $title;
1475
  }
1476
 
1477
  function apply_page_title_format( $title ) {
1478
- global $aioseop_options;
1479
  $title_format = $aioseop_options['aiosp_page_title_format'];
 
1480
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1481
  $new_title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $new_title );
1482
  $new_title = str_replace( '%page_title%', $title, $new_title );
1483
  $new_title = str_replace( '%page_author_login%', $authordata->user_login, $new_title );
1484
  $new_title = str_replace( '%page_author_nicename%', $authordata->user_nicename, $new_title );
1485
- $new_title = str_replace( '%page_author_firstname%', ucwords($authordata->first_name ), $new_title );
1486
- $new_title = str_replace( '%page_author_lastname%', ucwords($authordata->last_name ), $new_title );
1487
  $title = trim( $new_title );
1488
  return $title;
1489
  }
@@ -1496,16 +1692,17 @@ function aiosp_google_analytics() {
1496
  if ( is_front_page() ) {
1497
  $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1498
  if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) {
1499
- $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
1500
- if ( empty( $title ) )
1501
- $title = $this->internationalize( $post->post_title );
1502
- if ( empty( $title ) )
1503
- $title = $this->internationalize( $this->get_original_title( '', false ) );
1504
- if ( !empty( $title ) )
1505
- $title = $this->apply_page_title_format( $title );
1506
  }
1507
  if (empty( $title ) )
1508
- $title = $this->internationalize( get_option( 'blogname' ) );
 
1509
  return $this->paged_title( $title );
1510
  } else if ( is_attachment() ) {
1511
  if ( $post === null ) return false;
@@ -1600,7 +1797,7 @@ function aiosp_google_analytics() {
1600
  } else if ( ( is_tax() || is_category() ) && !is_feed() ) {
1601
  $category_description = $this->internationalize( category_description() );
1602
  if( !empty( $aioseop_options['aiosp_cap_cats'] ) ) {
1603
- $category_name = ucwords( $this->internationalize( single_cat_title( '', false ) ) );
1604
  } else {
1605
  $category_name = $this->internationalize( single_cat_title( '', false ) );
1606
  }
@@ -1624,11 +1821,31 @@ function aiosp_google_analytics() {
1624
  return $title;
1625
  }
1626
  } else if ( is_archive() ) {
1627
- $date = $this->internationalize( $this->get_original_title( '', false ) );
1628
- $title_format = $aioseop_options['aiosp_archive_title_format'];
1629
- $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1630
  $new_title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $new_title );
1631
- $new_title = str_replace( '%date%', $date, $new_title );
1632
  $title = trim( $new_title );
1633
  $title = $this->paged_title( $title );
1634
  return $title;
@@ -1681,7 +1898,7 @@ function aiosp_google_analytics() {
1681
  $request_a = explode( ' ', $request );
1682
  $request_new = array();
1683
  foreach ( $request_a as $token ) {
1684
- $request_new[] = ucwords( trim( $token ) );
1685
  }
1686
  $request = implode( ' ', $request_new );
1687
  return $request;
@@ -1692,7 +1909,7 @@ function aiosp_google_analytics() {
1692
  $tokens = explode( ' ', $s );
1693
  while ( list( $key, $val ) = each( $tokens ) ) {
1694
  $tokens[ $key ] = trim( $tokens[ $key ] );
1695
- $tokens[ $key ] = $this->strtoupper( substr( $tokens[$key], 0, 1 ) ) . substr( $tokens[$key], 1 );
1696
  }
1697
  $s = implode( ' ', $tokens );
1698
  return $s;
@@ -1704,12 +1921,12 @@ function aiosp_google_analytics() {
1704
  $text = strip_tags( $text );
1705
  if ( !$max ) $max = $this->maximum_description_length;
1706
 
1707
- if ( $max < strlen( $text ) ) {
1708
  while( $text[$max] != ' ' && $max > $this->minimum_description_length ) {
1709
  $max--;
1710
  }
1711
  }
1712
- $text = substr( $text, 0, $max );
1713
  return trim( stripcslashes( $text ) );
1714
  }
1715
 
@@ -1834,25 +2051,21 @@ function aiosp_google_analytics() {
1834
 
1835
  if ( isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'edit-aioseop-nonce') ) {
1836
 
1837
- foreach ( Array( 'keywords', 'description', 'title', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'titleatr', 'menulabel' ) as $f ) {
1838
  $field = "aiosp_$f";
1839
  if ( isset( $_POST[$field] ) ) $$field = $_POST[$field];
1840
  }
1841
 
1842
- delete_post_meta( $id, '_aioseop_keywords' );
1843
- delete_post_meta( $id, '_aioseop_description' );
1844
- delete_post_meta( $id, '_aioseop_noindex' );
1845
- delete_post_meta( $id, '_aioseop_nofollow' );
1846
- delete_post_meta( $id, '_aioseop_title' );
1847
- delete_post_meta( $id, '_aioseop_titleatr' );
1848
- delete_post_meta( $id, '_aioseop_menulabel' );
1849
 
1850
  if ( $this->is_admin() ) {
 
1851
  delete_post_meta($id, '_aioseop_disable' );
1852
  delete_post_meta($id, '_aioseop_disable_analytics' );
1853
  }
1854
 
1855
- foreach ( Array( 'keywords', 'description', 'title', 'noindex', 'nofollow', 'titleatr', 'menulabel' ) as $f ) {
1856
  $var = "aiosp_$f";
1857
  $field = "_aioseop_$f";
1858
  if ( isset( $$var ) && !empty( $$var ) )
@@ -1884,19 +2097,28 @@ function aiosp_google_analytics() {
1884
  }
1885
 
1886
  function admin_bar_menu() {
1887
- global $wp_admin_bar, $aioseop_admin_menu, $aioseop_options;
1888
  if ( !empty( $aioseop_options['aiosp_admin_bar'] ) ) {
1889
  $menu_slug = plugin_basename( __FILE__ );
1890
- if ( function_exists( 'menu_page_url' ) )
1891
- $url = menu_page_url( $menu_slug, 0 );
1892
- else
1893
- $url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
 
 
 
1894
  $wp_admin_bar->add_menu( array( 'id' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'SEO', 'all_in_one_seo_pack' ), 'href' => $url ) );
1895
- add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
 
1896
  $aioseop_admin_menu = 1;
 
 
 
 
 
1897
  }
1898
  }
1899
-
1900
  function admin_bar_upgrade_menu() {
1901
  global $wp_admin_bar;
1902
  $wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Upgrade To Pro', 'all_in_one_seo_pack' ), 'id' => 'aioseop-pro-upgrade', 'href' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/', 'meta' => Array( 'target' => '_blank' ) ) );
@@ -1971,9 +2193,9 @@ function aiosp_google_analytics() {
1971
  else
1972
  add_utility_page( $menu_name, $menu_name, 'manage_options', $file, Array( $this, 'display_settings_page' ) );
1973
 
1974
- add_meta_box('aioseop-list', "Join Our Mailing List", array( $this, 'display_extra_metaboxes'), 'aioseop_metaboxes', 'normal', 'core');
1975
  add_meta_box('aioseop-about', "About <span style='float:right;'>Version <b>" . AIOSEOP_VERSION . "</b></span>", array( $this, 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
1976
-
1977
 
1978
  add_action( 'aioseop_modules_add_menus', Array( $this, 'add_menu' ), 5 );
1979
  do_action( 'aioseop_modules_add_menus', $file );
@@ -2048,18 +2270,6 @@ function aiosp_google_analytics() {
2048
  /* <label class="aioseop_generic_label"><?php _e('Click on option titles to get help!', 'all_in_one_seo_pack' ); ?></label> */
2049
  global $wpdb;
2050
 
2051
- $somecount = $wpdb->get_var( "SELECT COUNT(1) FROM $wpdb->postmeta WHERE meta_key IN ('keywords', 'title', 'description', 'aiosp_meta', 'aiosp_disable' )" );
2052
-
2053
- if( $somecount > 0) {
2054
- echo "<div class='error' style='text-align:center;'>
2055
- <p><strong>Your database meta needs to be updated. " . $somecount . " old fields remaining</strong> <em>(Back up your database before updating.)</em>
2056
- <FORM action='' method='post' name='aioseop-migrate'>
2057
- <input type='hidden' name='nonce-aioseop-migrate' value='" . wp_create_nonce('aioseop-migrate-nonce') . "' />
2058
- <input type='submit' name='aioseop_migrate' class='button-primary' value='Update Database'>
2059
- </FORM>
2060
- </p></div>";
2061
- }
2062
-
2063
  if( !get_option( 'aioseop_options' ) ) {
2064
  echo "<div class='error' style='text-align:center;'>
2065
  <p><strong>Your database options need to be updated.</strong><em>(Back up your database before updating.)</em>
93
  'default' => 1),
94
  "rewrite_titles"=> Array(
95
  'name' => __( 'Rewrite Titles:', 'all_in_one_seo_pack' ),
96
+ 'help_text' => __( "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: ‚'Blog Archive >> Blog Name >> Post Title‚' (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to 'Post Title | Blog Name'. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string.", 'all_in_one_seo_pack' ),
97
  'default' => 1,
98
  'type' => 'radio',
99
  'initial_options' => Array( 1 => __( 'Enabled', 'all_in_one_seo_pack' ),
170
  'default' => '%category_title% | %blog_title%',
171
  'condshow' => Array( "aiosp_rewrite_titles" => 1 ) ),
172
  "archive_title_format"=> Array(
173
+ 'name' => __( 'Date Archive Title Format:', 'all_in_one_seo_pack' ),
174
  'help_text' =>
175
  __( 'The following macros are supported:', 'all_in_one_seo_pack' ) .
176
  '<ul><li>' . __( '%blog_title% - Your blog title', 'all_in_one_seo_pack' ) . '</li><li>' .
177
  __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
178
+ __( '%date% - The original archive title given by wordpress, e.g. "2007" or "2007 August"', 'all_in_one_seo_pack' ) . '</li><li>' .
179
+ __( '%day% - The original archive day given by wordpress, e.g. "17"', 'all_in_one_seo_pack' ) . '</li><li>' .
180
+ __( '%month% - The original archive month given by wordpress, e.g. "August"', 'all_in_one_seo_pack' ) . '</li><li>' .
181
+ __( '%year% - The original archive year given by wordpress, e.g. "2007"', 'all_in_one_seo_pack' ) . '</li></ul>',
182
  'type' => 'text',
183
  'default' => '%date% | %blog_title%',
184
  'condshow' => Array( "aiosp_rewrite_titles" => 1 ) ),
185
+ "author_title_format"=> Array(
186
+ 'name' => __( 'Author Archive Title Format:', 'all_in_one_seo_pack' ),
187
+ 'help_text' =>
188
+ __( 'The following macros are supported:', 'all_in_one_seo_pack' ) .
189
+ '<ul><li>' . __( '%blog_title% - Your blog title', 'all_in_one_seo_pack' ) . '</li><li>' .
190
+ __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
191
+ __( '%author% - The original archive title given by wordpress, e.g. "Steve" or "John Smith"', 'all_in_one_seo_pack' ) . '</li></ul>',
192
+ 'type' => 'text',
193
+ 'default' => '%author% | %blog_title%',
194
+ 'condshow' => Array( "aiosp_rewrite_titles" => 1 ) ),
195
  "tag_title_format"=> Array(
196
  'name' => __( 'Tag Title Format:', 'all_in_one_seo_pack' ),
197
  'help_text' =>
266
  'default' => array('post', 'page'),
267
  'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
268
  ),
269
+ "cpostnoindex" => Array(
270
+ 'name' => __( 'Default to NOINDEX:', 'all_in_one_seo_pack' ),
271
+ 'help_text' => __( 'Select noindex robots meta on specific custom post types by default.', 'all_in_one_seo_pack' ),
272
+ 'type' => 'multicheckbox',
273
+ 'default' => array(),
274
+ 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
275
+ ),
276
+ "cpostnofollow" => Array(
277
+ 'name' => __( 'Default to NOFOLLOW:', 'all_in_one_seo_pack' ),
278
+ 'help_text' => __( 'Select nofollow robots meta on specific custom post types by default.', 'all_in_one_seo_pack' ),
279
+ 'type' => 'multicheckbox',
280
+ 'default' => array(),
281
+ 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
282
+ ),
283
  "cposttitles" => Array(
284
  'name' => __( 'Custom titles:', 'all_in_one_seo_pack' ),
285
  'help_text' => __( 'Allows setting specific custom titles for all post types.', 'all_in_one_seo_pack' ),
360
  'name' => __( 'Use noindex for Categories:', 'all_in_one_seo_pack' ),
361
  'help_text' => __( 'Check this for excluding category pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack' ),
362
  'default' => 1),
363
+ "archive_date_noindex"=> Array(
364
+ 'name' => __( 'Use noindex for Date Archives:', 'all_in_one_seo_pack' ),
365
+ 'help_text' => __( 'Check this for excluding Date Archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack' ),
366
+ 'default' => 1),
367
+ "archive_author_noindex"=> Array(
368
+ 'name' => __( 'Use noindex for Author Archives:', 'all_in_one_seo_pack' ),
369
+ 'help_text' => __( 'Check this for excluding Author Archive pages from being crawled. Useful for avoiding duplicate content.', 'all_in_one_seo_pack' ),
370
  'default' => 1),
371
  "tags_noindex"=> Array(
372
  'name' => __( 'Use noindex for Tag Archives:', 'all_in_one_seo_pack' ),
413
  $this->locations = Array(
414
  'default' => Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 'options' => null ),
415
  'aiosp' => Array( 'name' => $this->plugin_name, 'type' => 'metabox', 'prefix' => '',
416
+ 'options' => Array( 'edit', 'nonce-aioseop-edit', 'upgrade', 'snippet', 'title', 'description', 'keywords', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel', 'sitemap_exclude', 'disable', 'disable_analytics' ),
417
  'default_options' => Array(
418
  'edit' => Array( 'type' => 'hidden', 'default' => 'aiosp_edit', 'prefix' => true, 'nowrap' => 1 ),
419
  'nonce-aioseop-edit' => Array( 'type' => 'hidden', 'default' => null, 'prefix' => false, 'nowrap' => 1 ),
421
  'default' => '<a target="__blank" href="http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/">'
422
  . __( 'Upgrade to All in One SEO Pack Pro Version', 'all_in_one_seo_pack' ) . '</a>'
423
  ),
424
+ 'snippet' => Array( 'name' => __( 'Preview Snippet', 'all_in_one_seo_pack' ), 'type' => 'custom', 'help_text' => __( 'A preview of what this page might look like in search engine results.', 'all_in_one_seo_pack' ), 'label' => 'top',
425
+ 'default' => '
426
+ <script>
427
+ jQuery(document).ready(function() {
428
+ jQuery("#aiosp_title_wrapper").bind("input", function() {
429
+ jQuery("#aioseop_snippet_title").text(jQuery("#aiosp_title_wrapper input").val());
430
+ });
431
+ jQuery("#aiosp_description_wrapper").bind("input", function() {
432
+ jQuery("#aioseop_snippet_description").text(jQuery("#aiosp_description_wrapper textarea").val());
433
+ });
434
+ });
435
+ </script>
436
+ <div class="preview_snippet"><div id="aioseop_snippet"><h3><a id="aioseop_snippet_title">%s</a></h3><div><div><cite id="aioseop_snippet_link">%s</cite></div><span id="aioseop_snippet_description">%s</span></div></div></div>' ),
437
  'title' => Array( 'name' => __( 'Title', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'A custom title that shows up in the title tag for this page.', 'all_in_one_seo_pack' ), 'count' => true, 'size' => 60 ),
438
  'description' => Array( 'name' => __( 'Description', 'all_in_one_seo_pack' ), 'type' => 'textarea', 'help_text' => __( 'The META description for this page. This will override any autogenerated descriptions.', 'all_in_one_seo_pack' ), 'count' => true, 'cols' => 80, 'rows' => 2 ),
439
  'keywords' => Array( 'name' => __( 'Keywords (comma separated)', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'A comma separated list of your most important keywords for this page that will be written as META keywords.', 'all_in_one_seo_pack' ) ),
440
+ 'noindex' => Array( 'name' => __( "Robots Meta NOINDEX", 'all_in_one_seo_pack' ), 'default' => '', 'help_text' => __( 'Check this box to ask search engines not to index this page.', 'all_in_one_seo_pack' ) ),
441
+ 'nofollow' => Array( 'name' => __( "Robots Meta NOFOLLOW", 'all_in_one_seo_pack' ), 'default' => '', 'help_text' => __( 'Check this box to ask search engines not to follow links from this page.', 'all_in_one_seo_pack' ) ),
442
+ 'noodp' => Array( 'name' => __( "Robots Meta NOODP", 'all_in_one_seo_pack' ), 'help_text' => __( 'Check this box to ask search engines not to use descriptions from the Open Directory Project for this page.', 'all_in_one_seo_pack' ) ),
443
+ 'noydir' => Array( 'name' => __( "Robots Meta NOYDIR", 'all_in_one_seo_pack' ), 'help_text' => __( 'Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page.', 'all_in_one_seo_pack' ) ),
444
  'titleatr' => Array( 'name' => __( 'Title Attribute', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Set the title attribute for menu links.', 'all_in_one_seo_pack' ), 'size' => 60 ),
445
  'menulabel' => Array( 'name' => __( 'Menu Label', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Set the label for this page menu item.', 'all_in_one_seo_pack' ), 'size' => 60 ),
446
+ 'sitemap_exclude' => Array( 'name' => __( 'Exclude From Sitemap', 'all_in_one_seo_pack' ), 'help_text' => __( "Don't display this page in the sitemap.", 'all_in_one_seo_pack' ) ),
447
  'disable' => Array( 'name' => __( 'Disable on this page/post', 'all_in_one_seo_pack' ), 'help_text' => __( 'Disable SEO on this page.', 'all_in_one_seo_pack' ) ),
448
  'disable_analytics' => Array( 'name' => __( 'Disable Google Analytics', 'all_in_one_seo_pack' ), 'help_text' => __( 'Disable Google Analytics on this page.', 'all_in_one_seo_pack' ), 'condshow' => Array( 'aiosp_disable' => 'on' ) ) ),
449
  'display' => null )
464
  ),
465
  'title' => Array(
466
  'name' => __( 'Title Settings', 'all_in_one_seo_pack' ),
467
+ 'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "author_title_format",
468
  "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format" )
469
  ),
470
  'cpt' => Array(
485
  ),
486
  'noindex' => Array(
487
  'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ),
488
+ 'options' => Array( 'cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex' )
489
  ),
490
  'advanced' => Array(
491
  'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ),
531
  $args['options']['type'] = 'html';
532
  $args['options']['nowrap'] = false;
533
  $args['options']['save'] = false;
534
+ $wp_query->queried_object = $post;
535
 
536
  $title = $this->wp_title();
537
  if ( empty( $title ) ) $title = $post->post_title;
540
  $url = apply_filters( 'aioseop_canonical_url', $url );
541
  if ( !$url ) $url = get_permalink();
542
 
543
+ $description = $this->get_aioseop_description( $post );
544
 
545
+ if ( $this->strlen( $title ) > 70 ) $title = $this->trim_excerpt_without_filters( $title, 70 ) . '...';
546
+ if ( $this->strlen( $description ) > 156 ) $description = $this->trim_excerpt_without_filters( $description, 156 ) . '...';
547
 
548
  $args['value'] = sprintf( $args['value'], esc_attr( strip_tags( $title ) ), esc_url( $url ), esc_attr( strip_tags( $description ) ) );
549
  $buf = $this->get_option_row( $args['name'], $args['options'], $args );
564
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image {
565
  background: url(<?php echo AIOSEOP_PLUGIN_IMAGES_URL; ?>shield-sprite-16.png) no-repeat 6px 6px !important;
566
  }
567
+ #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image:before {
568
+ content: '' !important;
569
+ }
570
  #toplevel_page_all-in-one-seo-pack-aioseop_class .wp-menu-image img {
571
  display: none;
572
  }
677
  }
678
  $this->default_options["posttypecolumns"]['initial_options'] = $post_types;
679
  $this->default_options["cpostactive"]['initial_options'] = $post_types;
680
+ $this->default_options["cpostnoindex"]['initial_options'] = $post_types;
681
+ $this->default_options["cpostnofollow"]['initial_options'] = $post_types;
682
  foreach ( $post_types as $p => $pt ) {
683
  $field = $p . "_title_format";
684
  $name = $post_objs[$p]->labels->singular_name;
699
  '</ul>',
700
  'type' => 'text',
701
  'default' => '%post_title% | %blog_title%',
702
+ 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on', 'aiosp_cposttitles' => 'on', 'aiosp_cpostactive\[\]' => $p )
703
  );
704
  $this->layout['cpt']['options'][] = $field;
705
  }
711
  }
712
 
713
  function add_admin_pointers() {
714
+ $this->pointers['aioseop_menu_203'] = Array( 'pointer_target' => '#toplevel_page_all-in-one-seo-pack-aioseop_class',
715
  'pointer_text' => '<h3>' . sprintf( __( 'Welcome to Version %s!', 'all_in_one_seo_pack' ), AIOSEOP_VERSION )
716
  . '</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>',
717
  'pointer_edge' => 'top',
718
  'pointer_align' => 'left',
719
  'pointer_scope' => 'global'
720
  );
721
+ $this->pointers['aioseop_welcome_203'] = Array( 'pointer_target' => '#aioseop_top_button',
722
  'pointer_text' => '<h3>' . sprintf( __( 'Review Your Settings', 'all_in_one_seo_pack' ), AIOSEOP_VERSION )
723
  . '</h3><p>' . __( 'Thank you for running the latest and greatest All in One SEO Pack ever! New in 2.0: manage your performance with our Performance module; enable it from our new feature manager! And please review your settings, we have added some new ones!', 'all_in_one_seo_pack' ) . '</p>',
724
  'pointer_edge' => 'bottom',
734
 
735
  function enqueue_scripts() {
736
  add_filter( "{$this->prefix}display_settings", Array( $this, 'filter_settings' ), 10, 3 );
737
+ add_filter( "{$this->prefix}display_options", Array( $this, 'filter_options' ), 10, 3 );
738
  parent::enqueue_scripts();
739
  }
740
 
758
  $this->update_class_option( $this->options );
759
  }
760
 
761
+ function get_current_options( $opts = Array(), $location = null, $defaults = null, $post = null ) {
762
  if ( ( $location === 'aiosp' ) && ( $this->locations[$location]['type'] == 'metabox' ) ) {
763
  global $post;
764
  $post_id = $post;
765
  if ( is_object( $post_id ) )
766
  $post_id = $post_id->ID;
767
  $get_opts = $this->default_options( $location );
768
+ foreach ( Array( 'keywords', 'description', 'title', 'sitemap_exclude', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel' ) as $f ) {
769
  $field = "aiosp_$f";
770
  $get_opts[$field] = htmlspecialchars( stripcslashes( get_post_meta( $post_id, '_aioseop_' . $f, true ) ) );
771
  }
785
  unset( $settings["{$prefix}$opt"] );
786
 
787
  } elseif ( $location == 'aiosp' ) {
788
+ global $post, $aioseop_sitemap;
789
  $prefix = $this->get_prefix( $location ) . $location . '_';
790
+ if ( !empty( $post ) ) {
791
+ $post_type = get_post_type( $post );
792
+ if ( !empty( $this->options['aiosp_cpostnoindex'] ) && ( in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) ) {
793
+ $settings["{$prefix}noindex"]['type'] = 'select';
794
+ $settings["{$prefix}noindex"]['initial_options'] = Array( '' => __( 'Default - noindex', 'all_in_one_seo_pack' ), 'off' => __( 'index', 'all_in_one_seo_pack' ), 'on' => __( 'noindex', 'all_in_one_seo_pack' ) );
795
+ }
796
+ if ( !empty( $this->options['aiosp_cpostnofollow'] ) && ( in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) ) {
797
+ $settings["{$prefix}nofollow"]['type'] = 'select';
798
+ $settings["{$prefix}nofollow"]['initial_options'] = Array( '' => __( 'Default - nofollow', 'all_in_one_seo_pack' ), 'off' => __( 'follow', 'all_in_one_seo_pack' ), 'on' => __( 'nofollow', 'all_in_one_seo_pack' ) );
799
+ }
800
+ }
801
+
802
+ if ( !current_user_can( 'update_plugins' ) )
803
+ unset( $settings["{$prefix}upgrade"] );
804
+
805
+ if ( !is_object( $aioseop_sitemap ) )
806
+ unset( $settings['aiosp_sitemap_exclude'] );
807
  if ( is_object( $post ) ) {
808
  if ( $post->post_type != 'page' ) {
809
  unset( $settings["{$prefix}titleatr"] );
821
  }
822
 
823
  function filter_options( $options, $location ) {
824
+ if ( $location == 'aiosp' ) {
825
+ global $post;
826
+ if ( !empty( $post ) ) {
827
+ $prefix = $this->prefix;
828
+ $post_type = get_post_type( $post );
829
+ if ( empty( $this->options['aiosp_cpostnoindex'] ) || ( !in_array( $post_type, $this->options['aiosp_cpostnoindex'] ) ) )
830
+ if ( isset( $options["{$prefix}noindex"] ) && ( $options["{$prefix}noindex"] != 'on' ) )
831
+ unset( $options["{$prefix}noindex"] );
832
+ if ( empty( $this->options['aiosp_cpostnofollow'] ) || ( !in_array( $post_type, $this->options['aiosp_cpostnofollow'] ) ) )
833
+ if ( isset( $options["{$prefix}nofollow"] ) && ( $options["{$prefix}nofollow"] != 'on' ) )
834
+ unset( $options["{$prefix}nofollow"] );
835
+ }
836
+ }
837
  if ( $location == null ) {
838
  $prefix = $this->prefix;
839
  if ( isset( $options["{$prefix}rewrite_titles"] ) && ( !empty( $options["{$prefix}rewrite_titles"] ) ) )
904
  </div>
905
  <?php
906
  break;
907
+ case "aioseop-hosting":
908
+ ?><div class="aioseop_metabox_text">
909
+ <p><a href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=aioseo&page=http://www.hostgator.com/apps/wordpress-hosting.shtml" target="_blank"><img src="<?php echo AIOSEOP_PLUGIN_URL; ?>images/Hostgator--AN-9-8-2013-445x220.gif" alt="HostGator.com WordPress Hosting | Use Coupon WPPlugin | Only $3.47/Month"></p>
910
+ </div>
911
+ <?php
912
+ break;
913
  }
914
  echo "</div>";
915
  }
929
 
930
  function template_redirect() {
931
  global $aioseop_options;
932
+
 
 
 
 
933
  if ( is_feed() ) return;
934
+ if ( aioseop_mrt_exclude_this_page() ) return;
935
+
936
+ $post = $this->get_queried_object();
937
+
938
  if ( is_single() || is_page() ) {
939
  $aiosp_disable = htmlspecialchars(stripcslashes( get_post_meta( $post->ID, '_aioseop_disable', true ) ) );
940
  if ( $aiosp_disable ) {
962
  if ( $force_rewrites )
963
  ob_start( array( $this, 'output_callback_for_title' ) );
964
  else
965
+ add_filter( 'wp_title', array( $this, 'wp_title' ), 20 );
966
  }
967
  }
968
 
997
  add_action( 'aioseop_modules_wp_head', array( $this, 'aiosp_google_analytics' ) );
998
  add_filter( 'wp_list_pages', 'aioseop_list_pages' );
999
  add_action( 'wp_head', array( $this, 'wp_head') );
1000
+ add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
1001
  add_filter( 'wp_list_pages_excludes', 'aioseop_get_pages_start' );
1002
  add_filter( 'get_pages', 'aioseop_get_pages' );
1003
  }
1029
  global $aioseop_options;
1030
  $post = $this->get_queried_object();
1031
  $meta_string = null;
1032
+ $description = '';
1033
 
1034
  if ( is_single() || is_page() ) {
1035
  $aiosp_disable = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_disable', true ) ) );
1058
  $active_handlers = array();
1059
  }
1060
  if (sizeof($active_handlers) > 0 &&
1061
+ $this->strtolower( $active_handlers[sizeof( $active_handlers ) - 1] ) ==
1062
+ $this->strtolower( 'All_in_One_SEO_Pack::output_callback_for_title' ) ) {
1063
  ob_end_flush();
1064
  } else {
1065
  $this->log( "another plugin interfering?" );
1082
 
1083
  $is_front_page_keywords = ( ( $is_front_page && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() ) || $this->is_static_front_page() );
1084
 
1085
+ $blog_page = $this->get_blog_page( $post );
 
 
 
1086
 
1087
  if ( $is_front_page_keywords )
1088
  $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );
1103
  else if ( $is_front_page )
1104
  $description = trim( stripcslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
1105
  else if ( is_single() || is_page() || is_home() || $this->is_static_posts_page() )
1106
+
1107
+ $description = $this->get_aioseop_description( $post );
1108
+
1109
+ /*
1110
  if ( $this->is_static_front_page() )
1111
  $description = trim( stripcslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
1112
  elseif ( !empty( $blog_page ) )
1114
  if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) )
1115
  $description = $this->get_post_description( $post );
1116
 
1117
+ $description = apply_filters( 'aioseop_description', $description );
1118
+ */
1119
 
1120
+ if ( isset($description) && ( $this->strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) {
1121
  $description = trim( strip_tags( $description ) );
1122
+ $description = str_replace( '"', '&quot;', $description );
1123
 
1124
  // replace newlines on mac / windows?
1125
  $description = str_replace( "\r\n", ' ', $description );
1169
 
1170
  $is_tag = is_tag();
1171
 
1172
+ if ( ( is_category() && $aioseop_options['aiosp_category_noindex'] ) || ( !is_category() && is_archive() &&!$is_tag
1173
+ && ( ( $aioseop_options['aiosp_archive_date_noindex'] && is_date() ) || ( $aioseop_options['aiosp_archive_author_noindex'] && is_author() ) ) )
1174
+ || ( $aioseop_options['aiosp_tags_noindex'] && $is_tag ) ) {
1175
  $meta_string .= '<meta name="robots" content="noindex,follow" />' . "\n";
1176
  } else {
1177
  if ( is_single() || is_page() ) {
1178
+ $post_type = get_post_type();
1179
  $aiosp_noindex = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_noindex', true ) ) );
1180
  $aiosp_nofollow = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_nofollow', true ) ) );
1181
+ $aiosp_noodp = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_noodp', true ) ) );
1182
+ $aiosp_noydir = htmlspecialchars( stripcslashes( get_post_meta( $post->ID, '_aioseop_noydir', true ) ) );
1183
+ if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty( $aioseop_options['aiosp_cpostnoindex'] ) || !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) {
1184
  $noindex = "index";
1185
  $nofollow = "follow";
1186
+ $noodp = $noydir = '';
1187
+ if ( ( $aiosp_noindex == 'on' ) || ( ( $aiosp_noindex == '' ) &&
1188
+ ( !empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) ) )
1189
+ $noindex = "no" . $noindex;
1190
+ if ( ( $aiosp_nofollow == 'on' ) || ( ( $aiosp_nofollow == '' ) &&
1191
+ ( !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) ) ) )
1192
+ $nofollow = "no" . $nofollow;
1193
+ if ( $aiosp_noodp ) $nofollow .= ',noodp';
1194
+ if ( $aiosp_noydir ) $nofollow .= ',noydir';
1195
  $meta_string .= '<meta name="robots" content="' . $noindex . ',' . $nofollow . '" />' . "\n";
1196
  }
1197
  }
1242
  $meta_string .= $home_meta;
1243
  }
1244
  }
1245
+
1246
+ $prev = $next = '';
1247
+ if ( is_home() || is_archive() || is_paged() ) {
1248
+ global $wp_query;
1249
+ $max_page = $wp_query->max_num_pages;
1250
+ $page = $this->get_page_number();
1251
+ if ( $page > 1 )
1252
+ $prev = get_previous_posts_page_link();
1253
+ if ( $page < $max_page )
1254
+ $next = get_next_posts_page_link( $max_page );
1255
+ } else if ( is_page() || is_single() ) {
1256
+ $numpages = 1;
1257
+ $multipage = 0;
1258
+ $page = get_query_var('page');
1259
+ if ( ! $page )
1260
+ $page = 1;
1261
+ if ( is_single() || is_page() || is_feed() )
1262
+ $more = 1;
1263
+ $content = $post->post_content;
1264
+ if ( false !== strpos( $content, '<!--nextpage-->' ) ) {
1265
+ if ( $page > 1 )
1266
+ $more = 1;
1267
+ $content = str_replace( "\n<!--nextpage-->\n", '<!--nextpage-->', $content );
1268
+ $content = str_replace( "\n<!--nextpage-->", '<!--nextpage-->', $content );
1269
+ $content = str_replace( "<!--nextpage-->\n", '<!--nextpage-->', $content );
1270
+ // Ignore nextpage at the beginning of the content.
1271
+ if ( 0 === strpos( $content, '<!--nextpage-->' ) )
1272
+ $content = substr( $content, 15 );
1273
+ $pages = explode('<!--nextpage-->', $content);
1274
+ $numpages = count($pages);
1275
+ if ( $numpages > 1 )
1276
+ $multipage = 1;
1277
+ }
1278
+ if ( !empty( $page ) ) {
1279
+ if ( $page > 1 )
1280
+ $prev = _wp_link_page( $page - 1 );
1281
+ if ( $page + 1 <= $numpages )
1282
+ $next = _wp_link_page( $page + 1 );
1283
+ }
1284
+ if ( !empty( $prev ) ) {
1285
+ $prev = $this->substr( $prev, 9, -2 );
1286
+ }
1287
+ if ( !empty( $next ) ) {
1288
+ $next = $this->substr( $next, 9, -2 );
1289
+ }
1290
+ }
1291
+
1292
+ if ( !empty( $prev ) ) $meta_string .= "<link rel='prev' href='" . $prev . "' />\n";
1293
+ if ( !empty( $next ) ) $meta_string .= "<link rel='next' href='" . $next . "' />\n";
1294
+
1295
 
1296
  if ( $meta_string != null ) echo "$meta_string\n";
1297
 
1316
  }
1317
  ?>
1318
  <?php if ( !empty( $aioseop_options['aiosp_ga_domain'] ) ) {
1319
+ $domain = $aioseop_options['aiosp_ga_domain'];
1320
+ $domain = trim( $domain );
1321
+ $domain = $this->strtolower( $domain );
1322
+ if ( $this->strpos( $domain, "http://" ) === 0 ) $domain = $this->substr( $domain, 7 );
1323
+ elseif ( $this->strpos( $domain, "https://" ) === 0 ) $domain = $this->substr( $domain, 8 );
1324
+ $domain = untrailingslashit( $domain );
1325
+ ?> _gaq.push(['_setDomainName', '<?php echo $domain; ?>']);
1326
  <?php
1327
  }
1328
  ?> _gaq.push(['_trackPageview']);
1384
 
1385
  if ( get_query_var( 'm' ) ) {
1386
  $m = preg_replace( '/[^0-9]/', '', get_query_var( 'm' ) );
1387
+ switch ( $this->strlen( $m ) ) {
1388
  case 4: $link = get_year_link( $m ); break;
1389
+ case 6: $link = get_month_link( $this->substr( $m, 0, 4), $this->substr($m, 4, 2 ) ); break;
1390
+ case 8: $link = get_day_link( $this->substr( $m, 0, 4 ), $this->substr( $m, 4, 2 ), $this->substr( $m, 6, 2 ) ); break;
1391
  default:
1392
  return false;
1393
  }
1446
  function yoast_get_paged( $link ) {
1447
  $page = $this->get_page_number();
1448
  if ( !empty( $page ) && $page > 1 ) {
1449
+ if ( get_query_var( 'page' ) == $page )
1450
+ $link = trailingslashit( $link ) . "$page";
1451
+ else
1452
+ $link = trailingslashit( $link ) ."page/". "$page";
1453
  $link = user_trailingslashit( $link, 'paged' );
1454
  }
1455
  return $link;
1483
  $description = preg_replace( "/\s\s+/u", " ", $description );
1484
  return $description;
1485
  }
1486
+
1487
+ function get_blog_page( $p = null ) {
1488
+ static $blog_page = '';
1489
+ static $page_for_posts = '';
1490
+ if ( $p === null ) {
1491
+ global $post;
1492
+ } else {
1493
+ $post = $p;
1494
+ }
1495
+ if ( $blog_page === '' ) {
1496
+ if ( $page_for_posts === '' ) $page_for_posts = get_option( 'page_for_posts' );
1497
+ if ( $page_for_posts && ( !is_object( $post ) || ( $page_for_posts != $post->ID ) ) && is_home() )
1498
+ $blog_page = get_post( $page_for_posts );
1499
+ }
1500
+ return $blog_page;
1501
+ }
1502
 
1503
+ function get_aioseop_description( $p = null ) {
1504
+ global $aioseop_options;
1505
+ if ( $p === null ) {
1506
+ global $post;
1507
+ } else {
1508
+ $post = $p;
1509
+ }
1510
+ $blog_page = $this->get_blog_page();
1511
+ if ( $this->is_static_front_page() )
1512
+ $description = trim( stripcslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
1513
+ elseif ( !empty( $blog_page ) )
1514
+ $description = $this->get_post_description( $blog_page );
1515
+ if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) )
1516
+ $description = $this->get_post_description( $post );
1517
+ $description = apply_filters( 'aioseop_description', $description );
1518
+ return $description;
1519
+ }
1520
+
1521
  function replace_title( $content, $title ) {
1522
  $title = trim( strip_tags( $title ) );
1523
  $title_tag_start = "<title>";
1524
  $title_tag_end = "</title>";
1525
+ $len_start = $this->strlen( $title_tag_start );
1526
  $title = stripcslashes( trim( $title ) );
1527
+ $start = $this->strpos( $content, $title_tag_start );
1528
+ $end = $this->strpos( $content, $title_tag_end );
1529
 
1530
  $this->title_start = $start;
1531
  $this->title_end = $end;
1532
  $this->orig_title = $title;
1533
 
1534
  if ( $start && $end )
1535
+ $header = $this->substr( $content, 0, $start + $len_start ) . $title . $this->substr( $content, $end );
1536
  else
1537
  $header = $content;
1538
 
1581
  $search = $this->capitalize( $search );
1582
  $title = $search;
1583
  } else if ( ( is_tax() || is_category() ) && !is_feed() ) {
1584
+ $category_name = $this->ucwords($this->internationalize( single_cat_title( '', false ) ) );
1585
  $title = $category_name;
1586
  } else if ( is_page() ) {
1587
  $title = $this->internationalize( single_post_title( '', false ) );
1631
  global $STagging;
1632
  $page = get_query_var( 'page' );
1633
  if ( $paged > $page ) $page = $paged;
1634
+ if ( is_paged() || ( isset($STagging) && $STagging->is_tag_view() && $paged ) || ( $page > 1 ) ) {
1635
  $part = $this->internationalize( $aioseop_options['aiosp_paged_format'] );
1636
  if ( isset( $part ) || !empty( $part ) ) {
1637
  $part = " " . trim( $part );
1664
  $title_format = $this->get_post_title_format();
1665
  $authordata = get_userdata( $post->post_author );
1666
  $r_title = array( '%blog_title%', '%blog_description%', '%post_title%', '%category%', '%category_title%', '%post_author_login%', '%post_author_nicename%', '%post_author_firstname%', '%post_author_lastname%' );
1667
+ $d_title = array( $this->internationalize( get_bloginfo('name') ), $this->internationalize( get_bloginfo( 'description' ) ), $title, $category, $category, $authordata->user_login, $authordata->user_nicename, $this->ucwords( $authordata->first_name ), $this->ucwords( $authordata->last_name ) );
1668
  $title = trim( str_replace( $r_title, $d_title, $title_format ) );
1669
  return $title;
1670
  }
1671
 
1672
  function apply_page_title_format( $title ) {
1673
+ global $aioseop_options, $post;
1674
  $title_format = $aioseop_options['aiosp_page_title_format'];
1675
+ $authordata = get_userdata( $post->post_author );
1676
  $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title_format );
1677
  $new_title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $new_title );
1678
  $new_title = str_replace( '%page_title%', $title, $new_title );
1679
  $new_title = str_replace( '%page_author_login%', $authordata->user_login, $new_title );
1680
  $new_title = str_replace( '%page_author_nicename%', $authordata->user_nicename, $new_title );
1681
+ $new_title = str_replace( '%page_author_firstname%', $this->ucwords($authordata->first_name ), $new_title );
1682
+ $new_title = str_replace( '%page_author_lastname%', $this->ucwords($authordata->last_name ), $new_title );
1683
  $title = trim( $new_title );
1684
  return $title;
1685
  }
1692
  if ( is_front_page() ) {
1693
  $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
1694
  if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) {
1695
+ // $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
1696
+ // if ( empty( $title ) )
1697
+ // $title = $this->internationalize( $post->post_title );
1698
+ // if ( empty( $title ) )
1699
+ // $title = $this->internationalize( $this->get_original_title( '', false ) );
1700
+ // if ( !empty( $title ) )
1701
+ // $title = $this->apply_page_title_format( $title );
1702
  }
1703
  if (empty( $title ) )
1704
+ $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
1705
+ // $title = $this->internationalize( get_option( 'blogname' ) );
1706
  return $this->paged_title( $title );
1707
  } else if ( is_attachment() ) {
1708
  if ( $post === null ) return false;
1797
  } else if ( ( is_tax() || is_category() ) && !is_feed() ) {
1798
  $category_description = $this->internationalize( category_description() );
1799
  if( !empty( $aioseop_options['aiosp_cap_cats'] ) ) {
1800
+ $category_name = $this->ucwords( $this->internationalize( single_cat_title( '', false ) ) );
1801
  } else {
1802
  $category_name = $this->internationalize( single_cat_title( '', false ) );
1803
  }
1821
  return $title;
1822
  }
1823
  } else if ( is_archive() ) {
1824
+ if ( is_author() ) {
1825
+ $author = $this->internationalize( $this->get_original_title( '', false ) );
1826
+ $title_format = $aioseop_options['aiosp_author_title_format'];
1827
+ $new_title = str_replace( '%author%', $author, $title_format );
1828
+ } else {
1829
+ global $wp_query;
1830
+ $date = $this->internationalize( $this->get_original_title( '', false ) );
1831
+ $title_format = $aioseop_options['aiosp_archive_title_format'];
1832
+ $new_title = str_replace( '%date%', $date, $title_format );
1833
+ $day = get_query_var( 'day' );
1834
+ if ( empty( $day ) ) $day = '';
1835
+ $new_title = str_replace( '%day%', $day, $new_title );
1836
+ $monthnum = get_query_var( 'monthnum' );
1837
+ $year = get_query_var( 'year' );
1838
+ if ( empty( $monthnum ) || is_year() ) {
1839
+ $month = '';
1840
+ $monthnum = 0;
1841
+ }
1842
+ $month = date( "F", mktime( 0,0,0,(int)$monthnum,1,(int)$year ) );
1843
+ $new_title = str_replace( '%monthnum%', $monthnum, $new_title );
1844
+ $new_title = str_replace( '%month%', $month, $new_title );
1845
+ $new_title = str_replace( '%year%', get_query_var( 'year' ), $new_title );
1846
+ }
1847
+ $new_title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $new_title );
1848
  $new_title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $new_title );
 
1849
  $title = trim( $new_title );
1850
  $title = $this->paged_title( $title );
1851
  return $title;
1898
  $request_a = explode( ' ', $request );
1899
  $request_new = array();
1900
  foreach ( $request_a as $token ) {
1901
+ $request_new[] = $this->ucwords( trim( $token ) );
1902
  }
1903
  $request = implode( ' ', $request_new );
1904
  return $request;
1909
  $tokens = explode( ' ', $s );
1910
  while ( list( $key, $val ) = each( $tokens ) ) {
1911
  $tokens[ $key ] = trim( $tokens[ $key ] );
1912
+ $tokens[ $key ] = $this->strtoupper( $this->substr( $tokens[$key], 0, 1 ) ) . $this->substr( $tokens[$key], 1 );
1913
  }
1914
  $s = implode( ' ', $tokens );
1915
  return $s;
1921
  $text = strip_tags( $text );
1922
  if ( !$max ) $max = $this->maximum_description_length;
1923
 
1924
+ if ( $max < $this->strlen( $text ) ) {
1925
  while( $text[$max] != ' ' && $max > $this->minimum_description_length ) {
1926
  $max--;
1927
  }
1928
  }
1929
+ $text = $this->substr( $text, 0, $max );
1930
  return trim( stripcslashes( $text ) );
1931
  }
1932
 
2051
 
2052
  if ( isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'edit-aioseop-nonce') ) {
2053
 
2054
+ foreach ( Array( 'keywords', 'description', 'title', 'sitemap_exclude', 'disable', 'disable_analytics', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel' ) as $f ) {
2055
  $field = "aiosp_$f";
2056
  if ( isset( $_POST[$field] ) ) $$field = $_POST[$field];
2057
  }
2058
 
2059
+ foreach ( Array( 'keywords', 'description', 'noindex', 'nofollow', 'noodp', 'noydir', 'title', 'titleatr', 'menulabel' ) as $f )
2060
+ delete_post_meta( $id, "_aioseop_{$f}" );
 
 
 
 
 
2061
 
2062
  if ( $this->is_admin() ) {
2063
+ delete_post_meta($id, '_aioseop_sitemap_exclude' );
2064
  delete_post_meta($id, '_aioseop_disable' );
2065
  delete_post_meta($id, '_aioseop_disable_analytics' );
2066
  }
2067
 
2068
+ foreach ( Array( 'keywords', 'description', 'title', 'sitemap_exclude', 'noindex', 'nofollow', 'noodp', 'noydir', 'titleatr', 'menulabel' ) as $f ) {
2069
  $var = "aiosp_$f";
2070
  $field = "_aioseop_$f";
2071
  if ( isset( $$var ) && !empty( $$var ) )
2097
  }
2098
 
2099
  function admin_bar_menu() {
2100
+ global $wp_admin_bar, $aioseop_admin_menu, $aioseop_options, $post;
2101
  if ( !empty( $aioseop_options['aiosp_admin_bar'] ) ) {
2102
  $menu_slug = plugin_basename( __FILE__ );
2103
+
2104
+ $url = '';
2105
+ if ( function_exists( 'menu_page_url' ) )
2106
+ $url = menu_page_url( $menu_slug, 0 );
2107
+ if ( empty( $url ) )
2108
+ $url = esc_url( admin_url( 'admin.php?page=' . $menu_slug ) );
2109
+
2110
  $wp_admin_bar->add_menu( array( 'id' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'SEO', 'all_in_one_seo_pack' ), 'href' => $url ) );
2111
+ if ( current_user_can( 'update_plugins' ) )
2112
+ add_action( 'admin_bar_menu', array( $this, 'admin_bar_upgrade_menu' ), 1101 );
2113
  $aioseop_admin_menu = 1;
2114
+ if ( !is_admin() && !empty( $post ) ) {
2115
+ $blog_page = $this->get_blog_page( $post );
2116
+ if ( !empty( $blog_page ) ) $post = $blog_page;
2117
+ $wp_admin_bar->add_menu( array( 'id' => 'aiosp_edit_' . $post->ID, 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Edit SEO', 'all_in_one_seo_pack' ), 'href' => get_edit_post_link( $post->ID ) . '#aiosp' ) );
2118
+ }
2119
  }
2120
  }
2121
+
2122
  function admin_bar_upgrade_menu() {
2123
  global $wp_admin_bar;
2124
  $wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => __( 'Upgrade To Pro', 'all_in_one_seo_pack' ), 'id' => 'aioseop-pro-upgrade', 'href' => 'http://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/', 'meta' => Array( 'target' => '_blank' ) ) );
2193
  else
2194
  add_utility_page( $menu_name, $menu_name, 'manage_options', $file, Array( $this, 'display_settings_page' ) );
2195
 
2196
+ add_meta_box('aioseop-list', __( "Join Our Mailing List", 'all_in_one_seo_pack' ), array( $this, 'display_extra_metaboxes'), 'aioseop_metaboxes', 'normal', 'core');
2197
  add_meta_box('aioseop-about', "About <span style='float:right;'>Version <b>" . AIOSEOP_VERSION . "</b></span>", array( $this, 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
2198
+ add_meta_box('aioseop-hosting', __( "Recommended WordPress Hosting", 'all_in_one_seo_pack' ), array( $this, 'display_extra_metaboxes'), 'aioseop_metaboxes', 'side', 'core');
2199
 
2200
  add_action( 'aioseop_modules_add_menus', Array( $this, 'add_menu' ), 5 );
2201
  do_action( 'aioseop_modules_add_menus', $file );
2270
  /* <label class="aioseop_generic_label"><?php _e('Click on option titles to get help!', 'all_in_one_seo_pack' ); ?></label> */
2271
  global $wpdb;
2272
 
 
 
 
 
 
 
 
 
 
 
 
 
2273
  if( !get_option( 'aioseop_options' ) ) {
2274
  echo "<div class='error' style='text-align:center;'>
2275
  <p><strong>Your database options need to be updated.</strong><em>(Back up your database before updating.)</em>
aioseop_feature_manager.php CHANGED
@@ -15,12 +15,15 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Feature_Manager' ) ) {
15
  $this->prefix = 'aiosp_feature_manager_'; // option prefix
16
  $this->file = __FILE__; // the current file
17
  parent::__construct();
18
- $this->module_info = Array( 'performance' => Array( 'name' => __( 'Performance', 'all_in_one_seo_pack' ),
19
- 'description' => __( 'Optimize performance related to SEO and check your system status.', 'all_in_one_seo_pack' ),
20
- 'default' => 'on'),
21
- 'coming_soon' => Array( 'name' => __( 'Coming Soon...', 'all_in_one_seo_pack' ),
22
- 'description' => __( 'XML Sitemaps', 'all_in_one_seo_pack' ),
23
- 'save' => false ) );
 
 
 
24
 
25
  // Set up default settings fields
26
  // name - Human-readable name of the setting
15
  $this->prefix = 'aiosp_feature_manager_'; // option prefix
16
  $this->file = __FILE__; // the current file
17
  parent::__construct();
18
+ $this->module_info = Array(
19
+ 'sitemap' => Array( 'name' => __( 'XML Sitemaps', 'all_in_one_seo_pack' ),
20
+ 'description' => __( 'Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com.', 'all_in_one_seo_pack' ) ),
21
+ 'performance' => Array( 'name' => __( 'Performance', 'all_in_one_seo_pack' ),
22
+ 'description' => __( 'Optimize performance related to SEO and check your system status.', 'all_in_one_seo_pack' ),
23
+ 'default' => 'on' ),
24
+ 'coming_soon' => Array( 'name' => __( 'Coming Soon...', 'all_in_one_seo_pack' ),
25
+ 'description' => __( 'Social Meta', 'all_in_one_seo_pack' ),
26
+ 'save' => false ) );
27
 
28
  // Set up default settings fields
29
  // name - Human-readable name of the setting
aioseop_functions.php CHANGED
@@ -30,29 +30,18 @@ if ( !function_exists( 'aioseop_activate' ) ) {
30
  if ( !function_exists( 'aioseop_update_settings_check' ) ) {
31
  function aioseop_update_settings_check() {
32
  global $aioseop_options;
33
- if ( isset( $_POST['aioseop_migrate'] ) ) aioseop_mrt_fix_meta();
34
  if ( ( isset( $_POST['aioseop_migrate_options'] ) ) ||
35
- ( empty( $aioseop_options ) ) ) {
36
  aioseop_mrt_mkarry();
37
- }
38
  // WPML has now attached to filters, read settings again so they can be translated
39
  $aioseop_options = get_option( 'aioseop_options' );
40
- }
41
- }
42
 
43
- /**
44
- * Update old settings to current format.
45
- */
46
- if ( !function_exists( 'aioseop_mrt_fix_meta' ) ) {
47
- function aioseop_mrt_fix_meta() {
48
- global $wpdb, $aiosp_activation;
49
- $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_aioseop_keywords' WHERE meta_key = 'keywords'" );
50
- $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_aioseop_title' WHERE meta_key = 'title'" );
51
- $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_aioseop_description' WHERE meta_key = 'description'" );
52
- $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_aioseop_meta' WHERE meta_key = 'aiosp_meta'" );
53
- $wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_aioseop_disable' WHERE meta_key = 'aiosp_disable'" );
54
- if ( !$aiosp_activation ) // don't echo on initial plugin activation
55
- echo "<div class='updated fade' style='background-color:green;border-color:green;'><p><strong>" . __( "Updating SEO post meta in database.", 'all_in_one_seo_pack' ) . "</strong></p></div>";
56
  }
57
  }
58
 
@@ -141,8 +130,9 @@ if ( !function_exists( 'aioseop_mrt_pcolumns' ) ) {
141
  function aioseop_mrt_pcolumns( $aioseopc ) {
142
  global $aioseop_options;
143
  $aioseopc['seotitle'] = __( 'SEO Title', 'all_in_one_seo_pack' );
144
- if ( !empty( $aioseop_options['aiosp_togglekeywords'] ) ) $aioseopc['seokeywords'] = __( 'SEO Keywords', 'all_in_one_seo_pack' );
145
  $aioseopc['seodesc'] = __( 'SEO Description', 'all_in_one_seo_pack' );
 
 
146
  return $aioseopc;
147
  }
148
  }
@@ -192,7 +182,10 @@ if ( !function_exists( 'aioseop_admin_head' ) ) {
192
 
193
  if ( !function_exists( 'aioseop_ajax_save_meta' ) ) {
194
  function aioseop_ajax_save_meta() {
195
- check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
 
 
 
196
  $post_id = intval( $_POST['post_id'] );
197
  $new_meta = $_POST['new_meta'];
198
  $target = $_POST['target_meta'];
@@ -223,6 +216,143 @@ if ( !function_exists( 'aioseop_ajax_init' ) ) {
223
  }
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  if ( !function_exists( 'aioseop_mrt_pccolumn' ) ) {
227
  function aioseop_mrt_pccolumn($aioseopcn, $aioseoppi) {
228
  $id = $aioseoppi;
30
  if ( !function_exists( 'aioseop_update_settings_check' ) ) {
31
  function aioseop_update_settings_check() {
32
  global $aioseop_options;
 
33
  if ( ( isset( $_POST['aioseop_migrate_options'] ) ) ||
34
+ ( empty( $aioseop_options ) ) )
35
  aioseop_mrt_mkarry();
36
+
37
  // WPML has now attached to filters, read settings again so they can be translated
38
  $aioseop_options = get_option( 'aioseop_options' );
 
 
39
 
40
+ if ( !empty( $aioseop_options['aiosp_archive_noindex'] ) ) { // migrate setting for noindex archives
41
+ $aioseop_options['aiosp_archive_date_noindex'] = $aioseop_options['aiosp_archive_author_noindex'] = $aioseop_options['aiosp_archive_noindex'];
42
+ unset( $aioseop_options['aiosp_archive_noindex'] );
43
+ update_option( 'aioseop_options', $aioseop_options );
44
+ }
 
 
 
 
 
 
 
 
45
  }
46
  }
47
 
130
  function aioseop_mrt_pcolumns( $aioseopc ) {
131
  global $aioseop_options;
132
  $aioseopc['seotitle'] = __( 'SEO Title', 'all_in_one_seo_pack' );
 
133
  $aioseopc['seodesc'] = __( 'SEO Description', 'all_in_one_seo_pack' );
134
+ if ( empty( $aioseop_options['aiosp_togglekeywords'] ) )
135
+ $aioseopc['seokeywords'] = __( 'SEO Keywords', 'all_in_one_seo_pack' );
136
  return $aioseopc;
137
  }
138
  }
182
 
183
  if ( !function_exists( 'aioseop_ajax_save_meta' ) ) {
184
  function aioseop_ajax_save_meta() {
185
+ if ( !empty( $_POST['_inline_edit'] ) && ( $_POST['_inline_edit'] != 'undefined' ) )
186
+ check_ajax_referer( 'inlineeditnonce', '_inline_edit' );
187
+ else
188
+ check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
189
  $post_id = intval( $_POST['post_id'] );
190
  $new_meta = $_POST['new_meta'];
191
  $target = $_POST['target_meta'];
216
  }
217
  }
218
 
219
+ if ( !function_exists( 'aioseop_ajax_save_url' ) ) {
220
+ function aioseop_ajax_save_url() {
221
+ aioseop_ajax_init();
222
+ $options = Array();
223
+ parse_str( $_POST['options'], $options );
224
+ foreach( $options as $k => $v ) $_POST[$k] = $v;
225
+ $_POST['action'] = 'aiosp_update_module';
226
+ global $aiosp, $aioseop_module_list, $aioseop_modules;
227
+ aioseop_load_modules( $aioseop_module_list );
228
+ $aiosp->admin_menu();
229
+ $module = $aioseop_modules->return_module( "All_in_One_SEO_Pack_Sitemap" );
230
+ $_POST['location'] = null;
231
+ $_POST['Submit'] = 'ajax';
232
+ $module->add_page_hooks();
233
+ $_POST = $module->get_current_options( $_POST, null );
234
+ $module->handle_settings_updates( null );
235
+ $options = $module->get_current_options( Array(), null );
236
+ $output = $module->display_custom_options( '', Array( 'name' => 'aiosp_sitemap_addl_pages', 'type' => 'custom', 'save' => true, 'value' => $options['aiosp_sitemap_addl_pages'], 'attr' => '' ) );
237
+ $output = str_replace( "'", "\'", $output );
238
+ $output = str_replace( "\n", '\n', $output );
239
+ die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
240
+ }
241
+ }
242
+
243
+ if ( !function_exists( 'aioseop_ajax_delete_url' ) ) {
244
+ function aioseop_ajax_delete_url() {
245
+ aioseop_ajax_init();
246
+ $options = Array();
247
+ $options = esc_attr( $_POST['options'] );
248
+ $_POST['action'] = 'aiosp_update_module';
249
+ global $aiosp, $aioseop_module_list, $aioseop_modules;
250
+ aioseop_load_modules( $aioseop_module_list );
251
+ $aiosp->admin_menu();
252
+ $module = $aioseop_modules->return_module( "All_in_One_SEO_Pack_Sitemap" );
253
+ $_POST['location'] = null;
254
+ $_POST['Submit'] = 'ajax';
255
+ $module->add_page_hooks();
256
+ $_POST = $module->get_current_options( $_POST, null );
257
+ if ( !empty( $_POST['aiosp_sitemap_addl_pages'] ) && ( !empty( $_POST['aiosp_sitemap_addl_pages'][ $options ] ) ) ) {
258
+ unset( $_POST['aiosp_sitemap_addl_pages'][ $options ] );
259
+ if ( empty( $_POST['aiosp_sitemap_addl_pages'] ) )
260
+ $_POST['aiosp_sitemap_addl_pages'] = '';
261
+ else
262
+ $_POST['aiosp_sitemap_addl_pages'] = serialize( $_POST['aiosp_sitemap_addl_pages'] );
263
+ $module->handle_settings_updates( null );
264
+ $options = $module->get_current_options( Array(), null );
265
+ $output = $module->display_custom_options( '', Array( 'name' => 'aiosp_sitemap_addl_pages', 'type' => 'custom', 'save' => true, 'value' => $options['aiosp_sitemap_addl_pages'], 'attr' => '' ) );
266
+ $output = str_replace( "'", "\'", $output );
267
+ $output = str_replace( "\n", '\n', $output );
268
+ } else {
269
+ $output = sprintf( __( "Row %s not found; no rows were deleted.", 'all_in_one_seo_pack' ), esc_attr( $options ) );
270
+ }
271
+ die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
272
+ }
273
+ }
274
+
275
+ if (!function_exists('aioseop_ajax_save_settings')) {
276
+ function aioseop_ajax_save_settings() {
277
+ aioseop_ajax_init();
278
+ $options = Array();
279
+ parse_str( $_POST['options'], $options );
280
+ $_POST = $options;
281
+ $_POST['action'] = 'aiosp_update_module';
282
+ global $aiosp, $aioseop_module_list, $aioseop_modules;
283
+ aioseop_load_modules( $aioseop_module_list );
284
+ $aiosp->admin_menu();
285
+ $module = $aioseop_modules->return_module( $_POST['module'] );
286
+ unset( $_POST['module'] );
287
+ if ( empty( $_POST['location'] ) ) $_POST['location'] = null;
288
+ $_POST['Submit'] = 'ajax';
289
+ $module->add_page_hooks();
290
+ // $_POST = $module->get_current_options( $_POST, $_POST['location'] );
291
+ $output = $module->handle_settings_updates( $_POST['location'] );
292
+ $output = '<div id="aioseop_settings_header"><div id="message" class="updated fade"><p>' . $output . '</p></div></div><style>body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left { margin-top: 45px !important; }</style>';
293
+ die( sprintf( AIOSEOP_AJAX_MSG_TMPL, $output ) );
294
+ }
295
+ }
296
+
297
+ if (!function_exists('aioseop_ajax_get_menu_links')) {
298
+ function aioseop_ajax_get_menu_links() {
299
+ aioseop_ajax_init();
300
+ $options = Array();
301
+ parse_str( $_POST['options'], $options );
302
+ $_POST = $options;
303
+ $_POST['action'] = 'aiosp_update_module';
304
+ global $aiosp, $aioseop_module_list, $aioseop_modules;
305
+ aioseop_load_modules( $aioseop_module_list );
306
+ $aiosp->admin_menu();
307
+ if ( empty( $_POST['location'] ) ) $_POST['location'] = null;
308
+ $_POST['Submit'] = 'ajax';
309
+ // $module->add_page_hooks();
310
+
311
+ // include_once( ABSPATH . "/wp-admin/admin.php" );
312
+
313
+ $modlist = $aioseop_modules->get_loaded_module_list();
314
+ $links = Array();
315
+ $link_list = Array();
316
+ $link = $aiosp->get_admin_links();
317
+ if ( !empty( $link ) )
318
+ foreach( $link as $l )
319
+ if ( !empty( $l ) ) {
320
+ if ( empty( $link_list[$l['order']] ) ) $link_list[$l['order']] = Array();
321
+ $link_list[$l['order']][$l['title']] = $l['href'];
322
+ }
323
+ if ( !empty( $modlist ) )
324
+ foreach( $modlist as $k => $v ) {
325
+ $mod = $aioseop_modules->return_module( $v );
326
+ if ( is_object( $mod ) ) {
327
+ $mod->add_page_hooks();
328
+ $link = $mod->get_admin_links();
329
+ foreach( $link as $l )
330
+ if ( !empty( $l ) ) {
331
+ if ( empty( $link_list[$l['order']] ) ) $link_list[$l['order']] = Array();
332
+ $link_list[$l['order']][$l['title']] = $l['href'];
333
+ }
334
+ }
335
+ }
336
+ if ( !empty( $link_list ) ) {
337
+ ksort( $link_list );
338
+ foreach( $link_list as $ll )
339
+ foreach( $ll as $k => $v )
340
+ $links[$k] = $v;
341
+ }
342
+ $output = "<ul>";
343
+ if ( !empty( $links ) )
344
+ foreach( $links as $k => $v ) {
345
+ if ( $k == "Feature Manager" )
346
+ $current = ' class="current"';
347
+ else
348
+ $current = '';
349
+ $output .= "<li{$current}><a href='" . esc_url($v) . "'>" . esc_attr( $k ) . "</a></li>";
350
+ }
351
+ $output .= "</ul>";
352
+ die( sprintf( "jQuery('{$_POST['target']}').fadeOut('fast', function(){jQuery('{$_POST['target']}').html('%s').fadeIn('fast');});", addslashes( $output ) ));
353
+ }
354
+ }
355
+
356
  if ( !function_exists( 'aioseop_mrt_pccolumn' ) ) {
357
  function aioseop_mrt_pccolumn($aioseopcn, $aioseoppi) {
358
  $id = $aioseoppi;
aioseop_module.css CHANGED
@@ -16,7 +16,8 @@
16
  float: left;
17
  width: 100%;
18
  max-width: 300px;
19
- background: url('images/question.png') no-repeat;
 
20
  min-width: 1px;
21
  min-height: 22px;
22
  padding-top: 10px;
@@ -38,6 +39,7 @@
38
  }
39
  .aioseop_option_div {
40
  max-height: 150px;
 
41
  width: 95%;
42
  overflow-y: auto;
43
  }
@@ -142,6 +144,7 @@
142
  line-height: 1;
143
  }
144
  #aiosp_feature_manager_metabox.postbox {
 
145
  float: left;
146
  }
147
  .aioseop_advert p {
@@ -232,10 +235,14 @@
232
  .aioseop_settings_left {
233
  float: left;
234
  padding: 0px;
235
- margin: 0px 0 0 0;
236
  width: 100%;
237
  }
238
 
 
 
 
 
239
  #aioseop_top_button {
240
  margin-top: 5px;
241
  height: 30px;
@@ -339,6 +346,12 @@ div.aioseop_feature .aioseop_featured_image {
339
  div.aioseop_feature .aioseop_featured_image.active {
340
  background-image: url(images/Default-Color-Standard.png);
341
  }
 
 
 
 
 
 
342
  div.aioseop_feature#aioseop_performance .aioseop_featured_image {
343
  background-image: url(images/Performance-BW-Standard.png);
344
  }
@@ -351,6 +364,10 @@ div.aioseop_feature#aioseop_coming_soon .aioseop_featured_image {
351
  div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
352
  background-image: url(images/Default-Color-Standard.png);
353
  }
 
 
 
 
354
  .aioseop_follow_button {
355
  min-height: 50px;
356
  background-repeat: no-repeat;
@@ -456,6 +473,33 @@ div#aioseop_snippet > div > span {
456
  padding: 0px;
457
  border: 0px;
458
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  .aioseop_top_label .aioseop_option_input,
460
  .aioseop_no_label .aioseop_option_input {
461
  width: 100%;
@@ -622,6 +666,15 @@ div.wrap > div#message.error {
622
  max-width: 540px;
623
  }
624
  */
 
 
 
 
 
 
 
 
 
625
  #aiosp_settings_form ul.sfwd_debug_settings li strong {
626
  display: block;
627
  float: left;
16
  float: left;
17
  width: 100%;
18
  max-width: 300px;
19
+ background-repeat: no-repeat;
20
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABpElEQVR42u3WTU8TURSAYf+CO7407kgKBmkVwR1RS1qjfMQVG01sYimpQltoZ+60IL/cJ6bupmnLTGEzb/LsbjInM7mZ86SoqKioKJdec0KDS7r84oRtHqUl6lwRExhxxy0RAyJ67LPKg7TOOQktqmymnCtxSIeYH7xhoVVICNR4xrTWqDMYe7vINxfoUWHeynSJeEWurdEiYof7VqZPmyVya58RVSZ1TDTW4AVpHRDzgdzqwMQuCAzHIhI2Us6u0oF82iOhTlpHRHT53ykJbdKqMuIdmTsiZpO0Rgx5j+TBDEhIq0TMIZlrEZin7/zhG5MKnJG5axJmrUHEBc+nDDggcz0Cs3RKwhVSpgHz/8S3BJ7OOGCTzJ2QsMm0ImKmVSLmC5nbIaZGXn0iZo/MLXHJb6YVE5hWkx65VSfM8Hvqc4MmVmPIZ3JrmRYDKhmXhRHn5F6JiP4916VduvR5uciFtT92wMoclyJwzRYLrcxP7jijyvqEBbdGm4gmGzxIK3xkSDyWMCRwQ0TgmirLPEq7fKVFhy5tjtn+N1hRUVFR0b36C7aDUPHJvmrWAAAAAElFTkSuQmCC);
21
  min-width: 1px;
22
  min-height: 22px;
23
  padding-top: 10px;
39
  }
40
  .aioseop_option_div {
41
  max-height: 150px;
42
+ min-height: 34px;
43
  width: 95%;
44
  overflow-y: auto;
45
  }
144
  line-height: 1;
145
  }
146
  #aiosp_feature_manager_metabox.postbox {
147
+ margin-top: 20px;
148
  float: left;
149
  }
150
  .aioseop_advert p {
235
  .aioseop_settings_left {
236
  float: left;
237
  padding: 0px;
238
+ margin: 0px;
239
  width: 100%;
240
  }
241
 
242
+ body.all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager .aioseop_settings_left {
243
+ margin-top: 20px;
244
+ }
245
+
246
  #aioseop_top_button {
247
  margin-top: 5px;
248
  height: 30px;
346
  div.aioseop_feature .aioseop_featured_image.active {
347
  background-image: url(images/Default-Color-Standard.png);
348
  }
349
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image {
350
+ background-image: url(images/XMLSitemaps-BW-Standard.png);
351
+ }
352
+ div.aioseop_feature#aioseop_sitemap .aioseop_featured_image.active {
353
+ background-image: url(images/XMLSitemaps-Color-Standard.png);
354
+ }
355
  div.aioseop_feature#aioseop_performance .aioseop_featured_image {
356
  background-image: url(images/Performance-BW-Standard.png);
357
  }
364
  div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
365
  background-image: url(images/Default-Color-Standard.png);
366
  }
367
+ .All_in_One_SEO_Pack_Sitemap > form > .wrap > .form-table {
368
+ max-width: 500px;
369
+ clear: none;
370
+ }
371
  .aioseop_follow_button {
372
  min-height: 50px;
373
  background-repeat: no-repeat;
473
  padding: 0px;
474
  border: 0px;
475
  }
476
+ #aiosp_sitemap_addl_pages {
477
+ clear: left;
478
+ margin-left: 20px;
479
+ max-width: 1072px;
480
+ }
481
+ #aiosp_sitemap_addl_pages_metabox .aioseop_wrapper {
482
+ width: 23%;
483
+ min-width: 165px;
484
+ display: inline-block;
485
+ max-width: 265px;
486
+ }
487
+ #aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div {
488
+ position: absolute;
489
+ margin: 5px 0px 10px 0px;
490
+ }
491
+ #aiosp_sitemap_addl_pages_metabox .aioseop_option_input {
492
+ width: 94%;
493
+ min-width: 94%;
494
+ }
495
+ #aiosp_sitemap_addl_pages_metabox table.aioseop_table {
496
+ width: 96%;
497
+ border: 1px solid #CCC;
498
+ margin: 5px 0px 10px 0px;
499
+ }
500
+ table.aioseop_table tr:nth-child(odd) {
501
+ background-color: #EEE;
502
+ }
503
  .aioseop_top_label .aioseop_option_input,
504
  .aioseop_no_label .aioseop_option_input {
505
  width: 100%;
666
  max-width: 540px;
667
  }
668
  */
669
+ #aioseop-hosting {
670
+ width: 445px;
671
+ }
672
+ #aioseop-hosting.postbox .inside {
673
+ margin: -3px 0;
674
+ }
675
+ #aioseop-hosting.postbox .inside {
676
+ padding: 0px;
677
+ }
678
  #aiosp_settings_form ul.sfwd_debug_settings li strong {
679
  display: block;
680
  float: left;
aioseop_module.js CHANGED
@@ -24,6 +24,20 @@ function aioseop_get_field_value( field ) {
24
  return cur.val();
25
  }
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  function aioseop_eval_condshow_logic( statement ) {
28
  var lhs, rhs;
29
  if ( ( typeof statement ) == 'object' ) {
@@ -58,9 +72,16 @@ function aioseop_do_condshow_match( index, value ) {
58
  matches = false;
59
  }
60
  } else {
61
- cur = aioseop_get_field_value( subopt );
62
- if ( cur != setting ) {
63
- matches = false;
 
 
 
 
 
 
 
64
  }
65
  }
66
  });
@@ -160,19 +181,27 @@ if(typeof reclick_radio != 'function') {
160
  }
161
  }
162
 
163
- function aioseop_handle_post_url( action, settings, options) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  jQuery("div#aiosp_"+settings).fadeOut('fast', function() {
165
  var loading = '<label class="aioseop_loading aioseop_'+settings+'_loading"></label> Please wait...';
166
  jQuery("div#aiosp_"+settings).fadeIn('fast', function() {
167
- var aioseop_sack = new sack(ajaxurl);
168
- aioseop_sack.execute = 1;
169
- aioseop_sack.method = 'POST';
170
- aioseop_sack.setVar( "action", action );
171
- aioseop_sack.setVar( "settings", settings );
172
- aioseop_sack.setVar( "options", options );
173
- aioseop_sack.setVar( "nonce-aioseop", jQuery('input[name="nonce-aioseop"]').val() );
174
- aioseop_sack.onError = function() {alert('Ajax error on saving.'); };
175
- aioseop_sack.runAJAX();
176
  });
177
  jQuery("div#aiosp_"+settings).html(loading);
178
  })
@@ -198,7 +227,28 @@ jQuery(document).ready(function() {
198
  }
199
  });
200
  }
201
- var selectors = "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  jQuery(selectors).each(function() {
203
  aioseop_overflow_border(this);
204
  });
@@ -209,6 +259,36 @@ jQuery(document).ready(function() {
209
  aioseop_overflow_border(this);
210
  }), 250);
211
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  jQuery(".aioseop_tab:not(:first)").hide();
213
  jQuery(".aioseop_tab:first").show();
214
  jQuery("a.aioseop_header_tab").click(function(){
24
  return cur.val();
25
  }
26
 
27
+ function aioseop_get_field_values( field ) {
28
+ arr = [];
29
+ cur = jQuery('[name=' + field + ']');
30
+ if ( cur.length == 0 ) return field;
31
+ type = cur.attr('type');
32
+ if ( type == "checkbox" || type == "radio" )
33
+ jQuery('input[name=' + field + ']:checked').each(function() {
34
+ arr.push(jQuery(this).val());
35
+ });
36
+ if ( arr.length <= 0 )
37
+ arr.push(cur.val());
38
+ return arr;
39
+ }
40
+
41
  function aioseop_eval_condshow_logic( statement ) {
42
  var lhs, rhs;
43
  if ( ( typeof statement ) == 'object' ) {
72
  matches = false;
73
  }
74
  } else {
75
+ if ( subopt.match(/aiosp_cpostactive/) ) { // special case for this one -- pdb
76
+ cur = aioseop_get_field_values( subopt );
77
+ if ( jQuery.inArray( setting, cur, 0 ) < 0 ) {
78
+ matches = false;
79
+ }
80
+ } else {
81
+ cur = aioseop_get_field_value( subopt );
82
+ if ( cur != setting ) {
83
+ matches = false;
84
+ }
85
  }
86
  }
87
  });
181
  }
182
  }
183
 
184
+ function aioseop_handle_ajax_call( action, settings, options, success) {
185
+ var aioseop_sack = new sack(ajaxurl);
186
+ aioseop_sack.execute = 1;
187
+ aioseop_sack.method = 'POST';
188
+ aioseop_sack.setVar( "action", action );
189
+ aioseop_sack.setVar( "settings", settings );
190
+ aioseop_sack.setVar( "options", options );
191
+ if ( typeof success != 'undefined' ) {
192
+ aioseop_sack.onCompletion = success;
193
+ }
194
+ aioseop_sack.setVar( "nonce-aioseop", jQuery('input[name="nonce-aioseop"]').val() );
195
+
196
+ aioseop_sack.onError = function() {alert('Ajax error on saving.'); };
197
+ aioseop_sack.runAJAX();
198
+ }
199
+
200
+ function aioseop_handle_post_url( action, settings, options, success) {
201
  jQuery("div#aiosp_"+settings).fadeOut('fast', function() {
202
  var loading = '<label class="aioseop_loading aioseop_'+settings+'_loading"></label> Please wait...';
203
  jQuery("div#aiosp_"+settings).fadeIn('fast', function() {
204
+ aioseop_handle_ajax_call( action, settings, options, success);
 
 
 
 
 
 
 
 
205
  });
206
  jQuery("div#aiosp_"+settings).html(loading);
207
  })
227
  }
228
  });
229
  }
230
+ /*
231
+ jQuery("#aiosp_settings_form").delegate("input[name='Submit']", "click", function() {
232
+ aioseop_handle_post_url('aioseop_ajax_save_settings', 'ajax_settings_message', jQuery('form#aiosp_settings_form').serialize() );
233
+ return false;
234
+ });
235
+ */
236
+ jQuery(".all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager #aiosp_settings_form .aioseop_settings_left").delegate("input[name='Submit']", "click", function(e) {
237
+ e.preventDefault();
238
+ return false;
239
+ });
240
+ jQuery(".all-in-one-seo_page_all-in-one-seo-pack-aioseop_feature_manager #aiosp_settings_form").delegate("input[name='Submit']", "click", function(e) {
241
+ e.preventDefault();
242
+ aioseop_handle_post_url('aioseop_ajax_save_settings', 'ajax_settings_message', jQuery('form#aiosp_settings_form').serialize(),
243
+ function() {
244
+ jQuery('.wp-has-current-submenu').fadeIn('fast', function() {
245
+ aioseop_handle_ajax_call('aioseop_ajax_get_menu_links', 'ajax_settings_message', jQuery.param( {target: '.wp-has-current-submenu > ul'} ) );
246
+ });
247
+ } );
248
+ return false;
249
+ });
250
+ var selectors = "div.aioseop_multicheckbox_type div.aioseop_option_div, #aiosp_sitemap_debug div.aioseop_option_div, #aiosp_performance_status div.aioseop_option_div";
251
+ /*
252
  jQuery(selectors).each(function() {
253
  aioseop_overflow_border(this);
254
  });
259
  aioseop_overflow_border(this);
260
  }), 250);
261
  });
262
+ */
263
+ jQuery("div#aiosp_sitemap_addl_pages_metabox").delegate("input[name='Submit']", "click", function() {
264
+ aioseop_handle_post_url('aioseop_ajax_save_url', 'sitemap_addl_pages', jQuery('div#aiosp_sitemap_addl_pages_metabox input, div#aiosp_sitemap_addl_pages_metabox select').serialize() );
265
+ return false;
266
+ });
267
+ jQuery("div#aiosp_sitemap_addl_pages_metabox").delegate("a.aiosp_delete_url", "click", function(e) {
268
+ e.preventDefault();
269
+ aioseop_handle_post_url('aioseop_ajax_delete_url', 'sitemap_addl_pages', jQuery(this).attr("title") );
270
+ return false;
271
+ });
272
+ jQuery("div#aiosp_opengraph_scan_header").delegate("input[name='aiosp_opengraph_scan_header']", "click", function(e) {
273
+ e.preventDefault();
274
+ aioseop_handle_post_url('aioseop_ajax_scan_header', 'opengraph_scan_header', jQuery('div#aiosp_opengraph_scan_header').serialize() );
275
+ return false;
276
+ });
277
+
278
+ jQuery('input[name="aiosp_sitemap_posttypes[]"][value="all"]').click(function () {
279
+ jQuery(this).parents('div:eq(0)').find(':checkbox').attr('checked', this.checked);
280
+ });
281
+ jQuery('input[name="aiosp_sitemap_taxonomies[]"][value="all"]').click(function () {
282
+ jQuery(this).parents('div:eq(0)').find(':checkbox').attr('checked', this.checked);
283
+ });
284
+ jQuery('input[name="aiosp_sitemap_posttypes[]"][value!="all"]').click(function () {
285
+ if ( !this.checked )
286
+ jQuery(this).parents('div:eq(0)').find('input[value="all"]:checkbox').attr('checked', this.checked);
287
+ });
288
+ jQuery('input[name="aiosp_sitemap_taxonomies[]"][value!="all"]').click(function () {
289
+ if ( !this.checked )
290
+ jQuery(this).parents('div:eq(0)').find('input[value="all"]:checkbox').attr('checked', this.checked);
291
+ });
292
  jQuery(".aioseop_tab:not(:first)").hide();
293
  jQuery(".aioseop_tab:first").show();
294
  jQuery("a.aioseop_header_tab").click(function(){
aioseop_module_class.php CHANGED
@@ -34,8 +34,8 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
34
  * Handles calls to display_settings_page_{$location}, does error checking.
35
  */
36
  function __call( $name, $arguments ) {
37
- if ( strpos( $name, "display_settings_page_" ) === 0 )
38
- return $this->display_settings_page( substr( $name, 22 ) );
39
  $error = __( sprintf( "Method %s doesn't exist", $name ), 'all_in_one_seo_pack' );
40
  if ( class_exists( 'BadMethodCallException' ) )
41
  throw new BadMethodCallException( $error );
@@ -182,6 +182,43 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
182
  function ucwords( $str ) {
183
  return $this->convert_case( $str, 'title' );
184
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  /**
187
  * convert xml string to php array - useful to get a serializable value
@@ -313,6 +350,43 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
313
  return $this->get_term_labels( get_categories( $args ) );
314
  }
315
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  /**
317
  * Handles exporting settings data for a module.
318
  */
@@ -333,51 +407,10 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
333
  }
334
  }
335
  }
336
- if( $post_types != null ) {
337
- $posts_query = new WP_Query( Array( 'posts_per_page' => -1, 'post_type' => $post_types ) );
338
- if ( ( $this === $aiosp ) ) { // || ( $this->locations !== null )
339
- while ($posts_query->have_posts() ) : $posts_query->the_post();
340
-
341
- global $post;
342
- $guid = $post->guid; $type = $post->post_type; $title = $post->post_title; $date = $post->post_date;
343
- $data = '';
344
- /* Add Module Meta Data */
345
- if ( $this === $aiosp ) {
346
- /* Add Post Field Data */
347
- $post_custom_fields = get_post_custom( $post->ID );
348
- $has_data = null;
349
- if( is_array( $post_custom_fields ) ){
350
- foreach( $post_custom_fields as $field_name => $field ){
351
- if( ( substr( $field_name, 1, 7) == 'aioseop' ) && ( $field[0] ) ){
352
- $has_data = true;
353
- $data .= $field_name . " = '" . $field[0] . "'\n";
354
- }
355
- }
356
- }
357
- } elseif ( $this->locations !== null ) {
358
- foreach( $this->locations as $k => $v ) {
359
- if ( isset($v['type'] ) && isset($v['options'] ) && ( $v['type'] === 'metabox' ) ) {
360
- $value = $this->get_prefix($k) . $k;
361
- $post_meta = get_post_meta( $post->ID, '_' . $value, true );
362
- if ( $post_meta ) $data .= "$value = '" . str_replace( Array( "'", "\n", "\r" ), Array( "\'", '\n', '\r' ), trim( serialize( $post_meta ) ) ) . "'";
363
- }
364
- }
365
- }
366
- if ( !empty( $data ) ) $has_data = true;
367
- /* Print post data to file */
368
- if( $has_data != null ){
369
- $post_info = "\n[post_data]\n\n";
370
- $post_info .= "post_title = '" . $title . "'\n";
371
- $post_info .= "post_guid = '" . $guid . "'\n";
372
- $post_info .= "post_date = '" . $date . "'\n";
373
- $post_info .= "post_type = '" . $type . "'\n";
374
- if ( $data ) $buf .= $post_info . $data . "\n";
375
- }
376
- endwhile;
377
- wp_reset_postdata();
378
- }
379
- }
380
-
381
  /* Add all active settings to settings file */
382
  $name = $this->get_option_name();
383
  $options = $this->get_class_option();
@@ -439,8 +472,11 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
439
  }
440
 
441
  /** Allow modules to use WP Filesystem if available and desired, fall back to PHP filesystem access otherwise. */
442
- function use_wp_filesystem( $method = '', $form_fields = Array(), $url = '', $error = false ) {
443
- $this->credentials = request_filesystem_credentials($url, $method, $error, false, $form_fields);
 
 
 
444
  return $this->credentials;
445
  }
446
 
@@ -450,6 +486,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
450
  function get_filesystem_object( ) {
451
  $cred = get_transient( 'aioseop_fs_credentials' );
452
  if ( !empty( $cred ) ) $this->credentials = $cred;
 
453
  if ( function_exists( 'WP_Filesystem' ) && ( WP_Filesystem( $this->credentials ) ) ) {
454
  global $wp_filesystem;
455
  return $wp_filesystem;
@@ -459,8 +496,10 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
459
  require_once( ABSPATH . 'wp-admin/includes/file.php' );
460
 
461
  if ( !WP_Filesystem( $this->credentials ) )
462
- $this->use_wp_filesystem( '', Array(), '', true );
463
- set_transient( 'aioseop_fs_credentials', $this->credentials, 10800 );
 
 
464
  global $wp_filesystem;
465
  if ( is_object( $wp_filesystem ) )
466
  return $wp_filesystem;
@@ -514,9 +553,9 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
514
  $file = $wpfs->get_contents( $filename );
515
  if ( !is_string( $file ) || empty( $file ) ) return $file;
516
  if ( $maxlen < 0 )
517
- return substr( $file, $offset );
518
  else
519
- return substr( $file, $offset, $maxlen );
520
  } else {
521
  return $wpfs->get_contents( $filename );
522
  }
@@ -701,46 +740,57 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
701
  */
702
  function add_page_hooks() {
703
  $hookname = current_filter();
704
- if ( strpos( $hookname, 'load-' ) === 0 )
705
- $this->pagehook = substr( $hookname, 5 );
706
- $this->filter_pointers();
707
  add_action( "admin_print_scripts", Array( $this, 'enqueue_scripts' ) );
708
  add_action( "admin_print_styles", Array( $this, 'enqueue_styles' ) );
709
  add_action( $this->prefix . 'settings_header', Array( $this, 'display_tabs' ) );
710
  }
711
 
712
- function add_admin_bar_submenu() {
713
- global $aioseop_admin_menu, $wp_admin_bar;
714
- if ( $aioseop_admin_menu ) {
715
- if ( !empty( $this->menu_name ) )
716
- $name = $this->menu_name;
717
- else
718
- $name = $this->name;
719
-
720
- $hookname = plugin_basename( $this->file );
721
- if ( function_exists( 'menu_page_url' ) )
722
- $url = menu_page_url( $hookname, 0 );
723
- else
724
- $url = esc_url( admin_url( 'admin.php?page=' . $hookname ) );
725
-
726
- if ( $this->locations === null )
727
- $wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $hookname, 'href' => $url ) );
728
- else {
729
- foreach( $this->locations as $k => $v ) {
730
- if ( $v['type'] === 'settings' ) {
731
- if ( $k === 'default' ) {
732
- $wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $hookname, 'href' => $url ) );
733
- } else {
734
- if ( !empty( $v['menu_name'] ) )
735
- $name = $v['menu_name'];
736
- else
737
- $name = $v['name'];
738
- $wp_admin_bar->add_menu( array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $this->get_prefix( $k ) . $k, 'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ) ) );
739
- }
740
  }
741
  }
742
  }
743
  }
 
 
 
 
 
 
 
 
 
 
 
 
744
  }
745
 
746
  /**
@@ -865,7 +915,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
865
  $sel = '';
866
  $is_arr = is_array( $value );
867
  if ( is_string( $v ) || is_string( $value ) )
868
- $cmp = !strcmp( (string)$v, (string)$value );
869
  else
870
  $cmp = ( $value == $v );
871
  if ( ( !$is_arr && $cmp ) || ( $is_arr && in_array( $v, $value ) ) )
@@ -892,7 +942,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
892
  extract( $args );
893
  if ( $options['type'] == 'custom' )
894
  return apply_filters( "{$prefix}output_option", '', $args );
895
- if ( in_array( $options['type'], Array( 'multiselect', 'select', 'multicheckbox', 'radio', 'checkbox', 'textarea', 'text', 'submit', 'hidden' ) ) )
896
  $value = esc_attr( $value );
897
  $buf = '';
898
  if ( !empty( $options['count'] ) ) {
@@ -921,8 +971,8 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
921
  $size = 60;
922
  if ( isset( $options['size'] ) ) $size = $options['size'];
923
  elseif ( isset( $options['rows'] ) && isset( $options['cols'] ) ) $size = $options['rows'] * $options['cols'];
924
- $buf .= "<br /><input readonly type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . strlen($value) . "' />"
925
- . sprintf( __(' characters. Most search engines use a maximum of %s chars for the %s.', 'all_in_one_seo_pack'), $size, strtolower( $options['name'] ) );
926
  }
927
  return $buf;
928
  }
@@ -1119,6 +1169,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1119
  do_action( $this->prefix . 'settings_header', $location );
1120
  ?> <form id="aiosp_settings_form" name="dofollow" enctype="multipart/form-data" action="" method="post">
1121
  <div id="aioseop_top_button">
 
1122
  <?php
1123
  $submit_options = Array('action' => Array( 'type' => 'hidden', 'value' => 'aiosp_update_module' ),
1124
  'module' => Array( 'type' => 'hidden', 'value' => get_class( $this ) ),
@@ -1194,7 +1245,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module' ) ) {
1194
  if ( !$prefix ) $prefix = $this->prefix;
1195
  if ( !empty( $options ) )
1196
  foreach ($options as $k => $v) {
1197
- if ( !isset( $v['name'] ) ) $v['name'] = ucwords( strtr( $k, '_', ' ' ) );
1198
  if ( !isset( $v['type'] ) ) $v['type'] = 'checkbox';
1199
  if ( !isset( $v['default'] ) ) $v['default'] = null;
1200
  if ( !isset( $v['initial_options'] ) ) $v['initial_options'] = $v['default'];
34
  * Handles calls to display_settings_page_{$location}, does error checking.
35
  */
36
  function __call( $name, $arguments ) {
37
+ if ( $this->strpos( $name, "display_settings_page_" ) === 0 )
38
+ return $this->display_settings_page( $this->substr( $name, 22 ) );
39
  $error = __( sprintf( "Method %s doesn't exist", $name ), 'all_in_one_seo_pack' );
40
  if ( class_exists( 'BadMethodCallException' ) )
41
  throw new BadMethodCallException( $error );
182
  function ucwords( $str ) {
183
  return $this->convert_case( $str, 'title' );
184
  }
185
+
186
+ /**
187
+ * Wrapper for strlen() - uses mb_strlen() if possible.
188
+ */
189
+ function strlen( $string ) {
190
+ if ( function_exists( 'mb_strlen' ) )
191
+ return mb_strlen( $string );
192
+ return strlen( $string );
193
+ }
194
+
195
+ /**
196
+ * Wrapper for substr() - uses mb_substr() if possible.
197
+ */
198
+ function substr( $string, $start = 0, $length = 2147483647 ) {
199
+ $args = func_get_args();
200
+ if ( function_exists( 'mb_substr' ) )
201
+ return call_user_func_array( 'mb_substr', $args );
202
+ return call_user_func_array( 'substr', $args );
203
+ }
204
+
205
+ /**
206
+ * Wrapper for strpos() - uses mb_strpos() if possible.
207
+ */
208
+ function strpos( $haystack, $needle, $offset = 0 ) {
209
+ if ( function_exists( 'mb_strpos' ) )
210
+ return mb_strpos( $haystack, $needle, $offset );
211
+ return strpos( $haystack, $needle, $offset );
212
+ }
213
+
214
+ /**
215
+ * Wrapper for strrpos() - uses mb_strrpos() if possible.
216
+ */
217
+ function strrpos( $haystack, $needle, $offset = 0 ) {
218
+ if ( function_exists( 'mb_strrpos' ) )
219
+ return mb_strrpos( $haystack, $needle, $offset );
220
+ return strrpos( $haystack, $needle, $offset );
221
+ }
222
 
223
  /**
224
  * convert xml string to php array - useful to get a serializable value
350
  return $this->get_term_labels( get_categories( $args ) );
351
  }
352
 
353
+ /**
354
+ * Helper function for exporting settings on post data.
355
+ */
356
+ function post_data_export( $prefix = '_aioseop', $query = Array( 'posts_per_page' => -1 ) ) {
357
+ $buf = '';
358
+ $posts_query = new WP_Query( $query );
359
+ while ($posts_query->have_posts() ) {
360
+ $posts_query->the_post();
361
+ global $post;
362
+ $guid = $post->guid; $type = $post->post_type; $title = $post->post_title; $date = $post->post_date;
363
+ $data = '';
364
+ $post_custom_fields = get_post_custom( $post->ID );
365
+ $has_data = null;
366
+
367
+ if( is_array( $post_custom_fields ) ) {
368
+ foreach( $post_custom_fields as $field_name => $field ){
369
+ if( ( $this->strpos( $field_name, $prefix ) === 0 ) && ( $field[0] ) ) {
370
+ $has_data = true;
371
+ $data .= $field_name . " = '" . $field[0] . "'\n";
372
+ }
373
+ }
374
+ }
375
+ if ( !empty( $data ) ) $has_data = true;
376
+
377
+ if( $has_data != null ){
378
+ $post_info = "\n[post_data]\n\n";
379
+ $post_info .= "post_title = '" . $title . "'\n";
380
+ $post_info .= "post_guid = '" . $guid . "'\n";
381
+ $post_info .= "post_date = '" . $date . "'\n";
382
+ $post_info .= "post_type = '" . $type . "'\n";
383
+ if ( $data ) $buf .= $post_info . $data . "\n";
384
+ }
385
+ }
386
+ wp_reset_postdata();
387
+ return $buf;
388
+ }
389
+
390
  /**
391
  * Handles exporting settings data for a module.
392
  */
407
  }
408
  }
409
  }
410
+
411
+ if ( ( $post_types != null ) && ( $this === $aiosp ) )
412
+ $buf .= $this->post_data_export( '_aioseop', Array( 'posts_per_page' => -1, 'post_type' => $post_types ) );
413
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
414
  /* Add all active settings to settings file */
415
  $name = $this->get_option_name();
416
  $options = $this->get_class_option();
472
  }
473
 
474
  /** Allow modules to use WP Filesystem if available and desired, fall back to PHP filesystem access otherwise. */
475
+ function use_wp_filesystem( $method = '', $form_fields = false, $url = '', $error = false ) {
476
+ if ( empty( $method ) )
477
+ $this->credentials = request_filesystem_credentials( $url );
478
+ else
479
+ $this->credentials = request_filesystem_credentials( $url, $method, $error, false, $form_fields );
480
  return $this->credentials;
481
  }
482
 
486
  function get_filesystem_object( ) {
487
  $cred = get_transient( 'aioseop_fs_credentials' );
488
  if ( !empty( $cred ) ) $this->credentials = $cred;
489
+
490
  if ( function_exists( 'WP_Filesystem' ) && ( WP_Filesystem( $this->credentials ) ) ) {
491
  global $wp_filesystem;
492
  return $wp_filesystem;
496
  require_once( ABSPATH . 'wp-admin/includes/file.php' );
497
 
498
  if ( !WP_Filesystem( $this->credentials ) )
499
+ $this->use_wp_filesystem();
500
+
501
+ if ( !empty( $this->credentials ) )
502
+ set_transient( 'aioseop_fs_credentials', $this->credentials, 10800 );
503
  global $wp_filesystem;
504
  if ( is_object( $wp_filesystem ) )
505
  return $wp_filesystem;
553
  $file = $wpfs->get_contents( $filename );
554
  if ( !is_string( $file ) || empty( $file ) ) return $file;
555
  if ( $maxlen < 0 )
556
+ return $this->substr( $file, $offset );
557
  else
558
+ return $this->substr( $file, $offset, $maxlen );
559
  } else {
560
  return $wpfs->get_contents( $filename );
561
  }
740
  */
741
  function add_page_hooks() {
742
  $hookname = current_filter();
743
+ if ( $this->strpos( $hookname, 'load-' ) === 0 )
744
+ $this->pagehook = $this->substr( $hookname, 5 );
 
745
  add_action( "admin_print_scripts", Array( $this, 'enqueue_scripts' ) );
746
  add_action( "admin_print_styles", Array( $this, 'enqueue_styles' ) );
747
  add_action( $this->prefix . 'settings_header', Array( $this, 'display_tabs' ) );
748
  }
749
 
750
+ function get_admin_links() {
751
+ if ( !empty( $this->menu_name ) )
752
+ $name = $this->menu_name;
753
+ else
754
+ $name = $this->name;
755
+
756
+ $hookname = plugin_basename( $this->file );
757
+
758
+ $links = Array();
759
+ $url = '';
760
+ if ( function_exists( 'menu_page_url' ) )
761
+ $url = menu_page_url( $hookname, 0 );
762
+ if ( empty( $url ) )
763
+ $url = esc_url( admin_url( 'admin.php?page=' . $hookname ) );
764
+
765
+ if ( $this->locations === null )
766
+ array_unshift( $links, array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $hookname, 'href' => $url, 'order' => $this->menu_order() ) );
767
+ else {
768
+ foreach( $this->locations as $k => $v ) {
769
+ if ( $v['type'] === 'settings' ) {
770
+ if ( $k === 'default' ) {
771
+ array_unshift( $links, array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $hookname, 'href' => $url, 'order' => $this->menu_order() ) );
772
+ } else {
773
+ if ( !empty( $v['menu_name'] ) )
774
+ $name = $v['menu_name'];
775
+ else
776
+ $name = $v['name'];
777
+ array_unshift( $links, array( 'parent' => AIOSEOP_PLUGIN_DIRNAME, 'title' => $name, 'id' => $this->get_prefix( $k ) . $k, 'href' => esc_url( admin_url( 'admin.php?page=' . $this->get_prefix( $k ) . $k ) ), 'order' => $this->menu_order() ) );
778
  }
779
  }
780
  }
781
  }
782
+ return $links;
783
+ }
784
+
785
+ function add_admin_bar_submenu() {
786
+ global $aioseop_admin_menu, $wp_admin_bar;
787
+
788
+ if ( $aioseop_admin_menu ) {
789
+ $links = $this->get_admin_links();
790
+ if ( !empty( $links ) )
791
+ foreach( $links as $l )
792
+ $wp_admin_bar->add_menu( $l );
793
+ }
794
  }
795
 
796
  /**
915
  $sel = '';
916
  $is_arr = is_array( $value );
917
  if ( is_string( $v ) || is_string( $value ) )
918
+ @$cmp = !strcmp( (string)$v, (string)$value );
919
  else
920
  $cmp = ( $value == $v );
921
  if ( ( !$is_arr && $cmp ) || ( $is_arr && in_array( $v, $value ) ) )
942
  extract( $args );
943
  if ( $options['type'] == 'custom' )
944
  return apply_filters( "{$prefix}output_option", '', $args );
945
+ if ( in_array( $options['type'], Array( 'multiselect', 'select', 'multicheckbox', 'radio', 'checkbox', 'textarea', 'text', 'submit', 'hidden' ) ) && ( is_string( $value ) ) )
946
  $value = esc_attr( $value );
947
  $buf = '';
948
  if ( !empty( $options['count'] ) ) {
971
  $size = 60;
972
  if ( isset( $options['size'] ) ) $size = $options['size'];
973
  elseif ( isset( $options['rows'] ) && isset( $options['cols'] ) ) $size = $options['rows'] * $options['cols'];
974
+ $buf .= "<br /><input readonly type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen($value) . "' />"
975
+ . sprintf( __(' characters. Most search engines use a maximum of %s chars for the %s.', 'all_in_one_seo_pack'), $size, $this->strtolower( $options['name'] ) );
976
  }
977
  return $buf;
978
  }
1169
  do_action( $this->prefix . 'settings_header', $location );
1170
  ?> <form id="aiosp_settings_form" name="dofollow" enctype="multipart/form-data" action="" method="post">
1171
  <div id="aioseop_top_button">
1172
+ <div id="aiosp_ajax_settings_message"></div>
1173
  <?php
1174
  $submit_options = Array('action' => Array( 'type' => 'hidden', 'value' => 'aiosp_update_module' ),
1175
  'module' => Array( 'type' => 'hidden', 'value' => get_class( $this ) ),
1245
  if ( !$prefix ) $prefix = $this->prefix;
1246
  if ( !empty( $options ) )
1247
  foreach ($options as $k => $v) {
1248
+ if ( !isset( $v['name'] ) ) $v['name'] = $this->ucwords( strtr( $k, '_', ' ' ) );
1249
  if ( !isset( $v['type'] ) ) $v['type'] = 'checkbox';
1250
  if ( !isset( $v['default'] ) ) $v['default'] = null;
1251
  if ( !isset( $v['initial_options'] ) ) $v['initial_options'] = $v['default'];
aioseop_module_manager.php CHANGED
@@ -39,6 +39,16 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Module_Manager' ) ) {
39
  if ( $class == get_class( $m ) ) return $m;
40
  return false;
41
  }
 
 
 
 
 
 
 
 
 
 
42
 
43
  // Module name is used for these automatic settings:
44
  // The aiosp_enable_$module settings - whether each plugin is active or not
39
  if ( $class == get_class( $m ) ) return $m;
40
  return false;
41
  }
42
+
43
+ function get_loaded_module_list() {
44
+ $module_list = Array();
45
+ if ( !empty( $this->modules ) ) {
46
+ foreach( $this->modules as $k => $v )
47
+ if ( !empty( $v ) )
48
+ $module_list[$k] = get_class( $v );
49
+ }
50
+ return $module_list;
51
+ }
52
 
53
  // Module name is used for these automatic settings:
54
  // The aiosp_enable_$module settings - whether each plugin is active or not
aioseop_performance.php CHANGED
@@ -140,7 +140,7 @@ if ( !class_exists( 'All_in_One_SEO_Pack_Performance' ) ) {
140
  else $memory_limit = __('N/A', 'all_in_one_seo_pack' );
141
  if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'all_in_one_seo_pack' );
142
  else $memory_usage = __('N/A', 'all_in_one_seo_pack' );
143
- if (is_callable('exif_read_data')) $exif = __('Yes', 'all_in_one_seo_pack' ). " ( V" . substr(phpversion('exif'),0,4) . ")" ;
144
  else $exif = __('No', 'all_in_one_seo_pack' );
145
  if (is_callable('iptcparse')) $iptc = __('Yes', 'all_in_one_seo_pack' );
146
  else $iptc = __('No', 'all_in_one_seo_pack' );
140
  else $memory_limit = __('N/A', 'all_in_one_seo_pack' );
141
  if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'all_in_one_seo_pack' );
142
  else $memory_usage = __('N/A', 'all_in_one_seo_pack' );
143
+ if (is_callable('exif_read_data')) $exif = __('Yes', 'all_in_one_seo_pack' ). " ( V" . $this->substr(phpversion('exif'),0,4) . ")" ;
144
  else $exif = __('No', 'all_in_one_seo_pack' );
145
  if (is_callable('iptcparse')) $iptc = __('Yes', 'all_in_one_seo_pack' );
146
  else $iptc = __('No', 'all_in_one_seo_pack' );
aioseop_sitemap.php ADDED
@@ -0,0 +1,1446 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package All-in-One-SEO-Pack
4
+ */
5
+ /**
6
+ * The Sitemap class.
7
+ */
8
+ if ( !class_exists( 'All_in_One_SEO_Pack_Sitemap' ) ) {
9
+ class All_in_One_SEO_Pack_Sitemap extends All_in_One_SEO_Pack_Module {
10
+ var $cache_struct = null;
11
+ var $cache_home = null;
12
+ var $comment_string;
13
+ var $start_memory_usage = 0;
14
+ var $max_posts = 50000;
15
+ var $paginate = false;
16
+
17
+ function All_in_One_SEO_Pack_Sitemap( ) {
18
+ $this->name = __( 'XML Sitemap', 'all_in_one_seo_pack' ); // Human-readable name of the plugin
19
+ $this->prefix = 'aiosp_sitemap_'; // option prefix
20
+ $this->file = __FILE__; // the current file
21
+ parent::__construct();
22
+ $this->comment_string = __( "Sitemap %s generated by All in One SEO Pack %s by Michael Torbert of Semper Fi Web Design on %s",
23
+ 'all_in_one_seo_pack' );
24
+
25
+ $this->default_options = array(
26
+ 'filename' => Array( 'name' => __( 'Filename Prefix', 'all_in_one_seo_pack' ),
27
+ 'help_text' => __( 'The prefix for your sitemap file name. This will default to "sitemap."', 'all_in_one_seo_pack' ),
28
+ 'default' => 'sitemap', 'type' => 'text', 'sanitize' => 'filename' ),
29
+ 'google' => Array( 'name' => __( 'Notify Google', 'all_in_one_seo_pack'),
30
+ 'help_text' => __( 'Notify Google when you update your sitemap settings.', 'all_in_one_seo_pack' ) ),
31
+ 'bing' => Array( 'name' => __( 'Notify Bing', 'all_in_one_seo_pack'),
32
+ 'help_text' => __('Notify Bing when you update your sitemap settings.', 'all_in_one_seo_pack' ) ),
33
+ 'indexes' => Array( 'name' => __( 'Enable Sitemap Indexes', 'all_in_one_seo_pack' ),
34
+ 'help_text' => __( 'Organize sitemap entries into distinct files in your sitemap.', 'all_in_one_seo_pack' ) ),
35
+ 'paginate' => Array( 'name' => __( 'Paginate Sitemap Indexes', 'all_in_one_seo_pack' ),
36
+ 'help_text' => __( 'Splits long sitemaps into separate files.', 'all_in_one_seo_pack' ),
37
+ 'condshow' => Array( "aiosp_sitemap_indexes" => 'on' ) ),
38
+ 'max_posts' => Array( 'name' => __( 'Maximum Posts Per Sitemap', 'all_in_one_seo_pack' ),
39
+ 'help_text' => __( 'Allows you to specify the maximum number of posts in a sitemap (up to 50,000).', 'all_in_one_seo_pack' ),
40
+ 'type' => 'text', 'default' => 50000,
41
+ 'condshow' => Array( "aiosp_sitemap_indexes" => 'on', "aiosp_sitemap_paginate" => 'on' ) ),
42
+ 'posttypes' => Array( 'name' => __( 'Post Types', 'all_in_one_seo_pack'),
43
+ 'help_text' => __( 'Select which post types appear in your sitemap.', 'all_in_one_seo_pack' ),
44
+ 'type' => 'multicheckbox', 'default' => 'all' ),
45
+ 'taxonomies'=> Array( 'name' => __( 'Taxonomies', 'all_in_one_seo_pack' ),
46
+ 'help_text' => __( 'Select which taxonomy archives appear in your sitemap.', 'all_in_one_seo_pack' ),
47
+ 'type' => 'multicheckbox', 'default' => 'all' ),
48
+ 'archive' => Array( 'name' => __( 'Include Date Archive Pages', 'all_in_one_seo_pack' ),
49
+ 'help_text' => __( 'Include date archive pages in your sitemap.', 'all_in_one_seo_pack' ) ),
50
+ 'author' => Array( 'name' => __( 'Include Author Pages', 'all_in_one_seo_pack' ),
51
+ 'help_text' => __( 'Include author archive pages in your sitemap.', 'all_in_one_seo_pack' ) ),
52
+ 'gzipped' => Array( 'name' => __( 'Create Compressed Sitemap', 'all_in_one_seo_pack' ), 'default' => 'On',
53
+ 'help_text' => __( 'Create a compressed sitemap file in .xml.gz format', 'all_in_one_seo_pack' ) ),
54
+ 'robots' => Array( 'name' => __( 'Link From Virtual Robots.txt', 'all_in_one_seo_pack' ), 'default' => 'On',
55
+ 'help_text' => __( 'Places a link to your Sitemap.xml into your virtual Robots.txt file.', 'all_in_one_seo_pack' ) ),
56
+ 'rewrite' => Array( 'name' => __( 'Dynamically Generate Sitemap', 'all_in_one_seo_pack' ), 'default' => 'On',
57
+ 'help_text' => __( 'Use rewrites to generate your sitemap on the fly. NOTE: This is required for WordPress Multisite.', 'all_in_one_seo_pack') )
58
+
59
+ );
60
+
61
+ $status_options = Array(
62
+ 'link' => Array( 'default' => '', 'type' => 'html', 'label' => 'none', 'save' => false ),
63
+ 'debug' => Array( 'name' => __( 'Debug Log', 'all_in_one_seo_pack' ), 'default' => '', 'type' => 'html', 'disabled' => 'disabled', 'save' => false, 'label' => 'none', 'rows' => 5, 'cols' => 120, 'style' => 'min-width:950px',
64
+ 'help_text' => __( 'Debug messages and status information for sitemap.', 'all_in_one_seo_pack' ) )
65
+ );
66
+
67
+ $this->layout = Array(
68
+ 'status' => Array(
69
+ 'name' => __( 'Sitemap Status', 'all_in_one_seo_pack' ),
70
+ 'options' => array_keys( $status_options ) ),
71
+ 'default' => Array(
72
+ 'name' => $this->name,
73
+ 'options' => array_keys( $this->default_options )
74
+ )
75
+ );
76
+
77
+ $prio = Array( 'no' => 'Do Not Override' );
78
+
79
+ for( $i = 0; $i <= 10; $i++ ) {
80
+ $str = sprintf( "%0.1f", $i / 10.0 );
81
+ $prio[ $str ] = $str;
82
+ }
83
+
84
+ $freq = Array( 'no' => 'Do Not Override' );
85
+
86
+ foreach ( Array( 'always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never' ) as $f ) $freq[ $f ] = $f;
87
+
88
+ foreach( Array( 'prio' => __( 'priority', 'all_in_one_seo_pack' ), 'freq' => __( 'frequency', 'all_in_one_seo_pack' ) ) as $k => $v ) {
89
+ $s = "{$k}_options";
90
+ $$s = Array();
91
+ foreach( Array( 'homepage' => __( 'homepage', 'all_in_one_seo_pack' ),
92
+ 'post' => __( 'posts', 'all_in_one_seo_pack' ),
93
+ 'taxonomies' => __( 'taxonomies', 'all_in_one_seo_pack' ),
94
+ 'archive' => __( 'archive pages', 'all_in_one_seo_pack' ),
95
+ 'author' => __( 'author pages', 'all_in_one_seo_pack' ) ) as $opt => $val ) {
96
+ $arr = $$s;
97
+ $arr[ $k . '_' . $opt ] = Array( 'name' => $this->ucwords( $val ), 'help_text' => sprintf( __( "Manually set the %s of your %s.", 'all_in_one_seo_pack' ), $v, $val ), 'type' => 'select', 'initial_options' => $$k, 'default' => 'no' );
98
+ if ( ( $opt == 'archive' ) || ( $opt == 'author' ) ) $arr[ $k . '_' . $opt ][ 'condshow' ] = Array( $this->prefix . $opt => 'on' );
99
+ $$s = $arr;
100
+ }
101
+ }
102
+
103
+ $addl_options = Array(
104
+ 'addl_instructions' => Array( 'default' => '<div>' . __( 'Enter information below for any additional links for your sitemap not already managed through WordPress.', 'all_in_one_seo_pack' ) . '</div><br />', 'type' => 'html', 'label' => 'none', 'save' => false ),
105
+ 'addl_url' => Array( 'name' => __( 'Page URL', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'URL to the page.', 'all_in_one_seo_pack' ), 'label' => 'top', 'save' => false ),
106
+ 'addl_prio' => Array( 'name' => __( 'Page Priority', 'all_in_one_seo_pack' ), 'type' => 'select', 'help_text' => __( 'The priority of the page.', 'all_in_one_seo_pack' ), 'initial_options' => $prio, 'label' => 'top', 'save' => false ),
107
+ 'addl_freq' => Array( 'name' => __( 'Page Frequency', 'all_in_one_seo_pack' ), 'type' => 'select', 'help_text' => __( 'The frequency of the page.', 'all_in_one_seo_pack' ), 'initial_options' => $freq, 'label' => 'top', 'save' => false ),
108
+ 'addl_mod' => Array( 'name' => __( 'Last Modified', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Last modified date of the page.', 'all_in_one_seo_pack' ), 'label' => 'top', 'save' => false ),
109
+ 'addl_pages'=> Array( 'name' => __( 'Additional Pages', 'all_in_one_seo_pack' ), 'type' => 'custom', 'save' => true ),
110
+ 'Submit' => Array( 'type' => 'submit', 'class' => 'button-primary', 'name' => __( 'Add URL', 'all_in_one_seo_pack' ) . ' &raquo;', 'style' => 'margin-left: 20px;', 'label' => 'none', 'save' => false, 'value' => 1 )
111
+ );
112
+
113
+ $excl_options = Array(
114
+ 'excl_categories' => Array( 'name' => __( 'Excluded Categories', 'all_in_one_seo_pack' ), 'type' => 'multicheckbox', 'help_text' => __( 'Entries from these categories will be excluded from the sitemap.', 'all_in_one_seo_pack' ), 'initial_options' => '' ),
115
+ 'excl_pages' => Array( 'name' => __( 'Excluded Pages', 'all_in_one_seo_pack' ), 'type' => 'text', 'help_text' => __( 'Use page slugs or page IDs, seperated by commas, to exclude pages from the sitemap.', 'all_in_one_seo_pack' ) )
116
+ );
117
+
118
+ $this->layout['addl_pages'] = Array(
119
+ 'name' => __( 'Additional Pages', 'all_in_one_seo_pack' ),
120
+ 'options' => array_keys( $addl_options )
121
+ );
122
+
123
+ $this->layout['excl_pages'] = Array(
124
+ 'name' => __( 'Excluded Items', 'all_in_one_seo_pack' ),
125
+ 'options' => array_keys( $excl_options )
126
+ );
127
+
128
+ $this->layout['priorities'] = Array(
129
+ 'name' => __( 'Priorities', 'all_in_one_seo_pack' ),
130
+ 'options' => array_keys( $prio_options )
131
+ );
132
+
133
+ $this->layout['frequencies'] = Array(
134
+ 'name' => __( 'Frequencies', 'all_in_one_seo_pack' ),
135
+ 'options' => array_keys( $freq_options )
136
+ );
137
+
138
+ $this->default_options = array_merge( $status_options, $this->default_options, $addl_options, $excl_options, $prio_options, $freq_options );
139
+
140
+ // load initial options / set defaults
141
+ $this->update_options( );
142
+
143
+ if ( !empty( $this->options['aiosp_sitemap_paginate'] ) ) {
144
+ $this->paginate = true;
145
+ if ( ( $this->options['aiosp_sitemap_max_posts'] ) && ( $this->options['aiosp_sitemap_max_posts'] > 0 ) && ( $this->options['aiosp_sitemap_max_posts'] < 50000 ) )
146
+ $this->max_posts = $this->options['aiosp_sitemap_max_posts'];
147
+ }
148
+
149
+ if ( is_multisite() ) $this->options['aiosp_sitemap_rewrite'] = 'On';
150
+
151
+ if ( $this->options['aiosp_sitemap_rewrite'] ) $this->setup_rewrites();
152
+
153
+ if ( $this->option_isset( 'robots' ) )
154
+ add_action( 'do_robots', Array( $this, 'do_robots' ), 100 );
155
+
156
+ add_action( $this->prefix . 'settings_update', Array( $this, 'do_sitemaps' ) );
157
+ add_filter( $this->prefix . 'display_settings', Array( $this, 'update_post_data' ) );
158
+ add_filter( $this->prefix . 'display_options', Array( $this, 'filter_display_options' ) );
159
+ add_filter( $this->prefix . 'update_options', Array( $this, 'filter_options' ) );
160
+ add_filter( $this->prefix . 'output_option', Array( $this, 'display_custom_options' ), 10, 2 );
161
+ }
162
+
163
+ /** Custom settings - displays boxes for add pages to sitemap option. **/
164
+ function display_custom_options( $buf, $args ) {
165
+ if ( $args['name'] == 'aiosp_sitemap_addl_pages' ) {
166
+ $buf .= '<div id="aiosp_sitemap_addl_pages">';
167
+ if ( !empty( $args['value'] ) ) {
168
+ $buf .= "<table class='aioseop_table' cellpadding=0 cellspacing=0>\n";
169
+ foreach ( $args['value'] as $k => $v ) {
170
+ $buf .= "\t<tr><td><a href='#' title='$k' class='aiosp_delete_url'></a> {$k}</td><td>{$v['prio']}</td><td>{$v['freq']}</td><td>{$v['mod']}</td></tr>\n";
171
+ }
172
+ $buf .= "</table>\n";
173
+ }
174
+ }
175
+ $args['options']['type'] = 'hidden';
176
+ if ( !empty( $args['value'] ) )
177
+ $args['value'] = serialize( $args['value'] );
178
+ else
179
+ $args['options']['type'] = 'html';
180
+ $buf .= $this->get_option_html( $args );
181
+ $buf .= '</div>';
182
+ return $buf;
183
+ }
184
+
185
+ /** Add post type details for settings once post types have been registered. **/
186
+ function add_post_types() {
187
+ $post_type_titles = $this->get_post_type_titles( Array( 'public' => true ) );
188
+ if ( isset( $post_type_titles['attachment'] ) ) $post_type_titles['attachment'] = __( "Media / Attachments", 'all_in_one_seo_pack' );
189
+ $this->default_options['posttypes' ]['initial_options'] = array_merge( Array( 'all' => __( 'All Post Types', 'all_in_one_seo_pack' ) ), $post_type_titles );
190
+ $this->default_options['taxonomies']['initial_options'] = array_merge( Array( 'all' => __( 'All Taxonomies', 'all_in_one_seo_pack' ) ), $this->get_taxonomy_titles( Array( 'public' => true ) ) );
191
+ $this->default_options['posttypes' ]['default'] = array_keys( $this->default_options['posttypes' ]['initial_options'] );
192
+ $this->default_options['taxonomies']['default'] = array_keys( $this->default_options['taxonomies']['initial_options'] );
193
+ $this->default_options['excl_categories']['initial_options'] = $this->get_category_titles();
194
+ $this->update_options();
195
+ }
196
+
197
+ /** Set up settings, checking for sitemap conflicts, on settings page. **/
198
+ function add_page_hooks() {
199
+ $this->flush_rules_hook();
200
+ $this->add_post_types();
201
+ parent::add_page_hooks();
202
+ add_action( $this->prefix . 'settings_header', Array( $this, 'do_sitemap_scan' ), 5 );
203
+ add_filter( "{$this->prefix}submit_options", Array( $this, 'filter_submit' ) );
204
+ }
205
+
206
+ /** Change submit button to read "Update Sitemap". **/
207
+ function filter_submit( $submit ) {
208
+ $submit['Submit']['value'] = __( 'Update Sitemap', 'all_in_one_seo_pack' ) . ' &raquo;';
209
+ return $submit;
210
+ }
211
+
212
+ /** Disable writing sitemaps to the filesystem for multisite. **/
213
+ function update_post_data( $options ) {
214
+ if ( is_multisite() ) $options[ $this->prefix . 'rewrite' ]['disabled'] = 'disabled';
215
+ return $options;
216
+ }
217
+
218
+ function get_rewrite_url( $url ) {
219
+ global $wp_rewrite;
220
+ $url = parse_url( esc_url( $url ), PHP_URL_PATH );
221
+ $url = ltrim( $url, '/' );
222
+ if ( !empty( $wp_rewrite ) ) {
223
+ $rewrite_rules = $wp_rewrite->rewrite_rules();
224
+ foreach( $rewrite_rules as $k => $v ) {
225
+ if ( preg_match( "@^$k@", $url ) )
226
+ return $v;
227
+ }
228
+ }
229
+ return false;
230
+ }
231
+
232
+ /** Add in options for status display on settings page, sitemap rewriting on multisite. **/
233
+ function filter_display_options( $options ) {
234
+ if ( is_multisite() ) $options[ $this->prefix . 'rewrite'] = 'On';
235
+ if ( isset( $options[ $this->prefix . 'max_posts'] ) && ( ( $options[ $this->prefix . 'max_posts'] <= 0 ) || ( $options[ $this->prefix . 'max_posts'] >= 50000 ) ) )
236
+ $options[ $this->prefix . 'max_posts'] = 50000;
237
+ $url = trailingslashit( get_home_url() ) . $options[ $this->prefix . 'filename' ] . '.xml';
238
+ $options[ $this->prefix . 'link' ] = sprintf( __( "Please review your settings below and click %s to build your sitemap; then, %s.",
239
+ 'all_in_one_seo_pack' ), sprintf( '<a href="#" onclick="document.dofollow.elements[\'Submit\'][0].click();">%s</a>',
240
+ __( 'Update Sitemap', 'all_in_one_seo_pack' ) ), '<a href="' . esc_url( $url ) . '" target="_blank">' .
241
+ __( "view your sitemap", 'all_in_one_seo_pack' ) . "</a>" );
242
+ if ( $this->option_isset( 'rewrite' ) ) {
243
+
244
+ $options[ $this->prefix . 'link' ] .= '<p>' . __( "Note: you are using dynamic sitemap generation to keep your sitemap current; this will not generate a static sitemap file.", 'all_in_one_seo_pack' ) . '</p>';
245
+ $rule = $this->get_rewrite_url( $url );
246
+ $rules = $this->get_rewrite_rules();
247
+ if ( in_array( $rule, $rules ) )
248
+ $options[ $this->prefix . 'link' ] .= '<p>' . __( "Dynamic sitemap generation appears to be using the correct rewrite rules.", 'all_in_one_seo_pack' ) . '</p>';
249
+ else
250
+ $options[ $this->prefix . 'link' ] .= '<p>' . __( "Dynamic sitemap generation does not appear to be using the correct rewrite rules; please disable any other sitemap plugins or functionality on your site and reset your permalinks.", 'all_in_one_seo_pack' ) . '</p>';
251
+ }
252
+ if ( !get_option( 'blog_public' ) ) {
253
+ global $wp_version;
254
+ if ( ( version_compare( $wp_version, '3.5.0', '>=' ) ) || ( function_exists( 'set_url_scheme' ) ) ) {
255
+ $privacy_link = '<a href="options-reading.php">' . __( 'Reading Settings', 'all_in_one_seo_pack' ) . '</a>';
256
+ } else {
257
+ $privacy_link = '<a href="options-privacy.php">' . __( 'Privacy Settings', 'all_in_one_seo_pack' ) . '</a>';
258
+ }
259
+ $options[ $this->prefix . 'link' ] .= '<p class="aioseop_error_notice">' . sprintf( __( "Warning: your privacy settings are configured to ask search engines to not index your site; you can change this under %s for your blog.",
260
+ 'all_in_one_seo_pack' ), $privacy_link );
261
+ }
262
+ if ( $this->option_isset( 'debug' ) ) $options['aiosp_sitemap_debug'] = '<pre>' . $options['aiosp_sitemap_debug'] . '</pre>';
263
+ return $options;
264
+ }
265
+
266
+ /** Handle 'all' option for post types / taxonomies, further sanitization of filename, rewrites on for multisite, setting up addl pages option. **/
267
+ function filter_options( $options ) {
268
+ if ( is_array( $options['aiosp_sitemap_posttypes'] ) && in_array( 'all', $options['aiosp_sitemap_posttypes'] ) )
269
+ $options['aiosp_sitemap_posttypes'] = array_keys( $this->default_options['posttypes' ]['initial_options'] );
270
+ if ( is_array( $options['aiosp_sitemap_taxonomies'] ) && in_array( 'all', $options['aiosp_sitemap_taxonomies'] ) )
271
+ $options['aiosp_sitemap_taxonomies'] = array_keys( $this->default_options['taxonomies' ]['initial_options'] );
272
+ $opt = $this->prefix . 'filename';
273
+ if ( isset( $options[$opt] ) && !empty( $options[$opt] ) )
274
+ $options[$opt] = str_replace( '/', '', $options[$opt] );
275
+ else
276
+ $options[$opt] = 'sitemap';
277
+ if ( is_multisite() ) $options[ $this->prefix . 'rewrite'] = 'On';
278
+ if ( !is_array( $options[ $this->prefix . 'addl_pages' ] ) ) {
279
+ $options[ $this->prefix . 'addl_pages' ] = wp_specialchars_decode( stripslashes_deep( $options[ $this->prefix . 'addl_pages' ] ), ENT_QUOTES );
280
+ $options[ $this->prefix . 'addl_pages' ] = maybe_unserialize( $options[ $this->prefix . 'addl_pages' ] );
281
+ }
282
+ if ( !empty( $_POST[ $this->prefix . 'addl_url' ] ) ) {
283
+ foreach( Array( 'addl_url', 'addl_prio', 'addl_freq', 'addl_mod' ) as $field ) {
284
+ if ( !empty( $_POST[ $this->prefix . $field ] ) ) {
285
+ $_POST[ $this->prefix . $field ] = esc_attr( wp_kses_post( $_POST[ $this->prefix . $field ] ) );
286
+ } else {
287
+ $_POST[ $this->prefix . $field ] = '';
288
+ }
289
+ }
290
+ if ( !is_array( $options[ $this->prefix . 'addl_pages' ] ) ) $options[ $this->prefix . 'addl_pages' ] = Array();
291
+ $options[ $this->prefix . 'addl_pages' ][ $_POST[ $this->prefix . 'addl_url' ] ] = Array(
292
+ 'prio' => $_POST[ $this->prefix . 'addl_prio' ],
293
+ 'freq' => $_POST[ $this->prefix . 'addl_freq' ],
294
+ 'mod' => $_POST[ $this->prefix . 'addl_mod' ]
295
+ );
296
+ }
297
+ return $options;
298
+ }
299
+
300
+ /** Get sitemap urls of child blogs, if any. **/
301
+ function get_child_sitemap_urls() {
302
+ $siteurls = Array();
303
+ $blogs = $this->get_child_blogs();
304
+ if ( !empty( $blogs ) ) {
305
+ $option_name = $this->get_option_name();
306
+ foreach ( $blogs as $blog_id )
307
+ if ( $this->is_aioseop_active_on_blog( $blog_id ) ) {
308
+ $options = get_blog_option( $blog_id, $this->parent_option );
309
+ if ( !empty( $options ) && !empty($options['modules']) && !empty($options['modules']['aiosp_feature_manager_options'])
310
+ && !empty($options['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'])
311
+ && !empty($options['modules'][$option_name]) ) {
312
+ global $wpdb;
313
+ $sitemap_options = $options['modules'][$option_name];
314
+ $siteurl = '';
315
+ if ( defined( 'SUNRISE' ) && SUNRISE && is_object( $wpdb ) && isset( $wpdb->dmtable ) && !empty( $wpdb->dmtable ) ) {
316
+ $domain = $wpdb->get_var( "SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = '$blog_id' AND active = 1 LIMIT 1" );
317
+ if ( $domain ) {
318
+ if ( false == isset( $_SERVER[ 'HTTPS' ] ) )
319
+ $_SERVER[ 'HTTPS' ] = 'Off';
320
+ $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://';
321
+ $siteurl = untrailingslashit( $protocol . $domain );
322
+ }
323
+ }
324
+ if ( !$siteurl ) $siteurl = get_home_url( $blog_id );
325
+ $url = $siteurl . '/' . $sitemap_options["aiosp_sitemap_filename"] . '.xml';
326
+ if ( $sitemap_options['aiosp_sitemap_gzipped'] ) $url .= '.gz';
327
+ $siteurls[] = $url;
328
+ }
329
+ }
330
+ }
331
+ return apply_filters( $this->prefix . 'sitemap_urls', $siteurls );
332
+ }
333
+
334
+ /** Scan for sitemaps on filesystem. **/
335
+ function scan_match_files() {
336
+ $scan1 = $scan2 = '';
337
+ $files = Array();
338
+
339
+ if ( !empty( $this->options['aiosp_sitemap_filename'] ) ) {
340
+ $scan1 = get_home_path() . $this->options['aiosp_sitemap_filename'] . '*.xml';
341
+ if ( !empty( $this->options['aiosp_sitemap_gzipped'] ) )
342
+ $scan2 .= get_home_path() . $this->options['aiosp_sitemap_filename'] . '*.xml.gz';
343
+
344
+ if ( empty( $scan1 ) && empty( $scan2 ) ) return $files;
345
+ $home_path = get_home_path();
346
+ $filescan = $this->scandir( $home_path );
347
+ if ( !empty( $filescan ) )
348
+ foreach( $filescan as $f ) {
349
+ if ( !empty($scan1) && fnmatch($scan1, $home_path . $f ) ) {
350
+ $files[] = $home_path . $f;
351
+ continue;
352
+ }
353
+ if ( !empty($scan2) && fnmatch($scan2, $home_path . $f ) )
354
+ $files[] = $home_path . $f;
355
+ }
356
+
357
+ return $files;
358
+ }
359
+ }
360
+
361
+ /** Handle deleting / renaming of conflicting sitemap files. **/
362
+ function do_sitemap_scan() {
363
+ $msg = '';
364
+ if ( !empty( $this->options['aiosp_sitemap_rewrite'] ) && ( get_option('permalink_structure') == '' ) ) {
365
+ $msg = '<p>' . __( 'Warning: dynamic sitemap generation must have permalinks enabled.', 'all_in_one_seo_pack' ) . '</p>';
366
+ }
367
+ if ( !empty( $_POST['aioseop_sitemap_rename_files'] ) || !empty( $_POST['aioseop_sitemap_delete_files'] ) ) {
368
+ $nonce = $_POST['nonce-aioseop'];
369
+ if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( __( 'Security Check - If you receive this in error, log out and back in to WordPress', 'all_in_one_seo_pack' ) );
370
+ if ( !empty( $_POST['aioseop_sitemap_conflict'] ) ) {
371
+ $files = $this->scan_match_files();
372
+ foreach ( $files as $f => $file ) $files[$f] = realpath( $file );
373
+ foreach( $_POST['aioseop_sitemap_conflict'] as $ren_file ) {
374
+ $ren_file = realpath( get_home_path() . $ren_file );
375
+ if ( in_array( $ren_file, $files ) ) {
376
+ if ( !empty( $_POST['aioseop_sitemap_delete_files'] ) ) {
377
+ if ( $this->delete_file( $ren_file ) )
378
+ $msg .= "<p>" . sprintf( __( "Deleted %s.", 'all_in_one_seo_pack' ), $ren_file ) . "</p>";
379
+ continue;
380
+ }
381
+ $count = 0;
382
+ do {
383
+ $ren_to = $ren_file . '._' . sprintf( "%03d", $count ) . ".old";
384
+ $count++;
385
+ } while ( $this->file_exists( $ren_to ) && ( $count < 1000 ) );
386
+ if ( $count >= 1000 )
387
+ $msg .= "<p>" . sprintf( __( "Couldn't rename file %s!", 'all_in_one_seo_pack' ), $ren_file) . "</p>";
388
+ else {
389
+ $ren = $this->rename_file( $ren_file, $ren_to );
390
+ if ( $ren )
391
+ $msg .= "<p>" . sprintf( __( "Renamed %s to %s.", 'all_in_one_seo_pack' ), $ren_file, $ren_to) . "</p>";
392
+ }
393
+ } else $msg .= "<p>" . sprintf( __( "Couldn't find file %s!", 'all_in_one_seo_pack' ), $ren_file) . "</p>";
394
+ }
395
+ }
396
+ } else {
397
+ $msg .= $this->scan_sitemaps();
398
+ }
399
+
400
+ if ( !empty( $msg ) )
401
+ $this->output_error( $msg );
402
+ }
403
+
404
+ /** Do the scan, return the results. **/
405
+ function scan_sitemaps() {
406
+ $msg = '';
407
+ $files = $this->scan_match_files();
408
+ if ( !empty( $files ) ) $msg = $this->sitemap_warning( $files );
409
+ return $msg;
410
+ }
411
+
412
+ /** Get the list of potentially conflicting sitemap files. **/
413
+ function get_problem_files( $files, &$msg ) {
414
+ $problem_files = Array();
415
+ $use_wpfs = true;
416
+ $wpfs = $this->get_filesystem_object();
417
+ if ( !is_object( $wpfs ) ) {
418
+ $use_wpfs = false;
419
+ } else {
420
+ if ( $wpfs->method == 'direct' ) $use_wpfs = false;
421
+ }
422
+
423
+ foreach ( $files as $f ) {
424
+ if ( $this->is_file( $f ) ) {
425
+ $fn = $f;
426
+ $compressed = false;
427
+ if ( $this->substr( $f, -3 ) == '.gz' ) $compressed = true;
428
+ if ( $use_wpfs ) {
429
+ if ( $compressed ) { // inefficient but necessary
430
+ $file = $this->load_file( $fn );
431
+ if ( !empty( $file ) ) $file = gzuncompress( $file, 4096 );
432
+ } else {
433
+ $file = $this->load_file( $fn, false, null, -1, 4096 );
434
+ }
435
+ }
436
+ else {
437
+ if ( $compressed ) $fn = 'compress.zlib://' . $fn;
438
+ $file = file_get_contents( $fn, false, null, -1, 4096 );
439
+ }
440
+ if ( !empty( $file ) ) {
441
+ $matches = Array();
442
+ if ( preg_match( "/<!-- " . sprintf( $this->comment_string, '(.*)', '(.*)', '(.*)' ) . " -->/",
443
+ $file, $matches ) ) {
444
+ if ( !empty( $this->options['aiosp_sitemap_rewrite'] ) ) {
445
+ $msg .= '<p>' . sprintf( __( "Warning: a static sitemap '%s' generated by All in One SEO Pack %s on %s already exists that may conflict with dynamic sitemap generation.", 'all_in_one_seo_pack' ),
446
+ $f, $matches[2], $matches[3] ) . "</p>\n";
447
+ $problem_files[] = $f;
448
+ }
449
+ } else {
450
+ $msg .= '<p>' . sprintf( __( "Potential conflict with unknown file %s.", 'all_in_one_seo_pack' ), $f ) . "</p>\n";
451
+ $problem_files[] = $f;
452
+ }
453
+ }
454
+ }
455
+ }
456
+ return $problem_files;
457
+ }
458
+
459
+ /** Display the warning and the form for conflicting sitemap files. **/
460
+ function sitemap_warning( $files ) {
461
+ $msg = '';
462
+ $conflict = false;
463
+ $problem_files = $this->get_problem_files( $files, $msg );
464
+ if ( !empty( $problem_files ) ) $conflict = true;
465
+ if ( $conflict ) {
466
+ foreach ( $problem_files as $p )
467
+ $msg .= "<input type='hidden' name='aioseop_sitemap_conflict[]' value='" . esc_attr( basename ( realpath( $p ) ) ) . "'>\n";
468
+ $msg .= "<input type='hidden' name='nonce-aioseop' value='" . wp_create_nonce('aioseop-nonce') . "'>\n";
469
+ $msg .= "<input type='submit' name='aioseop_sitemap_rename_files' value='" . __( "Rename Conflicting Files", 'all_in_one_seo_pack' ) . "'> ";
470
+ $msg .= "<input type='submit' name='aioseop_sitemap_delete_files' value='" . __( "Delete Conflicting Files", 'all_in_one_seo_pack' ) . "'>";
471
+ $msg = '<form action="" method="post">' . $msg . '</form>';
472
+ }
473
+ return $msg;
474
+ }
475
+
476
+ /** Updates debug log messages. **/
477
+ function debug_message( $msg ) {
478
+ if ( empty( $this->options["aiosp_sitemap_debug"] ) ) $this->options["aiosp_sitemap_debug"] = '';
479
+ $this->options["aiosp_sitemap_debug"] = date( 'Y-m-d H:i:s' ) . " {$msg}\n" . $this->options["aiosp_sitemap_debug"];
480
+ if ( $this->strlen( $this->options["aiosp_sitemap_debug"] ) > 2048 ) {
481
+ $end = $this->strrpos( $this->options["aiosp_sitemap_debug"], "\n" );
482
+ if ( $end === false ) $end = 2048;
483
+ $this->options["aiosp_sitemap_debug"] = $this->substr( $this->options["aiosp_sitemap_debug"], 0, $end );
484
+ }
485
+ $this->update_class_option( $this->options );
486
+ }
487
+
488
+ /** Set up hooks for rewrite rules for dynamic sitemap generation. **/
489
+ function setup_rewrites() {
490
+ add_action( 'rewrite_rules_array', Array( $this, 'rewrite_hook' ) );
491
+ add_filter( 'query_vars', Array( $this, 'query_var_hook' ) );
492
+ add_action( 'parse_query', Array( $this, 'sitemap_output_hook') );
493
+ if ( !get_transient( 'aiosp_sitemap_rules_flushed' ) )
494
+ add_action( 'wp_loaded', Array($this, 'flush_rules_hook' ) );
495
+ }
496
+
497
+ /** Build and return our rewrite rules. **/
498
+ function get_rewrite_rules() {
499
+ $sitemap_rules_normal = $sitemap_rules_gzipped = Array();
500
+ $sitemap_rules_normal = array(
501
+ $this->options["aiosp_sitemap_filename"] . '.xml' => 'index.php?aioseop_sitemap_path=root',
502
+ $this->options["aiosp_sitemap_filename"] . '_(.+)_(\d+).xml'=> 'index.php?aioseop_sitemap_path=$matches[1]&aioseop_sitemap_page=$matches[2]',
503
+ $this->options["aiosp_sitemap_filename"] . '_(.+).xml' => 'index.php?aioseop_sitemap_path=$matches[1]'
504
+ );
505
+ if ( $this->options['aiosp_sitemap_gzipped'] ) {
506
+ $sitemap_rules_gzipped = array(
507
+ $this->options["aiosp_sitemap_filename"] . '.xml.gz' => 'index.php?aiosp_sitemap_gzipped=1&aioseop_sitemap_path=root.gz',
508
+ $this->options["aiosp_sitemap_filename"] . '_(.+)_(\d+).xml.gz' => 'index.php?aioseop_sitemap_path=$matches[1].gz&aioseop_sitemap_page=$matches[2]',
509
+ $this->options["aiosp_sitemap_filename"] . '_(.+).xml.gz' => 'index.php?aioseop_sitemap_path=$matches[1].gz'
510
+ );
511
+ }
512
+ $sitemap_rules = $sitemap_rules_gzipped + $sitemap_rules_normal;
513
+ return $sitemap_rules;
514
+ }
515
+
516
+ /** Add in our rewrite rules. **/
517
+ function rewrite_hook( $rules ) {
518
+ $sitemap_rules = $this->get_rewrite_rules();
519
+ if ( !empty( $sitemap_rules ) )
520
+ $rules = $sitemap_rules + $rules;
521
+ return $rules;
522
+ }
523
+
524
+ /** Flush rewrite rules when necessary. **/
525
+ function flush_rules_hook() {
526
+ global $wp_rewrite;
527
+ $sitemap_rules = $this->get_rewrite_rules( $wp_rewrite );
528
+ if ( !empty( $sitemap_rules ) ) {
529
+ $rules = get_option( 'rewrite_rules' );
530
+ $rule = key( $sitemap_rules );
531
+ if ( !isset( $rules[ $rule ] ) || ( $rules[ $rule ] != $sitemap_rules[ $rule ] ) ) {
532
+ $wp_rewrite->flush_rules();
533
+ set_transient( 'aiosp_sitemap_rules_flushed', true, 43200 );
534
+ }
535
+ }
536
+ }
537
+
538
+ /** Add our query variable for sitemap generation. **/
539
+ function query_var_hook($vars) {
540
+ $vars[] = 'aioseop_sitemap_path';
541
+ if ( $this->paginate )
542
+ $vars[] = 'aioseop_sitemap_page';
543
+ return $vars;
544
+ }
545
+
546
+ /** Start timing and get initial memory usage for debug info. **/
547
+ function log_start() {
548
+ $this->start_memory_usage = memory_get_peak_usage();
549
+ timer_start();
550
+ }
551
+
552
+ /** Stop timing and log memory usage for debug info. **/
553
+ function log_stats( $sitemap_type = 'root', $compressed = false, $dynamic = true ) {
554
+ $time = timer_stop();
555
+ $end_memory_usage = memory_get_peak_usage();
556
+ $sitemap_memory_usage = $end_memory_usage - $this->start_memory_usage;
557
+ $end_memory_usage = $end_memory_usage / 1024.0 / 1024.0;
558
+ $sitemap_memory_usage = $sitemap_memory_usage / 1024.0 / 1024.0;
559
+ if ( $compressed ) $sitemap_type = __( 'compressed', 'all_in_one_seo_pack' ) . " $sitemap_type";
560
+ if ( $dynamic )
561
+ $sitemap_type = __( 'dynamic', 'all_in_one_seo_pack ') . " $sitemap_type";
562
+ else
563
+ $sitemap_type = __( 'static', 'all_in_one_seo_pack ') . " $sitemap_type";
564
+ $this->debug_message( sprintf( " %01.2f MB memory used generating the %s sitemap in %01.3f seconds, %01.2f MB total memory used.", $sitemap_memory_usage, $sitemap_type, $time, $end_memory_usage ) );
565
+ }
566
+
567
+ /** Handle outputting of dynamic sitemaps, logging. **/
568
+ function sitemap_output_hook($query) {
569
+ $page = 0;
570
+ if ( ( $this->options['aiosp_sitemap_rewrite'] ) )
571
+ if( !empty( $query->query_vars['aioseop_sitemap_path'] ) ) {
572
+ if( !empty( $query->query_vars['aioseop_sitemap_page'] ) )
573
+ $page = $query->query_vars['aioseop_sitemap_page'] - 1;
574
+ $this->start_memory_usage = memory_get_peak_usage();
575
+ $sitemap_type = $query->query_vars['aioseop_sitemap_path'];
576
+ $gzipped = false;
577
+ if ( $this->substr( $sitemap_type, -3 ) === '.gz' ) {
578
+ $gzipped = true;
579
+ $sitemap_type = $this->substr( $sitemap_type, 0, -3 );
580
+ }
581
+ $blog_charset = get_option( 'blog_charset' );
582
+ if ( $this->options['aiosp_sitemap_gzipped'] && $gzipped ) {
583
+ header( "Content-Type: application/x-gzip; charset=$blog_charset", true);
584
+ } else {
585
+ $gzipped = false;
586
+ header( "Content-Type: text/xml; charset=$blog_charset", true );
587
+ }
588
+ if ( $gzipped ) ob_start();
589
+ $this->do_rewrite_sitemap( $sitemap_type, $page );
590
+ if ( $gzipped ) echo gzencode( ob_get_clean() );
591
+ $this->log_stats( $sitemap_type, $gzipped );
592
+ exit();
593
+ }
594
+ }
595
+
596
+ /** Output sitemaps dynamically based on rewrite rules. **/
597
+ function do_rewrite_sitemap( $sitemap_type, $page = 0 ) {
598
+ $this->add_post_types();
599
+ $comment = __( "dynamically", 'all_in_one_seo_pack' );
600
+ if ( $this->options['aiosp_sitemap_indexes'] ) {
601
+ $posttypes = $this->options['aiosp_sitemap_posttypes'];
602
+ if ( empty( $posttypes ) ) $posttypes = Array();
603
+ $taxonomies = $this->options['aiosp_sitemap_taxonomies'];
604
+ if ( empty( $taxonomies ) ) $taxonomies = Array();
605
+ if ( $sitemap_type === 'root' ) {
606
+ $this->output_sitemap_index( array_merge( $this->get_sitemap_index_filenames() ), $comment );
607
+ } elseif ( $sitemap_type === 'addl' ) {
608
+ $this->output_sitemap( $this->get_addl_pages(), $comment );
609
+ } elseif ( $sitemap_type === 'archive' && $this->option_isset( 'archive' ) ) {
610
+ $this->output_sitemap( $this->get_archive_prio_data(), $comment );
611
+ } elseif ( $sitemap_type === 'author' && $this->option_isset( 'author' ) ) {
612
+ $this->output_sitemap( $this->get_author_prio_data(), $comment );
613
+ } elseif ( in_array( $sitemap_type, $posttypes ) ) {
614
+ $this->output_sitemap( $this->get_all_post_priority_data( $sitemap_type, 'publish', $page ), $comment );
615
+ } elseif ( in_array( $sitemap_type, $taxonomies ) ) {
616
+ $this->output_sitemap( $this->get_term_priority_data( get_terms( $sitemap_type, $this->get_tax_args() ) ), $comment );
617
+ }
618
+ } elseif ( $sitemap_type === 'root' ) echo $this->do_simple_sitemap( $comment );
619
+ }
620
+
621
+ /** Build a url to the sitemap. **/
622
+ function get_sitemap_url() {
623
+ $url = get_home_url() . '/' . $this->options["aiosp_sitemap_filename"] . '.xml';
624
+ if ( $this->options['aiosp_sitemap_gzipped'] ) $url .= '.gz';
625
+ return $url;
626
+ }
627
+
628
+ /** Notify search engines, do logging. **/
629
+ function do_notify() {
630
+ $notify_url = Array( 'google' => 'http://www.google.com/webmasters/sitemaps/ping?sitemap=',
631
+ 'bing' => 'http://www.bing.com/webmaster/ping.aspx?siteMap='
632
+ );
633
+
634
+ $url = $this->get_sitemap_url();
635
+ if ( !empty( $url ) )
636
+ foreach ( $notify_url as $k => $v )
637
+ if ( isset( $this->options[$this->prefix . $k] ) && $this->options[$this->prefix . $k] ) {
638
+ $response = wp_remote_get( $notify_url[$k] . urlencode( $url ) );
639
+ if ( is_array( $response ) && !empty( $response['response'] ) && !empty( $response['response']['code'] ) ) {
640
+ if ( $response['response']['code'] == 200 ) {
641
+ $this->debug_message( sprintf( __( 'Successfully notified %s about changes to your sitemap at %s.', 'all_in_one_seo_pack' ), $k, $url ) );
642
+ } else {
643
+ $this->debug_message( sprintf( __( 'Failed to notify %s about changes to your sitemap at %s, error code %s.', 'all_in_one_seo_pack' ), $k, $url, $response['response']['code'] ) );
644
+ }
645
+ } else {
646
+ $this->debug_message( sprintf( __( 'Failed to notify %s about changes to your sitemap at %s, unable to access via wp_remote_get().', 'all_in_one_seo_pack' ), $k, $url ) );
647
+ }
648
+ } else {
649
+ $this->debug_message( sprintf( __( 'Did not notify %s about changes to your sitemap.', 'all_in_one_seo_pack' ), $k, $url ) );
650
+ }
651
+ }
652
+
653
+ /** Add Sitemap parameter to virtual robots.txt file. **/
654
+ function do_robots() {
655
+ $url = $this->get_sitemap_url();
656
+ echo "\nSitemap: $url\n";
657
+ }
658
+
659
+ /** Build static sitemaps on submit if rewrite rules are not in use, do logging. **/
660
+ function do_sitemaps() {
661
+ if ( !empty( $this->options['aiosp_sitemap_paginate'] ) ) {
662
+ $this->paginate = true;
663
+ if ( ( $this->options['aiosp_sitemap_max_posts'] ) && ( $this->options['aiosp_sitemap_max_posts'] > 0 ) && ( $this->options['aiosp_sitemap_max_posts'] < 50000 ) )
664
+ $this->max_posts = $this->options['aiosp_sitemap_max_posts'];
665
+ else
666
+ $this->max_posts = 50000;
667
+ } else {
668
+ $this->paginate = false;
669
+ $this->max_posts = 50000;
670
+ }
671
+ if ( !$this->options['aiosp_sitemap_rewrite'] ) {
672
+ if ( $this->options['aiosp_sitemap_indexes'] ) {
673
+ $this->do_indexed_sitemaps();
674
+ } else {
675
+ $this->log_start();
676
+ $comment = sprintf( __( "file '%s' statically", 'all_in_one_seo_pack' ), $this->options['aiosp_sitemap_filename'] );
677
+ $sitemap = $this->do_simple_sitemap( $comment );
678
+ $this->write_sitemaps( $this->options['aiosp_sitemap_filename'], $sitemap );
679
+ $this->log_stats( 'root', $this->options['aiosp_sitemap_gzipped'], false );
680
+ }
681
+ } else {
682
+ delete_transient( 'aiosp_sitemap_rules_flushed' );
683
+ }
684
+ $this->do_notify();
685
+ $this->debug_message( __( 'Updated sitemap settings.', 'all_in_one_seo_pack' ) );
686
+ }
687
+
688
+ /** Write sitemaps (compressed or otherwise) to the filesystem. **/
689
+ function write_sitemaps( $filename, $contents ) {
690
+ $this->write_sitemap( $filename . ".xml", $contents );
691
+ if ( $this->options['aiosp_sitemap_gzipped'] ) $this->write_sitemap( $filename . ".xml.gz", $contents, true );
692
+ }
693
+
694
+ /** Write a single sitemap to the filesystem, handle compression. **/
695
+ function write_sitemap($filename, $contents, $gzip = false) {
696
+ if ( $gzip ) $contents = gzencode( $contents );
697
+ $filename = get_home_path() . sanitize_file_name( $filename );
698
+ return $this->save_file( $filename, $contents );
699
+ }
700
+
701
+ /** Get priority settings for sitemap entries. **/
702
+ function get_default_priority( $item, $nodefaults = false ) {
703
+ $defaults = Array( 'homepage' => '1.0', 'blog' => '0.9', 'sitemap' => '0.8', 'post' => '0.7', 'archive' => '0.5', 'author' => '0.3', 'taxonomies' => '0.3' );
704
+ static $cache = Array();
705
+ if ( !empty( $cache[ $item ] ) ) return $cache[ $item ];
706
+ if ( !empty( $defaults[ $item ] ) ) {
707
+ $field = $this->prefix . 'prio_' . $item;
708
+ if ( $this->option_isset( 'prio_' . $item ) && $this->options[ $field ] != 'no' ) {
709
+ $cache[ $item ] = $this->options[ $field ];
710
+ return $this->options[ $field ];
711
+ }
712
+ if ( $nodefaults ) return false;
713
+ return $defaults[ $item ];
714
+ }
715
+ return false;
716
+ }
717
+
718
+ /** Get frequency settings for sitemap entries. **/
719
+ function get_default_frequency( $item, $nodefaults = false ) {
720
+ $defaults = Array( 'homepage' => 'always', 'blog' => 'daily', 'sitemap' => 'hourly', 'post' => 'weekly', 'archive' => 'monthly', 'author' => 'weekly', 'taxonomies' => 'monthly' );
721
+ static $cache = Array();
722
+ if ( !empty( $cache[ $item ] ) ) return $cache[ $item ];
723
+ if ( !empty( $defaults[ $item ] ) ) {
724
+ $field = $this->prefix . 'freq_' . $item;
725
+ if ( $this->option_isset( 'freq_' . $item ) && $this->options[ $field ] != 'no' ) {
726
+ $cache[ $item ] = $this->options[ $field ];
727
+ return $this->options[ $field ];
728
+ }
729
+ if ( $nodefaults ) return false;
730
+ return $defaults[ $item ];
731
+ }
732
+ return false;
733
+ }
734
+
735
+ /** Build an index of sitemaps used. **/
736
+ function get_sitemap_index_filenames() {
737
+ $files = Array();
738
+ $options = $this->options;
739
+ $prefix = $options["aiosp_sitemap_filename"];
740
+ $suffix = '.xml';
741
+ if ( $options['aiosp_sitemap_gzipped'] ) $suffix .= '.gz';
742
+ if ( empty( $options['aiosp_sitemap_posttypes'] ) ) $options['aiosp_sitemap_posttypes'] = Array();
743
+ if ( empty( $options['aiosp_sitemap_taxonomies'] ) ) $options['aiosp_sitemap_taxonomies'] = Array();
744
+ $options['aiosp_sitemap_posttypes'] = array_diff( $options['aiosp_sitemap_posttypes'], Array( 'all' ) );
745
+ $options['aiosp_sitemap_taxonomies'] = array_diff( $options['aiosp_sitemap_taxonomies'], Array( 'all' ) );
746
+ $url_base = trailingslashit( get_home_url() );
747
+ $files[] = Array( 'loc' => $url_base . $prefix . '_addl' . $suffix );
748
+ if ( !empty( $options['aiosp_sitemap_posttypes'] ) ) {
749
+ $prio = $this->get_default_priority( 'post' );
750
+ $freq = $this->get_default_frequency( 'post' );
751
+ if ( $this->paginate ) {
752
+ $post_counts = $this->get_all_post_counts( Array('post_type' => $options['aiosp_sitemap_posttypes'], 'post_status' => 'publish') );
753
+ }
754
+ foreach( $options['aiosp_sitemap_posttypes'] as $sm ) {
755
+ if ( $this->paginate ) {
756
+ if ( $post_counts[$sm] > $this->max_posts ) {
757
+ $count = 1;
758
+ for( $post_count = 0; $post_count < $post_counts[$sm]; $post_count += $this->max_posts ) {
759
+ $files[] = Array( 'loc' => $url_base . $prefix . '_' . $sm . '_' . ( $count++ ) . $suffix, 'priority' => $prio, 'changefreq' => $freq );
760
+ }
761
+ } else $files[] = Array( 'loc' => $url_base . $prefix . '_' . $sm . $suffix, 'priority' => $prio, 'changefreq' => $freq );
762
+ } else
763
+ $files[] = Array( 'loc' => $url_base . $prefix . '_' . $sm . $suffix, 'priority' => $prio, 'changefreq' => $freq );
764
+ }
765
+
766
+ }
767
+ if ( $this->option_isset( 'archive' ) )
768
+ $files[] = Array( 'loc' => $url_base . $prefix . '_archive' . $suffix, 'priority' => $this->get_default_priority( 'archive' ), 'changefreq' => $this->get_default_frequency( 'archive' ) );
769
+ if ( $this->option_isset( 'author' ) )
770
+ $files[] = Array( 'loc' => $url_base . $prefix . '_author' . $suffix, 'priority' => $this->get_default_priority( 'author' ), 'changefreq' => $this->get_default_frequency( 'author' ) );
771
+ if ( !empty( $options['aiosp_sitemap_taxonomies'] ) )
772
+ foreach( $options['aiosp_sitemap_taxonomies'] as $sm )
773
+ $files[] = Array( 'loc' => $url_base . $prefix . '_' . $sm . $suffix, 'priority' => $this->get_default_priority( 'taxonomies' ), 'changefreq' => $this->get_default_frequency( 'taxonomies' ) );
774
+ foreach( $this->get_child_sitemap_urls() as $csm )
775
+ $files[] = Array( 'loc' => $csm, 'priority' => $this->get_default_priority( 'sitemap' ), 'changefreq' => $this->get_default_frequency( 'sitemap' ) );
776
+ return $files;
777
+ }
778
+
779
+ /** Build all the indexes. **/
780
+ function do_indexed_sitemaps() {
781
+ $this->start_memory_usage = memory_get_peak_usage();
782
+ $options = $this->options;
783
+ $comment = __( "file '%s' statically", 'all_in_one_seo_pack' );
784
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'],
785
+ $this->build_sitemap_index( $this->get_sitemap_index_filenames() ), sprintf( $comment, $options['aiosp_sitemap_filename'] ) );
786
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_addl",
787
+ $this->build_sitemap( $this->get_addl_pages(), sprintf( $comment, $options['aiosp_sitemap_filename'] . "_addl" ) ) );
788
+ if ( ( !isset( $options['aiosp_sitemap_posttypes'] ) ) || ( !is_array( $options['aiosp_sitemap_posttypes'] ) ) ) $options['aiosp_sitemap_posttypes'] = Array();
789
+ if ( ( !isset( $options['aiosp_sitemap_taxonomies'] ) ) || ( !is_array( $options['aiosp_sitemap_taxonomies'] ) ) ) $options['aiosp_sitemap_taxonomies'] = Array();
790
+ $options['aiosp_sitemap_posttypes'] = array_diff( $options['aiosp_sitemap_posttypes'], Array( 'all' ) );
791
+ $options['aiosp_sitemap_taxonomies'] = array_diff( $options['aiosp_sitemap_taxonomies'], Array( 'all' ) );
792
+
793
+ if ( !empty( $options['aiosp_sitemap_posttypes'] ) ) {
794
+ if ( $this->paginate )
795
+ $post_counts = $this->get_all_post_counts( Array('post_type' => $options['aiosp_sitemap_posttypes'], 'post_status' => 'publish') );
796
+ foreach ( $options['aiosp_sitemap_posttypes'] as $posttype ) {
797
+ if ( $this->paginate && ( $post_counts[$posttype] > $this->max_posts ) ) {
798
+ $count = 1;
799
+ for( $post_count = 0; $post_count < $post_counts[$posttype]; $post_count += $this->max_posts ) {
800
+ $comment = sprintf( $comment, $options['aiosp_sitemap_filename'] . "_{$posttype}_{$count}" );
801
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_{$posttype}_{$count}",
802
+ $this->build_sitemap( $this->get_all_post_priority_data( $posttype, 'publish', ( $count - 1 ) ), $comment ) );
803
+ $count++;
804
+ }
805
+ } else {
806
+ $comment = sprintf( $comment, $options['aiosp_sitemap_filename'] . "_$posttype" );
807
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_$posttype",
808
+ $this->build_sitemap( $this->get_all_post_priority_data( $posttype ), $comment ) );
809
+ }
810
+ }
811
+ }
812
+
813
+ if ( $this->option_isset( 'archive') ) {
814
+ $comment = sprintf( $comment, $options['aiosp_sitemap_filename'] . "_archive" );
815
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_archive",
816
+ $this->build_sitemap( $this->get_archive_prio_data(), $comment ) );
817
+ }
818
+ if ( $this->option_isset( 'author') ) {
819
+ $comment = sprintf( $comment, $options['aiosp_sitemap_filename'] . "_author" );
820
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_author",
821
+ $this->build_sitemap( $this->get_author_prio_data(), $comment ) );
822
+ }
823
+ if ( !empty( $options['aiosp_sitemap_taxonomies'] ) )
824
+ foreach ( $options['aiosp_sitemap_taxonomies'] as $taxonomy ) {
825
+ $comment = sprintf( $comment, $options['aiosp_sitemap_filename'] . "_$taxonomy" );
826
+ $this->write_sitemaps( $options['aiosp_sitemap_filename'] . "_$taxonomy",
827
+ $this->build_sitemap( $this->get_term_priority_data( get_terms( $taxonomy, $this->get_tax_args() ), $comment ) ) );
828
+ }
829
+ $this->log_stats( 'indexed', $options['aiosp_sitemap_gzipped'], false );
830
+ }
831
+
832
+ /** Build a single, stand-alone sitemap without indexes. **/
833
+ function do_simple_sitemap( $comment = '' ) {
834
+ $home = Array(
835
+ 'loc' => get_home_url(),
836
+ 'priority' => $this->get_default_priority( 'homepage' ),
837
+ 'changefreq' => $this->get_default_frequency( 'homepage' )
838
+ );
839
+ $posts = get_option( 'page_for_posts' );
840
+ if ( $posts ) {
841
+ $posts = $this->get_permalink( $posts );
842
+ if ( $posts == $home['loc'] )
843
+ $posts = null;
844
+ else
845
+ $posts = Array(
846
+ 'loc' => $posts,
847
+ 'priority' => $this->get_default_priority( 'blog' ),
848
+ 'changefreq' => $this->get_default_frequency( 'blog' )
849
+ );
850
+ }
851
+ $child = $this->get_child_sitemap_urls();
852
+ $options = $this->options;
853
+ if ( is_array( $options['aiosp_sitemap_posttypes'] ) )
854
+ $options['aiosp_sitemap_posttypes'] = array_diff( $options['aiosp_sitemap_posttypes'], Array( 'all' ) );
855
+ if ( is_array( $options['aiosp_sitemap_taxonomies'] ) )
856
+ $options['aiosp_sitemap_taxonomies'] = array_diff( $options['aiosp_sitemap_taxonomies'], Array( 'all' ) );
857
+ $prio = $this->get_all_post_priority_data( $options['aiosp_sitemap_posttypes'] );
858
+ if ( $this->option_isset( 'archive' ) ) $prio = array_merge( $prio, $this->get_archive_prio_data() );
859
+ if ( $this->option_isset( 'author' ) ) $prio = array_merge( $prio, $this->get_author_prio_data() );
860
+ foreach ( $prio as $k => $p )
861
+ if ( untrailingslashit( $p['loc'] ) == untrailingslashit( $home['loc'] ) ) {
862
+ $prio[$k]['priority'] = '1.0';
863
+ $home = null;
864
+ break;
865
+ }
866
+ if ( ( $posts != null ) && isset( $posts['loc'] ) )
867
+ foreach ( $prio as $k => $p )
868
+ if ( $p['loc'] == $posts['loc'] ) {
869
+ $prio[$k]['priority'] = $this->get_default_priority( 'blog' );
870
+ $prio[$k]['changefreq'] = $this->get_default_frequency( 'blog' );
871
+ $posts = null;
872
+ break;
873
+ }
874
+ if ( is_array( $posts ) ) array_unshift( $prio, $posts );
875
+ if ( is_array( $home ) ) array_unshift( $prio, $home );
876
+ $terms = get_terms( $options['aiosp_sitemap_taxonomies'], $this->get_tax_args() );
877
+ $prio2 = $this->get_term_priority_data( $terms );
878
+ $prio3 = $this->get_addl_pages_only();
879
+ $prio = array_merge( $child, $prio, $prio2, $prio3 );
880
+ return $this->build_sitemap( $prio, $comment );
881
+ }
882
+
883
+ /** Output the XML for a sitemap. **/
884
+ function output_sitemap( $urls, $comment = '' ) {
885
+ $max_items = 50000;
886
+ if ( !is_array( $urls ) ) return null;
887
+ echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n\r\n";
888
+ echo "<!-- " . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date('D, d M Y H:i:s e') ) . " -->\r\n";
889
+ echo '<?xml-stylesheet type="text/xsl" href="' . $this->plugin_path['url'] . 'sitemap.xsl"?>' . "\r\n";
890
+ echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\r\n";
891
+ $count = 0;
892
+ foreach ( $urls as $url ) {
893
+ echo "\t<url>\r\n";
894
+ if ( is_array( $url ) ) {
895
+ foreach ( $url as $k => $v ) {
896
+ if ( !empty( $v ) ) {
897
+ if ( $k == 'loc' ) $v = esc_url( $v );
898
+ echo "\t\t<$k>$v</$k>\r\n";
899
+ }
900
+ }
901
+ } else {
902
+ echo "\t\t<loc>" . esc_url( $url ) . "</loc>\r\n";
903
+ }
904
+ echo "\t</url>\r\n";
905
+ $count++;
906
+ if ( $count >= $max_items ) break;
907
+ }
908
+ echo '</urlset>';
909
+ }
910
+
911
+ /** Output the XML for a sitemap index. **/
912
+ function output_sitemap_index( $urls, $comment = '' ) {
913
+ $max_items = 50000;
914
+ if ( !is_array( $urls ) ) return null;
915
+ echo '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n\r\n";
916
+ echo "<!-- " . sprintf( $this->comment_string, $comment, AIOSEOP_VERSION, date('D, d M Y H:i:s e') ) . " -->\r\n";
917
+ echo '<?xml-stylesheet type="text/xsl" href="' . $this->plugin_path['url'] . 'sitemap.xsl"?>' . "\r\n";
918
+ echo '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . "\r\n";
919
+ $count = 0;
920
+ foreach ( $urls as $url ) {
921
+ echo "\t<sitemap>\r\n";
922
+ if ( is_array( $url ) ) {
923
+ foreach ( $url as $k => $v ) {
924
+ if ( $k == 'loc' ) {
925
+ echo "\t\t<$k>" . esc_url( $v ) . "</$k>\r\n";
926
+ } elseif ( $k == 'lastmod' ) {
927
+ echo "\t\t<$k>$v</$k>\r\n";
928
+ }
929
+ }
930
+ } else {
931
+ echo "\t\t<loc>" . esc_url( $url ) . "</loc>\r\n";
932
+ }
933
+ echo "\t</sitemap>\r\n";
934
+ $count++;
935
+ if ( $count >= $max_items ) break;
936
+ }
937
+ echo '</sitemapindex>';
938
+ }
939
+
940
+ /** Return an XML sitemap index as a string. **/
941
+ function build_sitemap_index( $urls, $comment = '' ) {
942
+ ob_start();
943
+ $this->output_sitemap_index( $urls, $comment );
944
+ return ob_get_clean();
945
+ }
946
+
947
+ /** Return an XML sitemap as a string. **/
948
+ function build_sitemap( $urls, $comment = '' ) {
949
+ ob_start();
950
+ $this->output_sitemap( $urls, $comment );
951
+ return ob_get_clean();
952
+ }
953
+
954
+ /** Return sitemap data for an array of terms. **/
955
+ function get_term_priority_data( $terms ) {
956
+ $prio = Array();
957
+ if (is_array( $terms ) ) {
958
+ $f = $this->get_default_frequency( 'taxonomies' );
959
+ $p = $this->get_default_priority( 'taxonomies' );
960
+ foreach ($terms as $term) {
961
+ $url = $this->get_term_link( $term, $term->taxonomy );
962
+ $prio[] = Array(
963
+ 'loc' => $url,
964
+ 'changefreq' => $f,
965
+ 'priority' => $p
966
+ );
967
+ }
968
+ }
969
+ return $prio;
970
+ }
971
+
972
+ /** Return a list of permalinks for an array of terms. **/
973
+ function get_term_permalinks( $terms ) {
974
+ $links = Array();
975
+ if (is_array($terms)) {
976
+ foreach ($terms as $term) {
977
+ $url = $this->get_term_link( $term );
978
+ $links[] = $url;
979
+ }
980
+ }
981
+ return $links;
982
+ }
983
+
984
+ /** Return permalinks for archives. **/
985
+ function get_archive_permalinks( $posts ) {
986
+ $links = Array();
987
+ $archives = Array();
988
+ if (is_array( $posts) )
989
+ foreach ( $posts as $post ) {
990
+ $date = mysql2date( 'U', $post->post_date );
991
+ $year = date( 'Y', $date );
992
+ $month = date( 'm', $date );
993
+ $archives[ $year . '-' . $month ] = Array( $year, $month );
994
+ }
995
+ $archives = array_keys( $archives );
996
+ foreach( $archives as $d ) $links[] = get_month_link( $d[0], $d[1] );
997
+ return $links;
998
+ }
999
+
1000
+ /** Return permalinks for authors. **/
1001
+ function get_author_permalinks( $posts ) {
1002
+ $links = Array();
1003
+ $authors = Array();
1004
+ if (is_array( $posts) )
1005
+ foreach ( $posts as $post )
1006
+ $authors[ $post->author_id ] = 1;
1007
+ $authors = array_keys( $authors );
1008
+ foreach( $authors as $auth_id ) $links[] = get_author_posts_url( $auth_id );
1009
+ return $links;
1010
+ }
1011
+
1012
+ /** Return permalinks for posts. **/
1013
+ function get_post_permalinks( $posts ) {
1014
+ $links = Array();
1015
+ if (is_array( $posts) )
1016
+ foreach ( $posts as $post ) {
1017
+ $post->filter = "sample";
1018
+ $url = $this->get_permalink( $post );
1019
+ $links[] = $url;
1020
+ }
1021
+ return $links;
1022
+ }
1023
+
1024
+ /** Convert back from parse_url -- props to thomas at gielfeldt dot com, http://www.php.net/manual/en/function.parse-url.php#106731 **/
1025
+ function unparse_url($parsed_url) {
1026
+ $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
1027
+ $host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
1028
+ $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
1029
+ $user = isset($parsed_url['user']) ? $parsed_url['user'] : '';
1030
+ $pass = isset($parsed_url['pass']) ? ':' . $parsed_url['pass'] : '';
1031
+ $pass = ($user || $pass) ? "$pass@" : '';
1032
+ $path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
1033
+ $query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
1034
+ $fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';
1035
+ return "$scheme$user$pass$host$port$path$query$fragment";
1036
+ }
1037
+
1038
+ /** Return data for user entered additional pages. **/
1039
+ function get_addl_pages_only() {
1040
+ $pages = Array();
1041
+ if ( !empty( $this->options[ $this->prefix . 'addl_pages' ] ) ) {
1042
+ $siteurl = parse_url( get_home_url() );
1043
+ foreach( $this->options[ $this->prefix . 'addl_pages' ] as $k => $v ) {
1044
+ $url = parse_url( $k );
1045
+ if ( empty( $url['scheme'] ) ) $url['scheme'] = $siteurl['scheme'];
1046
+ if ( empty( $url['host'] ) ) $url['host'] = $siteurl['host'];
1047
+ $freq = $prio = $mod = '';
1048
+ if ( !empty( $v['mod'] ) ) $mod = $v['mod'];
1049
+ if ( !empty( $v['freq'] ) ) $freq = $v['freq'];
1050
+ if ( !empty( $v['prio'] ) ) $prio = $v['prio'];
1051
+ if ( $freq == 'no' ) $freq = '';
1052
+ if ( $prio == 'no' ) $prio = '';
1053
+ $mod = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $mod ) );
1054
+ $pages[] = Array( 'loc' => $this->unparse_url( $url ), 'lastmod' => $mod, 'changefreq' => $freq, 'priority' => $prio );
1055
+ }
1056
+ }
1057
+ return $pages;
1058
+ }
1059
+
1060
+ /** Return data for user entered additional pages and extra pages. **/
1061
+ function get_addl_pages() {
1062
+ $home = Array();
1063
+ $home = Array(
1064
+ 'loc' => get_home_url(),
1065
+ 'priority' => $this->get_default_priority( 'homepage' ),
1066
+ 'changefreq' => $this->get_default_frequency( 'homepage' )
1067
+ );
1068
+ $posts = get_option( 'page_for_posts' );
1069
+ if ( $posts ) {
1070
+ $posts = $this->get_permalink( $posts );
1071
+ if ( $posts == $home['loc'] )
1072
+ $posts = Array();
1073
+ else
1074
+ $posts = Array(
1075
+ 'loc' => $posts,
1076
+ 'priority' => $this->get_default_priority( 'blog' ),
1077
+ 'changefreq' => $this->get_default_frequency( 'blog' )
1078
+ );
1079
+ } else $posts = Array();
1080
+ $pages = $this->get_addl_pages_only();
1081
+ if ( !empty( $home ) )
1082
+ $pages[] = $home;
1083
+ if ( !empty( $posts ) )
1084
+ $pages[] = $posts;
1085
+ return $pages;
1086
+ }
1087
+
1088
+ /** Return links for user entered additional pages. **/
1089
+ function get_addl_page_links() {
1090
+ if ( !empty( $this->options[ $this->prefix . 'addl_pages' ] ) )
1091
+ return array_keys( $this->options[ $this->prefix . 'addl_pages' ] );
1092
+ return Array();
1093
+ }
1094
+
1095
+ /** Scores posts based on date and relative comment count, if any. **/
1096
+ function get_prio_calc( $date, $stats = 0 ) {
1097
+ static $cur_time = null;
1098
+ if ($cur_time === null) $cur_time = time();
1099
+ $time = $cur_time - mysql2date( 'U', $date );
1100
+ if ( !empty( $stats ) && isset( $stats['max'] ) && ( $stats['max'] ) ) {
1101
+ $minadj = $time >> 3;
1102
+ $maxadj = $time >> 1;
1103
+ $avg = $stats['count'] / $stats['total'];
1104
+ $calc = ( $stats['comment_count'] - $stats['min'] ) / $stats['max'];
1105
+ $calc = $maxadj * $calc;
1106
+ if ( $avg < $stats['comment_count'] )
1107
+ $minadj = $time >> 2;
1108
+ else
1109
+ $maxadj = $time >> 2;
1110
+ if ( $calc > $maxadj ) $calc = $maxadj;
1111
+ if ( $calc < $minadj ) $calc = $minadj;
1112
+ $time -= $calc;
1113
+ }
1114
+ $days = $time / ( 60 * 60 * 24 );
1115
+ $prio_table = Array(
1116
+ 'daily' => 7,
1117
+ 'weekly' => 30,
1118
+ 'monthly' => 210,
1119
+ 'yearly' => null
1120
+ );
1121
+ $interval = 1.0;
1122
+ $prev_days = 0;
1123
+ foreach ($prio_table as $change => $max_days) {
1124
+ $interval -= 0.3;
1125
+ if ( $max_days === null) {
1126
+ $changefreq = $change;
1127
+ $prio = 0.1;
1128
+ break;
1129
+ }
1130
+ if ($days < $max_days) {
1131
+ $int_days_max = $max_days - $prev_days;
1132
+ $int_days = $days - $prev_days;
1133
+ $prio = $interval + ( ( int ) ( 3 * ( ( $max_days - $int_days ) / $int_days_max ) ) / 10.0 );
1134
+ $changefreq = $change;
1135
+ break;
1136
+ }
1137
+ $prev_days = $max_days;
1138
+ }
1139
+ return Array( 'lastmod' => $date, 'changefreq' => $changefreq, 'priority' => $prio );
1140
+ }
1141
+
1142
+ /** Generate sitemap priority data for archives from an array of posts. **/
1143
+ function get_archive_prio_from_posts( $posts ) {
1144
+ $archives = Array();
1145
+ if ( is_array( $posts ) )
1146
+ foreach( $posts as $p ) {
1147
+ if ( $p->post_type != 'post' ) continue;
1148
+ $date = date( 'Y-m', mysql2date( 'U', $p->post_date ) );
1149
+ if ( empty( $archives[ $date ] ) ) {
1150
+ $archives[ $date ] = $p;
1151
+ } else {
1152
+ if ( $p->post_modified > $archives[ $date ]->post_modified )
1153
+ $archives[ $date ] = $p;
1154
+ }
1155
+ }
1156
+ if ( !empty( $archives ) )
1157
+ return $this->get_prio_from_posts( $archives, $this->get_default_priority( 'archive', true ), $this->get_default_frequency( 'archive', true ), Array( $this, 'get_archive_link_from_post' ) );
1158
+ return $archives;
1159
+ }
1160
+
1161
+ /** Return an archive link from a post. **/
1162
+ function get_archive_link_from_post( $post ) {
1163
+ if ( $post->post_type != 'post' ) return false;
1164
+ $date = mysql2date( 'U', $post->post_date );
1165
+ return get_month_link( date( 'Y', $date ), date( 'm', $date ) );
1166
+ }
1167
+
1168
+ /** Generate sitemap priority data for authors from an array of posts. **/
1169
+ function get_author_prio_from_posts( $posts ) {
1170
+ $authors = Array();
1171
+ if ( is_array( $posts ) )
1172
+ foreach( $posts as $p ) {
1173
+ if ( $p->post_type != 'post' ) continue;
1174
+ if ( empty( $authors[ $p->post_author ] ) ) {
1175
+ $authors[ $p->post_author ] = $p;
1176
+ } else {
1177
+ if ( $p->post_modified > $authors[ $p->post_author ]->post_modified )
1178
+ $authors[ $p->post_author ] = $p;
1179
+ }
1180
+ }
1181
+ return $this->get_prio_from_posts( $authors, $this->get_default_priority( 'author', true ), $this->get_default_frequency( 'author', true ), Array( $this, 'get_author_link_from_post' ) );
1182
+ }
1183
+
1184
+ /** Return an author link from a post. **/
1185
+ function get_author_link_from_post( $post ) {
1186
+ return get_author_posts_url( $post->post_author );
1187
+ }
1188
+
1189
+ /** Return comment statistics on an array of posts. **/
1190
+ function get_comment_count_stats( $posts ) {
1191
+ $count = 0;
1192
+ $total = 0.0;
1193
+ $min = null;
1194
+ $max = 0;
1195
+ if ( is_array( $posts ) )
1196
+ foreach ( $posts as $post )
1197
+ if ( !empty( $post->comment_count ) ) {
1198
+ $cnt = $post->comment_count;
1199
+ $count++;
1200
+ $total += $cnt;
1201
+ if ( $min === null ) $min = $cnt;
1202
+ if ( $max < $cnt ) $max = $cnt;
1203
+ if ( $min > $cnt ) $min = $cnt;
1204
+ }
1205
+ if ( $count )
1206
+ return Array( 'max' => $max, 'min' => $min, 'total' => $total, 'count' => $cnt );
1207
+ else
1208
+ return 0;
1209
+ }
1210
+
1211
+ /** Generate sitemap priority data from an array of posts. **/
1212
+ function get_prio_from_posts( $posts, $prio_override = false, $freq_override = false, $linkfunc = 'get_permalink' ) {
1213
+ $prio = Array();
1214
+ if ( ( $prio_override ) && ( $freq_override ) )
1215
+ $stats = 0;
1216
+ else
1217
+ $stats = $this->get_comment_count_stats( $posts );
1218
+ if ( is_array( $posts ) ) {
1219
+ foreach ( $posts as $post ) {
1220
+ $url = '';
1221
+ $post->filter = "sample";
1222
+ if ( $linkfunc == 'get_permalink' )
1223
+ $url = $this->get_permalink( $post );
1224
+ else
1225
+ $url = call_user_func( $linkfunc, $post );
1226
+ $date = $post->post_modified;
1227
+ if ( '0000-00-00 00:00:00' === $date )
1228
+ $date = $post->post_date;
1229
+ if ( '0000-00-00 00:00:00' !== $date )
1230
+ $date = date( 'Y-m-d\TH:i:s\Z', mysql2date( 'U', $date ) );
1231
+ else
1232
+ $date = 0;
1233
+ if ( ( $prio_override ) && ( $freq_override ) )
1234
+ $pr_info = Array( 'lastmod' => $date, 'changefreq' => null, 'priority' => null );
1235
+ else {
1236
+ if ( empty( $post->comment_count ) )
1237
+ $stat = 0;
1238
+ else
1239
+ $stat = $stats;
1240
+ if ( !empty( $stat ) ) $stat['comment_count'] = $post->comment_count;
1241
+ $pr_info = $this->get_prio_calc( $date, $stat );
1242
+ }
1243
+ if ( $prio_override )
1244
+ $pr_info[ 'priority' ] = $prio_override;
1245
+ if ( $freq_override )
1246
+ $pr_info[ 'changefreq' ] = $freq_override;
1247
+ $pr_info['loc'] = $url;
1248
+ $prio[] = $pr_info;
1249
+ }
1250
+ }
1251
+ return $prio;
1252
+ }
1253
+
1254
+ /** Return excluded categories for taxonomy queries. **/
1255
+ function get_tax_args() {
1256
+ $args = Array();
1257
+ if ( $this->option_isset( 'excl_categories' ) )
1258
+ $args['exclude'] = $this->options[ $this->prefix . 'excl_categories'];
1259
+ return $args;
1260
+ }
1261
+
1262
+ /** Return excluded categories and pages for post queries. **/
1263
+ function set_post_args( $args ) {
1264
+ if ( $this->option_isset( 'excl_categories' ) ) {
1265
+ $cats = Array();
1266
+ foreach( $this->options[ $this->prefix . 'excl_categories'] as $c ) $cats[] = -$c;
1267
+ $args['category'] = implode( ',', $cats );
1268
+ }
1269
+ if ( $this->option_isset( 'excl_pages' ) )
1270
+ $args['exclude'] = $this->options[ $this->prefix . 'excl_pages' ];
1271
+ return $args;
1272
+ }
1273
+
1274
+ /** Return sitemap data for archives. **/
1275
+ function get_archive_prio_data() {
1276
+ $args = Array( 'numberposts' => 50000, 'post_type' => 'post' );
1277
+ $args = $this->set_post_args( $args );
1278
+ $posts = $this->get_all_post_type_data( $args );
1279
+ return $this->get_archive_prio_from_posts( $posts );
1280
+ }
1281
+
1282
+ /** Return sitemap data for authors. **/
1283
+ function get_author_prio_data() {
1284
+ $args = Array( 'numberposts' => 50000, 'post_type' => 'post' );
1285
+ $args = $this->set_post_args( $args );
1286
+ $posts = $this->get_all_post_type_data( $args );
1287
+ return $this->get_author_prio_from_posts( $posts );
1288
+ }
1289
+
1290
+ /** Return sitemap data for posts. **/
1291
+ function get_all_post_priority_data( $include = 'any', $status = 'publish', $page = 0 ) {
1292
+ $posts = $page_query = Array();
1293
+ if ( $this->paginate )
1294
+ $page_query = Array( 'offset' => $page * $this->max_posts );
1295
+ if ( ( $status == 'publish' ) && ( $include == 'attachment' ) ) $status = 'inherit';
1296
+ if ( is_array( $include ) && ( ( $pos = array_search( 'attachment', $include ) ) !== false ) ) {
1297
+ unset( $include[$pos] );
1298
+ $att_args = Array( 'post_type' => 'attachment', 'post_status' => 'inherit' );
1299
+ $att_args = array_merge( $att_args, $page_query );
1300
+ $posts = $this->get_all_post_type_data( $att_args );
1301
+ }
1302
+ $args = Array( 'post_type' => $include, 'post_status' => $status );
1303
+ $args = array_merge( $args, $page_query );
1304
+ $args = $this->set_post_args( $args );
1305
+ $posts = array_merge( $this->get_all_post_type_data( $args ), $posts );
1306
+ return $this->get_prio_from_posts( $posts, $this->get_default_priority( 'post', true ), $this->get_default_frequency( 'post', true ) );
1307
+ }
1308
+
1309
+ /** Return a list of all permalinks. **/
1310
+ function get_all_permalinks( $include = 'any', $status = 'publish' ) {
1311
+ $args = Array( 'post_type' => $include, 'post_status' => $status );
1312
+ $args = $this->set_post_args( $args );
1313
+ $posts = $this->get_all_post_type_data( $args );
1314
+ $links = $this->get_post_permalinks( $posts );
1315
+ if ( $this->option_isset( 'archive' ) )
1316
+ $links = array_merge( $links, $this->get_archive_permalinks( $posts ) );
1317
+ if ( $this->option_isset( 'author' ) )
1318
+ $links = array_merge( $links, $this->get_author_permalinks( $posts ) );
1319
+ return $links;
1320
+ }
1321
+
1322
+ /** Static memory cache for permalink_structure option. **/
1323
+ function cache_structure( $pre ) {
1324
+ return $this->cache_struct;
1325
+ }
1326
+
1327
+ /** Static memory cache for home option. **/
1328
+ function cache_home( $pre ) {
1329
+ return $this->cache_home;
1330
+ }
1331
+
1332
+ /** Cache permalink_structure and home for repeated sitemap queries. **/
1333
+ function cache_options() {
1334
+ static $start = true;
1335
+ if ( $start ) {
1336
+ $this->cache_struct = get_option( 'permalink_structure' );
1337
+ if ( !empty( $this->cache_struct ) ) add_filter( 'pre_option_permalink_structure', Array( $this, 'cache_structure' ) );
1338
+ $this->cache_home = get_option( 'home' );
1339
+ if ( !empty( $this->cache_home ) ) add_filter( 'pre_option_home', Array( $this, 'cache_home' ) );
1340
+ $start = false;
1341
+ }
1342
+ }
1343
+
1344
+ /** Call get_term_link with caching in place. **/
1345
+ function get_term_link( $term, $taxonomy = '' ) {
1346
+ static $start = true;
1347
+ if ( $start ) {
1348
+ $this->cache_options();
1349
+ $start = false;
1350
+ }
1351
+ return get_term_link( $term, $taxonomy );
1352
+ }
1353
+
1354
+ /** Call get_permalink with caching in place. **/
1355
+ function get_permalink( $post ) {
1356
+ static $start = true;
1357
+ if ( $start ) {
1358
+ $this->cache_options();
1359
+ $start = false;
1360
+ }
1361
+ return get_permalink( $post );
1362
+ }
1363
+
1364
+ /** Return post counts using wp_count_posts(). **/
1365
+ function get_all_post_counts( $args ) {
1366
+ $post_counts = null;
1367
+ $status = 'inherit';
1368
+ if ( !empty( $args['post_status'] ) ) $status = $args['post_status'];
1369
+ if ( !empty( $args ) && !empty( $args['post_type'] ) )
1370
+ if ( !is_array( $args['post_type'] ) || ( count( $args['post_type'] ) == 1 ) ) {
1371
+ if ( is_array( $args['post_type'] ) )
1372
+ $args['post_type'] = array_shift( $args['post_type'] );
1373
+ $count = (Array)wp_count_posts( $args['post_type'] );
1374
+ $post_counts = $count[$status];
1375
+ } else
1376
+ foreach( $args['post_type'] as $post_type ) {
1377
+ $count = (Array)wp_count_posts( $post_type );
1378
+ if ( $post_type == 'attachment' )
1379
+ $post_counts[$post_type] = $count['inherit'];
1380
+ else
1381
+ $post_counts[$post_type] = $count[$status];
1382
+ }
1383
+ return $post_counts;
1384
+ }
1385
+
1386
+ /** Return post data using get_posts(). **/
1387
+ function get_all_post_type_data( $args ) {
1388
+ $defaults = array(
1389
+ 'numberposts' => $this->max_posts, 'offset' => 0,
1390
+ 'category' => 0, 'orderby' => 'post_date',
1391
+ 'order' => 'DESC', 'include' => array(),
1392
+ 'exclude' => array(), 'post_type' => 'any',
1393
+ 'meta_key' => '', 'meta_value' => '', 'meta_compare' => '', 'meta_query' => '',
1394
+ 'cache_results' => false,
1395
+ 'no_found_rows' => true
1396
+ );
1397
+ if ( defined( 'WPML_TM_VERSION' ) ) $defaults['suppress_filters'] = false;
1398
+ $args = wp_parse_args( $args, $defaults );
1399
+ if ( empty( $args['post_type'] ) )
1400
+ return apply_filters( $this->prefix . 'post_filter', Array(), $args );
1401
+ $exclude_slugs = Array();
1402
+ if ( !empty( $args['exclude'] ) ) {
1403
+ $exclude = preg_split( '/[\s,]+/', trim( $args['exclude'] ) );
1404
+ if ( !empty( $exclude ) ) {
1405
+ foreach( $exclude as $k => $v ) {
1406
+ if ( !is_numeric( $v ) || ( $v != (int)$v ) ) {
1407
+ $exclude_slugs[] = $v;
1408
+ unset( $exclude[$k] );
1409
+ }
1410
+ }
1411
+ if ( !empty( $exclude_slugs ) )
1412
+ $args['exclude'] = implode( ',', $exclude );
1413
+ }
1414
+ }
1415
+
1416
+ global $wp_version;
1417
+ /*** Disable for now - this appears to be slower. -- pdb ***/
1418
+ /*
1419
+ if ( version_compare( $wp_version, '3.5', '>=' ) ) {
1420
+ $args['meta_query'] = Array(
1421
+ Array( 'key' => '_aioseop_sitemap_exclude', 'value' => '', 'compare' => 'NOT EXISTS' )
1422
+ );
1423
+ } else {
1424
+ */
1425
+ $ex_args = $args;
1426
+ $ex_args['meta_key'] = '_aioseop_sitemap_exclude';
1427
+ $ex_args['meta_value'] = 'on';
1428
+ $ex_args['meta_compare'] = '=';
1429
+ $ex_args['fields'] = 'ids';
1430
+ $q = new WP_Query( $ex_args );
1431
+ if ( !empty( $q->posts ) )
1432
+ $args['exclude'] = array_merge( $args['exclude'], $q->posts );
1433
+ // }
1434
+
1435
+ $posts = get_posts( apply_filters( $this->prefix . 'post_query', $args ) );
1436
+ if ( !empty( $exclude_slugs ) ) {
1437
+ foreach( $posts as $k => $v ) {
1438
+ if ( in_array( $v->post_name, $exclude_slugs ) )
1439
+ unset( $posts[$k] );
1440
+ }
1441
+ }
1442
+ $posts = apply_filters( $this->prefix . 'post_filter', $posts, $args );
1443
+ return $posts;
1444
+ }
1445
+ }
1446
+ }
all_in_one_seo_pack.php CHANGED
@@ -3,7 +3,7 @@
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. <a href="admin.php?page=all-in-one-seo-pack/aioseop_class.php">Options configuration panel</a> | <a href="http://semperplugins.com/plugins/">Upgrade to Pro Version</a> | <a 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">Donate</a> | <a href="http://semperplugins.com/support/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
6
- Version: 2.0.2
7
  Author: Michael Torbert
8
  Author URI: http://michaeltorbert.com
9
  */
@@ -30,11 +30,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30
 
31
  /**
32
  * @package All-in-One-SEO-Pack
33
- * @version 2.0.2
34
  */
35
 
36
  if ( ! defined( 'AIOSEOP_VERSION' ) )
37
- define( 'AIOSEOP_VERSION', '2.0.2' );
38
 
39
  if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
40
  define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
@@ -116,7 +116,7 @@ if ( !empty( $aioseop_mem_limit ) ) {
116
  }
117
 
118
  $aiosp_activation = false;
119
- $aioseop_module_list = Array( 'performance' ); // list all available modules here
120
 
121
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
122
  add_action( 'admin_notices', create_function( '', 'echo "<div class=\'error\'>The All In One SEO Pack class is already defined";'
@@ -139,6 +139,10 @@ add_action( 'init', array( $aiosp, 'add_hooks' ) );
139
 
140
  if ( is_admin() ) {
141
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
 
 
 
 
142
  }
143
 
144
  if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) )
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. <a href="admin.php?page=all-in-one-seo-pack/aioseop_class.php">Options configuration panel</a> | <a href="http://semperplugins.com/plugins/">Upgrade to Pro Version</a> | <a 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">Donate</a> | <a href="http://semperplugins.com/support/" >Support</a> | <a href="https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web" target="_blank" title="Amazon Wish List">Amazon Wishlist</a>
6
+ Version: 2.0.3
7
  Author: Michael Torbert
8
  Author URI: http://michaeltorbert.com
9
  */
30
 
31
  /**
32
  * @package All-in-One-SEO-Pack
33
+ * @version 2.0.3
34
  */
35
 
36
  if ( ! defined( 'AIOSEOP_VERSION' ) )
37
+ define( 'AIOSEOP_VERSION', '2.0.3' );
38
 
39
  if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
40
  define( 'AIOSEOP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
116
  }
117
 
118
  $aiosp_activation = false;
119
+ $aioseop_module_list = Array( 'sitemap', 'performance' ); // list all available modules here
120
 
121
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
122
  add_action( 'admin_notices', create_function( '', 'echo "<div class=\'error\'>The All In One SEO Pack class is already defined";'
139
 
140
  if ( is_admin() ) {
141
  add_action( 'wp_ajax_aioseop_ajax_save_meta', 'aioseop_ajax_save_meta' );
142
+ add_action( 'wp_ajax_aioseop_ajax_save_url', 'aioseop_ajax_save_url' );
143
+ add_action( 'wp_ajax_aioseop_ajax_delete_url', 'aioseop_ajax_delete_url' );
144
+ add_action( 'wp_ajax_aioseop_ajax_save_settings', 'aioseop_ajax_save_settings');
145
+ add_action( 'wp_ajax_aioseop_ajax_get_menu_links', 'aioseop_ajax_get_menu_links');
146
  }
147
 
148
  if ( aioseop_option_isset( 'aiosp_unprotect_meta' ) )
all_in_one_seo_pack.pot CHANGED
@@ -1,10 +1,10 @@
1
- # Copyright (C) 2013 Semper Fi Web Design
2
  # This file is distributed under the same license as the All In One SEO Pack package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: All In One SEO Pack 2.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-seo-pack\n"
7
- "POT-Creation-Date: 2013-04-19 19:02:09+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -20,7 +20,7 @@ msgstr ""
20
  msgid "%s Plugin Options"
21
  msgstr ""
22
 
23
- #: aioseop_class.php:57 aioseop_class.php:395
24
  msgid "General Settings"
25
  msgstr ""
26
 
@@ -37,10 +37,7 @@ msgid "Home Title:"
37
  msgstr ""
38
 
39
  #: aioseop_class.php:71
40
- msgid ""
41
- "As the name implies, this will be the title of your homepage. This is "
42
- "independent of any other option. If not set, the default blog title will get "
43
- "used."
44
  msgstr ""
45
 
46
  #: aioseop_class.php:74
@@ -48,9 +45,7 @@ msgid "Home Description:"
48
  msgstr ""
49
 
50
  #: aioseop_class.php:75
51
- msgid ""
52
- "The META description for your homepage. Independent of any other options, "
53
- "the default is no META description at all if this is not set."
54
  msgstr ""
55
 
56
  #: aioseop_class.php:78
@@ -58,19 +53,17 @@ msgid "Use Keywords:"
58
  msgstr ""
59
 
60
  #: aioseop_class.php:79
61
- msgid ""
62
- "This option allows you to toggle the use of meta keywords throughout the "
63
- "whole of the site."
64
  msgstr ""
65
 
66
  #: aioseop_class.php:82 aioseop_class.php:99 aioseop_class.php:108
67
- #: aioseop_class.php:116 aioseop_class.php:236 aioseop_class.php:244
68
  #: aioseop_performance.php:38
69
  msgid "Enabled"
70
  msgstr ""
71
 
72
  #: aioseop_class.php:83 aioseop_class.php:100 aioseop_class.php:109
73
- #: aioseop_class.php:117 aioseop_class.php:237 aioseop_class.php:245
74
  #: aioseop_performance.php:39
75
  msgid "Disabled"
76
  msgstr ""
@@ -80,10 +73,7 @@ msgid "Home Keywords (comma separated):"
80
  msgstr ""
81
 
82
  #: aioseop_class.php:87
83
- msgid ""
84
- "A comma separated list of your most important keywords for your site that "
85
- "will be written as META keywords on your homepage. Don't stuff everything in "
86
- "here."
87
  msgstr ""
88
 
89
  #: aioseop_class.php:91
@@ -91,11 +81,7 @@ msgid "Canonical URLs:"
91
  msgstr ""
92
 
93
  #: aioseop_class.php:92
94
- msgid ""
95
- "This option will automatically generate Canonical URLS for your entire "
96
- "WordPress installation. This will help to prevent duplicate content "
97
- "penalties by <a href='http://googlewebmastercentral.blogspot.com/2009/02/"
98
- "specify-your-canonical.html' target='_blank'>Google</a>."
99
  msgstr ""
100
 
101
  #: aioseop_class.php:95
@@ -103,18 +89,7 @@ msgid "Rewrite Titles:"
103
  msgstr ""
104
 
105
  #: aioseop_class.php:96
106
- msgid ""
107
- "Note that this is all about the title tag. This is what you see in your "
108
- "browser's window title bar. This is NOT visible on a page, only in the "
109
- "window title bar and of course in the source. If set, all page, post, "
110
- "category, search and archive page titles get rewritten. You can specify the "
111
- "format for most of them. For example: The default templates puts the title "
112
- "tag of posts like this: “Blog Archive >> Blog Name >> Post Title” (maybe "
113
- "I've overdone slightly). This is far from optimal. With the default post "
114
- "title format, Rewrite Title rewrites this to “Post Title | Blog Name”. "
115
- "If you have manually defined a title (in one of the text fields for All in "
116
- "One SEO Plugin input) this will become the title of your post in the format "
117
- "string."
118
  msgstr ""
119
 
120
  #: aioseop_class.php:103 aioseop_performance.php:34
@@ -130,9 +105,7 @@ msgid "Use Original Title:"
130
  msgstr ""
131
 
132
  #: aioseop_class.php:113
133
- msgid ""
134
- "Use wp_title to set the title; disable this option if you run into conflicts "
135
- "with the title being set by your theme or another plugin."
136
  msgstr ""
137
 
138
  #: aioseop_class.php:120
@@ -140,9 +113,7 @@ msgid "Capitalize Titles:"
140
  msgstr ""
141
 
142
  #: aioseop_class.php:121
143
- msgid ""
144
- "Check this and Search Page Titles and Tag Page Titles will have the first "
145
- "letter of each word capitalized."
146
  msgstr ""
147
 
148
  #: aioseop_class.php:124
@@ -150,9 +121,7 @@ msgid "Capitalize Category Titles:"
150
  msgstr ""
151
 
152
  #: aioseop_class.php:125
153
- msgid ""
154
- "Check this and Category Titles will have the first letter of each word "
155
- "capitalized."
156
  msgstr ""
157
 
158
  #: aioseop_class.php:128
@@ -160,21 +129,23 @@ msgid "Page Title Format:"
160
  msgstr ""
161
 
162
  #: aioseop_class.php:130 aioseop_class.php:147 aioseop_class.php:164
163
- #: aioseop_class.php:175 aioseop_class.php:185 aioseop_class.php:195
164
- #: aioseop_class.php:204 aioseop_class.php:214 aioseop_class.php:226
165
- #: aioseop_class.php:506
166
  msgid "The following macros are supported:"
167
  msgstr ""
168
 
169
  #: aioseop_class.php:131 aioseop_class.php:148 aioseop_class.php:165
170
- #: aioseop_class.php:176 aioseop_class.php:186 aioseop_class.php:196
171
- #: aioseop_class.php:205 aioseop_class.php:215 aioseop_class.php:507
 
172
  msgid "%blog_title% - Your blog title"
173
  msgstr ""
174
 
175
  #: aioseop_class.php:132 aioseop_class.php:149 aioseop_class.php:166
176
- #: aioseop_class.php:177 aioseop_class.php:187 aioseop_class.php:197
177
- #: aioseop_class.php:206 aioseop_class.php:216 aioseop_class.php:508
 
178
  msgid "%blog_description% - Your blog description"
179
  msgstr ""
180
 
@@ -186,7 +157,7 @@ msgstr ""
186
  msgid "%category_title% - The (main) category of the page"
187
  msgstr ""
188
 
189
- #: aioseop_class.php:135 aioseop_class.php:152 aioseop_class.php:511
190
  msgid "%category% - Alias for %category_title%"
191
  msgstr ""
192
 
@@ -210,27 +181,27 @@ msgstr ""
210
  msgid "Post Title Format:"
211
  msgstr ""
212
 
213
- #: aioseop_class.php:150 aioseop_class.php:509
214
  msgid "%post_title% - The original title of the post"
215
  msgstr ""
216
 
217
- #: aioseop_class.php:151 aioseop_class.php:510
218
  msgid "%category_title% - The (main) category of the post"
219
  msgstr ""
220
 
221
- #: aioseop_class.php:153 aioseop_class.php:512
222
  msgid "%post_author_login% - This post's author' login"
223
  msgstr ""
224
 
225
- #: aioseop_class.php:154 aioseop_class.php:513
226
  msgid "%post_author_nicename% - This post's author' nicename"
227
  msgstr ""
228
 
229
- #: aioseop_class.php:155 aioseop_class.php:514
230
  msgid "%post_author_firstname% - This post's author' first name (capitalized)"
231
  msgstr ""
232
 
233
- #: aioseop_class.php:156 aioseop_class.php:515
234
  msgid "%post_author_lastname% - This post's author' last name (capitalized)"
235
  msgstr ""
236
 
@@ -247,562 +218,631 @@ msgid "%category_description% - The description of the category"
247
  msgstr ""
248
 
249
  #: aioseop_class.php:173
250
- msgid "Archive Title Format:"
251
  msgstr ""
252
 
253
  #: aioseop_class.php:178
254
- msgid ""
255
- "%date% - The original archive title given by wordpress, e.g. \"2007\" or "
256
- "\"2007 August\""
 
 
257
  msgstr ""
258
 
259
- #: aioseop_class.php:183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  msgid "Tag Title Format:"
261
  msgstr ""
262
 
263
- #: aioseop_class.php:188
264
  msgid "%tag% - The name of the tag"
265
  msgstr ""
266
 
267
- #: aioseop_class.php:193
268
  msgid "Search Title Format:"
269
  msgstr ""
270
 
271
- #: aioseop_class.php:198
272
  msgid "%search% - What was searched for"
273
  msgstr ""
274
 
275
- #: aioseop_class.php:203
276
  msgid "Description Format"
277
  msgstr ""
278
 
279
- #: aioseop_class.php:207
280
- msgid ""
281
- "%description% - The original description as determined by the plugin, e.g. "
282
- "the excerpt if one is set or an auto-generated one if that option is set"
283
  msgstr ""
284
 
285
- #: aioseop_class.php:208
286
  msgid "%wp_title% - The original wordpress title, e.g. post_title for posts"
287
  msgstr ""
288
 
289
- #: aioseop_class.php:213
290
  msgid "404 Title Format:"
291
  msgstr ""
292
 
293
- #: aioseop_class.php:217
294
- msgid ""
295
- "%request_url% - The original URL path, like \"/url-that-does-not-exist/\""
296
  msgstr ""
297
 
298
- #: aioseop_class.php:218
299
- msgid ""
300
- "%request_words% - The URL path in human readable form, like \"Url That Does "
301
- "Not Exist\""
302
  msgstr ""
303
 
304
- #: aioseop_class.php:219
305
  msgid "%404_title% - Additional 404 title input\""
306
  msgstr ""
307
 
308
- #: aioseop_class.php:224
309
  msgid "Paged Format:"
310
  msgstr ""
311
 
312
- #: aioseop_class.php:225
313
- msgid ""
314
- "This string gets appended/prepended to titles when they are for paged index "
315
- "pages (like home or archive pages)."
316
  msgstr ""
317
 
318
- #: aioseop_class.php:227
319
  msgid "%page% - The page number"
320
  msgstr ""
321
 
322
- #: aioseop_class.php:232
323
  msgid "SEO for Custom Post Types:"
324
  msgstr ""
325
 
326
- #: aioseop_class.php:233
327
- msgid ""
328
- "Check this if you want your enable AIOSEOP support for Custom Post Types on "
329
- "this site."
330
  msgstr ""
331
 
332
- #: aioseop_class.php:240
333
  msgid "Enable Advanced Options:"
334
  msgstr ""
335
 
336
- #: aioseop_class.php:241
337
  msgid "This allows you to do more with your custom post types."
338
  msgstr ""
339
 
340
- #: aioseop_class.php:250
341
  msgid "SEO on only these post types:"
342
  msgstr ""
343
 
344
- #: aioseop_class.php:251
345
  msgid "Select specific custom post types for AIOSEOP support."
346
  msgstr ""
347
 
348
- #: aioseop_class.php:257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
349
  msgid "Custom titles:"
350
  msgstr ""
351
 
352
- #: aioseop_class.php:258
353
  msgid "Allows setting specific custom titles for all post types."
354
  msgstr ""
355
 
356
- #: aioseop_class.php:264
357
  msgid "Show Column Labels for Custom Post Types:"
358
  msgstr ""
359
 
360
- #: aioseop_class.php:265
361
- msgid ""
362
- "Choose which post types you want to have SEO columns on the edit.php screen. "
363
- "You can select as many as you like."
364
  msgstr ""
365
 
366
- #: aioseop_class.php:269
367
  msgid "Display Menu In Admin Bar:"
368
  msgstr ""
369
 
370
- #: aioseop_class.php:270
371
  msgid "Check this for easy access to settings from the admin menu bar."
372
  msgstr ""
373
 
374
- #: aioseop_class.php:274
 
 
 
 
 
 
 
 
375
  msgid "Google Webmaster Tools:"
376
  msgstr ""
377
 
378
- #: aioseop_class.php:275 aioseop_class.php:279 aioseop_class.php:283
379
- msgid ""
380
- "Enter your verification code here to add a meta tag to your homepage to "
381
- "verify your site."
382
  msgstr ""
383
 
384
- #: aioseop_class.php:278
385
  msgid "Bing Webmaster Center:"
386
  msgstr ""
387
 
388
- #: aioseop_class.php:282
389
  msgid "Pinterest Site Verification:"
390
  msgstr ""
391
 
392
- #: aioseop_class.php:286
393
  msgid "Google Plus Default Profile:"
394
  msgstr ""
395
 
396
- #: aioseop_class.php:287
397
- msgid ""
398
- "Enter your Google Plus Profile URL here to link your site's pages to Google "
399
- "Plus."
 
 
 
 
 
 
400
  msgstr ""
401
 
402
- #: aioseop_class.php:290
403
  msgid "Google Analytics ID:"
404
  msgstr ""
405
 
406
- #: aioseop_class.php:291
407
- msgid ""
408
- "Enter your Google Analytics ID here to track your site with Google Analytics."
409
  msgstr ""
410
 
411
- #: aioseop_class.php:294
412
  msgid "Tracking Domain:"
413
  msgstr ""
414
 
415
- #: aioseop_class.php:296
416
  msgid "Enter domain name for tracking with Google Analytics."
417
  msgstr ""
418
 
419
- #: aioseop_class.php:299
420
  msgid "Track Multiple Domains:"
421
  msgstr ""
422
 
423
- #: aioseop_class.php:300
424
  msgid "Enable multi-domain tracking for Google Analytics."
425
  msgstr ""
426
 
427
- #: aioseop_class.php:304
428
  msgid "Track Outbound Links:"
429
  msgstr ""
430
 
431
- #: aioseop_class.php:305
432
  msgid "Add functionality to track outbound links with Google Analytics."
433
  msgstr ""
434
 
435
- #: aioseop_class.php:309
436
  msgid "Use Categories for META keywords:"
437
  msgstr ""
438
 
439
- #: aioseop_class.php:310
440
- msgid ""
441
- "Check this if you want your categories for a given post used as the META "
442
- "keywords for this post (in addition to any keywords and tags you specify on "
443
- "the post edit page)."
444
  msgstr ""
445
 
446
- #: aioseop_class.php:314
447
  msgid "Use Tags for META keywords:"
448
  msgstr ""
449
 
450
- #: aioseop_class.php:315
451
- msgid ""
452
- "Check this if you want your tags for a given post used as the META keywords "
453
- "for this post (in addition to any keywords you specify on the post edit "
454
- "page)."
455
  msgstr ""
456
 
457
- #: aioseop_class.php:319
458
  msgid "Dynamically Generate Keywords for Posts Page:"
459
  msgstr ""
460
 
461
- #: aioseop_class.php:320
462
- msgid ""
463
- "Check this if you want your keywords on a custom posts page (set it in "
464
- "options->reading) to be dynamically generated from the keywords of the posts "
465
- "showing on that page. If unchecked, it will use the keywords set in the "
466
- "edit page screen for the posts page."
467
  msgstr ""
468
 
469
- #: aioseop_class.php:324
470
  msgid "Use noindex for Categories:"
471
  msgstr ""
472
 
473
- #: aioseop_class.php:325
474
- msgid ""
475
- "Check this for excluding category pages from being crawled. Useful for "
476
- "avoiding duplicate content."
477
  msgstr ""
478
 
479
- #: aioseop_class.php:328
480
- msgid "Use noindex for Archives:"
481
  msgstr ""
482
 
483
- #: aioseop_class.php:329
484
- msgid ""
485
- "Check this for excluding archive pages from being crawled. Useful for "
486
- "avoiding duplicate content."
487
  msgstr ""
488
 
489
- #: aioseop_class.php:332
 
 
 
 
 
 
 
 
490
  msgid "Use noindex for Tag Archives:"
491
  msgstr ""
492
 
493
- #: aioseop_class.php:333
494
- msgid ""
495
- "Check this for excluding tag pages from being crawled. Useful for avoiding "
496
- "duplicate content."
497
  msgstr ""
498
 
499
- #: aioseop_class.php:336
500
  msgid "Autogenerate Descriptions:"
501
  msgstr ""
502
 
503
- #: aioseop_class.php:337
504
- msgid ""
505
- "Check this and your META descriptions will get autogenerated if there's no "
506
- "excerpt."
507
  msgstr ""
508
 
509
- #: aioseop_class.php:340
 
 
 
 
 
 
 
 
510
  msgid "Unprotect Post Meta Fields:"
511
  msgstr ""
512
 
513
- #: aioseop_class.php:341
514
- msgid ""
515
- "Unprotect internal postmeta fields for use with XMLRPC -- if you don't know "
516
- "what that is, leave it unchecked."
517
  msgstr ""
518
 
519
- #: aioseop_class.php:344
520
  msgid "Exclude Pages:"
521
  msgstr ""
522
 
523
- #: aioseop_class.php:345
524
- msgid ""
525
- "Enter any comma separated pages here to be excluded by All in One SEO Pack. "
526
- "This is helpful when using plugins which generate their own non-WordPress "
527
- "dynamic pages. Ex: <em>/forum/,/contact/</em> For instance, if you want to "
528
- "exclude the virtual pages generated by a forum plugin, all you have to do is "
529
- "give forum or /forum or /forum/ or and any URL with the word \"forum\" in "
530
- "it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage "
531
- "will be excluded from All in One SEO Pack."
532
  msgstr ""
533
 
534
- #: aioseop_class.php:348
535
  msgid "Additional Post Headers:"
536
  msgstr ""
537
 
538
- #: aioseop_class.php:349
539
  msgid "What you enter here will be copied verbatim to your header on posts."
540
  msgstr ""
541
 
542
- #: aioseop_class.php:349 aioseop_class.php:353 aioseop_class.php:357
543
- #: aioseop_class.php:361
544
- msgid ""
545
- "You can enter whatever additional headers you want here, even references to "
546
- "stylesheets."
547
  msgstr ""
548
 
549
- #: aioseop_class.php:352
550
  msgid "Additional Page Headers:"
551
  msgstr ""
552
 
553
- #: aioseop_class.php:353
554
  msgid "What you enter here will be copied verbatim to your header on pages."
555
  msgstr ""
556
 
557
- #: aioseop_class.php:356
558
  msgid "Additional Front Page Headers:"
559
  msgstr ""
560
 
561
- #: aioseop_class.php:357
562
- msgid ""
563
- "What you enter here will be copied verbatim to your header on the front page "
564
- "if you have a static page set in Settings, Reading."
565
  msgstr ""
566
 
567
- #: aioseop_class.php:357
568
- msgid ""
569
- "This will fall back to using Additional Page Headers if you have them set "
570
- "and nothing is entered here."
571
  msgstr ""
572
 
573
- #: aioseop_class.php:360
574
  msgid "Additional Blog Page Headers:"
575
  msgstr ""
576
 
577
- #: aioseop_class.php:361
578
- msgid ""
579
- "What you enter here will be copied verbatim to your header on the home page "
580
- "if you have Front page displays your latest posts selected in Settings, "
581
- "Reading.  It will also be copied verbatim to your header on the Posts page "
582
- "if you have one set in Settings, Reading."
583
  msgstr ""
584
 
585
- #: aioseop_class.php:364
586
  msgid "Log important events:"
587
  msgstr ""
588
 
589
- #: aioseop_class.php:365
590
- msgid ""
591
- "Check this and SEO pack will create a log of important events "
592
- "(all_in_one_seo_pack.log) in its plugin directory which might help debugging "
593
- "it. Make sure this directory is writable."
594
  msgstr ""
595
 
596
- #: aioseop_class.php:378
597
  msgid "Upgrade to All in One SEO Pack Pro Version"
598
  msgstr ""
599
 
600
- #: aioseop_class.php:380
601
  msgid "Preview Snippet"
602
  msgstr ""
603
 
604
- #: aioseop_class.php:380
605
  msgid "A preview of what this page might look like in search engine results."
606
  msgstr ""
607
 
608
- #: aioseop_class.php:381
609
  msgid "Title"
610
  msgstr ""
611
 
612
- #: aioseop_class.php:381
613
  msgid "A custom title that shows up in the title tag for this page."
614
  msgstr ""
615
 
616
- #: aioseop_class.php:382
617
  msgid "Description"
618
  msgstr ""
619
 
620
- #: aioseop_class.php:382
621
- msgid ""
622
- "The META description for this page. This will override any autogenerated "
623
- "descriptions."
624
  msgstr ""
625
 
626
- #: aioseop_class.php:383
627
  msgid "Keywords (comma separated)"
628
  msgstr ""
629
 
630
- #: aioseop_class.php:383
631
- msgid ""
632
- "A comma separated list of your most important keywords for this page that "
633
- "will be written as META keywords."
634
  msgstr ""
635
 
636
- #: aioseop_class.php:384
637
  msgid "Robots Meta NOINDEX"
638
  msgstr ""
639
 
640
- #: aioseop_class.php:384
641
  msgid "Check this box to ask search engines not to index this page."
642
  msgstr ""
643
 
644
- #: aioseop_class.php:385
645
  msgid "Robots Meta NOFOLLOW"
646
  msgstr ""
647
 
648
- #: aioseop_class.php:385
649
- msgid ""
650
- "Check this box to ask search engines not to follow links from this page."
651
  msgstr ""
652
 
653
- #: aioseop_class.php:386
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  msgid "Title Attribute"
655
  msgstr ""
656
 
657
- #: aioseop_class.php:386
658
  msgid "Set the title attribute for menu links."
659
  msgstr ""
660
 
661
- #: aioseop_class.php:387
662
  msgid "Menu Label"
663
  msgstr ""
664
 
665
- #: aioseop_class.php:387
666
  msgid "Set the label for this page menu item."
667
  msgstr ""
668
 
669
- #: aioseop_class.php:388
 
 
 
 
 
 
 
 
670
  msgid "Disable on this page/post"
671
  msgstr ""
672
 
673
- #: aioseop_class.php:388
674
  msgid "Disable SEO on this page."
675
  msgstr ""
676
 
677
- #: aioseop_class.php:389
678
  msgid "Disable Google Analytics"
679
  msgstr ""
680
 
681
- #: aioseop_class.php:389
682
  msgid "Disable Google Analytics on this page."
683
  msgstr ""
684
 
685
- #: aioseop_class.php:399
686
  msgid "Home Page Settings"
687
  msgstr ""
688
 
689
- #: aioseop_class.php:403
690
  msgid "Keyword Settings"
691
  msgstr ""
692
 
693
- #: aioseop_class.php:407
694
  msgid "Title Settings"
695
  msgstr ""
696
 
697
- #: aioseop_class.php:412
698
  msgid "Custom Post Type Settings"
699
  msgstr ""
700
 
701
- #: aioseop_class.php:416
702
  msgid "Display Settings"
703
  msgstr ""
704
 
705
- #: aioseop_class.php:420
706
  msgid "Webmaster Verification"
707
  msgstr ""
708
 
709
- #: aioseop_class.php:424
710
  msgid "Google Settings"
711
  msgstr ""
712
 
713
- #: aioseop_class.php:428
714
  msgid "Noindex Settings"
715
  msgstr ""
716
 
717
- #: aioseop_class.php:432
718
  msgid "Advanced Settings"
719
  msgstr ""
720
 
721
- #: aioseop_class.php:504
722
  msgid "Title Format:"
723
  msgstr ""
724
 
725
- #: aioseop_class.php:526
726
  msgid "Welcome to Version %s!"
727
  msgstr ""
728
 
729
- #: aioseop_class.php:527
730
- msgid ""
731
- "Thank you for running the latest and greatest All in One SEO Pack ever! New "
732
- "in 2.0: manage your performance with our Performance module; enable it from "
733
- "our new feature manager! And please review your settings, we have added some "
734
- "new ones!"
735
  msgstr ""
736
 
737
- #: aioseop_class.php:545
 
 
 
 
738
  msgid "Reset General Settings to Defaults"
739
  msgstr ""
740
 
741
- #: aioseop_class.php:546
742
  msgid "Reset ALL Settings to Defaults"
743
  msgstr ""
744
 
745
- #: aioseop_class.php:630
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
746
  msgid "All in One SEO Plugin Support Forum"
747
  msgstr ""
748
 
749
- #: aioseop_class.php:631
750
  msgid "Support Forum"
751
  msgstr ""
752
 
753
- #: aioseop_class.php:632
754
  msgid "Pro Version"
755
  msgstr ""
756
 
757
- #: aioseop_class.php:634
758
  msgid "UPGRADE TO PRO VERSION"
759
  msgstr ""
760
 
761
- #: aioseop_class.php:656
762
  msgid "Donate"
763
  msgstr ""
764
 
765
- #: aioseop_class.php:658
766
  msgid "Donate with Paypal"
767
  msgstr ""
768
 
769
- #: aioseop_class.php:660
770
  msgid "My Amazon Wish List"
771
  msgstr ""
772
 
773
- #: aioseop_class.php:661
774
  msgid "Follow us on Facebook"
775
  msgstr ""
776
 
777
- #: aioseop_class.php:662
778
  msgid "Follow us on Twitter"
779
  msgstr ""
780
 
781
- #: aioseop_class.php:670
782
- msgid ""
783
- "For support please visit the Semper Plugins Support Forum at http://"
784
- "semperplugins.com/support/"
 
 
785
  msgstr ""
786
 
787
- #: aioseop_class.php:1641
788
- msgid "AIOSEOP"
789
  msgstr ""
790
 
791
- #: aioseop_class.php:1652
 
 
 
 
 
 
 
 
 
 
 
 
792
  msgid "All in One SEO"
793
  msgstr ""
794
 
795
- #: aioseop_class.php:1673
796
  msgid "Thank you!"
797
  msgstr ""
798
 
799
- #: aioseop_class.php:1674
800
- msgid ""
801
- "Thank you for your donation, it helps keep this plugin free and actively "
802
- "developed!"
803
  msgstr ""
804
 
805
- #: aioseop_class.php:1728
806
  msgid "Main Settings"
807
  msgstr ""
808
 
@@ -810,116 +850,122 @@ msgstr ""
810
  msgid "Feature Manager"
811
  msgstr ""
812
 
813
- #: aioseop_feature_manager.php:18 aioseop_performance.php:14
 
 
 
 
 
 
 
 
814
  msgid "Performance"
815
  msgstr ""
816
 
817
- #: aioseop_feature_manager.php:19
818
  msgid "Optimize performance related to SEO and check your system status."
819
  msgstr ""
820
 
821
- #: aioseop_feature_manager.php:21
822
  msgid "Coming Soon..."
823
  msgstr ""
824
 
825
- #: aioseop_feature_manager.php:22
826
- msgid "XML Sitemaps"
827
  msgstr ""
828
 
829
- #: aioseop_feature_manager.php:65
830
  msgid "Update Features"
831
  msgstr ""
832
 
833
- #: aioseop_feature_manager.php:67
834
  msgid "Reset Features"
835
  msgstr ""
836
 
837
- #: aioseop_functions.php:55
838
- msgid "Updating SEO post meta in database."
839
- msgstr ""
840
-
841
- #: aioseop_functions.php:194
842
  msgid "SEO Title"
843
  msgstr ""
844
 
845
- #: aioseop_functions.php:195
846
- msgid "SEO Keywords"
847
  msgstr ""
848
 
849
- #: aioseop_functions.php:196
850
- msgid "SEO Description"
851
  msgstr ""
852
 
853
- #: aioseop_functions.php:234 aioseop_functions.php:255
854
- #: aioseop_functions.php:294
855
  msgid "Edit"
856
  msgstr ""
857
 
858
- #: aioseop_functions.php:234
859
  msgid "Post"
860
  msgstr ""
861
 
862
- #: aioseop_functions.php:234
863
  msgid "Save"
864
  msgstr ""
865
 
866
- #: aioseop_functions.php:234
867
  msgid "Cancel"
868
  msgstr ""
869
 
870
- #: aioseop_functions.php:235
871
  msgid "Please wait..."
872
  msgstr ""
873
 
874
- #: aioseop_functions.php:235
875
  msgid "Slug may not be empty!"
876
  msgstr ""
877
 
878
- #: aioseop_functions.php:236
879
  msgid "Revisions"
880
  msgstr ""
881
 
882
- #: aioseop_functions.php:236
883
  msgid "Insert time"
884
  msgstr ""
885
 
886
- #: aioseop_functions.php:253 aioseop_performance.php:144
887
  #: aioseop_performance.php:146 aioseop_performance.php:148
888
  #: aioseop_performance.php:161
889
  msgid "No"
890
  msgstr ""
891
 
892
- #: aioseop_functions.php:270
893
  msgid "Unauthorized access; try reloading the page."
894
  msgstr ""
895
 
896
- #: aioseop_functions.php:403
 
 
 
 
897
  msgid "Google+"
898
  msgstr ""
899
 
900
- #: aioseop_module_class.php:904
901
  msgid " characters. Most search engines use a maximum of %s chars for the %s."
902
  msgstr ""
903
 
904
- #: aioseop_module_class.php:927
905
  msgid "Click for Help!"
906
  msgstr ""
907
 
908
- #: aioseop_module_class.php:1052
909
- msgid ""
910
- "Security Check - If you receive this in error, log out and back in to "
911
- "WordPress"
912
  msgstr ""
913
 
914
- #: aioseop_module_class.php:1054
915
  msgid "Options Reset."
916
  msgstr ""
917
 
918
- #: aioseop_module_class.php:1063
919
  msgid "All in One SEO Options Updated."
920
  msgstr ""
921
 
922
- #: aioseop_module_class.php:1107
923
  msgid "Update Options"
924
  msgstr ""
925
 
@@ -928,10 +974,7 @@ msgid "Raise memory limit"
928
  msgstr ""
929
 
930
  #: aioseop_performance.php:20
931
- msgid ""
932
- "Allows you to raise your PHP memory limit to a reasonable value. Note: "
933
- "WordPress core and other WordPress plugins may also change the value of the "
934
- "memory limit."
935
  msgstr ""
936
 
937
  #: aioseop_performance.php:23 aioseop_performance.php:28
@@ -1073,42 +1116,385 @@ msgstr ""
1073
  msgid "Form submission error: verification check failed."
1074
  msgstr ""
1075
 
1076
- #: aioseop_performance.php:228
1077
- msgid "%s has checked for updates."
1078
- msgstr ""
1079
-
1080
- #: aioseop_performance.php:232
1081
  msgid "SFWD Debug Mail From Site %s."
1082
  msgstr ""
1083
 
1084
- #: aioseop_performance.php:233
1085
  msgid "Sent to %s."
1086
  msgstr ""
1087
 
1088
- #: aioseop_performance.php:235
1089
  msgid "Failed to send to %s."
1090
  msgstr ""
1091
 
1092
- #: aioseop_performance.php:238
1093
  msgid "Error: please enter an e-mail address before submitting."
1094
  msgstr ""
1095
 
1096
- #: aioseop_performance.php:243
1097
  msgid "E-mail debug information"
1098
  msgstr ""
1099
 
1100
- #: aioseop_performance.php:244
1101
  msgid "Submit"
1102
  msgstr ""
1103
 
1104
- #: aioseop_performance.php:244
1105
- msgid "Check For Updates"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1106
  msgstr ""
1107
 
1108
  #: all_in_one_seo_pack.php:43
1109
  msgid "%s detected a conflict; please deactivate the plugin located in %s."
1110
  msgstr ""
1111
-
1112
  #. Plugin Name of the plugin/theme
1113
  msgid "All In One SEO Pack"
1114
  msgstr ""
@@ -1118,17 +1504,7 @@ msgid "http://semperfiwebdesign.com"
1118
  msgstr ""
1119
 
1120
  #. Description of the plugin/theme
1121
- msgid ""
1122
- "Out-of-the-box SEO for your WordPress blog. <a href=\"admin.php?page=all-in-"
1123
- "one-seo-pack/aioseop_class.php\">Options configuration panel</a> | <a href="
1124
- "\"http://semperplugins.com/plugins/\">Upgrade to Pro Version</a> | <a href="
1125
- "\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert"
1126
- "%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support"
1127
- "%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP"
1128
- "%2dDonationsBF&charset=UTF%2d8\">Donate</a> | <a href=\"http://semperplugins."
1129
- "com/support/\" >Support</a> | <a href=\"https://www.amazon.com/"
1130
- "wishlist/1NFQ133FNCOOA/ref=wl_web\" target=\"_blank\" title=\"Amazon Wish "
1131
- "List\">Amazon Wishlist</a>"
1132
  msgstr ""
1133
 
1134
  #. Author of the plugin/theme
1
+ # Copyright (C) 2013 All In One SEO Pack
2
  # This file is distributed under the same license as the All In One SEO Pack package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: All In One SEO Pack 2.0.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-seo-pack\n"
7
+ "POT-Creation-Date: 2013-08-07 19:00:02+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
20
  msgid "%s Plugin Options"
21
  msgstr ""
22
 
23
+ #: aioseop_class.php:57 aioseop_class.php:454
24
  msgid "General Settings"
25
  msgstr ""
26
 
37
  msgstr ""
38
 
39
  #: aioseop_class.php:71
40
+ msgid "As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used."
 
 
 
41
  msgstr ""
42
 
43
  #: aioseop_class.php:74
45
  msgstr ""
46
 
47
  #: aioseop_class.php:75
48
+ msgid "The META description for your homepage. Independent of any other options, the default is no META description at all if this is not set."
 
 
49
  msgstr ""
50
 
51
  #: aioseop_class.php:78
53
  msgstr ""
54
 
55
  #: aioseop_class.php:79
56
+ msgid "This option allows you to toggle the use of meta keywords throughout the whole of the site."
 
 
57
  msgstr ""
58
 
59
  #: aioseop_class.php:82 aioseop_class.php:99 aioseop_class.php:108
60
+ #: aioseop_class.php:116 aioseop_class.php:249 aioseop_class.php:257
61
  #: aioseop_performance.php:38
62
  msgid "Enabled"
63
  msgstr ""
64
 
65
  #: aioseop_class.php:83 aioseop_class.php:100 aioseop_class.php:109
66
+ #: aioseop_class.php:117 aioseop_class.php:250 aioseop_class.php:258
67
  #: aioseop_performance.php:39
68
  msgid "Disabled"
69
  msgstr ""
73
  msgstr ""
74
 
75
  #: aioseop_class.php:87
76
+ msgid "A comma separated list of your most important keywords for your site that will be written as META keywords on your homepage. Don't stuff everything in here."
 
 
 
77
  msgstr ""
78
 
79
  #: aioseop_class.php:91
81
  msgstr ""
82
 
83
  #: aioseop_class.php:92
84
+ msgid "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>."
 
 
 
 
85
  msgstr ""
86
 
87
  #: aioseop_class.php:95
89
  msgstr ""
90
 
91
  #: aioseop_class.php:96
92
+ msgid "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: ‚'Blog Archive >> Blog Name >> Post Title‚' (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to 'Post Title | Blog Name'. If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string."
 
 
 
 
 
 
 
 
 
 
 
93
  msgstr ""
94
 
95
  #: aioseop_class.php:103 aioseop_performance.php:34
105
  msgstr ""
106
 
107
  #: aioseop_class.php:113
108
+ msgid "Use wp_title to set the title; disable this option if you run into conflicts with the title being set by your theme or another plugin."
 
 
109
  msgstr ""
110
 
111
  #: aioseop_class.php:120
113
  msgstr ""
114
 
115
  #: aioseop_class.php:121
116
+ msgid "Check this and Search Page Titles and Tag Page Titles will have the first letter of each word capitalized."
 
 
117
  msgstr ""
118
 
119
  #: aioseop_class.php:124
121
  msgstr ""
122
 
123
  #: aioseop_class.php:125
124
+ msgid "Check this and Category Titles will have the first letter of each word capitalized."
 
 
125
  msgstr ""
126
 
127
  #: aioseop_class.php:128
129
  msgstr ""
130
 
131
  #: aioseop_class.php:130 aioseop_class.php:147 aioseop_class.php:164
132
+ #: aioseop_class.php:175 aioseop_class.php:188 aioseop_class.php:198
133
+ #: aioseop_class.php:208 aioseop_class.php:217 aioseop_class.php:227
134
+ #: aioseop_class.php:239 aioseop_class.php:689
135
  msgid "The following macros are supported:"
136
  msgstr ""
137
 
138
  #: aioseop_class.php:131 aioseop_class.php:148 aioseop_class.php:165
139
+ #: aioseop_class.php:176 aioseop_class.php:189 aioseop_class.php:199
140
+ #: aioseop_class.php:209 aioseop_class.php:218 aioseop_class.php:228
141
+ #: aioseop_class.php:690
142
  msgid "%blog_title% - Your blog title"
143
  msgstr ""
144
 
145
  #: aioseop_class.php:132 aioseop_class.php:149 aioseop_class.php:166
146
+ #: aioseop_class.php:177 aioseop_class.php:190 aioseop_class.php:200
147
+ #: aioseop_class.php:210 aioseop_class.php:219 aioseop_class.php:229
148
+ #: aioseop_class.php:691
149
  msgid "%blog_description% - Your blog description"
150
  msgstr ""
151
 
157
  msgid "%category_title% - The (main) category of the page"
158
  msgstr ""
159
 
160
+ #: aioseop_class.php:135 aioseop_class.php:152 aioseop_class.php:694
161
  msgid "%category% - Alias for %category_title%"
162
  msgstr ""
163
 
181
  msgid "Post Title Format:"
182
  msgstr ""
183
 
184
+ #: aioseop_class.php:150 aioseop_class.php:692
185
  msgid "%post_title% - The original title of the post"
186
  msgstr ""
187
 
188
+ #: aioseop_class.php:151 aioseop_class.php:693
189
  msgid "%category_title% - The (main) category of the post"
190
  msgstr ""
191
 
192
+ #: aioseop_class.php:153 aioseop_class.php:695
193
  msgid "%post_author_login% - This post's author' login"
194
  msgstr ""
195
 
196
+ #: aioseop_class.php:154 aioseop_class.php:696
197
  msgid "%post_author_nicename% - This post's author' nicename"
198
  msgstr ""
199
 
200
+ #: aioseop_class.php:155 aioseop_class.php:697
201
  msgid "%post_author_firstname% - This post's author' first name (capitalized)"
202
  msgstr ""
203
 
204
+ #: aioseop_class.php:156 aioseop_class.php:698
205
  msgid "%post_author_lastname% - This post's author' last name (capitalized)"
206
  msgstr ""
207
 
218
  msgstr ""
219
 
220
  #: aioseop_class.php:173
221
+ msgid "Date Archive Title Format:"
222
  msgstr ""
223
 
224
  #: aioseop_class.php:178
225
+ msgid "%date% - The original archive title given by wordpress, e.g. \"2007\" or \"2007 August\""
226
+ msgstr ""
227
+
228
+ #: aioseop_class.php:179
229
+ msgid "%day% - The original archive day given by wordpress, e.g. \"17\""
230
  msgstr ""
231
 
232
+ #: aioseop_class.php:180
233
+ msgid "%month% - The original archive month given by wordpress, e.g. \"August\""
234
+ msgstr ""
235
+
236
+ #: aioseop_class.php:181
237
+ msgid "%year% - The original archive year given by wordpress, e.g. \"2007\""
238
+ msgstr ""
239
+
240
+ #: aioseop_class.php:186
241
+ msgid "Author Archive Title Format:"
242
+ msgstr ""
243
+
244
+ #: aioseop_class.php:191
245
+ msgid "%author% - The original archive title given by wordpress, e.g. \"Steve\" or \"John Smith\""
246
+ msgstr ""
247
+
248
+ #: aioseop_class.php:196
249
  msgid "Tag Title Format:"
250
  msgstr ""
251
 
252
+ #: aioseop_class.php:201
253
  msgid "%tag% - The name of the tag"
254
  msgstr ""
255
 
256
+ #: aioseop_class.php:206
257
  msgid "Search Title Format:"
258
  msgstr ""
259
 
260
+ #: aioseop_class.php:211
261
  msgid "%search% - What was searched for"
262
  msgstr ""
263
 
264
+ #: aioseop_class.php:216
265
  msgid "Description Format"
266
  msgstr ""
267
 
268
+ #: aioseop_class.php:220
269
+ msgid "%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"
 
 
270
  msgstr ""
271
 
272
+ #: aioseop_class.php:221
273
  msgid "%wp_title% - The original wordpress title, e.g. post_title for posts"
274
  msgstr ""
275
 
276
+ #: aioseop_class.php:226
277
  msgid "404 Title Format:"
278
  msgstr ""
279
 
280
+ #: aioseop_class.php:230
281
+ msgid "%request_url% - The original URL path, like \"/url-that-does-not-exist/\""
 
282
  msgstr ""
283
 
284
+ #: aioseop_class.php:231
285
+ msgid "%request_words% - The URL path in human readable form, like \"Url That Does Not Exist\""
 
 
286
  msgstr ""
287
 
288
+ #: aioseop_class.php:232
289
  msgid "%404_title% - Additional 404 title input\""
290
  msgstr ""
291
 
292
+ #: aioseop_class.php:237
293
  msgid "Paged Format:"
294
  msgstr ""
295
 
296
+ #: aioseop_class.php:238
297
+ msgid "This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages)."
 
 
298
  msgstr ""
299
 
300
+ #: aioseop_class.php:240
301
  msgid "%page% - The page number"
302
  msgstr ""
303
 
304
+ #: aioseop_class.php:245
305
  msgid "SEO for Custom Post Types:"
306
  msgstr ""
307
 
308
+ #: aioseop_class.php:246
309
+ msgid "Check this if you want your enable AIOSEOP support for Custom Post Types on this site."
 
 
310
  msgstr ""
311
 
312
+ #: aioseop_class.php:253
313
  msgid "Enable Advanced Options:"
314
  msgstr ""
315
 
316
+ #: aioseop_class.php:254
317
  msgid "This allows you to do more with your custom post types."
318
  msgstr ""
319
 
320
+ #: aioseop_class.php:263
321
  msgid "SEO on only these post types:"
322
  msgstr ""
323
 
324
+ #: aioseop_class.php:264
325
  msgid "Select specific custom post types for AIOSEOP support."
326
  msgstr ""
327
 
328
+ #: aioseop_class.php:270
329
+ msgid "Default to NOINDEX:"
330
+ msgstr ""
331
+
332
+ #: aioseop_class.php:271
333
+ msgid "Select noindex robots meta on specific custom post types by default."
334
+ msgstr ""
335
+
336
+ #: aioseop_class.php:277
337
+ msgid "Default to NOFOLLOW:"
338
+ msgstr ""
339
+
340
+ #: aioseop_class.php:278
341
+ msgid "Select nofollow robots meta on specific custom post types by default."
342
+ msgstr ""
343
+
344
+ #: aioseop_class.php:284
345
  msgid "Custom titles:"
346
  msgstr ""
347
 
348
+ #: aioseop_class.php:285
349
  msgid "Allows setting specific custom titles for all post types."
350
  msgstr ""
351
 
352
+ #: aioseop_class.php:291
353
  msgid "Show Column Labels for Custom Post Types:"
354
  msgstr ""
355
 
356
+ #: aioseop_class.php:292
357
+ msgid "Choose which post types you want to have SEO columns on the edit.php screen. You can select as many as you like."
 
 
358
  msgstr ""
359
 
360
+ #: aioseop_class.php:296
361
  msgid "Display Menu In Admin Bar:"
362
  msgstr ""
363
 
364
+ #: aioseop_class.php:297
365
  msgid "Check this for easy access to settings from the admin menu bar."
366
  msgstr ""
367
 
368
+ #: aioseop_class.php:301
369
+ msgid "Display Menu At The Top:"
370
+ msgstr ""
371
+
372
+ #: aioseop_class.php:302
373
+ msgid "Check this for easy access to settings from the top of your WordPress Dashboard."
374
+ msgstr ""
375
+
376
+ #: aioseop_class.php:306
377
  msgid "Google Webmaster Tools:"
378
  msgstr ""
379
 
380
+ #: aioseop_class.php:307 aioseop_class.php:311 aioseop_class.php:315
381
+ msgid "Enter your verification code here to add a meta tag to your homepage to verify your site."
 
 
382
  msgstr ""
383
 
384
+ #: aioseop_class.php:310
385
  msgid "Bing Webmaster Center:"
386
  msgstr ""
387
 
388
+ #: aioseop_class.php:314
389
  msgid "Pinterest Site Verification:"
390
  msgstr ""
391
 
392
+ #: aioseop_class.php:318
393
  msgid "Google Plus Default Profile:"
394
  msgstr ""
395
 
396
+ #: aioseop_class.php:319
397
+ msgid "Enter your Google Plus Profile URL here to link your site's pages to Google Plus."
398
+ msgstr ""
399
+
400
+ #: aioseop_class.php:322
401
+ msgid "Disable Google Plus Profile:"
402
+ msgstr ""
403
+
404
+ #: aioseop_class.php:323
405
+ msgid "Check this option to remove the Google Plus Profile field on user profile pages."
406
  msgstr ""
407
 
408
+ #: aioseop_class.php:326
409
  msgid "Google Analytics ID:"
410
  msgstr ""
411
 
412
+ #: aioseop_class.php:327
413
+ msgid "Enter your Google Analytics ID here to track your site with Google Analytics."
 
414
  msgstr ""
415
 
416
+ #: aioseop_class.php:330
417
  msgid "Tracking Domain:"
418
  msgstr ""
419
 
420
+ #: aioseop_class.php:332
421
  msgid "Enter domain name for tracking with Google Analytics."
422
  msgstr ""
423
 
424
+ #: aioseop_class.php:335
425
  msgid "Track Multiple Domains:"
426
  msgstr ""
427
 
428
+ #: aioseop_class.php:336
429
  msgid "Enable multi-domain tracking for Google Analytics."
430
  msgstr ""
431
 
432
+ #: aioseop_class.php:340
433
  msgid "Track Outbound Links:"
434
  msgstr ""
435
 
436
+ #: aioseop_class.php:341
437
  msgid "Add functionality to track outbound links with Google Analytics."
438
  msgstr ""
439
 
440
+ #: aioseop_class.php:345
441
  msgid "Use Categories for META keywords:"
442
  msgstr ""
443
 
444
+ #: aioseop_class.php:346
445
+ msgid "Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page)."
 
 
 
446
  msgstr ""
447
 
448
+ #: aioseop_class.php:350
449
  msgid "Use Tags for META keywords:"
450
  msgstr ""
451
 
452
+ #: aioseop_class.php:351
453
+ msgid "Check this if you want your tags for a given post used as the META keywords for this post (in addition to any keywords you specify on the post edit page)."
 
 
 
454
  msgstr ""
455
 
456
+ #: aioseop_class.php:355
457
  msgid "Dynamically Generate Keywords for Posts Page:"
458
  msgstr ""
459
 
460
+ #: aioseop_class.php:356
461
+ msgid "Check this if you want your keywords on a custom posts page (set it in options->reading) to be dynamically generated from the keywords of the posts showing on that page. If unchecked, it will use the keywords set in the edit page screen for the posts page."
 
 
 
 
462
  msgstr ""
463
 
464
+ #: aioseop_class.php:360
465
  msgid "Use noindex for Categories:"
466
  msgstr ""
467
 
468
+ #: aioseop_class.php:361
469
+ msgid "Check this for excluding category pages from being crawled. Useful for avoiding duplicate content."
 
 
470
  msgstr ""
471
 
472
+ #: aioseop_class.php:364
473
+ msgid "Use noindex for Date Archives:"
474
  msgstr ""
475
 
476
+ #: aioseop_class.php:365
477
+ msgid "Check this for excluding Date Archive pages from being crawled. Useful for avoiding duplicate content."
 
 
478
  msgstr ""
479
 
480
+ #: aioseop_class.php:368
481
+ msgid "Use noindex for Author Archives:"
482
+ msgstr ""
483
+
484
+ #: aioseop_class.php:369
485
+ msgid "Check this for excluding Author Archive pages from being crawled. Useful for avoiding duplicate content."
486
+ msgstr ""
487
+
488
+ #: aioseop_class.php:372
489
  msgid "Use noindex for Tag Archives:"
490
  msgstr ""
491
 
492
+ #: aioseop_class.php:373
493
+ msgid "Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content."
 
 
494
  msgstr ""
495
 
496
+ #: aioseop_class.php:376
497
  msgid "Autogenerate Descriptions:"
498
  msgstr ""
499
 
500
+ #: aioseop_class.php:377
501
+ msgid "Check this and your META descriptions will get autogenerated if there's no excerpt."
 
 
502
  msgstr ""
503
 
504
+ #: aioseop_class.php:380
505
+ msgid "Remove Descriptions For Paginated Pages:"
506
+ msgstr ""
507
+
508
+ #: aioseop_class.php:381
509
+ msgid "Check this and your META descriptions will get hidden if on Page 2 or later of paginated content."
510
+ msgstr ""
511
+
512
+ #: aioseop_class.php:384
513
  msgid "Unprotect Post Meta Fields:"
514
  msgstr ""
515
 
516
+ #: aioseop_class.php:385
517
+ msgid "Unprotect internal postmeta fields for use with XMLRPC -- if you don't know what that is, leave it unchecked."
 
 
518
  msgstr ""
519
 
520
+ #: aioseop_class.php:388
521
  msgid "Exclude Pages:"
522
  msgstr ""
523
 
524
+ #: aioseop_class.php:389
525
+ msgid "Enter any comma separated pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/,/contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is give forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage will be excluded from All in One SEO Pack."
 
 
 
 
 
 
 
526
  msgstr ""
527
 
528
+ #: aioseop_class.php:392
529
  msgid "Additional Post Headers:"
530
  msgstr ""
531
 
532
+ #: aioseop_class.php:393
533
  msgid "What you enter here will be copied verbatim to your header on posts."
534
  msgstr ""
535
 
536
+ #: aioseop_class.php:393 aioseop_class.php:397 aioseop_class.php:401
537
+ #: aioseop_class.php:405
538
+ msgid "You can enter whatever additional headers you want here, even references to stylesheets."
 
 
539
  msgstr ""
540
 
541
+ #: aioseop_class.php:396
542
  msgid "Additional Page Headers:"
543
  msgstr ""
544
 
545
+ #: aioseop_class.php:397
546
  msgid "What you enter here will be copied verbatim to your header on pages."
547
  msgstr ""
548
 
549
+ #: aioseop_class.php:400
550
  msgid "Additional Front Page Headers:"
551
  msgstr ""
552
 
553
+ #: aioseop_class.php:401
554
+ msgid "What you enter here will be copied verbatim to your header on the front page if you have a static page set in Settings, Reading."
 
 
555
  msgstr ""
556
 
557
+ #: aioseop_class.php:401
558
+ msgid "This will fall back to using Additional Page Headers if you have them set and nothing is entered here."
 
 
559
  msgstr ""
560
 
561
+ #: aioseop_class.php:404
562
  msgid "Additional Blog Page Headers:"
563
  msgstr ""
564
 
565
+ #: aioseop_class.php:405
566
+ msgid "What you enter here will be copied verbatim to your header on the home page if you have Front page displays your latest posts selected in Settings, Reading.  It will also be copied verbatim to your header on the Posts page if you have one set in Settings, Reading."
 
 
 
 
567
  msgstr ""
568
 
569
+ #: aioseop_class.php:408
570
  msgid "Log important events:"
571
  msgstr ""
572
 
573
+ #: aioseop_class.php:409
574
+ msgid "Check this and SEO pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable."
 
 
 
575
  msgstr ""
576
 
577
+ #: aioseop_class.php:422
578
  msgid "Upgrade to All in One SEO Pack Pro Version"
579
  msgstr ""
580
 
581
+ #: aioseop_class.php:424
582
  msgid "Preview Snippet"
583
  msgstr ""
584
 
585
+ #: aioseop_class.php:424
586
  msgid "A preview of what this page might look like in search engine results."
587
  msgstr ""
588
 
589
+ #: aioseop_class.php:437
590
  msgid "Title"
591
  msgstr ""
592
 
593
+ #: aioseop_class.php:437
594
  msgid "A custom title that shows up in the title tag for this page."
595
  msgstr ""
596
 
597
+ #: aioseop_class.php:438
598
  msgid "Description"
599
  msgstr ""
600
 
601
+ #: aioseop_class.php:438
602
+ msgid "The META description for this page. This will override any autogenerated descriptions."
 
 
603
  msgstr ""
604
 
605
+ #: aioseop_class.php:439
606
  msgid "Keywords (comma separated)"
607
  msgstr ""
608
 
609
+ #: aioseop_class.php:439
610
+ msgid "A comma separated list of your most important keywords for this page that will be written as META keywords."
 
 
611
  msgstr ""
612
 
613
+ #: aioseop_class.php:440
614
  msgid "Robots Meta NOINDEX"
615
  msgstr ""
616
 
617
+ #: aioseop_class.php:440
618
  msgid "Check this box to ask search engines not to index this page."
619
  msgstr ""
620
 
621
+ #: aioseop_class.php:441
622
  msgid "Robots Meta NOFOLLOW"
623
  msgstr ""
624
 
625
+ #: aioseop_class.php:441
626
+ msgid "Check this box to ask search engines not to follow links from this page."
 
627
  msgstr ""
628
 
629
+ #: aioseop_class.php:442
630
+ msgid "Robots Meta NOODP"
631
+ msgstr ""
632
+
633
+ #: aioseop_class.php:442
634
+ msgid "Check this box to ask search engines not to use descriptions from the Open Directory Project for this page."
635
+ msgstr ""
636
+
637
+ #: aioseop_class.php:443
638
+ msgid "Robots Meta NOYDIR"
639
+ msgstr ""
640
+
641
+ #: aioseop_class.php:443
642
+ msgid "Check this box to ask Yahoo! not to use descriptions from the Yahoo! directory for this page."
643
+ msgstr ""
644
+
645
+ #: aioseop_class.php:444
646
  msgid "Title Attribute"
647
  msgstr ""
648
 
649
+ #: aioseop_class.php:444
650
  msgid "Set the title attribute for menu links."
651
  msgstr ""
652
 
653
+ #: aioseop_class.php:445
654
  msgid "Menu Label"
655
  msgstr ""
656
 
657
+ #: aioseop_class.php:445
658
  msgid "Set the label for this page menu item."
659
  msgstr ""
660
 
661
+ #: aioseop_class.php:446
662
+ msgid "Exclude From Sitemap"
663
+ msgstr ""
664
+
665
+ #: aioseop_class.php:446
666
+ msgid "Don't display this page in the sitemap."
667
+ msgstr ""
668
+
669
+ #: aioseop_class.php:447
670
  msgid "Disable on this page/post"
671
  msgstr ""
672
 
673
+ #: aioseop_class.php:447
674
  msgid "Disable SEO on this page."
675
  msgstr ""
676
 
677
+ #: aioseop_class.php:448
678
  msgid "Disable Google Analytics"
679
  msgstr ""
680
 
681
+ #: aioseop_class.php:448
682
  msgid "Disable Google Analytics on this page."
683
  msgstr ""
684
 
685
+ #: aioseop_class.php:458
686
  msgid "Home Page Settings"
687
  msgstr ""
688
 
689
+ #: aioseop_class.php:462
690
  msgid "Keyword Settings"
691
  msgstr ""
692
 
693
+ #: aioseop_class.php:466
694
  msgid "Title Settings"
695
  msgstr ""
696
 
697
+ #: aioseop_class.php:471
698
  msgid "Custom Post Type Settings"
699
  msgstr ""
700
 
701
+ #: aioseop_class.php:475
702
  msgid "Display Settings"
703
  msgstr ""
704
 
705
+ #: aioseop_class.php:479
706
  msgid "Webmaster Verification"
707
  msgstr ""
708
 
709
+ #: aioseop_class.php:483
710
  msgid "Google Settings"
711
  msgstr ""
712
 
713
+ #: aioseop_class.php:487
714
  msgid "Noindex Settings"
715
  msgstr ""
716
 
717
+ #: aioseop_class.php:491
718
  msgid "Advanced Settings"
719
  msgstr ""
720
 
721
+ #: aioseop_class.php:687
722
  msgid "Title Format:"
723
  msgstr ""
724
 
725
+ #: aioseop_class.php:715
726
  msgid "Welcome to Version %s!"
727
  msgstr ""
728
 
729
+ #: aioseop_class.php:716
730
+ msgid "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!"
731
+ msgstr ""
732
+
733
+ #: aioseop_class.php:722
734
+ msgid "Review Your Settings"
735
  msgstr ""
736
 
737
+ #: aioseop_class.php:723
738
+ msgid "Thank you for running the latest and greatest All in One SEO Pack ever! New in 2.0: manage your performance with our Performance module; enable it from our new feature manager! And please review your settings, we have added some new ones!"
739
+ msgstr ""
740
+
741
+ #: aioseop_class.php:742
742
  msgid "Reset General Settings to Defaults"
743
  msgstr ""
744
 
745
+ #: aioseop_class.php:743
746
  msgid "Reset ALL Settings to Defaults"
747
  msgstr ""
748
 
749
+ #: aioseop_class.php:794
750
+ msgid "Default - noindex"
751
+ msgstr ""
752
+
753
+ #: aioseop_class.php:794
754
+ msgid "index"
755
+ msgstr ""
756
+
757
+ #: aioseop_class.php:794
758
+ msgid "noindex"
759
+ msgstr ""
760
+
761
+ #: aioseop_class.php:798
762
+ msgid "Default - nofollow"
763
+ msgstr ""
764
+
765
+ #: aioseop_class.php:798
766
+ msgid "follow"
767
+ msgstr ""
768
+
769
+ #: aioseop_class.php:798
770
+ msgid "nofollow"
771
+ msgstr ""
772
+
773
+ #: aioseop_class.php:857
774
  msgid "All in One SEO Plugin Support Forum"
775
  msgstr ""
776
 
777
+ #: aioseop_class.php:858
778
  msgid "Support Forum"
779
  msgstr ""
780
 
781
+ #: aioseop_class.php:859
782
  msgid "Pro Version"
783
  msgstr ""
784
 
785
+ #: aioseop_class.php:861
786
  msgid "UPGRADE TO PRO VERSION"
787
  msgstr ""
788
 
789
+ #: aioseop_class.php:876
790
  msgid "Donate"
791
  msgstr ""
792
 
793
+ #: aioseop_class.php:878
794
  msgid "Donate with Paypal"
795
  msgstr ""
796
 
797
+ #: aioseop_class.php:880
798
  msgid "My Amazon Wish List"
799
  msgstr ""
800
 
801
+ #: aioseop_class.php:881
802
  msgid "Follow us on Facebook"
803
  msgstr ""
804
 
805
+ #: aioseop_class.php:882
806
  msgid "Follow us on Twitter"
807
  msgstr ""
808
 
809
+ #: aioseop_class.php:893
810
+ msgid "Join our mailing list for tips, tricks, and WordPress secrets."
811
+ msgstr ""
812
+
813
+ #: aioseop_class.php:894
814
+ msgid "Sign up today and receive a free copy of the e-book 5 SEO Tips for WordPress ($39 value)."
815
  msgstr ""
816
 
817
+ #: aioseop_class.php:903
818
+ msgid "For support please visit the Semper Plugins Support Forum at http://semperplugins.com/support/"
819
  msgstr ""
820
 
821
+ #: aioseop_class.php:2022
822
+ msgid "SEO"
823
+ msgstr ""
824
+
825
+ #: aioseop_class.php:2027
826
+ msgid "Edit SEO"
827
+ msgstr ""
828
+
829
+ #: aioseop_class.php:2033
830
+ msgid "Upgrade To Pro"
831
+ msgstr ""
832
+
833
+ #: aioseop_class.php:2042
834
  msgid "All in One SEO"
835
  msgstr ""
836
 
837
+ #: aioseop_class.php:2085
838
  msgid "Thank you!"
839
  msgstr ""
840
 
841
+ #: aioseop_class.php:2086
842
+ msgid "Thank you for your donation, it helps keep this plugin free and actively developed!"
 
 
843
  msgstr ""
844
 
845
+ #: aioseop_class.php:2150
846
  msgid "Main Settings"
847
  msgstr ""
848
 
850
  msgid "Feature Manager"
851
  msgstr ""
852
 
853
+ #: aioseop_feature_manager.php:19
854
+ msgid "XML Sitemaps"
855
+ msgstr ""
856
+
857
+ #: aioseop_feature_manager.php:20
858
+ msgid "Create and manage your XML Sitemaps using this feature and submit your XML Sitemap to Google, Bing/Yahoo and Ask.com."
859
+ msgstr ""
860
+
861
+ #: aioseop_feature_manager.php:21 aioseop_performance.php:14
862
  msgid "Performance"
863
  msgstr ""
864
 
865
+ #: aioseop_feature_manager.php:22
866
  msgid "Optimize performance related to SEO and check your system status."
867
  msgstr ""
868
 
869
+ #: aioseop_feature_manager.php:24
870
  msgid "Coming Soon..."
871
  msgstr ""
872
 
873
+ #: aioseop_feature_manager.php:25
874
+ msgid "Social Meta"
875
  msgstr ""
876
 
877
+ #: aioseop_feature_manager.php:69
878
  msgid "Update Features"
879
  msgstr ""
880
 
881
+ #: aioseop_feature_manager.php:71
882
  msgid "Reset Features"
883
  msgstr ""
884
 
885
+ #: aioseop_functions.php:132
 
 
 
 
886
  msgid "SEO Title"
887
  msgstr ""
888
 
889
+ #: aioseop_functions.php:133
890
+ msgid "SEO Description"
891
  msgstr ""
892
 
893
+ #: aioseop_functions.php:135
894
+ msgid "SEO Keywords"
895
  msgstr ""
896
 
897
+ #: aioseop_functions.php:173 aioseop_functions.php:197
898
+ #: aioseop_functions.php:373
899
  msgid "Edit"
900
  msgstr ""
901
 
902
+ #: aioseop_functions.php:173
903
  msgid "Post"
904
  msgstr ""
905
 
906
+ #: aioseop_functions.php:173
907
  msgid "Save"
908
  msgstr ""
909
 
910
+ #: aioseop_functions.php:173
911
  msgid "Cancel"
912
  msgstr ""
913
 
914
+ #: aioseop_functions.php:174
915
  msgid "Please wait..."
916
  msgstr ""
917
 
918
+ #: aioseop_functions.php:174
919
  msgid "Slug may not be empty!"
920
  msgstr ""
921
 
922
+ #: aioseop_functions.php:175
923
  msgid "Revisions"
924
  msgstr ""
925
 
926
+ #: aioseop_functions.php:175
927
  msgid "Insert time"
928
  msgstr ""
929
 
930
+ #: aioseop_functions.php:195 aioseop_performance.php:144
931
  #: aioseop_performance.php:146 aioseop_performance.php:148
932
  #: aioseop_performance.php:161
933
  msgid "No"
934
  msgstr ""
935
 
936
+ #: aioseop_functions.php:212
937
  msgid "Unauthorized access; try reloading the page."
938
  msgstr ""
939
 
940
+ #: aioseop_functions.php:269
941
+ msgid "Row %s not found; no rows were deleted."
942
+ msgstr ""
943
+
944
+ #: aioseop_functions.php:484
945
  msgid "Google+"
946
  msgstr ""
947
 
948
+ #: aioseop_module_class.php:978
949
  msgid " characters. Most search engines use a maximum of %s chars for the %s."
950
  msgstr ""
951
 
952
+ #: aioseop_module_class.php:1001
953
  msgid "Click for Help!"
954
  msgstr ""
955
 
956
+ #: aioseop_module_class.php:1126 aioseop_sitemap.php:369
957
+ msgid "Security Check - If you receive this in error, log out and back in to WordPress"
 
 
958
  msgstr ""
959
 
960
+ #: aioseop_module_class.php:1128
961
  msgid "Options Reset."
962
  msgstr ""
963
 
964
+ #: aioseop_module_class.php:1137
965
  msgid "All in One SEO Options Updated."
966
  msgstr ""
967
 
968
+ #: aioseop_module_class.php:1182
969
  msgid "Update Options"
970
  msgstr ""
971
 
974
  msgstr ""
975
 
976
  #: aioseop_performance.php:20
977
+ msgid "Allows you to raise your PHP memory limit to a reasonable value. Note: WordPress core and other WordPress plugins may also change the value of the memory limit."
 
 
 
978
  msgstr ""
979
 
980
  #: aioseop_performance.php:23 aioseop_performance.php:28
1116
  msgid "Form submission error: verification check failed."
1117
  msgstr ""
1118
 
1119
+ #: aioseop_performance.php:226
 
 
 
 
1120
  msgid "SFWD Debug Mail From Site %s."
1121
  msgstr ""
1122
 
1123
+ #: aioseop_performance.php:227
1124
  msgid "Sent to %s."
1125
  msgstr ""
1126
 
1127
+ #: aioseop_performance.php:229
1128
  msgid "Failed to send to %s."
1129
  msgstr ""
1130
 
1131
+ #: aioseop_performance.php:232
1132
  msgid "Error: please enter an e-mail address before submitting."
1133
  msgstr ""
1134
 
1135
+ #: aioseop_performance.php:237
1136
  msgid "E-mail debug information"
1137
  msgstr ""
1138
 
1139
+ #: aioseop_performance.php:238
1140
  msgid "Submit"
1141
  msgstr ""
1142
 
1143
+ #: aioseop_sitemap.php:18
1144
+ msgid "XML Sitemap"
1145
+ msgstr ""
1146
+
1147
+ #: aioseop_sitemap.php:22
1148
+ msgid "Sitemap %s generated by All in One SEO Pack %s by Michael Torbert of Semper Fi Web Design on %s"
1149
+ msgstr ""
1150
+
1151
+ #: aioseop_sitemap.php:26
1152
+ msgid "Filename Prefix"
1153
+ msgstr ""
1154
+
1155
+ #: aioseop_sitemap.php:27
1156
+ msgid "The prefix for your sitemap file name. This will default to \"sitemap.\""
1157
+ msgstr ""
1158
+
1159
+ #: aioseop_sitemap.php:29
1160
+ msgid "Notify Google"
1161
+ msgstr ""
1162
+
1163
+ #: aioseop_sitemap.php:30
1164
+ msgid "Notify Google when you update your sitemap settings."
1165
+ msgstr ""
1166
+
1167
+ #: aioseop_sitemap.php:31
1168
+ msgid "Notify Bing"
1169
+ msgstr ""
1170
+
1171
+ #: aioseop_sitemap.php:32
1172
+ msgid "Notify Bing when you update your sitemap settings."
1173
+ msgstr ""
1174
+
1175
+ #: aioseop_sitemap.php:33
1176
+ msgid "Enable Sitemap Indexes"
1177
+ msgstr ""
1178
+
1179
+ #: aioseop_sitemap.php:34
1180
+ msgid "Organize sitemap entries into distinct files in your sitemap."
1181
+ msgstr ""
1182
+
1183
+ #: aioseop_sitemap.php:35
1184
+ msgid "Paginate Sitemap Indexes"
1185
+ msgstr ""
1186
+
1187
+ #: aioseop_sitemap.php:36
1188
+ msgid "Splits long sitemaps into separate files."
1189
+ msgstr ""
1190
+
1191
+ #: aioseop_sitemap.php:38
1192
+ msgid "Maximum Posts Per Sitemap"
1193
+ msgstr ""
1194
+
1195
+ #: aioseop_sitemap.php:39
1196
+ msgid "Allows you to specify the maximum number of posts in a sitemap (up to 50,000)."
1197
+ msgstr ""
1198
+
1199
+ #: aioseop_sitemap.php:42
1200
+ msgid "Post Types"
1201
+ msgstr ""
1202
+
1203
+ #: aioseop_sitemap.php:43
1204
+ msgid "Select which post types appear in your sitemap."
1205
+ msgstr ""
1206
+
1207
+ #: aioseop_sitemap.php:45
1208
+ msgid "Taxonomies"
1209
+ msgstr ""
1210
+
1211
+ #: aioseop_sitemap.php:46
1212
+ msgid "Select which taxonomy archives appear in your sitemap."
1213
+ msgstr ""
1214
+
1215
+ #: aioseop_sitemap.php:48
1216
+ msgid "Include Date Archive Pages"
1217
+ msgstr ""
1218
+
1219
+ #: aioseop_sitemap.php:49
1220
+ msgid "Include date archive pages in your sitemap."
1221
+ msgstr ""
1222
+
1223
+ #: aioseop_sitemap.php:50
1224
+ msgid "Include Author Pages"
1225
+ msgstr ""
1226
+
1227
+ #: aioseop_sitemap.php:51
1228
+ msgid "Include author archive pages in your sitemap."
1229
+ msgstr ""
1230
+
1231
+ #: aioseop_sitemap.php:52
1232
+ msgid "Create Compressed Sitemap"
1233
+ msgstr ""
1234
+
1235
+ #: aioseop_sitemap.php:53
1236
+ msgid "Create a compressed sitemap file in .xml.gz format"
1237
+ msgstr ""
1238
+
1239
+ #: aioseop_sitemap.php:54
1240
+ msgid "Link From Virtual Robots.txt"
1241
+ msgstr ""
1242
+
1243
+ #: aioseop_sitemap.php:55
1244
+ msgid "Places a link to your Sitemap.xml into your virtual Robots.txt file."
1245
+ msgstr ""
1246
+
1247
+ #: aioseop_sitemap.php:56
1248
+ msgid "Dynamically Generate Sitemap"
1249
+ msgstr ""
1250
+
1251
+ #: aioseop_sitemap.php:57
1252
+ msgid "Use rewrites to generate your sitemap on the fly. NOTE: This is required for WordPress Multisite."
1253
+ msgstr ""
1254
+
1255
+ #: aioseop_sitemap.php:63
1256
+ msgid "Debug Log"
1257
+ msgstr ""
1258
+
1259
+ #: aioseop_sitemap.php:64
1260
+ msgid "Debug messages and status information for sitemap."
1261
+ msgstr ""
1262
+
1263
+ #: aioseop_sitemap.php:69
1264
+ msgid "Sitemap Status"
1265
+ msgstr ""
1266
+
1267
+ #: aioseop_sitemap.php:88
1268
+ msgid "priority"
1269
+ msgstr ""
1270
+
1271
+ #: aioseop_sitemap.php:88
1272
+ msgid "frequency"
1273
+ msgstr ""
1274
+
1275
+ #: aioseop_sitemap.php:91
1276
+ msgid "homepage"
1277
+ msgstr ""
1278
+
1279
+ #: aioseop_sitemap.php:92
1280
+ msgid "posts"
1281
+ msgstr ""
1282
+
1283
+ #: aioseop_sitemap.php:93
1284
+ msgid "taxonomies"
1285
+ msgstr ""
1286
+
1287
+ #: aioseop_sitemap.php:94
1288
+ msgid "archive pages"
1289
+ msgstr ""
1290
+
1291
+ #: aioseop_sitemap.php:95
1292
+ msgid "author pages"
1293
+ msgstr ""
1294
+
1295
+ #: aioseop_sitemap.php:97
1296
+ msgid "Manually set the %s of your %s."
1297
+ msgstr ""
1298
+
1299
+ #: aioseop_sitemap.php:104
1300
+ msgid "Enter information below for any additional links for your sitemap not already managed through WordPress."
1301
+ msgstr ""
1302
+
1303
+ #: aioseop_sitemap.php:105
1304
+ msgid "Page URL"
1305
+ msgstr ""
1306
+
1307
+ #: aioseop_sitemap.php:105
1308
+ msgid "URL to the page."
1309
+ msgstr ""
1310
+
1311
+ #: aioseop_sitemap.php:106
1312
+ msgid "Page Priority"
1313
+ msgstr ""
1314
+
1315
+ #: aioseop_sitemap.php:106
1316
+ msgid "The priority of the page."
1317
+ msgstr ""
1318
+
1319
+ #: aioseop_sitemap.php:107
1320
+ msgid "Page Frequency"
1321
+ msgstr ""
1322
+
1323
+ #: aioseop_sitemap.php:107
1324
+ msgid "The frequency of the page."
1325
+ msgstr ""
1326
+
1327
+ #: aioseop_sitemap.php:108
1328
+ msgid "Last Modified"
1329
+ msgstr ""
1330
+
1331
+ #: aioseop_sitemap.php:108
1332
+ msgid "Last modified date of the page."
1333
+ msgstr ""
1334
+
1335
+ #: aioseop_sitemap.php:109 aioseop_sitemap.php:119
1336
+ msgid "Additional Pages"
1337
+ msgstr ""
1338
+
1339
+ #: aioseop_sitemap.php:110
1340
+ msgid "Add URL"
1341
+ msgstr ""
1342
+
1343
+ #: aioseop_sitemap.php:114
1344
+ msgid "Excluded Categories"
1345
+ msgstr ""
1346
+
1347
+ #: aioseop_sitemap.php:114
1348
+ msgid "Entries from these categories will be excluded from the sitemap."
1349
+ msgstr ""
1350
+
1351
+ #: aioseop_sitemap.php:115
1352
+ msgid "Excluded Pages"
1353
+ msgstr ""
1354
+
1355
+ #: aioseop_sitemap.php:115
1356
+ msgid "Use page slugs or page IDs, seperated by commas, to exclude pages from the sitemap."
1357
+ msgstr ""
1358
+
1359
+ #: aioseop_sitemap.php:124
1360
+ msgid "Excluded Items"
1361
+ msgstr ""
1362
+
1363
+ #: aioseop_sitemap.php:129
1364
+ msgid "Priorities"
1365
+ msgstr ""
1366
+
1367
+ #: aioseop_sitemap.php:134
1368
+ msgid "Frequencies"
1369
+ msgstr ""
1370
+
1371
+ #: aioseop_sitemap.php:188
1372
+ msgid "Media / Attachments"
1373
+ msgstr ""
1374
+
1375
+ #: aioseop_sitemap.php:189
1376
+ msgid "All Post Types"
1377
+ msgstr ""
1378
+
1379
+ #: aioseop_sitemap.php:190
1380
+ msgid "All Taxonomies"
1381
+ msgstr ""
1382
+
1383
+ #: aioseop_sitemap.php:208 aioseop_sitemap.php:240
1384
+ msgid "Update Sitemap"
1385
+ msgstr ""
1386
+
1387
+ #: aioseop_sitemap.php:238
1388
+ msgid "Please review your settings below and click %s to build your sitemap; then, %s."
1389
+ msgstr ""
1390
+
1391
+ #: aioseop_sitemap.php:241
1392
+ msgid "view your sitemap"
1393
+ msgstr ""
1394
+
1395
+ #: aioseop_sitemap.php:244
1396
+ msgid "Note: you are using dynamic sitemap generation to keep your sitemap current; this will not generate a static sitemap file."
1397
+ msgstr ""
1398
+
1399
+ #: aioseop_sitemap.php:248
1400
+ msgid "Dynamic sitemap generation appears to be using the correct rewrite rules."
1401
+ msgstr ""
1402
+
1403
+ #: aioseop_sitemap.php:250
1404
+ msgid "Dynamic sitemap generation does not appear to be using the correct rewrite rules; please disable any other sitemap plugins or functionality on your site and reset your permalinks."
1405
+ msgstr ""
1406
+
1407
+ #: aioseop_sitemap.php:255
1408
+ msgid "Reading Settings"
1409
+ msgstr ""
1410
+
1411
+ #: aioseop_sitemap.php:257
1412
+ msgid "Privacy Settings"
1413
+ msgstr ""
1414
+
1415
+ #: aioseop_sitemap.php:259
1416
+ msgid "Warning: your privacy settings are configured to ask search engines to not index your site; you can change this under %s for your blog."
1417
+ msgstr ""
1418
+
1419
+ #: aioseop_sitemap.php:365
1420
+ msgid "Warning: dynamic sitemap generation must have permalinks enabled."
1421
+ msgstr ""
1422
+
1423
+ #: aioseop_sitemap.php:378
1424
+ msgid "Deleted %s."
1425
+ msgstr ""
1426
+
1427
+ #: aioseop_sitemap.php:387
1428
+ msgid "Couldn't rename file %s!"
1429
+ msgstr ""
1430
+
1431
+ #: aioseop_sitemap.php:391
1432
+ msgid "Renamed %s to %s."
1433
+ msgstr ""
1434
+
1435
+ #: aioseop_sitemap.php:393
1436
+ msgid "Couldn't find file %s!"
1437
+ msgstr ""
1438
+
1439
+ #: aioseop_sitemap.php:445
1440
+ msgid "Warning: a static sitemap '%s' generated by All in One SEO Pack %s on %s already exists that may conflict with dynamic sitemap generation."
1441
+ msgstr ""
1442
+
1443
+ #: aioseop_sitemap.php:450
1444
+ msgid "Potential conflict with unknown file %s."
1445
+ msgstr ""
1446
+
1447
+ #: aioseop_sitemap.php:469
1448
+ msgid "Rename Conflicting Files"
1449
+ msgstr ""
1450
+
1451
+ #: aioseop_sitemap.php:470
1452
+ msgid "Delete Conflicting Files"
1453
+ msgstr ""
1454
+
1455
+ #: aioseop_sitemap.php:559
1456
+ msgid "compressed"
1457
+ msgstr ""
1458
+
1459
+ #: aioseop_sitemap.php:561
1460
+ msgid "dynamic"
1461
+ msgstr ""
1462
+
1463
+ #: aioseop_sitemap.php:563
1464
+ msgid "static"
1465
+ msgstr ""
1466
+
1467
+ #: aioseop_sitemap.php:599
1468
+ msgid "dynamically"
1469
+ msgstr ""
1470
+
1471
+ #: aioseop_sitemap.php:641
1472
+ msgid "Successfully notified %s about changes to your sitemap at %s."
1473
+ msgstr ""
1474
+
1475
+ #: aioseop_sitemap.php:643
1476
+ msgid "Failed to notify %s about changes to your sitemap at %s, error code %s."
1477
+ msgstr ""
1478
+
1479
+ #: aioseop_sitemap.php:646
1480
+ msgid "Failed to notify %s about changes to your sitemap at %s, unable to access via wp_remote_get()."
1481
+ msgstr ""
1482
+
1483
+ #: aioseop_sitemap.php:649
1484
+ msgid "Did not notify %s about changes to your sitemap."
1485
+ msgstr ""
1486
+
1487
+ #: aioseop_sitemap.php:676 aioseop_sitemap.php:783
1488
+ msgid "file '%s' statically"
1489
+ msgstr ""
1490
+
1491
+ #: aioseop_sitemap.php:685
1492
+ msgid "Updated sitemap settings."
1493
  msgstr ""
1494
 
1495
  #: all_in_one_seo_pack.php:43
1496
  msgid "%s detected a conflict; please deactivate the plugin located in %s."
1497
  msgstr ""
 
1498
  #. Plugin Name of the plugin/theme
1499
  msgid "All In One SEO Pack"
1500
  msgstr ""
1504
  msgstr ""
1505
 
1506
  #. Description of the plugin/theme
1507
+ msgid "Out-of-the-box SEO for your WordPress blog. <a href=\"admin.php?page=all-in-one-seo-pack/aioseop_class.php\">Options configuration panel</a> | <a href=\"http://semperplugins.com/plugins/\">Upgrade to Pro Version</a> | <a 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\">Donate</a> | <a href=\"http://semperplugins.com/support/\" >Support</a> | <a href=\"https://www.amazon.com/wishlist/1NFQ133FNCOOA/ref=wl_web\" target=\"_blank\" title=\"Amazon Wish List\">Amazon Wishlist</a>"
 
 
 
 
 
 
 
 
 
 
1508
  msgstr ""
1509
 
1510
  #. Author of the plugin/theme
images/Default-Color-Retina.png CHANGED
Binary file
images/Hostgator--AN-9-8-2013-445x220.gif ADDED
Binary file
images/XMLSitemaps-BW-Retina.png ADDED
Binary file
images/XMLSitemaps-BW-Standard.png ADDED
Binary file
images/XMLSitemaps-Color-Retina.png ADDED
Binary file
images/XMLSitemaps-Color-Standard.png ADDED
Binary file
images/cog_edit.png CHANGED
Binary file
images/facebook-follow-retina.png CHANGED
Binary file
images/facebook-follow-standard.png CHANGED
Binary file
images/headwaybanner.png CHANGED
Binary file
images/shield32fade.png CHANGED
Binary file
images/shield64.png CHANGED
Binary file
images/twitter-follow-retina.png CHANGED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: hallsofmontezuma
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: seo, search engine optimization, google
5
  Requires at least: 3.3
6
- Tested up to: 3.5.1
7
  Stable tag: trunk
8
 
9
  WordPress SEO plugin to automatically optimize your Wordpress blog for Search Engines.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8
4
  Tags: seo, search engine optimization, google
5
  Requires at least: 3.3
6
+ Tested up to: 3.6
7
  Stable tag: trunk
8
 
9
  WordPress SEO plugin to automatically optimize your Wordpress blog for Search Engines.
sitemap.xsl ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet version="2.0"
3
+ xmlns:html="http://www.w3.org/TR/REC-html40"
4
+ xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"
5
+ xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
6
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
8
+ <xsl:template match="/">
9
+ <xsl:variable name="fileType">
10
+ <xsl:choose>
11
+ <xsl:when test="//sitemap:url">Sitemap</xsl:when>
12
+ <xsl:otherwise>SitemapIndex</xsl:otherwise>
13
+ </xsl:choose>
14
+ </xsl:variable>
15
+ <html xmlns="http://www.w3.org/1999/xhtml">
16
+ <head>
17
+ <title>
18
+ <xsl:choose><xsl:when test="$fileType='Sitemap'">Sitemap</xsl:when>
19
+ <xsl:otherwise>Sitemap Index</xsl:otherwise>
20
+ </xsl:choose>
21
+ </title>
22
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
23
+ <style type="text/css">
24
+ body {
25
+ font-family: Helvetica, Arial, sans-serif;
26
+ font-size: 68.5%;
27
+ }
28
+ table {
29
+ border: none;
30
+ border-collapse: collapse;
31
+ }
32
+ table { font-size:1em; width:75% }
33
+ th { text-align:left; padding:5px }
34
+ tr.stripe { background-color:#f7f7f7; }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <div id="content">
39
+ <h1>XML Sitemap</h1>
40
+ <div>
41
+ <p><xsl:choose>
42
+ <xsl:when test="$fileType='Sitemap'">
43
+ This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of> URLs</xsl:when>
44
+ <xsl:otherwise>This sitemap index contains <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of> sitemaps</xsl:otherwise>
45
+ </xsl:choose></p>
46
+ </div>
47
+ <xsl:choose>
48
+ <xsl:when test="$fileType='Sitemap'">
49
+ <xsl:call-template name="sitemapTable"/></xsl:when>
50
+ <xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise>
51
+ </xsl:choose>
52
+
53
+ </div>
54
+ </body>
55
+ </html>
56
+ </xsl:template>
57
+ <xsl:template name="siteindexTable">
58
+ <table cellpadding="3">
59
+ <thead>
60
+ <tr>
61
+ <th width="50%">URL</th>
62
+ <th>LastChange</th>
63
+ </tr>
64
+ </thead>
65
+ <tbody>
66
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
67
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
68
+ <xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap">
69
+ <tr>
70
+ <xsl:if test="position() mod 2 != 1">
71
+ <xsl:attribute name="class">stripe</xsl:attribute>
72
+ </xsl:if>
73
+ <td>
74
+ <xsl:variable name="itemURL">
75
+ <xsl:value-of select="sitemap:loc"/>
76
+ </xsl:variable>
77
+ <a href="{$itemURL}">
78
+ <xsl:value-of select="sitemap:loc"/>
79
+ </a>
80
+ </td>
81
+ <td>
82
+ <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/>
83
+ </td>
84
+ </tr>
85
+ </xsl:for-each>
86
+ </tbody>
87
+ </table>
88
+ </xsl:template>
89
+ <xsl:template name="sitemapTable">
90
+ <table cellpadding="3">
91
+ <thead>
92
+ <tr>
93
+ <th width="50%">URL</th>
94
+ <th>Priority</th>
95
+ <th>Change Frequency</th>
96
+ <th>LastChange</th>
97
+ </tr>
98
+ </thead>
99
+ <tbody>
100
+ <xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/>
101
+ <xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
102
+ <xsl:for-each select="sitemap:urlset/sitemap:url">
103
+ <tr>
104
+ <xsl:if test="position() mod 2 != 1">
105
+ <xsl:attribute name="class">stripe</xsl:attribute>
106
+ </xsl:if>
107
+ <td>
108
+ <xsl:variable name="itemURL">
109
+ <xsl:value-of select="sitemap:loc"/>
110
+ </xsl:variable>
111
+ <a href="{$itemURL}">
112
+ <xsl:value-of select="sitemap:loc"/>
113
+ </a>
114
+ </td>
115
+ <td>
116
+ <xsl:if test="string(number(sitemap:priority))!='NaN'">
117
+ <xsl:value-of select="concat(sitemap:priority*100,'%')"/>
118
+ </xsl:if>
119
+ </td>
120
+ <td>
121
+ <xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/>
122
+ </td>
123
+ <td>
124
+ <xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/>
125
+ </td>
126
+ </tr>
127
+ </xsl:for-each>
128
+ </tbody>
129
+ </table>
130
+ </xsl:template>
131
+ </xsl:stylesheet>