mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
After [34015], handle orphaned comments in the Dashboard comments widget. Pass full $comment versus just passing the comment ID when possible.
See #33710. git-svn-id: https://develop.svn.wordpress.org/trunk@34038 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1362,7 +1362,7 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
|
||||
}
|
||||
|
||||
$comment = get_comment( $comment_id );
|
||||
if ( empty( $comment ) )
|
||||
if ( empty( $comment ) || empty( $comment->comment_post_ID ) )
|
||||
return false;
|
||||
|
||||
$post = get_post( $comment->comment_post_ID );
|
||||
@@ -1821,7 +1821,7 @@ function wp_verify_nonce( $nonce, $action = -1 ) {
|
||||
* @param string|int $action The nonce action.
|
||||
* @param WP_User $user The current user object.
|
||||
* @param string $token The user's session token.
|
||||
*/
|
||||
*/
|
||||
do_action( 'wp_verify_nonce_failed', $nonce, $action, $user, $token );
|
||||
|
||||
// Invalid nonce
|
||||
|
||||
Reference in New Issue
Block a user