-
Home
-
Leaky Paywall
- Tips
How to Hide Leaky Paywall Admin Menus
function plt_hide_leaky_paywall_menus() {
//Hide "Leaky Paywall".
remove_menu_page('issuem-leaky-paywall');
//Hide "Leaky Paywall → Settings".
remove_submenu_page('issuem-leaky-paywall', 'issuem-leaky-paywall');
//Hide "Leaky Paywall → Subscribers".
remove_submenu_page('issuem-leaky-paywall', 'leaky-paywall-subscribers');
//Hide "Leaky Paywall → Transactions".
remove_submenu_page('issuem-leaky-paywall', 'edit.php?post_type=lp_transaction');
//Hide "Leaky Paywall → Insights".
remove_submenu_page('issuem-leaky-paywall', 'leaky-paywall-insights');
//Hide "Leaky Paywall → Upgrade".
remove_submenu_page('issuem-leaky-paywall', 'leaky-paywall-upgrade');
}
add_action('admin_menu', 'plt_hide_leaky_paywall_menus', 11);
Where do I put this code?
How to Hide Leaky Paywall Meta Boxes
function plt_hide_leaky_paywall_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Leaky Paywall Visibility" meta box.
remove_meta_box('leaky_paywall_content_visibility', $screen->id, 'side');
//Hide the "Incomplete User Details" meta box.
remove_meta_box('incomplete_user_details', $screen->id, 'normal');
//Hide the "Transaction Details" meta box.
remove_meta_box('transaction_details', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_leaky_paywall_metaboxes', 20);
How to Hide the "Leaky Paywall Dashboard" Dashboard Widget
function plt_hide_leaky_paywall_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Leaky Paywall Dashboard" widget.
remove_meta_box('dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_leaky_paywall_dashboard_widgets', 20);