[wp-trac] [WordPress Trac] #39969: add filter to end of post_categories_meta_box()

WordPress Trac noreply at wordpress.org
Sun Feb 26 17:09:47 UTC 2017


#39969: add filter to end of post_categories_meta_box()
-------------------------+-----------------------------
 Reporter:  pbiron       |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Taxonomy     |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 I have a need to output short "instructional" text below taxonomy
 metaboxes on the post{,-new}.php screens.  This text is to help admin
 users decide when/if to assign terms to a given (custom) post.

 I currently do something similar in the featured image metabox, i.e., I
 hook into 'admin_post_thumbnail_html' (which is applied at the end of
 _wp_post_thumbnail_html()) to add text to tell admin users what image
 dimensions the featured image for a particular (custom) post should have.

 Thus, it would be helpful if there were a similar filter applied at the
 end of post_categories_meta_box().

 My current workaround is to add a

 {{{#!php
 'meta_box_cb' => 'custom_tax_meta_box'
 }}}

 to the args when I register the taxonomy, and my custom_tax_meta_box()
 function just calls post_categories_meta_box() and then adds the text.  Of
 course, this works, but is not very elegant and not very "future proof"
 (i.e., if WP core changes how taxonomy metaboxes are created them this
 workaround will break).

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


More information about the wp-trac mailing list