Changeset 1749 for trunk/bp-blogs.php
- Timestamp:
- 09/01/2009 01:45:37 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1723 r1749 117 117 $bp->blogs->format_notification_function = 'bp_blogs_format_notifications'; 118 118 $bp->blogs->slug = BP_BLOGS_SLUG; 119 120 /* Register the activity stream actions for this component */ 121 bp_blogs_register_activity_action( 'new_blog', __( 'New blog created', 'buddypress' ) ); 122 bp_blogs_register_activity_action( 'new_blog_post', __( 'New blog post published', 'buddypress' ) ); 123 bp_blogs_register_activity_action( 'new_blog_comment', __( 'New blog post comment posted', 'buddypress' ) ); 119 124 120 125 /* Register this in the active components array */ … … 256 261 } 257 262 263 function bp_blogs_register_activity_action( $key, $value ) { 264 global $bp; 265 266 if ( !function_exists( 'bp_activity_set_action' ) ) 267 return false; 268 269 return apply_filters( 'bp_blogs_register_activity_action', bp_activity_set_action( $bp->blogs->id, $key, $value ), $key, $value ); 270 } 271 258 272 /******************************************************************************** 259 273 * Business Functions … … 315 329 'content' => sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_blog_option( $recorded_blog->blog_id, 'siteurl' ) . '">' . attribute_escape( $name ) . '</a>' ), 316 330 'primary_link' => get_blog_option( $recorded_blog->blog_id, 'siteurl' ), 317 'component_action' => 'new_blog',331 'component_action' => $bp->activity->actions->blogs['new_blog'], 318 332 'item_id' => $recorded_blog_id 319 333 ) ); … … 363 377 'content' => sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ), 364 378 'primary_link' => $post_permalink, 365 'component_action' => 'new_blog_post',379 'component_action' => $bp->activity->actions->blogs['new_blog_post'], 366 380 'item_id' => $recorded_post->id, 367 381 'recorded_time' => $recorded_post->date_created … … 398 412 'content' => sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' ), 399 413 'primary_link' => $post_permalink, 400 'component_action' => 'new_blog_post',414 'component_action' => $bp->activity->actions->blogs['new_blog_post'], 401 415 'item_id' => $existing_post->id, 402 416 'recorded_time' => $existing_post->date_created … … 444 458 'content' => $content, 445 459 'primary_link' => $comment_link, 446 'component_action' => 'new_blog_comment',460 'component_action' => $bp->activity->actions->blogs['new_blog_comment'], 447 461 'item_id' => $recorded_comment->blog_id, 448 462 'recorded_time' => $recorded_comment->date_created … … 468 482 'content' => $content, 469 483 'primary_link' => $comment_link, 470 'component_action' => 'new_blog_comment',484 'component_action' => $bp->activity->actions->blogs['new_blog_comment'], 471 485 'item_id' => $recorded_comment->blog_id, 472 486 'recorded_time' => $recorded_comment->date_created
Note: See TracChangeset
for help on using the changeset viewer.