Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4114 closed defect (bug) (fixed)

getCategoryList should not include tag names

Reported by: redsweater Owned by:
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.2
Component: XML-RPC Keywords:
Focuses: Cc:


The getCategoryList implementation currently returns a list of all categories from the database, including those that are actually tag names. My understanding is that storage of tag names in the categories table is an implementation detail. The tag items should be filtered from the list that is returned by getCategoryList().

Attachments (1)

xmlrpc.php.diff (950 bytes) - added by redsweater 7 years ago.
Patch to exclude non-category taxonomies from the getCategoryList function.

Download all attachments as: .zip

Change History (5)

redsweater7 years ago

Patch to exclude non-category taxonomies from the getCategoryList function.

comment:1 redsweater7 years ago

Attaching patch xmlrpc.php.diff, with a change to exclude any categories whose type bitfield does not contain TAXONOMY_CATEGORY.

comment:2 ryan7 years ago

You can do the check directly in the query.

WHERE (type & " . TAXONOMY_CATEGORY . " != 0)

comment:3 rob1n7 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5215]) Don't show categories in getCategoryList. fixes #4114

comment:4 rob1n7 years ago

Whoops, that changeset should be "Don't show tags" not "Don't show categories."

Note: See TracTickets for help on using tickets.