Filters the permalink for a post of a custom post type.
$post_link, $post, $leavename, $sample
Sortie :
@param string $post_link The post's permalink. @param WP_Post $post The post in question. @param bool $leavename Whether to keep the post name. @param bool $sample Is it a sample permalink.
// Modifier la valeur avec le filtre 'post_type_link'
add_filter('post_type_link', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($post_link) {
// Modifier la valeur
return $post_link;
}
Chargement des actualités...