Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
61

For example if you don't want Wordpress to show update notifications for akismet, you will do it like: function filter_plugin_updates( $value ) { unset( $value->response['akismet/akismet.php'] ); return $value; } add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );


28

Hameedullah Khan's answer will throw a PHP warning. Include this if clause to check to make sure it's an object before unsetting the response for that plugin. 'Warning: Attempt to modify property of non-object' Try this to avoid the warnings (code for the plugin file itself): // remove update notice for forked plugins function remove_update_notifications($...


18

There's a few plugins that handle email notifications, but they all seem to act like a subscription service for (all) WordPress users. To notify just you when a post or page is published: /** * Send an email notification to the administrator when a post is published. * * @param string $new_status * @param string $old_status * @param object $...


14

To disable user email notification, add this in a plugin or theme: add_filter( 'send_password_change_email', '__return_false' ); FYI wp_password_change_notification() controls admin email notification when a user changes their password


8

Don't ask me way but i actually have a function to count hooked functions to a tag /** * count_hooked_functions * @author Ohad Raz * @param string $tag hook name as string * @return int the number of hooked functions to a specific hook */ function count_hooked_functions($tag = false){ global $wp_filter; if ($tag){ if (isset($wp_filter[...


7

I would do this when you call add_options_page(), not later. It's always better to do this with the supported API instead of playing with the internal structures. The plugin updater periodically checks the plugin status and then saves the result in a transient. This means that it only reads this cached status when the menu is created, it doesn't do the full ...


7

