[wp-trac] [WordPress Trac] #34513: is_single() or is_singular() are not running filters on the queried object

WordPress Trac noreply at wordpress.org
Fri Oct 30 22:01:51 UTC 2015


#34513: is_single() or is_singular() are not running filters on the queried object
--------------------------+------------------------------
 Reporter:  LindsayBSC    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  4.3.1
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------

Comment (by LindsayBSC):

 Are you certain that this is the main  purpose of the function? Most other
 conditionals check if you are on that page AND the query is the query for
 the conditional. For instance, the codex says: "If the $post_types
 parameter is specified, the function will ''additionally check if the
 query is for one of the post types specified.''" (similarly stated on the
 developer.wordpress.org record)

 Every single documentation for the conditionals says it will also check if
 the query is also for what is specified (it makes sense to). If this is
 not how is_single() or is_singular() is meant to work, then I see some
 disparity between them and all of the other conditionals.

 \* also yes, my loop I was trying to add the filter to is the main loop.
 As I said, it did the same thing on a vanilla install.

 How is this already resolved?

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


More information about the wp-trac mailing list