Changeset 2130 for trunk/bp-themes/bp-sn-parent/_inc/ajax.php
- Timestamp:
- 11/25/2009 09:25:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-sn-parent/_inc/ajax.php
r2126 r2130 484 484 add_action( 'wp_ajax_post_update', 'bp_dtheme_post_update' ); 485 485 486 487 486 function bp_dtheme_new_activity_comment() { 488 487 global $bp; … … 547 546 add_action( 'wp_ajax_new_activity_comment', 'bp_dtheme_new_activity_comment' ); 548 547 548 function bp_dtheme_delete_activity_comment() { 549 /* Check the nonce */ 550 check_admin_referer( 'delete_activity_comment' ); 551 552 if ( !is_user_logged_in() ) { 553 echo '-1'; 554 return false; 555 } 556 557 if ( empty( $_POST['comment_id'] ) || !is_numeric( $_POST['comment_id'] ) || !bp_activity_delete_by_activity_id( $_POST['comment_id'] ) ) { 558 echo '-1<div class="error"><p>' . __( 'There was a problem deleting that comment. Please try again.', 'buddypress' ) . '</p></div>'; 559 return false; 560 } 561 562 return true; 563 } 564 add_action( 'wp_ajax_delete_activity_comment', 'bp_dtheme_delete_activity_comment' ); 565 549 566 function bp_dtheme_ajax_show_form() { 550 567 locate_template( array( 'status/post-form.php' ), true );
Note: See TracChangeset
for help on using the changeset viewer.