Changeset 1750 for trunk/bp-blogs.php
- Timestamp:
- 09/01/2009 02:12:35 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1749 r1750 118 118 $bp->blogs->slug = BP_BLOGS_SLUG; 119 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' ) );124 125 120 /* Register this in the active components array */ 126 121 $bp->active_components[$bp->blogs->slug] = $bp->blogs->id; … … 225 220 */ 226 221 222 function bp_blogs_register_activity_actions() { 223 global $bp; 224 225 if ( !function_exists( 'bp_activity_set_action' ) ) 226 return false; 227 228 bp_activity_set_action( $bp->blogs->id, 'new_blog', __( 'New blog created', 'buddypress' ) ); 229 bp_activity_set_action( $bp->blogs->id, 'new_blog_post', __( 'New blog post published', 'buddypress' ) ); 230 bp_activity_set_action( $bp->blogs->id, 'new_blog_comment', __( 'New blog post comment posted', 'buddypress' ) ); 231 232 do_action( 'bp_blogs_register_activity_actions' ); 233 } 234 add_action( 'plugins_loaded', 'bp_blogs_register_activity_actions' ); 235 227 236 function bp_blogs_record_activity( $args = '' ) { 228 237 global $bp; … … 261 270 } 262 271 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 272 272 /******************************************************************************** 273 273 * Business Functions … … 329 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>' ), 330 330 'primary_link' => get_blog_option( $recorded_blog->blog_id, 'siteurl' ), 331 'component_action' => $bp->activity->actions->blogs['new_blog'],331 'component_action' => 'new_blog', 332 332 'item_id' => $recorded_blog_id 333 333 ) ); … … 377 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>' ), 378 378 'primary_link' => $post_permalink, 379 'component_action' => $bp->activity->actions->blogs['new_blog_post'],379 'component_action' => 'new_blog_post', 380 380 'item_id' => $recorded_post->id, 381 381 'recorded_time' => $recorded_post->date_created … … 412 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>' ), 413 413 'primary_link' => $post_permalink, 414 'component_action' => $bp->activity->actions->blogs['new_blog_post'],414 'component_action' => 'new_blog_post', 415 415 'item_id' => $existing_post->id, 416 416 'recorded_time' => $existing_post->date_created … … 458 458 'content' => $content, 459 459 'primary_link' => $comment_link, 460 'component_action' => $bp->activity->actions->blogs['new_blog_comment'],460 'component_action' => 'new_blog_comment', 461 461 'item_id' => $recorded_comment->blog_id, 462 462 'recorded_time' => $recorded_comment->date_created … … 482 482 'content' => $content, 483 483 'primary_link' => $comment_link, 484 'component_action' => $bp->activity->actions->blogs['new_blog_comment'],484 'component_action' => 'new_blog_comment', 485 485 'item_id' => $recorded_comment->blog_id, 486 486 'recorded_time' => $recorded_comment->date_created
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)