Making WordPress.org


Ignore:
Timestamp:
12/08/2017 05:33:42 PM (9 years ago)
Author:
obenland
Message:

Plugins: Don't show banner for closed plugins.

See #3310.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r6230 r6250  
    347347
    348348        /**
    349          * Retrieve the Plugin Icon details for a plugin.
     349         * Retrieve the Plugin banner details for a plugin.
    350350         *
    351351         * @static
     
    435435        public static function get_plugin_banner( $post = null, $output = 'raw' ) {
    436436                $plugin = get_post( $post );
     437
     438                if ( in_array( $plugin->post_status, ['disabled', 'closed'], true ) ) {
     439                        return false;
     440                }
    437441
    438442                $banner      = $banner_2x = false;
     
    690694                $close_reasons = self::get_close_reasons();
    691695                $close_reason  = (string) get_post_meta( $post->ID, '_close_reason', true );
    692                
     696
    693697                if ( isset( $close_reasons[ $close_reason ] ) ) {
    694698                        $reason_label = $close_reasons[ $close_reason ];
Note: See TracChangeset for help on using the changeset viewer.