diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 4cc5729353..b0631ff28b 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -556,13 +556,12 @@ function wp_dashboard_recent_drafts( $drafts = false ) { function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $GLOBALS['comment'] =& $comment; - $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); - - if ( current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + if ( $comment->comment_post_ID > 0 && current_user_can( 'edit_post', $comment->comment_post_ID ) ) { + $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); $comment_post_link = "$comment_post_title"; } else { - $comment_post_link = $comment_post_title; + $comment_post_link = ''; } $actions_string = ''; @@ -599,7 +598,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { } if ( '1' === $comment->comment_approved ) { - $actions['view'] = '' . _x( 'View', 'verb' ) . ''; + $actions['view'] = '' . _x( 'View', 'verb' ) . ''; } /** @@ -630,7 +629,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { ?> -
comment_ID) ) ); ?>> +
> @@ -638,8 +637,24 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {

- ' . get_comment_author_link() . '', $comment_post_link, ' ' . __( '[Pending]' ) . '' ); ?> + ' . get_comment_author_link( $comment ) . '', + $comment_post_link, + ' ' . __( '[Pending]' ) . '' + ); + } else { + printf( + /* translators: 1: comment author, 2: notification if the comment is pending */ + __( 'From %1$s %2$s' ), + '' . get_comment_author_link( $comment ) . '', + ' ' . __( '[Pending]' ) . '' + ); + } + ?>

$type", $comment_post_link ); ?>

-

+

-

+

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 diff --git a/wp-includes/version.php b/wp-includes/version.php index 1866518d02..f00fae9fbd 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34037'; +$wp_version = '4.4-alpha-34038'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.