One Click Close Comments

plugin banner

Version: 2.2.1

Conveniently close or open comments for a post or page with one click.

Author:Scott Reilly (profile at wordpress.org)
WordPress version required:4.7
WordPress version tested:5.7.2
Plugin version:2.7.1
Added to WordPress repository:12-06-2009
Last updated:02-04-2021
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:98
Rated by:10
Plugin URI:https://coffee2code.com/wp-plugins/one-click-...
Total downloads:155 303
Active installs:10 000+
plugin download
Click to start download

From the admin listing of posts (‘Edit Posts’) and pages (‘Edit Pages’), a user can close or open comments to any posts to which they have sufficient privileges to make such changes (essentially admins and post authors for their own posts). This is done via an AJAX-powered color-coded indicator. The color-coding gives instant feedback on the current status of the post for comments: green means the post/page is open to comments, red means the post/page is closed to comments. Being AJAX-powered means that the change is submitted in the background after being clicked without requiring a page reload.

This plugin will only function for administrative users in the admin who have JavaScript enabled.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Hooks

The plugin exposes one filter for hooking. Such code should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain).

c2c_one_click_close_comments_click_char (filter)

The ‘c2c_one_click_close_comments_click_char’ hook allows you to use an alternative character, string, or markup as the plugin’s indicator in the posts listing tables. It is the character that gets color-coded to indicate if comments are open or close, and the thing to click to toggle the comment open status. You can make use of Dashicons by specifying the desired dashicon’s name (with the “dashicons-” prefix). By default this is the comments dashicon, dashicons-admin-comments.

Arguments:

  • $char (array): The character, string, or markup to be used for display (by default this is dashicons-admin-comments).

Example:

/**
 * Changes the character used as the one-click link to a bullet (solid circle).
 *
 * @param string $char The default character.
 * @return string
 */
function custom_one_click_char( $char ) {
    return '•';
}
add_filter( 'c2c_one_click_close_comments_click_char', 'custom_one_click_char' );

Screenshots
FAQ
ChangeLog