[wp-trac] [WordPress Trac] #38778: Only show video header controls if previewing front page

WordPress Trac noreply at wordpress.org
Tue Nov 15 03:00:50 UTC 2016


#38778: Only show video header controls if previewing front page
--------------------------+------------------
 Reporter:  westonruter   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7
Component:  Customize     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------

Comment (by westonruter):

 @joemcgill yeah, the styling wasn't very good. See
 [attachment:38778.notification.diff] and [attachment:header-video-
 notice.png] for an actual customizer control notification notice. This
 uses the actual `Notification` API. A downside with this is that the
 notification is shown inside of the Header Image control, so it appears
 under that control's heading. The notice could be moved above, using the
 markup/logic from [attachment:38778.1.diff] but the styles from the
 notice. Thoughts?

 > Should we build in future compatibility for needing to use the active
 callback for more than checking video support? If not, then I think we
 should use the name `video_active_callback` as proposed in
 [https://core.trac.wordpress.org/attachment/ticket/38738/38738.7.diff
 38738.7.diff].

 The “`active_callback`” is part of the customizer API. What you're looking
 for is using something more specific than `is_front_page` not something
 different than `active_callback`. In other words, you're looking to add an
 `active_callback` that is something like
 `can_serve_video_headers_for_current_template`. But this is out of scope
 for this ticket and should be addressed in #38738 instead.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38778#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list