From bd320a99658c3dcba9d67864610d2787bd9dd019 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Thu, 17 Nov 2016 23:34:42 +0000 Subject: [PATCH] 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 --- src/wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 9ddd02c4de..72ce505fba 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -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 ); } /**