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.2

apply_filters('wp_update_term_parent') is found 1 times:

  • /wp-includes/taxonomy.php line 3300
    3296
    3297
    3298
    3299
    3300
    3301
    3302
    3303
    3304
    3305
    3306
    * @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.