wp_unique_post_slug_is_bad_attachment_slug

FILTER wp-includes\post.php (ligne 5514) github
Filters whether the post slug would make a bad attachment slug.

Paramètres

Entrée :
false, $slug
Sortie :
@param bool   $bad_slug Whether the slug would be bad as an attachment slug.
@param string $slug     The post slug.

Utilisation

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

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

Actualités

Chargement des actualités...