Plugin Directory

Changeset 1119068

Timestamp:
03/23/2015 06:18:00 PM (9 years ago)
Author:
pbaylies
Message:

Updated to 2.2.6; added static home page option; translation plugin compatibility; added social meta shortcode support; layout fixes, bug fixes; tagged release.

Location:
all-in-one-seo-pack
Files:
1 added
8 edited
47 copied

Legend:

Unmodified
Added
Removed
  • all-in-one-seo-pack/tags/2.2.6/aioseop_class.php

    r1119066 r1119068  
    7676            "customize_canonical_links"=> __( "Checking this option will allow you to customize Canonical URLs for specific posts.", 'all_in_one_seo_pack'),
    7777            "can_set_protocol" => __( "Set protocol for canonical URLs.", 'all_in_one_seo_pack' ),
    78             "use_original_title"    => __( "Use wp_title to set the title; disable this option if you run into conflicts with the title being set by your theme or another plugin.", 'all_in_one_seo_pack' ),
     78            "use_original_title"    => __( "Use wp_title to .", 'all_in_one_seo_pack' ),
    7979            "do_log"                => __( "Check this and All in One SEO Pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.", 'all_in_one_seo_pack' ),
    8080            "home_title"            => __( "As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.", 'all_in_one_seo_pack' ),
    8181            "home_description"      => __( "This will be the Meta Description for your homepage. This is independent of any other option. The default is no Meta Description at all if this is not set.", 'all_in_one_seo_pack' ),
    8282            "home_keywords"         => __( "Enter a comma separated list of your most important keywords for your site that will be written as Meta Keywords on your homepage. Don\'t stuff everything in here.", 'all_in_one_seo_pack' ),
     83
    8384            "togglekeywords"        => __( "This option allows you to toggle the use of Meta Keywords throughout the whole of the site.", 'all_in_one_seo_pack' ),
    8485            "use_categories"        => __( "Check this if you want your categories for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all_in_one_seo_pack' ),
    8586            "use_tags_as_keywords"  => __( "Check this if you want your tags for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all_in_one_seo_pack' ),
    86             "dynamic_postspage_keywords"=>  __( "Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.", 'all_in_one_seo_pack'),
     87            "dynamic_postspage_keywords"=>  __( "Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.", 'all_in_one_seo_pack'),
    8788            "rewrite_titles"        => __( "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the title bar and in the source code. If enabled, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: Using the default post title format below, Rewrite Titles will write all post titles as 'Post Title | Blog Name'. If you have manually defined a title using All in One SEO Pack, this will become the title of your post in the format string.", 'all_in_one_seo_pack' ),
    8889            "cap_titles"            => __( "Check this and Search Page Titles and Tag Page Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack' ),
    8990            "cap_cats"              => __( "Check this and Category Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack'),
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
    90101            "page_title_format"     =>
    91102                __( "This controls the format of the title tag for Pages.<br />The following macros are supported:", 'all_in_one_seo_pack' )
     
    93104                __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
    94105                __( '%page_title% - The original title of the page', 'all_in_one_seo_pack' ) . '</li><li>' .
    95                 __( '%category_title% - The (main) category of the page', 'all_in_one_seo_pack' ) . '</li><li>' .
    96                 __( '%category% - Alias for %category_title%', 'all_in_one_seo_pack' ) . '</li><li>' .
    97106                __( "%page_author_login% - This page's author' login", 'all_in_one_seo_pack' ) . '</li><li>' .
    98107                __( "%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack' ) . '</li><li>' .
     
    310319                'name' => __( 'Home Title:', 'all_in_one_seo_pack' ),
    311320                'default' => null, 'type' => 'textarea', 'sanitize' => 'text',
    312                 'count' => true, 'rows' => 1, 'cols' => 60 ),
     321                'count' => true, 'rows' => 1, 'cols' => 60,
     322                'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
    313323           "home_description"=> Array(
    314324                'name' => __( 'Home Description:', 'all_in_one_seo_pack' ),
    315325                'default' => '', 'type' => 'textarea', 'sanitize' => 'text',
    316                 'count' => true, 'cols' => 80, 'rows' => 2 ),
     326                'count' => true, 'cols' => 80, 'rows' => 2,
     327                'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
    317328           "togglekeywords" => Array(
    318329                'name' => __( 'Use Keywords:', 'all_in_one_seo_pack' ),
     
    325336                'name' => __( 'Home Keywords (comma separated):', 'all_in_one_seo_pack' ),
    326337                'default' => null, 'type' => 'textarea', 'sanitize' => 'text',
    327                 'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
     338                'condshow' => Array( "aiosp_togglekeywords" => 0, "aiosp_use_static_home_info" => 0 ) ),
     339           "use_static_home_info" => Array(
     340                'name' => __( "Use Static Front Page Instead", 'all_in_one_seo_pack' ),
     341                'default' => 0,
     342                'type' => 'radio',
     343                'initial_options' => Array( 1 => __( 'Enabled', 'all_in_one_seo_pack' ),
     344                                            0 => __( 'Disabled', 'all_in_one_seo_pack' ) )
     345            ),
    328346           "can"=> Array(
    329347                'name' => __( 'Canonical URLs:', 'all_in_one_seo_pack' ),
     
    372390            "cap_cats"=> Array(
    373391                'name' => __( 'Capitalize Category Titles:', 'all_in_one_seo_pack' ), 'default' => 1),
     392
     393
     394
     395
    374396           "page_title_format"=> Array(
    375397                'name' => __( 'Page Title Format:', 'all_in_one_seo_pack' ),
     
    423445                                            0 => __( 'Disabled', 'all_in_one_seo_pack' ) )
    424446                ),
     447
     448
     449
     450
     451
    425452            "cpostadvanced" => Array(
    426453                'name' => __( 'Enable Advanced Options:', 'all_in_one_seo_pack' ),
     
    430457                'label' => null,
    431458                'condshow' => Array( "aiosp_enablecpost" => 'on' )
    432                 ),
    433             "cpostactive" => Array(
    434                 'name' => __( 'SEO on only these post types:', 'all_in_one_seo_pack' ),
    435                 'type' => 'multicheckbox', 'default' => array('post', 'page'),
    436                 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
    437459                ),
    438460            "cpostnoindex" => Array(
     
    571593                'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
    572594            "dynamic_postspage_keywords"=> Array(
    573                 'name' => __( 'Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack' ),
     595                'name' => __( 'Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack' ),
    574596                'default' => 1,
    575597                'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
     
    662684                                                                                                    jQuery(document).ready(function() {
    663685                                                                                                        jQuery("#aiosp_title_wrapper").bind("input", function() {
    664                                                                                                             jQuery("#aioseop_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm, ""));
     686                                                                                                            jQuery("#aiosp_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm, ""));
    665687                                                                                                        });
    666688                                                                                                        jQuery("#aiosp_description_wrapper").bind("input", function() {
     
    672694                                                                        'title'              => Array( 'name' => __( 'Title', 'all_in_one_seo_pack' ), 'type' => 'text', 'count' => true, 'size' => 60 ),
    673695                                                                        'description'        => Array( 'name' => __( 'Description', 'all_in_one_seo_pack' ), 'type' => 'textarea', 'count' => true, 'cols' => 80, 'rows' => 2 ),
     696
    674697                                                                        'keywords'           => Array( 'name' => __( 'Keywords (comma separated)', 'all_in_one_seo_pack' ), 'type' => 'text' ),
    675698                                                                        'custom_link'        => Array( 'name' => __( 'Custom Canonical URL', 'all_in_one_seo_pack' ), 'type' => 'text', 'size' => 60 ),                                                                     
     
    699722                        'name' => __( 'Home Page Settings', 'all_in_one_seo_pack' ),
    700723                        'help_link' => 'http://semperplugins.com/documentation/home-page-settings/',
    701                         'options' => Array( 'home_title', 'home_description', 'home_keywords' )
     724                        'options' => Array( 'home_title', 'home_description', 'home_keywords' )
    702725                    ),
    703726                'keywords' => Array(
     
    709732                        'name' => __( 'Title Settings', 'all_in_one_seo_pack' ),
    710733                        'help_link' => 'http://semperplugins.com/documentation/title-settings/',
    711                         'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "date_title_format", "author_title_format",
     734                        'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "date_title_format", "author_title_format",
    712735                                            "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format" )                       
    713736                    ),
     
    765788            return $info;
    766789        global $post, $aioseop_options, $wp_query;
    767         $title = $url = $description = $term = '';
     790        $title = $url = $description = $term = '';
    768791        $p = $post; $w = $wp_query;
    769792        if ( !is_object( $post ) ) $post = $this->get_queried_object();
     
    776799            $opts = $this->meta_opts;
    777800            $post_id = $p->ID;
    778             if (! $post->post_modified_gmt != '' )
     801            if ( )
    779802                $wp_query = new WP_Query( array( 'p' => $post_id, 'post_type' => $post->post_type ) );
    780803            if ( $post->post_type == 'page' )
     
    805828                    $title_format = $aioseop_options['aiosp_page_title_format'];
    806829                elseif ( is_single() || is_attachment() )
    807                     $title_format = $this->get_post_title_format();
     830                    $title_format = $this->get_post_title_format();
    808831            }
    809832            if ( empty( $title_format ) ) {
    810833                $title_format = '%post_title%';
    811834            }
     835
     836
     837
     838
    812839        } else if ( is_object( $term ) ) {
    813840            if ( $_GET['taxonomy'] == 'category' ) {
     
    846873        $keywords = apply_filters( 'aioseop_keywords', $keywords );
    847874       
     875
     876
    848877        wp_reset_postdata();
    849878        $wp_query = $w; $post = $p;
    850         $info = Array( 'title' => $title, 'description' => $description, 'keywords' => $keywords, 'url' => $url, 'title_format' => $title_format );     
    851879        return $info;
    852880    }
     
    866894        $extra_title_len = 0;
    867895        if ( empty( $title_format ) ) {
    868             $title = '<span id="aioseop_snippet_title">' . esc_attr( wp_strip_all_tags( $title ) ) . '</span>';
     896            $title = '<span id=" ) ) . '</span>';
    869897        } else {
    870898            if ( strpos( $title_format, '%blog_title%' ) !== false ) $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
    871899            $title_format = $this->apply_cf_fields( $title_format );
    872             $replace_title = '<span id="aioseop_snippet_title">' . esc_attr( wp_strip_all_tags( $title ) ) . '</span>';
     900            $replace_title = '<span id=" ) ) . '</span>';
    873901            if ( strpos( $title_format, '%post_title%' ) !== false ) $title_format = str_replace( '%post_title%', $replace_title, $title_format );
    874902            if ( strpos( $title_format, '%page_title%' ) !== false ) $title_format = str_replace( '%page_title%', $replace_title, $title_format );
    875             if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
    876             if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
     903            if ( $w->is_category || $w->is_tag || $w->is_tax ) {
     904                if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
     905                if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
     906            } else {
     907                if ( strpos( $title_format, '%category%' ) !== false )       $title_format = str_replace( '%category%',       $category, $title_format );
     908                if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $category, $title_format );
     909                if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $category, $title_format );               
     910            }
    877911            if ( strpos( $title_format, '%taxonomy_description%' ) !== false ) $title_format = str_replace( '%taxonomy_description%', $description, $title_format );
    878912           
     
    10351069                    __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
    10361070                    __( '%post_title% - The original title of the post', 'all_in_one_seo_pack' ) . '</li><li>' .
    1037                     __( '%category_title% - The (main) category of the post', 'all_in_one_seo_pack' ) . '</li><li>' .
    1038                     __( '%category% - Alias for %category_title%', 'all_in_one_seo_pack' ) . '</li><li>' .
    10391071                    __( "%post_author_login% - This post's author' login", 'all_in_one_seo_pack' ) . '</li><li>' .
    10401072                    __( "%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack' ) . '</li><li>' .
     
    13241356            $wp_post_types = get_post_types( Array( '_builtin' => true ) ); // don't display meta if SEO isn't enabled on custom post types -- pdb
    13251357            if( is_singular() && !in_array( $post_type, $wp_post_types ) && !is_front_page() ) return false;
    1326         } elseif ( !empty( $aioseop_options['aiosp_cpostadvanced'] ) ) {
     1358        } else {
    13271359            $wp_post_types = $aioseop_options['aiosp_cpostactive'];
    13281360            if ( is_singular() && !in_array( $post_type, $wp_post_types ) && !is_front_page() ) return false;
     
    14121444        if ( isset( $this->is_front_page ) && $this->is_front_page !== null ) return $this->is_front_page;
    14131445        $post = $this->get_queried_object();
    1414         $this->is_front_page = ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) );
     1446        $this->is_front_page = ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) );
    14151447        return $this->is_front_page;
    14161448    }
     
    14201452        if ( $is_posts_page !== null ) return $is_posts_page;
    14211453        $post = $this->get_queried_object();
    1422         $is_posts_page = ( get_option( 'show_on_front' ) == 'page' && is_home() && $post->ID == get_option( 'page_for_posts' ) );
     1454        $is_posts_page = ( get_option( 'show_on_front' ) == 'page' && is_home() && $post->ID == get_option( 'page_for_posts' ) );
    14231455        return $is_posts_page;
    14241456    }
     
    16131645            $description = $this->internationalize( get_the_author_meta( 'description' ) );
    16141646        } else if ( is_front_page() ) {
    1615             $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
     1647            $description = );
    16161648        } else if ( function_exists( 'woocommerce_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = woocommerce_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
    16171649            $description = $this->get_post_description( $post );
     
    16691701        $opts = $this->meta_opts;
    16701702        if ( ( ( is_front_page() && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() ) || $this->is_static_front_page() ) ) {
    1671             $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );
    1672         } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ($this->is_static_posts_page() || is_archive() || is_post_type_archive() ) ) {
    1673                 $keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
     1703            if ( !empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
     1704                $keywords = $this->get_all_keywords();
     1705            } else {
     1706                $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );             
     1707            }
     1708        } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
     1709            $keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
    16741710        } elseif ( ( $blog_page = $this->get_blog_page( $post ) )  && empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) ) {
    1675                 $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
     1711            $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
     1712        } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
     1713            $keywords = "";
    16761714        } else {
    16771715            $keywords = $this->get_all_keywords();
     
    22782316                return false;
    22792317            }
     2318
     2319
     2320
     2321
     2322
     2323
     2324
     2325
    22802326        } elseif ( ( $query->is_single || $query->is_page ) && $haspost ) {
    22812327            $post = $query->posts[0];
     
    23002346        } elseif ( $query->is_year && $haspost ) {
    23012347            $link = get_year_link( get_query_var( 'year' ) );
    2302         } elseif ( $query->is_home ) {
    2303             if ( (get_option( 'show_on_front' ) == 'page' ) &&
    2304                 ( $pageid = get_option( 'page_for_posts' ) ) ) {
    2305                 $link = get_permalink( $pageid );
    2306             } else {
    2307                 if ( function_exists( 'icl_get_home_url' ) ) {
    2308                     $link = icl_get_home_url();
    2309                 } else {
    2310                     $link = trailingslashit( home_url() );
    2311                 }
    2312             }
    23132348        } elseif ( $query->is_tax && $haspost ) {
    23142349            $taxonomy = get_query_var( 'taxonomy' );
     
    23602395        return $link;
    23612396    }
    2362 
     2397   
     2398    function is_singular( $post_types = Array(), $post = null ) {
     2399        if ( !empty( $post_types ) && is_object( $post ) )
     2400            return in_array( $post->post_type, (array)$post_types );
     2401        else
     2402            return is_singular( $post_types );
     2403    }
     2404   
    23632405    function show_page_description() {
    23642406        global $aioseop_options;
     
    23732415    function get_post_description( $post ) {
    23742416        global $aioseop_options;
    2375 
     2417        $description = '';
    23762418        if ( !$this->show_page_description() )
    23772419            return '';
    23782420       
    23792421        $description = trim( stripslashes( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) );
     2422
     2423
     2424
    23802425        if ( !$description ) {
    23812426            if ( empty( $aioseop_options["aiosp_skip_excerpt"] ) )
     
    24152460            $post = $GLOBALS["post"];
    24162461        $blog_page = $this->get_blog_page();
    2417         if ( $this->is_static_front_page() )
     2462        $description = '';
     2463        if ( $this->is_static_front_page() && empty( $aioseop_options['aiosp_use_static_home_info'] ) )
    24182464            $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
    24192465        elseif ( !empty( $blog_page ) )
     
    24472493            $in = polyglot_filter( $in );
    24482494
    2449         if ( function_exists( 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) )
     2495        if ( function_exists( 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) )
    24502496            $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $in );
     2497
     2498
     2499
     2500
     2501
    24512502
    24522503        return apply_filters( 'localization', $in );
     
    24542505
    24552506    /** @return The original title as delivered by WP (well, in most cases) */
    2456     function get_original_title( $sep = '', $echo = false, $seplocation = '' ) {
     2507    function get_original_title( $sep = '', $echo = false, $seplocation = '' ) {
    24572508        global $aioseop_options;
    24582509        if ( !empty( $aioseop_options['aiosp_use_original_title'] ) ) {
     
    24602511            if ( $has_filter !== false )
    24612512                remove_filter( 'wp_title', Array( $this, 'wp_title' ), $has_filter );
     2513
     2514
     2515
     2516
     2517
    24622518            $title = wp_title( $sep, $echo, $seplocation );
    24632519            if ( $has_filter !== false )
     
    25612617        if ( strpos( $title, '%blog_title%'           ) !== false ) $title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title );
    25622618        if ( strpos( $title, '%blog_description%'     ) !== false ) $title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $title );
    2563         $title = trim( wp_strip_all_tags( $title ) );
    2564         $title = str_replace( Array( '"', "\r\n", "\n" ), Array( '&quot;', ' ', ' ' ), $title );
     2619        $title = wp_strip_all_tags( $title );
    25652620        return $this->paged_title( $title );
    25662621    }
     
    25912646    }
    25922647   
    2593     function get_post_title_format( $title_type = 'post' ) {
     2648    function get_post_title_format( $title_type = 'post' ) {
    25942649        global $aioseop_options;
    25952650        if ( ( $title_type != 'post' ) && ( $title_type != 'archive' ) ) return false;
     
    25972652        if ( isset( $aioseop_options["aiosp_{$title_type}_title_format"] ) )
    25982653            $title_format = $aioseop_options["aiosp_{$title_type}_title_format"];
    2599         if( !empty( $aioseop_options['aiosp_enablecpost'] ) && !empty( $aioseop_options['aiosp_cpostadvanced'] ) && !empty( $aioseop_options['aiosp_cpostactive'] ) ) {
     2654        if( !empty( $aioseop_options['aiosp_enablecpost'] ) && !empty( $aioseop_options['aiosp_cpostactive'] ) ) {
    26002655            $wp_post_types = $aioseop_options['aiosp_cpostactive'];
    26012656            if ( !empty( $aioseop_options["aiosp_cposttitles"] ) ) {
    26022657                if ( ( ( $title_type == 'archive' ) && is_post_type_archive( $wp_post_types ) && $prefix = "aiosp_{$title_type}_" ) ||
    2603                      ( ( $title_type == 'post' ) && is_singular( $wp_post_types ) && $prefix = "aiosp_" ) ) {
    2604                         $post_type = get_post_type();
    2605                         if ( !empty( $aioseop_options["{$prefix}{$post_type}_title_format"] ) )
    2606                             $title_format = $aioseop_options["{$prefix}{$post_type}_title_format"];                 
     2658                    ( ( $title_type == 'post' ) && $this->is_singular( $wp_post_types, $p ) && $prefix = "aiosp_" ) ) {
     2659                        $post_type = get_post_type( $p );
     2660                        if ( !empty( $aioseop_options["{$prefix}{$post_type}_title_format"] ) ) {
     2661                            $title_format = $aioseop_options["{$prefix}{$post_type}_title_format"];
     2662                        }               
    26072663                }
    26082664            }
     
    26292685            $post = $p;
    26302686        }
    2631         $title_format = $this->get_post_title_format();
     2687        $title_format = $this->get_post_title_format();
    26322688        if ( !empty( $post ) )
    26332689            $authordata = get_userdata( $post->post_author );
     
    26402696    }
    26412697   
    2642     function apply_page_title_format( $title, $p = null ) {
     2698    function apply_page_title_format( $title, $p = null ) {
    26432699        global $aioseop_options;
    26442700        if ( $p === null ) {
     
    26472703            $post = $p;
    26482704        }
    2649         $title_format = $aioseop_options['aiosp_page_title_format'];
     2705        if ( empty( $title_format ) )
     2706            $title_format = $aioseop_options['aiosp_page_title_format'];
    26502707        if ( !empty( $post ) )
    26512708            $authordata = get_userdata( $post->post_author );
     
    26702727        $opts = $this->meta_opts;
    26712728        if ( is_front_page() ) {
    2672             $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
     2729            if ( !empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
     2730                global $post;
     2731                if ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) ) {
     2732                    $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
     2733                    if ( !$title ) $title = $this->internationalize( $post->post_title );
     2734                    if ( !$title ) $title = $this->internationalize( $this->get_original_title( '', false ) );
     2735                    if ( !empty( $aioseop_options['aiosp_home_page_title_format'] ) )
     2736                        $title = $this->apply_page_title_format( $title, $post, $aioseop_options['aiosp_home_page_title_format'] );
     2737                    $title = $this->paged_title( $title );
     2738                    $title = apply_filters( 'aioseop_home_page_title', $title );
     2739                }
     2740            } else {
     2741                $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
     2742                if ( !empty( $aioseop_options['aiosp_home_page_title_format'] ) )
     2743                    $title = $this->apply_page_title_format( $title, null, $aioseop_options['aiosp_home_page_title_format'] );         
     2744            }
    26732745            if (empty( $title ) )
    26742746                $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
     
    26852757            if ( $post === null ) return false;
    26862758            if ( ( $this->is_static_front_page() ) && ( $home_title = $this->internationalize( $aioseop_options['aiosp_home_title'] ) ) ) {
     2759
     2760
    26872761                //home title filter
    26882762                return apply_filters( 'aioseop_home_page_title', $home_title );
     
    27232797            // we're not in the loop :(
    27242798            if ( $post === null ) return false;
    2725             $categories = get_the_category();
     2799            $categories = ();
    27262800            $category = '';
    2727             if ( count( $categories ) > 0 ) {
    2728                 $category = $categories[0]->cat_name;
    2729             }
     2801            if ( count( $categories ) > 0 )
     2802                $category = $categories[0];
    27302803            $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
    27312804            if ( !$title ) {
     
    29343007    function get_all_categories( $id = 0 ) {
    29353008        $keywords = Array();
    2936         $categories = get_the_category( $id );
    2937         foreach ( $categories as $category )
    2938             $keywords[] = $this->internationalize( $category->cat_name );
     3009        $categories = get_the_category( $id );
     3010        if ( !empty( $categories ) )
     3011            foreach ( $categories as $category )
     3012                $keywords[] = $this->internationalize( $category->cat_name );
    29393013        return $keywords;
    29403014    }
     
    29433017        $keywords = Array();
    29443018        $tags = get_the_tags( $id );
    2945         if ( $tags && is_array( $tags) )
     3019        if ( && is_array( $tags) )
    29463020            foreach ( $tags as $tag )
    29473021                $keywords[] = $this->internationalize( $tag->name );
     
    29753049        $opts = $this->meta_opts;
    29763050        if ( !empty( $opts["aiosp_keywords"] ) ) {
    2977             $traverse = $this->keyword_string_to_list( $opts["aiosp_keywords"] );
     3051            $traverse = $this->keyword_string_to_list( $ );
    29783052            if ( !empty( $traverse ) )
    29793053                foreach ( $traverse as $keyword ) $keywords[] = $keyword;
  • all-in-one-seo-pack/tags/2.2.6/aioseop_functions.php

    r1119066 r1119068  
    156156        ?><style>
    157157        .aioseop_edit_button {
    158         margin: 0 0 0 5px;
    159         opacity: 0.6;
    160         width: 12px;
     158            margin: 0 0 0 5px;
     159            opacity: 0.6;
     160            width: 12px;
     161        }
     162        .aioseop_edit_link {
     163            display: inline-block;
     164            position: absolute;
    161165        }
    162166        .aioseop_mpc_SEO_admin_options_edit img {
     
    168172            display: block;
    169173            opacity: 1;
     174
     175
     176
     177
     178
     179
     180
    170181        }
    171182        .aioseop_mpc_admin_meta_content {
     
    173184            width: 100%;
    174185            margin: 0 0 10px 0;
    175         }   
     186        }
     187        td.seotitle.column-seotitle,
     188        td.seodesc.column-seodesc,
     189        td.seokeywords.column-seokeywords {
     190            overflow: visible;
     191        }
    176192        </style>
    177193        <?php wp_print_scripts( Array( 'sack' ) );
     
    210226if ( !function_exists( 'aioseop_output_notice' ) ) {
    211227    function aioseop_output_notice( $message, $id = '', $class = "updated fade" ) {
     228
    212229        if ( !empty( $class ) ) $class = ' class="' . esc_attr( $class ) . '"';
    213230        if ( !empty( $id ) )    $class .= ' id="' . esc_attr( $id ) . '"';
    214231        $dismiss = ' ';
    215         echo "<div{$class}>" . wp_kses_post( $message ) . "</div>";
     232        echo "<div{$class}>" . wp_kses_post( $message ) . "</div>";
    216233        return true;
    217234    }
     
    231248            $qa['aioseop_ignore_notice'] = $msgid;
    232249            $url = '?' . build_query( $qa );
    233             $message .= '  <a class="alignright" href="' . $url . '">Dismiss</a>';         
     250            $message >';         
    234251        }
    235252        return aioseop_output_notice( $message, $id, $class );
    236253    }
    237254}
    238 
    239255if ( !function_exists( 'aioseop_ajax_save_meta' ) ) {
    240256    function aioseop_ajax_save_meta() {
     
    253269        }
    254270        if( $result != '' ):
    255             $label = "<label id='aioseop_label_{$target}_{$post_id}'>" . $result . '</label>'; 
     271            $label = "<label id='aioseop_label_{$target}_{$post_id}'>" . $result . '</label>'; 
    256272        else:
    257             $label = '';
    258             $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><strong><i>" . __( 'No', 'all_in_one_seo_pack' ) . ' ' . $target . '</i></strong>';
     273            $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all_in_one_seo_pack' ) . ' ' . $target . '</i></strong>';
    259274        endif;
    260275        $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
    261         $output = $label . '<a id="' . $target . 'editlink' . $post_id . '" href="javascript:void(0);"';
    262         $output .= 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">';
    263         $output .= '<img class="aioseop_edit_button" id="aioseop_edit_id" src="' . AIOSEOP_PLUGIN_IMAGES_URL . '/cog_edit.png" /></a>';
     276        $output =
     277       
     278        ;
    264279        die( "jQuery('div#aioseop_" . $target . "_" . $post_id . "').fadeOut('fast', function() { var my_label = " . json_encode( $output ) . ";
    265280              jQuery('div#aioseop_" . $target . "_" . $post_id . "').html(my_label).fadeIn('fast');
     
    516531                    <?php $content = strip_tags( stripslashes( get_post_meta( $id, "_aioseop_" . $target,   TRUE ) ) );
    517532                if( !empty($content) ):
    518                     $label = "<label id='aioseop_label_{$target}_{$id}'>" . $content . '</label>'; 
     533                    $label = "<label id='aioseop_label_{$target}_{$id}'>" . $content . '</label>'; 
    519534                else:
    520                     $label = "<label id='aioseop_label_{$target}_{$id}'></label><strong><i>No " . $target . '</i></strong>';
     535                    $label = "<label id='aioseop_label_{$target}_{$id}'></label><s " . $target . '</i></strong>';
    521536                endif;
    522537                    $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$id}" );
    523                     print $label . '<a id="' . $target . 'editlink' . $id . '" href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
    524                     $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">';
    525                         print "<img class='aioseop_edit_button'
     538                    " href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
     539                    $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">'
     540                        "<img class='aioseop_edit_button'
    526541                                            id='aioseop_edit_id'
    527                                             src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a>";
     542                                            src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a>;
    528543                     ?>
    529544                </div>
  • all-in-one-seo-pack/tags/2.2.6/aioseop_module.css

    r1119066 r1119068  
    840840.aioseop_option_docs h3 {
    841841    background:none;
     842
     843
     844
     845
     846
     847
     848
     849
    842850}
    843851.aioseop_error_notice {
  • all-in-one-seo-pack/tags/2.2.6/aioseop_module_class.php

    r1119066 r1119068  
    129129            static $charset = null;
    130130            if ( $charset == null ) $charset = get_bloginfo( 'charset' );
    131 
     131            $str = (string)$str;
    132132            if ( $mode == 'title' ) {
    133133                if ( function_exists( 'mb_convert_case' ) )
  • all-in-one-seo-pack/tags/2.2.6/aioseop_opengraph.php

    r1119066 r1119068  
    7979                "setmeta"               => __( "Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all_in_one_seo_pack' ),
    8080                "key"                   => __( "Your Profile Admin ID is your Facebook profile ID. You can find out your Facebook ID using the lookup tool here: https://graph.facebook.com/yourusername", 'all_in_one_seo_pack' ),
     81
     82
    8183                "sitename"              => __( "The Site Name is the name that is used to identify your website.", 'all_in_one_seo_pack' ),
    8284                "hometitle"             => __( "The Home Title is the Open Graph title for your home page.", 'all_in_one_seo_pack' ),
     
    145147                    'setmeta'       => Array(   'name'          => __( 'Use AIOSEO Title and Description',  'all_in_one_seo_pack'), 'type' => 'checkbox' ),
    146148                    'key'           => Array(   'name'          => __( 'Profile Admins ID',  'all_in_one_seo_pack'), 'default' => '', 'type' => 'text' ),
     149
     150
    147151                    'sitename'      => Array(   'name'          => __( 'Site Name',  'all_in_one_seo_pack' ), 'default' => get_bloginfo('name'), 'type' => 'text' ),
    148152                    'hometitle'     => Array(   'name'          => __( 'Home Title',  'all_in_one_seo_pack'),
     
    216220            $this->locations = array(
    217221                'opengraph' =>  Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings',
    218                                        'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag', 'generate_descriptions', 'defimg',
     222                                       'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag', 'generate_descriptions', 'defimg',
    219223                                       'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'twitter_site', 'twitter_creator', 'twitter_domain', 'gen_tags', 'gen_keywords', 'gen_categories',
    220224                                       'gen_post_tags', 'types', 'facebook_publisher', 'facebook_author' ) ),
     
    463467                /* If Use AIOSEO Title and Desc Selected */
    464468                if( $setmeta ) {
    465                     $title = $aioseop_options['aiosp_home_title'];
     469                    $title = $aios;
    466470                    if ( $first_page )
    467                         $description = $aioseop_options['aiosp_home_description'];
     471                        $description = $aios;
    468472                }
    469473               
     
    472476                if( empty($sitename) ) $sitename = get_bloginfo('name');
    473477               
    474                 if ( empty( $description ) && $first_page && ( !empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) && !empty( $post ) && !empty( $post->post_content ) )
     478                if ( empty( $description ) && $first_page && ( !empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) && !empty( $post ) && !empty( $post->post_content ) )
    475479                    $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
    476480               
     
    524528                /* Add some defaults */
    525529                if ( empty( $title ) ) $title = get_the_title();
    526                 if ( empty( $description ) && ( $this->options['aiosp_opengraph_generate_descriptions'] ) )
     530                if ( empty( $description ) && ( $this->options['aiosp_opengraph_generate_descriptions'] ) )
    527531                    $description = $post->post_content;
    528532                if ( empty( $type ) ) $type = 'article';
     
    550554                    $tag = $aiosp->clean_keyword_list( $tag );         
    551555            }
    552             if ( !empty( $description ) )
    553                 $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) ), 1000 );
    554            
     556           
     557            if ( !empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
     558                $title = do_shortcode( $title );
     559            }
     560           
     561            if ( !empty( $description ) ) {
     562                $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
     563                if ( !empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
     564                    $description = do_shortcode( $description );
     565                }
     566                $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );             
     567            }
     568                       
    555569            $title = $this->apply_cf_fields( $title );
    556570            $description = $this->apply_cf_fields( $description );
  • all-in-one-seo-pack/tags/2.2.6/all_in_one_seo_pack.php

    r1119066 r1119068  
    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.2.5.1
     6Version: 2.2.
    77Author: Michael Torbert
    88Author URI: http://michaeltorbert.com
     
    3131/**
    3232 * @package All-in-One-SEO-Pack
    33  * @version 2.2.5.1
     33 * @version 2.2.
    3434 */
     35
     36
    3537
    3638global $aioseop_plugin_name;
     
    4042
    4143if ( ! defined( 'AIOSEOP_VERSION' ) )
    42     define( 'AIOSEOP_VERSION', '2.2.5.1' );
     44    define( 'AIOSEOP_VERSION', '2.2.' );
    4345
    4446if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
  • all-in-one-seo-pack/tags/2.2.6/quickedit_functions.js

    r1119066 r1119068  
    33    var post_title = jQuery('#aioseop_label_' + meta + '_' + post_id).text();
    44    var element = uform.html(); var input;
    5     input = '<textarea id="aioseop_new_'+meta+'_' + post_id + '" style="font-size:10px;width:65%;float:left" rows=2 cols=16>'  + post_title + '</textarea>';
     5    input = '<textarea id="aioseop_new_'+meta+'_' + post_id + '" style="font-size:1>'  + post_title + '</textarea>';
    66    input += '<label style="float:left">';
    77    input += '<a class="aioseop_mpc_SEO_admin_options_edit" href="javascript:void(0);" id="aioseop_'+meta+'_save_' + post_id + '" >';
     
    1111    input += '</label>';
    1212    uform.html( input );
     13
    1314    jQuery('#aioseop_'+meta+'_cancel_' + post_id).click(function() {
    1415        uform.html( element );
     16
    1517    });
    1618    jQuery('#aioseop_'+meta+'_save_' + post_id).click(function() {
     
    4042        })
    4143        jQuery("div#aioseop_"+m+"_"+p).html(loading);
     44
     45
    4246    })
    4347};
  • all-in-one-seo-pack/tags/2.2.6/readme.txt

    r1119066 r1119068  
    44Tags: all in one, all in one seo, all in one seo pack, seo, search engine optimization, google
    55Requires at least: 3.3
    6 Tested up to: 4.1
     6Tested up to: 4.1
    77Stable tag: trunk
    88
  • all-in-one-seo-pack/trunk/aioseop_class.php

    r1079109 r1119068  
    7676            "customize_canonical_links"=> __( "Checking this option will allow you to customize Canonical URLs for specific posts.", 'all_in_one_seo_pack'),
    7777            "can_set_protocol" => __( "Set protocol for canonical URLs.", 'all_in_one_seo_pack' ),
    78             "use_original_title"    => __( "Use wp_title to set the title; disable this option if you run into conflicts with the title being set by your theme or another plugin.", 'all_in_one_seo_pack' ),
     78            "use_original_title"    => __( "Use wp_title to .", 'all_in_one_seo_pack' ),
    7979            "do_log"                => __( "Check this and All in One SEO Pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging. Make sure this directory is writable.", 'all_in_one_seo_pack' ),
    8080            "home_title"            => __( "As the name implies, this will be the Meta Title of your homepage. This is independent of any other option. If not set, the default Site Title (found in WordPress under Settings, General, Site Title) will be used.", 'all_in_one_seo_pack' ),
    8181            "home_description"      => __( "This will be the Meta Description for your homepage. This is independent of any other option. The default is no Meta Description at all if this is not set.", 'all_in_one_seo_pack' ),
    8282            "home_keywords"         => __( "Enter a comma separated list of your most important keywords for your site that will be written as Meta Keywords on your homepage. Don\'t stuff everything in here.", 'all_in_one_seo_pack' ),
     83
    8384            "togglekeywords"        => __( "This option allows you to toggle the use of Meta Keywords throughout the whole of the site.", 'all_in_one_seo_pack' ),
    8485            "use_categories"        => __( "Check this if you want your categories for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all_in_one_seo_pack' ),
    8586            "use_tags_as_keywords"  => __( "Check this if you want your tags for a given post used as the Meta Keywords for this post (in addition to any keywords you specify on the Edit Post screen).", 'all_in_one_seo_pack' ),
    86             "dynamic_postspage_keywords"=>  __( "Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.", 'all_in_one_seo_pack'),
     87            "dynamic_postspage_keywords"=>  __( "Check this if you want your keywords on your Posts page (set in WordPress under Settings, Reading, Front Page Displays) to be dynamically generated from the keywords of the posts showing on that page.  If unchecked, it will use the keywords set in the edit page screen for the posts page.", 'all_in_one_seo_pack'),
    8788            "rewrite_titles"        => __( "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the title bar and in the source code. If enabled, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: Using the default post title format below, Rewrite Titles will write all post titles as 'Post Title | Blog Name'. If you have manually defined a title using All in One SEO Pack, this will become the title of your post in the format string.", 'all_in_one_seo_pack' ),
    8889            "cap_titles"            => __( "Check this and Search Page Titles and Tag Page Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack' ),
    8990            "cap_cats"              => __( "Check this and Category Titles will have the first letter of each word capitalized.", 'all_in_one_seo_pack'),
     91
     92
     93
     94
     95
     96
     97
     98
     99
     100
    90101            "page_title_format"     =>
    91102                __( "This controls the format of the title tag for Pages.<br />The following macros are supported:", 'all_in_one_seo_pack' )
     
    93104                __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
    94105                __( '%page_title% - The original title of the page', 'all_in_one_seo_pack' ) . '</li><li>' .
    95                 __( '%category_title% - The (main) category of the page', 'all_in_one_seo_pack' ) . '</li><li>' .
    96                 __( '%category% - Alias for %category_title%', 'all_in_one_seo_pack' ) . '</li><li>' .
    97106                __( "%page_author_login% - This page's author' login", 'all_in_one_seo_pack' ) . '</li><li>' .
    98107                __( "%page_author_nicename% - This page's author' nicename", 'all_in_one_seo_pack' ) . '</li><li>' .
     
    310319                'name' => __( 'Home Title:', 'all_in_one_seo_pack' ),
    311320                'default' => null, 'type' => 'textarea', 'sanitize' => 'text',
    312                 'count' => true, 'rows' => 1, 'cols' => 60 ),
     321                'count' => true, 'rows' => 1, 'cols' => 60,
     322                'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
    313323           "home_description"=> Array(
    314324                'name' => __( 'Home Description:', 'all_in_one_seo_pack' ),
    315325                'default' => '', 'type' => 'textarea', 'sanitize' => 'text',
    316                 'count' => true, 'cols' => 80, 'rows' => 2 ),
     326                'count' => true, 'cols' => 80, 'rows' => 2,
     327                'condshow' => Array( "aiosp_use_static_home_info" => 0 ) ),
    317328           "togglekeywords" => Array(
    318329                'name' => __( 'Use Keywords:', 'all_in_one_seo_pack' ),
     
    325336                'name' => __( 'Home Keywords (comma separated):', 'all_in_one_seo_pack' ),
    326337                'default' => null, 'type' => 'textarea', 'sanitize' => 'text',
    327                 'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
     338                'condshow' => Array( "aiosp_togglekeywords" => 0, "aiosp_use_static_home_info" => 0 ) ),
     339           "use_static_home_info" => Array(
     340                'name' => __( "Use Static Front Page Instead", 'all_in_one_seo_pack' ),
     341                'default' => 0,
     342                'type' => 'radio',
     343                'initial_options' => Array( 1 => __( 'Enabled', 'all_in_one_seo_pack' ),
     344                                            0 => __( 'Disabled', 'all_in_one_seo_pack' ) )
     345            ),
    328346           "can"=> Array(
    329347                'name' => __( 'Canonical URLs:', 'all_in_one_seo_pack' ),
     
    372390            "cap_cats"=> Array(
    373391                'name' => __( 'Capitalize Category Titles:', 'all_in_one_seo_pack' ), 'default' => 1),
     392
     393
     394
     395
    374396           "page_title_format"=> Array(
    375397                'name' => __( 'Page Title Format:', 'all_in_one_seo_pack' ),
     
    423445                                            0 => __( 'Disabled', 'all_in_one_seo_pack' ) )
    424446                ),
     447
     448
     449
     450
     451
    425452            "cpostadvanced" => Array(
    426453                'name' => __( 'Enable Advanced Options:', 'all_in_one_seo_pack' ),
     
    430457                'label' => null,
    431458                'condshow' => Array( "aiosp_enablecpost" => 'on' )
    432                 ),
    433             "cpostactive" => Array(
    434                 'name' => __( 'SEO on only these post types:', 'all_in_one_seo_pack' ),
    435                 'type' => 'multicheckbox', 'default' => array('post', 'page'),
    436                 'condshow' => Array( 'aiosp_enablecpost' => 'on', 'aiosp_cpostadvanced' => 'on' )
    437459                ),
    438460            "cpostnoindex" => Array(
     
    571593                'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
    572594            "dynamic_postspage_keywords"=> Array(
    573                 'name' => __( 'Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack' ),
     595                'name' => __( 'Dynamically Generate Keywords for Posts Page:', 'all_in_one_seo_pack' ),
    574596                'default' => 1,
    575597                'condshow' => Array( "aiosp_togglekeywords" => 0 ) ),
     
    662684                                                                                                    jQuery(document).ready(function() {
    663685                                                                                                        jQuery("#aiosp_title_wrapper").bind("input", function() {
    664                                                                                                             jQuery("#aioseop_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm, ""));
     686                                                                                                            jQuery("#aiosp_snippet_title").text(jQuery("#aiosp_title_wrapper input").val().replace(/<(?:.|\n)*?>/gm, ""));
    665687                                                                                                        });
    666688                                                                                                        jQuery("#aiosp_description_wrapper").bind("input", function() {
     
    672694                                                                        'title'              => Array( 'name' => __( 'Title', 'all_in_one_seo_pack' ), 'type' => 'text', 'count' => true, 'size' => 60 ),
    673695                                                                        'description'        => Array( 'name' => __( 'Description', 'all_in_one_seo_pack' ), 'type' => 'textarea', 'count' => true, 'cols' => 80, 'rows' => 2 ),
     696
    674697                                                                        'keywords'           => Array( 'name' => __( 'Keywords (comma separated)', 'all_in_one_seo_pack' ), 'type' => 'text' ),
    675698                                                                        'custom_link'        => Array( 'name' => __( 'Custom Canonical URL', 'all_in_one_seo_pack' ), 'type' => 'text', 'size' => 60 ),                                                                     
     
    699722                        'name' => __( 'Home Page Settings', 'all_in_one_seo_pack' ),
    700723                        'help_link' => 'http://semperplugins.com/documentation/home-page-settings/',
    701                         'options' => Array( 'home_title', 'home_description', 'home_keywords' )
     724                        'options' => Array( 'home_title', 'home_description', 'home_keywords' )
    702725                    ),
    703726                'keywords' => Array(
     
    709732                        'name' => __( 'Title Settings', 'all_in_one_seo_pack' ),
    710733                        'help_link' => 'http://semperplugins.com/documentation/title-settings/',
    711                         'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "date_title_format", "author_title_format",
     734                        'options' => Array( "rewrite_titles", "force_rewrites", "cap_titles", "cap_cats", "page_title_format", "post_title_format", "category_title_format", "archive_title_format", "date_title_format", "author_title_format",
    712735                                            "tag_title_format", "search_title_format", "description_format", "404_title_format", "paged_format" )                       
    713736                    ),
     
    765788            return $info;
    766789        global $post, $aioseop_options, $wp_query;
    767         $title = $url = $description = $term = '';
     790        $title = $url = $description = $term = '';
    768791        $p = $post; $w = $wp_query;
    769792        if ( !is_object( $post ) ) $post = $this->get_queried_object();
     
    776799            $opts = $this->meta_opts;
    777800            $post_id = $p->ID;
    778             if (! $post->post_modified_gmt != '' )
     801            if ( )
    779802                $wp_query = new WP_Query( array( 'p' => $post_id, 'post_type' => $post->post_type ) );
    780803            if ( $post->post_type == 'page' )
     
    805828                    $title_format = $aioseop_options['aiosp_page_title_format'];
    806829                elseif ( is_single() || is_attachment() )
    807                     $title_format = $this->get_post_title_format();
     830                    $title_format = $this->get_post_title_format();
    808831            }
    809832            if ( empty( $title_format ) ) {
    810833                $title_format = '%post_title%';
    811834            }
     835
     836
     837
     838
    812839        } else if ( is_object( $term ) ) {
    813840            if ( $_GET['taxonomy'] == 'category' ) {
     
    846873        $keywords = apply_filters( 'aioseop_keywords', $keywords );
    847874       
     875
     876
    848877        wp_reset_postdata();
    849878        $wp_query = $w; $post = $p;
    850         $info = Array( 'title' => $title, 'description' => $description, 'keywords' => $keywords, 'url' => $url, 'title_format' => $title_format );     
    851879        return $info;
    852880    }
     
    866894        $extra_title_len = 0;
    867895        if ( empty( $title_format ) ) {
    868             $title = '<span id="aioseop_snippet_title">' . esc_attr( wp_strip_all_tags( $title ) ) . '</span>';
     896            $title = '<span id=" ) ) . '</span>';
    869897        } else {
    870898            if ( strpos( $title_format, '%blog_title%' ) !== false ) $title_format = str_replace( '%blog_title%', get_bloginfo( 'name' ), $title_format );
    871899            $title_format = $this->apply_cf_fields( $title_format );
    872             $replace_title = '<span id="aioseop_snippet_title">' . esc_attr( wp_strip_all_tags( $title ) ) . '</span>';
     900            $replace_title = '<span id=" ) ) . '</span>';
    873901            if ( strpos( $title_format, '%post_title%' ) !== false ) $title_format = str_replace( '%post_title%', $replace_title, $title_format );
    874902            if ( strpos( $title_format, '%page_title%' ) !== false ) $title_format = str_replace( '%page_title%', $replace_title, $title_format );
    875             if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
    876             if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
     903            if ( $w->is_category || $w->is_tag || $w->is_tax ) {
     904                if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $replace_title, $title_format );
     905                if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $replace_title, $title_format );
     906            } else {
     907                if ( strpos( $title_format, '%category%' ) !== false )       $title_format = str_replace( '%category%',       $category, $title_format );
     908                if ( strpos( $title_format, '%category_title%' ) !== false ) $title_format = str_replace( '%category_title%', $category, $title_format );
     909                if ( strpos( $title_format, '%taxonomy_title%' ) !== false ) $title_format = str_replace( '%taxonomy_title%', $category, $title_format );               
     910            }
    877911            if ( strpos( $title_format, '%taxonomy_description%' ) !== false ) $title_format = str_replace( '%taxonomy_description%', $description, $title_format );
    878912           
     
    10351069                    __( '%blog_description% - Your blog description', 'all_in_one_seo_pack' ) . '</li><li>' .
    10361070                    __( '%post_title% - The original title of the post', 'all_in_one_seo_pack' ) . '</li><li>' .
    1037                     __( '%category_title% - The (main) category of the post', 'all_in_one_seo_pack' ) . '</li><li>' .
    1038                     __( '%category% - Alias for %category_title%', 'all_in_one_seo_pack' ) . '</li><li>' .
    10391071                    __( "%post_author_login% - This post's author' login", 'all_in_one_seo_pack' ) . '</li><li>' .
    10401072                    __( "%post_author_nicename% - This post's author' nicename", 'all_in_one_seo_pack' ) . '</li><li>' .
     
    13241356            $wp_post_types = get_post_types( Array( '_builtin' => true ) ); // don't display meta if SEO isn't enabled on custom post types -- pdb
    13251357            if( is_singular() && !in_array( $post_type, $wp_post_types ) && !is_front_page() ) return false;
    1326         } elseif ( !empty( $aioseop_options['aiosp_cpostadvanced'] ) ) {
     1358        } else {
    13271359            $wp_post_types = $aioseop_options['aiosp_cpostactive'];
    13281360            if ( is_singular() && !in_array( $post_type, $wp_post_types ) && !is_front_page() ) return false;
     
    14121444        if ( isset( $this->is_front_page ) && $this->is_front_page !== null ) return $this->is_front_page;
    14131445        $post = $this->get_queried_object();
    1414         $this->is_front_page = ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) );
     1446        $this->is_front_page = ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) );
    14151447        return $this->is_front_page;
    14161448    }
     
    14201452        if ( $is_posts_page !== null ) return $is_posts_page;
    14211453        $post = $this->get_queried_object();
    1422         $is_posts_page = ( get_option( 'show_on_front' ) == 'page' && is_home() && $post->ID == get_option( 'page_for_posts' ) );
     1454        $is_posts_page = ( get_option( 'show_on_front' ) == 'page' && is_home() && $post->ID == get_option( 'page_for_posts' ) );
    14231455        return $is_posts_page;
    14241456    }
     
    16131645            $description = $this->internationalize( get_the_author_meta( 'description' ) );
    16141646        } else if ( is_front_page() ) {
    1615             $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
     1647            $description = );
    16161648        } else if ( function_exists( 'woocommerce_get_page_id' ) && is_post_type_archive( 'product' ) && ( $post_id = woocommerce_get_page_id( 'shop' ) ) && ( $post = get_post( $post_id ) ) ) {
    16171649            $description = $this->get_post_description( $post );
     
    16691701        $opts = $this->meta_opts;
    16701702        if ( ( ( is_front_page() && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page() ) || $this->is_static_front_page() ) ) {
    1671             $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );
    1672         } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ($this->is_static_posts_page() || is_archive() || is_post_type_archive() ) ) {
    1673                 $keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
     1703            if ( !empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
     1704                $keywords = $this->get_all_keywords();
     1705            } else {
     1706                $keywords = trim( $this->internationalize( $aioseop_options['aiosp_home_keywords'] ) );             
     1707            }
     1708        } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && $this->is_static_posts_page() ) {
     1709            $keywords = stripslashes( $this->internationalize( $opts["aiosp_keywords"] ) ); // and if option = use page set keywords instead of keywords from recent posts
    16741710        } elseif ( ( $blog_page = $this->get_blog_page( $post ) )  && empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) ) {
    1675                 $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
     1711            $keywords = stripslashes( $this->internationalize( get_post_meta( $blog_page->ID, "_aioseop_keywords", true ) ) );
     1712        } elseif ( empty( $aioseop_options['aiosp_dynamic_postspage_keywords'] ) && ( is_archive() || is_post_type_archive() ) ) {
     1713            $keywords = "";
    16761714        } else {
    16771715            $keywords = $this->get_all_keywords();
     
    22782316                return false;
    22792317            }
     2318
     2319
     2320
     2321
     2322
     2323
     2324
     2325
    22802326        } elseif ( ( $query->is_single || $query->is_page ) && $haspost ) {
    22812327            $post = $query->posts[0];
     
    23002346        } elseif ( $query->is_year && $haspost ) {
    23012347            $link = get_year_link( get_query_var( 'year' ) );
    2302         } elseif ( $query->is_home ) {
    2303             if ( (get_option( 'show_on_front' ) == 'page' ) &&
    2304                 ( $pageid = get_option( 'page_for_posts' ) ) ) {
    2305                 $link = get_permalink( $pageid );
    2306             } else {
    2307                 if ( function_exists( 'icl_get_home_url' ) ) {
    2308                     $link = icl_get_home_url();
    2309                 } else {
    2310                     $link = trailingslashit( home_url() );
    2311                 }
    2312             }
    23132348        } elseif ( $query->is_tax && $haspost ) {
    23142349            $taxonomy = get_query_var( 'taxonomy' );
     
    23602395        return $link;
    23612396    }
    2362 
     2397   
     2398    function is_singular( $post_types = Array(), $post = null ) {
     2399        if ( !empty( $post_types ) && is_object( $post ) )
     2400            return in_array( $post->post_type, (array)$post_types );
     2401        else
     2402            return is_singular( $post_types );
     2403    }
     2404   
    23632405    function show_page_description() {
    23642406        global $aioseop_options;
     
    23732415    function get_post_description( $post ) {
    23742416        global $aioseop_options;
    2375 
     2417        $description = '';
    23762418        if ( !$this->show_page_description() )
    23772419            return '';
    23782420       
    23792421        $description = trim( stripslashes( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) );
     2422
     2423
     2424
    23802425        if ( !$description ) {
    23812426            if ( empty( $aioseop_options["aiosp_skip_excerpt"] ) )
     
    24152460            $post = $GLOBALS["post"];
    24162461        $blog_page = $this->get_blog_page();
    2417         if ( $this->is_static_front_page() )
     2462        $description = '';
     2463        if ( $this->is_static_front_page() && empty( $aioseop_options['aiosp_use_static_home_info'] ) )
    24182464            $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );
    24192465        elseif ( !empty( $blog_page ) )
     
    24472493            $in = polyglot_filter( $in );
    24482494
    2449         if ( function_exists( 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) )
     2495        if ( function_exists( 'qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) )
    24502496            $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $in );
     2497
     2498
     2499
     2500
     2501
    24512502
    24522503        return apply_filters( 'localization', $in );
     
    24542505
    24552506    /** @return The original title as delivered by WP (well, in most cases) */
    2456     function get_original_title( $sep = '', $echo = false, $seplocation = '' ) {
     2507    function get_original_title( $sep = '', $echo = false, $seplocation = '' ) {
    24572508        global $aioseop_options;
    24582509        if ( !empty( $aioseop_options['aiosp_use_original_title'] ) ) {
     
    24602511            if ( $has_filter !== false )
    24612512                remove_filter( 'wp_title', Array( $this, 'wp_title' ), $has_filter );
     2513
     2514
     2515
     2516
     2517
    24622518            $title = wp_title( $sep, $echo, $seplocation );
    24632519            if ( $has_filter !== false )
     
    25612617        if ( strpos( $title, '%blog_title%'           ) !== false ) $title = str_replace( '%blog_title%', $this->internationalize( get_bloginfo( 'name' ) ), $title );
    25622618        if ( strpos( $title, '%blog_description%'     ) !== false ) $title = str_replace( '%blog_description%', $this->internationalize( get_bloginfo( 'description' ) ), $title );
    2563         $title = trim( wp_strip_all_tags( $title ) );
    2564         $title = str_replace( Array( '"', "\r\n", "\n" ), Array( '&quot;', ' ', ' ' ), $title );
     2619        $title = wp_strip_all_tags( $title );
    25652620        return $this->paged_title( $title );
    25662621    }
     
    25912646    }
    25922647   
    2593     function get_post_title_format( $title_type = 'post' ) {
     2648    function get_post_title_format( $title_type = 'post' ) {
    25942649        global $aioseop_options;
    25952650        if ( ( $title_type != 'post' ) && ( $title_type != 'archive' ) ) return false;
     
    25972652        if ( isset( $aioseop_options["aiosp_{$title_type}_title_format"] ) )
    25982653            $title_format = $aioseop_options["aiosp_{$title_type}_title_format"];
    2599         if( !empty( $aioseop_options['aiosp_enablecpost'] ) && !empty( $aioseop_options['aiosp_cpostadvanced'] ) && !empty( $aioseop_options['aiosp_cpostactive'] ) ) {
     2654        if( !empty( $aioseop_options['aiosp_enablecpost'] ) && !empty( $aioseop_options['aiosp_cpostactive'] ) ) {
    26002655            $wp_post_types = $aioseop_options['aiosp_cpostactive'];
    26012656            if ( !empty( $aioseop_options["aiosp_cposttitles"] ) ) {
    26022657                if ( ( ( $title_type == 'archive' ) && is_post_type_archive( $wp_post_types ) && $prefix = "aiosp_{$title_type}_" ) ||
    2603                      ( ( $title_type == 'post' ) && is_singular( $wp_post_types ) && $prefix = "aiosp_" ) ) {
    2604                         $post_type = get_post_type();
    2605                         if ( !empty( $aioseop_options["{$prefix}{$post_type}_title_format"] ) )
    2606                             $title_format = $aioseop_options["{$prefix}{$post_type}_title_format"];                 
     2658                    ( ( $title_type == 'post' ) && $this->is_singular( $wp_post_types, $p ) && $prefix = "aiosp_" ) ) {
     2659                        $post_type = get_post_type( $p );
     2660                        if ( !empty( $aioseop_options["{$prefix}{$post_type}_title_format"] ) ) {
     2661                            $title_format = $aioseop_options["{$prefix}{$post_type}_title_format"];
     2662                        }               
    26072663                }
    26082664            }
     
    26292685            $post = $p;
    26302686        }
    2631         $title_format = $this->get_post_title_format();
     2687        $title_format = $this->get_post_title_format();
    26322688        if ( !empty( $post ) )
    26332689            $authordata = get_userdata( $post->post_author );
     
    26402696    }
    26412697   
    2642     function apply_page_title_format( $title, $p = null ) {
     2698    function apply_page_title_format( $title, $p = null ) {
    26432699        global $aioseop_options;
    26442700        if ( $p === null ) {
     
    26472703            $post = $p;
    26482704        }
    2649         $title_format = $aioseop_options['aiosp_page_title_format'];
     2705        if ( empty( $title_format ) )
     2706            $title_format = $aioseop_options['aiosp_page_title_format'];
    26502707        if ( !empty( $post ) )
    26512708            $authordata = get_userdata( $post->post_author );
     
    26702727        $opts = $this->meta_opts;
    26712728        if ( is_front_page() ) {
    2672             $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
     2729            if ( !empty( $aioseop_options['aiosp_use_static_home_info'] ) ) {
     2730                global $post;
     2731                if ( get_option( 'show_on_front' ) == 'page' && is_page() && $post->ID == get_option( 'page_on_front' ) ) {
     2732                    $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
     2733                    if ( !$title ) $title = $this->internationalize( $post->post_title );
     2734                    if ( !$title ) $title = $this->internationalize( $this->get_original_title( '', false ) );
     2735                    if ( !empty( $aioseop_options['aiosp_home_page_title_format'] ) )
     2736                        $title = $this->apply_page_title_format( $title, $post, $aioseop_options['aiosp_home_page_title_format'] );
     2737                    $title = $this->paged_title( $title );
     2738                    $title = apply_filters( 'aioseop_home_page_title', $title );
     2739                }
     2740            } else {
     2741                $title = $this->internationalize( $aioseop_options['aiosp_home_title'] );
     2742                if ( !empty( $aioseop_options['aiosp_home_page_title_format'] ) )
     2743                    $title = $this->apply_page_title_format( $title, null, $aioseop_options['aiosp_home_page_title_format'] );         
     2744            }
    26732745            if (empty( $title ) )
    26742746                $title = $this->internationalize( get_option( 'blogname' ) ) . ' | ' . $this->internationalize( get_bloginfo( 'description' ) );
     
    26852757            if ( $post === null ) return false;
    26862758            if ( ( $this->is_static_front_page() ) && ( $home_title = $this->internationalize( $aioseop_options['aiosp_home_title'] ) ) ) {
     2759
     2760
    26872761                //home title filter
    26882762                return apply_filters( 'aioseop_home_page_title', $home_title );
     
    27232797            // we're not in the loop :(
    27242798            if ( $post === null ) return false;
    2725             $categories = get_the_category();
     2799            $categories = ();
    27262800            $category = '';
    2727             if ( count( $categories ) > 0 ) {
    2728                 $category = $categories[0]->cat_name;
    2729             }
     2801            if ( count( $categories ) > 0 )
     2802                $category = $categories[0];
    27302803            $title = $this->internationalize( get_post_meta( $post->ID, "_aioseop_title", true ) );
    27312804            if ( !$title ) {
     
    29343007    function get_all_categories( $id = 0 ) {
    29353008        $keywords = Array();
    2936         $categories = get_the_category( $id );
    2937         foreach ( $categories as $category )
    2938             $keywords[] = $this->internationalize( $category->cat_name );
     3009        $categories = get_the_category( $id );
     3010        if ( !empty( $categories ) )
     3011            foreach ( $categories as $category )
     3012                $keywords[] = $this->internationalize( $category->cat_name );
    29393013        return $keywords;
    29403014    }
     
    29433017        $keywords = Array();
    29443018        $tags = get_the_tags( $id );
    2945         if ( $tags && is_array( $tags) )
     3019        if ( && is_array( $tags) )
    29463020            foreach ( $tags as $tag )
    29473021                $keywords[] = $this->internationalize( $tag->name );
     
    29753049        $opts = $this->meta_opts;
    29763050        if ( !empty( $opts["aiosp_keywords"] ) ) {
    2977             $traverse = $this->keyword_string_to_list( $opts["aiosp_keywords"] );
     3051            $traverse = $this->keyword_string_to_list( $ );
    29783052            if ( !empty( $traverse ) )
    29793053                foreach ( $traverse as $keyword ) $keywords[] = $keyword;
  • all-in-one-seo-pack/trunk/aioseop_functions.php

    r1074299 r1119068  
    156156        ?><style>
    157157        .aioseop_edit_button {
    158         margin: 0 0 0 5px;
    159         opacity: 0.6;
    160         width: 12px;
     158            margin: 0 0 0 5px;
     159            opacity: 0.6;
     160            width: 12px;
     161        }
     162        .aioseop_edit_link {
     163            display: inline-block;
     164            position: absolute;
    161165        }
    162166        .aioseop_mpc_SEO_admin_options_edit img {
     
    168172            display: block;
    169173            opacity: 1;
     174
     175
     176
     177
     178
     179
     180
    170181        }
    171182        .aioseop_mpc_admin_meta_content {
     
    173184            width: 100%;
    174185            margin: 0 0 10px 0;
    175         }   
     186        }
     187        td.seotitle.column-seotitle,
     188        td.seodesc.column-seodesc,
     189        td.seokeywords.column-seokeywords {
     190            overflow: visible;
     191        }
    176192        </style>
    177193        <?php wp_print_scripts( Array( 'sack' ) );
     
    210226if ( !function_exists( 'aioseop_output_notice' ) ) {
    211227    function aioseop_output_notice( $message, $id = '', $class = "updated fade" ) {
     228
    212229        if ( !empty( $class ) ) $class = ' class="' . esc_attr( $class ) . '"';
    213230        if ( !empty( $id ) )    $class .= ' id="' . esc_attr( $id ) . '"';
    214231        $dismiss = ' ';
    215         echo "<div{$class}>" . wp_kses_post( $message ) . "</div>";
     232        echo "<div{$class}>" . wp_kses_post( $message ) . "</div>";
    216233        return true;
    217234    }
     
    231248            $qa['aioseop_ignore_notice'] = $msgid;
    232249            $url = '?' . build_query( $qa );
    233             $message .= '  <a class="alignright" href="' . $url . '">Dismiss</a>';         
     250            $message >';         
    234251        }
    235252        return aioseop_output_notice( $message, $id, $class );
    236253    }
    237254}
    238 
    239255if ( !function_exists( 'aioseop_ajax_save_meta' ) ) {
    240256    function aioseop_ajax_save_meta() {
     
    253269        }
    254270        if( $result != '' ):
    255             $label = "<label id='aioseop_label_{$target}_{$post_id}'>" . $result . '</label>'; 
     271            $label = "<label id='aioseop_label_{$target}_{$post_id}'>" . $result . '</label>'; 
    256272        else:
    257             $label = '';
    258             $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><strong><i>" . __( 'No', 'all_in_one_seo_pack' ) . ' ' . $target . '</i></strong>';
     273            $label = "<label id='aioseop_label_{$target}_{$post_id}'></label><span style='width: 20px;display: inline-block;'></span><strong><i>" . __( 'No', 'all_in_one_seo_pack' ) . ' ' . $target . '</i></strong>';
    259274        endif;
    260275        $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$post_id}" );
    261         $output = $label . '<a id="' . $target . 'editlink' . $post_id . '" href="javascript:void(0);"';
    262         $output .= 'onclick=\'aioseop_ajax_edit_meta_form(' . $post_id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">';
    263         $output .= '<img class="aioseop_edit_button" id="aioseop_edit_id" src="' . AIOSEOP_PLUGIN_IMAGES_URL . '/cog_edit.png" /></a>';
     276        $output =
     277       
     278        ;
    264279        die( "jQuery('div#aioseop_" . $target . "_" . $post_id . "').fadeOut('fast', function() { var my_label = " . json_encode( $output ) . ";
    265280              jQuery('div#aioseop_" . $target . "_" . $post_id . "').html(my_label).fadeIn('fast');
     
    516531                    <?php $content = strip_tags( stripslashes( get_post_meta( $id, "_aioseop_" . $target,   TRUE ) ) );
    517532                if( !empty($content) ):
    518                     $label = "<label id='aioseop_label_{$target}_{$id}'>" . $content . '</label>'; 
     533                    $label = "<label id='aioseop_label_{$target}_{$id}'>" . $content . '</label>'; 
    519534                else:
    520                     $label = "<label id='aioseop_label_{$target}_{$id}'></label><strong><i>No " . $target . '</i></strong>';
     535                    $label = "<label id='aioseop_label_{$target}_{$id}'></label><s " . $target . '</i></strong>';
    521536                endif;
    522537                    $nonce = wp_create_nonce( "aioseop_meta_{$target}_{$id}" );
    523                     print $label . '<a id="' . $target . 'editlink' . $id . '" href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
    524                     $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">';
    525                         print "<img class='aioseop_edit_button'
     538                    " href="javascript:void(0);" onclick=\'aioseop_ajax_edit_meta_form(' .
     539                    $id . ', "' . $target . '", "' . $nonce . '");return false;\' title="' . __('Edit') . '">'
     540                        "<img class='aioseop_edit_button'
    526541                                            id='aioseop_edit_id'
    527                                             src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a>";
     542                                            src='" . AIOSEOP_PLUGIN_IMAGES_URL . "cog_edit.png' /></a>;
    528543                     ?>
    529544                </div>
  • all-in-one-seo-pack/trunk/aioseop_module.css

    r1074299 r1119068  
    840840.aioseop_option_docs h3 {
    841841    background:none;
     842
     843
     844
     845
     846
     847
     848
     849
    842850}
    843851.aioseop_error_notice {
  • all-in-one-seo-pack/trunk/aioseop_module_class.php

    r1079109 r1119068  
    129129            static $charset = null;
    130130            if ( $charset == null ) $charset = get_bloginfo( 'charset' );
    131 
     131            $str = (string)$str;
    132132            if ( $mode == 'title' ) {
    133133                if ( function_exists( 'mb_convert_case' ) )
  • all-in-one-seo-pack/trunk/aioseop_opengraph.php

    r1079109 r1119068  
    7979                "setmeta"               => __( "Checking this box will use the Home Title and Home Description set in All in One SEO Pack, General Settings as the Open Graph title and description for your home page.", 'all_in_one_seo_pack' ),
    8080                "key"                   => __( "Your Profile Admin ID is your Facebook profile ID. You can find out your Facebook ID using the lookup tool here: https://graph.facebook.com/yourusername", 'all_in_one_seo_pack' ),
     81
     82
    8183                "sitename"              => __( "The Site Name is the name that is used to identify your website.", 'all_in_one_seo_pack' ),
    8284                "hometitle"             => __( "The Home Title is the Open Graph title for your home page.", 'all_in_one_seo_pack' ),
     
    145147                    'setmeta'       => Array(   'name'          => __( 'Use AIOSEO Title and Description',  'all_in_one_seo_pack'), 'type' => 'checkbox' ),
    146148                    'key'           => Array(   'name'          => __( 'Profile Admins ID',  'all_in_one_seo_pack'), 'default' => '', 'type' => 'text' ),
     149
     150
    147151                    'sitename'      => Array(   'name'          => __( 'Site Name',  'all_in_one_seo_pack' ), 'default' => get_bloginfo('name'), 'type' => 'text' ),
    148152                    'hometitle'     => Array(   'name'          => __( 'Home Title',  'all_in_one_seo_pack'),
     
    216220            $this->locations = array(
    217221                'opengraph' =>  Array( 'name' => $this->name, 'prefix' => 'aiosp_', 'type' => 'settings',
    218                                        'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag', 'generate_descriptions', 'defimg',
     222                                       'options' => Array('scan_header', 'setmeta', 'key', 'sitename', 'hometitle', 'description', 'homeimage', 'hometag', 'generate_descriptions', 'defimg',
    219223                                       'fallback', 'dimg', 'meta_key', 'categories', 'defcard', 'twitter_site', 'twitter_creator', 'twitter_domain', 'gen_tags', 'gen_keywords', 'gen_categories',
    220224                                       'gen_post_tags', 'types', 'facebook_publisher', 'facebook_author' ) ),
     
    463467                /* If Use AIOSEO Title and Desc Selected */
    464468                if( $setmeta ) {
    465                     $title = $aioseop_options['aiosp_home_title'];
     469                    $title = $aios;
    466470                    if ( $first_page )
    467                         $description = $aioseop_options['aiosp_home_description'];
     471                        $description = $aios;
    468472                }
    469473               
     
    472476                if( empty($sitename) ) $sitename = get_bloginfo('name');
    473477               
    474                 if ( empty( $description ) && $first_page && ( !empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) && !empty( $post ) && !empty( $post->post_content ) )
     478                if ( empty( $description ) && $first_page && ( !empty( $this->options['aiosp_opengraph_generate_descriptions'] ) ) && !empty( $post ) && !empty( $post->post_content ) )
    475479                    $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $post->post_content ) ), 1000 );
    476480               
     
    524528                /* Add some defaults */
    525529                if ( empty( $title ) ) $title = get_the_title();
    526                 if ( empty( $description ) && ( $this->options['aiosp_opengraph_generate_descriptions'] ) )
     530                if ( empty( $description ) && ( $this->options['aiosp_opengraph_generate_descriptions'] ) )
    527531                    $description = $post->post_content;
    528532                if ( empty( $type ) ) $type = 'article';
     
    550554                    $tag = $aiosp->clean_keyword_list( $tag );         
    551555            }
    552             if ( !empty( $description ) )
    553                 $description = $aiosp->trim_excerpt_without_filters( $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) ), 1000 );
    554            
     556           
     557            if ( !empty( $this->options['aiosp_opengraph_title_shortcodes'] ) ) {
     558                $title = do_shortcode( $title );
     559            }
     560           
     561            if ( !empty( $description ) ) {
     562                $description = $aiosp->internationalize( preg_replace( '/\s+/', ' ', $description ) );
     563                if ( !empty( $this->options['aiosp_opengraph_description_shortcodes'] ) ) {
     564                    $description = do_shortcode( $description );
     565                }
     566                $description = $aiosp->trim_excerpt_without_filters( $description, 1000 );             
     567            }
     568                       
    555569            $title = $this->apply_cf_fields( $title );
    556570            $description = $this->apply_cf_fields( $description );
  • all-in-one-seo-pack/trunk/all_in_one_seo_pack.php

    r1079109 r1119068  
    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.2.5.1
     6Version: 2.2.
    77Author: Michael Torbert
    88Author URI: http://michaeltorbert.com
     
    3131/**
    3232 * @package All-in-One-SEO-Pack
    33  * @version 2.2.5.1
     33 * @version 2.2.
    3434 */
     35
     36
    3537
    3638global $aioseop_plugin_name;
     
    4042
    4143if ( ! defined( 'AIOSEOP_VERSION' ) )
    42     define( 'AIOSEOP_VERSION', '2.2.5.1' );
     44    define( 'AIOSEOP_VERSION', '2.2.' );
    4345
    4446if ( ! defined( 'AIOSEOP_PLUGIN_DIR' ) ) {
  • all-in-one-seo-pack/trunk/quickedit_functions.js

    r948965 r1119068  
    33    var post_title = jQuery('#aioseop_label_' + meta + '_' + post_id).text();
    44    var element = uform.html(); var input;
    5     input = '<textarea id="aioseop_new_'+meta+'_' + post_id + '" style="font-size:10px;width:65%;float:left" rows=2 cols=16>'  + post_title + '</textarea>';
     5    input = '<textarea id="aioseop_new_'+meta+'_' + post_id + '" style="font-size:1>'  + post_title + '</textarea>';
    66    input += '<label style="float:left">';
    77    input += '<a class="aioseop_mpc_SEO_admin_options_edit" href="javascript:void(0);" id="aioseop_'+meta+'_save_' + post_id + '" >';
     
    1111    input += '</label>';
    1212    uform.html( input );
     13
    1314    jQuery('#aioseop_'+meta+'_cancel_' + post_id).click(function() {
    1415        uform.html( element );
     16
    1517    });
    1618    jQuery('#aioseop_'+meta+'_save_' + post_id).click(function() {
     
    4042        })
    4143        jQuery("div#aioseop_"+m+"_"+p).html(loading);
     44
     45
    4246    })
    4347};
  • all-in-one-seo-pack/trunk/readme.txt

    r1079109 r1119068  
    44Tags: all in one, all in one seo, all in one seo pack, seo, search engine optimization, google
    55Requires at least: 3.3
    6 Tested up to: 4.1
     6Tested up to: 4.1
    77Stable tag: trunk
    88
Note: See TracChangeset for help on using the changeset viewer.