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 cha
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.
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' );
This website uses cookies to improve your experience. If you decide to use this website, you agree that certain cookies will be used. If you do not agree please close this website. Read moreACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
One Click Close Comments
€0
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 cha
2.7.1
2020.10.19
10000
4.7
5.7.10
Czech,,English,(US),,Japanese,,Romanian,,Swedish
5.00
9
Description
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:
dashicons-admin-comments
).Example: