On term.php, use $taxnow when fetching currently edited term.

[36874] changed the `get_term()` call so that no `$taxonomy` parameter
was passed, as 4.4 made the parameter optional. This change made it
impossible to access a shared term that has not yet been splitr, since
passing an ambiguous `$term_id` to `get_term()` results in an error.
Restoring the `$taxonomy` parameter fixes the regression.

Props alleynoah, dlh.
Fixes #37205.

git-svn-id: https://develop.svn.wordpress.org/trunk@38069 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges 2016-07-16 18:36:15 +00:00
parent be12798c9a
commit a33080dbf5

View File

@ -20,7 +20,7 @@ if ( empty( $_REQUEST['tag_ID'] ) ) {
}
$tag_ID = absint( $_REQUEST['tag_ID'] );
$tag = get_term( $tag_ID, '', OBJECT, 'edit' );
$tag = get_term( $tag_ID, $taxnow, OBJECT, 'edit' );
if ( ! $tag instanceof WP_Term ) {
wp_die( __( 'You attempted to edit an item that doesn’t exist. Perhaps it was deleted?' ) );