WordPress.org

Making WordPress.org

Changeset 6230


Ignore:
Timestamp:
12/04/17 17:17:46 (2 weeks ago)
Author:
SergeyBiryukov
Message:

Plugin Directory: Show an auto-generated icon for closed plugins instead of an empty block, to preserve consistent layout.

See #2627.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

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

    r6162 r6230  
    360360 
    361361        $icon = $icon_2x = $svg = $generated = false; 
     362 
    362363        foreach ( $raw_icons as $file => $info ) { 
    363364            switch ( $info['resolution'] ) { 
     
    387388        } 
    388389 
    389         if ( ! $icon ) { 
     390        if ( ! $icon || 'publish' !== $plugin->post_status ) { 
    390391            $generated = true; 
    391392 
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r6225 r6230  
    6060                    default: 
    6161                    case 'closed': 
    62                         $message        = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ); 
     62                        $message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ); 
    6363                        break; 
    6464                } 
     
    8484 
    8585        <div class="entry-thumbnail"> 
    86             <?php 
    87             // Don't show the icon for closed plugins 
    88             if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) { 
    89                 echo Template::get_plugin_icon( get_post(), 'html' ); 
    90             } 
    91             ?> 
     86            <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?> 
    9287        </div> 
    9388 
Note: See TracChangeset for help on using the changeset viewer.