[wp-trac] [WordPress Trac] #45258: Add the_theme_mod() For Displaying Theme Customizations
WordPress Trac
noreply at wordpress.org
Fri Nov 2 09:21:51 UTC 2018
#45258: Add the_theme_mod() For Displaying Theme Customizations
-------------------------+-----------------------------
Reporter: Safaris in | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: 5.0
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
I figure, since a number of customizations are generally displayed, we
could have a function that outputs these settings by key. It can echo the
result of get_theme_mod()
i.e
function the_theme_mod( $name, $default = false, $language = null ){
if( is_null( $language ) ){
echo get_theme_mod( $name, $default );
} else {
__( get_theme_mod( $name, $default ), $language );
}
}
The last argument can be used to optionally pass a language domain for
translations or formatting.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45258>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list