Update WordPress to 5.2
This commit is contained in:
parent
489b5a5914
commit
e00f87f2f5
599 changed files with 119573 additions and 55990 deletions
|
@ -289,10 +289,10 @@ final class WP_Theme implements ArrayAccess {
|
|||
$this->template = $this->stylesheet;
|
||||
if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) {
|
||||
$error_message = sprintf(
|
||||
/* translators: 1: index.php, 2: Codex URL, 3: style.css */
|
||||
/* translators: 1: index.php, 2: link to documentation, 3: style.css */
|
||||
__( 'Template is missing. Standalone themes need to have a %1$s template file. <a href="%2$s">Child themes</a> need to have a Template header in the %3$s stylesheet.' ),
|
||||
'<code>index.php</code>',
|
||||
__( 'https://codex.wordpress.org/Child_Themes' ),
|
||||
__( 'https://developer.wordpress.org/themes/advanced-topics/child-themes/' ),
|
||||
'<code>style.css</code>'
|
||||
);
|
||||
$this->errors = new WP_Error( 'theme_no_index', $error_message );
|
||||
|
@ -371,6 +371,10 @@ final class WP_Theme implements ArrayAccess {
|
|||
$this->parent = new WP_Theme( $this->template, isset( $theme_root_template ) ? $theme_root_template : $this->theme_root, $this );
|
||||
}
|
||||
|
||||
if ( wp_paused_themes()->get( $this->stylesheet ) && ( ! is_wp_error( $this->errors ) || ! isset( $this->errors->errors['theme_paused'] ) ) ) {
|
||||
$this->errors = new WP_Error( 'theme_paused', __( 'This theme failed to load properly and was paused within the admin backend.' ) );
|
||||
}
|
||||
|
||||
// We're good. If we didn't retrieve from cache, set it.
|
||||
if ( ! is_array( $cache ) ) {
|
||||
$cache = array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue