diff --git src/bp-templates/bp-legacy/buddypress/activity/entry.php src/bp-templates/bp-legacy/buddypress/activity/entry.php
index 9f4cd5d1c..6386939a2 100644
|
|
|
do_action( 'bp_before_activity_entry' ); ?>
|
| 145 | 145 | */ |
| 146 | 146 | do_action( 'bp_activity_entry_comments' ); ?> |
| 147 | 147 | |
| 148 | | <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?> |
| | 148 | <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment_' . bp_get_activity_id() ); ?> |
| 149 | 149 | |
| 150 | 150 | </form> |
| 151 | 151 | |
diff --git src/bp-templates/bp-legacy/js/buddypress.js src/bp-templates/bp-legacy/js/buddypress.js
index 436958862..38326ccf0 100644
|
|
|
jq(document).ready( function() {
|
| 610 | 610 | ajaxdata = { |
| 611 | 611 | action: 'new_activity_comment', |
| 612 | 612 | 'cookie': bp_get_cookies(), |
| 613 | | '_wpnonce_new_activity_comment': jq('#_wpnonce_new_activity_comment').val(), |
| | 613 | '_wpnonce_new_activity_comment': jq('#_wpnonce_new_activity_comment' + '_' + comment_id ).val(), |
| 614 | 614 | 'comment_id': comment_id, |
| 615 | 615 | 'form_id': form_id[2], |
| 616 | 616 | 'content': content.val() |
diff --git src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php
index b0d4b9ee1..fea26e1d7 100644
|
|
|
if ( ! bp_nouveau_current_user_can( 'comment_activity' ) || ! bp_activity_can_co
|
| 23 | 23 | <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> |
| 24 | 24 | |
| 25 | 25 | <?php |
| 26 | | bp_nouveau_submit_button( 'activity-new-comment' ); |
| | 26 | bp_nouveau_submit_button( 'activity-new-comment', bp_get_activity_id() ); |
| 27 | 27 | printf( |
| 28 | 28 | ' <button type="button" class="ac-reply-cancel">%s</button>', |
| 29 | 29 | esc_html( _x( 'Cancel', 'button', 'buddypress' ) ) |
diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index e081a355e..18d83e78f 100644
|
|
|
function bp_nouveau_signup_privacy_policy_acceptance_section() {
|
| 2585 | 2585 | * |
| 2586 | 2586 | * @param string $action The action to get the submit button for. Required. |
| 2587 | 2587 | */ |
| 2588 | | function bp_nouveau_submit_button( $action ) { |
| | 2588 | function bp_nouveau_submit_button( $action, $object_id = 0 ) { |
| 2589 | 2589 | $submit_data = bp_nouveau_get_submit_button( $action ); |
| 2590 | 2590 | if ( empty( $submit_data['attributes'] ) || empty( $submit_data['nonce'] ) ) { |
| 2591 | 2591 | return; |
| … |
… |
function bp_nouveau_submit_button( $action ) {
|
| 2619 | 2619 | if ( empty( $submit_data['nonce_key'] ) ) { |
| 2620 | 2620 | wp_nonce_field( $submit_data['nonce'] ); |
| 2621 | 2621 | } else { |
| | 2622 | if ( $object_id ) { |
| | 2623 | $submit_data['nonce_key'] .= '_' . (int) $object_id; |
| | 2624 | } |
| | 2625 | |
| 2622 | 2626 | wp_nonce_field( $submit_data['nonce'], $submit_data['nonce_key'] ); |
| 2623 | 2627 | } |
| 2624 | 2628 | |
diff --git src/bp-templates/bp-nouveau/js/buddypress-activity.js src/bp-templates/bp-nouveau/js/buddypress-activity.js
index 50ea597d3..12fb80f83 100644
|
|
|
|
| 1 | 1 | /* jshint browser: true */ |
| 2 | 2 | /* global bp, BP_Nouveau */ |
| 3 | | /* @version 3.1.0 */ |
| | 3 | /* @since 3.0.0 */ |
| | 4 | /* @version 7.0.0 */ |
| 4 | 5 | window.bp = window.bp || {}; |
| 5 | 6 | |
| 6 | 7 | ( function( exports, $ ) { |
| … |
… |
window.bp = window.bp || {};
|
| 735 | 736 | |
| 736 | 737 | comment_data = { |
| 737 | 738 | action : 'new_activity_comment', |
| 738 | | _wpnonce_new_activity_comment : $( '#_wpnonce_new_activity_comment' ).val(), |
| | 739 | _wpnonce_new_activity_comment : $( '#_wpnonce_new_activity_comment' + '_' + item_id ).val(), |
| 739 | 740 | comment_id : item_id, |
| 740 | 741 | form_id : activity_id, |
| 741 | 742 | content : comment_content.val() |