[wp-trac] [WordPress Trac] #14490: function "get cat ID" fails if category name has an apostrophe
WordPress Trac
noreply at wordpress.org
Sun Sep 25 17:08:37 UTC 2016
#14490: function "get cat ID" fails if category name has an apostrophe
-------------------------------+-----------------------
Reporter: iamronen | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Taxonomy | Version: 3.1
Severity: minor | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+-----------------------
Changes (by sologne):
* status: closed => reopened
* resolution: invalid =>
Comment:
The [comment:3 comment 3] nails it.
Using single_cat_title to retrieve the category name ; and from that the
cat_id ; is a common advice on the internet and it got me losing over an
hour to fix the issue ; with the unintuitive get_query_var from comment 3.
Worse, there is not any kind of warning in the codex for single_cat_title
that there may be such an issue.
This ticket has been closed ; but is there a good reason for get_cat_ID to
NOT support "fancy quotes" ?
Also : seems related to #24354
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14490#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list