Ticket #34052: plugin-install.php.patch
File plugin-install.php.patch, 1.9 KB (added by , 9 years ago) |
---|
-
wp-admin/includes/plugin-install.php
391 391 'other_notes' => _x( 'Other Notes', 'Plugin installer section title' ) 392 392 ); 393 393 394 $api->sections = (array) $api->sections; 395 394 396 // Sanitize HTML 395 foreach ( (array)$api->sections as $section_name => $content ) {397 foreach ( $api->sections as $section_name => $content ) { 396 398 $api->sections[$section_name] = wp_kses( $content, $plugins_allowedtags ); 397 399 } 398 400 … … 406 408 407 409 $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; // Default to the Description tab, Do not translate, API returns English. 408 410 if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) { 409 $section_titles = array_keys( (array)$api->sections );411 $section_titles = array_keys( $api->sections ); 410 412 $section = reset( $section_titles ); 411 413 } 412 414 … … 436 438 echo "<div id='{$_tab}-title' class='{$_with_banner}'><div class='vignette'></div><h2>{$api->name}</h2></div>"; 437 439 echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n"; 438 440 439 foreach ( (array)$api->sections as $section_name => $content ) {441 foreach ( $api->sections as $section_name => $content ) { 440 442 if ( 'reviews' === $section_name && ( empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings ) ) ) { 441 443 continue; 442 444 } … … 546 548 echo '<div class="notice notice-warning"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>'; 547 549 } 548 550 549 foreach ( (array)$api->sections as $section_name => $content ) {551 foreach ( $api->sections as $section_name => $content ) { 550 552 $content = links_add_base_url( $content, 'https://wordpress.org/plugins/' . $api->slug . '/' ); 551 553 $content = links_add_target( $content, '_blank' ); 552 554