Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r16326 r15132  
    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">Documentation on Comments</a>' ) . '</p>' .
     51    '<p>' . __( '<a href="http://codex.wordpress.org/Administration_Panels#Comments" target="_blank">Comments Documentation</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_comment', $comment_id ) )
    64         comment_footer_die( __('You are not allowed to edit this comment.') );
     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.') );
    6565
    6666    if ( 'trash' == $comment->comment_approved )
     
    7878case 'spam'    :
    7979
    80     $title = __('Moderate Comment');
    81 
    8280    $comment_id = absint( $_GET['c'] );
    8381
     
    8785    }
    8886
    89     if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) {
     87    if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) {
    9088        wp_redirect( admin_url('edit-comments.php?error=2') );
    9189        die();
     
    110108
    111109<?php screen_icon(); ?>
    112 <h2><?php echo esc_html( $title ); ?></h2>
     110<h2><?php esc_html_e( 'Moderate Comment' ); ?></h2>
    113111
    114112<?php
     
    181179<tr>
    182180<td><a class="button" href="<?php echo admin_url('edit-comments.php'); ?>"><?php esc_attr_e('No'); ?></a></td>
    183 <td class="textright"><?php submit_button( $button, 'button' ); ?></td>
     181<td class="textright"><input type='submit' class="button" value='<?php echo esc_attr($button); ?>' /></td>
    184182</tr>
    185183</table>
     
    187185<?php wp_nonce_field( $nonce_action ); ?>
    188186<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); ?>' />
    189188<input type='hidden' name='c' value='<?php echo esc_attr($comment->comment_ID); ?>' />
    190189<input type='hidden' name='noredir' value='1' />
     
    214213    if ( !$comment = get_comment($comment_id) )
    215214        comment_footer_die( __('Oops, no comment with this ID.') . sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php') );
    216     if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
     215    if ( !current_user_can('edit_post', $comment->comment_post_ID ) )
    217216        comment_footer_die( __('You are not allowed to edit comments on this post.') );
    218217
Note: See TracChangeset for help on using the changeset viewer.