Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments: added a filter to allow disabling comments per post type. #2936

Merged
merged 2 commits into from
Nov 17, 2015

Conversation

zinigor
Copy link
Member

@zinigor zinigor commented Oct 30, 2015

This would fix #2882 by allowing to disable Jetpack comments for certain post types, for example:

// disabling comments for pages
add_filter( 'jetpack_comment_form_enabled_for_page', '__return_false');

Disabling will revert WordPress to its comment behaviour as it would have been without Jetpack.

@zinigor zinigor added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Comments labels Oct 30, 2015
@zinigor zinigor added this to the 3.9 milestone Oct 30, 2015
@zinigor zinigor force-pushed the add/comment-post-type-filter branch from 587fd4a to 19fc9ff Compare October 30, 2015 16:44
/**
* Filters the setting that determines if Jetpagk comments should be enabled for
* the current post type.
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add @module comments to the docblock, like in #2852?

Thanks!

@zinigor
Copy link
Member Author

zinigor commented Nov 2, 2015

@jeherve third time's the charm :)

@zinigor zinigor added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Nov 2, 2015
@zinigor zinigor modified the milestones: 3.8.1, 3.9 Nov 2, 2015
@zinigor
Copy link
Member Author

zinigor commented Nov 2, 2015

@dereksmart feel free to punt this one, but please let me know if you do so I change the docs.

@dereksmart
Copy link
Member

Works as expected :shipit:

@dereksmart dereksmart added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Nov 3, 2015
samhotchkiss added a commit that referenced this pull request Nov 17, 2015
Comments: added a filter to allow disabling comments per post type.
@samhotchkiss samhotchkiss merged commit c447170 into master Nov 17, 2015
@samhotchkiss samhotchkiss removed the [Status] Ready to Merge Go ahead, you can push that green button! label Nov 17, 2015
@samhotchkiss samhotchkiss deleted the add/comment-post-type-filter branch November 17, 2015 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Comments [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comments: Add method to allow per-CPT disabling
4 participants