3 * WordPress Theme Administration API
6 * @subpackage Administration
10 * {@internal Missing Short Description}}
16 function current_theme_info() {
17 $themes = get_themes();
18 $current_theme = get_current_theme();
19 $ct->name = $current_theme;
20 $ct->title = $themes[$current_theme]['Title'];
21 $ct->version = $themes[$current_theme]['Version'];
22 $ct->parent_theme = $themes[$current_theme]['Parent Theme'];
23 $ct->template_dir = $themes[$current_theme]['Template Dir'];
24 $ct->stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
25 $ct->template = $themes[$current_theme]['Template'];
26 $ct->stylesheet = $themes[$current_theme]['Stylesheet'];
27 $ct->screenshot = $themes[$current_theme]['Screenshot'];
28 $ct->description = $themes[$current_theme]['Description'];
29 $ct->author = $themes[$current_theme]['Author'];
30 $ct->tags = $themes[$current_theme]['Tags'];
35 * {@internal Missing Short Description}}
41 function get_broken_themes() {
42 global $wp_broken_themes;
45 return $wp_broken_themes;
49 * {@internal Missing Short Description}}
55 function get_page_templates() {
56 $themes = get_themes();
57 $theme = get_current_theme();
58 $templates = $themes[$theme]['Template Files'];
59 $page_templates = array ();
61 if ( is_array( $templates ) ) {
62 foreach ( $templates as $template ) {
63 $template_data = implode( '', file( WP_CONTENT_DIR.$template ));
66 if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )
70 if( preg_match( '|Description:(.*)$|mi', $template_data, $description ) )
71 $description = $description[1];
73 if ( !empty( $name ) ) {
74 $page_templates[trim( $name )] = basename( $template );
79 return $page_templates;