関数 register_theme_directory()
2014/12/16
関数 register_theme_directory()
定義ファイル :/blog/wp-includes/theme.php 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | function register_theme_directory( $directory ) { global $wp_theme_directories; if ( ! file_exists( $directory ) ) { // Try prepending as the theme directory could be relative to the content directory $directory = WP_CONTENT_DIR . '/' . $directory; // If this directory does not exist, return and do not register if ( ! file_exists( $directory ) ) { return false; } } if ( ! is_array( $wp_theme_directories ) ) { $wp_theme_directories = array(); } $untrailed = untrailingslashit( $directory ); if ( ! empty( $untrailed ) && ! in_array( $untrailed, $wp_theme_directories ) ) { $wp_theme_directories[] = $untrailed; } return true; } |