Making WordPress.org


Ignore:
Timestamp:
01/30/2018 08:08:35 PM (6 years ago)
Author:
obenland
Message:

Plugins: Show updated banner based on WP versions

Props SergeyBiryukov.
Fixes #3010.

File:
1 edited

Legend:

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

    r6343 r6474  
    178178    switch ( $post_status ) {
    179179        case 'publish':
    180             if ( time() - get_post_modified_time() > 2 * YEAR_IN_SECONDS ) {
     180            $tested_up_to             = (string) get_post_meta( get_post( $post )->ID, 'tested', true );
     181            $version_to_check_against = (string) ( get_current_major_wp_version() - 0.2 );
     182            if ( version_compare( $version_to_check_against, $tested_up_to, '>' ) ) {
    181183                $message = sprintf(
    182184                    $warning_notice,
    183                     __( 'This plugin <strong>hasn&#146;t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-plugins' )
     185                    __( 'This plugin <strong>hasn&#146;t been tested with the latest 3 major releases of WordPress</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-plugins' )
    184186                );
    185187            }
Note: See TracChangeset for help on using the changeset viewer.