Issues (71)

hide-menu.php (3 issues)

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
The function remove_submenu_page was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
    $page = /** @scrutinizer ignore-call */ remove_submenu_page( 'options-general.php', 'ewww-image-optimizer/ewww-image-optimizer.php' );
Loading history...
The assignment to $page is dead and can be removed.
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 );
0 ignored issues
show
The function add_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
/** @scrutinizer ignore-call */ 
21
add_action( 'admin_menu', 'tiny_remove_menus', 999 );
Loading history...
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