Browse: Home / Functions /

learndash_update_posts_comment_status

learndash_update_posts_comment_status( string $post_type = '',  string|boolean $comment_status = false )

Updates the comment_status field for all the post of given post type.


Description #


Parameters #

$post_type

(string) (Optional) The post type slug.

Default value: ''

$comment_status

(string|boolean) (Optional) New comment status. Allowed values 'open' or 'closed'.

Default value: false


Source #

File: includes/ld-misc-functions.php


Changelog #

Changelog
Version Description
3.0.0 Introduced.