Changeset 58366
- Timestamp:
- 06/08/2024 04:21:49 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r58328 r58366 92 92 if ( null !== $args['errors'] ) { 93 93 foreach ( $themes as $theme => $wp_theme ) { 94 if ( $wp_theme->errors() != $args['errors'] ) {94 if ( (bool) $wp_theme->errors() !== $args['errors'] ) { 95 95 unset( $themes[ $theme ] ); 96 96 } … … 578 578 } 579 579 580 if ( get_site_transient( 'theme_roots' ) != $theme_roots ) {580 if ( get_site_transient( 'theme_roots' ) !== $theme_roots ) { 581 581 set_site_transient( 'theme_roots', $theme_roots, $cache_expiration ); 582 582 } … … 706 706 // If requesting the root for the active theme, consult options to avoid calling get_theme_roots(). 707 707 if ( ! $skip_cache ) { 708 if ( get_option( 'stylesheet' ) == $stylesheet_or_template ) {708 if ( get_option( 'stylesheet' ) === $stylesheet_or_template ) { 709 709 $theme_root = get_option( 'stylesheet_root' ); 710 } elseif ( get_option( 'template' ) == $stylesheet_or_template ) {710 } elseif ( get_option( 'template' ) === $stylesheet_or_template ) { 711 711 $theme_root = get_option( 'template_root' ); 712 712 } … … 943 943 */ 944 944 $default = WP_Theme::get_core_default_theme(); 945 if ( false === $default || get_stylesheet() == $default->get_stylesheet() ) {945 if ( false === $default || get_stylesheet() === $default->get_stylesheet() ) { 946 946 return true; 947 947 } … … 1568 1568 foreach ( (array) $_wp_default_headers as $default_header ) { 1569 1569 $url = vsprintf( $default_header['url'], $directory_args ); 1570 if ( $data['url'] == $url ) {1570 if ( $data['url'] === $url ) { 1571 1571 $data = $default_header; 1572 1572 $data['url'] = $url; … … 3445 3445 $header_image = get_header_image(); 3446 3446 $background_image = get_background_image(); 3447 $custom_logo_id = get_theme_mod( 'custom_logo' );3448 $site_logo_id = get_option( 'site_logo' );3449 3450 if ( $custom_logo_id && $custom_logo_id == $id ) {3447 $custom_logo_id = (int) get_theme_mod( 'custom_logo' ); 3448 $site_logo_id = (int) get_option( 'site_logo' ); 3449 3450 if ( $custom_logo_id && $custom_logo_id === $id ) { 3451 3451 remove_theme_mod( 'custom_logo' ); 3452 3452 remove_theme_mod( 'header_text' ); 3453 3453 } 3454 3454 3455 if ( $site_logo_id && $site_logo_id == $id ) {3455 if ( $site_logo_id && $site_logo_id === $id ) { 3456 3456 delete_option( 'site_logo' ); 3457 3457 } 3458 3458 3459 if ( $header_image && $header_image == $attachment_image ) {3459 if ( $header_image && $header_image === $attachment_image ) { 3460 3460 remove_theme_mod( 'header_image' ); 3461 3461 remove_theme_mod( 'header_image_data' ); 3462 3462 } 3463 3463 3464 if ( $background_image && $background_image == $attachment_image ) {3464 if ( $background_image && $background_image === $attachment_image ) { 3465 3465 remove_theme_mod( 'background_image' ); 3466 3466 }
Note: See TracChangeset
for help on using the changeset viewer.