diff --git src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php src/bp-templates/bp-nouveau/buddypress/activity/comment-form.php
index 0cd27f73f..f24c4dc4b 100644
|
|
|
if ( ! bp_nouveau_current_user_can( 'comment_activity' ) || ! bp_activity_can_co |
| 20 | 20 | </label> |
| 21 | 21 | <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea> |
| 22 | 22 | </div> |
| | 23 | <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> |
| | 24 | |
| 23 | 25 | <?php |
| | 26 | bp_nouveau_submit_button( 'activity-new-comment' ); |
| 24 | 27 | printf( |
| 25 | | '<input type="submit" name="ac_form_submit" value="%s" /> <button type="button" class="ac-reply-cancel">%s</button>', |
| 26 | | esc_attr( _x( 'Post', 'button', 'buddypress' ) ), |
| | 28 | ' <button type="button" class="ac-reply-cancel">%s</button>', |
| 27 | 29 | esc_html( _x( 'Cancel', 'button', 'buddypress' ) ) |
| 28 | 30 | ); |
| 29 | 31 | ?> |
| 30 | | <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" /> |
| 31 | 32 | </div> |
| 32 | 33 | |
| 33 | | <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?> |
| 34 | | |
| 35 | 34 | </form> |
diff --git src/bp-templates/bp-nouveau/includes/activity/template-tags.php src/bp-templates/bp-nouveau/includes/activity/template-tags.php
index 1ae486249..8ccbfadb7 100644
|
|
|
function bp_nouveau_activity_comment_action() { |
| 699 | 699 | */ |
| 700 | 700 | function bp_nouveau_activity_comment_form() { |
| 701 | 701 | bp_get_template_part( 'activity/comment-form' ); |
| 702 | | |
| 703 | | /** |
| 704 | | * Fires after the activity entry comment form. |
| 705 | | * |
| 706 | | * @since 1.5.0 |
| 707 | | */ |
| 708 | | do_action( 'bp_activity_entry_comments' ); |
| 709 | 702 | } |
| 710 | 703 | |
| 711 | 704 | /** |
diff --git src/bp-templates/bp-nouveau/includes/functions.php src/bp-templates/bp-nouveau/includes/functions.php
index 42853fb24..df8e4ccf2 100644
|
|
|
function bp_nouveau_get_submit_button( $action = '' ) { |
| 1333 | 1333 | 'class' => 'auto', |
| 1334 | 1334 | ), |
| 1335 | 1335 | ), |
| | 1336 | 'activity-new-comment' => array( |
| | 1337 | 'after' => 'bp_activity_entry_comments', |
| | 1338 | 'nonce' => 'new_activity_comment', |
| | 1339 | 'nonce_key' => '_wpnonce_new_activity_comment', |
| | 1340 | 'wrapper' => false, |
| | 1341 | 'attributes' => array( |
| | 1342 | 'name' => 'ac_form_submit', |
| | 1343 | 'value' => _x( 'Post', 'button', 'buddypress' ), |
| | 1344 | ), |
| | 1345 | ), |
| 1336 | 1346 | ) ); |
| 1337 | 1347 | |
| 1338 | 1348 | if ( isset( $actions[ $action ] ) ) { |
diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index 9d33bbf2c..12f365675 100644
|
|
|
function bp_nouveau_submit_button( $action ) { |
| 2423 | 2423 | do_action( $submit_data['before'] ); |
| 2424 | 2424 | } |
| 2425 | 2425 | |
| 2426 | | // Output the submit button. |
| 2427 | | printf( |
| 2428 | | '<div class="submit"> |
| 2429 | | <input type="submit" %s/> |
| 2430 | | </div>', |
| | 2426 | $submit_input = sprintf( '<input type="submit" %s/>', |
| 2431 | 2427 | bp_get_form_field_attributes( 'submit', $submit_data['attributes'] ) // Safe. |
| 2432 | 2428 | ); |
| 2433 | 2429 | |
| 2434 | | wp_nonce_field( $submit_data['nonce'] ); |
| | 2430 | // Output the submit button. |
| | 2431 | if ( isset( $submit_data['wrapper'] ) && false === $submit_data['wrapper'] ) { |
| | 2432 | echo $submit_input; |
| | 2433 | |
| | 2434 | // Output the submit button into a wrapper. |
| | 2435 | } else { |
| | 2436 | printf( '<div class="submit">%s</div>', $submit_input ); |
| | 2437 | } |
| | 2438 | |
| | 2439 | if ( empty( $submit_data['nonce_key'] ) ) { |
| | 2440 | wp_nonce_field( $submit_data['nonce'] ); |
| | 2441 | } else { |
| | 2442 | wp_nonce_field( $submit_data['nonce'], $submit_data['nonce_key'] ); |
| | 2443 | } |
| 2435 | 2444 | |
| 2436 | 2445 | if ( ! empty( $submit_data['after'] ) ) { |
| 2437 | 2446 | |