~canonical-sysadmins/wordpress/4.2

« back to all changes in this revision

Viewing changes to wp-admin/edit-form-comment.php

  • Committer: Paul Gear
  • Date: 2015-04-24 01:35:20 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: paul.gear@canonical.com-20150424013520-w4p9ksth76zh6opw
Merge new upstream release 4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
<h2><?php _e('Edit Comment'); ?></h2>
17
17
 
18
18
<div id="poststuff">
19
 
<input type="hidden" name="user_ID" value="<?php echo (int) $user_ID; ?>" />
20
19
<input type="hidden" name="action" value="editedcomment" />
21
20
<input type="hidden" name="comment_ID" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
22
21
<input type="hidden" name="comment_post_ID" value="<?php echo esc_attr( $comment->comment_post_ID ); ?>" />
48
47
        <?php
49
48
                if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
50
49
                        $link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
 
50
                        $author = get_comment_author( $comment->comment_ID );
51
51
                        /** This filter is documented in wp-includes/comment-template.php */
52
 
                        printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link ) );
 
52
                        printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link, $author, $comment->comment_ID ) );
53
53
                } else {
54
54
                        _e( 'URL:' );
55
55
                } ?></td>
100
100
<div class="misc-pub-section curtime misc-pub-curtime">
101
101
<?php
102
102
/* translators: Publish box date format, see http://php.net/date */
103
 
$datef = __( 'M j, Y @ G:i' );
 
103
$datef = __( 'M j, Y @ H:i' );
104
104
$stamp = __('Submitted on: <b>%1$s</b>');
105
105
$date = date_i18n( $datef, strtotime( $comment->comment_date ) );
106
106
?>
107
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>
108
108
<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0); ?></div>
109
109
</div>
 
110
 
 
111
<?php
 
112
$post_id = $comment->comment_post_ID;
 
113
if ( current_user_can( 'edit_post', $post_id ) ) {
 
114
        $post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
 
115
        $post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
 
116
} else {
 
117
        $post_link = esc_html( get_the_title( $post_id ) );
 
118
}
 
119
?>
 
120
 
 
121
<div class="misc-pub-section misc-pub-response-to">
 
122
        <?php printf( __( 'In response to: <b>%s</b>' ), $post_link ); ?>
 
123
</div>
 
124
 
 
125
<?php
 
126
if ( $comment->comment_parent ) :
 
127
        $parent      = get_comment( $comment->comment_parent );
 
128
        $parent_link = esc_url( get_comment_link( $comment->comment_parent ) );
 
129
        $name        = get_comment_author( $parent->comment_ID );
 
130
?>
 
131
<div class="misc-pub-section misc-pub-reply-to">
 
132
        <?php printf( __( 'In reply to: <b><a href="%1$s">%2$s</a></b>' ), $parent_link, $name ); ?>
 
133
</div>
 
134
<?php endif; ?>
 
135
 
110
136
</div> <!-- misc actions -->
111
137
<div class="clear"></div>
112
138
</div>
141
167
 
142
168
do_meta_boxes(null, 'normal', $comment);
143
169
 
 
170
$referer = wp_get_referer();
144
171
?>
145
172
</div>
146
173
 
147
174
<input type="hidden" name="c" value="<?php echo esc_attr($comment->comment_ID) ?>" />
148
175
<input type="hidden" name="p" value="<?php echo esc_attr($comment->comment_post_ID) ?>" />
149
 
<input name="referredby" type="hidden" id="referredby" value="<?php echo esc_url( wp_get_referer() ); ?>" />
 
176
<input name="referredby" type="hidden" id="referredby" value="<?php echo $referer ? esc_url( $referer ) : ''; ?>" />
150
177
<?php wp_original_referer_field(true, 'previous'); ?>
151
178
<input type="hidden" name="noredir" value="1" />
152
179