WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#18583 closed defect (bug) (invalid)

is_post_type_archive() shouldn't return true if is_search() is true

Reported by: ocean90 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Query Keywords:
Focuses: Cc:

Description

  • Register a post type.
  • Do a search domain.com/post_type/?s=foo
  • Result: is_post_type_archive() will return true, is_archive() too.

In my opinion is_post_type_archive() shouldn't return true on a search.

Attachments (1)

18583.patch (599 bytes) - added by ocean90 3 years ago.

Download all attachments as: .zip

Change History (4)

ocean903 years ago

comment:1 scribu3 years ago

  • Keywords needs-unit-tests added

comment:2 scribu3 years ago

Also, what's the rationale?

What's the situation with ?author_name=foo&s=bar etc.?

comment:3 ocean903 years ago

  • Keywords has-patch needs-unit-tests removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Error in reasoning.

Note: See TracTickets for help on using tickets.