Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r12070 r11545  
    876876        return;
    877877
    878     add_filter( 'template', '_preview_theme_template_filter' );
     878    add_filter( 'template', create_function('', "return '{$_GET['template']}';") );
    879879
    880880    if ( isset($_GET['stylesheet']) ) {
     
    882882        if ( validate_file($_GET['stylesheet']) )
    883883            return;
    884         add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' );
     884        add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';") );
    885885    }
    886886
     
    891891}
    892892add_action('setup_theme', 'preview_theme');
    893 
    894 /**
    895  * Private function to modify the current template when previewing a theme
    896  *
    897  * @return string
    898  */
    899 function _preview_theme_template_filter() {
    900     return isset($_GET['template']) ? $_GET['template'] : '';
    901 }
    902 
    903 /**
    904  * Private function to modify the current stylesheet when previewing a theme
    905  *
    906  * @return string
    907  */
    908 function _preview_theme_stylesheet_filter() {
    909     return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : '';
    910 }
    911893
    912894/**
Note: See TracChangeset for help on using the changeset viewer.