Make WordPress Core


Ignore:
Timestamp:
12/06/2013 02:36:07 PM (13 years ago)
Author:
nacin
Message:

Map old -width theme tags to new -layout tags for the purposes of translation in the admin.

see #21442.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme.php

    r26024 r26725  
    4545                'twentythirteen' => 'Twenty Thirteen',
    4646                'twentyfourteen' => 'Twenty Fourteen',
     47        );
     48
     49        /**
     50         * Renamed theme tags.
     51         */
     52        private static $tag_map = array(
     53                'fixed-width'    => 'fixed-layout',
     54                'flexible-width' => 'fluid-layout',
    4755        );
    4856
    … …  
    707715
    708716                                foreach ( $value as &$tag ) {
    709                                         if ( isset( $tags_list[ $tag ] ) )
     717                                        if ( isset( $tags_list[ $tag ] ) ) {
    710718                                                $tag = $tags_list[ $tag ];
     719                                        } elseif ( isset( self::$tag_map[ $tag ] ) ) {
     720                                                $tag = $tags_list[ self::$tag_map[ $tag ] ];
     721                                        }
    711722                                }
    712723
Note: See TracChangeset for help on using the changeset viewer.