Bật comment post type

  Akasa Code WP

function default_comments_on( $data ) {
if( $data[‘post_type’] == ‘your_custom_post_name’ ) {
$data[‘comment_status’] = 1;
}

return $data;
}
add_filter( ‘wp_insert_post_data’, ‘default_comments_on’ );

0 0 đánh giá
Đánh giá bài viết
Please wait...
Theo dõi
Thông báo của
0 Góp ý
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận