-
Home
-
Cryptocurrency Widgets – Price Ticker & Coins List
- Tips
How to Hide Cryptocurrency Widgets Admin Menus
function plt_hide_cryptocurrency_price_ticker_widget_menus() {
//Hide "Crypto Plugins".
remove_menu_page('cool-crypto-plugins');
//Hide "Crypto Plugins → Dashboard".
remove_submenu_page('cool-crypto-plugins', 'cool-crypto-plugins');
//Hide "Crypto Plugins → Crypto Widgets".
remove_submenu_page('cool-crypto-plugins', 'edit.php?post_type=ccpw');
//Hide "Crypto Plugins → ↳ All Widgets".
remove_submenu_page('cool-crypto-plugins', 'edit.php?post_type=ccpw');
//Hide "Crypto Plugins → ↳ Add New Widget".
remove_submenu_page('cool-crypto-plugins', 'post-new.php?post_type=ccpw');
//Hide "Crypto Plugins → ↳ Get Started".
remove_submenu_page('cool-crypto-plugins', 'admin.php?page=ccpw_get_started');
//Hide "Crypto Plugins → API Settings".
remove_submenu_page('cool-crypto-plugins', 'admin.php?page=openexchange-api-settings');
}
add_action('admin_menu', 'plt_hide_cryptocurrency_price_ticker_widget_menus', 101);
Where do I put this code?
How to Hide the "Crypto Widget Shortcode" Meta Box
function plt_hide_cryptocurrency_price_ticker_widget_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Crypto Widget Shortcode" meta box.
remove_meta_box('ccpw-shortcode', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_cryptocurrency_price_ticker_widget_metaboxes', 20);