WPThemeReview icon indicating copy to clipboard operation
WPThemeReview copied to clipboard

Dissallow hiding or removing the themes section of the customizer

Open carolinan opened this issue 7 years ago • 8 comments

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 avatar Apr 01 '17 07:04 carolinan

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

carolinan avatar May 05 '17 03:05 carolinan

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

dingo-d avatar May 18 '19 12:05 dingo-d

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

joyously avatar Jun 03 '19 20:06 joyously

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.

timelsass avatar Jun 04 '19 13:06 timelsass

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.

justintadlock avatar Jun 04 '19 13:06 justintadlock

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

carolinan avatar Jun 08 '19 02:06 carolinan

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

carolinan avatar Jun 08 '19 02:06 carolinan

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).

dingo-d avatar Mar 11 '20 16:03 dingo-d