| Server IP : 152.53.162.115 / Your IP : 216.73.217.85 Web Server : Apache/2 System : Linux host 6.12.0-55.40.1.el10_0.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Oct 21 05:54:51 EDT 2025 x86_64 User : pbshosting ( 1005) PHP Version : 8.3.30 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/pbshosting/domains/drkprakash.com/private_html/wp-content/plugins/hide-admin-menu/ |
Upload File : |
<?php
/*
Plugin Name: Hide admin menu
Plugin URI:
Description: User can hide the admin menu of side bar and top bar that he want accoding user role.
Author: Bhavin Thummar & Maulik Patel (BM Studio)
Version: 1.1.2
Author URI: https://www.linkedin.com/in/bhavin-thummar
*/
//for table create when plgin activate
function bhm_create_db_process(){
global $wpdb;
$table_name= $wpdb->prefix ."options";
$wpdb->insert(
$table_name, //table
array('option_name' => 'hide_menu_bh_plugin'));
$wpdb->insert(
$table_name, //table
array('option_name' => 'hide_sub_menu_bh_plugin'));
$wpdb->insert(
$table_name, //table
array('option_name' => 'hide_top_menu_bh_plugin'));
$wpdb->insert(
$table_name, //table
array('option_name' => 'menu_order_bh_plugin'));
}
function __construct(){
register_activation_hook(__FILE__,'bhm_create_db_process');
}
function bhm_Hide_Menus()
{
add_menu_page("Hide Menu","Hide Menu","manage_options","hide-admin-menu","bhm_get_menu_list");
}
add_action("admin_menu","bhm_Hide_Menus");
require_once(plugin_dir_path(__FILE__).'menu-list.php');