Making WordPress.org


Ignore:
Timestamp:
12/08/2023 03:47:14 AM (10 months ago)
Author:
dd32
Message:

Plugin Directory: Record the reason a plugin is rejected.

See #5653.
Closes https://github.com/WordPress/wordpress.org/pull/107.

File:
1 edited

Legend:

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

    r13024 r13033  
    475475        }
    476476
    477         if ( 'disabled' == $post->post_status && 'disabled' != $post_status ) {
     477        if ( 'disabled' == $post->post_status ) {
    478478            $post_states['disabled'] = _x( 'Disabled', 'plugin status', 'wporg-plugins' );
    479479            // Affix the reason it's disabled.
     
    483483            }
    484484        }
    485         if ( 'closed' == $post->post_status && 'closed' != $post_status ) {
     485
     486        if ( 'closed' == $post->post_status ) {
    486487            $post_states['closed'] = _x( 'Closed', 'plugin status', 'wporg-plugins' );
    487488            // Affix the reason it's closed.
     
    491492            }
    492493        }
    493         if ( 'rejected' == $post->post_status && 'rejected' != $post_status ) {
     494
     495        if ( 'rejected' == $post->post_status ) {
    494496            $post_states['rejected'] = _x( 'Rejected', 'plugin status', 'wporg-plugins' );
     497
     498            if ( $post->_rejection_reason ) {
     499                $post_states['reason'] = Template::get_rejection_reasons()[ $post->_rejection_reason ] ?? '';
     500            }
     501
    495502        }
    496503        if ( 'approved' == $post->post_status && 'approved' != $post_status ) {
Note: See TracChangeset for help on using the changeset viewer.