Plugin Directory

Changeset 933964

Timestamp:
06/17/2014 09:21:57 PM (10 years ago)
Author:
pbaylies
Message:

added options to noindex, nofollow paginated pages; added option to show full descriptions; fix to support custom pagination base; added new Twitter card fields; bug fixes

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  
    185185            "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' ),
    186186            "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
    187189            "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' ),
    188190            "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
    189192            "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' ),
    190193            "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' ),
     
    441444                'name' => __( 'Use noindex for the Search page:', 'all_in_one_seo_pack' ),
    442445                'default' => 0),
     446
     447
     448
     449
     450
     451
    443452            "generate_descriptions"=> Array(
    444453                'name' => __( 'Autogenerate Descriptions:', 'all_in_one_seo_pack' ),
     
    447456                'name' => __( 'Remove Descriptions For Paginated Pages:', 'all_in_one_seo_pack' ),
    448457                'default' => 0),
     458
     459
     460
    449461            "unprotect_meta"=> Array(
    450462                'name' => __( 'Unprotect Post Meta Fields:', 'all_in_one_seo_pack' ),
     
    563575                        'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ),
    564576                        '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' )
    566578                    ),
    567579                'advanced' => Array(
    568580                        'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ),
    569581                        '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' )
    571583                    )
    572584                );
     
    643655                        $title_format = $this->get_post_title_format();                 
    644656                }
     657
    645658                if ( empty( $title_format ) ) {
    646659                    $title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>';
     
    648661                    $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
    649662                    $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 );
    652666                    $title_format = preg_replace( '/%([^%]*?)%/', '', $title_format );                 
    653667                    $title = $title_format;
     668
    654669                }
    655670               
    656671                $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( strip_tags( $description ) ) );
     672
     673
    657674                $buf = $this->get_option_row( $args['name'], $args['options'], $args );
    658675               
     
    12411258                $description = $this->get_aioseop_description( $post );
    12421259           
    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            }
    12441263           
    12451264            $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             */
    12571265           
    12581266            if ( isset($description) && ( $this->strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) {
     
    13071315
    13081316            $is_tag = is_tag();
     1317
     1318
    13091319
    13101320            $robots_meta = '';
     
    13211331                    $aiosp_noodp = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noodp', true ) ) );
    13221332                    $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'] ) ) {
    13241334                        $noindex = "index";
    13251335                        $nofollow = "follow";
    13261336                        $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'] ) ) ) )
    13291339                            $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'] ) ) ) )
    13321342                            $nofollow = "no" . $nofollow;
    13331343                        if ( $aiosp_noodp ) $nofollow .= ',noodp';
     
    13381348            }
    13391349           
     1350
     1351
    13401352            $robots_meta = apply_filters( 'aioseop_robots_meta', $robots_meta );
    13411353            if ( !empty( $robots_meta ) )
     
    13721384                $googleplus = $aioseop_options['aiosp_google_publisher'];
    13731385
    1374             $page = $this->get_page_number();
    13751386            if ( ( $is_front_page ) && ( $page < 2 ) ) {
    13761387                if ( !empty( $aioseop_options['aiosp_google_publisher'] ) )
     
    14021413                    if ( in_array( 'all', $aioseop_options['aiosp_google_author_location'] ) ) {
    14031414                        if ( is_singular() && !is_singular( $aioseop_options['aiosp_google_author_location'] ) )
    1404                                 $author = '';
     1415                            $author = '';
    14051416                    } else {
    14061417                        if ( !is_singular( $aioseop_options['aiosp_google_author_location'] ) )
     
    19431954                    $link = icl_get_home_url();
    19441955                } else {
    1945                     $link = get_option( 'home' );
     1956                    $link = );
    19461957                }
    19471958            }
     
    19521963                $link = get_term_link( $term, $taxonomy );
    19531964        } 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 ) )
    19551966                    $post_type = reset( $post_type );
    1956                 $link = get_post_type_archive_link( $post_type );          
     1967                $link = get_post_type_archive_link( $post_type );       
    19571968        } else {
    19581969            return false;
    19591970        }
    19601971        if ( empty( $link ) || !is_string( $link ) ) return false;
    1961         return $this->yoast_get_paged( $link );
     1972        return $this->get_paged( $link );
    19621973    }
    19631974   
     
    19691980    }
    19701981
    1971     function yoast_get_paged( $link ) {
     1982    function get_paged( $link ) {
     1983        global $wp_rewrite;
    19721984        $page = $this->get_page_number();
     1985
     1986
    19731987        if ( !empty( $page ) && $page > 1 ) {
    19741988            if ( get_query_var( 'page' ) == $page )
    19751989                $link = trailingslashit( $link ) . "$page";
    19761990            else
    1977                 $link = trailingslashit( $link ) ."page/". "$page";
     1991                $link = trailingslashit( $link ) .;
    19781992            $link = user_trailingslashit( $link, 'paged' );
    19791993        }
     
    22082222        if ( is_front_page() ) {
    22092223            $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             }
    22192224            if (empty( $title ) )
    22202225                $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
     
    23852390            $title = $this->apply_cf_fields( $title );
    23862391        }
     2392
    23872393        if ( $title === false )
    23882394            $title = $this->get_original_title();
     
    24372443        $text = strip_tags( $text );
    24382444        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                }               
    24432458            }
    24442459        }
  • all-in-one-seo-pack/tags/2.1.7/aioseop_functions.php

    r924101 r933964  
    580580if ( !function_exists( 'aioseop_add_contactmethods' ) ) {
    581581    function aioseop_add_contactmethods( $contactmethods ) {
    582         global $aioseop_options;
     582        global $aioseop_options;
    583583        if ( empty( $aioseop_options['aiosp_google_disable_profile'] ) )
    584584            $contactmethods['googleplus'] = __( 'Google+', 'all_in_one_seo_pack' );
     585
     586
     587
     588
     589
     590
    585591        return $contactmethods;
    586592    }
  • all-in-one-seo-pack/tags/2.1.7/aioseop_module.js

    r861970 r933964  
    1313
    1414function 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;
    1620}
    1721
  • all-in-one-seo-pack/tags/2.1.7/aioseop_module_class.php

    r924101 r933964  
    995995                $value = esc_attr( $value );
    996996            $buf = '';
     997
    997998            if ( !empty( $options['count'] ) ) {
    998999                $n++;
    9991000                $attr .= " onKeyDown='countChars(document.post.$name,document.post.{$prefix}length$n)' onKeyUp='countChars(document.post.$name,document.post.{$prefix}length$n)'";
     1001
    10001002            }
    10011003            if ( isset( $opts['id'] ) ) $attr .= " id=\"{$opts['id']}\" ";
     
    10271029                $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) . "' />"
    10281030                     . sprintf( $count_desc, $size, $this->strtolower( $options['name'] ) );
     1031
    10291032            }
    10301033            return $buf;
  • all-in-one-seo-pack/tags/2.1.7/aioseop_opengraph.php

    r924101 r933964  
    6363                    'product' => __( 'Product', 'all_in_one_seo_pack' ),
    6464                    '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' )
    6667                ),'Websites' => Array(
    6768                    'article' => __( 'Article', 'all_in_one_seo_pack' ),
     
    9394                "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' ),
    9495                "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
    9599                "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' ),
    96100                "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' ),
    97101                "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' )
    99104            );
    100105            $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all_in_one_seo_pack' );
     
    130135                    'setcard'       => Array(   'name'          => __( 'Twitter Card Type', 'all_in_one_seo_pack' ),
    131136                                                '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
    132142                    'types'         => Array(   'name'          => __( 'Enable Facebook Meta for', 'all_in_one_seo_pack'),
    133143                                                'type'          => 'multicheckbox', 'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
     
    141151                                                'initial_options' => $this->fb_object_types,
    142152                                                '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' ) ),
    144156            );
    145157           
     
    156168            $this->locations = array(
    157169                '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', 'types') ),
     170                                       'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'types') ),
    159171                'settings'  =>  Array(  'name'      => __('Social Settings', 'all_in_one_seo_pack'),
    160172                                                          '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' ),
    162174                                                          'display' => $display, 'prefix' => 'aioseop_opengraph_'
    163175                                    )
     
    310322            $current_post_type = get_post_type();
    311323            $title = $description = $image = '';
     324
    312325           
    313326            $sitename = $this->options['aiosp_opengraph_sitename'];
     
    320333            }
    321334            $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 );     
    325336            $setmeta = $this->options['aiosp_opengraph_setmeta'];
    326337            if ( is_home( ) || $aiosp->is_static_front_page() ) {
     
    357368                } elseif ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) {
    358369                    $type = $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"];
     370
     371
     372
    359373                }
    360374               
     
    436450            if ( !empty( $metabox['aioseop_opengraph_settings_setcard'] ) )
    437451                $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           
    440464            $meta = Array(
    441465                'facebook'  => Array(
     
    448472                        'sitename'      => 'og:site_name',
    449473                        'key'           => 'fb:admins',
    450                         'description'   => 'og:description'
     474                        'description'   => 'og:description',
     475                        'tag'           => 'article:tag'
    451476                    ),
    452477                'twitter'   => Array(
    453478                        'card'          => 'twitter:card',
     479
     480
     481
    454482                        'description'   => 'twitter:description',
    455483                    )
     
    490518            */
    491519           
    492             /*
    493                 Note -- add support for these too, as per https://dev.twitter.com/docs/cards
    494                
    495                 Card Property   Description Required
    496                 twitter:site    @username for the website used in the card footer.  No
    497                 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.  No
    498                 twitter:creator @username for the content creator / author. No
    499                 twitter:creator:id  Same as twitter:creator, but the Twitter user's ID. No
    500             */
    501            
    502520            $tags = Array(
    503521                    'facebook'  => Array( 'name' => 'property', 'value' => 'content' ),
  • all-in-one-seo-pack/tags/2.1.7/aioseop_sitemap.php

    r924646 r933964  
    870870                $freq = $this->get_default_frequency( 'post' );
    871871                $post_counts = $this->get_all_post_counts( Array('post_type' => $options["{$this->prefix}posttypes"], 'post_status' => 'publish') );
     872
     873
     874
    872875                foreach( $options["{$this->prefix}posttypes"] as $sm ) {
    873876                    if ( $post_counts[$sm] == 0 ) continue;
     
    10681071            if ( empty( $current_host ) ) $current_host = $_SERVER['SERVER_NAME'];
    10691072           
    1070             if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) {
     1073            if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) )
    10711074                $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           
    10741079            $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n"
    10751080                        . '<urlset ';
     
    12421247            $scheme   = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
    12431248            $host     = isset($parsed_url['host']) ? $parsed_url['host'] : '';
     1249
    12441250            $port     = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
    12451251            $user     = isset($parsed_url['user']) ? $parsed_url['user'] : '';
     
    16201626                    if ( is_array( $args['post_type'] ) )
    16211627                        $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'] );
    16231629                    $post_counts = $count[$status];
    16241630                } else
     
    16261632                        if ( $post_type === 'all' ) continue;
    16271633                        $count = (Array)wp_count_posts( $post_type );
     1634
    16281635                        if ( empty( $count ) )
    16291636                            $post_counts[$post_type] = 0;
  • all-in-one-seo-pack/tags/2.1.7/all_in_one_seo_pack.php

    r924101 r933964  
    44Plugin URI: http://semperfiwebdesign.com
    55Description: 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&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.1.6
     6Version: 2.1.
    77Author: Michael Torbert
    88Author URI: http://michaeltorbert.com
     
    3131/**
    3232 * @package All-in-One-SEO-Pack
    33  * @version 2.1.6
     33 * @version 2.1.
    3434 */
    3535
    3636if ( ! defined( 'AIOSEOP_VERSION' ) )
    37     define( 'AIOSEOP_VERSION', '2.1.6' );
     37    define( 'AIOSEOP_VERSION', '2.1.' );
    3838
    3939if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
  • all-in-one-seo-pack/trunk/aioseop_class.php

    r925168 r933964  
    185185            "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' ),
    186186            "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
    187189            "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' ),
    188190            "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
    189192            "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' ),
    190193            "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' ),
     
    441444                'name' => __( 'Use noindex for the Search page:', 'all_in_one_seo_pack' ),
    442445                'default' => 0),
     446
     447
     448
     449
     450
     451
    443452            "generate_descriptions"=> Array(
    444453                'name' => __( 'Autogenerate Descriptions:', 'all_in_one_seo_pack' ),
     
    447456                'name' => __( 'Remove Descriptions For Paginated Pages:', 'all_in_one_seo_pack' ),
    448457                'default' => 0),
     458
     459
     460
    449461            "unprotect_meta"=> Array(
    450462                'name' => __( 'Unprotect Post Meta Fields:', 'all_in_one_seo_pack' ),
     
    563575                        'name' => __( 'Noindex Settings', 'all_in_one_seo_pack' ),
    564576                        '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' )
    566578                    ),
    567579                'advanced' => Array(
    568580                        'name' => __( 'Advanced Settings', 'all_in_one_seo_pack' ),
    569581                        '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' )
    571583                    )
    572584                );
     
    643655                        $title_format = $this->get_post_title_format();                 
    644656                }
     657
    645658                if ( empty( $title_format ) ) {
    646659                    $title = '<span id="aioseop_snippet_title">' . esc_attr( strip_tags( $title ) ) . '</span>';
     
    648661                    $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
    649662                    $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 );
    652666                    $title_format = preg_replace( '/%([^%]*?)%/', '', $title_format );                 
    653667                    $title = $title_format;
     668
    654669                }
    655670               
    656671                $args['value'] = sprintf( $args['value'], $title, esc_url( $url ), esc_attr( strip_tags( $description ) ) );
     672
     673
    657674                $buf = $this->get_option_row( $args['name'], $args['options'], $args );
    658675               
     
    12411258                $description = $this->get_aioseop_description( $post );
    12421259           
    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            }
    12441263           
    12451264            $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             */
    12571265           
    12581266            if ( isset($description) && ( $this->strlen($description) > $this->minimum_description_length ) && !( $is_front_page && is_paged() ) ) {
     
    13071315
    13081316            $is_tag = is_tag();
     1317
     1318
    13091319
    13101320            $robots_meta = '';
     
    13211331                    $aiosp_noodp = htmlspecialchars( stripslashes( get_post_meta( $post->ID, '_aioseop_noodp', true ) ) );
    13221332                    $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'] ) ) {
    13241334                        $noindex = "index";
    13251335                        $nofollow = "follow";
    13261336                        $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'] ) ) ) )
    13291339                            $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'] ) ) ) )
    13321342                            $nofollow = "no" . $nofollow;
    13331343                        if ( $aiosp_noodp ) $nofollow .= ',noodp';
     
    13381348            }
    13391349           
     1350
     1351
    13401352            $robots_meta = apply_filters( 'aioseop_robots_meta', $robots_meta );
    13411353            if ( !empty( $robots_meta ) )
     
    13721384                $googleplus = $aioseop_options['aiosp_google_publisher'];
    13731385
    1374             $page = $this->get_page_number();
    13751386            if ( ( $is_front_page ) && ( $page < 2 ) ) {
    13761387                if ( !empty( $aioseop_options['aiosp_google_publisher'] ) )
     
    14021413                    if ( in_array( 'all', $aioseop_options['aiosp_google_author_location'] ) ) {
    14031414                        if ( is_singular() && !is_singular( $aioseop_options['aiosp_google_author_location'] ) )
    1404                                 $author = '';
     1415                            $author = '';
    14051416                    } else {
    14061417                        if ( !is_singular( $aioseop_options['aiosp_google_author_location'] ) )
     
    19431954                    $link = icl_get_home_url();
    19441955                } else {
    1945                     $link = get_option( 'home' );
     1956                    $link = );
    19461957                }
    19471958            }
     
    19521963                $link = get_term_link( $term, $taxonomy );
    19531964        } 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 ) )
    19551966                    $post_type = reset( $post_type );
    1956                 $link = get_post_type_archive_link( $post_type );          
     1967                $link = get_post_type_archive_link( $post_type );       
    19571968        } else {
    19581969            return false;
    19591970        }
    19601971        if ( empty( $link ) || !is_string( $link ) ) return false;
    1961         return $this->yoast_get_paged( $link );
     1972        return $this->get_paged( $link );
    19621973    }
    19631974   
     
    19691980    }
    19701981
    1971     function yoast_get_paged( $link ) {
     1982    function get_paged( $link ) {
     1983        global $wp_rewrite;
    19721984        $page = $this->get_page_number();
     1985
     1986
    19731987        if ( !empty( $page ) && $page > 1 ) {
    19741988            if ( get_query_var( 'page' ) == $page )
    19751989                $link = trailingslashit( $link ) . "$page";
    19761990            else
    1977                 $link = trailingslashit( $link ) ."page/". "$page";
     1991                $link = trailingslashit( $link ) .;
    19781992            $link = user_trailingslashit( $link, 'paged' );
    19791993        }
     
    22082222        if ( is_front_page() ) {
    22092223            $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             }
    22192224            if (empty( $title ) )
    22202225                $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
     
    23852390            $title = $this->apply_cf_fields( $title );
    23862391        }
     2392
    23872393        if ( $title === false )
    23882394            $title = $this->get_original_title();
     
    24372443        $text = strip_tags( $text );
    24382444        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                }               
    24432458            }
    24442459        }
  • all-in-one-seo-pack/trunk/aioseop_functions.php

    r924101 r933964  
    580580if ( !function_exists( 'aioseop_add_contactmethods' ) ) {
    581581    function aioseop_add_contactmethods( $contactmethods ) {
    582         global $aioseop_options;
     582        global $aioseop_options;
    583583        if ( empty( $aioseop_options['aiosp_google_disable_profile'] ) )
    584584            $contactmethods['googleplus'] = __( 'Google+', 'all_in_one_seo_pack' );
     585
     586
     587
     588
     589
     590
    585591        return $contactmethods;
    586592    }
  • all-in-one-seo-pack/trunk/aioseop_module.js

    r805127 r933964  
    1313
    1414function 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;
    1620}
    1721
  • all-in-one-seo-pack/trunk/aioseop_module_class.php

    r924101 r933964  
    995995                $value = esc_attr( $value );
    996996            $buf = '';
     997
    997998            if ( !empty( $options['count'] ) ) {
    998999                $n++;
    9991000                $attr .= " onKeyDown='countChars(document.post.$name,document.post.{$prefix}length$n)' onKeyUp='countChars(document.post.$name,document.post.{$prefix}length$n)'";
     1001
    10001002            }
    10011003            if ( isset( $opts['id'] ) ) $attr .= " id=\"{$opts['id']}\" ";
     
    10271029                $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) . "' />"
    10281030                     . sprintf( $count_desc, $size, $this->strtolower( $options['name'] ) );
     1031
    10291032            }
    10301033            return $buf;
  • all-in-one-seo-pack/trunk/aioseop_opengraph.php

    r924101 r933964  
    6363                    'product' => __( 'Product', 'all_in_one_seo_pack' ),
    6464                    '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' )
    6667                ),'Websites' => Array(
    6768                    'article' => __( 'Article', 'all_in_one_seo_pack' ),
     
    9394                "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' ),
    9495                "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
    9599                "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' ),
    96100                "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' ),
    97101                "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' )
    99104            );
    100105            $count_desc = __( " characters. Open Graph allows up to a maximum of %s chars for the %s.", 'all_in_one_seo_pack' );
     
    130135                    'setcard'       => Array(   'name'          => __( 'Twitter Card Type', 'all_in_one_seo_pack' ),
    131136                                                '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
    132142                    'types'         => Array(   'name'          => __( 'Enable Facebook Meta for', 'all_in_one_seo_pack'),
    133143                                                'type'          => 'multicheckbox', 'initial_options' => $this->get_post_type_titles( Array( '_builtin' => false ) ),
     
    141151                                                'initial_options' => $this->fb_object_types,
    142152                                                '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' ) ),
    144156            );
    145157           
     
    156168            $this->locations = array(
    157169                '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', 'types') ),
     170                                       'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'disable_jetpack', 'generate_descriptions', 'defimg', 'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'types') ),
    159171                'settings'  =>  Array(  'name'      => __('Social Settings', 'all_in_one_seo_pack'),
    160172                                                          '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' ),
    162174                                                          'display' => $display, 'prefix' => 'aioseop_opengraph_'
    163175                                    )
     
    310322            $current_post_type = get_post_type();
    311323            $title = $description = $image = '';
     324
    312325           
    313326            $sitename = $this->options['aiosp_opengraph_sitename'];
     
    320333            }
    321334            $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 );     
    325336            $setmeta = $this->options['aiosp_opengraph_setmeta'];
    326337            if ( is_home( ) || $aiosp->is_static_front_page() ) {
     
    357368                } elseif ( isset( $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"] ) ) {
    358369                    $type = $this->options["aiosp_opengraph_{$current_post_type}_fb_object_type"];
     370
     371
     372
    359373                }
    360374               
     
    436450            if ( !empty( $metabox['aioseop_opengraph_settings_setcard'] ) )
    437451                $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           
    440464            $meta = Array(
    441465                'facebook'  => Array(
     
    448472                        'sitename'      => 'og:site_name',
    449473                        'key'           => 'fb:admins',
    450                         'description'   => 'og:description'
     474                        'description'   => 'og:description',
     475                        'tag'           => 'article:tag'
    451476                    ),
    452477                'twitter'   => Array(
    453478                        'card'          => 'twitter:card',
     479
     480
     481
    454482                        'description'   => 'twitter:description',
    455483                    )
     
    490518            */
    491519           
    492             /*
    493                 Note -- add support for these too, as per https://dev.twitter.com/docs/cards
    494                
    495                 Card Property   Description Required
    496                 twitter:site    @username for the website used in the card footer.  No
    497                 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.  No
    498                 twitter:creator @username for the content creator / author. No
    499                 twitter:creator:id  Same as twitter:creator, but the Twitter user's ID. No
    500             */
    501            
    502520            $tags = Array(
    503521                    'facebook'  => Array( 'name' => 'property', 'value' => 'content' ),
  • all-in-one-seo-pack/trunk/aioseop_sitemap.php

    r924646 r933964  
    870870                $freq = $this->get_default_frequency( 'post' );
    871871                $post_counts = $this->get_all_post_counts( Array('post_type' => $options["{$this->prefix}posttypes"], 'post_status' => 'publish') );
     872
     873
     874
    872875                foreach( $options["{$this->prefix}posttypes"] as $sm ) {
    873876                    if ( $post_counts[$sm] == 0 ) continue;
     
    10681071            if ( empty( $current_host ) ) $current_host = $_SERVER['SERVER_NAME'];
    10691072           
    1070             if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) ) {
     1073            if ( !empty( $current_host ) && ( $current_host != $plugin_url['host'] ) )
    10711074                $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           
    10741079            $xml_header = '<?xml-stylesheet type="text/xsl" href="' . $plugin_path . 'sitemap.xsl"?>' . "\r\n"
    10751080                        . '<urlset ';
     
    12421247            $scheme   = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
    12431248            $host     = isset($parsed_url['host']) ? $parsed_url['host'] : '';
     1249
    12441250            $port     = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
    12451251            $user     = isset($parsed_url['user']) ? $parsed_url['user'] : '';
     
    16201626                    if ( is_array( $args['post_type'] ) )
    16211627                        $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'] );
    16231629                    $post_counts = $count[$status];
    16241630                } else
     
    16261632                        if ( $post_type === 'all' ) continue;
    16271633                        $count = (Array)wp_count_posts( $post_type );
     1634
    16281635                        if ( empty( $count ) )
    16291636                            $post_counts[$post_type] = 0;
  • all-in-one-seo-pack/trunk/all_in_one_seo_pack.php

    r924101 r933964  
    44Plugin URI: http://semperfiwebdesign.com
    55Description: 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&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.1.6
     6Version: 2.1.
    77Author: Michael Torbert
    88Author URI: http://michaeltorbert.com
     
    3131/**
    3232 * @package All-in-One-SEO-Pack
    33  * @version 2.1.6
     33 * @version 2.1.
    3434 */
    3535
    3636if ( ! defined( 'AIOSEOP_VERSION' ) )
    37     define( 'AIOSEOP_VERSION', '2.1.6' );
     37    define( 'AIOSEOP_VERSION', '2.1.' );
    3838
    3939if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
Note: See TracChangeset for help on using the changeset viewer.