Taxonomy: Update `register_taxonomy` hook to use `WP_Taxonomy` object.

Casts `WP_Taxonomy` to an array for passing to the `register_taxonomy` hook. This maintains backward compatibility with the processed arguments used prior to WordPress 4.7.

Fixes #38765.


git-svn-id: https://develop.svn.wordpress.org/trunk@39283 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Wilson 2016-11-17 23:34:42 +00:00
parent bbd3e0174e
commit bd320a9965
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
* @param array|string $object_type Object type or array of object types.
* @param array $args Array of taxonomy registration arguments.
*/
do_action( 'registered_taxonomy', $taxonomy, $object_type, $args );
do_action( 'registered_taxonomy', $taxonomy, $object_type, (array) $taxonomy_object );
}
/**