Changeset 11957
- Timestamp:
- 09/21/2009 09:43:41 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r11930 r11957 887 887 return; 888 888 889 add_filter( 'template', create_function('', "return '{$_GET['template']}';"));889 add_filter( 'template', '_preview_theme_template_filter' ); 890 890 891 891 if ( isset($_GET['stylesheet']) ) { … … 893 893 if ( validate_file($_GET['stylesheet']) ) 894 894 return; 895 add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';"));895 add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' ); 896 896 } 897 897 … … 902 902 } 903 903 add_action('setup_theme', 'preview_theme'); 904 905 /** 906 * Private function to modify the current template when previewing a theme 907 * 908 * @return string 909 */ 910 function _preview_theme_template_filter() { 911 return isset($_GET['template']) ? $_GET['template'] : ''; 912 } 913 914 /** 915 * Private function to modify the current stylesheet when previewing a theme 916 * 917 * @return string 918 */ 919 function _preview_theme_stylesheet_filter() { 920 return isset($_GET['stylesheet']) ? $_GET['stylesheet'] : ''; 921 } 904 922 905 923 /**
Note: See TracChangeset
for help on using the changeset viewer.