Make WordPress Core

Ticket #59677: patch3.diff

File patch3.diff, 827 bytes (added by codex-m, 3 years ago)

Remove redundant is_multisite check and function exist check

  • wp-includes/theme.php

     
    196196function get_stylesheet_directory() {
    197197        global $wp_stylesheet_path;
    198198
     199        if ( function_exists( 'ms_is_switched' ) && ms_is_switched() ) {
     200            $wp_stylesheet_path = null;
     201        }
     202       
    199203        if ( null === $wp_stylesheet_path ) {
    200204                $stylesheet     = get_stylesheet();
    201205                $theme_root     = get_theme_root( $stylesheet );
     
    346350function get_template_directory() {
    347351        global $wp_template_path;
    348352
     353        if ( function_exists( 'ms_is_switched' ) && ms_is_switched() ) {
     354            $wp_template_path = null;
     355        }
     356       
    349357        if ( null === $wp_template_path ) {
    350358                $template     = get_template();
    351359                $theme_root   = get_theme_root( $template );