関数 get_theme_root()
2014/12/17
関数 get_theme_root()
定義ファイル :/blog/wp-includes/theme.php 2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | function get_theme_root( $stylesheet_or_template = false ) { global $wp_theme_directories; if ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) { // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory. // This gives relative theme roots the benefit of the doubt when things go haywire. if ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) $theme_root = WP_CONTENT_DIR . $theme_root; } else { $theme_root = WP_CONTENT_DIR . '/themes'; } return apply_filters( 'theme_root', $theme_root ); } |