' . "\n"; $col ++; } ?> '; echo ''; echo ''; echo ''; echo ''; echo '' . "\n"; } ?> 'Profile', 1 => 'edit_users', 2 => 'profile.php', 3 => '', 4 => 'menu-top', 5 => 'menu-users', 6 => 'div', ); foreach ( $wp_menu as $key => $item ) { $menu_slug = $item[ 2 ]; // non checked items if ( $menu_slug === 'options-general.php' ) { $disabled_item_adm_hint = ' ! '; } else { $disabled_item_adm = ''; $disabled_item_adm_hint = ''; } if ( '' !== $menu_slug ) { if ( 'wp-menu-separator' === $item[ 4 ] ) { $item[ 0 ] = 'Separator'; } foreach ( $user_roles as $role ) { // checkbox checked $checked_user_role_[ $role ] = ''; if ( isset( $disabled_menu_[ $role ] ) && in_array( $menu_slug, $disabled_menu_[ $role ], FALSE ) ) { $checked_user_role_[ $role ] = ' checked="checked"'; } } if ( ! $item[ 0 ] ) { $item[ 0 ] = '' . esc_attr__( 'No Title!', 'adminimize' ) . ''; } echo '' . "\n"; echo "\t"; echo ''; foreach ( $user_roles as $role ) { if ( $role !== 'administrator' ) { // only admin disable items $disabled_item_adm = ''; $disabled_item_adm_hint = ''; } /** * Switch to key of each Menu item * * @since 2016-01-29 * Use $key instead of htmlentities( $item[ 2 ] ) in the input field below, attribute value */ echo "\t" . '' . "\n"; } echo ''; // Only for user smaller administrator, change user-Profile-File. if ( 'users.php' === $menu_slug ) { $x ++; echo '' . "\n"; echo "\t" . ''; foreach ( $user_roles as $role ) { echo "\t" . '' . "\n"; } echo ''; } $x ++; if ( ! isset( $wp_submenu[ $menu_slug ] ) ) { continue; } // Loop about Sub Menu items. foreach ( $wp_submenu[ $menu_slug ] as $subkey => $subitem ) { $submenu_slug = $subitem[ 2 ]; // Special solutions for the Adminimize link, that it not works on settings site. if ( strtolower( $submenu_slug ) === 'adminimize/adminimize.php' ) { //$disabled_subitem_adm = ' disabled="disabled"'; $disabled_subitem_adm_hint = ' ! '; } else { $disabled_subitem_adm = ''; $disabled_subitem_adm_hint = ''; } echo '' . "\n"; foreach ( $user_roles as $role ) { // checkbox checked $checked_user_role_[ $role ] = ''; if ( isset( $disabled_submenu_[ $role ] ) // @since 2015-11-11 // Switch to custom key and url-slug of menu item. && _mw_adminimize_in_arrays( array( $menu_slug . '__' . $subkey, $submenu_slug ), $disabled_submenu_[ $role ] ) ) { $checked_user_role_[ $role ] = ' checked="checked"'; } } echo '' . "\n"; foreach ( $user_roles as $role ) { if ( $role !== 'administrator' ) { // only admin disable items $disabled_subitem_adm = ''; $disabled_subitem_adm_hint = ''; } echo '' . "\n"; } echo '' . "\n"; $x ++; } $i ++; $x ++; } } } else { $myErrors = new _mw_adminimize_message_class(); $myErrors = ''; echo $myErrors; } ?>
' . $role_name; ?>
'; echo '• ' . $item[ 0 ] . ' ' . esc_attr__( 'Group', 'adminimize' ) . ''; echo '(' . preg_replace( '#[%2].*#', '...', htmlentities( $menu_slug ) ) . ')'; echo '' . $disabled_item_adm_hint . '' . $disabled_item_adm_hint . '
' . esc_attr__( 'Profile' ) . ' (profile.php)
— ' . $subitem[ 0 ] . ' (Slug: ' . preg_replace( '#[%2].*#', '...', htmlentities( $submenu_slug ) ) . ')[__' . $subkey . '] ' . $disabled_subitem_adm_hint . '' . $disabled_subitem_adm_hint . '
' . $myErrors->get_error( '_mw_adminimize_get_option' ) . '