WordPress.org

Make WordPress Core

Ticket #18802: new_tax_hook.diff

File new_tax_hook.diff, 458 bytes (added by simonwheatley, 3 years ago)

New hook registered_taxonomy for register_taxonomy

  • wp-includes/taxonomy.php

    diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
    index e231a6c..0d981dc 100644
    a b function register_taxonomy( $taxonomy, $object_type, $args = array() ) { 
    363363 
    364364       // register callback handling for metabox 
    365365       add_filter('wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term'); 
     366 
     367       do_action( 'registered_taxonomy', $taxonomy, $args ); 
    366368} 
    367369 
    368370/**