Changeset 7148 for trunk/src/includes/topics/template.php
- Timestamp:
- 11/05/2020 05:06:10 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/template.php
r7006 r7148 2852 2852 'link_after' => '', 2853 2853 'reply_text' => esc_html_x( 'Reply', 'verb', 'bbpress' ), 2854 'add_below' => 'post', 2855 'respond_id' => 'new-reply-' . bbp_get_topic_id(), 2854 2856 ), 'get_topic_reply_link' ); 2855 2857 … … 2862 2864 } 2863 2865 2864 // Add $uri to the array, to be passed through the filter 2865 $r['uri'] = '#new-post'; 2866 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after']; 2866 // Only add onclick if replies are threaded 2867 $onclick = bbp_thread_replies() 2868 ? ' onclick="return addReply.cancelForm();"' 2869 : ''; 2870 2871 // Add $uri to the array, to be passed through the filter 2872 $r['uri'] = remove_query_arg( array( 'bbp_reply_to', '_wpnonce' ) ) . '#new-post'; 2873 $retval = $r['link_before'] . '<a role="button" href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link"' . $onclick . '>' . $r['reply_text'] . '</a>' . $r['link_after']; 2867 2874 2868 2875 // Filter & return
Note: See TracChangeset
for help on using the changeset viewer.