-
Home
-
Pronamic Pay
- Tips
How to Hide Pronamic Pay Admin Menus
function plt_hide_pronamic_ideal_menus() {
//Hide "Tools → Scheduled Actions".
remove_submenu_page('tools.php', 'action-scheduler');
//Hide "Pay".
remove_menu_page('pronamic_ideal');
//Hide "Pay → Dashboard".
remove_submenu_page('pronamic_ideal', 'pronamic_ideal');
//Hide "Pay → Payments".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_payment');
//Hide "Pay → Subscriptions".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_pay_subscr');
//Hide "Pay → Forms".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_pay_form');
//Hide "Pay → Configurations".
remove_submenu_page('pronamic_ideal', 'edit.php?post_type=pronamic_gateway');
//Hide "Pay → Settings".
remove_submenu_page('pronamic_ideal', 'pronamic_pay_settings');
//Hide "Pay → Reports".
remove_submenu_page('pronamic_ideal', 'pronamic_pay_reports');
}
add_action('admin_menu', 'plt_hide_pronamic_ideal_menus', 101);
Where do I put this code?
How to Hide the "Pronamic Pay Status" Dashboard Widget
function plt_hide_pronamic_ideal_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Pronamic Pay Status" widget.
remove_meta_box('pronamic_pay_dashboard_status', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_pronamic_ideal_dashboard_widgets', 20);