wp_unique_post_slug_is_bad_hierarchical_slug

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

Paramètres

Entrée :
false, $slug, $post_type, $post_parent
Sortie :
@param bool   $bad_slug    Whether the post slug would be bad in a hierarchical post context.
@param string $slug        The post slug.
@param string $post_type   Post type.
@param int    $post_parent Post parent ID.

Utilisation

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

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

Actualités

Chargement des actualités...