Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filter_media_comment_status( $open, $post_id ) {
- $post = get_post( $post_id );
- if( $post->post_type == 'attachment' ) {
- return false;
- }
- return $open;
- }
- add_filter( 'comments_open', 'filter_media_comment_status', 10 , 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement