| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
$submitbutton_text = __('Edit Comment'); |
|---|
| 13 |
$toprow_title = sprintf(__('Editing Comment # %s'), $comment->comment_ID); |
|---|
| 14 |
$form_action = 'editedcomment'; |
|---|
| 15 |
$form_extra = "' />\n<input type='hidden' name='comment_ID' value='" . $comment->comment_ID . "' />\n<input type='hidden' name='comment_post_ID' value='" . $comment->comment_post_ID; |
|---|
| 16 |
?> |
|---|
| 17 |
|
|---|
| 18 |
<form name="post" action="comment.php" method="post" id="post"> |
|---|
| 19 |
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?> |
|---|
| 20 |
<div class="wrap"> |
|---|
| 21 |
|
|---|
| 22 |
<div id="poststuff" class="metabox-holder"> |
|---|
| 23 |
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" /> |
|---|
| 24 |
<input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> |
|---|
| 25 |
<?php |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
function comment_submit_meta_box($comment) { |
|---|
| 38 |
?> |
|---|
| 39 |
<div class="submitbox" id="submitcomment"> |
|---|
| 40 |
<div class="inside-submitbox"> |
|---|
| 41 |
|
|---|
| 42 |
<p><strong><?php _e('Approval Status') ?></strong></p> |
|---|
| 43 |
<p id='comment-status-radio'> |
|---|
| 44 |
<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label> |
|---|
| 45 |
<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label> |
|---|
| 46 |
<label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _e('Spam') ?></label> |
|---|
| 47 |
</p> |
|---|
| 48 |
|
|---|
| 49 |
<div class="insidebox" id="deletebutton"> |
|---|
| 50 |
<?php |
|---|
| 51 |
echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?> |
|---|
| 52 |
</div> |
|---|
| 53 |
|
|---|
| 54 |
<?php |
|---|
| 55 |
$stamp = __('%1$s at %2$s'); |
|---|
| 56 |
$date = mysql2date(get_option('date_format'), $comment->comment_date); |
|---|
| 57 |
$time = mysql2date(get_option('time_format'), $comment->comment_date); |
|---|
| 58 |
?> |
|---|
| 59 |
<div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span> |
|---|
| 60 |
<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> |
|---|
| 61 |
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div> |
|---|
| 62 |
|
|---|
| 63 |
</div> |
|---|
| 64 |
|
|---|
| 65 |
<p class="submit"> |
|---|
| 66 |
<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> |
|---|
| 67 |
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a> |
|---|
| 68 |
</p> |
|---|
| 69 |
</div> |
|---|
| 70 |
<?php |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|
| 73 |
?> |
|---|
| 74 |
|
|---|
| 75 |
<div id="side-info-column" class="inner-sidebar"> |
|---|
| 76 |
<div id="submitdiv" class="stuffbox" > |
|---|
| 77 |
<h3><span class='hndle'>Save</span></h3> |
|---|
| 78 |
|
|---|
| 79 |
<div class="submitbox" id="submitcomment"> |
|---|
| 80 |
<div class="inside-submitbox"> |
|---|
| 81 |
|
|---|
| 82 |
<div class="insidebox"> |
|---|
| 83 |
<div id='comment-status-radio'> |
|---|
| 84 |
<p><strong><?php _e('This comment is') ?></strong></p> |
|---|
| 85 |
<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br /> |
|---|
| 86 |
<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Awaiting Moderation') ?></label><br /> |
|---|
| 87 |
<label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _e('Spam') ?></label> |
|---|
| 88 |
</div> |
|---|
| 89 |
</div> |
|---|
| 90 |
|
|---|
| 91 |
<div class="insidebox" id="deletebutton"> |
|---|
| 92 |
<?php |
|---|
| 93 |
echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&c=$comment->comment_ID&_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>"; ?> |
|---|
| 94 |
</div> |
|---|
| 95 |
|
|---|
| 96 |
<?php |
|---|
| 97 |
$stamp = __('%1$s at %2$s'); |
|---|
| 98 |
$date = mysql2date(get_option('date_format'), $comment->comment_date); |
|---|
| 99 |
$time = mysql2date(get_option('time_format'), $comment->comment_date); |
|---|
| 100 |
?> |
|---|
| 101 |
<div class="insidebox curtime"><span id="timestamp"><?php printf($stamp, $date, $time); ?></span> <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a> |
|---|
| 102 |
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div></div> |
|---|
| 103 |
|
|---|
| 104 |
</div> |
|---|
| 105 |
|
|---|
| 106 |
<p class="submit"> |
|---|
| 107 |
<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" /> |
|---|
| 108 |
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a> |
|---|
| 109 |
</p> |
|---|
| 110 |
</div> |
|---|
| 111 |
|
|---|
| 112 |
</div> |
|---|
| 113 |
</div> |
|---|
| 114 |
|
|---|
| 115 |
<div id="post-body" class="<?php echo $side_meta_boxes ? 'has-sidebar' : ''; ?>"> |
|---|
| 116 |
<div id="post-body-content" class="has-sidebar-content"> |
|---|
| 117 |
|
|---|
| 118 |
<div id="namediv" class="stuffbox"> |
|---|
| 119 |
<h3><label for="name"><?php _e('Name') ?></label></h3> |
|---|
| 120 |
<div class="inside"> |
|---|
| 121 |
<input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /> |
|---|
| 122 |
</div> |
|---|
| 123 |
</div> |
|---|
| 124 |
|
|---|
| 125 |
<div id="postdiv" class="postarea"> |
|---|
| 126 |
<h3><?php _e('Comment') ?></h3> |
|---|
| 127 |
<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?> |
|---|
| 128 |
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> |
|---|
| 129 |
</div> |
|---|
| 130 |
|
|---|
| 131 |
<div id="emaildiv" class="stuffbox"> |
|---|
| 132 |
<h3><label for="email"><?php _e('E-mail') ?></label></h3> |
|---|
| 133 |
<div class="inside"> |
|---|
| 134 |
<input type="text" name="newcomment_author_email" size="30" value="<?php echo attribute_escape( $comment->comment_author_email ); ?>" tabindex="2" id="email" /> |
|---|
| 135 |
</div> |
|---|
| 136 |
</div> |
|---|
| 137 |
|
|---|
| 138 |
<div id="uridiv" class="stuffbox"> |
|---|
| 139 |
<h3><label for="newcomment_author_url"><?php _e('URL') ?></label></h3> |
|---|
| 140 |
<div class="inside"> |
|---|
| 141 |
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo attribute_escape( $comment->comment_author_url ); ?>" tabindex="3" /> |
|---|
| 142 |
</div> |
|---|
| 143 |
</div> |
|---|
| 144 |
|
|---|
| 145 |
<?php do_meta_boxes('comment', 'normal', $comment); ?> |
|---|
| 146 |
|
|---|
| 147 |
<input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" /> |
|---|
| 148 |
<input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> |
|---|
| 149 |
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" /> |
|---|
| 150 |
<?php wp_original_referer_field(true, 'previous'); ?> |
|---|
| 151 |
<input type="hidden" name="noredir" value="1" /> |
|---|
| 152 |
|
|---|
| 153 |
</div> |
|---|
| 154 |
</div> |
|---|
| 155 |
</div> |
|---|
| 156 |
</div> |
|---|
| 157 |
</form> |
|---|
| 158 |
|
|---|
| 159 |
<script type="text/javascript"> |
|---|
| 160 |
try{document.post.name.focus();}catch(e){} |
|---|
| 161 |
</script> |
|---|
| 162 |
|
|---|