Changeset 42343 for trunk/src/wp-admin/edit-form-comment.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-comment.php
r42228 r42343 8 8 9 9 // don't load directly 10 if ( !defined('ABSPATH') ) 11 die('-1'); 10 if ( ! defined( 'ABSPATH' ) ) { 11 die( '-1' ); 12 } 12 13 ?> 13 14 <form name="post" action="comment.php" method="post" id="post"> 14 <?php wp_nonce_field( 'update-comment_' . $comment->comment_ID)?>15 <?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ); ?> 15 16 <div class="wrap"> 16 17 <h1><?php _e( 'Edit Comment' ); ?></h1> … … 37 38 <div class="inside"> 38 39 <fieldset> 39 <legend class="edit-comment-author"><?php _e( 'Author' ) ?></legend>40 <legend class="edit-comment-author"><?php _e( 'Author' ); ?></legend> 40 41 <table class="form-table editcomment"> 41 42 <tbody> … … 53 54 <td class="first"><label for="newcomment_author_url"><?php _e( 'URL:' ); ?></label></td> 54 55 <td> 55 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr( $comment->comment_author_url); ?>" />56 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr( $comment->comment_author_url ); ?>" /> 56 57 </td> 57 58 </tr> … … 67 68 echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>'; 68 69 $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ); 69 wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) ); 70 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 70 wp_editor( 71 $comment->comment_content, 'content', array( 72 'media_buttons' => false, 73 'tinymce' => false, 74 'quicktags' => $quicktags_settings, 75 ) 76 ); 77 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); 78 ?> 71 79 </div> 72 80 </div><!-- /post-body-content --> … … 74 82 <div id="postbox-container-1" class="postbox-container"> 75 83 <div id="submitdiv" class="stuffbox" > 76 <h2><?php _e( 'Status' ) ?></h2>84 <h2><?php _e( 'Status' ); ?></h2> 77 85 <div class="inside"> 78 86 <div class="submitbox" id="submitcomment"> … … 93 101 $datef = __( 'M j, Y @ H:i' ); 94 102 ?> 95 <span id="timestamp"><?php 103 <span id="timestamp"> 104 <?php 96 105 printf( 97 106 /* translators: %s: comment date */ … … 99 108 '<b>' . date_i18n( $datef, strtotime( $comment->comment_date ) ) . '</b>' 100 109 ); 101 ?></span> 110 ?> 111 </span> 102 112 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a> 103 113 <fieldset id='timestampdiv' class='hide-if-js'> … … 110 120 $post_id = $comment->comment_post_ID; 111 121 if ( current_user_can( 'edit_post', $post_id ) ) { 112 $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";122 $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>"; 113 123 $post_link .= esc_html( get_the_title( $post_id ) ) . '</a>'; 114 124 } else { … … 118 128 119 129 <div class="misc-pub-section misc-pub-response-to"> 120 <?php printf( 130 <?php 131 printf( 121 132 /* translators: %s: post link */ 122 133 __( 'In response to: %s' ), 123 134 '<b>' . $post_link . '</b>' 124 ); ?> 135 ); 136 ?> 125 137 </div> 126 138 127 139 <?php 128 140 if ( $comment->comment_parent ) : 129 $parent 141 $parent = get_comment( $comment->comment_parent ); 130 142 if ( $parent ) : 131 143 $parent_link = esc_url( get_comment_link( $parent ) ); … … 133 145 ?> 134 146 <div class="misc-pub-section misc-pub-reply-to"> 135 <?php printf( 147 <?php 148 printf( 136 149 /* translators: %s: comment link */ 137 150 __( 'In reply to: %s' ), 138 151 '<b><a href="' . $parent_link . '">' . $name . '</a></b>' 139 ); ?> 152 ); 153 ?> 140 154 </div> 141 <?php endif; 142 endif; ?> 155 <?php 156 endif; 157 endif; 158 ?> 143 159 144 160 <?php … … 160 176 <div id="major-publishing-actions"> 161 177 <div id="delete-action"> 162 <?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url( "comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>178 <?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url( 'comment.php?action=' . ( ! EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&c=$comment->comment_ID&_wp_original_http_referer=" . urlencode( wp_get_referer() ), 'delete-comment_' . $comment->comment_ID ) . "'>" . ( ! EMPTY_TRASH_DAYS ? __( 'Delete Permanently' ) : __( 'Move to Trash' ) ) . "</a>\n"; ?> 163 179 </div> 164 180 <div id="publishing-action"> … … 186 202 do_action( 'add_meta_boxes_comment', $comment ); 187 203 188 do_meta_boxes( null, 'normal', $comment);204 do_meta_boxes( null, 'normal', $comment ); 189 205 190 206 $referer = wp_get_referer(); … … 192 208 </div> 193 209 194 <input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID)?>" />195 <input type="hidden" name="p" value="<?php echo esc_attr( $comment->comment_post_ID)?>" />210 <input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" /> 211 <input type="hidden" name="p" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" /> 196 212 <input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" /> 197 <?php wp_original_referer_field( true, 'previous'); ?>213 <?php wp_original_referer_field( true, 'previous' ); ?> 198 214 <input type="hidden" name="noredir" value="1" /> 199 215 … … 207 223 try{document.post.name.focus();}catch(e){} 208 224 </script> 209 <?php endif; 225 <?php 226 endif;
Note: See TracChangeset
for help on using the changeset viewer.