Filters the shortlink for a post.
$shortlink, $id, $context, $allow_slugs
Sortie :
@param string $shortlink Shortlink URL. @param int $id Post ID, or 0 for the current post. @param string $context The context for the link. One of 'post' or 'query', @param bool $allow_slugs Whether to allow post slugs in the shortlink. Not used by default.
// Modifier la valeur avec le filtre 'get_shortlink'
add_filter('get_shortlink', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($shortlink) {
// Modifier la valeur
return $shortlink;
}
Chargement des actualités...