Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dissallow hiding or removing the themes section of the customizer #127

Open
3 tasks
carolinan opened this issue Apr 1, 2017 · 8 comments
Open
3 tasks

Comments

@carolinan
Copy link

The theme section in the customizer shows the name of the active theme and the Change button where the user can preview and select another theme.
By hiding or removing the section authors can lock users in.

Rule type:

Error

Rule:

Currently not in the handbook.

[Optional Section] Decision needed:

We have allowed users to move and in some exceptions, remove existing sections, but I feel that this needs to be an exception.

Notes for implementation:

Examples:

#customize-theme-controls .control-section-themes {
    display: none !important;
}
Removing:
$wp_customize->remove_section( 'themes' );
$wp_customize->remove_control( 'active_theme' );

Moving:
$wp_customize->get_control( 'active_theme' )->section = 'new_section_name';

To do:

  • Add the rule in the Theme Review handbook to the Requirements page.
  • Create unit tests
  • Create new sniff
@carolinan
Copy link
Author

See branch issue-127-removing-customizer-active-theme
It does not cover display: none

@dingo-d
Copy link
Member

dingo-d commented May 18, 2019

I've assigned this for a later release, since we are lacking decision on this.

@joyously
Copy link

joyously commented Jun 3, 2019

I'll vote for not allowing changing the themes section.

@timelsass
Copy link
Member

I'd agree too that themes shouldn't remove the theme switcher functionality. In watching new users, I've seen a lot of people who use the switching functionality in the customizer as the "normal" way of switching their themes(and discovering new ones), and not rely so much on the dashboard.

@justintadlock
Copy link

There doesn't really need to be any further discussion on this. This falls under the universal "Don't be a d***" guideline. I don't think there's anyone on the team that would be against having this in.

@carolinan
Copy link
Author

On the other hand I have only seen this happen once. It might not be worth the effort.

@carolinan
Copy link
Author

Perhaps a more general warning for
$wp_customize->remove_section
$wp_customize->remove_control

@dingo-d
Copy link
Member

dingo-d commented Mar 11, 2020

Triage resolution: We should add this as a sniff. The handbook should also be updated (there are parts with No removing or modifying non-presentational hooks, so no removing of the themes section can be added there).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants