Making WordPress.org

Changeset 3038


Ignore:
Timestamp:
04/28/2016 06:36:27 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Make sure approved plugins stay approved on update.

Makes sure the status dropdown is populated with the right statuses.
Otherwise an approved plugin would be published after updating the post.

See #1570, [3036].

File:
1 edited

Legend:

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

    r3036 r3038  
    4343        $statuses = array( 'draft', 'pending' );
    4444        if ( current_user_can( 'plugin_approve', $post ) ) {
    45             if ( in_array( $post->post_status, array( 'draft', 'pending', 'rejected' ) ) ) {
     45            if ( in_array( $post->post_status, array( 'draft', 'pending', 'rejected', 'approved' ) ) ) {
    4646                $statuses = array_merge( $statuses, array( 'approved', 'rejected' ) );
    4747            } else {
Note: See TracChangeset for help on using the changeset viewer.