Changeset 12735
- Timestamp:
- 09/25/2020 07:15:20 PM (4 years ago)
- Location:
- trunk/src/bp-templates
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-legacy/buddypress/activity/entry.php
r12595 r12735 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> -
trunk/src/bp-templates/bp-legacy/js/buddypress.js
r12359 r12735 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], -
trunk/src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php
r12156 r12735 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>', -
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r12703 r12735 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'] ) ) { … … 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 } -
trunk/src/bp-templates/bp-nouveau/js/buddypress-activity.js
r12378 r12735 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 … … 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,
Note: See TracChangeset
for help on using the changeset viewer.