Using wp_get_theme
returns an object holding the properties of the current theme. The headers
property contains any array of information I wish to access.
I can access the other properties using normal notation
wp_get_theme()->theme_root
When I try
wp_get_theme()->headers
I get NULL
How can I access the array within the headers
property? Below is a var_dump
of wp_get_theme()
object(WP_Theme)#381 (11) {
["theme_root":"WP_Theme":private]=>
string(14) "/path/to/theme"
["headers":"WP_Theme":private]=>
array(11) {
["Name"]=>
string(9) "Site Name"
["ThemeURI"]=>
string(0) ""
["Description"]=>
string(11) "Description"
...
}
["headers_sanitized":"WP_Theme":private]=>
NULL`
...