diff --git wp-includes/class-wp-theme.php wp-includes/class-wp-theme.php
index dfff705..853ae43 100644
|
|
final class WP_Theme implements ArrayAccess { |
22 | 22 | 'Author' => 'Author', |
23 | 23 | 'AuthorURI' => 'Author URI', |
24 | 24 | 'Version' => 'Version', |
| 25 | 'Requires' => 'Requires at least', |
25 | 26 | 'Template' => 'Template', |
26 | 27 | 'Status' => 'Status', |
27 | 28 | 'Tags' => 'Tags', |
diff --git wp-includes/theme.php wp-includes/theme.php
index 8b8f42c..f8ea55a 100644
|
|
function preview_theme_ob_filter_callback( $matches ) { |
661 | 661 | * @param string $stylesheet Stylesheet name |
662 | 662 | */ |
663 | 663 | function switch_theme( $stylesheet ) { |
664 | | global $wp_theme_directories, $sidebars_widgets; |
665 | | |
666 | | if ( is_array( $sidebars_widgets ) ) |
667 | | set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) ); |
| 664 | global $wp_theme_directories, $sidebars_widgets, $wp_version; |
668 | 665 | |
669 | 666 | $old_theme = wp_get_theme(); |
670 | 667 | $new_theme = wp_get_theme( $stylesheet ); |
671 | 668 | |
| 669 | if ( version_compare( $wp_version, $new_theme->get('Requires'), '<' ) ) { |
| 670 | wp_die( sprintf( __('The theme %s requires WordPress %s or higher. Please <a href="%s">update WordPress</a>.'), '<strong>' . $new_theme->get('Name') . '</strong>', $new_theme->get('Requires'), network_admin_url('update-core.php') ) ); |
| 671 | } |
| 672 | |
| 673 | if ( is_array( $sidebars_widgets ) ) |
| 674 | set_theme_mod( 'sidebars_widgets', array( 'time' => time(), 'data' => $sidebars_widgets ) ); |
| 675 | |
672 | 676 | if ( func_num_args() > 1 ) { |
673 | 677 | $template = $stylesheet; |
674 | 678 | $stylesheet = func_get_arg( 1 ); |