mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 02:34:38 +00:00
Remove WP_FALLBACK_THEME, use WP_DEFAULT_THEME instead. We now only fall back to the default theme if the theme is broken. Incomplete themes that need to inherit templates will inherit them from wp-includes/theme-compat -- this behavior is deprecated. fixes #12846.
git-svn-id: https://develop.svn.wordpress.org/trunk@14485 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1207,13 +1207,13 @@ function switch_theme($template, $stylesheet) {
|
||||
/**
|
||||
* Checks that current theme files 'index.php' and 'style.css' exists.
|
||||
*
|
||||
* Does not check the fallback theme. The fallback theme should always exist.
|
||||
* Does not check the default theme, which is the fallback and should always exist.
|
||||
* Will switch theme to the fallback theme if current theme does not validate.
|
||||
* You can use the 'validate_current_theme' filter to return FALSE to
|
||||
* disable this functionality.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @see WP_FALLBACK_THEME
|
||||
* @see WP_DEFAULT_THEME
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -1222,13 +1222,13 @@ function validate_current_theme() {
|
||||
if ( defined('WP_INSTALLING') || !apply_filters( 'validate_current_theme', true ) )
|
||||
return true;
|
||||
|
||||
if ( get_template() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/index.php') ) {
|
||||
switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
|
||||
if ( get_template() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/index.php') ) {
|
||||
switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( get_stylesheet() != WP_FALLBACK_THEME && !file_exists(get_template_directory() . '/style.css') ) {
|
||||
switch_theme( WP_FALLBACK_THEME, WP_FALLBACK_THEME );
|
||||
if ( get_stylesheet() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/style.css') ) {
|
||||
switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user