wp_update_term_parent

FILTER wp-includes\taxonomy.php (ligne 3317) github
Filters the term parent. Hook to this filter to see if it will cause a hierarchy loop.

Paramètres

Entrée :
$args['parent'], $term_id, $taxonomy, $parsed_args, $args
Sortie :
@param int    $parent_term ID of the parent term.
@param int    $term_id     Term ID.
@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().

Utilisation

// Modifier la valeur avec le filtre 'wp_update_term_parent'
add_filter('wp_update_term_parent', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($args['parent']) {
    // Modifier la valeur
    return $args['parent'];
}

Actualités

Chargement des actualités...