Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/02/2017 12:24:40 AM (8 years ago)
Author:
johnjamesjacoby
Message:

Add bbp_rel_nofollow() to bbp_get_cancel_reply_to_link filter.

Also clean-up bbp_get_cancel_reply_to_link() a bit.

See #3067.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/template.php

    r6316 r6338  
    17741774        }
    17751775
    1776         $reply_to = isset( $_GET['bbp_reply_to'] ) ? (int) $_GET['bbp_reply_to'] : 0;
     1776        // Replying to...
     1777        $reply_to = isset( $_GET['bbp_reply_to'] )
     1778            ? (int) $_GET['bbp_reply_to']
     1779            : 0;
    17771780
    17781781        // Set visibility
    17791782        $style  = ! empty( $reply_to ) ? '' : ' style="display:none;"';
    1780         $link   = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#post-' . $reply_to;
    1781         $retval = '<a rel="nofollow" id="bbp-cancel-reply-to-link" href="' . esc_url( $link ) . '"' . $style . '>' . esc_html( $text ) . '</a>';
     1783        $link   = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . "#post-{$reply_to}";
     1784        $retval = sprintf( '<a href="%1$s" id="bbp-cancel-reply-to-link"%2$s>%3$s</a>', esc_url( $link ), $style, esc_html( $text ) );
    17821785
    17831786        return apply_filters( 'bbp_get_cancel_reply_to_link', $retval, $link, $text );
Note: See TracChangeset for help on using the changeset viewer.