I just ran into this. ⏳
I think it is strange that WordPress hides these submenu items with CSS, when it could simply prevent them from ever being added in the first place.
I did some research, and it seems like Custom_Background::init()
and Custom_Image_Header::init()
could both have the same relative conditional logic inside of menu.php
to not add the pages, in turn not adding the submenu items.
Header:
if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize' ) ) {
return;
}
Background:
if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize' ) ) {
return;
}
Are there any un'obvious reasons to add these pages, even though they are not directly visited by a user anymore? The Customizer appears to work normally without them, as do the themes and theme settings.