#17320 closed enhancement (fixed)
has_post_format() should accept an array
| Reported by: | janfabry | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Taxonomy | Version: | 3.2 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
has_category(), has_tag(), and has_term() accept an array as the first argument and return true if the post has any of the given terms. has_post_format() also uses has_term() in the background, but it calls sanitize_key() and adds 'post-format-' to the passed format, which will fail when you pass an array.
For consistency, it would be better if has_post_format() would also accept an array.
Attachments (3)
Change History (14)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Catch arrays, check for non-string values, add prefix & send to has_term()