Making WordPress.org

Changeset 6539


Ignore:
Timestamp:
02/05/2018 10:43:29 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Plugin Directory: Properly reflect closed status on plugins without a description.

Fixes #3355.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r6475 r6539  
    7979
    8080            foreach ( array( 'description', 'screenshots', 'installation', 'faq', 'reviews', 'developers', 'changelog' ) as $section_slug ) :
    81                 if ( ! isset( $content[ $section_slug ] ) ) {
    82                     continue;
    83                 }
    84 
    8581                $section_content = '';
    8682
    8783                if ( 'description' === $section_slug && $is_closed ) {
    88                     // Don't show the description for closed plugins.
     84                    // Don't show the description for closed plugins, show a notice instead.
    8985                    $section_content = get_closed_plugin_notice();
    9086
    9187                } elseif ( ! in_array( $section_slug, [ 'screenshots', 'installation', 'faq', 'changelog' ], true ) || ! $is_closed ) {
    92                     $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) );
     88                    if ( isset( $content[ $section_slug ] ) ) {
     89                        $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) );
     90                    }
    9391                }
    9492
Note: See TracChangeset for help on using the changeset viewer.