Changes from trunk/wp-includes/theme.php at r11545 to branches/2.8/wp-includes/theme.php at r12070
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.8/wp-includes/theme.php
r11545 r12070 876 876 return; 877 877 878 add_filter( 'template', create_function('', "return '{$_GET['template']}';"));878 add_filter( 'template', '_preview_theme_template_filter' ); 879 879 880 880 if ( isset($_GET['stylesheet']) ) { … … 882 882 if ( validate_file($_GET['stylesheet']) ) 883 883 return; 884 add_filter( 'stylesheet', create_function('', "return '{$_GET['stylesheet']}';"));884 add_filter( 'stylesheet', '_preview_theme_stylesheet_filter' ); 885 885 } 886 886 … … 891 891 } 892 892 add_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 } 893 911 894 912 /**
Note: See TracChangeset
for help on using the changeset viewer.