wp_update_term_parent

wp_update_term_parent

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('wp_update_term_parent') is found 1 times:

  • /wp-includes/taxonomy.php line 3300
    	 * @param string $taxonomy    Taxonomy slug.
    	 * @param array  $parsed_args An array of potentially altered update arguments for the given term.
    	 * @param array  $args        Arguments passed to wp_update_term().
    	 */
    	$parent = (int) apply_filters( 'wp_update_term_parent', $args['parent'], $term_id, $taxonomy, $parsed_args, $args );
    
    	// Check for duplicate slug.
    	$duplicate = get_term_by( 'slug', $slug, $taxonomy );
    	if ( $duplicate && $duplicate->term_id !== $term_id ) {
    		/*
    		 * If an empty slug was passed or the parent changed, reset the slug to something unique.