Making WordPress.org

Changeset 12597


Ignore:
Timestamp:
05/19/2023 06:05:17 AM (3 years ago)
Author:
dd32
Message:

Plugin Directory: Review: Change the first action from 'Mark as Pending' to 'Mark as Pending & Assign Review' to self-assign and mark it as needing dev-feedback in one go.

Fixes #6993.

File:
1 edited

Legend:

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

    r9591 r12597  
    5454                                $label = __( 'Reject', 'wporg-plugins' );
    5555                                break;
    56                         case 'pending':
    57                                 $label = __( 'Mark as Pending', 'wporg-plugins' );
    58                                 break;
    5956                        case 'publish':
    6057                                $label = __( 'Open', 'wporg-plugins' );
    … …  
    6663                                $label = __( 'Close', 'wporg-plugins' );
    6764                                break;
     65                        case 'pending':
    6866                        default:
    6967                                $label = __( 'Mark as Pending', 'wporg-plugins' );
    … …  
    137135                        <?php endif; ?>
    138136
    139                         <?php foreach ( $statuses as $status ) : ?>
     137                        <?php foreach ( $statuses as $status ) {
     138                                echo '<p>';
    140139
    141                                 <p><button type="submit" name="post_status" value="<?php echo esc_attr( $status ); ?>" class="button set-plugin-status">
    142                                         <?php echo self::get_status_button_label( $status ); ?>
    143                                 </button></p>
     140                                if ( 'pending' === $status && ! $post->assigned_reviewer ) {
     141                                        printf(
     142                                                '<p class="pending-assign"><button onclick="%s" type="submit" name="post_status" value="%s" class="button set-plugin-status button-primary">%s</button></p>',
     143                                                esc_attr( "document.getElementById('assigned_reviewer').value = userSettings.uid" ),
     144                                                esc_attr( $status ),
     145                                                esc_attr__( 'Mark as Pending & Assign Review', 'wporg-plugins' ),
     146                                        );
     147                                }
    144148
    145                         <?php endforeach; ?>
     149                                printf(
     150                                        '<button type="submit" name="post_status" value="%s" class="button set-plugin-status">%s</button>',
     151                                        esc_attr( $status ),
     152                                        self::get_status_button_label( $status )
     153                                );
     154
     155                                echo '</p>';
     156
     157                        } ?>
    146158                </div><!-- .misc-pub-section -->
    147159                <?php
Note: See TracChangeset for help on using the changeset viewer.