WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#32623 closed enhancement (wontfix)

Add admin_body_class to the Customizer

Reported by: dovyp Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: Customize Keywords:
Focuses: Cc:

Description

This is a really easy fix, so I'm not going to submit a patch unless you'd prefer me to.

On line 72 of ~/wp-admin/customize.php, I want to change:
$body_class = 'wp-core-ui wp-customizer js';
TO
$body_class = apply_filters( 'admin_body_class', 'wp-core-ui wp-customizer js' );

Thus allowing the admin_body_class filter to be used in the customizer, like the rest of the WP Admin.

I'm hoping we can add this small change for 4.3.

Change History (3)

#1 @ocean90
5 years ago

  • Focuses administration template removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This is probably a follow-up to your comment and patch on #31336.

As already said in the comments (ticket:31336:104, ticket:31336:95) the Customizer isn't an admin screen like other screens so the filter shouldn't be used here. Closing as wontfix.

#2 follow-up: @dovyp
5 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Since you don't want that admin filter, how about adding this single line (yes as posted in #31336) to customize.php? This will allow for the admin-theme body class to be appended and controls to be modified accordingly. After all, the save button gets updated via cookie. Why not enable third-party controls to also get updated to match the admin theme?

$body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );


Thanks.

#3 in reply to: ↑ 2 @ocean90
5 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Replying to dovyp:

That's the reason why had closed the ticket. Core won't support color schemes for the Customizer.

Note: See TracTickets for help on using tickets.