diff --git src/bp-templates/bp-legacy/buddypress-functions.php src/bp-templates/bp-legacy/buddypress-functions.php
index 4a97d84..326ef22 100644
|
|
|
function bp_legacy_theme_post_update() {
|
| 705 | 705 | exit( '-1' ); |
| 706 | 706 | |
| 707 | 707 | if ( empty( $_POST['content'] ) ) |
| 708 | | exit( '-1<div id="message" class="error"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' ); |
| | 708 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'Please enter some content to post.', 'buddypress' ) . '</p></div>' ); |
| 709 | 709 | |
| 710 | 710 | $activity_id = 0; |
| 711 | 711 | if ( empty( $_POST['object'] ) && bp_is_active( 'activity' ) ) { |
| … |
… |
function bp_legacy_theme_post_update() {
|
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | if ( empty( $activity_id ) ) |
| 723 | | exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update; please try again.', 'buddypress' ) . '</p></div>' ); |
| | 723 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem posting your update; please try again.', 'buddypress' ) . '</p></div>' ); |
| 724 | 724 | |
| 725 | 725 | $last_recorded = ! empty( $_POST['since'] ) ? date( 'Y-m-d H:i:s', intval( $_POST['since'] ) ) : 0; |
| 726 | 726 | if ( $last_recorded ) { |
| … |
… |
function bp_legacy_theme_new_activity_comment() {
|
| 772 | 772 | $feedback = __( 'There was an error posting your reply. Please try again.', 'buddypress' ); |
| 773 | 773 | |
| 774 | 774 | if ( empty( $_POST['content'] ) ) { |
| 775 | | exit( '-1<div id="message" class="error"><p>' . esc_html__( 'Please do not leave the comment area blank.', 'buddypress' ) . '</p></div>' ); |
| | 775 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html__( 'Please do not leave the comment area blank.', 'buddypress' ) . '</p></div>' ); |
| 776 | 776 | } |
| 777 | 777 | |
| 778 | 778 | if ( empty( $_POST['form_id'] ) || empty( $_POST['comment_id'] ) || ! is_numeric( $_POST['form_id'] ) || ! is_numeric( $_POST['comment_id'] ) ) { |
| 779 | | exit( '-1<div id="message" class="error"><p>' . esc_html( $feedback ) . '</p></div>' ); |
| | 779 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html( $feedback ) . '</p></div>' ); |
| 780 | 780 | } |
| 781 | 781 | |
| 782 | 782 | $comment_id = bp_activity_new_comment( array( |
| … |
… |
function bp_legacy_theme_new_activity_comment() {
|
| 791 | 791 | unset( $bp->activity->errors['new_comment'] ); |
| 792 | 792 | } |
| 793 | 793 | |
| 794 | | exit( '-1<div id="message" class="error"><p>' . esc_html( $feedback ) . '</p></div>' ); |
| | 794 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . esc_html( $feedback ) . '</p></div>' ); |
| 795 | 795 | } |
| 796 | 796 | |
| 797 | 797 | // Load the new activity item into the $activities_template global |
| … |
… |
function bp_legacy_theme_delete_activity() {
|
| 852 | 852 | do_action( 'bp_activity_before_action_delete_activity', $activity->id, $activity->user_id ); |
| 853 | 853 | |
| 854 | 854 | if ( ! bp_activity_delete( array( 'id' => $activity->id, 'user_id' => $activity->user_id ) ) ) |
| 855 | | exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' ); |
| | 855 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' ); |
| 856 | 856 | |
| 857 | 857 | do_action( 'bp_activity_action_delete_activity', $activity->id, $activity->user_id ); |
| 858 | 858 | exit; |
| … |
… |
function bp_legacy_theme_delete_activity_comment() {
|
| 888 | 888 | do_action( 'bp_activity_before_action_delete_activity', $_POST['id'], $comment->user_id ); |
| 889 | 889 | |
| 890 | 890 | if ( ! bp_activity_delete_comment( $comment->item_id, $comment->id ) ) |
| 891 | | exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' ); |
| | 891 | exit( '-1<div id="message" class="error bp-ajax-message"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>' ); |
| 892 | 892 | |
| 893 | 893 | do_action( 'bp_activity_action_delete_activity', $_POST['id'], $comment->user_id ); |
| 894 | 894 | exit; |