Plugin Directory

Changeset 950336

Timestamp:
07/17/2014 02:50:14 PM (10 years ago)
Author:
pbaylies
Message:

Fix for noindex checks.

File:
1 edited

Legend:

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

    r949889 r950336  
    13461346
    13471347            $robots_meta = '';
    1348 
    1349             if ( !empty( $opts ) ) {
     1348            if ( ( is_category() && !empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( !is_category() && is_archive() && !is_tag() && !is_tax()
     1349                && ( ( is_date() && !empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) || ( is_author() && !empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ) )
     1350                || ( is_tag() && !empty( $aioseop_options['aiosp_tags_noindex'] ) ) || ( is_search() && !empty( $aioseop_options['aiosp_search_noindex'] ) ) )
     1351                $robots_meta = 'noindex,follow';
     1352            elseif ( !empty( $opts ) ) {
    13501353                $post_type = get_post_type();
    13511354                $aiosp_noindex = htmlspecialchars( stripslashes( $opts['aiosp_noindex'] ) );
     
    13681371                    $robots_meta = $noindex . ',' . $nofollow;
    13691372                }
    1370             } else {
    1371                 if ( ( is_category() && !empty( $aioseop_options['aiosp_category_noindex'] ) ) || ( !is_category() && is_archive() && !is_tag() && !is_tax()
    1372                     && ( ( is_date() && !empty( $aioseop_options['aiosp_archive_date_noindex'] ) ) || ( is_author() && !empty( $aioseop_options['aiosp_archive_author_noindex'] ) ) ) )
    1373                     || ( is_tag() && !empty( $aioseop_options['aiosp_tags_noindex'] ) ) || ( is_search() && !empty( $aioseop_options['aiosp_search_noindex'] ) ) )
    1374                     $robots_meta = 'noindex,follow';               
    13751373            }
    13761374           
Note: See TracChangeset for help on using the changeset viewer.