WordPress.org

Plugin Directory


Ignore:
Timestamp:
10/01/12 19:49:45 (5 years ago)
Author:
husobj
Message:

Add setting to allow feeds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • password-protected/trunk/admin/admin.php

    r606687 r606690  
    4646        register_setting( $this->options_group, 'password_protected_status', 'intval' ); 
    4747        register_setting( $this->options_group, 'password_protected_password', array( $this, 'sanitize_password_protected_password' ) ); 
     48        register_setting( $this->options_group, 'password_protected_feeds', 'intval' ); 
    4849    } 
    4950     
     
    8384    function password_protected_status_field() { 
    8485        echo '<input name="password_protected_status" id="password_protected_status" type="checkbox" value="1" ' . checked( 1, get_option( 'password_protected_status' ), false ) . ' /> ' . __( 'Enabled', 'password_protected' ); 
     86        echo '<input name="password_protected_feeds" id="password_protected_feeds" type="checkbox" value="1" ' . checked( 1, get_option( 'password_protected_feeds' ), false ) . ' style="margin-left: 20px;" /> ' . __( 'Allow Feeds', 'password_protected' ); 
    8587    } 
    8688     
     
    9193        echo '<input type="password" name="password_protected_password[new]" id="password_protected_password_new" size="16" value="" autocomplete="off"> <span class="description">' . __( 'If you would like to change the password type a new one. Otherwise leave this blank.', 'password_protected' ) . '</span><br> 
    9294            <input type="password" name="password_protected_password[confirm]" id="password_protected_password_confirm" size="16" value="" autocomplete="off"> <span class="description">' . __( 'Type your new password again.', 'password_protected' ) . '</span>'; 
     95    } 
     96     
     97    /** 
     98     * Allow Feeds Field 
     99     */ 
     100    function password_protected_feeds_field() { 
     101        echo '<input name="password_protected_feeds" id="password_protected_feeds" type="checkbox" value="1" ' . checked( 1, get_option( 'password_protected_feeds' ), false ) . ' /> ' . __( 'Allow Feeds', 'password_protected' ); 
    93102    } 
    94103     
Note: See TracChangeset for help on using the changeset viewer.