Changeset 4962
- Timestamp:
- 05/28/2013 05:52:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/replies/template-tags.php
r4952 r4962 1534 1534 ), 'get_reply_to_link' ); 1535 1535 1536 // Get the reply to use it's ID and post_parent 1536 1537 $reply = bbp_get_reply( bbp_get_reply_id( (int) $r['id'] ) ); 1537 1538 … … 1541 1542 1542 1543 // Build the URI and return value 1543 $uri = remove_query_arg( array( 'bbp_reply_to' ) ); 1544 $uri = add_query_arg( array( 'bbp_reply_to' => $reply->ID ) ); 1545 $uri = wp_nonce_url( $uri, 'respond_id_' . $reply->ID ); 1546 $uri = $uri . '#new-post'; 1547 $onclick = 'return addReply.moveForm("' . $r['add_below'] . '-' . $reply->ID . '","' . $reply->ID . '","' . $r['respond_id'] . '","' . $reply->post_parent . '")'; 1544 $uri = remove_query_arg( array( 'bbp_reply_to' ) ); 1545 $uri = add_query_arg( array( 'bbp_reply_to' => $reply->ID ) ); 1546 $uri = wp_nonce_url( $uri, 'respond_id_' . $reply->ID ); 1547 $uri = $uri . '#new-post'; 1548 1549 // Only add onclick if replies are threaded 1550 if ( bbp_thread_replies() ) { 1551 1552 // Array of classes to pass to moveForm 1553 $move_form = array( 1554 $r['add_below'] . '-' . $reply->ID, 1555 $reply->ID, 1556 $r['respond_id'], 1557 $reply->post_parent 1558 ); 1559 1560 // Build the onclick 1561 $onclick = ' onclick="return addReply.moveForm(\'' . implode( "','", $move_form ) . '\');"'; 1562 1563 // No onclick if replies are not threaded 1564 } else { 1565 $onclick = ''; 1566 } 1567 1568 // Add $uri to the array, to be passed through the filter 1548 1569 $r['uri'] = $uri; 1549 $retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-reply-to-link" onclick=' . "'{$onclick}' >". esc_html( $r['reply_text'] ) . '</a>' . $r['link_after'];1570 $retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-reply-to-link"' . $onclick . '>' . esc_html( $r['reply_text'] ) . '</a>' . $r['link_after']; 1550 1571 1551 1572 return apply_filters( 'bbp_get_reply_to_link', $retval, $r, $args );
Note: See TracChangeset
for help on using the changeset viewer.