Making WordPress.org


Ignore:
Timestamp:
12/03/2017 06:01:03 PM (7 years ago)
Author:
Otto42
Message:

Plugins: Add display of closed date on closed plugins. props @joostdevalk. See #2860

File:
1 edited

Legend:

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

    r6118 r6212  
    5555                    default:
    5656                    case 'closed':
    57                         $message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' );
     57                        $message        = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' );
    5858                        break;
    5959                }
     60
     61            if ( in_array( $status, array( 'closed', 'disabled' ) ) ) {
     62                $closed_date    = get_post_meta( get_the_ID(), 'plugin_closed_date', true );
     63                if ( ! empty( $closed_date ) ) {
     64                    $message .= '<br/>';
     65                    $message .= sprintf( __( 'This plugin was closed on %s.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
     66                }
     67            }
    6068            ?>
    6169            <div class="plugin-notice notice <?php echo esc_attr( $notice_type ); ?> notice-alt">
Note: See TracChangeset for help on using the changeset viewer.