Filters whether to preempt generating a shortlink for the given post. Returning a value other than false from the filter will short-circuit the shortlink generation process, returning that value instead.
false, $id, $context, $allow_slugs
Sortie :
@param false|string $return Short-circuit return value. Either false or a URL string. @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.
// Modifier la valeur avec le filtre 'pre_get_shortlink'
add_filter('pre_get_shortlink', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(false) {
// Modifier la valeur
return false;
}
Chargement des actualités...