Ticket #16580: 16580.diff
| File 16580.diff, 3.2 KB (added by dd32, 17 months ago) |
|---|
-
wp-admin/includes/plugin-install.php
250 250 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 251 251 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 252 252 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); 253 254 $aplugins_section_titles = array( 255 'description' => _x('Description', 'Plugin installer section title'), 256 'installation' => _x('Installation', 'Plugin installer section title'), 257 'faq' => _x('FAQ', 'Plugin installer section title'), 258 'screenshots' => _x('Screenshots', 'Plugin installer section title'), 259 'changelog' => _x('Changelog', 'Plugin installer section title'), 260 'other_notes' => _x('Other Notes', 'Plugin installer section title') 261 ); 262 263 253 264 //Sanitize HTML 254 265 foreach ( (array)$api->sections as $section_name => $content ) 255 266 $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); … … 267 278 echo "<ul id='sidemenu'>\n"; 268 279 foreach ( (array)$api->sections as $section_name => $content ) { 269 280 270 $title = $section_name; 271 $title = ucwords(str_replace('_', ' ', $title)); 281 if ( isset( $plugins_section_titles[ $section_name ] ) ) 282 $title = $plugins_section_titles[ $section_name ]; 283 else 284 $title = ucwords(str_replace('_', ' ', $section_name)); 272 285 273 286 $class = ( $section_name == $section ) ? ' class="current"' : ''; 274 287 $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); 275 288 $href = esc_url($href); 276 $san_ title = esc_attr(sanitize_title_with_dashes($title));277 echo "\t<li><a name='$san_ title' target='' href='$href'$class>$title</a></li>\n";289 $san_section = esc_attr($section_name); 290 echo "\t<li><a name='$san_section' target='' href='$href'$class>$title</a></li>\n"; 278 291 } 279 292 echo "</ul>\n"; 280 293 echo "</div>\n"; … … 346 359 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>'; 347 360 348 361 foreach ( (array)$api->sections as $section_name => $content ) { 349 $title = $section_name;350 $title[0] = strtoupper($title[0]);351 $title = str_replace('_', ' ', $title);352 362 363 if ( isset( $plugins_section_titles[ $section_name ] ) ) 364 $title = $plugins_section_titles[ $section_name ]; 365 else 366 $title = ucwords(str_replace('_', ' ', $section_name)); 367 353 368 $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); 354 369 $content = links_add_target($content, '_blank'); 355 370 356 $san_ title = esc_attr(sanitize_title_with_dashes($title));371 $san_section = esc_attr($section_name); 357 372 358 373 $display = ( $section_name == $section ) ? 'block' : 'none'; 359 374 360 echo "\t<div id='section-{$san_ title}' class='section' style='display: {$display};'>\n";375 echo "\t<div id='section-{$san_section}' class='section' style='display: {$display};'>\n"; 361 376 echo "\t\t<h2 class='long-header'>$title</h2>"; 362 377 echo $content; 363 378 echo "\t</div>\n";
