[wp-trac] [WordPress Trac] #29165: customize_preview_$setting->id action should be customize_preview_$setting->type

WordPress Trac noreply at wordpress.org
Fri Sep 5 21:42:21 UTC 2014


#29165: customize_preview_$setting->id action should be
customize_preview_$setting->type
------------------------------+------------------
 Reporter:  celloexpressions  |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  4.1
Component:  Customize         |     Version:  3.4
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------

Comment (by celloexpressions):

 Replying to [comment:10 SergeyBiryukov]:
 > Should we make it `'customize_preview_type_' . $this->type`, just in
 case?
 That wouldn't align with `customize_update_$setting->type`.
 `customize_update_$type` and `customize_preview_$type` are the two actions
 that are necessary for pretty much any preview-able custom setting type,
 whereas all of the other hooks are more appropriate if you're targeting a
 specific setting instance (by id). They also read as
 `customize_update_nav_menu` and `customize_preview_nav_menu`, which is a
 lot better than `customize_preview_type_nav_menu`.

 Few enough people are using it, that we could probably just change it and
 reach out to potentially-affected developers if we're worried about
 collisions. WordPress.com is likely one of the only ones. This part of the
 API is pretty severely under-documented.

 I did discuss this with @ethitter and @obenland too; they suggested adding
 the second hook here rather than changing it and worrying about compat.

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


More information about the wp-trac mailing list