mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -7,11 +7,12 @@
|
||||
*/
|
||||
|
||||
// don't load directly
|
||||
if ( !defined('ABSPATH') )
|
||||
die('-1');
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
die( '-1' );
|
||||
}
|
||||
?>
|
||||
<form name="post" action="comment.php" method="post" id="post">
|
||||
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
|
||||
<?php wp_nonce_field( 'update-comment_' . $comment->comment_ID ); ?>
|
||||
<div class="wrap">
|
||||
<h1><?php _e( 'Edit Comment' ); ?></h1>
|
||||
|
||||
@@ -36,7 +37,7 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
|
||||
<div id="namediv" class="stuffbox">
|
||||
<div class="inside">
|
||||
<fieldset>
|
||||
<legend class="edit-comment-author"><?php _e( 'Author' ) ?></legend>
|
||||
<legend class="edit-comment-author"><?php _e( 'Author' ); ?></legend>
|
||||
<table class="form-table editcomment">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -52,7 +53,7 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
|
||||
<tr>
|
||||
<td class="first"><label for="newcomment_author_url"><?php _e( 'URL:' ); ?></label></td>
|
||||
<td>
|
||||
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr($comment->comment_author_url); ?>" />
|
||||
<input type="text" id="newcomment_author_url" name="newcomment_author_url" size="30" class="code" value="<?php echo esc_attr( $comment->comment_author_url ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -66,14 +67,21 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
|
||||
<?php
|
||||
echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
|
||||
$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
|
||||
wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
|
||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
||||
wp_editor(
|
||||
$comment->comment_content, 'content', array(
|
||||
'media_buttons' => false,
|
||||
'tinymce' => false,
|
||||
'quicktags' => $quicktags_settings,
|
||||
)
|
||||
);
|
||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||
?>
|
||||
</div>
|
||||
</div><!-- /post-body-content -->
|
||||
|
||||
<div id="postbox-container-1" class="postbox-container">
|
||||
<div id="submitdiv" class="stuffbox" >
|
||||
<h2><?php _e( 'Status' ) ?></h2>
|
||||
<h2><?php _e( 'Status' ); ?></h2>
|
||||
<div class="inside">
|
||||
<div class="submitbox" id="submitcomment">
|
||||
<div id="minor-publishing">
|
||||
@@ -92,13 +100,15 @@ if ( 'approved' === wp_get_comment_status( $comment ) && $comment->comment_post_
|
||||
/* translators: Publish box date format, see https://secure.php.net/date */
|
||||
$datef = __( 'M j, Y @ H:i' );
|
||||
?>
|
||||
<span id="timestamp"><?php
|
||||
<span id="timestamp">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: comment date */
|
||||
__( 'Submitted on: %s' ),
|
||||
'<b>' . date_i18n( $datef, strtotime( $comment->comment_date ) ) . '</b>'
|
||||
);
|
||||
?></span>
|
||||
?>
|
||||
</span>
|
||||
<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>
|
||||
<fieldset id='timestampdiv' class='hide-if-js'>
|
||||
<legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
|
||||
@@ -109,7 +119,7 @@ printf(
|
||||
<?php
|
||||
$post_id = $comment->comment_post_ID;
|
||||
if ( current_user_can( 'edit_post', $post_id ) ) {
|
||||
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
|
||||
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
|
||||
$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
|
||||
} else {
|
||||
$post_link = esc_html( get_the_title( $post_id ) );
|
||||
@@ -117,29 +127,35 @@ if ( current_user_can( 'edit_post', $post_id ) ) {
|
||||
?>
|
||||
|
||||
<div class="misc-pub-section misc-pub-response-to">
|
||||
<?php printf(
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: post link */
|
||||
__( 'In response to: %s' ),
|
||||
'<b>' . $post_link . '</b>'
|
||||
); ?>
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( $comment->comment_parent ) :
|
||||
$parent = get_comment( $comment->comment_parent );
|
||||
$parent = get_comment( $comment->comment_parent );
|
||||
if ( $parent ) :
|
||||
$parent_link = esc_url( get_comment_link( $parent ) );
|
||||
$name = get_comment_author( $parent );
|
||||
?>
|
||||
<div class="misc-pub-section misc-pub-reply-to">
|
||||
<?php printf(
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: comment link */
|
||||
__( 'In reply to: %s' ),
|
||||
'<b><a href="' . $parent_link . '">' . $name . '</a></b>'
|
||||
); ?>
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<?php endif;
|
||||
endif; ?>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php
|
||||
/**
|
||||
@@ -159,7 +175,7 @@ endif; ?>
|
||||
|
||||
<div id="major-publishing-actions">
|
||||
<div id="delete-action">
|
||||
<?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"; ?>
|
||||
<?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"; ?>
|
||||
</div>
|
||||
<div id="publishing-action">
|
||||
<?php submit_button( __( 'Update' ), 'primary large', 'save', false ); ?>
|
||||
@@ -185,16 +201,16 @@ do_action( 'add_meta_boxes', 'comment', $comment );
|
||||
*/
|
||||
do_action( 'add_meta_boxes_comment', $comment );
|
||||
|
||||
do_meta_boxes(null, 'normal', $comment);
|
||||
do_meta_boxes( null, 'normal', $comment );
|
||||
|
||||
$referer = wp_get_referer();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
|
||||
<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
|
||||
<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
|
||||
<input type="hidden" name="p" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
|
||||
<?php wp_original_referer_field(true, 'previous'); ?>
|
||||
<?php wp_original_referer_field( true, 'previous' ); ?>
|
||||
<input type="hidden" name="noredir" value="1" />
|
||||
|
||||
</div><!-- /post-body -->
|
||||
@@ -206,4 +222,5 @@ $referer = wp_get_referer();
|
||||
<script type="text/javascript">
|
||||
try{document.post.name.focus();}catch(e){}
|
||||
</script>
|
||||
<?php endif;
|
||||
<?php
|
||||
endif;
|
||||
|
||||
Reference in New Issue
Block a user