diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 66a9ada93..10c7e2842 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -905,7 +905,7 @@ function comments_popup_link( $zero = 'No Comments', $one = '1 Comment', $more = * @param int $post Optional. Post that the comment is going to be displayed on. * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. */ -function comment_reply_link($args = array(), $comment = null, $post = null) { +function get_comment_reply_link($args = array(), $comment = null, $post = null) { global $user_ID; $defaults = array('add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __('Reply'), @@ -931,7 +931,38 @@ function comment_reply_link($args = array(), $comment = null, $post = null) { else $link = "comment_ID ) ) . "#respond' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\")'>$reply_text"; - return $before . $link . $after; + return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post); +} + +/** + * Displays the HTML content for reply to comment link. + * + * @since 2.7.0 + * @see get_comment_reply_link() Echoes result + * + * @param array $args Optional. Override default options. + * @param int $comment Optional. Comment being replied to. + * @param int $post Optional. Post that the comment is going to be displayed on. + * @return string|bool|null Link to show comment form, if successful. False, if comments are closed. + */ +function comment_reply_link($args = array(), $comment = null, $post = null) { + echo get_comment_reply_link($args, $comment, $post); +} + +/** + * Retrieve HTML content for cancel comment reply link. + * + * @since 2.7.0 + * + * @param string $text Optional. Text to display for cancel reply link. + */ +function get_cancel_comment_reply_link($text = '') { + if ( empty($text) ) + $text = __('Click here to cancel reply.'); + + $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"'; + $link = wp_specialchars( remove_query_arg('replytocom') ) . '#respond'; + return apply_filters('cancel_comment_reply_link', '' . $text . '', $link, $text); } /** @@ -942,12 +973,7 @@ function comment_reply_link($args = array(), $comment = null, $post = null) { * @param string $text Optional. Text to display for cancel reply link. */ function cancel_comment_reply_link($text = '') { - if ( empty($text) ) - $text = __('Click here to cancel reply.'); - - $style = isset($_GET['replytocom']) ? '' : ' style="display:none;"'; - - echo '' . $text . ''; + echo get_cancel_comment_reply_link($text); } /** @@ -1103,7 +1129,7 @@ class Walker_Comment extends Walker {
- $add_below, 'depth' => $depth, 'max_depth' => $args['depth']))) ?> + $add_below, 'depth' => $depth, 'max_depth' => $args['depth']))) ?>
diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 1c45c99fb..c321c5bf9 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -178,8 +178,6 @@ function spawn_cron( $local_time ) { if ( $timestamp > $local_time ) return; - // WPCOM: Use SERVER_ADDR - //$cron_url = get_option( 'siteurl' ) . '/wp-cron.php?check=' . wp_hash('187425'); $cron_url = 'http://' . $_SERVER['SERVER_ADDR'] . '/wp-cron.php?check=' . wp_hash('187425'); /* * multiple processes on multiple web servers can run this code concurrently