Making WordPress.org

Changeset 14241


Ignore:
Timestamp:
12/05/2024 07:45:33 AM (15 months ago)
Author:
dd32
Message:

Plugin Directory: Release Confirmation: Allow a plugin reviewer to undo a release discard state.

This was previously added in [14218] but this file was missed, so no button was present.

Fixes #7708.

File:
1 edited

Legend:

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

    r14119 r14241  
    281281                );
    282282            }
     283        } elseif (
     284            $data['discarded'] &&
     285            current_user_can( 'plugin_review' ) &&
     286            ( time() - $data['discarded']['time'] ) < 2 * DAY_IN_SECONDS
     287        ) {
     288            // Plugin reviewers can undo a discard within 48hrs.
     289            $buttons[] = sprintf(
     290                '<a href="%s" class="button undo-discard button-secondary">%s</a>',
     291                Template::get_release_confirmation_link( $data['tag'], $plugin, 'undo-discard' ),
     292                __( 'Undo Discard', 'wporg-plugins' )
     293            );
    283294        }
    284295
Note: See TracChangeset for help on using the changeset viewer.