WordPress.org

Make WordPress Core

Ticket #25217: 25217.patch

File 25217.patch, 1.0 KB (added by SergeyBiryukov, 8 years ago)
  • src/wp-admin/includes/plugin-install.php

     
    296296                        $api->$key = wp_kses( $api->$key, $plugins_allowedtags );
    297297        }
    298298
    299         $section = isset($_REQUEST['section']) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
    300         if ( empty($section) || ! isset($api->sections[ $section ]) )
    301                 $section = array_shift( $section_titles = array_keys((array)$api->sections) );
     299        $section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
     300        if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
     301                $section_titles = array_keys( (array) $api->sections );
     302                $section = array_shift( $section_titles );
     303        }
    302304
    303305        iframe_header( __('Plugin Install') );
    304306        echo "<div id='$tab-header'>\n";