Ticket #33587: 33587-3.diff
File 33587-3.diff, 2.9 KB (added by , 10 years ago) |
---|
-
wp-includes/comment-functions.php
1631 1631 1632 1632 if ( 'spam' !== $commentdata['comment_approved'] ) { // If it's spam save it silently for later crunching 1633 1633 if ( '0' == $commentdata['comment_approved'] ) { 1634 wp_notify_moderator( $comment_ID ); 1634 /** 1635 * Notifies the Moderator when a Comment Needs Approval. 1636 * 1637 * @since 1638 * 1639 * @param int $comment_ID The comment ID. 1640 */ 1641 do_action( 'wp_notify_moderator', $comment_ID ); 1635 1642 } 1636 1643 1637 1644 // wp_notify_postauthor() checks if notifying the author of their own comment. 1638 1645 // By default, it won't, but filters can override this. 1639 1646 if ( get_option( 'comments_notify' ) && $commentdata['comment_approved'] ) { 1640 wp_notify_postauthor( $comment_ID ); 1647 /** 1648 * Notifies the Post Author of a New Comment. 1649 * 1650 * @since 1651 * 1652 * @param int $comment_ID The comment ID. 1653 */ 1654 do_action( 'wp_notify_postauthor', $comment_ID ); 1641 1655 } 1642 1656 } 1643 1657 -
wp-includes/default-filters.php
334 334 add_action( 'split_shared_term', '_wp_check_split_nav_menu_terms', 10, 4 ); 335 335 add_action( 'wp_split_shared_term_batch', '_wp_batch_split_terms' ); 336 336 337 // Default Notification Filters. 338 add_action( 'wp_notify_postauthor', 'wp_notify_postauthor' ); 339 add_action( 'wp_notify_moderator', 'wp_notify_moderator' ); 340 add_action( 'wp_new_user_notification', 'wp_new_user_notification', 10, 2 ); 341 add_action( 'wp_password_change_notification', 'wp_password_change_notification' ); 342 337 343 /** 338 344 * Filters formerly mixed into wp-includes 339 345 */ -
wp-includes/user-functions.php
1915 1915 1916 1916 wp_set_password( $new_pass, $user->ID ); 1917 1917 update_user_option( $user->ID, 'default_password_nag', false, true ); 1918 1919 wp_password_change_notification( $user ); 1918 /** 1919 * Notifies of a Password Change. 1920 * 1921 * @since 1922 * 1923 * @param object $user The user. 1924 */ 1925 do_action( 'wp_password_change_notification', $user ); 1920 1926 } 1921 1927 1922 1928 /** … … 2003 2009 } 2004 2010 2005 2011 update_user_option( $user_id, 'default_password_nag', true, true ); //Set up the Password change nag. 2012 /** 2013 * Notifies of a New User. 2014 * 2015 * @since 2016 * 2017 * @param int $user_ID The user ID. 2018 * @param string $notify (Optional) Whether admin and user should be notified ('both') or only the admin ('admin' or empty). 2019 */ 2020 do_action( 'wp_new_user_notification', $user_id, 'both' ); 2006 2021 2007 wp_new_user_notification( $user_id, 'both' );2008 2009 2022 return $user_id; 2010 2023 } 2011 2024