-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhide-menu.php
27 lines (24 loc) · 955 Bytes
/
hide-menu.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
* Plugin Name: Hide Menu
* Plugin URI: http://pothi.info
* Author: Pothi Kalimuthu
* Author URI: http://pothi.info
* Description: Hides unneccessary menu item/s
* Version: 1.0
* License: Apache 2.0
*/
function tiny_remove_menus() {
// Hide Ewww image optimizer settings that are found in four places
$page = remove_submenu_page( 'options-general.php', 'ewww-image-optimizer/ewww-image-optimizer.php' );
$page = remove_submenu_page( 'tools.php', 'ewww-image-optimizer-aux-images' );
$page = remove_submenu_page( 'themes.php', 'ewww-image-optimizer-theme-images' );
$page = remove_submenu_page( 'upload.php', 'ewww-image-optimizer-bulk' );
}
add_action( 'admin_menu', 'tiny_remove_menus', 999 );
function tiny_remove_admin_bar_nodes() {
// Hide WP Logo from the admin bar
global $wp_admin_bar;
$wp_admin_bar->remove_node( 'wp-logo' );
}
add_action( 'admin_bar_menu', 'tiny_remove_admin_bar_nodes', 999 );