From 6d6bce429de568ec934430a3f6d49f018f4356de Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 13 Aug 2014 02:30:24 +0000 Subject: [PATCH] Plugin install: Make plugin groups translatable. props ocean90 for initial patch. fixes #29092. git-svn-id: https://develop.svn.wordpress.org/trunk@29477 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-plugin-install-list-table.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php index 4ad5e1f735..38c1aad810 100644 --- a/src/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/src/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -322,6 +322,12 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { '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(); $style = array(); @@ -339,7 +345,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { // Display the group heading if there is one if ( isset( $plugin['group'] ) && $plugin['group'] != $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 { $group_name = $plugin['group']; }