Last Updated
October 15, 2021
First Released
March 10, 2016
Download History (Last one month)
This plugin enables a user with the administrator role the ability to comment on any post or page, even if the comments for that post or page are closed. When the plugin is active, this behavior is automatically enabled.
Administrators can be explicitly prevented from commenting on specific posts via two approaches:
- When creating or editing a post, in the “Prevent Admin Comments” metabox (in the block editor) or the “Discussion” metabox (in the classic editor) there is a checkbox labeled “Prevent administrators from commenting” that only administrators can access. Checking the checkbox will prevent administrators from commenting on the post even though this plugin is active. (If the metabox isn’t visible for you when using the classic editor, then expand the “Screen Options” slide-down panel on the upper-right of the page.)
- Programmatically, via the use of the ‘c2c_admin_can_always_comment_disable’ filter. This can be used be provide more fine-grained access control and contextual handling. See the “Hooks” section for documentation on the filter’s use.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Developer Documentation
Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the hooks provided by the plugin.
As an overview, these are the hooks provided by the plugin:
c2c_always_allow_admin_comments_disable : Customizes if comments should actually be disabled for a particular admin user.
c2c_always_allow_admin_comments_post_types: Customizes which post types are supported by the plugin.
- Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically
/wp-content/plugins/).
- Activate the plugin through the ‘Plugins’ admin menu in WordPress
Changelog
1.3.2 (2021-10-14)
- New: Add DEVELOPER-DOCS.md and move hooks documentation into it
- Change: Note compatibility through WP 5.8+
- Change: Tweak installation instruction
- Unit tests:
- Change: Explicitly test a custom post type that supports comments and one that does not
- Change: Restructure unit test directories
- Change: Move
bin into tests/
- Change: Move
tests/bootstrap.php into tests/phpunit/
- Change: Move
tests/test-*.php into tests/phpunit/tests/
- Change: Remove ‘test-‘ prefix from unit test file
- Change: Rename
phpunit.xml to phpunit.xml.dist per best practices
- Change: In bootstrap, store path to plugin file constant
- Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
1.3.1 (2021-04-04)
- Change: Note compatibility through WP 5.7+
- Change: Update copyright date (2021)
1.3 (2020-05-12)
- Change: Add customization for post type support
- New: Add filter
c2c_always_allow_admin_comments_post_types to allow customizing supported post types
- New: Add
get_post_types() to get the list of supported post types
- Change: Enhance
can_show_ui() to check if post’s post type is supported
- Change: Change label for setting
- New: Add TODO.md and move existing TODO list from top of main plugin file into it (and add more items to the list)
- Change: Use HTTPS for link to WP SVN repository in bin script for configuring unit tests
- Change: Note compatibility through WP 5.4+
- Change: Update links to coffee2code.com to be HTTPS
- Unit tests:
- New: Add tests for registering of hooks
- Change: Remove unnecessary unregistering of hooks
Full changelog is available in CHANGELOG.md.