-
-
Save krogsgard/02df9fc6fe5bd758d21c to your computer and use it in GitHub Desktop.
This file contains 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 | |
add_action( 'load-page-new.php', 'poststatus_change_comment_status' ); | |
/** | |
* Sets default comment and ping status | |
* to off for "Page" post types | |
* | |
*/ | |
function poststatus_change_comment_status() { | |
add_filter( 'option_default_comment_status', '__return_false' ); | |
add_filter( 'option_default_ping_status', '__return_false' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment