Filters the post slug before it is generated to be unique. Returning a non-null value will short-circuit the unique slug generation, returning the passed value instead.
null, $slug, $post_id, $post_status, $post_type, $post_parent
Sortie :
@param string|null $override_slug Short-circuit return value. @param string $slug The desired slug (post_name). @param int $post_id Post ID. @param string $post_status The post status. @param string $post_type Post type. @param int $post_parent Post parent ID.
// Modifier la valeur avec le filtre 'pre_wp_unique_post_slug'
add_filter('pre_wp_unique_post_slug', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre(null) {
// Modifier la valeur
return null;
}
Chargement des actualités...