Changeset 1715
- Timestamp:
- 08/27/2009 07:48:54 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-templatetags.php
r1703 r1715 791 791 792 792 foreach ( $terms as $term ) { 793 $link = get_blog_option( 1, 'siteurl') . '/tag/' . $term->slug;793 $link = get_blog_option( BP_ROOT_BLOG, 'siteurl') . '/tag/' . $term->slug; 794 794 $link = apply_filters('term_link', $link); 795 795 -
trunk/bp-core.php
r1701 r1715 14 14 /* Define on which blog ID BuddyPress should run */ 15 15 if ( !defined( 'BP_ROOT_BLOG' ) ) 16 define( 'BP_ROOT_BLOG', 1);16 define( 'BP_ROOT_BLOG', 2 ); 17 17 18 18 /* Define the user and usermeta table names, useful if you are using custom or shared tables */ … … 387 387 */ 388 388 function bp_core_get_root_domain() { 389 return apply_filters( 'bp_core_get_root_domain', get_blog_option( BP_ROOT_BLOG, 'siteurl' ) ); 389 global $current_blog; 390 391 if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) 392 $domain = get_blog_option( $current_blog->blog_id, 'siteurl' ); 393 else 394 $domain = get_blog_option( BP_ROOT_BLOG, 'siteurl' ); 395 396 return apply_filters( 'bp_core_get_root_domain', $domain ); 390 397 } 391 398 … … 1297 1304 */ 1298 1305 function bp_core_email_from_name_filter() { 1299 return get_blog_option( 1, 'blogname' );1306 return get_blog_option( BP_ROOT_BLOG, 'blogname' ); 1300 1307 } 1301 1308 add_filter( 'wp_mail_from_name', 'bp_core_email_from_name_filter' ); -
trunk/bp-core/bp-core-catchuri.php
r1714 r1715 38 38 return false; 39 39 } 40 40 41 41 if ( strpos( $_SERVER['REQUEST_URI'], 'wp-load.php' ) ) 42 42 $path = bp_core_referrer(); … … 50 50 $noget = substr( $path, 0, strpos( $path, '?' ) ); 51 51 if ( $noget != '' ) $path = $noget; 52 52 53 53 /* Fetch the current URI and explode each part seperated by '/' into an array */ 54 54 $bp_uri = explode( "/", $path ); 55 56 if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) { 55 56 /* Loop and remove empties */ 57 for ( $i = 0; $i <= count( $bp_uri ); $i++ ) 58 if ( empty( $bp_uri[$i] ) ) unset( $bp_uri[$i] ); 59 60 if ( defined( 'BP_ENABLE_MULTIBLOG' ) || 1 != BP_ROOT_BLOG ) { 57 61 /* If we are running BuddyPress on any blog, not just a root blog, we need to first 58 62 shift off the blog name if we are running a subdirectory install of WPMU. */ … … 60 64 array_shift( $bp_uri ); 61 65 } 62 63 /* Take empties off the end of complete URI */ 64 if ( empty( $bp_uri[count($bp_uri) - 1] ) ) 65 array_pop( $bp_uri ); 66 67 /* Take empties off the start of complete URI */ 68 if ( empty( $bp_uri[0] ) ) 69 array_shift( $bp_uri ); 70 66 71 67 /* Get total URI segment count */ 72 68 $bp_uri_count = count( $bp_uri ) - 1; … … 152 148 $action_variables = array_merge( array(), $action_variables ); 153 149 154 //var_dump($current_component, $current_action, $action_variables); 150 //var_dump($current_component, $current_action, $action_variables); die; 155 151 } 156 152 add_action( 'plugins_loaded', 'bp_core_set_uri_globals', 3 ); … … 175 171 176 172 $bp_path = $pages; 177 173 178 174 if ( !bp_is_blog_page() ) { 179 175 remove_action( 'template_redirect', 'redirect_canonical' ); -
trunk/bp-friends/bp-friends-notifications.php
r1518 r1715 19 19 // Set up and send the message 20 20 $to = $ud->user_email; 21 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name );21 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New friendship request from %s', 'buddypress' ), $initiator_name ); 22 22 23 23 $message = sprintf( __( … … 56 56 // Set up and send the message 57 57 $to = $ud->user_email; 58 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name );58 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s accepted your friendship request', 'buddypress' ), $friend_name ); 59 59 60 60 $message = sprintf( __( -
trunk/bp-groups/bp-groups-notifications.php
r1700 r1715 14 14 $poster_profile_link = site_url() . '/' . BP_MEMBERS_SLUG . '/' . $poster_ud->user_login; 15 15 16 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'New wire post on group: %s', 'buddypress' ), stripslashes($group->name) );16 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New wire post on group: %s', 'buddypress' ), stripslashes($group->name) ); 17 17 18 18 foreach ( $group->user_dataset as $user ) { … … 55 55 56 56 $group = new BP_Groups_Group( $group_id, false, true ); 57 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . __( 'Group Details Updated', 'buddypress' );57 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . __( 'Group Details Updated', 'buddypress' ); 58 58 59 59 foreach ( $group->user_dataset as $user ) { … … 105 105 // Set up and send the message 106 106 $to = $ud->user_email; 107 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), stripslashes($group->name) );107 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), stripslashes($group->name) ); 108 108 109 109 $message = sprintf( __( … … 149 149 150 150 if ( $accepted ) { 151 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), stripslashes($group->name) );151 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" accepted', 'buddypress' ), stripslashes($group->name) ); 152 152 $message = sprintf( __( 153 153 'Your membership request for the group "%s" has been accepted. … … 159 159 160 160 } else { 161 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), stripslashes($group->name) );161 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'Membership request for group "%s" rejected', 'buddypress' ), stripslashes($group->name) ); 162 162 $message = sprintf( __( 163 163 'Your membership request for the group "%s" has been rejected. … … 201 201 $to = $ud->user_email; 202 202 203 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), stripslashes($group->name) );203 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have been promoted in the group: "%s"', 'buddypress' ), stripslashes($group->name) ); 204 204 205 205 $message = sprintf( __( … … 244 244 $to = $invited_ud->user_email; 245 245 246 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), stripslashes($group->name) );246 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'You have an invitation to the group: "%s"', 'buddypress' ), stripslashes($group->name) ); 247 247 248 248 $message = sprintf( __( -
trunk/bp-messages/bp-messages-notifications.php
r1518 r1715 18 18 // Set up and send the message 19 19 $to = $ud->user_email; 20 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), stripslashes($sender_name) );20 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( 'New message from %s', 'buddypress' ), stripslashes($sender_name) ); 21 21 22 22 $content = sprintf( __( … … 65 65 // 66 66 // --------------------- 67 // ', 'buddypress' ), get_blog_option( 1, 'blogname' ), stripslashes( strip_tags( $message_subject ) ), stripslashes( strip_tags( $message ) ), $message_link );67 // ', 'buddypress' ), get_blog_option( BP_ROOT_BLOG, 'blogname' ), stripslashes( strip_tags( $message_subject ) ), stripslashes( strip_tags( $message ) ), $message_link ); 68 68 // 69 69 // $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link ); -
trunk/bp-xprofile.php
r1714 r1715 242 242 function xprofile_screen_display_profile() { 243 243 global $bp, $is_new_friend; 244 244 245 245 // If this is a first visit to a new friends profile, delete the friend accepted notifications for the 246 246 // logged in user. $is_new_friend is set in bp-core/bp-core-catchuri.php in bp_core_set_uri_globals() -
trunk/bp-xprofile/bp-xprofile-notifications.php
r1518 r1715 35 35 // Set up and send the message 36 36 $to = $ud->user_email; 37 $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s posted on your wire.', 'buddypress' ), stripslashes($poster_name) );37 $subject = '[' . get_blog_option( BP_ROOT_BLOG, 'blogname' ) . '] ' . sprintf( __( '%s posted on your wire.', 'buddypress' ), stripslashes($poster_name) ); 38 38 39 39 $message = sprintf( __(
Note: See TracChangeset
for help on using the changeset viewer.