Make WordPress Core

Changeset 6298


Ignore:
Timestamp:
10/31/2007 01:37:58 AM (16 years ago)
Author:
ryan
Message:

Fix comment delete links and ajax moderation. Props mdawaffe. fixes #5288

File:
1 edited

Legend:

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

    r6026 r6298  
    148148        <?php wp_nonce_field( 'moderate-comments' ); ?>
    149149        <input type="hidden" name="action" value="update" />
    150         <ol id="the-comments-list" class="commentlist">
     150        <ol id="the-comment-list" class="list:comment commentlist">
    151151    <?php
    152152        $i = 0;
     
    158158                $class .= ' alternate';
    159159            }
     160
     161            $delete_url  = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
     162            $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );
     163            $spam_url    = clean_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
     164
    160165        ?>
    161166            <li id="comment-<?php comment_ID(); ?>" class="<?php echo $class; ?>">
     
    171176                </p>
    172177
    173                 <p><small>
    174                     <?php comment_date( __( 'M j, g:i A' ) ); ?> &#8212;
    175                     [ <a href="comment.php?action=editcomment&amp;c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a> |
    176                     <a href="post.php?action=deletecomment&amp;p=<?php echo $comment->comment_post_ID; ?>" title="<?php _e( 'Delete this comment' ); ?>" onclick="return deleteSomething( 'comment', <?php comment_ID(); ?>, '<?php echo js_escape( sprintf( __( "You are about to delete this comment by '%s'.\n'OK' to delete, 'Cancel' to stop." ), get_comment_author() ) ); ?>', theCommentList );"><?php _e( 'Delete' ); ?></a> ] &#8212;
     178                <p>
     179                    <?php comment_date( __( 'M j, g:i A' ) ); ?>
     180                    &#8212;
     181                    [
     182                    <a href="comment.php?action=editcomment&amp;c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a>
     183                    |
     184                    <a href="<?php echo $delete_url; ?>" class="delete:the-comment-list:comment-<?php comment_ID(); ?>" title="<?php _e( 'Delete this comment' ); ?>"><?php _e( 'Delete' ); ?></a>
     185                    |
     186                    <a href="<?php echo $approve_url; ?>" class="delete:the-comment-list:comment-<?php comment_ID(); ?>:33FF33:action=dim-comment" title="<?php _e( 'Approve this comment' ); ?>"><?php _e( 'Approve' ); ?></a>
     187                    |
     188                    <a href="<?php echo $spam_url; ?>" class="delete:the-comment-list:comment-<?php comment_ID(); ?>::spam=1" title="<?php _e( 'Mark this comment as spam' ); ?>"><?php _e( 'Spam' ); ?></a>
     189                    ]
     190                    &#8212;
    177191                    <a href="<?php echo get_permalink( $comment->comment_post_ID ); ?>" title="<?php _e( 'View the post' ); ?>"><?php printf( __( 'View post &#8220;%s&#8221;' ), get_the_title( $comment->comment_post_ID ) ); ?></a>
    178                 </small></p>
    179 
    180                 <p><small>
     192                </p>
     193
     194                <p>
    181195                    <?php _e( 'Bulk action:' ); ?>
    182196                    <label for="comment-<?php comment_ID(); ?>-approve"><input type="radio" name="comment[<?php comment_ID(); ?>]" id="comment-<?php comment_ID(); ?>-approve" value="approve" /> <?php _e( 'Approve' ); ?></label> &nbsp;
     
    184198                    <label for="comment-<?php comment_ID(); ?>-delete"><input type="radio" name="comment[<?php comment_ID(); ?>]" id="comment-<?php comment_ID(); ?>-delete" value="delete" /> <?php _e( 'Delete' ); ?></label> &nbsp;
    185199                    <label for="comment-<?php comment_ID(); ?>-nothing"><input type="radio" name="comment[<?php comment_ID(); ?>]" id="comment-<?php comment_ID(); ?>-nothing" value="later" checked="checked" /> <?php _e( 'No action' ); ?></label>
    186                 </small></p>
     200                </p>
    187201            </li>
    188202        <?php
Note: See TracChangeset for help on using the changeset viewer.