Changeset 5026

Show
Ignore:
Timestamp:
03/12/07 00:07:54 (1 year ago)
Author:
matt
Message:

Add filters to theme_mods

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/theme.php

    r5006 r5026  
    7979    $name = trim( $name ); 
    8080    $theme = $name; 
    81     $theme_uri = trim( $theme_uri[1] ); 
    8281 
    8382    if ( '' == $author_uri[1] ) { 
     
    8786    } 
    8887 
    89     return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status ); 
     88    return array( 'Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status ); 
    9089} 
    9190 
     
    442441 
    443442    if ( isset($mods[$name]) ) 
    444         return $mods[$name]
    445  
    446     return sprintf($default, get_template_directory_uri()); 
     443        return apply_filters( "theme_mod_$name", $mods[$name] )
     444 
     445    return apply_filters( "theme_mod_$name", sprintf($default, get_template_directory_uri()) ); 
    447446} 
    448447