]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/class-wp-theme.php
WordPress 3.8.3
[autoinstalls/wordpress.git] / wp-includes / class-wp-theme.php
index 7585fba9519d0245c16839b7baf14b33a4f721bb..511699adce66159a75fc46c809a4225cbc0b5ba2 100644 (file)
@@ -37,11 +37,21 @@ final class WP_Theme implements ArrayAccess {
         * @var array
         */
        private static $default_themes = array(
-               'classic'      => 'WordPress Classic',
-               'default'      => 'WordPress Default',
-               'twentyten'    => 'Twenty Ten',
-               'twentyeleven' => 'Twenty Eleven',
-               'twentytwelve' => 'Twenty Twelve',
+               'classic'        => 'WordPress Classic',
+               'default'        => 'WordPress Default',
+               'twentyten'      => 'Twenty Ten',
+               'twentyeleven'   => 'Twenty Eleven',
+               'twentytwelve'   => 'Twenty Twelve',
+               'twentythirteen' => 'Twenty Thirteen',
+               'twentyfourteen' => 'Twenty Fourteen',
+       );
+
+       /**
+        * Renamed theme tags.
+        */
+       private static $tag_map = array(
+               'fixed-width'    => 'fixed-layout',
+               'flexible-width' => 'fluid-layout',
        );
 
        /**
@@ -86,7 +96,7 @@ final class WP_Theme implements ArrayAccess {
        /**
         * The directory name of the theme's files, inside the theme root.
         *
-        * In the case of a child theme, this is directory name of the the child theme.
+        * In the case of a child theme, this is directory name of the child theme.
         * Otherwise, 'stylesheet' is the same as 'template'.
         *
         * @access private
@@ -205,7 +215,7 @@ final class WP_Theme implements ArrayAccess {
                } elseif ( ! file_exists( $this->theme_root . '/' . $theme_file ) ) {
                        $this->headers['Name'] = $this->stylesheet;
                        if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet ) )
-                               $this->errors = new WP_Error( 'theme_not_found', __( 'The theme directory does not exist.' ) );
+                               $this->errors = new WP_Error( 'theme_not_found', sprintf( __( 'The theme directory "%s" does not exist.' ), $this->stylesheet ) );
                        else
                                $this->errors = new WP_Error( 'theme_no_stylesheet', __( 'Stylesheet is missing.' ) );
                        $this->template = $this->stylesheet;
@@ -704,8 +714,11 @@ final class WP_Theme implements ArrayAccess {
                                }
 
                                foreach ( $value as &$tag ) {
-                                       if ( isset( $tags_list[ $tag ] ) )
+                                       if ( isset( $tags_list[ $tag ] ) ) {
                                                $tag = $tags_list[ $tag ];
+                                       } elseif ( isset( self::$tag_map[ $tag ] ) ) {
+                                               $tag = $tags_list[ self::$tag_map[ $tag ] ];
+                                       }
                                }
 
                                return $value;
@@ -719,7 +732,7 @@ final class WP_Theme implements ArrayAccess {
        /**
         * The directory name of the theme's "stylesheet" files, inside the theme root.
         *
-        * In the case of a child theme, this is directory name of the the child theme.
+        * In the case of a child theme, this is directory name of the child theme.
         * Otherwise, get_stylesheet() is the same as get_template().
         *
         * @since 3.4.0