Making WordPress.org


Ignore:
Timestamp:
08/28/2020 06:14:41 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Release Confirmation: Fix the pending confirmation message on individual plugins, and ensure that the approval text is correct.

See #5352.

File:
1 edited

Legend:

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

    r10214 r10219  
    268268    }
    269269
    270     $confirmations_required = $plugin->release_confirmation;
    271     $releases               = Plugin_Directory::get_releases( $plugin ) ?: [];
    272     $unconfirmed_releases   = wp_list_filter( $confirmed_releases, [ 'confirmed' => false ] );
    273 
    274     if ( ! $unconfirmed_releases ) {
     270    $releases = Plugin_Directory::get_releases( $plugin ) ?: [];
     271    $warning  = false;
     272
     273    foreach ( $releases as $release ) {
     274        if ( ! $release['confirmed'] && $release['confirmations_required'] ) {
     275            $warning = true;
     276        }
     277    }
     278
     279    if ( ! $warning ) {
    275280        return;
    276281    }
Note: See TracChangeset for help on using the changeset viewer.