Core Function
View Source on Trac ↗ wp_get_theme()
wp_get_theme( mixed $stylesheet = '', mixed $theme_root = '' ) Gets a WP_Theme object for a theme.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $stylesheet string | Optional. Directory name for the theme. Defaults to active theme. |
| string | $theme_root Optional. Absolute path of the theme root to look in. If not specified, get_raw_theme_root() is used to calculate the theme root for the $stylesheet provided (or active theme). Required |
Return Value
(WP_Theme)
WP_Theme Theme object. Be sure to check the object's exists() method
if you need to confirm the theme's existence.
Function Information
Since Version
3.4.0
Source File
wp-includes/theme.php
Advertisement