Changeset 5040 for trunk/includes/topics/template-tags.php
- Timestamp:
- 07/18/2013 07:16:23 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/topics/template-tags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/topics/template-tags.php
r5037 r5040 2543 2543 $display = bbp_is_topic_open( $topic->ID ) ? $r['close_text'] : $r['open_text']; 2544 2544 $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_close', 'topic_id' => $topic->ID ) ); 2545 $uri = esc_url( wp_nonce_url( $uri, 'close-topic_' . $topic->ID ));2546 $retval = $r['link_before'] . '<a href="' . $uri. '">' . $display . '</a>' . $r['link_after'];2545 $uri = wp_nonce_url( $uri, 'close-topic_' . $topic->ID ); 2546 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . $display . '</a>' . $r['link_after']; 2547 2547 2548 2548 return apply_filters( 'bbp_get_topic_close_link', $retval, $r ); … … 2605 2605 2606 2606 $stick_uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_stick', 'topic_id' => $topic->ID ) ); 2607 $stick_uri = esc_url( wp_nonce_url( $stick_uri, 'stick-topic_' . $topic->ID ));2607 $stick_uri = wp_nonce_url( $stick_uri, 'stick-topic_' . $topic->ID ); 2608 2608 2609 2609 $stick_display = true === $is_sticky ? $r['unstick_text'] : $r['stick_text']; 2610 $stick_display = '<a href="' . $stick_uri. '">' . $stick_display . '</a>';2610 $stick_display = '<a href="' . esc_url( $stick_uri ) . '">' . $stick_display . '</a>'; 2611 2611 2612 2612 if ( empty( $is_sticky ) ) { 2613 2613 $super_uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_stick', 'topic_id' => $topic->ID, 'super' => 1 ) ); 2614 $super_uri = esc_url( wp_nonce_url( $super_uri, 'stick-topic_' . $topic->ID ));2615 2616 $super_display = ' (<a href="' . $super_uri. '">' . $r['super_text'] . '</a>)';2614 $super_uri = wp_nonce_url( $super_uri, 'stick-topic_' . $topic->ID ); 2615 2616 $super_display = ' (<a href="' . esc_url( $super_uri ) . '">' . $r['super_text'] . '</a>)'; 2617 2617 } else { 2618 2618 $super_display = ''; … … 2671 2671 return; 2672 2672 2673 $uri = esc_url( add_query_arg( array( 'action' => 'merge' ), bbp_get_topic_edit_url( $topic->ID )) );2674 $retval = $r['link_before'] . '<a href="' . $uri. '">' . $r['merge_text'] . '</a>' . $r['link_after'];2673 $uri = add_query_arg( array( 'action' => 'merge' ), bbp_get_topic_edit_url( $topic->ID ) ); 2674 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . $r['merge_text'] . '</a>' . $r['link_after']; 2675 2675 2676 2676 return apply_filters( 'bbp_get_topic_merge_link', $retval, $args ); … … 2730 2730 $display = bbp_is_topic_spam( $topic->ID ) ? $r['unspam_text'] : $r['spam_text']; 2731 2731 $uri = add_query_arg( array( 'action' => 'bbp_toggle_topic_spam', 'topic_id' => $topic->ID ) ); 2732 $uri = esc_url( wp_nonce_url( $uri, 'spam-topic_' . $topic->ID ));2733 $retval = $r['link_before'] . '<a href="' . $uri. '">' . $display . '</a>' . $r['link_after'];2732 $uri = wp_nonce_url( $uri, 'spam-topic_' . $topic->ID ); 2733 $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . $display . '</a>' . $r['link_after']; 2734 2734 2735 2735 return apply_filters( 'bbp_get_topic_spam_link', $retval, $r );
Note: See TracChangeset
for help on using the changeset viewer.