Created
December 21, 2020 11:44
-
-
Save rickslayer/666009611546df40a3966beec64b4f75 to your computer and use it in GitHub Desktop.
Bloquear permitir comentários por padrão no wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function remove_allow_comments_default($data) | |
{ | |
$data['comment_status'] = 0; | |
return $data; | |
} | |
add_action( 'wp_insert_post_data', 'remove_allow_comments_default', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment