Title: Optin Comment Notifications
Author: Scott Reilly
Published: <strong>2015-يىلى 12-يانۋار</strong>
Last modified: 2019-يىلى 27-مارت

---

قىستۇرما ئىزدە

![](https://ps.w.org/optin-comment-notifications/assets/banner-772x250.png?rev=1066502)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/optin-comment-notifications/assets/icon-128x128.png?rev=1066502)

# Optin Comment Notifications

 يازغۇچى [Scott Reilly](https://profiles.wordpress.org/coffee2code/)

[چۈشۈر](https://downloads.wordpress.org/plugin/optin-comment-notifications.1.4.zip)

 * [تەپسىلاتلار](https://ug.wordpress.org/plugins/optin-comment-notifications/#description)
 * [باھالاشلار](https://ug.wordpress.org/plugins/optin-comment-notifications/#reviews)
 *  [ئورنىتىش](https://ug.wordpress.org/plugins/optin-comment-notifications/#installation)
 * [ئىجادىيەت](https://ug.wordpress.org/plugins/optin-comment-notifications/#developers)

 [قوللاش](https://wordpress.org/support/plugin/optin-comment-notifications/)

## چۈشەندۈرۈش

This plugin adds a checkbox to the profile page for users which allows them to opt
into receiving a notification email whenever a comment is made to the site.

If a comment goes into moderation, only users who have the ability to manage comments
on the site will receive the moderation notification email.

By default, all users of the site have the ability to subscribe to notifications
about comments. A filter is provided to facilitate use of code to customize the 
feature’s availability to users.

Note: a «user» is a person with an actual login account for the site. The plugin
does not facilitate permitting visitors who do not have an account on the site to
be able to subscribe to all comments.

Links: [Plugin Homepage](http://coffee2code.com/wp-plugins/optin-comment-notifications/)
| [Plugin Directory Page](https://wordpress.org/plugins/optin-comment-notifications/)
| [GitHub](https://github.com/coffee2code/optin-comment-notifications/) | [Author Homepage](http://coffee2code.com)

## ئېكران كەسمىسى

 * [[
 * A screenshot of the checkbox added to user profiles.

## ئورنىتىش

 1. Install via the built-in WordPress plugin installer. Or download and unzip `optin-
    comment-notifications.zip` inside the plugins directory for your site (typically`
    wp-content/plugins/`)
 2. Activate the plugin through the ›Plugins‹ admin menu in WordPress
 3. Users wishing to opt into receiving notifications for new comments should visit
    their profile page and check the checkbox labeled «Email me whenever a comment 
    is submitted to the site.»

## FAQ

  Who can sign up to receive notifications about comments to the site?

Any user account on the site can sign up for comment notifications. Comments that
go into moderation will only trigger notifications to users who can moderate comments.
Visitors who do not have an account on the site cannot make use of the plugin to
subscribe to comments.

  How do I sign up to receive notifications?

On your profile page, there is a checkbox next to «New Comment Emails» that is labeled«
Email me whenever a comment is submitted to the site.». Check the checkbox and click
the button to update your profile. If you wish to discontinue receiving such notifications,
simply uncheck the checkbox and save the change.

  Does this plugin include unit tests?

Yes.

  How can I restrict the plugin to only offer the ability to subscribe to all comments
to administrators and editors?

Use the ›c2c_optin_comment_notifications_has_cap‹ filter to customize the capability
as needed. The following code can be used or adapted for that purpose. Such code
should ideally be put into a mu-plugin or site-specific plugin (which is beyond 
the scope of this readme to explain).

    ```
    /**
     * Only permits administrators and editors to subscribe to comment notifications.
     *
     * @param bool  $default The default. Default true.
     * @param array $caps    Array of user capabilities.
     * @return string
     */
    function restrict_optin_comment_notifications( $default, $caps ) {
        // Only administrators and editors can subscribe to all comments.
        return !! array_intersect(
            wp_get_current_user()->roles,      // Get current user's roles.
            array( 'administrator', 'editor' ) // Roles to allow to subscribe to all comments.
        );
    }
    add_filter( 'c2c_optin_comment_notifications_has_cap', 'restrict_optin_comment_notifications', 10, 2 );
    ```

  Can an administrator configure the setting for another user?

Yes. Users with the ›edit_users‹ capability (administrators, basically) and can 
edit the profile of another user can configure this plugin for that user. The checkbox
is labeled «Email this user whenever a comment is submitted to the site.».

## باھالاشلار

![](https://secure.gravatar.com/avatar/2336eedc97b4654e11156256ad53f908674265e5db31d0232456d4d423144761?
s=60&d=retro&r=g)

### 󠀁[Thank you](https://wordpress.org/support/topic/thank-you-2305/)󠁿

 [eRoxanne](https://profiles.wordpress.org/eroxanne/) 2020-يىلى 31-مارت

Precisely what I needed and works instantly and perfectly. Bravo.

![](https://secure.gravatar.com/avatar/8006731d7ac58d1b431a0f826fa2ae72ca8552043e1e46ac7220d89ed5716c3b?
s=60&d=retro&r=g)

### 󠀁[Exactly what you want](https://wordpress.org/support/topic/exactly-what-you-want/)󠁿

 [swinggraphics](https://profiles.wordpress.org/swinggraphics/) 2017-يىلى 28-مارت

Checkboxes on user profiles to receive emails about new comments. Like it says.

 [ 3 باھالاشنىڭ ھەممىنى ئوقۇش ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/)

## تۆھپىكار ۋە ئىجادكار

«Optin Comment Notifications» كودى ئوچۇق يۇمشاق دېتال. تۆۋەندىكى كىشىلەر بۇ قىستۇرمىغا
تۆھپە قوشقان.

تۆھپىكار

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

«Optin Comment Notifications» 1 تىلغا تەرجىمە قىلىنغان. [تەرجىمانلار](https://translate.wordpress.org/projects/wp-plugins/optin-comment-notifications/contributors)
نىڭ تۆھپىسى ئۈچۈن رەھمەت.

[«Optin Comment Notifications» نى تىلىڭىزغا تەرجىمە قىلىڭ](https://translate.wordpress.org/projects/wp-plugins/optin-comment-notifications)

### ئىجادىيەتكە قىزىقامسىز؟

[كودقا كۆز يۈگۈرتۈپ](https://plugins.trac.wordpress.org/browser/optin-comment-notifications/)،
[SVN خەزىنە](https://plugins.svn.wordpress.org/optin-comment-notifications/) تەكشۈرۈپ
ياكى [RSS](https://plugins.trac.wordpress.org/log/optin-comment-notifications/?limit=100&mode=stop_on_copy&format=rss)
ئارقىلىق [ئىجادىيەت خاتىرىسى](https://plugins.trac.wordpress.org/log/optin-comment-notifications/)
گە مۇشتەرى بولغىلى بولىدۇ.

## ئۆزگىرىش خاتىرىسى

#### 1.4 (2019-03-26)

 * New: Add CHANGELOG.md file and move all but most recent changelog entries into
   it
 * Change: Initialize plugin on ›plugins_loaded‹ action instead of on load
 * Change: Merge `do_init()` into `init()`
 * Change: Note compatibility through WP 5.1+
 * Change: Update copyright date (2019)
 * Change: Update License URI to be HTTPS
 * Change: Split paragraph in README.md’s «Support» section into two

#### 1.3 (2018-05-07)

 * Bugfix: Ensure comment notifications are sent even if core’s ›comments_notify‹
   or ›notify_moderator‹ settings is false
 * Change: Don’t notify users of spam comments
 * New: Add README.md
 * New: Add GitHub link to readme
 * Unit tests:
    - Change: Test notifications by invoking `wp_new_comment_notify_postauthor()`
      rather than plugin class method
    - Change: Add and improve tests relating to ›notify_moderator‹
    - Change: Remove unnecessary mocking of posts
    - Change: Minor whitespace tweaks to bootstrap
    - Change: Use correct header @package name in bootstrap
 * Change: Note compatibility through WP 4.9+
 * Change: Update copyright date (2018)

#### 1.2 (2017-01-04)

 * New: Permit admins (or more specifically, those who can ›edit_users‹) to control
   the setting for other users.
    - Add new capability ›c2c_subscribe_to_all_comments_edit_others‹
    - Add ›c2c_optin_comment_notifications_has_cap_edit_others‹ filter to allow 
      customizing capability for editing setting for other users
    - Show checkbox via ›personal_options‹ action instead of ›profile_personal_options‹
    - Hook ›edit_user_profile_update‹ to potentially save the setting when another
      user is being edited
 * Change: Enable more error output for unit tests.
 * Change: Default `WP_TESTS_DIR` to `/tmp/wordpress-tests-lib` rather than erroring
   out if not defined via environment variable.
 * Change: Minor tweaks to code documentation.
 * Change: Note compatibility through WP 4.7+.
 * Change: Remove support for WordPress older than 4.6 (should still work for earlier
   versions)
 * Change: Update copyright date (2017).
 * Change: Update installation instruction to prefer built-in installer over .zip
   file

_Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/optin-comment-notifications/blob/master/CHANGELOG.md)._

## Meta

 *  Version **1.4**
 *  ئاخىرقى يېڭىلانغان ۋاقىت **7 يىل بۇرۇن**
 *  ئاكتىپ ئورنىتىش سانى **60+**
 *  WordPress نەشرى ** 4.6 ياكى يۇقىرى **
 *  **5.1.22** دا سىنالغان
 *  تىل
 * [Czech](https://cs.wordpress.org/plugins/optin-comment-notifications/) ۋە [English (US)](https://wordpress.org/plugins/optin-comment-notifications/).
 *  [تىلىڭىزغا تەرجىمە قىلىڭ](https://translate.wordpress.org/projects/wp-plugins/optin-comment-notifications)
 * بەلگە
 * [comment](https://ug.wordpress.org/plugins/tags/comment/)[commenting](https://ug.wordpress.org/plugins/tags/commenting/)
   [comments](https://ug.wordpress.org/plugins/tags/comments/)[email](https://ug.wordpress.org/plugins/tags/email/)
   [Notifications](https://ug.wordpress.org/plugins/tags/notifications/)
 *  [ئالىي كۆرۈنۈش](https://ug.wordpress.org/plugins/optin-comment-notifications/advanced/)

## دەرىجە

 5/5 يۇلتۇز

 *  [  3 5-يۇلتۇز باھالاش     ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/?filter=5)
 *  [  0 4-يۇلتۇز باھالاش     ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/?filter=4)
 *  [  0 3-يۇلتۇز باھالاش     ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/?filter=3)
 *  [  0 2-يۇلتۇز باھالاش     ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/?filter=2)
 *  [  0 1-يۇلتۇز باھالاش     ](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/#new-post)

[بارلىق ئىنكاسنى كۆرسەت](https://wordpress.org/support/plugin/optin-comment-notifications/reviews/)

## تۆھپىكار

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

## قوللاش

چۈشەندۈرۈشىڭىز بارمۇ؟ ياردەم لازىممۇ؟

 [قوللاش مۇنبىرىنى كۆرسەت](https://wordpress.org/support/plugin/optin-comment-notifications/)

## ئىئانە

بۇ قىستۇرمىنىڭ ياخشىلىنىشىنى قوللامسىز؟

 [ بۇ قىستۇرمىغا ئىئانە قىلىش ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522)