Tag Info

Hot answers tagged

25

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' );


16

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 ...


7

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 ...


6

You can change them using a filter. The filter hooks you want to use are: For the first email message (confirming they really want to reset the password): 'retrieve_password_title' 'retrieve_password_message' For the follow-up email message (sending the new username and password): 'password_reset_title' 'password_reset_message' ...


5

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 ...


5

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: ...


4

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 ...


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 ...


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

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 ) ) { ...


4

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 ...


4

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 */ ...


3

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.


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

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

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

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

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

this works fine for a specific user login: global $user_login; get_currentuserinfo(); if ($user_login !== "admin") { // change admin to the username that gets the updates add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 ); add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ...


3

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


2

If you're looking to get in to instant notifications without suffering from backlog, I'd looking in to both Node.js and Socket.io. You should be able to work with them both pretty easily and integrate w/ WordPress. The sample chat application on the Socket.io site isn't a far cry from what you'd be doing. Basically an event is triggered on your LAMP/LNMP ...


2

You just create the bubble (circle) with CSS, and have text site on top of it. Example CSS span.mbe-update-bubble{ position: absolute !important; top: 6px !important; left: 6px !important; -webkit-border-radius: 10px !important; -khtml-border-radius: 10px !important; -moz-border-radius: 10px !important; border-radius: 10px ...


2

You can use publish_post action hook for notifying post author. function wpcs_author_notification( $post_id ) { $post = get_post( $post_id ); $author = get_userdata( $post->post_author ); $message = "Hi " . $author->display_name . ", Your post, " . $post->post_title . " has just been published at " . get_permalink( $post_id ); ...


2

It looks like after switching code to check get_site_transient('update_core') I have got what I need just action must be executed in a proper priority or a hook (thoughts/suggestions?). Working code below: function core_update_notification(){ global $wp_version; $installed_version = $wp_version; $uc_transient = get_site_transient('update_core'); ...


2

As far as display goes, the admin code does this in several ways. Via the 'message' class for stuff that shows once at the top of the content area. On the left nav menu, either on the Plugins tab or up where it says Dashboard. And in the list of themes (or plugins). Items 2 and 3 get their information via a handshake with the api.wordpress.org server. ...


2

I don't see this as excessively heavy. Just use is_user_logged_in() and current_user_can(). Obviously if user isn't logged in then you can skip checking for any roles. I am not sure, but user data is probably held in memory so there will be no extra database calls and such.


2

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 ...


2

remove_filter has no effect because /wp-admin/user-new.php runs add_filter('wpmu_signup_user_notification_email', admin_created_user_email); every time it loads, after plugins_loaded. I got this to work by adding a new filter with a lower priority (higher number), so it runs after admin_created_user_email, which has the default priority (10): function ...


2

http://wordpress.org/extend/plugins/gurken-subscribe-to-comments/ http://wordpress.org/extend/plugins/subscribe2/



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