wp/wp-admin/edit-form-comment.php
author ymh <ymh.work@gmail.com>
Tue, 09 Jun 2015 11:14:17 +0000
changeset 6 490d5cc509ed
parent 5 5e2f62d02dcd
child 7 cf61fcea0001
permissions -rw-r--r--
update portfolio
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * Edit comment form for inclusion in another file.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * @package WordPress
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 * @subpackage Administration
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
// don't load directly
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
if ( !defined('ABSPATH') )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
	die('-1');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
<form name="post" action="comment.php" method="post" id="post">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
<?php wp_nonce_field('update-comment_' . $comment->comment_ID) ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
<div class="wrap">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
<h2><?php _e('Edit Comment'); ?></h2>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
<div id="poststuff">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
<input type="hidden" name="action" value="editedcomment" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
<input type="hidden" name="comment_ID" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
<input type="hidden" name="comment_post_ID" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
<div id="post-body" class="metabox-holder columns-2">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
<div id="post-body-content" class="edit-form-section">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
<div id="namediv" class="stuffbox">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
<h3><label for="name"><?php _e( 'Author' ) ?></label></h3>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
<div class="inside">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
<table class="form-table editcomment">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
<tbody>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    30
<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
	<td class="first"><?php _e( 'Name:' ); ?></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
	<td><input type="text" name="newcomment_author" size="30" value="<?php echo esc_attr( $comment->comment_author ); ?>" id="name" /></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    34
<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
	<td class="first">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
	<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
		if ( $comment->comment_author_email ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
			printf( __( 'E-mail (%s):' ), get_comment_author_email_link( __( 'send e-mail' ), '', '' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
		} else {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
			_e( 'E-mail:' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
		}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
?></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
	<td><input type="text" name="newcomment_author_email" size="30" value="<?php echo $comment->comment_author_email; ?>" id="email" /></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
</tr>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    45
<tr>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
	<td class="first">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
	<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
		if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
			$link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    50
			$author = get_comment_author( $comment->comment_ID );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    51
			/** This filter is documented in wp-includes/comment-template.php */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    52
			printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link, $author, $comment->comment_ID ) );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
		} else {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
			_e( 'URL:' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
		} ?></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
	<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); ?>" /></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
</tbody>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
<br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
<div id="postdiv" class="postarea">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
	$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
	wp_editor( $comment->comment_content, 'content', array( 'media_buttons' => false, 'tinymce' => false, 'quicktags' => $quicktags_settings ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
	wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
</div><!-- /post-body-content -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
<div id="postbox-container-1" class="postbox-container">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
<div id="submitdiv" class="stuffbox" >
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
    74
<h3><span class="hndle"><?php _e('Status') ?></span></h3>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
<div class="inside">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
<div class="submitbox" id="submitcomment">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
<div id="minor-publishing">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
<div id="minor-publishing-actions">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
<div id="preview-action">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
<a class="preview button" href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View Comment'); ?></a>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
<div class="clear"></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
<div id="misc-publishing-actions">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
<div class="misc-pub-section misc-pub-comment-status" id="comment-status-radio">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
<label class="approved"><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php /* translators: comment type radio button */ _ex('Approved', 'adjective') ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
<label class="waiting"><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php /* translators: comment type radio button */ _ex('Pending', 'adjective') ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
<label class="spam"><input type="radio"<?php checked( $comment->comment_approved, 'spam' ); ?> name="comment_status" value="spam" /><?php /* translators: comment type radio button */ _ex('Spam', 'adjective'); ?></label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
<?php if ( $ip = get_comment_author_IP() ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
<div class="misc-pub-section misc-pub-comment-author-ip">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
	<?php _e( 'IP address:' ); ?> <strong><a href="<?php echo esc_url( sprintf( 'http://whois.arin.net/rest/ip/%s', $ip ) ); ?>"><?php echo esc_html( $ip ); ?></a></strong>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
<div class="misc-pub-section curtime misc-pub-curtime">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
<?php
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   102
/* translators: Publish box date format, see http://php.net/date */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   103
$datef = __( 'M j, Y @ H:i' );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
$stamp = __('Submitted on: <b>%1$s</b>');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
<span id="timestamp"><?php printf($stamp, $date); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
</div>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   110
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   111
<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   112
$post_id = $comment->comment_post_ID;
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   113
if ( current_user_can( 'edit_post', $post_id ) ) {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   114
	$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   115
	$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   116
} else {
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   117
	$post_link = esc_html( get_the_title( $post_id ) );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   118
}
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   119
?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   120
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   121
<div class="misc-pub-section misc-pub-response-to">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   122
	<?php printf( __( 'In response to: <b>%s</b>' ), $post_link ); ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   123
</div>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   124
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   125
<?php
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   126
if ( $comment->comment_parent ) :
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   127
	$parent      = get_comment( $comment->comment_parent );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   128
	$parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   129
	$name        = get_comment_author( $parent->comment_ID );
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   130
?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   131
<div class="misc-pub-section misc-pub-reply-to">
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   132
	<?php printf( __( 'In reply to: <b><a href="%1$s">%2$s</a></b>' ), $parent_link, $name ); ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   133
</div>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   134
<?php endif; ?>
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   135
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
</div> <!-- misc actions -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
<div class="clear"></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
<div id="major-publishing-actions">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
<div id="delete-action">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
<?php echo "<a class='submitdelete deletion' href='" . wp_nonce_url("comment.php?action=" . ( !EMPTY_TRASH_DAYS ? 'deletecomment' : 'trashcomment' ) . "&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . urlencode(wp_get_referer()), 'delete-comment_' . $comment->comment_ID) . "'>" . ( !EMPTY_TRASH_DAYS ? __('Delete Permanently') : __('Move to Trash') ) . "</a>\n"; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
<div id="publishing-action">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
<?php submit_button( __( 'Update' ), 'primary', 'save', false ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
<div class="clear"></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
</div><!-- /submitdiv -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
<div id="postbox-container-2" class="postbox-container">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
<?php
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   156
/** This action is documented in wp-admin/edit-form-advanced.php */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   157
do_action( 'add_meta_boxes', 'comment', $comment );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   159
/**
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   160
 * Fires when comment-specific meta boxes are added.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   161
 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   162
 * @since 3.0.0
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   163
 *
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   164
 * @param object $comment Comment object.
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   165
 */
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   166
do_action( 'add_meta_boxes_comment', $comment );
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
do_meta_boxes(null, 'normal', $comment);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   170
$referer = wp_get_referer();
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   176
<input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
<?php wp_original_referer_field(true, 'previous'); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
<input type="hidden" name="noredir" value="1" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
</div><!-- /post-body -->
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   185
<?php if ( ! wp_is_mobile() ) : ?>
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   186
<script type="text/javascript">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   187
try{document.post.name.focus();}catch(e){}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   188
</script>
5
5e2f62d02dcd upgrade wordpress + plugins
ymh <ymh.work@gmail.com>
parents: 0
diff changeset
   189
<?php endif;