wp/wp-admin/edit-form-comment.php
changeset 21 48c4eec2b7e6
parent 18 be944660c56a
child 22 8c2e4d02f4ef
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     8 
     8 
     9 // Don't load directly.
     9 // Don't load directly.
    10 if ( ! defined( 'ABSPATH' ) ) {
    10 if ( ! defined( 'ABSPATH' ) ) {
    11 	die( '-1' );
    11 	die( '-1' );
    12 }
    12 }
       
    13 
       
    14 /**
       
    15  * @global WP_Comment $comment Global comment object.
       
    16  */
       
    17 global $comment;
    13 ?>
    18 ?>
    14 <form name="post" action="comment.php" method="post" id="post">
    19 <form name="post" action="comment.php" method="post" id="post">
    15 <?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ); ?>
    20 <?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ); ?>
    16 <div class="wrap">
    21 <div class="wrap">
    17 <h1><?php _e( 'Edit Comment' ); ?></h1>
    22 <h1><?php _e( 'Edit Comment' ); ?></h1>
    40 <?php endif; ?>
    45 <?php endif; ?>
    41 <div id="namediv" class="stuffbox">
    46 <div id="namediv" class="stuffbox">
    42 <div class="inside">
    47 <div class="inside">
    43 <h2 class="edit-comment-author"><?php _e( 'Author' ); ?></h2>
    48 <h2 class="edit-comment-author"><?php _e( 'Author' ); ?></h2>
    44 <fieldset>
    49 <fieldset>
    45 <legend class="screen-reader-text"><?php _e( 'Comment Author' ); ?></legend>
    50 <legend class="screen-reader-text">
       
    51 	<?php
       
    52 	/* translators: Hidden accessibility text. */
       
    53 	_e( 'Comment Author' );
       
    54 	?>
       
    55 </legend>
    46 <table class="form-table editcomment" role="presentation">
    56 <table class="form-table editcomment" role="presentation">
    47 <tbody>
    57 <tbody>
    48 <tr>
    58 <tr>
    49 	<td class="first"><label for="name"><?php _e( 'Name' ); ?></label></td>
    59 	<td class="first"><label for="name"><?php _e( 'Name' ); ?></label></td>
    50 	<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
    60 	<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
    66 </fieldset>
    76 </fieldset>
    67 </div>
    77 </div>
    68 </div>
    78 </div>
    69 
    79 
    70 <div id="postdiv" class="postarea">
    80 <div id="postdiv" class="postarea">
    71 <?php
    81 <label for="content" class="screen-reader-text">
    72 	echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
    82 	<?php
       
    83 	/* translators: Hidden accessibility text. */
       
    84 	_e( 'Comment' );
       
    85 	?>
       
    86 </label>
       
    87 <?php
    73 	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    88 	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    74 	wp_editor(
    89 	wp_editor(
    75 		$comment->comment_content,
    90 		$comment->comment_content,
    76 		'content',
    91 		'content',
    77 		array(
    92 		array(
   110 }
   125 }
   111 ?>
   126 ?>
   112 </span>
   127 </span>
   113 
   128 
   114 <fieldset id="comment-status-radio">
   129 <fieldset id="comment-status-radio">
   115 <legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
   130 <legend class="screen-reader-text">
       
   131 	<?php
       
   132 	/* translators: Hidden accessibility text. */
       
   133 	_e( 'Comment status' );
       
   134 	?>
       
   135 </legend>
   116 <label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
   136 <label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
   117 <label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
   137 <label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
   118 <label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
   138 <label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
   119 </fieldset>
   139 </fieldset>
   120 </div><!-- .misc-pub-section -->
   140 </div><!-- .misc-pub-section -->
   134 <?php
   154 <?php
   135 /* translators: %s: Comment date. */
   155 /* translators: %s: Comment date. */
   136 printf( __( 'Submitted on: %s' ), '<b>' . $submitted . '</b>' );
   156 printf( __( 'Submitted on: %s' ), '<b>' . $submitted . '</b>' );
   137 ?>
   157 ?>
   138 </span>
   158 </span>
   139 <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>
   159 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text">
       
   160 	<?php
       
   161 	/* translators: Hidden accessibility text. */
       
   162 	_e( 'Edit date and time' );
       
   163 	?>
       
   164 </span></a>
   140 <fieldset id='timestampdiv' class='hide-if-js'>
   165 <fieldset id='timestampdiv' class='hide-if-js'>
   141 <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
   166 <legend class="screen-reader-text">
   142 <?php touch_time( ( 'editcomment' === $action ), 0 ); ?>
   167 	<?php
       
   168 	/* translators: Hidden accessibility text. */
       
   169 	_e( 'Date and time' );
       
   170 	?>
       
   171 </legend>
       
   172 <?php
       
   173 /**
       
   174  * @global string $action
       
   175  */
       
   176 global $action;
       
   177 
       
   178 touch_time( ( 'editcomment' === $action ), 0 );
       
   179 ?>
   143 </fieldset>
   180 </fieldset>
   144 </div>
   181 </div>
   145 
   182 
   146 <?php
   183 <?php
   147 $post_id = $comment->comment_post_ID;
   184 $post_id = $comment->comment_post_ID;