Changeset 29823
- Timestamp:
- 10/02/2014 08:44:34 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r29822 r29823 1322 1322 } 1323 1323 1324 $add_below = $args['add_below'];1325 $respond_id = $args['respond_id'];1326 $reply_text = $args['reply_text'];1327 1328 1324 $comment = get_comment( $comment ); 1325 1329 1326 if ( empty( $post ) ) { 1330 1327 $post = $comment->comment_post_ID; 1331 1328 } 1329 1332 1330 $post = get_post( $post ); 1333 1331 … … 1337 1335 1338 1336 if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) { 1339 $link = '<a rel="nofollow" class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $args['login_text'] . '</a>'; 1337 $link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>', 1338 esc_url( wp_login_url( get_permalink() ) ), 1339 $args['login_text'] 1340 ); 1340 1341 } else { 1341 $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")' aria-label='" . esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ) . "'>$reply_text</a>"; 1342 $onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "%2$s", "%3$s", "%4$s" )', 1343 $args['add_below'], $comment->comment_ID, $args['respond_id'], $post->ID 1344 ); 1345 1346 $link = sprintf( "<a class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>", 1347 esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $args['respond_id'], 1348 $onclick, 1349 esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ), 1350 $args['reply_text'] 1351 ); 1342 1352 } 1343 1353 /** … … 1405 1415 1406 1416 $args = wp_parse_args($args, $defaults); 1407 $add_below = $args['add_below']; 1408 $respond_id = $args['respond_id']; 1409 $reply_text = $args['reply_text']; 1417 1410 1418 $post = get_post($post); 1411 1419 … … 1415 1423 1416 1424 if ( get_option('comment_registration') && ! is_user_logged_in() ) { 1417 $link = '<a rel="nofollow" href="' . wp_login_url( get_permalink() ) . '">' . $args['login_text'] . '</a>'; 1425 $link = sprintf( '<a rel="nofollow" href="%s">%s</a>', 1426 wp_login_url( get_permalink() ), 1427 $args['login_text'] 1428 ); 1418 1429 } else { 1419 $link = "<a rel='nofollow' class='comment-reply-link' href='" . get_permalink($post->ID) . "#$respond_id' onclick='return addComment.moveForm(\"$add_below-$post->ID\", \"0\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>"; 1430 $onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "0", "%3$s", "%2$s" )', 1431 $args['add_below'], $post->ID, $args['respond_id'] 1432 ); 1433 1434 $link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s'>%s</a>", 1435 get_permalink( $post->ID ) . '#' . $args['respond_id'], 1436 $onclick, 1437 $args['reply_text'] 1438 ); 1420 1439 } 1421 1440 $formatted_link = $args['before'] . $link . $args['after'];
Note: See TracChangeset
for help on using the changeset viewer.