Plugin Directory

Changeset 918372


Ignore:
Timestamp:
05/21/2014 03:03:59 AM (12 years ago)
Author:
bgentry
Message:

version 1.0 fixes a bug that was causing nofollow tags to appear on unexpected pages

Location:
brilliant-easy-exclude-posts
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • brilliant-easy-exclude-posts/trunk/brilliant_exclude.php

    r868276 r918372  
    33Plugin Name: Brilliant Easy Exclude Posts (BEEP)
    44Description: Hide posts from public view so users need the direct link (but not a password) to view the hidden posts. Activate this feature with a simple checkbox on the editor screen.
    5 Version: 0.9
     5Version: 1.0
    66Author: bGentry
    77Author URI: http://bryangentry.us
     
    1919register_setting( 'reading', 'BEEP-allow-search-engines' );
    2020
    21 add_settings_section( 'BEEPsettings', 'Brilliant Easy Exclude Posts settinsg', 'BEEPsettingsSection', 'reading' );
     21add_settings_section( 'BEEPsettings', 'Brilliant Easy Exclude Posts settings', 'BEEPsettingsSection', 'reading' );
    2222
    2323
     
    3636
    3737function BEEPsettings_search_engines() {
    38     echo '<input name="BEEP-allow-search-engines" id="BEEP-allow-search-engines" type="checkbox" value="1" class="code" ' . checked( 1, get_option( 'BEEP-allow-search-engines' ), false ) . ' /> By default, the hidden post will ask search engines to not index hidden pages. Check this box if you would like to allow search engines to index pages that you select to hide from news feeds and other places on your site.';
     38    echo '<input name="BEEP-allow-search-engines" id="BEEP-allow-search-engines" type="checkbox" value="1" class="code" ' . checked( 1, get_option( 'BEEP-allow-search-engines' ), false ) . ' /> By default, a hidden post will ask search engines to not index hidden pages. Check this box if you would like to allow search engines to index pages that you select to hide from news feeds and other places on your site.';
    3939}
    4040
     
    6363        global $post;
    6464        if ( isset ( $post) ) {
    65             if ( get_option( 'BEEP-double-exclude' ) == "1" ) {
    66                 $hidden = get_post_meta( $post->ID, 'bgExclude', true );
     65       
     66        $hidden = get_post_meta( $post->ID, 'bgExclude', true );
     67            if ( get_option( 'BEEP-double-exclude' ) == "1" ) {     
    6768                if ( $hidden == "1" ) {
    6869                    return $query;
    6970                }
     71            }
     72       
     73        if ( $hidden == "1" ) {
     74            if ( get_option( 'BEEP-allow-search-engines' ) !== "1" ) {
     75                        add_action('wp_head', 'beep_add_nofollow_link');
     76                }
    7077            }
    7178           
     
    7683            )));
    7784           
    78         } elseif ( get_option( 'BEEP-allow-search-engines' ) !== "1" ) {
    79             add_action('wp_head', 'beep_add_nofollow_link');
    80            
    81         }
     85        }
     86             
    8287}
    8388return $query;
  • brilliant-easy-exclude-posts/trunk/readme.txt

    r868276 r918372  
    55Requires at least: 3.0
    66Tested up to: 3.8.1
    7 Stable tag: 0.9
     7Stable tag: 1.0
    88License: GPL2
    99
     
    2626
    2727== Changelog ==
     28=1.0=
     29*Fixed issue that was causing "nofollow" tags to appear on unexpected pages
     30
    2831= 0.9 =
    2932*Plugin created
Note: See TracChangeset for help on using the changeset viewer.