root/trunk/wp-admin/edit-form-comment.php

Revision 1522, 5.4 kB (checked in by donncha, 3 days ago)

WP Merge with revision 9730

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Edit comment form for inclusion in another file.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /**
10  * @var string
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 <h2><?php _e('Edit Comment'); ?></h2>
22
23 <div id="poststuff" class="metabox-holder">
24 <input type="hidden" name="user_ID" value="<?php echo (int) $user_ID ?>" />
25 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' />
26 <?php
27
28 $email = attribute_escape( $comment->comment_author_email );
29 $url = attribute_escape( $comment->comment_author_url );
30 // add_meta_box('submitdiv', __('Save'), 'comment_submit_meta_box', 'comment', 'side', 'core');
31 ?>
32
33 <div id="side-info-column" class="inner-sidebar">
34 <div id="submitdiv" class="stuffbox" >
35 <h3><span class='hndle'><?php _e('Status') ?></span></h3>
36 <div class="inside">
37 <div class="submitbox" id="submitcomment">
38 <div id="minor-publishing">
39
40 <div id="minor-publishing-actions">
41 <div id="preview=action">
42 <a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
43 </div>
44 <div class="clear"></div>
45 </div>
46
47 <div id="misc-publishing-actions">
48
49 <div class="misc-pub-section" id="comment-status-radio">
50 <label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _e('Approved') ?></label><br />
51 <label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _e('Pending') ?></label><br />
52 <label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php echo _c('Spam|verb'); ?></label>
53 </div>
54
55 <div class="misc-pub-section curtime misc-pub-section-last">
56 <?php
57 $datef = _c( 'M j, Y @ G:i|Publish box date format');
58 $stamp = __('Submitted on: <b>%1$s</b>');
59 $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
60 ?>
61 <span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a>
62 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
63 </div>
64 </div> <!-- misc actions -->
65 <div class="clear"></div>
66 </div>
67
68 <div id="major-publishing-actions">
69 <div id="delete-action">
70 <a class='submitdelete deletion' href='<?php echo wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_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'); ?></a>
71 </div>
72 <div id="publishing-action">
73 <input type="submit" name="save" value="<?php _e('Update Comment'); ?>" tabindex="4" class="button-primary" />
74 </div>
75 <div class="clear"></div>
76 </div>
77 </div>
78 </div>
79 </div>
80 </div>
81
82 <div id="post-body" class="has-sidebar">
83 <div id="post-body-content" class="has-sidebar-content">
84
85 <div id="namediv" class="stuffbox">
86 <h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
87 <div class="inside">
88 <table class="form-table">
89 <tbody>
90 <tr valign="top">
91     <td class="first"><?php _e( 'Name:' ); ?></td>
92     <td><input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" /></td>
93 </tr>
94 <tr valign="top">
95     <td class="first">
96     <?php
97         if ( $email ) {
98             printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
99         } else {
100             _e( 'E-mail:' );
101         }
102 ?></td>
103     <td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $email; ?>" tabindex="2" id="email" /></td>
104 </tr>
105 <tr valign="top">
106     <td class="first">
107     <?php
108         $url = get_comment_author_url();
109         if ( ! empty( $url ) && 'http://' != $url ) {
110             $link = "<a href='$url' rel='external nofollow' target='_blank'>" . __('visit site') . "</a>";
111             printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) );
112         } else {
113             _e( 'URL:' );
114         } ?></td>
115     <td><input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" value="<?php echo $url; ?>" tabindex="3" /></td>
116 </tr>
117 </tbody>
118 </table>
119 <br />
120 </div>
121 </div>
122
123 <div id="postdiv" class="postarea">
124 <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
125 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
126 </div>
127
128 <?php do_meta_boxes('comment', 'normal', $comment); ?>
129
130 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
131 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
132 <input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
133 <?php wp_original_referer_field(true, 'previous'); ?>
134 <input type="hidden" name="noredir" value="1" />
135
136 </div>
137 </div>
138 </div>
139 </div>
140 </form>
141
142 <script type="text/javascript">
143 try{document.post.name.focus();}catch(e){}
144 </script>
145
Note: See TracBrowser for help on using the browser.