Created
April 23, 2012 13:36
-
-
Save jeremyclark13/2470972 to your computer and use it in GitHub Desktop.
New function wp_get_theme for WordPress 3.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $theme_data; | |
| if (function_exists('wp_get_theme')){ | |
| $theme_data = wp_get_theme('theme-name'); | |
| $theme_uri = $theme_data->ThemeURI; | |
| $author_uri = $theme_data->Author_URI; | |
| } else { | |
| $theme_data = (object) get_theme_data(get_template_directory() . '/style.css'); | |
| $theme_uri = $theme_data->URI; | |
| $author_uri = $theme_data->AuthorURI; | |
| } | |
| $version = $theme_data->Version; | |
| $name = $theme_data->Name; | |
| $description = $theme_data->Description; | |
| $author = $theme_data->Author; | |
| //If theme is child theme this is the name of the parent theme | |
| $template = $theme_data->Template; | |
| $tags = $theme_data->Tags; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment