[wp-trac] [WordPress Trac] #38280: Make term count for a specific object type available

WordPress Trac noreply at wordpress.org
Fri Jun 15 01:40:39 UTC 2018


#38280: Make term count for a specific object type available
--------------------------------------+------------------------------
 Reporter:  desrosj                   |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Taxonomy                  |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------

Comment (by ivankristianto):

 @desrosj
 Thank you for catch that error.
 since we need to pass {{{term_taxonomy_id}}} for
 {{{wp_update_term_count_now}}}
 You need to convert {{term_id}}} in this line:  \\

 {{{if ( wp_update_term_count_now( array( $term_id ), $taxonomy ) ) {}}}

 \\
 Because it will count different terms if the {{{term_id}}} is not equal
 {{{term_taxonomy_id}}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38280#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list