[wp-trac] [WordPress Trac] #35146: Warnings are generated for a custom taxonomy named "terms"

WordPress Trac noreply at wordpress.org
Fri Dec 18 00:09:04 UTC 2015


#35146: Warnings are generated for a custom taxonomy named "terms"
--------------------------+-----------------------------
 Reporter:  willshouse    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.4
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 We have a custom post type for "classes" and we have been using a custom
 taxonomy for "terms" which represent something similar to a "semester" in
 the education system, although "terms" is syntactically correct for this
 use case.

 The taxonomy "terms" works fine, but it seems that somewhere
 "apply_filters" is being called for "get_terms" which then generates these
 warnings:

 PHP Warning:  Missing argument 3 for _post_format_get_terms() in
 /var/www/public_html/wp-includes/post-formats.php on line 221

 I didn't see where "terms" was listed as a 'reserved word' that should not
 be used for taxonomies on the codex - and in all other regards it seems to
 work fine - but it would be nice if this error was not thrown.

 I am attaching the sample code to create the custom taxonomy.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35146>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list