Changeset 2370 for trunk/bp-themes/bp-default/_inc/ajax.php
- Timestamp:
- 01/19/2010 08:38:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r2369 r2370 145 145 add_action( 'wp_ajax_new_activity_comment', 'bp_dtheme_new_activity_comment' ); 146 146 147 function bp_dtheme_delete_activity _comment() {147 function bp_dtheme_delete_activity() { 148 148 /* Check the nonce */ 149 check_admin_referer( ' delete_activity_comment' );149 check_admin_referer( 'bp_activity_delete_link' ); 150 150 151 151 if ( !is_user_logged_in() ) { … … 154 154 } 155 155 156 if ( empty( $_POST[' comment_id'] ) || !is_numeric( $_POST['comment_id'] ) || !bp_activity_delete_by_activity_id( $_POST['comment_id'] ) ) {157 echo '-1<div class="error"><p>' . __( 'There was a problem deleting that comment. Please try again.', 'buddypress' ) . '</p></div>';156 if ( empty( $_POST['id'] ) || !is_numeric( $_POST['id'] ) || !bp_activity_delete_by_activity_id( $_POST['id'] ) ) { 157 echo '-1<div class="error"><p>' . __( 'There was a problem when deleting. Please try again.', 'buddypress' ) . '</p></div>'; 158 158 return false; 159 159 } … … 161 161 return true; 162 162 } 163 add_action( 'wp_ajax_delete_activity_comment', 'bp_dtheme_delete_activity_comment' ); 163 add_action( 'wp_ajax_delete_activity_comment', 'bp_dtheme_delete_activity' ); 164 add_action( 'wp_ajax_delete_activity', 'bp_dtheme_delete_activity' ); 164 165 165 166 function bp_dtheme_activity_loop( $type = 'all', $filter = false, $query_string = false, $per_page = 20, $page = 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.