Changeset 19708
- Timestamp:
- 01/08/2012 05:39:49 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/plugin-install.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin-install.php
r19707 r19708 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 $plugins_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 ) … … 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' href='$href' $class>$title</a></li>\n"; 278 291 } 279 292 echo "</ul>\n"; … … 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); 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 ) ); 352 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;
Note: See TracChangeset
for help on using the changeset viewer.