WordPress.org

Plugin Directory

Changeset 614644


Ignore:
Timestamp:
10/19/12 17:58:01 (18 months ago)
Author:
scribu
Message:

apply privacy caps filter only once and replace - with _

File:
1 edited

Legend:

Unmodified
Added
Removed
  • network-privacy/trunk/ra-network-privacy.php

    r614643 r614644  
    5454 
    5555    private function init_meta() { 
    56         $this->meta = array( 
    57             -1 => apply_filters( 'ra-network-privacy-caps', array( 
     56        $options = array( 
     57            -1 => array( 
    5858                'login_message' => __( ' can be viewed by registered users of this network only.', 'network-privacy' ), 
    5959                'settings_label' => __( 'Registered network users', 'network-privacy' ), 
    6060                'network_label' => __( 'Must be registered users', 'network-privacy' ), 
    6161                'sites_label' => __( 'Users only (%d)', 'network-privacy' ) 
    62             ), -1 ), 
    63             -2 => apply_filters( 'ra-network-privacy-caps', array( 
     62            ), 
     63            -2 => array( 
    6464                'login_message' => __( ' can be viewed by registered users of this site only.', 'network-privacy' ), 
    6565                'settings_label' => __( 'Site subscribers', 'network-privacy' ), 
     
    6767                'network_label' => __( 'Must be site subscribers', 'network-privacy' ), 
    6868                'cap' => 'read' 
    69             ), -2 ), 
    70             -3 => apply_filters( 'ra-network-privacy-caps', array( 
     69            ), 
     70            -3 => array( 
    7171                'login_message' => __( ' can be viewed by site administrators only.', 'network-privacy' ), 
    7272                'settings_label' => __( 'Site administrators', 'network-privacy' ), 
     
    7474                'network_label' => __( 'Must be site administrators', 'network-privacy' ), 
    7575                'cap' => 'promote_users' 
    76             ), -3 ), 
    77             -4 => apply_filters( 'ra-network-privacy-caps', array( 
     76            ), 
     77            -4 => array( 
    7878                'login_message' => __( ' can be viewed only by contributors and above. Subscribers and logged-out users are not able to view this site.', 'network-privacy' ), 
    7979                'settings_label' => __( 'Site contributors', 'network-privacy' ), 
     
    8181                'network_label' => __( 'Must be contributors or above', 'network-privacy' ), 
    8282                'cap' => 'edit_posts' 
    83             ), -4 ), 
     83            ), 
    8484        ); 
     85 
     86        $this->meta = apply_filters( 'ra_network_privacy_caps', $options ); 
    8587    } 
    8688 
Note: See TracChangeset for help on using the changeset viewer.