Make WordPress Core


Ignore:
Timestamp:
03/12/2007 12:07:54 AM (19 years ago)
Author:
matt
Message:

Add filters to theme_mods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.