Make WordPress Core

Ticket #11009: 11009.diff

File 11009.diff, 1.2 KB (added by nacin, 11 years ago)
  • wp-admin/includes/plugin-install.php

     
    304304function install_plugin_information() {
    305305        global $tab;
    306306
    307         $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl() ) );
     307        $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ) ) );
    308308
    309309        if ( is_wp_error($api) )
    310310                wp_die($api);
     
    327327                'other_notes'  => _x('Other Notes',  'Plugin installer section title')
    328328        );
    329329
     330        $api->sections = (array) $api->sections;
     331        if ( is_ssl() || true )
     332                $api->sections['screenshots'] = $api->sections['screenshots_ssl'];
     333        unset( $api->sections['screenshots_ssl'] );
     334
    330335        //Sanitize HTML
    331         foreach ( (array)$api->sections as $section_name => $content )
     336        foreach ( $api->sections as $section_name => $content )
    332337                $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags);
    333338        foreach ( array( 'version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug' ) as $key ) {
    334339                if ( isset( $api->$key ) )