Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/comment.php

    r15132 r16326  
    4949    '<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>' .
    5050    '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    51     '<p>' . __( '<a href="http://codex.wordpress.org/Administration_Panels#Comments" target="_blank">Comments Documentation</a>' ) . '</p>' .
     51    '<p>' . __( '<a href="http://codex.wordpress.org/Administration_Panels#Comments" target="_blank">Documentation on Comments</a>' ) . '</p>' .
    5252    '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank" >Support Forums</a>' ) . '</p>'
    5353    );
     
    6161        comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'javascript:history.go(-1)') );
    6262
    63     if ( !current_user_can('edit_post', $comment->comment_post_ID) )
    64         comment_footer_die( __('You are not allowed to edit comments on this post.') );
     63    if ( !current_user_can( 'edit_comment', $comment_id ) )
     64        comment_footer_die( __('You are not allowed to edit this comment.') );
    6565
    6666    if ( 'trash' == $comment->comment_approved )
     
    7878case 'spam'    :
    7979
     80    $title = __('Moderate Comment');
     81
    8082    $comment_id = absint( $_GET['c'] );
    8183
     
    8587    }
    8688
    87     if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) {
     89    if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) {
    8890        wp_redirect( admin_url('edit-comments.php?error=2') );
    8991        die();
     
    108110
    109111<?php screen_icon(); ?>
    110 <h2><?php esc_html_e( 'Moderate Comment' ); ?></h2>
     112<h2><?php echo esc_html( $title ); ?></h2>
    111113
    112114<?php
     
    179181<tr>
    180182<td><a class="button" href="<?php echo admin_url('edit-comments.php'); ?>"><?php esc_attr_e('No'); ?></a></td>
    181 <td class="textright"><input type='submit' class="button" value='<?php echo esc_attr($button); ?>' /></td>
     183<td class="textright"><?php submit_button( $button, 'button' ); ?></td>
    182184</tr>
    183185</table>
     
    185187<?php wp_nonce_field( $nonce_action ); ?>
    186188<input type='hidden' name='action' value='<?php echo esc_attr($formaction); ?>' />
    187 <input type='hidden' name='p' value='<?php echo esc_attr($comment->comment_post_ID); ?>' />
    188189<input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' />
    189190<input type='hidden' name='noredir' value='1' />
     
    213214    if ( !$comment = get_comment($comment_id) )
    214215        comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') );
    215     if ( !current_user_can('edit_post', $comment->comment_post_ID ) )
     216    if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
    216217        comment_footer_die( __('You are not allowed to edit comments on this post.') );
    217218
Note: See TracChangeset for help on using the changeset viewer.