Changeset 8475
- Timestamp:
- 06/04/2014 04:46:39 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-activity.php
r8474 r8475 288 288 289 289 $r = wp_parse_args( $args, $defaults ); 290 extract( $r, EXTR_SKIP );291 290 292 291 // Remove large images and replace them with just one image thumbnail 293 if ( ! empty( $ content) ) {294 $ content = bp_activity_thumbnail_content_images( $content, $primary_link, $r );295 } 296 297 if ( ! empty( $ action) ) {298 $ action = apply_filters( 'bp_blogs_record_activity_action', $action);299 } 300 301 if ( ! empty( $ content) ) {302 $ content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $content ), $content, $r );292 if ( ! empty( $r['content'] ) ) { 293 $r['content'] = bp_activity_thumbnail_content_images( $r['content'], $r['primary_link'], $r ); 294 } 295 296 if ( ! empty( $r['action'] ) ) { 297 $r['action'] = apply_filters( 'bp_blogs_record_activity_action', $r['action'] ); 298 } 299 300 if ( ! empty( $r['content'] ) ) { 301 $r['content'] = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $r['content'] ), $r['content'], $r ); 303 302 } 304 303 305 304 // Check for an existing entry and update if one exists. 306 305 $id = bp_activity_get_activity_id( array( 307 'user_id' => $ user_id,308 'component' => $ component,309 'type' => $ type,310 'item_id' => $ item_id,311 'secondary_item_id' => $ secondary_item_id306 'user_id' => $r['user_id'], 307 'component' => $r['component'], 308 'type' => $r['type'], 309 'item_id' => $r['item_id'], 310 'secondary_item_id' => $r['secondary_item_id'], 312 311 ) ); 313 312 314 return bp_activity_add( array( 'id' => $id, 'user_id' => $ user_id, 'action' => $action, 'content' => $content, 'primary_link' => $primary_link, 'component' => $component, 'type' => $type, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide) );313 return bp_activity_add( array( 'id' => $id, 'user_id' => $r['user_id'], 'action' => $r['action'], 'content' => $r['content'], 'primary_link' => $r['primary_link'], 'component' => $r['component'], 'type' => $r['type'], 'item_id' => $r['item_id'], 'secondary_item_id' => $r['secondary_item_id'], 'recorded_time' => $r['recorded_time'], 'hide_sitewide' => $r['hide_sitewide'] ) ); 315 314 } 316 315
Note: See TracChangeset
for help on using the changeset viewer.