[wp-trac] [WordPress Trac] #14721: set_theme_mod() needs a filter

WordPress Trac noreply at wordpress.org
Thu Feb 27 00:16:22 UTC 2014


#14721: set_theme_mod() needs a filter
--------------------------+--------------------
 Reporter:  mikeschinkel  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  3.9
Component:  Themes        |     Version:  3.0.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------

Comment (by MikeHansenMe):

 Is there a use case where it is better to filter before saving rather than
 filtering on retrieval? There is a filter in get_theme_mod() on line 896
 that looks like

 {{{
 apply_filters( "theme_mod_{$name}", $mods[$name] );
 }}}

 I would think that could be used in any situation where the proposed
 filter would be used.

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


More information about the wp-trac mailing list