Redirect Plugins.php to New Plugin Page
After a little bit of trial and error, I finally got my code to work. This will redirect http://example.com/wp-admin/plugins to http://example.com/wp-admin/admin.php?page=pretty-plugins.php if the current user doesn’t have access to update core. add_action( ‘admin_menu’, ‘block_direct_plugin_page_access’ ); function block_direct_plugin_page_access() { global $pagenow; if ( ! current_user_can(‘update_core’) && ‘plugins.php’ === $pagenow ) { if ( function_exists(‘admin_url’) ) { … Read more