Taxonomy: Initialize `$noparents` variable in `wp_ajax_add_tag()` to avoid a notice with `compact()` in PHP 7.3.
Props pilou69. Fixes #46670. git-svn-id: https://develop.svn.wordpress.org/trunk@45034 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
432d968df6
commit
b2f0f4d2db
|
@ -1028,6 +1028,8 @@ function wp_ajax_add_tag() {
|
||||||
$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
|
$wp_list_table = _get_list_table( 'WP_Terms_List_Table', array( 'screen' => $_POST['screen'] ) );
|
||||||
|
|
||||||
$level = 0;
|
$level = 0;
|
||||||
|
$noparents = '';
|
||||||
|
|
||||||
if ( is_taxonomy_hierarchical( $taxonomy ) ) {
|
if ( is_taxonomy_hierarchical( $taxonomy ) ) {
|
||||||
$level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
|
$level = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
Loading…
Reference in New Issue