Plugin Directory

Changeset 2564237


Ignore:
Timestamp:
07/14/2021 09:54:07 AM (5 years ago)
Author:
alfadevelopers
Message:

bug fix

Location:
wp-admin-menu-wizard/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-admin-menu-wizard/trunk/readme.txt

    r2563325 r2564237  
    5959
    6060
     61=1.0.6=
     62
     63*Bug fix for removing top bar
     64
     65
    6166=1.0.5=
    6267
  • wp-admin-menu-wizard/trunk/wp-admin-menu-wizard.php

    r2563325 r2564237  
    44* Plugin URI: https://wordpress.org/plugins/wp-admin-menu-wizard
    55* 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.5
     6* Version: 1.0.6
    77* Requires at least: 3.0
    88* Requires PHP: 5.6
     
    134134add_action( 'admin_menu', 'ad_add_admin_menu' );
    135135
    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 
    154136/**
    155137 * Function to generate the module settings page and save maneu configuration.
     
    173155    <div class="wrap">
    174156        <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"'; } ?> /> &nbsp;
    180         <span> Hide menu bar </span><br>
    181157        <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>
    182158        <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">
    184160
    185161        <?php foreach($GLOBALS['menu'] as $menu):
    186162        if($menu[2] != 'wp_admin_menu_wizard'){ ?>
    187163
    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"';}?> />&nbsp;
     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"';}?> />&nbsp;
    189165        <?php if($menu[0] ==""){
    190166                echo $menu[2];
Note: See TracChangeset for help on using the changeset viewer.