Make WordPress Core

Ticket #28884: 28884.2.patch

File 28884.2.patch, 1.4 KB (added by BandonRandon, 12 years ago)

Fully removes the reviews tab

  • src/wp-admin/includes/plugin-install.php

    diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php
    index ef61aeb..6aaa898 100644
    a b function install_plugin_information() {  
    326326        $api = plugins_api( 'plugin_information', array(
    327327                'slug' => wp_unslash( $_REQUEST['plugin'] ),
    328328                'is_ssl' => is_ssl(),
    329                 'fields' => array( 'banners' => true, 'reviews' => true )
     329                'fields' => array( 'banners' => true )
    330330        ) );
    331331
    332332        if ( is_wp_error( $api ) ) {
    … … function install_plugin_information() {  
    348348                'faq'          => _x( 'FAQ',          'Plugin installer section title' ),
    349349                'screenshots'  => _x( 'Screenshots',  'Plugin installer section title' ),
    350350                'changelog'    => _x( 'Changelog',    'Plugin installer section title' ),
    351                 'reviews'      => _x( 'Reviews',      'Plugin installer section title' ),
    352351                'other_notes'  => _x( 'Other Notes',  'Plugin installer section title' )
    353352        );
    354353
    … … function install_plugin_information() {  
    398397        echo "<div id='{$_tab}-tabs' class='{$_with_banner}'>\n";
    399398
    400399        foreach ( (array) $api->sections as $section_name => $content ) {
    401                 if ( 'reviews' === $section_name && ( empty( $api->ratings ) || 0 === array_sum( (array) $api->ratings ) ) ) {
    402                         continue;
    403                 }
    404 
    405400                if ( isset( $plugins_section_titles[ $section_name ] ) ) {
    406401                        $title = $plugins_section_titles[ $section_name ];
    407402                } else {