wp_unique_post_slug_is_bad_flat_slug

FILTER wp-includes\post.php (ligne 5606) github
Filters whether the post slug would be bad as a flat slug.

Paramètres

Entrée :
false, $slug, $post_type
Sortie :
@param bool   $bad_slug  Whether the post slug would be bad as a flat slug.
@param string $slug      The post slug.
@param string $post_type Post type.

Utilisation

// Modifier la valeur avec le filtre 'wp_unique_post_slug_is_bad_flat_slug'
add_filter('wp_unique_post_slug_is_bad_flat_slug', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(false) {
    // Modifier la valeur
    return false;
}

Actualités

Chargement des actualités...