| 1 | <?php |
||
| 2 | |||
| 3 | /* |
||
| 4 | * Plugin Name: Hide Menu |
||
| 5 | * Plugin URI: http://pothi.info |
||
| 6 | * Author: Pothi Kalimuthu |
||
| 7 | * Author URI: http://pothi.info |
||
| 8 | * Description: Hides unneccessary menu item/s |
||
| 9 | * Version: 1.0 |
||
| 10 | * License: Apache 2.0 |
||
| 11 | */ |
||
| 12 | |||
| 13 | function tiny_remove_menus() { |
||
| 14 | // Hide Ewww image optimizer settings that are found in four places |
||
| 15 | $page = remove_submenu_page( 'options-general.php', 'ewww-image-optimizer/ewww-image-optimizer.php' ); |
||
|
0 ignored issues
–
show
Unused Code
introduced
by
Loading history...
|
|||
| 16 | $page = remove_submenu_page( 'tools.php', 'ewww-image-optimizer-aux-images' ); |
||
| 17 | $page = remove_submenu_page( 'themes.php', 'ewww-image-optimizer-theme-images' ); |
||
| 18 | $page = remove_submenu_page( 'upload.php', 'ewww-image-optimizer-bulk' ); |
||
| 19 | } |
||
| 20 | add_action( 'admin_menu', 'tiny_remove_menus', 999 ); |
||
| 21 | |||
| 22 | function tiny_remove_admin_bar_nodes() { |
||
| 23 | // Hide WP Logo from the admin bar |
||
| 24 | global $wp_admin_bar; |
||
| 25 | $wp_admin_bar->remove_node( 'wp-logo' ); |
||
| 26 | } |
||
| 27 | add_action( 'admin_bar_menu', 'tiny_remove_admin_bar_nodes', 999 ); |
||
| 28 |