Plugin Directory

Changeset 2563325


Ignore:
Timestamp:
07/13/2021 08:38:03 AM (5 years ago)
Author:
alfadevelopers
Message:

Plugin tested with wordpress version 5.7.2

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

Legend:

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

    r2382879 r2563325  
    44Donate link: none
    55Requires at least: 3.0
    6 Tested up to: 5.5
     6Tested up to: 5.7
    77Requires PHP: 5.6
    88Stable tag: trunk
     
    5858=== Changelog ===
    5959
     60
     61=1.0.5=
     62
     63*Tested with wordpress 5.7.2
     64
     65
    6066=1.0.4=
    6167
  • wp-admin-menu-wizard/trunk/wp-admin-menu-wizard.php

    r2382879 r2563325  
    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.4
     6* Version: 1.0.5
    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
     141function 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
     151add_action('after_setup_theme', 'afdv_remove_admin_bar');
     152
     153
    136154/**
    137155 * Function to generate the module settings page and save maneu configuration.
     
    155173    <div class="wrap">
    156174        <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>
    157181        <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>
    158182        <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
    160184
    161185        <?php foreach($GLOBALS['menu'] as $menu):
    162186        if($menu[2] != 'wp_admin_menu_wizard'){ ?>
    163187
    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;
     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;
    165189        <?php if($menu[0] ==""){
    166190                echo $menu[2];
Note: See TracChangeset for help on using the changeset viewer.