]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/theme.php
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-admin / includes / theme.php
index ec670ce6a3764f176ac4b5a5b790d73a1afcb554..8b883e23ab1fa2345e3e0f7f82769866ab2b51df 100644 (file)
@@ -1,5 +1,18 @@
 <?php
+/**
+ * WordPress Theme Administration API
+ *
+ * @package WordPress
+ * @subpackage Administration
+ */
 
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
 function current_theme_info() {
        $themes = get_themes();
        $current_theme = get_current_theme();
@@ -18,6 +31,13 @@ function current_theme_info() {
        return $ct;
 }
 
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
 function get_broken_themes() {
        global $wp_broken_themes;
 
@@ -25,6 +45,13 @@ function get_broken_themes() {
        return $wp_broken_themes;
 }
 
+/**
+ * {@internal Missing Short Description}}
+ *
+ * @since unknown
+ *
+ * @return unknown
+ */
 function get_page_templates() {
        $themes = get_themes();
        $theme = get_current_theme();
@@ -35,11 +62,13 @@ function get_page_templates() {
                foreach ( $templates as $template ) {
                        $template_data = implode( '', file( WP_CONTENT_DIR.$template ));
 
-                       preg_match( '|Template Name:(.*)$|mi', $template_data, $name );
-                       preg_match( '|Description:(.*)$|mi', $template_data, $description );
+                       $name = '';
+                       if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )
+                               $name = $name[1];
 
-                       $name = $name[1];
-                       $description = $description[1];
+                       $description = '';
+                       if( preg_match( '|Description:(.*)$|mi', $template_data, $description ) )
+                               $description = $description[1];
 
                        if ( !empty( $name ) ) {
                                $page_templates[trim( $name )] = basename( $template );