-
Home
-
PrettyLinks – Affiliate Links, Link Branding, Link Tracking & Marketing Plugin
- Tips
How to Hide PrettyLinks Admin Menus
function plt_hide_pretty_link_menus() {
//Hide "Pretty Links".
remove_menu_page('edit.php?post_type=pretty-link');
//Hide "Pretty Links → Pretty Links".
remove_submenu_page('edit.php?post_type=pretty-link', 'edit.php?post_type=pretty-link');
//Hide "Pretty Links → PrettyPay™ LinksNEW".
remove_submenu_page('edit.php?post_type=pretty-link', 'prettypay-links');
//Hide "Pretty Links → Add New Pretty Link".
remove_submenu_page('edit.php?post_type=pretty-link', 'post-new.php?post_type=pretty-link');
//Hide "Pretty Links → Clicks".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-clicks');
//Hide "Pretty Links → Tools".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-tools');
//Hide "Pretty Links → Options".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-options');
//Hide "Pretty Links → Upgrade".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-updates');
//Hide "Pretty Links → Categories".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-categories');
//Hide "Pretty Links → Tags".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-tags');
//Hide "Pretty Links → Reports".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-reports');
//Hide "Pretty Links → Display Groups".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-groups');
//Hide "Pretty Links → Product Displays".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-products');
//Hide "Pretty Links → Import / Export".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-upgrade-import-export');
//Hide "Pretty Links → Add-ons".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-addons');
//Hide "Pretty Links → Growth Tools".
remove_submenu_page('edit.php?post_type=pretty-link', 'pretty-link-growth-tools');
}
add_action('admin_menu', 'plt_hide_pretty_link_menus', 10000);
Where do I put this code?
How to Hide the "Pretty Links" Meta Box
function plt_hide_pretty_link_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "Pretty Links" meta box.
remove_meta_box('pretty-links-sidebar', $screen->id, 'side');
}
add_action('add_meta_boxes', 'plt_hide_pretty_link_metaboxes', 20);
How to Hide the "Pretty Link Quick Add" Dashboard Widget
function plt_hide_pretty_link_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "Pretty Link Quick Add" widget.
remove_meta_box('prli_dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_pretty_link_dashboard_widgets', 20);