[wp-trac] [WordPress Trac] #41813: get_terms is hiding taxonomies that are not empty

WordPress Trac noreply at wordpress.org
Thu Oct 19 14:13:57 UTC 2023


#41813: get_terms is hiding taxonomies that are not empty
------------------------------+------------------------------
 Reporter:  subrataemfluence  |       Owner:  (none)
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Taxonomy          |     Version:  4.8.1
 Severity:  normal            |  Resolution:  wontfix
 Keywords:  has-patch         |     Focuses:
------------------------------+------------------------------
Changes (by ramon fincken):

 * keywords:  has-patch needs-unit-tests => has-patch
 * status:  new => closed
 * resolution:   => wontfix


Comment:

 As much as I wanted to create a patch for this, I can confirm this will
 work when using this :



 {{{#!php
 <?php
     register_taxonomy('media_content_category', array('attachment'), array
 (
         'hierarchical' => true,
         'labels' => $labels,
         'show_ui' => true,
         'show_admin_column' => true,
         'query_var' => true,
         'rewrite' => array('slug', 'content_category'),
         'update_count_callback' => '_update_generic_term_count',
     ));
 }}}

 Please note the update_count_callback as this will simply do a no-nonsence
 call for all objects with the term.

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


More information about the wp-trac mailing list