Making WordPress.org

Changeset 13871

Timestamp:
07/03/2024 03:58:32 AM (5 weeks ago)
Author:
dd32
Message:

Plugin Directory: Allow reviewers to remove themselves from a plugin, even if it leaves no committers. Likewise, allow them to remove committers from closed plugins.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-committers.php

    r12325 r13871  
    162162        // Check if the committer for this row is removable.
    163163        $post_id = get_post()->ID;
    164         if ( current_user_can( 'plugin_remove_committer', $post_id ) && $user_object->ID != get_current_user_id() ) {
     164        if ( current_user_can( 'plugin_remove_committer', $post_id ) ) {
    165165            $actions['delete'] = "<a class='submitremove' data-wp-lists='delete:the-committer-list:committer-{$user_object->ID}:faafaa:post_id={$post_id}' href='" . wp_nonce_url( 'users.php?action=remove&amp;committer=' . $user_object->ID, "remove-committer-{$user_object->ID}" ) . "'>" . __( 'Remove', 'wporg-plugins' ) . '</a>';
    166166        }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-committers.php

    r12838 r13871  
    9999        check_ajax_referer( "remove-committer-$id" );
    100100
    101         if ( ! current_user_can( 'plugin_remove_committer', $post_id ) || 'publish' !== get_post_status( $post_id ) ) {
     101        if ( ! current_user_can( 'plugin_remove_committer', $post_id ) ) {
    102102            wp_die( -1 );
    103103        }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-committers.php

    r12164 r13871  
    142142
    143143        // Prevent a committer removing themselves, if they're the only committer.
    144         if ( $user->user_login == wp_get_current_user()->user_login ) {
     144        if ( $user->user_login == wp_get_current_user()->user_login ) {
    145145            $committers = Tools::get_plugin_committers( $plugin_slug );
    146146            if ( count( $committers ) == 1 && in_array( $user->user_login, $committers ) ) {
Note: See TracChangeset for help on using the changeset viewer.