mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
(string) WP_Theme is now the theme name, translated. Good replacement for get_current_theme(); better than wp_get_theme()->display('Name'). see #20103, see #20138.
git-svn-id: https://develop.svn.wordpress.org/trunk@20039 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -238,6 +238,15 @@ final class WP_Theme implements ArrayAccess {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* When converting the object to a string, the theme name is returned.
|
||||
*
|
||||
* @return string Theme name, ready for display (translated)
|
||||
*/
|
||||
function __toString() {
|
||||
return (string) $this->display('Name');
|
||||
}
|
||||
|
||||
/**
|
||||
* __isset() magic method for properties formerly returned by current_theme_info()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user