wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
wp_get_theme › WordPress Function
Da3.4.0
Deprecaton/a
› wp_get_theme ( $stylesheet = '', $theme_root = '' )
Parametri: (2) |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Gets a WP_Theme object for a theme.
Sorgenti
function wp_get_theme( $stylesheet = '', $theme_root = '' ) { 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, true ) ) { $theme_root = WP_CONTENT_DIR . $theme_root; } } return new WP_Theme( $stylesheet, $theme_root ); }