Changeset 1435

Show
Ignore:
Timestamp:
08/25/08 11:21:21 (3 months ago)
Author:
donncha
Message:

Added mu_menu_items filter. props momo360modena, fixes #723

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.6/wp-admin/wpmu-options.php

    r1403 r1435  
    183183                        <?php 
    184184                        $menu_perms = get_site_option( "menu_items" ); 
    185                         $menu_items = array('plugins'); 
     185                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' => __('Plugins')) );                      
    186186                        foreach ( (array) $menu_items as $key => $val ) { 
    187                                 $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; 
    188                                 echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>";  
     187                                echo "<tr><th scope='row'>" . wp_specialchars($val) . "</th><td><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . (( $menu_perms[$key] == '1' ) ? ' checked="checked"' : '') . " /></td></tr>";  
    189188                        } 
    190189                        ?> 
  • trunk/wp-admin/wpmu-options.php

    r1403 r1435  
    183183                        <?php 
    184184                        $menu_perms = get_site_option( "menu_items" ); 
    185                         $menu_items = array('plugins'); 
     185                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' => __('Plugins')) );                      
    186186                        foreach ( (array) $menu_items as $key => $val ) { 
    187                                 $checked = ( $menu_perms[$val] == '1' ) ? ' checked="checked"' : ''; 
    188                                 echo "<tr><th scope='row'>" . ucfirst( $val ) . "</th><td><input type='checkbox' name='menu_items[" . $val . "]' value='1'" . $checked . " /></td></tr>";  
     187                                echo "<tr><th scope='row'>" . wp_specialchars($val) . "</th><td><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . (( $menu_perms[$key] == '1' ) ? ' checked="checked"' : '') . " /></td></tr>";  
    189188                        } 
    190189                        ?>