関数 get_raw_theme_root()
2014/12/17
関数 get_raw_theme_root()
定義ファイル :/blog/wp-includes/theme.php 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) { global $wp_theme_directories; if ( count($wp_theme_directories) <= 1 ) return '/themes'; $theme_root = false; // If requesting the root for the current theme, consult options to avoid calling get_theme_roots() if ( ! $skip_cache ) { if ( get_option('stylesheet') == $stylesheet_or_template ) $theme_root = get_option('stylesheet_root'); elseif ( get_option('template') == $stylesheet_or_template ) $theme_root = get_option('template_root'); } if ( empty($theme_root) ) { $theme_roots = get_theme_roots(); if ( !empty($theme_roots[$stylesheet_or_template]) ) $theme_root = $theme_roots[$stylesheet_or_template]; } return $theme_root; } |