Changeset 4239 for trunk/bp-themes/bp-default/_inc/ajax.php
- Timestamp:
- 04/22/2011 08:30:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/ajax.php
r4230 r4239 320 320 add_action( 'wp_ajax_activity_mark_unfav', 'bp_dtheme_unmark_activity_favorite' ); 321 321 322 /** 323 * AJAX handler for Read More link on long activity items 324 * 325 * @package BuddyPress 326 * @since 1.3 327 */ 328 function bp_dtheme_get_single_activity_content() { 329 $activity_array = bp_activity_get_specific( array( 330 'activity_ids' => $_POST['activity_id'], 331 'display_comments' => 'stream' 332 ) ); 333 334 $activity = !empty( $activity_array['activities'][0] ) ? $activity_array['activities'][0] : false; 335 336 if ( !$activity ) 337 exit(); // todo: error? 338 339 // Activity content retrieved through AJAX should run through normal filters, but not be 340 // truncated 341 remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 ); 342 $content = apply_filters( 'bp_get_activity_content_body', $activity->content ); 343 344 echo $content; 345 346 exit(); 347 } 348 add_action( 'wp_ajax_get_single_activity_content', 'bp_dtheme_get_single_activity_content' ); 349 322 350 /* AJAX invite a friend to a group functionality */ 323 351 function bp_dtheme_ajax_invite_user() {
Note: See TracChangeset
for help on using the changeset viewer.