Skip to:
Content

bbPress.org

Changeset 6338


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.

Location:
trunk/src/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/filters.php

    r6302 r6338  
    140140add_filter( 'bbp_get_user_profile_edit_link', 'bbp_rel_nofollow' );
    141141add_filter( 'bbp_get_user_profile_edit_link', 'wp_unslash'       );
     142add_filter( 'bbp_get_cancel_reply_to_link',   'bbp_rel_nofollow' );
     143add_filter( 'bbp_get_cancel_reply_to_link',   'wp_unslash'       );
    142144
    143145// Run filters on reply content
  • 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.