Last active
July 24, 2016 18:39
-
-
Save carl-alberto/78a38ac632a5c83d836c5e14873ff9e9 to your computer and use it in GitHub Desktop.
Jetpack plugin carousel disable comments
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 | |
function jetpack_carousel_disable_comment( $jpimages, $postid ) { | |
$posts = get_post( $postid ); | |
if( $posts->post_type == 'attachment' ) { | |
return false; | |
} | |
return $jpimages; | |
} | |
add_filter( 'comments_open', 'jetpack_carousel_disable_comment', 10 , 5 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment