get_default_comment_status

FUNCTION wp-includes\comment.php (ligne 294) github
Gets the default comment status for a post type.

Paramètres

Entrée :
$post_type = 'post', $comment_type = 'comment'
Sortie :
@param string $post_type    Optional. Post type. Default 'post'.
@param string $comment_type Optional. Comment type. Default 'comment'.
@return string Either 'open' or 'closed'.

Utilisation

// Utilisation de la fonction get_default_comment_status
$result = get_default_comment_status($post_type = 'post', $comment_type = 'comment');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...