Changeset 933964
- Timestamp:
- 06/17/2014 09:21:57 PM (10 years ago)
- Location:
- all-in-one-seo-pack
- Files:
-
- 1 added
- 7 edited
- 49 copied
Legend:
- Unmodified
- Added
- Removed
-
all-in-one-seo-pack/tags/2.1.7/aioseop_class.php
r925168 r933964 185 185 "tags_noindex" => __( "Check this to ask search engines not to index Tag Archives. Useful for avoiding duplicate content.<br /><a href='http://semperplugins.com/documentation/noindex-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 186 186 "search_noindex" => __( "Check this to ask search engines not to index the Search page. Useful for avoiding duplicate content.<br /><a href='http://semperplugins.com/documentation/noindex-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 187 188 187 189 "generate_descriptions" => __( "Check this and your Meta Descriptions will be auto-generated from your excerpt or content.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 188 190 "hide_paginated_descriptions"=> __( "Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 191 189 192 "unprotect_meta" => __( "Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 190 193 "ex_pages" => __( "Enter a comma separated list of pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage here and it will be excluded from All in One SEO Pack.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), … … 441 444 'name' => __( 'Use noindex for the Search page:', 'all_in_one_seo_pack' ), 442 445 'default' => 0), 446 447 448 449 450 451 443 452 "generate_descriptions"=> Array( 444 453 'name' => __( 'Autogenerate Descriptions:', 'all_in_one_seo_pack' ), … … 447 456 'name' => __( 'Remove Descriptions For Paginated Pages:', 'all_in_one_seo_pack' ), 448 457 'default' => 0), 458 459 460 449 461 "unprotect_meta"=> Array( 450 462 'name' => __( 'Unprotect Post Meta Fields:', 'all_in_one_seo_pack' ), … … 563 575 'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ), 564 576 'help_link' => 'http://semperplugins.com/documentation/noindex-settings/', 565 'options' => Array( 'cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex', 'search_noindex' )577 'options' => Array( 'cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex', 'search_noindex' ) 566 578 ), 567 579 'advanced' => Array( 568 580 'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ), 569 581 'help_link' => 'http://semperplugins.com/documentation/advanced-settings/', 570 'options' => Array( 'generate_descriptions', 'hide_paginated_descriptions', ' unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' )582 'options' => Array( 'generate_descriptions', 'hide_paginated_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' ) 571 583 ) 572 584 ); … … 643 655 $title_format = $this->get_post_title_format(); 644 656 } 657 645 658 if ( empty( $title_format ) ) { 646 659 $title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>'; … … 648 661 $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format ); 649 662 $title_format = $this->apply_cf_fields( $title_format ); 650 $title_format = str_replace( '%post_title%', '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>', $title_format ); 651 $title_format = str_replace( '%page_title%', '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>', $title_format ); 663 $replace_title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>'; 664 $title_format = str_replace( '%post_title%', $replace_title, $title_format ); 665 $title_format = str_replace( '%page_title%', $replace_title, $title_format ); 652 666 $title_format = preg_replace( '/%([^%]*?)%/', '', $title_format ); 653 667 $title = $title_format; 668 654 669 } 655 670 656 671 $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( strip_tags( $description ) ) ); 672 673 657 674 $buf = $this->get_option_row( $args['name'], $args['options'], $args ); 658 675 … … 1241 1258 $description = $this->get_aioseop_description( $post ); 1242 1259 1243 $description = $this->trim_excerpt_without_filters( $description ); 1260 if ( empty( $aioseop_options['aiosp_dont_truncate_descriptions'] ) ) { 1261 $description = $this->trim_excerpt_without_filters( $description ); 1262 } 1244 1263 1245 1264 $description = apply_filters( 'aioseop_description', $description ); 1246 1247 /*1248 if ( $this->is_static_front_page() )1249 $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );1250 elseif ( !empty( $blog_page ) )1251 $description = $this->get_post_description( $blog_page );1252 if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) )1253 $description = $this->get_post_description( $post );1254 1255 $description = apply_filters( 'aioseop_description', $description );1256 */1257 1265 1258 1266 if ( isset($description) && ( $this->strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) { … … 1307 1315 1308 1316 $is_tag = is_tag(); 1317 1318 1309 1319 1310 1320 $robots_meta = ''; … … 1321 1331 $aiosp_noodp = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noodp', true ) ) ); 1322 1332 $aiosp_noydir = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noydir', true ) ) ); 1323 if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty( $aioseop_options['aiosp_cpostnoindex'] ) || !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) {1333 if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty( $aioseop_options['aiosp_cpostnoindex'] ) || !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) { 1324 1334 $noindex = "index"; 1325 1335 $nofollow = "follow"; 1326 1336 $noodp = $noydir = ''; 1327 if ( ( $aiosp_noindex == 'on' ) || ( ( $aiosp_noindex == '' ) &&1328 ( !empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) ) )1337 if ( ( $aiosp_noindex == 'on' ) || ( ( 1338 ( !empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) ) ) 1329 1339 $noindex = "no" . $noindex; 1330 if ( ( $aiosp_nofollow == 'on' ) || ( ( $aiosp_nofollow == '' ) &&1331 ( !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) ) ) )1340 if ( ( $aiosp_nofollow == 'on' ) || ( ( 1341 ( !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) ) ) ) 1332 1342 $nofollow = "no" . $nofollow; 1333 1343 if ( $aiosp_noodp ) $nofollow .= ',noodp'; … … 1338 1348 } 1339 1349 1350 1351 1340 1352 $robots_meta = apply_filters( 'aioseop_robots_meta', $robots_meta ); 1341 1353 if ( !empty( $robots_meta ) ) … … 1372 1384 $googleplus = $aioseop_options['aiosp_google_publisher']; 1373 1385 1374 $page = $this->get_page_number();1375 1386 if ( ( $is_front_page ) && ( $page < 2 ) ) { 1376 1387 if ( !empty( $aioseop_options['aiosp_google_publisher'] ) ) … … 1402 1413 if ( in_array( 'all', $aioseop_options['aiosp_google_author_location'] ) ) { 1403 1414 if ( is_singular() && !is_singular( $aioseop_options['aiosp_google_author_location'] ) ) 1404 1415 $author = ''; 1405 1416 } else { 1406 1417 if ( !is_singular( $aioseop_options['aiosp_google_author_location'] ) ) … … 1943 1954 $link = icl_get_home_url(); 1944 1955 } else { 1945 $link = get_option( 'home');1956 $link = ); 1946 1957 } 1947 1958 } … … 1952 1963 $link = get_term_link( $term, $taxonomy ); 1953 1964 } elseif ( $query->is_archive && function_exists( 'get_post_type_archive_link' ) && ( $post_type = get_query_var( 'post_type' ) ) ) { 1954 if ( is_array( $post_type ) )1965 if ( is_array( $post_type ) ) 1955 1966 $post_type = reset( $post_type ); 1956 $link = get_post_type_archive_link( $post_type ); 1967 $link = get_post_type_archive_link( $post_type ); 1957 1968 } else { 1958 1969 return false; 1959 1970 } 1960 1971 if ( empty( $link ) || !is_string( $link ) ) return false; 1961 return $this-> yoast_get_paged( $link );1972 return $this->get_paged( $link ); 1962 1973 } 1963 1974 … … 1969 1980 } 1970 1981 1971 function yoast_get_paged( $link ) { 1982 function get_paged( $link ) { 1983 global $wp_rewrite; 1972 1984 $page = $this->get_page_number(); 1985 1986 1973 1987 if ( !empty( $page ) && $page > 1 ) { 1974 1988 if ( get_query_var( 'page' ) == $page ) 1975 1989 $link = trailingslashit( $link ) . "$page"; 1976 1990 else 1977 $link = trailingslashit( $link ) . "page/". "$page";1991 $link = trailingslashit( $link ) .; 1978 1992 $link = user_trailingslashit( $link, 'paged' ); 1979 1993 } … … 2208 2222 if ( is_front_page() ) { 2209 2223 $title = $this->internationalize( $aioseop_options['aiosp_home_title'] ); 2210 if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) {2211 // $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );2212 // if ( empty( $title ) )2213 // $title = $this->internationalize( $post->post_title );2214 // if ( empty( $title ) )2215 // $title = $this->internationalize( $this->get_original_title( '', false ) );2216 // if ( !empty( $title ) )2217 // $title = $this->apply_page_title_format( $title );2218 }2219 2224 if (empty( $title ) ) 2220 2225 $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) ); … … 2385 2390 $title = $this->apply_cf_fields( $title ); 2386 2391 } 2392 2387 2393 if ( $title === false ) 2388 2394 $title = $this->get_original_title(); … … 2437 2443 $text = strip_tags( $text ); 2438 2444 if ( !$max ) $max = $this->maximum_description_length; 2439 2440 if ( $max < $this->strlen( $text ) ) { 2441 while( $text[$max] != ' ' && $max > $this->minimum_description_length ) { 2442 $max--; 2445 $len = $this->strlen( $text ); 2446 if ( $max < $len ) { 2447 if ( function_exists( 'mb_strrpos' ) ) { 2448 $pos = mb_strrpos( $text, ' ', -($len - $max) ); 2449 if ( $pos > $this->minimum_description_length ) { 2450 $max = $pos; 2451 } else { 2452 $max = $this->minimum_description_length; 2453 } 2454 } else { 2455 while( $text[$max] != ' ' && $max > $this->minimum_description_length ) { 2456 $max--; 2457 } 2443 2458 } 2444 2459 } -
all-in-one-seo-pack/tags/2.1.7/aioseop_functions.php
r924101 r933964 580 580 if ( !function_exists( 'aioseop_add_contactmethods' ) ) { 581 581 function aioseop_add_contactmethods( $contactmethods ) { 582 global $aioseop_options ;582 global $aioseop_options; 583 583 if ( empty( $aioseop_options['aiosp_google_disable_profile'] ) ) 584 584 $contactmethods['googleplus'] = __( 'Google+', 'all_in_one_seo_pack' ); 585 586 587 588 589 590 585 591 return $contactmethods; 586 592 } -
all-in-one-seo-pack/tags/2.1.7/aioseop_module.js
r861970 r933964 13 13 14 14 function countChars(field,cntfield) { 15 cntfield.value = field.value.length; 15 var extra = 0; 16 if ( ( field.name == 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { 17 extra = aiosp_title_extra; 18 } 19 cntfield.value = field.value.length + extra; 16 20 } 17 21 -
all-in-one-seo-pack/tags/2.1.7/aioseop_module_class.php
r924101 r933964 995 995 $value = esc_attr( $value ); 996 996 $buf = ''; 997 997 998 if ( !empty( $options['count'] ) ) { 998 999 $n++; 999 1000 $attr .= " onKeyDown='countChars(document.post.$name,document.post.{$prefix}length$n)' onKeyUp='countChars(document.post.$name,document.post.{$prefix}length$n)'"; 1001 1000 1002 } 1001 1003 if ( isset( $opts['id'] ) ) $attr .= " id=\"{$opts['id']}\" "; … … 1027 1029 $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) . "' />" 1028 1030 . sprintf( $count_desc, $size, $this->strtolower( $options['name'] ) ); 1031 1029 1032 } 1030 1033 return $buf; -
all-in-one-seo-pack/tags/2.1.7/aioseop_opengraph.php
r924101 r933964 63 63 'product' => __( 'Product', 'all_in_one_seo_pack' ), 64 64 'song' => __( 'Song', 'all_in_one_seo_pack' ), 65 'tv_show' => __( 'TV Show', 'all_in_one_seo_pack' ) 65 'tv_show' => __( 'TV Show', 'all_in_one_seo_pack' ), 66 'episode' => __( 'Episode', 'all_in_one_seo_pack' ) 66 67 ),'Websites' => Array( 67 68 'article' => __( 'Article', 'all_in_one_seo_pack' ), … … 93 94 "defcard" => __( "Select the default type of Twitter card to display.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 94 95 "setcard" => __( "Select the default type of Twitter card to display.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 96 97 98 95 99 "types" => __( "Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 96 100 "title" => __( "This is the Open Graph title of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 97 101 "desc" => __( "This is the Open Graph description of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 98 "category" => __( "Select the Open Graph type that best describes the content of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ) 102 "category" => __( "Select the Open Graph type that best describes the content of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 103 "tag" => __( "This Open Graph meta allows you to add a list of keywords that best describe this content.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ) 99 104 ); 100 105 $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all_in_one_seo_pack' ); … … 130 135 'setcard' => Array( 'name' => __( 'Twitter Card Type', 'all_in_one_seo_pack' ), 131 136 'type' => 'select', 'initial_options' => Array( 'summary' => __( 'Summary', 'all_in_one_seo_pack' ), 'summary_large_image' => __( 'Summary Large Image', 'all_in_one_seo_pack' ), 'photo' => __( 'Photo', 'all_in_one_seo_pack' ) ) ), 137 138 139 140 141 132 142 'types' => Array( 'name' => __( 'Enable Facebook Meta for', 'all_in_one_seo_pack'), 133 143 'type' => 'multicheckbox', 'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ), … … 141 151 'initial_options' => $this->fb_object_types, 142 152 'default' => '' 143 ) 153 ), 154 'tag' => Array( 'name' => __( 'Article Tags', 'all_in_one_seo_pack' ), 155 'type' => 'text', 'default' => '', 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' ) ), 144 156 ); 145 157 … … 156 168 $this->locations = array( 157 169 'opengraph' => Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 158 'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 't ypes') ),170 'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'types') ), 159 171 'settings' => Array( 'name' => __('Social Settings', 'all_in_one_seo_pack'), 160 172 'type' => 'metabox', 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#pagepost_settings', 161 'options' => Array( 'title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'category', ' setcard' ),173 'options' => Array( 'title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'category', 'setcard' ), 162 174 'display' => $display, 'prefix' => 'aioseop_opengraph_' 163 175 ) … … 310 322 $current_post_type = get_post_type(); 311 323 $title = $description = $image = ''; 324 312 325 313 326 $sitename = $this->options['aiosp_opengraph_sitename']; … … 320 333 } 321 334 $url = $aiosp->aiosp_mrt_get_url( $wp_query ); 322 $home_url = get_option( 'home' ); 323 if ( $url == $home_url ) $url = trailingslashit( $url ); 324 $url = apply_filters( 'aioseop_canonical_url',$url ); 335 $url = apply_filters( 'aioseop_canonical_url', $url ); 325 336 $setmeta = $this->options['aiosp_opengraph_setmeta']; 326 337 if ( is_home( ) || $aiosp->is_static_front_page() ) { … … 357 368 } elseif ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) { 358 369 $type = $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"]; 370 371 372 359 373 } 360 374 … … 436 450 if ( !empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) 437 451 $card = $metabox['aioseop_opengraph_settings_setcard']; 438 439 /* OG only: */ 452 453 $site = $domain = $creator = ''; 454 455 if ( !empty( $this->options['aiosp_opengraph_twitter_site'] ) ) 456 $site = $this->options['aiosp_opengraph_twitter_site']; 457 458 if ( !empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) 459 $domain = $this->options['aiosp_opengraph_twitter_domain']; 460 461 if ( !empty( $post ) && isset( $post->post_author ) && !empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) 462 $creator = get_the_author_meta( 'twitter', $post->post_author ); 463 440 464 $meta = Array( 441 465 'facebook' => Array( … … 448 472 'sitename' => 'og:site_name', 449 473 'key' => 'fb:admins', 450 'description' => 'og:description' 474 'description' => 'og:description', 475 'tag' => 'article:tag' 451 476 ), 452 477 'twitter' => Array( 453 478 'card' => 'twitter:card', 479 480 481 454 482 'description' => 'twitter:description', 455 483 ) … … 490 518 */ 491 519 492 /*493 Note -- add support for these too, as per https://dev.twitter.com/docs/cards494 495 Card Property Description Required496 twitter:site @username for the website used in the card footer. No497 twitter:site:id Same as twitter:site, but the website's Twitter user ID instead. Note that user ids never change, while @usernames can be changed by the user. No498 twitter:creator @username for the content creator / author. No499 twitter:creator:id Same as twitter:creator, but the Twitter user's ID. No500 */501 502 520 $tags = Array( 503 521 'facebook' => Array( 'name' => 'property', 'value' => 'content' ), -
all-in-one-seo-pack/tags/2.1.7/aioseop_sitemap.php
r924646 r933964 870 870 $freq = $this->get_default_frequency( 'post' ); 871 871 $post_counts = $this->get_all_post_counts( Array('post_type' => $options["{$this->prefix}posttypes"], 'post_status' => 'publish') ); 872 873 874 872 875 foreach( $options["{$this->prefix}posttypes"] as $sm ) { 873 876 if ( $post_counts[$sm] == 0 ) continue; … … 1068 1071 if ( empty( $current_host ) ) $current_host = $_SERVER['SERVER_NAME']; 1069 1072 1070 if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) {1073 if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) 1071 1074 $plugin_url['host'] = $current_host; 1072 $plugin_path = $this->unparse_url( $plugin_url ); 1073 } 1075 1076 unset( $plugin_url['scheme'] ); 1077 $plugin_path = $this->unparse_url( $plugin_url ); 1078 1074 1079 $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n" 1075 1080 . '<urlset '; … … 1242 1247 $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; 1243 1248 $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; 1249 1244 1250 $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; 1245 1251 $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; … … 1620 1626 if ( is_array( $args['post_type'] ) ) 1621 1627 $args['post_type'] = array_shift( $args['post_type'] ); 1622 $count = (Array)wp_count_posts( $args['post_type'] ); 1628 $count = (Array)wp_count_posts( $args['post_type'] ); 1623 1629 $post_counts = $count[$status]; 1624 1630 } else … … 1626 1632 if ( $post_type === 'all' ) continue; 1627 1633 $count = (Array)wp_count_posts( $post_type ); 1634 1628 1635 if ( empty( $count ) ) 1629 1636 $post_counts[$post_type] = 0; -
all-in-one-seo-pack/tags/2.1.7/all_in_one_seo_pack.php
r924101 r933964 4 4 Plugin URI: http://semperfiwebdesign.com 5 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/all-in-one-seo-pack-pro-version/?loc=plugins" target="_blank">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¤cy_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.1. 66 Version: 2.1. 7 7 Author: Michael Torbert 8 8 Author URI: http://michaeltorbert.com … … 31 31 /** 32 32 * @package All-in-One-SEO-Pack 33 * @version 2.1. 633 * @version 2.1. 34 34 */ 35 35 36 36 if ( ! defined( 'AIOSEOP_VERSION' ) ) 37 define( 'AIOSEOP_VERSION', '2.1. 6' );37 define( 'AIOSEOP_VERSION', '2.1.' ); 38 38 39 39 if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) { -
all-in-one-seo-pack/trunk/aioseop_class.php
r925168 r933964 185 185 "tags_noindex" => __( "Check this to ask search engines not to index Tag Archives. Useful for avoiding duplicate content.<br /><a href='http://semperplugins.com/documentation/noindex-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 186 186 "search_noindex" => __( "Check this to ask search engines not to index the Search page. Useful for avoiding duplicate content.<br /><a href='http://semperplugins.com/documentation/noindex-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 187 188 187 189 "generate_descriptions" => __( "Check this and your Meta Descriptions will be auto-generated from your excerpt or content.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 188 190 "hide_paginated_descriptions"=> __( "Check this and your Meta Descriptions will be removed from page 2 or later of paginated content.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 191 189 192 "unprotect_meta" => __( "Check this to unprotect internal postmeta fields for use with XMLRPC. If you don't know what that is, leave it unchecked.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 190 193 "ex_pages" => __( "Enter a comma separated list of pages here to be excluded by All in One SEO Pack. This is helpful when using plugins which generate their own non-WordPress dynamic pages. Ex: <em>/forum/, /contact/</em> For instance, if you want to exclude the virtual pages generated by a forum plugin, all you have to do is add forum or /forum or /forum/ or and any URL with the word \"forum\" in it, such as http://mysite.com/forum or http://mysite.com/forum/someforumpage here and it will be excluded from All in One SEO Pack.<br /><a href='http://semperplugins.com/documentation/advanced-settings/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), … … 441 444 'name' => __( 'Use noindex for the Search page:', 'all_in_one_seo_pack' ), 442 445 'default' => 0), 446 447 448 449 450 451 443 452 "generate_descriptions"=> Array( 444 453 'name' => __( 'Autogenerate Descriptions:', 'all_in_one_seo_pack' ), … … 447 456 'name' => __( 'Remove Descriptions For Paginated Pages:', 'all_in_one_seo_pack' ), 448 457 'default' => 0), 458 459 460 449 461 "unprotect_meta"=> Array( 450 462 'name' => __( 'Unprotect Post Meta Fields:', 'all_in_one_seo_pack' ), … … 563 575 'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ), 564 576 'help_link' => 'http://semperplugins.com/documentation/noindex-settings/', 565 'options' => Array( 'cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex', 'search_noindex' )577 'options' => Array( 'cpostnoindex', 'cpostnofollow', 'category_noindex', 'archive_date_noindex', 'archive_author_noindex', 'tags_noindex', 'search_noindex' ) 566 578 ), 567 579 'advanced' => Array( 568 580 'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ), 569 581 'help_link' => 'http://semperplugins.com/documentation/advanced-settings/', 570 'options' => Array( 'generate_descriptions', 'hide_paginated_descriptions', ' unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' )582 'options' => Array( 'generate_descriptions', 'hide_paginated_descriptions', 'unprotect_meta', 'ex_pages', 'post_meta_tags', 'page_meta_tags', 'front_meta_tags', 'home_meta_tags' ) 571 583 ) 572 584 ); … … 643 655 $title_format = $this->get_post_title_format(); 644 656 } 657 645 658 if ( empty( $title_format ) ) { 646 659 $title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>'; … … 648 661 $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format ); 649 662 $title_format = $this->apply_cf_fields( $title_format ); 650 $title_format = str_replace( '%post_title%', '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>', $title_format ); 651 $title_format = str_replace( '%page_title%', '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>', $title_format ); 663 $replace_title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>'; 664 $title_format = str_replace( '%post_title%', $replace_title, $title_format ); 665 $title_format = str_replace( '%page_title%', $replace_title, $title_format ); 652 666 $title_format = preg_replace( '/%([^%]*?)%/', '', $title_format ); 653 667 $title = $title_format; 668 654 669 } 655 670 656 671 $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( strip_tags( $description ) ) ); 672 673 657 674 $buf = $this->get_option_row( $args['name'], $args['options'], $args ); 658 675 … … 1241 1258 $description = $this->get_aioseop_description( $post ); 1242 1259 1243 $description = $this->trim_excerpt_without_filters( $description ); 1260 if ( empty( $aioseop_options['aiosp_dont_truncate_descriptions'] ) ) { 1261 $description = $this->trim_excerpt_without_filters( $description ); 1262 } 1244 1263 1245 1264 $description = apply_filters( 'aioseop_description', $description ); 1246 1247 /*1248 if ( $this->is_static_front_page() )1249 $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );1250 elseif ( !empty( $blog_page ) )1251 $description = $this->get_post_description( $blog_page );1252 if ( empty( $description ) && is_object( $post ) && !is_archive() && empty( $blog_page ) )1253 $description = $this->get_post_description( $post );1254 1255 $description = apply_filters( 'aioseop_description', $description );1256 */1257 1265 1258 1266 if ( isset($description) && ( $this->strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) { … … 1307 1315 1308 1316 $is_tag = is_tag(); 1317 1318 1309 1319 1310 1320 $robots_meta = ''; … … 1321 1331 $aiosp_noodp = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noodp', true ) ) ); 1322 1332 $aiosp_noydir = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noydir', true ) ) ); 1323 if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty( $aioseop_options['aiosp_cpostnoindex'] ) || !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) {1333 if ( $aiosp_noindex || $aiosp_nofollow || $aiosp_noodp || $aiosp_noydir || !empty( $aioseop_options['aiosp_cpostnoindex'] ) || !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) { 1324 1334 $noindex = "index"; 1325 1335 $nofollow = "follow"; 1326 1336 $noodp = $noydir = ''; 1327 if ( ( $aiosp_noindex == 'on' ) || ( ( $aiosp_noindex == '' ) &&1328 ( !empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) ) )1337 if ( ( $aiosp_noindex == 'on' ) || ( ( 1338 ( !empty( $aioseop_options['aiosp_cpostnoindex'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnoindex'] ) ) ) ) 1329 1339 $noindex = "no" . $noindex; 1330 if ( ( $aiosp_nofollow == 'on' ) || ( ( $aiosp_nofollow == '' ) &&1331 ( !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) ) ) )1340 if ( ( $aiosp_nofollow == 'on' ) || ( ( 1341 ( !empty( $aioseop_options['aiosp_cpostnofollow'] ) ) && ( in_array( $post_type, $aioseop_options['aiosp_cpostnofollow'] ) ) ) ) 1332 1342 $nofollow = "no" . $nofollow; 1333 1343 if ( $aiosp_noodp ) $nofollow .= ',noodp'; … … 1338 1348 } 1339 1349 1350 1351 1340 1352 $robots_meta = apply_filters( 'aioseop_robots_meta', $robots_meta ); 1341 1353 if ( !empty( $robots_meta ) ) … … 1372 1384 $googleplus = $aioseop_options['aiosp_google_publisher']; 1373 1385 1374 $page = $this->get_page_number();1375 1386 if ( ( $is_front_page ) && ( $page < 2 ) ) { 1376 1387 if ( !empty( $aioseop_options['aiosp_google_publisher'] ) ) … … 1402 1413 if ( in_array( 'all', $aioseop_options['aiosp_google_author_location'] ) ) { 1403 1414 if ( is_singular() && !is_singular( $aioseop_options['aiosp_google_author_location'] ) ) 1404 1415 $author = ''; 1405 1416 } else { 1406 1417 if ( !is_singular( $aioseop_options['aiosp_google_author_location'] ) ) … … 1943 1954 $link = icl_get_home_url(); 1944 1955 } else { 1945 $link = get_option( 'home');1956 $link = ); 1946 1957 } 1947 1958 } … … 1952 1963 $link = get_term_link( $term, $taxonomy ); 1953 1964 } elseif ( $query->is_archive && function_exists( 'get_post_type_archive_link' ) && ( $post_type = get_query_var( 'post_type' ) ) ) { 1954 if ( is_array( $post_type ) )1965 if ( is_array( $post_type ) ) 1955 1966 $post_type = reset( $post_type ); 1956 $link = get_post_type_archive_link( $post_type ); 1967 $link = get_post_type_archive_link( $post_type ); 1957 1968 } else { 1958 1969 return false; 1959 1970 } 1960 1971 if ( empty( $link ) || !is_string( $link ) ) return false; 1961 return $this-> yoast_get_paged( $link );1972 return $this->get_paged( $link ); 1962 1973 } 1963 1974 … … 1969 1980 } 1970 1981 1971 function yoast_get_paged( $link ) { 1982 function get_paged( $link ) { 1983 global $wp_rewrite; 1972 1984 $page = $this->get_page_number(); 1985 1986 1973 1987 if ( !empty( $page ) && $page > 1 ) { 1974 1988 if ( get_query_var( 'page' ) == $page ) 1975 1989 $link = trailingslashit( $link ) . "$page"; 1976 1990 else 1977 $link = trailingslashit( $link ) . "page/". "$page";1991 $link = trailingslashit( $link ) .; 1978 1992 $link = user_trailingslashit( $link, 'paged' ); 1979 1993 } … … 2208 2222 if ( is_front_page() ) { 2209 2223 $title = $this->internationalize( $aioseop_options['aiosp_home_title'] ); 2210 if ( empty( $title ) && !empty( $post ) && $this->is_static_front_page() ) {2211 // $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );2212 // if ( empty( $title ) )2213 // $title = $this->internationalize( $post->post_title );2214 // if ( empty( $title ) )2215 // $title = $this->internationalize( $this->get_original_title( '', false ) );2216 // if ( !empty( $title ) )2217 // $title = $this->apply_page_title_format( $title );2218 }2219 2224 if (empty( $title ) ) 2220 2225 $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) ); … … 2385 2390 $title = $this->apply_cf_fields( $title ); 2386 2391 } 2392 2387 2393 if ( $title === false ) 2388 2394 $title = $this->get_original_title(); … … 2437 2443 $text = strip_tags( $text ); 2438 2444 if ( !$max ) $max = $this->maximum_description_length; 2439 2440 if ( $max < $this->strlen( $text ) ) { 2441 while( $text[$max] != ' ' && $max > $this->minimum_description_length ) { 2442 $max--; 2445 $len = $this->strlen( $text ); 2446 if ( $max < $len ) { 2447 if ( function_exists( 'mb_strrpos' ) ) { 2448 $pos = mb_strrpos( $text, ' ', -($len - $max) ); 2449 if ( $pos > $this->minimum_description_length ) { 2450 $max = $pos; 2451 } else { 2452 $max = $this->minimum_description_length; 2453 } 2454 } else { 2455 while( $text[$max] != ' ' && $max > $this->minimum_description_length ) { 2456 $max--; 2457 } 2443 2458 } 2444 2459 } -
all-in-one-seo-pack/trunk/aioseop_functions.php
r924101 r933964 580 580 if ( !function_exists( 'aioseop_add_contactmethods' ) ) { 581 581 function aioseop_add_contactmethods( $contactmethods ) { 582 global $aioseop_options ;582 global $aioseop_options; 583 583 if ( empty( $aioseop_options['aiosp_google_disable_profile'] ) ) 584 584 $contactmethods['googleplus'] = __( 'Google+', 'all_in_one_seo_pack' ); 585 586 587 588 589 590 585 591 return $contactmethods; 586 592 } -
all-in-one-seo-pack/trunk/aioseop_module.js
r805127 r933964 13 13 14 14 function countChars(field,cntfield) { 15 cntfield.value = field.value.length; 15 var extra = 0; 16 if ( ( field.name == 'aiosp_title' ) && ( typeof aiosp_title_extra !== 'undefined' ) ) { 17 extra = aiosp_title_extra; 18 } 19 cntfield.value = field.value.length + extra; 16 20 } 17 21 -
all-in-one-seo-pack/trunk/aioseop_module_class.php
r924101 r933964 995 995 $value = esc_attr( $value ); 996 996 $buf = ''; 997 997 998 if ( !empty( $options['count'] ) ) { 998 999 $n++; 999 1000 $attr .= " onKeyDown='countChars(document.post.$name,document.post.{$prefix}length$n)' onKeyUp='countChars(document.post.$name,document.post.{$prefix}length$n)'"; 1001 1000 1002 } 1001 1003 if ( isset( $opts['id'] ) ) $attr .= " id=\"{$opts['id']}\" "; … … 1027 1029 $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) . "' />" 1028 1030 . sprintf( $count_desc, $size, $this->strtolower( $options['name'] ) ); 1031 1029 1032 } 1030 1033 return $buf; -
all-in-one-seo-pack/trunk/aioseop_opengraph.php
r924101 r933964 63 63 'product' => __( 'Product', 'all_in_one_seo_pack' ), 64 64 'song' => __( 'Song', 'all_in_one_seo_pack' ), 65 'tv_show' => __( 'TV Show', 'all_in_one_seo_pack' ) 65 'tv_show' => __( 'TV Show', 'all_in_one_seo_pack' ), 66 'episode' => __( 'Episode', 'all_in_one_seo_pack' ) 66 67 ),'Websites' => Array( 67 68 'article' => __( 'Article', 'all_in_one_seo_pack' ), … … 93 94 "defcard" => __( "Select the default type of Twitter card to display.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 94 95 "setcard" => __( "Select the default type of Twitter card to display.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 96 97 98 95 99 "types" => __( "Select which Post Types you want to use All in One SEO Pack to set Open Graph meta values for.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 96 100 "title" => __( "This is the Open Graph title of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 97 101 "desc" => __( "This is the Open Graph description of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 98 "category" => __( "Select the Open Graph type that best describes the content of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ) 102 "category" => __( "Select the Open Graph type that best describes the content of this Page or Post.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ), 103 "tag" => __( "This Open Graph meta allows you to add a list of keywords that best describe this content.<br /><a href='http://semperplugins.com/documentation/social-meta-module/' target='_blank'>Click here for documentation on this setting</a>", 'all_in_one_seo_pack' ) 99 104 ); 100 105 $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all_in_one_seo_pack' ); … … 130 135 'setcard' => Array( 'name' => __( 'Twitter Card Type', 'all_in_one_seo_pack' ), 131 136 'type' => 'select', 'initial_options' => Array( 'summary' => __( 'Summary', 'all_in_one_seo_pack' ), 'summary_large_image' => __( 'Summary Large Image', 'all_in_one_seo_pack' ), 'photo' => __( 'Photo', 'all_in_one_seo_pack' ) ) ), 137 138 139 140 141 132 142 'types' => Array( 'name' => __( 'Enable Facebook Meta for', 'all_in_one_seo_pack'), 133 143 'type' => 'multicheckbox', 'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ), … … 141 151 'initial_options' => $this->fb_object_types, 142 152 'default' => '' 143 ) 153 ), 154 'tag' => Array( 'name' => __( 'Article Tags', 'all_in_one_seo_pack' ), 155 'type' => 'text', 'default' => '', 'condshow' => Array( 'aioseop_opengraph_settings_category' => 'article' ) ), 144 156 ); 145 157 … … 156 168 $this->locations = array( 157 169 'opengraph' => Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings', 158 'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 't ypes') ),170 'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'types') ), 159 171 'settings' => Array( 'name' => __('Social Settings', 'all_in_one_seo_pack'), 160 172 'type' => 'metabox', 'help_link' => 'http://semperplugins.com/documentation/social-meta-module/#pagepost_settings', 161 'options' => Array( 'title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'category', ' setcard' ),173 'options' => Array( 'title', 'desc', 'image', 'customimg', 'imagewidth', 'imageheight', 'category', 'setcard' ), 162 174 'display' => $display, 'prefix' => 'aioseop_opengraph_' 163 175 ) … … 310 322 $current_post_type = get_post_type(); 311 323 $title = $description = $image = ''; 324 312 325 313 326 $sitename = $this->options['aiosp_opengraph_sitename']; … … 320 333 } 321 334 $url = $aiosp->aiosp_mrt_get_url( $wp_query ); 322 $home_url = get_option( 'home' ); 323 if ( $url == $home_url ) $url = trailingslashit( $url ); 324 $url = apply_filters( 'aioseop_canonical_url',$url ); 335 $url = apply_filters( 'aioseop_canonical_url', $url ); 325 336 $setmeta = $this->options['aiosp_opengraph_setmeta']; 326 337 if ( is_home( ) || $aiosp->is_static_front_page() ) { … … 357 368 } elseif ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) { 358 369 $type = $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"]; 370 371 372 359 373 } 360 374 … … 436 450 if ( !empty( $metabox['aioseop_opengraph_settings_setcard'] ) ) 437 451 $card = $metabox['aioseop_opengraph_settings_setcard']; 438 439 /* OG only: */ 452 453 $site = $domain = $creator = ''; 454 455 if ( !empty( $this->options['aiosp_opengraph_twitter_site'] ) ) 456 $site = $this->options['aiosp_opengraph_twitter_site']; 457 458 if ( !empty( $this->options['aiosp_opengraph_twitter_domain'] ) ) 459 $domain = $this->options['aiosp_opengraph_twitter_domain']; 460 461 if ( !empty( $post ) && isset( $post->post_author ) && !empty( $this->options['aiosp_opengraph_twitter_creator'] ) ) 462 $creator = get_the_author_meta( 'twitter', $post->post_author ); 463 440 464 $meta = Array( 441 465 'facebook' => Array( … … 448 472 'sitename' => 'og:site_name', 449 473 'key' => 'fb:admins', 450 'description' => 'og:description' 474 'description' => 'og:description', 475 'tag' => 'article:tag' 451 476 ), 452 477 'twitter' => Array( 453 478 'card' => 'twitter:card', 479 480 481 454 482 'description' => 'twitter:description', 455 483 ) … … 490 518 */ 491 519 492 /*493 Note -- add support for these too, as per https://dev.twitter.com/docs/cards494 495 Card Property Description Required496 twitter:site @username for the website used in the card footer. No497 twitter:site:id Same as twitter:site, but the website's Twitter user ID instead. Note that user ids never change, while @usernames can be changed by the user. No498 twitter:creator @username for the content creator / author. No499 twitter:creator:id Same as twitter:creator, but the Twitter user's ID. No500 */501 502 520 $tags = Array( 503 521 'facebook' => Array( 'name' => 'property', 'value' => 'content' ), -
all-in-one-seo-pack/trunk/aioseop_sitemap.php
r924646 r933964 870 870 $freq = $this->get_default_frequency( 'post' ); 871 871 $post_counts = $this->get_all_post_counts( Array('post_type' => $options["{$this->prefix}posttypes"], 'post_status' => 'publish') ); 872 873 874 872 875 foreach( $options["{$this->prefix}posttypes"] as $sm ) { 873 876 if ( $post_counts[$sm] == 0 ) continue; … … 1068 1071 if ( empty( $current_host ) ) $current_host = $_SERVER['SERVER_NAME']; 1069 1072 1070 if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) {1073 if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) 1071 1074 $plugin_url['host'] = $current_host; 1072 $plugin_path = $this->unparse_url( $plugin_url ); 1073 } 1075 1076 unset( $plugin_url['scheme'] ); 1077 $plugin_path = $this->unparse_url( $plugin_url ); 1078 1074 1079 $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n" 1075 1080 . '<urlset '; … … 1242 1247 $scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : ''; 1243 1248 $host = isset($parsed_url['host']) ? $parsed_url['host'] : ''; 1249 1244 1250 $port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : ''; 1245 1251 $user = isset($parsed_url['user']) ? $parsed_url['user'] : ''; … … 1620 1626 if ( is_array( $args['post_type'] ) ) 1621 1627 $args['post_type'] = array_shift( $args['post_type'] ); 1622 $count = (Array)wp_count_posts( $args['post_type'] ); 1628 $count = (Array)wp_count_posts( $args['post_type'] ); 1623 1629 $post_counts = $count[$status]; 1624 1630 } else … … 1626 1632 if ( $post_type === 'all' ) continue; 1627 1633 $count = (Array)wp_count_posts( $post_type ); 1634 1628 1635 if ( empty( $count ) ) 1629 1636 $post_counts[$post_type] = 0; -
all-in-one-seo-pack/trunk/all_in_one_seo_pack.php
r924101 r933964 4 4 Plugin URI: http://semperfiwebdesign.com 5 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/all-in-one-seo-pack-pro-version/?loc=plugins" target="_blank">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¤cy_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.1. 66 Version: 2.1. 7 7 Author: Michael Torbert 8 8 Author URI: http://michaeltorbert.com … … 31 31 /** 32 32 * @package All-in-One-SEO-Pack 33 * @version 2.1. 633 * @version 2.1. 34 34 */ 35 35 36 36 if ( ! defined( 'AIOSEOP_VERSION' ) ) 37 define( 'AIOSEOP_VERSION', '2.1. 6' );37 define( 'AIOSEOP_VERSION', '2.1.' ); 38 38 39 39 if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.