To disable Admin email notification when a user resets their own password, create a Plugin (or Must Use Plugin) using the following code snippet: /** * Disable Admin Notification of User Password Change * * @see pluggable.php */ if ( ! function_exists( 'wp_password_change_notification' ) ) { function wp_password_change_notification( $user ) { ...


6

You can try something like this in your functions.php function send_comment_email_notification( $comment_ID, $commentdata ) { $comment = get_comment( $comment_id ); $postid = $comment->comment_post_ID; $master_email = get_post_meta( $postid, 'master_email', true); if( isset( $master_email ) && is_email( $master_email ) ) { ...


6

An alternative is to create a simple Must-use plugin so this doesn't depend on the theme. Create a file wp-content/mu-plugins/disable-auto-update-mail.php <?php /* Plugin Name: Disable Auto Update Mails Plugin URI: http://wordpress.stackexchange.com/questions/157056 Version: 1.0 Author: kraftner AuthorURI: http://wordpress.stackexchange.com/users/47733/...


6

The short answer is: Use Query Strings. If you notice in the address bar immediately after you publish a Post... You will see something similar to this: domain.com/wp-admin/post.php?post=4935&action=edit&message=6 There's a few different Query Variables: post contains the ID of the Post being edited. action is saying we're currently "editing" the ...


5

There are several ways to prevent user notification for new registered users and user password changes. One would be to change the pluggable functions "wp_new_user_notification()" and "wp_password_change_notification()". A different way would be to post the following code in functions.php. It uses the "phpmailer_init" hook to test, if the subject of the ...


5

I skimmed through the source of the wp_notify_postauthor() function and noticed the comment_notification_recipients filter. I wonder if you could simplify your plugin to the following code snippet: <?php /** * Plugin Name: Disable comment/trackback/pingback notifications emails * Plugin URI: http://wordpress.stackexchange.com/a/150141/26350 */ ...


5

Looking at the sources (core files, wp-includes/option.php) you can always find your target hook tags: add_action('added_option', 'wpse230212_callback_add', 10, 2); add_action('updated_option', 'wpse230212_callback_update', 10, 3); function wpse230212_callback_add( $option_name, $option_value ) { // do stuff on add_option } function ...


5

OK, so it has nothing to do with WP_List_Table, to be precise. All you need to do is to add some additional info during registration of your custom admin page. There are two classes used by WordPress to display these notification bubbles: update-plugins awaiting-mod Your notifications have nothing to do with plugins, so it will be nicer to use the second ...


4

In addition to having the same name, I think it checks the folder name first for updates. You should also change your folder name if you are planning to distribute publicly, or if this is private, you can exclude it from update checks: http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/. It would still probably be ...


4

In the WordPress backend at Settings->Discussion there is a setting near the middle labeled "Email me Whenever". Uncheck those two boxes. I believe that will prevent the system from sending those email, leaving only the emails that you send.


4

The comment_notification_text filter is in wp-includes/pluggable.php in the wp_notify_postauthor function. You can copy and paste the $notify_message stuff and edit out what you don't want. function wpd_comment_notification_text( $notify_message, $comment_id ){ // get the current comment and post data $comment = get_comment( $comment_id ); $post ...


3

Try this. I cleaned up your arg array and placed everything in a function. Also, why are you using the getInstance method when your efpd_admin_notice is public? See the code below for accessing this method properly. function plugin_update(){ $plugin_update = Efpdd::efpd_admin_notice(array( 'type' => 'update', 'message' => 'The ...


3

I was able to override the multi-site notification email by adding these: remove_filter('wpmu_signup_user_notification_email','admin_created_user_email'); add_filter('wpmu_signup_user_notification_email',<function_name_here>); add_filter('wpmu_signup_user_notification',<function_name_here>); add_filter('wpmu_signup_user_notification_subject',<...


3

sha -- it answers the question by contributing the knowledge that the posted solution does not work in all instances. After 24 hours, I can update the knowledge I contributed. The solution at this location ( Notify admin when page is edited? ) works on the server where the solution posted above does not. To quote from the thread with the solution that ...


3

I'd say there's three specific requirements here; Allow users to choose notification times, timezone aware Hook into transition_post_status to listen up for new posts, and then take action Find a decent SMS API For 1), hook into show_user_profile to output your time picker field(s), and personal_options_update to save them. You could detect the user's ...


3

It's not really a WP-specific solution, but if you set up a Gmail address (and likely others), you could create a filter to automatically forward notifications generated by WordPress to other admins. Short of WordPress adding multi-email notifications, that might be a workaround to temporarily solve the problem.


3

What you need to do (as we discussed in comments) is run your conditional logic inside the function that that add_action calls. For example, you're adding an action to the admin notices hook. The action will run, but the stuff inside that action's callback will only run if you let it. add_action( 'admin_notices', 'your_custom_function' ); function ...


3

For Facebook: http://wordpress.org/extend/plugins/simple-facebook-connect/ For Twitter: http://wordpress.org/extend/plugins/simple-twitter-connect/ For Google+ http://wordpress.org/extend/plugins/simple-google-connect/ The twitter and facebook plugins will autopost from your site to each service. The G+ plugin is new, and still under development. I don't ...


3

First: Don’t use mail(). Use wp_mail() instead. wp_mail( // Send it to yourself get_option( 'admin_email' ), 'Your subject', 'Your message', // extra headers array ( 'Bcc:' . implode( ",", $usersarray ), 'From:' . get_option( 'admin_email' ) ) );


3

Here's an idea: use the save_post hook to set a session containing the message you want to show the user and then redirect to the home page. In the home page template, check for the presence of that session and show the message to the user. Something like this: functions.php: add_action( 'save_post', 'wpse60249_save_post' ); function wpse60249_save_post( ...


3

Right now I'm using Subscribe2 WordPress plugin to manage all subscription, I found this plugin simple, neat and easy to use, also the plugin has good review/ratings over Wordpress Plugins directory.


3

You'll need to check the $pagenow variable and the post type of the post being edited. It will look something like this: function wpse_75224_admin_notices() { global $pagenow; $is_edit_custom_post_type = ( 'post.php ' == $pagenow && 'my_custom_post_type' == get_post_type( $_GET['post'] ) ); $is_new_custom_post_type = ( 'post-new.php' == ...


3

You need to write your hook for transition_post_status action: function authorNotification( $new_status, $old_status, $post ) { if ( $new_status == 'publish' && $old_status != 'publish' ) { $author = get_userdata($post->post_author); $message = " Hi ".$author->display_name.", New post, ".$post->...


3

In your functions.php add: add_filter( 'auto_core_update_send_email', '__return_false' );


Only top voted, non community-wiki answers of a minimum length are eligible