Filters the array of categories to return for a post.
$categories, $post_id
Sortie :
@param WP_Term[] $categories An array of categories to return for the post. @param int|false $post_id The post ID.
// Modifier la valeur avec le filtre 'get_the_categories'
add_filter('get_the_categories', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($categories) {
// Modifier la valeur
return $categories;
}
Chargement des actualités...