Make WordPress Core


Ignore:
Timestamp:
09/24/2010 03:28:28 PM (14 years ago)
Author:
ryan
Message:

get_theme_feature_list() replaces install_themes_feature_list(). Does translation and works if feature_list is not accessible from api.wordpress.org. see #14936

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/theme-install.php

    r15519 r15655  
    7070 *
    7171 * @since 2.8.0
     72 *
     73 * @deprecated since 3.1.0  Use get_theme_feature_list() instead.
    7274 *
    7375 * @return array
     
    125127<p class="install-help"><?php _e('Find a theme based on specific features') ?></p>
    126128    <?php
    127     $feature_list = install_themes_feature_list( );
     129    $feature_list = get_theme_feature_list( );
    128130    echo '<div class="feature-filter">';
    129     $trans = array ('Colors' => __('Colors'), 'black' => __('Black'), 'blue' => __('Blue'), 'brown' => __('Brown'),
    130         'green' => __('Green'), 'orange' => __('Orange'), 'pink' => __('Pink'), 'purple' => __('Purple'), 'red' => __('Red'),
    131         'silver' => __('Silver'), 'tan' => __('Tan'), 'white' => __('White'), 'yellow' => __('Yellow'), 'dark' => __('Dark'),
    132         'light' => __('Light'), 'Columns' => __('Columns'), 'one-column' => __('One Column'), 'two-columns' => __('Two Columns'),
    133         'three-columns' => __('Three Columns'), 'four-columns' => __('Four Columns'), 'left-sidebar' => __('Left Sidebar'),
    134         'right-sidebar' => __('Right Sidebar'), 'Width' => __('Width'), 'fixed-width' => __('Fixed Width'), 'flexible-width' => __('Flexible Width'),
    135         'Features' => __('Features'), 'custom-colors' => __('Custom Colors'), 'custom-header' => __('Custom Header'), 'theme-options' => __('Theme Options'),
    136         'threaded-comments' => __('Threaded Comments'), 'sticky-post' => __('Sticky Post'), 'microformats' => __('Microformats'),
    137         'Subject' => __('Subject'), 'holiday' => __('Holiday'), 'photoblogging' => __('Photoblogging'), 'seasonal' => __('Seasonal'),
    138     );
    139131
    140132    foreach ( (array) $feature_list as $feature_name => $features ) {
    141         if ( isset($trans[$feature_name]) )
    142              $feature_name = $trans[$feature_name];
    143133        $feature_name = esc_html( $feature_name );
    144134        echo '<div class="feature-name">' . $feature_name . '</div>';
    145135
    146136        echo '<ol style="float: left; width: 725px;" class="feature-group">';
    147         foreach ( $features as $feature ) {
    148             $feature_name = $feature;
    149             if ( isset($trans[$feature]) )
    150                 $feature_name = $trans[$feature];
     137        foreach ( $features as $feature => $feature_name ) {
    151138            $feature_name = esc_html( $feature_name );
    152139            $feature = esc_attr($feature);
Note: See TracChangeset for help on using the changeset viewer.