Making WordPress.org


Ignore:
Timestamp:
05/15/2015 07:12:01 AM (10 years ago)
Author:
dd32
Message:

Themes Directory: Translate the Themes tags on display.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r1543 r1577  
    6565                'date'      => __( 'Date', 'wporg-themes' ),
    6666                'downloads' => __( 'Downloads', 'wporg-themes' ),
     67
     68                // Tags
     69                'tags' => wporg_themes_get_tag_translations()
    6770            ),
    6871        ) );
     
    224227    );
    225228}
     229
     230/**
     231 * Returns an array of [ tag_slug => translated_tag_name] tags for translation within JS
     232 */
     233function wporg_themes_get_tag_translations() {
     234    $translations = array();
     235    foreach ( wporg_themes_get_feature_list() as $group => $tags ) {
     236        $translations = array_merge( $translations, $tags );
     237    }
     238    return $translations;
     239}
Note: See TracChangeset for help on using the changeset viewer.