开发者 | coffee2code |
---|---|
更新时间 | 2019年3月27日 13:14 |
捐献地址: | 去捐款 |
PHP版本: | 4.6 及以上 |
WordPress版本: | 5.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
optin-comment-notifications.zip
inside the plugins directory for your site (typically wp-content/plugins/
)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.
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.
Yes.
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). ` /**
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.".
do_init()
into init()
wp_new_comment_notify_postauthor()
rather than plugin class methodWP_TESTS_DIR
to /tmp/wordpress-tests-lib
rather than erroring out if not defined via environment variable.