As with many new releases of WordPress, there are some new functions and features.
One new function feature in the 3.3 Sonny release of WordPress is:
get_theme_data()
#DoubleRainbow
What does it mean?
This function makes it possible to return an array of information about any of your theme files loaded into your WordPress theme folder.
Here is how it would be used in your theme template:
[cc lang=”php”][/cc]
This array function returns meta items listed in the theme stylesheet.
Possible return values include:
- Name – theme name
- Title – either theme name or linked theme name
- URI – theme URI
- Description – wptexturized version of the theme name
- AuthorURI – theme author URI
- Template – theme parent template, if exists
- Version – theme version number
- Status – theme status (default: publish)
- Tags – theme tags
- Author – author name or linked author name
Notice: These return values are case-sensitive and will not work if the first letter is not capitalized.
How to Use It
The Codex provides this example for displaying the theme Name and Author:
[cc lang=”php”][/cc]
Once you plug this in and get it working, browse the The Codex and play around with it.
This is an excellent addition for theme wranglers!
How would you use this new feature?
Speak your mind...