I just got re-acquainted with the “remove permalinks link” plugin thought it would be a good idea to also disable the “Add New Themes” and the “Add New” link under the Plugins section links.
The base code for permalinks is:
add_action('admin_menu', 'remove_permalinks_menu_item');
function remove_permalinks_menu_item(){
global $submenu;
unset($submenu['options-general.php'][40]);
To modify it to say remove “Add New Themes” link, would the following be correct? I’m not clear on what the [40] is for and if I would need to change it… just don’t want to cause any issues.
add_action('admin_menu', 'remove_add_new_themes_menu_item');
function remove_add_new_themes_menu_item(){
global $submenu;
unset($submenu['themes.php'][40]);