WordPress.org

Making WordPress.org

Changeset 10219


Ignore:
Timestamp:
08/28/2020 06:14:41 AM (4 weeks 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.

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/shortcodes/class-release-confirmation.php

    r10214 r10219  
    169169        if ( ! $data['confirmations_required'] ) {
    170170            _e( 'Release did not require confirmation.', 'wporg-plugins' );
    171         } else if ( ! $data['confirmed'] || count( $data['confirmations'] ) >= $data['confirmations_required'] ) {
     171        } else if ( $data['confirmed'] ) {
    172172            _e( 'Release confirmed.', 'wporg-plugins' );
    173173        } else if ( 1 == $data['confirmations_required'] ) {
  • 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.