Add filters to theme_mods
git-svn-id: http://svn.automattic.com/wordpress/trunk@5026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6f018cf7c6
commit
a8327cbd0d
|
@ -78,7 +78,6 @@ function get_theme_data( $theme_file ) {
|
||||||
$name = $theme_name[1];
|
$name = $theme_name[1];
|
||||||
$name = trim( $name );
|
$name = trim( $name );
|
||||||
$theme = $name;
|
$theme = $name;
|
||||||
$theme_uri = trim( $theme_uri[1] );
|
|
||||||
|
|
||||||
if ( '' == $author_uri[1] ) {
|
if ( '' == $author_uri[1] ) {
|
||||||
$author = trim( $author_name[1] );
|
$author = trim( $author_name[1] );
|
||||||
|
@ -86,7 +85,7 @@ function get_theme_data( $theme_file ) {
|
||||||
$author = '<a href="' . trim( $author_uri[1] ) . '" title="' . __('Visit author homepage') . '">' . trim( $author_name[1] ) . '</a>';
|
$author = '<a href="' . trim( $author_uri[1] ) . '" title="' . __('Visit author homepage') . '">' . trim( $author_name[1] ) . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status );
|
return array( 'Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status );
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_themes() {
|
function get_themes() {
|
||||||
|
@ -441,9 +440,9 @@ function get_theme_mod($name, $default = false) {
|
||||||
$mods = get_option("mods_$theme");
|
$mods = get_option("mods_$theme");
|
||||||
|
|
||||||
if ( isset($mods[$name]) )
|
if ( isset($mods[$name]) )
|
||||||
return $mods[$name];
|
return apply_filters( "theme_mod_$name", $mods[$name] );
|
||||||
|
|
||||||
return sprintf($default, get_template_directory_uri());
|
return apply_filters( "theme_mod_$name", sprintf($default, get_template_directory_uri()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_theme_mod($name, $value) {
|
function set_theme_mod($name, $value) {
|
||||||
|
|
Loading…
Reference in New Issue