Tweeted twitter.com/#!/StackWordPress/status/479711636467372032
3 Included the plugin code, re-tagged, improved formatting and removed "Thank you".
source | link

I am trying to disable comment notifications for post authors (or anyone else besides the site's admin) for a client's site. I've attempted to create a plugin that uses the pluggable function wp_notify_postauthorwp_notify_postauthor, but it does not seem to have an effect.

Here's the plugin filecode: http://pastebin.com/8KUbQfuT

<?php
/**
 *
 *
 * @package   Disable_plugin_notifications
 * @author    Me
 * @link      <hidden>

 *
 * @wordpress-plugin
 * Plugin Name:       Disable Comment Notifications
 * Plugin URI:        <hidden>
 * Description:       <hidden>
 * Version:           1.0.0
 * Author:            <hidden>
 * Author URI:        <hidden>
 */


// Disabling comment notifications for post authors
if ( !function_exists( 'wp_notify_postauthor' ) ) {
    function wp_notify_postauthor() {
        return;
    }
}

I've also tried it without the 'return' in the function.

Thanks!

I am trying to disable comment notifications for post authors (or anyone else besides the site's admin) for a client's site. I've attempted to create a plugin that uses the pluggable function wp_notify_postauthor, but it does not seem to have an effect.

Here's the plugin file: http://pastebin.com/8KUbQfuT

I've also tried it without the 'return' in the function.

Thanks!

I am trying to disable comment notifications for post authors (or anyone else besides the site's admin) for a client's site. I've attempted to create a plugin that uses the pluggable function wp_notify_postauthor, but it does not seem to have an effect.

Here's the plugin code:

<?php
/**
 *
 *
 * @package   Disable_plugin_notifications
 * @author    Me
 * @link      <hidden>

 *
 * @wordpress-plugin
 * Plugin Name:       Disable Comment Notifications
 * Plugin URI:        <hidden>
 * Description:       <hidden>
 * Version:           1.0.0
 * Author:            <hidden>
 * Author URI:        <hidden>
 */


// Disabling comment notifications for post authors
if ( !function_exists( 'wp_notify_postauthor' ) ) {
    function wp_notify_postauthor() {
        return;
    }
}

I've also tried it without the 'return' in the function.

2 edited tags
| link
1
source | link

Disabling Comment Notifications for Post Author

I am trying to disable comment notifications for post authors (or anyone else besides the site's admin) for a client's site. I've attempted to create a plugin that uses the pluggable function wp_notify_postauthor, but it does not seem to have an effect.

Here's the plugin file: http://pastebin.com/8KUbQfuT

I've also tried it without the 'return' in the function.

Thanks!