From 3928e40daf451fab5ebb4f71601edf00205aa23b Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 8 Jan 2012 05:39:49 +0000 Subject: [PATCH] s/Faq/FAQ/ for Plugin Installer tabs, Gains Translation support for Tabs/Titles as well. Fixes #16580 git-svn-id: http://svn.automattic.com/wordpress/trunk@19708 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin-install.php | 33 ++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 800823d8b..9c8e536f8 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -250,6 +250,17 @@ function install_plugin_information() { 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); + + $plugins_section_titles = array( + 'description' => _x('Description', 'Plugin installer section title'), + 'installation' => _x('Installation', 'Plugin installer section title'), + 'faq' => _x('FAQ', 'Plugin installer section title'), + 'screenshots' => _x('Screenshots', 'Plugin installer section title'), + 'changelog' => _x('Changelog', 'Plugin installer section title'), + 'other_notes' => _x('Other Notes', 'Plugin installer section title') + ); + + //Sanitize HTML foreach ( (array)$api->sections as $section_name => $content ) $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); @@ -267,14 +278,16 @@ function install_plugin_information() { echo "\n"; echo "\n"; @@ -346,18 +359,20 @@ function install_plugin_information() { echo '

' . __('Warning: This plugin has not been marked as compatible with your version of WordPress.') . '

'; foreach ( (array)$api->sections as $section_name => $content ) { - $title = $section_name; - $title[0] = strtoupper($title[0]); - $title = str_replace('_', ' ', $title); + + if ( isset( $plugins_section_titles[ $section_name ] ) ) + $title = $plugins_section_titles[ $section_name ]; + else + $title = ucwords( str_replace( '_', ' ', $section_name ) ); $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); $content = links_add_target($content, '_blank'); - $san_title = esc_attr(sanitize_title_with_dashes($title)); + $san_section = esc_attr( $section_name ); $display = ( $section_name == $section ) ? 'block' : 'none'; - echo "\t
\n"; + echo "\t
\n"; echo "\t\t

$title

"; echo $content; echo "\t
\n";