Tweak theme validation.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1254,30 +1254,6 @@ function edInsertContent(myField, myValue) {
|
||||
';
|
||||
}
|
||||
|
||||
function validate_current_theme() {
|
||||
$theme_loc = 'wp-content/themes';
|
||||
$theme_root = ABSPATH.$theme_loc;
|
||||
|
||||
$template = get_settings('template');
|
||||
$stylesheet = get_settings('stylesheet');
|
||||
|
||||
if (($template != 'default') && (!file_exists("$theme_root/$template/index.php"))) {
|
||||
update_option('template', 'default');
|
||||
update_option('stylesheet', 'default');
|
||||
do_action('switch_theme', 'Default');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (($stylesheet != 'default') && (!file_exists("$theme_root/$stylesheet/style.css"))) {
|
||||
update_option('template', 'default');
|
||||
update_option('stylesheet', 'default');
|
||||
do_action('switch_theme', 'Default');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function get_broken_themes() {
|
||||
global $wp_broken_themes;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user