Changeset 373 for trunk/bp-blogs.php
- Timestamp:
- 10/07/2008 07:16:51 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/bp-blogs.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r371 r373 3 3 4 4 define ( 'BP_BLOGS_IS_INSTALLED', 1 ); 5 define ( 'BP_BLOGS_VERSION', '0.1. 1' );5 define ( 'BP_BLOGS_VERSION', '0.1.2' ); 6 6 7 7 /* These will be moved into admin configurable settings */ … … 10 10 11 11 include_once( 'bp-blogs/bp-blogs-classes.php' ); 12 include_once( 'bp-blogs/bp-blogs-cssjs.php' ); 13 include_once( 'bp-blogs/bp-blogs-templatetags.php' ); 14 include_once( 'bp-blogs/bp-blogs-widgets.php' ); 12 15 //include_once( 'bp-blogs/bp-blogs-ajax.php' ); 13 include_once( 'bp-blogs/bp-blogs-cssjs.php' ); 14 /*include_once( 'bp-blogs/bp-blogs-admin.php' );*/ 15 include_once( 'bp-blogs/bp-blogs-templatetags.php' ); 16 16 //include_once( 'bp-blogs/bp-blogs-admin.php' ); 17 17 18 18 /************************************************************************** … … 105 105 'table_name_blog_comments' => $wpdb->base_prefix . 'bp_user_blogs_comments', 106 106 'format_activity_function' => 'bp_blogs_format_activity', 107 'image_base' => get_option('siteurl') . '/wp-content/mu-plugins/bp-groups/images',107 'image_base' => site_url() . '/wp-content/mu-plugins/bp-groups/images', 108 108 'slug' => 'blogs' 109 109 ); … … 455 455 456 456 function bp_blogs_register_existing_content( $blog_id ) { 457 global $ wpdb, $bp;457 global $bp, $current_blog; 458 458 459 459 if ( !$bp ) { … … 470 470 bp_blogs_record_blog( (int)$blog->userblog_id, (int)$user_id ); 471 471 472 $wpdb->set_blog_id( $blog->userblog_id );472 switch_to_blog( $blog->userblog_id ); 473 473 $posts_for_blog = bp_core_get_all_posts_for_user( $user_id ); 474 474 … … 479 479 } 480 480 } 481 482 switch_to_blog( $current_blog->blog_id ); 481 483 } 482 484 add_action( 'bp_homebase_signup_completed', 'bp_blogs_register_existing_content', 10 ); 483 485 486 function bp_blogs_get_latest_posts( $blog_id = null, $limit = 5 ) { 487 global $bp; 488 489 if ( !is_numeric( $limit ) ) 490 $limit = 5; 491 492 return BP_Blogs_Post::get_latest_posts( $blog_id, $limit ); 493 } 494 484 495 485 496 ?>
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)