Changeset 494274
- Timestamp:
- 01/23/2012 10:39:46 PM (14 years ago)
- Location:
- adminimize/trunk
- Files:
-
- 2 edited
-
adminimize.php (modified) (4 diffs)
-
inc-options/menu_options.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adminimize/trunk/adminimize.php
r478177 r494274 13 13 * Author: Frank Bültge 14 14 * Author URI: http://bueltge.de/ 15 * Version: 1.7.2 415 * Version: 1.7.25 16 16 * License: GPLv3 17 17 */ … … 417 417 418 418 add_action( 'in_admin_footer', '_mw_adminimize_admin_footer' ); 419 419 420 420 $adminimizeoptions['mw_adminimize_default_menu'] = $menu; 421 421 $adminimizeoptions['mw_adminimize_default_submenu'] = $submenu; … … 1435 1435 $args = array( 'public' => TRUE, '_builtin' => FALSE ); 1436 1436 $post_types = get_post_types( $args ); 1437 1437 1438 1438 if ( isset( $_POST['_mw_adminimize_user_info'] ) ) { 1439 1439 $adminimizeoptions['_mw_adminimize_user_info'] = strip_tags(stripslashes( $_POST['_mw_adminimize_user_info'] ) ); … … 1533 1533 $adminimizeoptions['mw_adminimize_disabled_menu_' . $role . '_items'] = array(); 1534 1534 } 1535 1535 1536 1536 if ( isset( $_POST['mw_adminimize_disabled_submenu_' . $role . '_items'] ) ) { 1537 1537 $adminimizeoptions['mw_adminimize_disabled_submenu_' . $role . '_items'] = $_POST['mw_adminimize_disabled_submenu_' . $role . '_items']; -
adminimize/trunk/inc-options/menu_options.php
r397109 r494274 34 34 $wp_submenu = _mw_adminimize_get_option_value('mw_adminimize_default_submenu'); 35 35 36 if ( empty($wp_menu) ) {36 if ( ! isset($wp_menu) || empty($wp_menu) ) { 37 37 global $menu; 38 38 39 39 $wp_menu = $menu; 40 40 } 41 if ( ! isset($wp_submenu) ) {41 if ( ! isset($wp_submenu) || empty($wp_submenu) ) { 42 42 global $submenu; 43 43 … … 82 82 83 83 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>'; 85 85 foreach ($user_roles as $role) { 86 86 if ( $role != 'administrator' ) { // only admin disable items … … 88 88 $disabled_item_adm_hint = ''; 89 89 } 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"; 91 91 } 92 92 echo '</tr>'; … … 105 105 $x++; 106 106 107 if ( ! isset($wp_submenu[$item[2]]) )107 if ( ! isset($wp_submenu[$item[2]]) ) 108 108 continue; 109 109 … … 124 124 $checked_user_role_[$role] = ( in_array($subitem[2], $disabled_submenu_[$role] ) ) ? ' checked="checked"' : ''; 125 125 } 126 echo '<td> — ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . $subitem[2]. ')</span> </td>' . "\n";126 echo '<td> — ' . $subitem[0] . ' <span style="color:#ccc; font-weight: 400;">(' . htmlentities( $subitem[2] ) . ')</span> </td>' . "\n"; 127 127 foreach ($user_roles as $role) { 128 128 if ( $role != 'administrator' ) { // only admin disable items … … 130 130 $disabled_subitem_adm_hint = ''; 131 131 } 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"; 133 133 } 134 134 echo '</tr>' . "\n";
Note: See TracChangeset
for help on using the changeset viewer.