Fire an action when a post type or taxonomy is registered so plugins can react. Fixes #18802 props simonwheatley.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb3ab86c7c
commit
b5a3362c70
|
@ -1037,6 +1037,8 @@ function register_post_type($post_type, $args = array()) {
|
||||||
register_taxonomy_for_object_type( $taxonomy, $post_type );
|
register_taxonomy_for_object_type( $taxonomy, $post_type );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_action( 'registered_post_type', $post_type, $args );
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -363,6 +363,8 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||||
|
|
||||||
// register callback handling for metabox
|
// register callback handling for metabox
|
||||||
add_filter('wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term');
|
add_filter('wp_ajax_add-' . $taxonomy, '_wp_ajax_add_hierarchical_term');
|
||||||
|
|
||||||
|
do_action( 'registered_taxonomy', $taxonomy, $object_type, $args );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue