関数 wp_get_theme()
2014/12/16
関数 wp_get_theme()
定義ファイル :/blog/wp-includes/theme.php 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | function wp_get_theme( $stylesheet = null, $theme_root = null ) { global $wp_theme_directories; if ( empty( $stylesheet ) ) $stylesheet = get_stylesheet(); if ( empty( $theme_root ) ) { $theme_root = get_raw_theme_root( $stylesheet ); if ( false === $theme_root ) $theme_root = WP_CONTENT_DIR . '/themes'; elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) $theme_root = WP_CONTENT_DIR . $theme_root; } return new WP_Theme( $stylesheet, $theme_root ); } |