diff --git a/wp-includes/theme.php b/wp-includes/theme.php index d1e9246f38..9515278640 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -711,9 +711,10 @@ function get_theme_root_uri( $stylesheet_or_template = false ) { * @since 3.1.0 * * @param string $stylesheet_or_template The stylesheet or template name of the theme + * @param bool $skip_cache Optional. Whether to skip the cache. Defaults to false, meaning the cache is used. * @return string Theme root */ -function get_raw_theme_root( $stylesheet_or_template, $no_cache = false ) { +function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) { global $wp_theme_directories; if ( count($wp_theme_directories) <= 1 ) @@ -722,7 +723,7 @@ function get_raw_theme_root( $stylesheet_or_template, $no_cache = false ) { $theme_root = false; // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() - if ( !$no_cache ) { + if ( ! $skip_cache ) { if ( get_option('stylesheet') == $stylesheet_or_template ) $theme_root = get_option('stylesheet_root'); elseif ( get_option('template') == $stylesheet_or_template )