[wp-trac] [WordPress Trac] #57131: get_the_terms(): Parameter #1 ($post) of type is nullable.

WordPress Trac noreply at wordpress.org
Thu Nov 17 04:26:34 UTC 2022


#57131: get_the_terms(): Parameter #1 ($post) of type is nullable.
-------------------------+-----------------------------
 Reporter:  omaeyusuke   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Taxonomy     |    Version:  3.6
 Severity:  normal       |   Keywords:
  Focuses:  docs         |
-------------------------+-----------------------------
 Follow-up to [24616].

 From documentation on the return value of `get_the_terms()`, and the usage
 of `get_the_category()`, it may be assumed that this function may be used
 in the following manner.

 {{{#!php
 <?php
 $term = get_the_terms( null, 'category' );
 }}}

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


More information about the wp-trac mailing list