[wp-trac] [WordPress Trac] #44707: The user should be able to create additional requests when previous duplicates are complete or archived

WordPress Trac noreply at wordpress.org
Wed Aug 8 01:38:36 UTC 2018


#44707: The user should be able to create additional requests when previous
duplicates are complete or archived
-------------------------------------------------+-------------------------
 Reporter:  garrett-eclipse                      |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Privacy                              |     Version:  4.9.6
 Severity:  normal                               |  Resolution:
 Keywords:  needs-refresh reporter-feedback      |     Focuses:  privacy
  needs-unit-tests                               |
-------------------------------------------------+-------------------------
Changes (by garrett-eclipse):

 * keywords:   => needs-refresh reporter-feedback needs-unit-tests


Comment:

 Thanks @cc0a

 I took a look at your patch and it's currently invalid as neither
 request_pending or request_confirmed are WP_Query arguments. You'll want
 to restore the title argument as it was before and instead update the
 `post_status` from 'any' to be an array of the two suggested stati.

 Something more like this;
 {{{#!php
 <?php
 // Check for duplicates.
 $requests_query = new WP_Query( array(
         'post_type'     => 'user_request',
         'post_name__in' => array( $action_name ),  // Action name stored
 in post_name column.
         'title'         => $email_address, // Email address stored in
 post_title column.
         'post_status'   => array( 'request_pending', 'request_confirmed'
 ),
         'fields'        => 'ids',
 ) );
 }}}

 Hope that clarifies,
 Thanks

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44707#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list