WordPress.org

Make WordPress Core

Changes between Initial Version and Version 6 of Ticket #30969


Ignore:
Timestamp:
03/10/2020 07:40:42 PM (16 months ago)
Author:
johnjamesjacoby
Comment:

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.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30969

    • Property Status changed from new to reopened
    • Property Component changed from General to Customize
    • Property Milestone changed from Awaiting Review to
    • Property Keywords 2nd-opinion added
  • Ticket #30969 – Description

    initial v6  
    99
    1010This issue also exists in other themes I tested using the above hooks.
    11 This issue is not seen in previous Wordpress version using the Twentyfourteen theme.
     11This issue is not seen in previous WordPress version using the Twentyfourteen theme.
    1212
    1313