[wp-trac] [WordPress Trac] #37406: Add ability to specify post_type in post_exists function - post.php

WordPress Trac noreply at wordpress.org
Sun Sep 17 16:33:41 UTC 2017


#37406: Add ability to specify post_type in post_exists function - post.php
--------------------------------------+------------------------------
 Reporter:  sgarza                    |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Posts, Post Types         |     Version:  4.5.3
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by birgire):

 I wonder if this check:


 {{{
 if ( !empty ( $type ) && post_type_exists( $type ) ) {
     $query .= ' AND post_type = %s';
     $args[] = $post_type;
 }
 }}}

 should be applied in [attachment:37406.patch], to make sure the post type
 exists?

 But it feels unnecessary...

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


More information about the wp-trac mailing list