Making WordPress.org

Changeset 12788


Ignore:
Timestamp:
08/01/2023 10:46:33 PM (3 years ago)
Author:
coffee2code
Message:

Photo Directory, Rejection: Use class variable for rejection form action name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/rejection.php

    r12786 r12788  
    1515         * @var string
    1616         */
    17         public static $action = 'reject-photo';
     17        public static $action = 'reject';
    1818
    1919        /**
     
    537537
    538538                // Bail if expected data isn't present.
    539                 if ( empty( $_POST['reject'] ) || empty( $_POST[ $nonce_field ] ) || empty( $_POST['post_type'] ) || empty( $_POST['post_ID'] ) ) {
     539                if ( empty( $_POST[ self::$action ] ) || empty( $_POST[ $nonce_field ] ) || empty( $_POST['post_type'] ) || empty( $_POST['post_ID'] ) ) {
    540540                        return;
    541541                }
     
    880880                printf( '<div class="reject-action%s">', $is_rejected ? ' post-is-rejected' : '' );
    881881                printf(
    882                         '<input type="submit" name="reject" id="reject-post" value="%s" class="button button-large">',
     882                        '<input type="submit" name="%s" id="reject-post" value="%s" class="button button-large">',
     883                        self::$action,
    883884                        $is_rejected ? esc_attr__( 'Update', 'wporg-photos' ) : esc_attr__( 'Reject', 'wporg-photos' )
    884885                );
Note: See TracChangeset for help on using the changeset viewer.