Changeset 2564237
- Timestamp:
- 07/14/2021 09:54:07 AM (5 years ago)
- Location:
- wp-admin-menu-wizard/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
wp-admin-menu-wizard.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-admin-menu-wizard/trunk/readme.txt
r2563325 r2564237 59 59 60 60 61 =1.0.6= 62 63 *Bug fix for removing top bar 64 65 61 66 =1.0.5= 62 67 -
wp-admin-menu-wizard/trunk/wp-admin-menu-wizard.php
r2563325 r2564237 4 4 * Plugin URI: https://wordpress.org/plugins/wp-admin-menu-wizard 5 5 * Description: With this plugin you can hide the admin menu items you do not use by a flick of a toggle button. 6 * Version: 1.0. 56 * Version: 1.0.6 7 7 * Requires at least: 3.0 8 8 * Requires PHP: 5.6 … … 134 134 add_action( 'admin_menu', 'ad_add_admin_menu' ); 135 135 136 137 /**138 * Function to hide top menu bar139 **/140 141 function afdv_remove_admin_bar() {142 $hideMenuBar = get_option('afdv-hide-topbar');143 if ( $hideMenuBar == 1 ) {144 145 add_filter(‘show_admin_bar’, ‘__return_false’);146 }else{147 add_filter(‘show_admin_bar’, true);148 }149 }150 151 add_action('after_setup_theme', 'afdv_remove_admin_bar');152 153 154 136 /** 155 137 * Function to generate the module settings page and save maneu configuration. … … 173 155 <div class="wrap"> 174 156 <h1><?= esc_html(get_admin_page_title()); ?></h1> 175 176 <form action="" method="post">177 178 <p><strong><?php _e('Hide top menu bar on front end', 'wp-admin-menu-wizard'); ?></strong></p>179 <input type="checkbox" name="afdv-hide-topbar" value="1" <?php if(isset($option['afdv-hide-topbar']) && $option['afdv-hide-topbar'] ==1){ echo 'checked="checked"'; } ?> /> 180 <span> Hide menu bar </span><br>181 157 <p><strong><?php _e('Check the menu items you want out of your way and save. When the "menu wizard" toggle is on, all the checked items will be out of your way.', 'wp-admin-menu-wizard'); ?></strong></p> 182 158 <p><?php _e('For better visualisation of your admin menu, when you are in this settings page, all the menu items are visible on the admin menu, even if the toggle is on. Once you leave this page, the toogle works again.', 'wp-admin-menu-wizard'); ?></p> 183 159 <form action="" method="post"> 184 160 185 161 <?php foreach($GLOBALS['menu'] as $menu): 186 162 if($menu[2] != 'wp_admin_menu_wizard'){ ?> 187 163 188 <input type="checkbox" name="<?php echo str_replace('.', 'tgtadtgt',$menu[2]); ?>" id="<?php echo $menu[2]; ?>" value="1" <?php if(isset($option[str_replace('.', 'tgtadtgt',$menu[2])]) && $option[ str_replace( '.', 'tgtadtgt',$menu[2])] ==1){echo 'checked="checked"';}?> /> 164 <input type="checkbox" name="<?php echo str_replace('.', 'tgtadtgt',$menu[2]); ?>" id="<?php echo $menu[2]; ?>" value="1"<?php if(isset($option[str_replace('.', 'tgtadtgt',$menu[2])]) && $option[str_replace('.', 'tgtadtgt',$menu[2])] ==1){echo 'checked="checked"';}?> /> 189 165 <?php if($menu[0] ==""){ 190 166 echo $menu[2];
Note: See TracChangeset
for help on using the changeset viewer.