WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/19/2016 07:13:59 PM (6 years ago)
Author:
rachelbaker
Message:

Comments: Refresh the Moderate Comment screen for a friendlier experience with email moderation actions.

Brings some love to this neglected screen:

  • format comment_content, instead of escaping in one massive block of text
  • only wrap the comment date in a link if the comment permalink exists
  • include link to the Edit Comment screen at the bottom of the comment_content
  • update the message styles to match other screens
  • append #wpbody-content to the comment email message links for accessibility

Props johnbillion, rachelbaker, afercia, melchoyce, karmatosed.

Fixes #34133

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/pluggable.php

    r36446 r36588  
    15001500    if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
    15011501        if ( EMPTY_TRASH_DAYS ) {
    1502             $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c={$comment->comment_ID}") ) . "\r\n";
     1502            $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15031503        } else {
    1504             $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c={$comment->comment_ID}") ) . "\r\n";
     1504            $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15051505        }
    1506         $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c={$comment->comment_ID}") ) . "\r\n";
     1506        $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15071507    }
    15081508
     
    16411641    }
    16421642
    1643     $notify_message .= sprintf( __('Approve it: %s'),  admin_url("comment.php?action=approve&c=$comment_id") ) . "\r\n";
     1643    $notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
     1644
    16441645    if ( EMPTY_TRASH_DAYS )
    1645         $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";
     1646        $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    16461647    else
    1647         $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
    1648     $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";
     1648        $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
     1649
     1650    $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    16491651
    16501652    $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
    16511653        'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
    1652     $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
     1654    $notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n";
    16531655
    16541656    $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
Note: See TracChangeset for help on using the changeset viewer.