mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-08 16:41:44 +01:00
Plugin install: Make plugin groups translatable.
props ocean90 for initial patch. fixes #29092. Built from https://develop.svn.wordpress.org/trunk@29477 git-svn-id: http://core.svn.wordpress.org/trunk@29255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a18c1f29a2
commit
aed71de2d6
@ -322,6 +322,12 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
|
'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$plugins_group_titles = array(
|
||||||
|
'Performance' => _x( 'Performance', 'Plugin installer group title' ),
|
||||||
|
'Social' => _x( 'Social', 'Plugin installer group title' ),
|
||||||
|
'Tools' => _x( 'Tools', 'Plugin installer group title' ),
|
||||||
|
);
|
||||||
|
|
||||||
list( $columns, $hidden ) = $this->get_column_info();
|
list( $columns, $hidden ) = $this->get_column_info();
|
||||||
|
|
||||||
$style = array();
|
$style = array();
|
||||||
@ -339,7 +345,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
|
|||||||
// Display the group heading if there is one
|
// Display the group heading if there is one
|
||||||
if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
|
if ( isset( $plugin['group'] ) && $plugin['group'] != $group ) {
|
||||||
if ( isset( $this->groups[ $plugin['group'] ] ) ) {
|
if ( isset( $this->groups[ $plugin['group'] ] ) ) {
|
||||||
$group_name = translate( $this->groups[ $plugin['group'] ] ); // Does this need context?
|
$group_name = $this->groups[ $plugin['group'] ];
|
||||||
|
if ( isset( $plugins_group_titles[ $group_name ] ) ) {
|
||||||
|
$group_name = $plugins_group_titles[ $group_name ];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$group_name = $plugin['group'];
|
$group_name = $plugin['group'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user