Definition:
function get_theme_mod( $name, $default = false ) {}
Retrieve theme modification value for the current theme.
If the modification name does not exist, then the $default will be passed through sprintf() PHP function with the first string the template directory URI and the second string the stylesheet directory URI.
Parameters
- string $name: Theme modification name.
- bool|string $default
Defined filters
- theme_mod_$name
apply_filters( "theme_mod_$name", $mods[ $name ] ) - theme_mod_$name
apply_filters( "theme_mod_$name", sprintf( $default, get_template_directory_uri()
Source code
function get_theme_mod( $name, $default = false ) {
$mods = get_theme_mods();
if ( isset( $mods[ $name ] ) )
return apply_filters( "theme_mod_$name", $mods[ $name ] );
return apply_filters( "theme_mod_$name", sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() ) );
}
1771

February 12, 2011 


No comments yet... Be the first to leave a reply!