WordPress.org

Plugin Directory

Changeset 606695


Ignore:
Timestamp:
10/01/12 19:52:40 (19 months ago)
Author:
husobj
Message:

Disable 'Allow Feeds' checkbox when appropriate.

Location:
password-protected/trunk
Files:
2 added
2 edited

Legend:

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

    r606690 r606695  
    1313        add_action( 'admin_notices', array( $this, 'password_protected_admin_notices' ) ); 
    1414        add_filter( 'pre_update_option_password_protected_password', array( $this, 'pre_update_option_password_protected_password' ), 10, 2 ); 
     15        add_filter( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); 
    1516         
    1617        // Pre WordPress 3.5 settings group compatibility 
    1718        if ( version_compare( $wp_version, '3.5.dev', '<' ) ) { 
    1819            $this->options_group = 'privacy'; 
     20        } 
     21    } 
     22     
     23    /** 
     24     * Admin Enqueue Scripts 
     25     */ 
     26    function admin_enqueue_scripts() { 
     27        global $current_screen; 
     28        if ( 'options-' . $this->options_group == $current_screen->id ) { 
     29            wp_enqueue_script( 'password_protected_settings', PASSWORD_PROTECTED_URL . '/admin/js/settings.js', array( 'jquery' ) ); 
    1930        } 
    2031    } 
  • password-protected/trunk/password-protected.php

    r606691 r606695  
    2828*/ 
    2929 
    30 // Setup Password Protected 
     30define( 'PASSWORD_PROTECTED_SUBDIR', '/' . str_replace( basename( __FILE__ ), '', plugin_basename( __FILE__ ) ) ); 
     31define( 'PASSWORD_PROTECTED_URL', plugins_url( PASSWORD_PROTECTED_SUBDIR ) ); 
     32define( 'PASSWORD_PROTECTED_DIR', plugin_dir_path( __FILE__ ) ); 
     33 
    3134global $Password_Protected; 
    3235$Password_Protected = new Password_Protected(); 
Note: See TracChangeset for help on using the changeset viewer.