WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/13/2014 02:30:24 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Plugin install: Make plugin groups translatable.

props ocean90 for initial patch.
fixes #29092.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r29455 r29477  
    323323        );
    324324
     325        $plugins_group_titles = array(
     326            'Performance' => _x( 'Performance', 'Plugin installer group title' ),
     327            'Social'      => _x( 'Social',      'Plugin installer group title' ),
     328            'Tools'       => _x( 'Tools',       'Plugin installer group title' ),
     329        );
     330
    325331        list( $columns, $hidden ) = $this->get_column_info();
    326332
     
    340346            if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
    341347                if ( isset( $this->groups[ $plugin['group'] ] ) ) {
    342                     $group_name = translate( $this->groups[ $plugin['group'] ] ); // Does this need context?
     348                    $group_name = $this->groups[ $plugin['group'] ];
     349                    if ( isset( $plugins_group_titles[ $group_name ] ) ) {
     350                        $group_name = $plugins_group_titles[ $group_name ];
     351                    }
    343352                } else {
    344353                    $group_name = $plugin['group'];
Note: See TracChangeset for help on using the changeset viewer.