Avoid 'Only variables should be passed by reference' notice on plugin search. props daankortenbach. fixes #25217.

Built from https://develop.svn.wordpress.org/trunk@25210


git-svn-id: http://core.svn.wordpress.org/trunk@25182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-09-02 13:54:10 +00:00
parent eccd3e42df
commit 89aed6d7e8

View File

@ -296,9 +296,11 @@ function install_plugin_information() {
$api->$key = wp_kses( $api->$key, $plugins_allowedtags );
}
$section = isset($_REQUEST['section']) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
if ( empty($section) || ! isset($api->sections[ $section ]) )
$section = array_shift( $section_titles = array_keys((array)$api->sections) );
$section = isset( $_REQUEST['section'] ) ? wp_unslash( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English.
if ( empty( $section ) || ! isset( $api->sections[ $section ] ) ) {
$section_titles = array_keys( (array) $api->sections );
$section = array_shift( $section_titles );
}
iframe_header( __('Plugin Install') );
echo "<div id='$tab-header'>\n";