mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Clarify second argument for get_raw_theme_root() as the multiple negatives can get confusing. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e3813d7b68
commit
7df034983a
@ -711,9 +711,10 @@ function get_theme_root_uri( $stylesheet_or_template = false ) {
|
|||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*
|
*
|
||||||
* @param string $stylesheet_or_template The stylesheet or template name of the theme
|
* @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
|
* @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;
|
global $wp_theme_directories;
|
||||||
|
|
||||||
if ( count($wp_theme_directories) <= 1 )
|
if ( count($wp_theme_directories) <= 1 )
|
||||||
@ -722,7 +723,7 @@ function get_raw_theme_root( $stylesheet_or_template, $no_cache = false ) {
|
|||||||
$theme_root = false;
|
$theme_root = false;
|
||||||
|
|
||||||
// If requesting the root for the current theme, consult options to avoid calling get_theme_roots()
|
// 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 )
|
if ( get_option('stylesheet') == $stylesheet_or_template )
|
||||||
$theme_root = get_option('stylesheet_root');
|
$theme_root = get_option('stylesheet_root');
|
||||||
elseif ( get_option('template') == $stylesheet_or_template )
|
elseif ( get_option('template') == $stylesheet_or_template )
|
||||||
|
Loading…
Reference in New Issue
Block a user