mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Map old -width theme tags to new -layout tags for the purposes of translation in the admin.
see #21442. git-svn-id: https://develop.svn.wordpress.org/trunk@26725 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -46,6 +46,14 @@ final class WP_Theme implements ArrayAccess {
|
||||
'twentyfourteen' => 'Twenty Fourteen',
|
||||
);
|
||||
|
||||
/**
|
||||
* Renamed theme tags.
|
||||
*/
|
||||
private static $tag_map = array(
|
||||
'fixed-width' => 'fixed-layout',
|
||||
'flexible-width' => 'fluid-layout',
|
||||
);
|
||||
|
||||
/**
|
||||
* Absolute path to the theme root, usually wp-content/themes
|
||||
*
|
||||
@@ -706,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;
|
||||
|
||||
Reference in New Issue
Block a user