Make WordPress Core


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

otaku42's comment moderation patches

File:
1 edited

Legend:

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

    r488 r546  
    244244?>
    245245                        <p>
    246                                 <strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments") ?></a>
     246                                <strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comments', '1 comment', "% comments", true) ?></a>
    247247                                <?php
    248248                                if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
    … …  
    279279                                        <!-- comment -->
    280280                                        <li>
     281                                            <?php
     282                                                $comment_status = wp_get_comment_status($comment->comment_ID);
     283                                               
     284                                                if ("unapproved" == $comment_status) {
     285                                                    echo "<span class=\"unapproved\">";
     286                                                }
     287                                            ?>
    281288                                                        <?php comment_date('Y/m/d') ?> @ <?php comment_time() ?>
    282289                                                        <?php
    283290                                                        if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) {
    284291                                                                echo "[ <a href=\"wp-post.php?action=editcomment&amp;comment=".$comment->comment_ID."\">Edit</a>";
    285                                                                 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  \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ]";
     292                                                                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  \'OK\' to delete, \'Cancel\' to stop.')\">Delete</a> ";
     293                                                                if ( ('none' != $comment_status) && ($user_level >= 3) ) {
     294                                                                        if ('approved' == wp_get_comment_status($comment->comment_ID)) {
     295                                                                                echo " - <a href=\"wp-post.php?action=unapprovecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Unapprove</a> ";
     296                                                                        } else {
     297                                                                                echo " - <a href=\"wp-post.php?action=approvecomment&amp;p=".$post->ID."&amp;comment=".$comment->comment_ID."\">Approve</a> ";
     298                                                                        }
     299                                                                }
     300                                                                echo "]";
    286301                                                        } // end if any comments to show
    287302                                                        ?>
    … …  
    289304                                                <strong><?php comment_author() ?> ( <?php comment_author_email_link() ?> / <?php comment_author_url_link() ?> )</strong> (IP: <?php comment_author_IP() ?>)
    290305                                                        <?php comment_text() ?>
     306                                            <?php
     307                                                if ("unapproved" == $comment_status) {
     308                                                    echo "</span>";
     309                                                }
     310                                            ?>
    291311                                        </li>
    292312                                        <!-- /comment -->
Note: See TracChangeset for help on using the changeset viewer.