Plugin Directory

Changeset 494274


Ignore:
Timestamp:
01/23/2012 10:39:46 PM (14 years ago)
Author:
Bueltge
Message:

Update trunk for fix menu-items with entities

Location:
adminimize/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • adminimize/trunk/adminimize.php

    r478177 r494274  
    1313 * Author:      Frank Bültge
    1414 * Author URI:  http://bueltge.de/
    15  * Version:     1.7.24
     15 * Version:     1.7.25
    1616 * License:     GPLv3
    1717 */
     
    417417
    418418    add_action( 'in_admin_footer', '_mw_adminimize_admin_footer' );
    419 
     419   
    420420    $adminimizeoptions['mw_adminimize_default_menu'] = $menu;
    421421    $adminimizeoptions['mw_adminimize_default_submenu'] = $submenu;
     
    14351435    $args = array( 'public' => TRUE, '_builtin' => FALSE );
    14361436    $post_types = get_post_types( $args );
    1437            
     1437   
    14381438    if ( isset( $_POST['_mw_adminimize_user_info'] ) ) {
    14391439        $adminimizeoptions['_mw_adminimize_user_info'] = strip_tags(stripslashes( $_POST['_mw_adminimize_user_info'] ) );
     
    15331533            $adminimizeoptions['mw_adminimize_disabled_menu_' . $role . '_items'] = array();
    15341534        }
    1535 
     1535       
    15361536        if ( isset( $_POST['mw_adminimize_disabled_submenu_' . $role . '_items'] ) ) {
    15371537            $adminimizeoptions['mw_adminimize_disabled_submenu_' . $role . '_items']  = $_POST['mw_adminimize_disabled_submenu_' . $role . '_items'];
  • adminimize/trunk/inc-options/menu_options.php

    r397109 r494274  
    3434                            $wp_submenu = _mw_adminimize_get_option_value('mw_adminimize_default_submenu');
    3535                           
    36                             if ( empty($wp_menu) ) {
     36                            if ( ! isset($wp_menu) || empty($wp_menu) ) {
    3737                                global $menu;
    3838                               
    3939                                $wp_menu = $menu;
    4040                            }
    41                             if ( !isset($wp_submenu) ) {
     41                            if ( ! isset($wp_submenu) || empty($wp_submenu) ) {
    4242                                global $submenu;
    4343                               
     
    8282   
    8383                                        echo '<tr class="form-invalid">' . "\n";
    84                                         echo "\t" . '<th>' . $item[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $item[2] . ')</span> </th>';
     84                                        echo "\t" . '<th>' . $item[0] . ' <span style="color:#ccc; font-weight: 400;">(' . htmlentities( $item[2] ) . ')</span> </th>';
    8585                                        foreach ($user_roles as $role) {
    8686                                            if ( $role != 'administrator' ) { // only admin disable items
     
    8888                                                $disabled_item_adm_hint = '';
    8989                                            }
    90                                             echo "\t" . '<td class="num">' . $disabled_item_adm_hint . '<input id="check_menu'. $role . $x .'" type="checkbox"' . $disabled_item_adm . $checked_user_role_[$role] . ' name="mw_adminimize_disabled_menu_'. $role .'_items[]" value="' . $item[2] . '" />' . $disabled_item_adm_hint . '</td>' . "\n";
     90                                            echo "\t" . '<td class="num">' . $disabled_item_adm_hint . '<input id="check_menu'. $role . $x .'" type="checkbox"' . $disabled_item_adm . $checked_user_role_[$role] . ' name="mw_adminimize_disabled_menu_'. $role .'_items[]" value="' . htmlentities( $item[2] ) . '" />' . $disabled_item_adm_hint . '</td>' . "\n";
    9191                                        }
    9292                                        echo '</tr>';
     
    105105                                        $x++;
    106106
    107                                         if ( !isset($wp_submenu[$item[2]]) )
     107                                        if ( ! isset($wp_submenu[$item[2]]) )
    108108                                            continue;
    109109
     
    124124                                                    $checked_user_role_[$role]  = ( in_array($subitem[2], $disabled_submenu_[$role] ) ) ? ' checked="checked"' : '';
    125125                                            }
    126                                             echo '<td> &mdash; ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $subitem[2] . ')</span> </td>' . "\n";
     126                                            echo '<td> &mdash; ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . htmlentities( $subitem[2] ) . ')</span> </td>' . "\n";
    127127                                            foreach ($user_roles as $role) {
    128128                                                if ( $role != 'administrator' ) { // only admin disable items
     
    130130                                                    $disabled_subitem_adm_hint = '';
    131131                                                }
    132                                                 echo '<td class="num">' . $disabled_subitem_adm_hint . '<input id="check_menu'. $role.$x .'" type="checkbox"' . $disabled_subitem_adm . $checked_user_role_[$role] . ' name="mw_adminimize_disabled_submenu_'. $role .'_items[]" value="' . $subitem[2] . '" />' . $disabled_subitem_adm_hint . '</td>' . "\n";
     132                                                echo '<td class="num">' . $disabled_subitem_adm_hint . '<input id="check_menu'. $role.$x .'" type="checkbox"' . $disabled_subitem_adm . $checked_user_role_[$role] . ' name="mw_adminimize_disabled_submenu_'. $role .'_items[]" value="' . htmlentities( $subitem[2] ) . '" />' . $disabled_subitem_adm_hint . '</td>' . "\n";
    133133                                            }
    134134                                            echo '</tr>' . "\n";
Note: See TracChangeset for help on using the changeset viewer.