Make WordPress Core


Ignore:
Timestamp:
11/12/2003 03:22:47 PM (22 years ago)
Author:
emc3
Message:

otaku42's comment moderation patches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/wp-edit.showposts.php

    r514 r546  
    247247        start_b2(); ?>
    248248            <p>
    249                 <strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="wp-post.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments") ?></a>
     249                <strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="wp-post.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>
    250250                <?php
    251251                if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
     
    287287                            if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
    288288                                echo "[ <a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
    289                                 echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n  \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ]";
     289                                echo " - <a href=\"wp-post.php?action=deletecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return confirm('You are about to delete this comment by \'".$comment->comment_author."\'\\n  \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";
     290                                if ( ('none' != get_settings("comment_moderation")) && ($user_level >= 3) ) {
     291                                    if ('approved' == wp_get_comment_status($comment->comment_ID)) {
     292                                        echo " - <a href=\"b2edit.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
     293                                    } else {
     294                                        echo " - <a href=\"b2edit.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
     295                                    }
     296                                }
     297                                echo " ]";
    290298                            } // end if any comments to show
    291299                            ?>
Note: See TracChangeset for help on using the changeset viewer.