[wp-trac] [WordPress Trac] #25671: get_theme_mods does not have a filter

WordPress Trac noreply at wordpress.org
Thu Oct 24 17:34:25 UTC 2013


#25671: get_theme_mods does not have a filter
-------------------------+------------------------------
 Reporter:  scottsweb    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by johnbillion):

 Replying to [comment:4 mark-k]:
 > The way I see it, get_theme_mods is an internal function used by
 *_theme_mod functions. The only reason to call it directly is in a
 misguided attempt in early optimization or for debugging.
 I think you're misunderstanding the problem. `get_theme_mods()` is called
 internally whenever `get_theme_mod()` is called by the theme. The
 resulting output is not aware of `POST` changes made by the theme
 customiser. If you want to make your theme preview aware of changes made
 in the theme customiser you need to filter the option return value. As
 rmmcue said, there should be a higher level filter to abstract it from the
 storage mechanism.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25671#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list