Making WordPress.org


Ignore:
Timestamp:
05/18/2023 03:26:43 AM (17 months ago)
Author:
dd32
Message:

Plugin Directory: Clear the assigned reviewer on the appropriate status transitions (->approved and ->publish).

See #6993.

File:
1 edited

Legend:

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

    r12517 r12594  
    88use WordPressdotorg\Plugin_Directory\Email\Plugin_Approved as Plugin_Approved_Email;
    99use WordPressdotorg\Plugin_Directory\Email\Plugin_Rejected as Plugin_Rejected_Email;
     10use WordPressdotorg\Plugin_Directory\Admin\Metabox\Reviewer as Reviewer_Metabox;
    1011
    1112/**
     
    135136            case 'approved':
    136137                $this->approved( $post->ID, $post );
     138                $this->clear_reviewer( $post );
    137139                break;
    138140
    139141            case 'rejected':
    140142                $this->rejected( $post->ID, $post );
     143                $this->clear_reviewer( $post );
    141144                break;
    142145
     
    144147                $this->clean_closed_date( $post->ID );
    145148                $this->set_translation_status( $post, 'active' );
     149                $this->clear_reviewer( $post );
    146150                break;
    147151
     
    364368    }
    365369
     370    /**
     371     * Clear the assigned reviewer.
     372     *
     373     * @param \WP_Post $post Post object.
     374     */
     375    public function clear_reviewer( $post ) {
     376        // Unset the reviewer, but don't log it, as the triggering status changes should've been logged in some form.
     377        Reviewer_Metabox::set_reviewer( $post, false, false );
     378    }
    366379}
Note: See TracChangeset for help on using the changeset viewer.