wp/wp-admin/edit-form-comment.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
     4  *
     4  *
     5  * @package WordPress
     5  * @package WordPress
     6  * @subpackage Administration
     6  * @subpackage Administration
     7  */
     7  */
     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 ?>
    13 ?>
    14 <form name="post" action="comment.php" method="post" id="post">
    14 <form name="post" action="comment.php" method="post" id="post">
    85 </div>
    85 </div>
    86 </div><!-- /post-body-content -->
    86 </div><!-- /post-body-content -->
    87 
    87 
    88 <div id="postbox-container-1" class="postbox-container">
    88 <div id="postbox-container-1" class="postbox-container">
    89 <div id="submitdiv" class="stuffbox" >
    89 <div id="submitdiv" class="stuffbox" >
    90 <h2><?php _e( 'Status' ); ?></h2>
    90 <h2><?php _e( 'Save' ); ?></h2>
    91 <div class="inside">
    91 <div class="inside">
    92 <div class="submitbox" id="submitcomment">
    92 <div class="submitbox" id="submitcomment">
    93 <div id="minor-publishing">
    93 <div id="minor-publishing">
    94 
    94 
    95 <div id="misc-publishing-actions">
    95 <div id="misc-publishing-actions">
    96 
    96 
    97 <fieldset class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
    97 <div class="misc-pub-section misc-pub-comment-status" id="comment-status">
       
    98 <?php _e( 'Status:' ); ?> <span id="comment-status-display">
       
    99 <?php
       
   100 switch ( $comment->comment_approved ) {
       
   101 	case '1':
       
   102 		_e( 'Approved' );
       
   103 		break;
       
   104 	case '0':
       
   105 		_e( 'Pending' );
       
   106 		break;
       
   107 	case 'spam':
       
   108 		_e( 'Spam' );
       
   109 		break;
       
   110 }
       
   111 ?>
       
   112 </span>
       
   113 
       
   114 <fieldset id="comment-status-radio">
    98 <legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
   115 <legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
    99 <label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
   116 <label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
   100 <label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', '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 />
   101 <label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
   118 <label><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php _ex( 'Spam', 'comment status' ); ?></label>
   102 </fieldset>
   119 </fieldset>
       
   120 </div><!-- .misc-pub-section -->
   103 
   121 
   104 <div class="misc-pub-section curtime misc-pub-curtime">
   122 <div class="misc-pub-section curtime misc-pub-curtime">
   105 <?php
   123 <?php
   106 /* translators: Publish box date format, see https://secure.php.net/date */
   124 $submitted = sprintf(
   107 $datef = __( 'M j, Y @ H:i' );
   125 	/* translators: 1: Comment date, 2: Comment time. */
       
   126 	__( '%1$s at %2$s' ),
       
   127 	/* translators: Publish box date format, see https://www.php.net/date */
       
   128 	date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $comment->comment_date ) ),
       
   129 	/* translators: Publish box time format, see https://www.php.net/date */
       
   130 	date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $comment->comment_date ) )
       
   131 );
   108 ?>
   132 ?>
   109 <span id="timestamp">
   133 <span id="timestamp">
   110 <?php
   134 <?php
   111 printf(
   135 /* translators: %s: Comment date. */
   112 	/* translators: %s: comment date */
   136 printf( __( 'Submitted on: %s' ), '<b>' . $submitted . '</b>' );
   113 	__( 'Submitted on: %s' ),
       
   114 	'<b>' . date_i18n( $datef, strtotime( $comment->comment_date ) ) . '</b>'
       
   115 );
       
   116 ?>
   137 ?>
   117 </span>
   138 </span>
   118 <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>
   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>
   119 <fieldset id='timestampdiv' class='hide-if-js'>
   140 <fieldset id='timestampdiv' class='hide-if-js'>
   120 <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
   141 <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
   133 ?>
   154 ?>
   134 
   155 
   135 <div class="misc-pub-section misc-pub-response-to">
   156 <div class="misc-pub-section misc-pub-response-to">
   136 	<?php
   157 	<?php
   137 	printf(
   158 	printf(
   138 		/* translators: %s: post link */
   159 		/* translators: %s: Post link. */
   139 		__( 'In response to: %s' ),
   160 		__( 'In response to: %s' ),
   140 		'<b>' . $post_link . '</b>'
   161 		'<b>' . $post_link . '</b>'
   141 	);
   162 	);
   142 	?>
   163 	?>
   143 </div>
   164 </div>
   150 		$name        = get_comment_author( $parent );
   171 		$name        = get_comment_author( $parent );
   151 		?>
   172 		?>
   152 	<div class="misc-pub-section misc-pub-reply-to">
   173 	<div class="misc-pub-section misc-pub-reply-to">
   153 		<?php
   174 		<?php
   154 		printf(
   175 		printf(
   155 			/* translators: %s: comment link */
   176 			/* translators: %s: Comment link. */
   156 			__( 'In reply to: %s' ),
   177 			__( 'In reply to: %s' ),
   157 			'<b><a href="' . $parent_link . '">' . $name . '</a></b>'
   178 			'<b><a href="' . $parent_link . '">' . $name . '</a></b>'
   158 		);
   179 		);
   159 		?>
   180 		?>
   160 	</div>
   181 	</div>
   167 	/**
   188 	/**
   168 	 * Filters miscellaneous actions for the edit comment form sidebar.
   189 	 * Filters miscellaneous actions for the edit comment form sidebar.
   169 	 *
   190 	 *
   170 	 * @since 4.3.0
   191 	 * @since 4.3.0
   171 	 *
   192 	 *
   172 	 * @param string $html    Output HTML to display miscellaneous action.
   193 	 * @param string     $html    Output HTML to display miscellaneous action.
   173 	 * @param object $comment Current comment object.
   194 	 * @param WP_Comment $comment Current comment object.
   174 	 */
   195 	 */
   175 	echo apply_filters( 'edit_comment_misc_actions', '', $comment );
   196 	echo apply_filters( 'edit_comment_misc_actions', '', $comment );
   176 ?>
   197 ?>
   177 
   198 
   178 </div> <!-- misc actions -->
   199 </div> <!-- misc actions -->