Changeset 2563325
- Timestamp:
- 07/13/2021 08:38:03 AM (5 years ago)
- Location:
- wp-admin-menu-wizard/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-admin-menu-wizard.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-admin-menu-wizard/trunk/readme.txt
r2382879 r2563325 4 4 Donate link: none 5 5 Requires at least: 3.0 6 Tested up to: 5. 56 Tested up to: 5.7 7 7 Requires PHP: 5.6 8 8 Stable tag: trunk … … 58 58 === Changelog === 59 59 60 61 =1.0.5= 62 63 *Tested with wordpress 5.7.2 64 65 60 66 =1.0.4= 61 67 -
wp-admin-menu-wizard/trunk/wp-admin-menu-wizard.php
r2382879 r2563325 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. 46 * Version: 1.0.5 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 bar 139 **/ 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 136 154 /** 137 155 * Function to generate the module settings page and save maneu configuration. … … 155 173 <div class="wrap"> 156 174 <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> 157 181 <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> 158 182 <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> 159 <form action="" method="post"> 183 160 184 161 185 <?php foreach($GLOBALS['menu'] as $menu): 162 186 if($menu[2] != 'wp_admin_menu_wizard'){ ?> 163 187 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"';}?> /> 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"';}?> /> 165 189 <?php if($menu[0] ==""){ 166 190 echo $menu[2];
Note: See TracChangeset
for help on using the changeset viewer.