<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][3937] trunk: Clean up bp-blogs-template whitespace and code formatting.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>3937</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-01-26 20:43:59 +0000 (Wed, 26 Jan 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up bp-blogs-template whitespace and code formatting. Add checks to BP_Component::_setup_nav and set params to optional.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpblogsbpblogsfunctionsphp">trunk/bp-blogs/bp-blogs-functions.php</a></li>
<li><a href="#trunkbpblogsbpblogstemplatephp">trunk/bp-blogs/bp-blogs-template.php</a></li>
<li><a href="#trunkbpcorebpcorebuddybarphp">trunk/bp-core/bp-core-buddybar.php</a></li>
<li><a href="#trunkbpcorebpcorecomponentphp">trunk/bp-core/bp-core-component.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpblogsbpblogsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-functions.php (3936 => 3937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-functions.php        2011-01-26 20:30:30 UTC (rev 3936)
+++ trunk/bp-blogs/bp-blogs-functions.php        2011-01-26 20:43:59 UTC (rev 3937)
</span><span class="lines">@@ -307,7 +307,7 @@
</span><span class="cx">         BP_Blogs_Blog::delete_blog_for_all( $blog_id );
</span><span class="cx"> 
</span><span class="cx">         // Delete activity stream item
</span><del>-        bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'component' =&gt; $bp-&gt;blogs-&gt;slug, 'type' =&gt; 'new_blog' ) );
</del><ins>+        bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'component' =&gt; $bp-&gt;blogs-&gt;id, 'type' =&gt; 'new_blog' ) );
</ins><span class="cx"> 
</span><span class="cx">         do_action( 'bp_blogs_remove_blog', $blog_id );
</span><span class="cx"> }
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx">         BP_Blogs_Blog::delete_blog_for_user( $blog_id, $user_id );
</span><span class="cx"> 
</span><span class="cx">         // Delete activity stream item
</span><del>-        bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'component' =&gt; $bp-&gt;blogs-&gt;slug, 'type' =&gt; 'new_blog' ) );
</del><ins>+        bp_blogs_delete_activity( array( 'item_id' =&gt; $blog_id, 'component' =&gt; $bp-&gt;blogs-&gt;id, 'type' =&gt; 'new_blog' ) );
</ins><span class="cx"> 
</span><span class="cx">         do_action( 'bp_blogs_remove_blog_for_user', $blog_id, $user_id );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpblogsbpblogstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-template.php (3936 => 3937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-template.php        2011-01-26 20:30:30 UTC (rev 3936)
+++ trunk/bp-blogs/bp-blogs-template.php        2011-01-26 20:43:59 UTC (rev 3937)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">                 global $blog;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;in_the_loop = true;
</span><del>-                $this-&gt;blog = $this-&gt;next_blog();
</del><ins>+                $this-&gt;blog        = $this-&gt;next_blog();
</ins><span class="cx"> 
</span><span class="cx">                 if ( 0 == $this-&gt;current_blog ) // loop has just started
</span><span class="cx">                         do_action('blog_loop_start');
</span><span class="lines">@@ -117,8 +117,8 @@
</span><span class="cx">          * if arguments are directly passed into the loop. Custom plugins should always
</span><span class="cx">          * pass their parameters directly to the loop.
</span><span class="cx">          */
</span><del>-        $type = 'active';
-        $user_id = 0;
</del><ins>+        $type         = 'active';
+        $user_id      = 0;
</ins><span class="cx">         $search_terms = null;
</span><span class="cx"> 
</span><span class="cx">         /* User filtering */
</span><span class="lines">@@ -126,12 +126,12 @@
</span><span class="cx">                 $user_id = $bp-&gt;displayed_user-&gt;id;
</span><span class="cx"> 
</span><span class="cx">         $defaults = array(
</span><del>-                'type' =&gt; $type,
-                'page' =&gt; 1,
-                'per_page' =&gt; 20,
-                'max' =&gt; false,
</del><ins>+                'type'         =&gt; $type,
+                'page'         =&gt; 1,
+                'per_page'     =&gt; 20,
+                'max'          =&gt; false,
</ins><span class="cx"> 
</span><del>-                'user_id' =&gt; $user_id, // Pass a user_id to limit to only blogs this user has higher than subscriber access to
</del><ins>+                'user_id'      =&gt; $user_id, // Pass a user_id to limit to only blogs this user has higher than subscriber access to
</ins><span class="cx">                 'search_terms' =&gt; $search_terms // Pass search terms to filter on the blog title or description.
</span><span class="cx">         );
</span><span class="cx"> 
</span><span class="lines">@@ -170,9 +170,9 @@
</span><span class="cx">         global $bp, $blogs_template;
</span><span class="cx"> 
</span><span class="cx">         $start_num = intval( ( $blogs_template-&gt;pag_page - 1 ) * $blogs_template-&gt;pag_num ) + 1;
</span><del>-        $from_num = bp_core_number_format( $start_num );
-        $to_num = bp_core_number_format( ( $start_num + ( $blogs_template-&gt;pag_num - 1 ) &gt; $blogs_template-&gt;total_blog_count ) ? $blogs_template-&gt;total_blog_count : $start_num + ( $blogs_template-&gt;pag_num - 1 ) );
-        $total = bp_core_number_format( $blogs_template-&gt;total_blog_count );
</del><ins>+        $from_num  = bp_core_number_format( $start_num );
+        $to_num    = bp_core_number_format( ( $start_num + ( $blogs_template-&gt;pag_num - 1 ) &gt; $blogs_template-&gt;total_blog_count ) ? $blogs_template-&gt;total_blog_count : $start_num + ( $blogs_template-&gt;pag_num - 1 ) );
+        $total     = bp_core_number_format( $blogs_template-&gt;total_blog_count );
</ins><span class="cx"> 
</span><span class="cx">         echo sprintf( __( 'Viewing blog %1$s to %2$s (of %3$s blogs)', 'buddypress' ), $from_num, $to_num, $total ); ?&gt; &amp;nbsp;
</span><span class="cx">         &lt;span class=&quot;ajax-loader&quot;&gt;&lt;/span&gt;&lt;?php
</span><span class="lines">@@ -194,12 +194,12 @@
</span><span class="cx">                 global $blogs_template, $bp;
</span><span class="cx"> 
</span><span class="cx">                 $defaults = array(
</span><del>-                        'type' =&gt; 'full',
-                        'width' =&gt; false,
-                        'height' =&gt; false,
-                        'class' =&gt; 'avatar',
-                        'id' =&gt; false,
-                        'alt' =&gt; __( 'Blog authored by %s', 'buddypress' ),
</del><ins>+                        'type'    =&gt; 'full',
+                        'width'   =&gt; false,
+                        'height'  =&gt; false,
+                        'class'   =&gt; 'avatar',
+                        'id'      =&gt; false,
+                        'alt'     =&gt; __( 'Blog authored by %s', 'buddypress' ),
</ins><span class="cx">                         'no_grav' =&gt; true
</span><span class="cx">                 );
</span><span class="cx"> 
</span><span class="lines">@@ -273,17 +273,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx"> function bp_blog_hidden_fields() {
</span><del>-        if ( isset( $_REQUEST['s'] ) ) {
</del><ins>+        if ( isset( $_REQUEST['s'] ) )
</ins><span class="cx">                 echo '&lt;input type=&quot;hidden&quot; id=&quot;search_terms&quot; value=&quot;' . esc_attr( $_REQUEST['s'] ). '&quot; name=&quot;search_terms&quot; /&gt;';
</span><del>-        }
</del><span class="cx"> 
</span><del>-        if ( isset( $_REQUEST['letter'] ) ) {
</del><ins>+        if ( isset( $_REQUEST['letter'] ) )
</ins><span class="cx">                 echo '&lt;input type=&quot;hidden&quot; id=&quot;selected_letter&quot; value=&quot;' . esc_attr( $_REQUEST['letter'] ) . '&quot; name=&quot;selected_letter&quot; /&gt;';
</span><del>-        }
</del><span class="cx"> 
</span><del>-        if ( isset( $_REQUEST['blogs_search'] ) ) {
</del><ins>+        if ( isset( $_REQUEST['blogs_search'] ) )
</ins><span class="cx">                 echo '&lt;input type=&quot;hidden&quot; id=&quot;search_terms&quot; value=&quot;' . esc_attr( $_REQUEST['blogs_search'] ) . '&quot; name=&quot;search_terms&quot; /&gt;';
</span><del>-        }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_total_blog_count() {
</span><span class="lines">@@ -372,7 +369,9 @@
</span><span class="cx">                 echo '&lt;label for=&quot;blogname&quot;&gt;' . __('Blog Domain:', 'buddypress') . '&lt;/label&gt;';
</span><span class="cx"> 
</span><span class="cx">         if ( $errmsg = $errors-&gt;get_error_message('blogname') ) { ?&gt;
</span><ins>+
</ins><span class="cx">                 &lt;p class=&quot;error&quot;&gt;&lt;?php echo $errmsg ?&gt;&lt;/p&gt;
</span><ins>+
</ins><span class="cx">         &lt;?php }
</span><span class="cx"> 
</span><span class="cx">         if ( !is_subdomain_install() )
</span><span class="lines">@@ -394,9 +393,13 @@
</span><span class="cx"> 
</span><span class="cx">         // Blog Title
</span><span class="cx">         ?&gt;
</span><ins>+
</ins><span class="cx">         &lt;label for=&quot;blog_title&quot;&gt;&lt;?php _e('Blog Title:', 'buddypress') ?&gt;&lt;/label&gt;
</span><ins>+
</ins><span class="cx">         &lt;?php if ( $errmsg = $errors-&gt;get_error_message('blog_title') ) { ?&gt;
</span><ins>+
</ins><span class="cx">                 &lt;p class=&quot;error&quot;&gt;&lt;?php echo $errmsg ?&gt;&lt;/p&gt;
</span><ins>+
</ins><span class="cx">         &lt;?php }
</span><span class="cx">         echo '&lt;input name=&quot;blog_title&quot; type=&quot;text&quot; id=&quot;blog_title&quot; value=&quot;'.esc_html($blog_title, 1).'&quot; /&gt;&lt;/p&gt;';
</span><span class="cx">         ?&gt;
</span><span class="lines">@@ -463,22 +466,22 @@
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '' ) {
</span><span class="cx">         $protocol = is_ssl() ? 'https://' : 'http://';
</span><del>-        $blog_url = $protocol . $domain . $path;
-        ?&gt;
-        &lt;p&gt;&lt;?php _e('Congratulations! You have successfully registered a new blog.', 'buddypress') ?&gt;&lt;/p&gt;
</del><ins>+        $blog_url = $protocol . $domain . $path; ?&gt;
+
+        &lt;p&gt;&lt;?php _e( 'Congratulations! You have successfully registered a new blog.', 'buddypress' ) ?&gt;&lt;/p&gt;
</ins><span class="cx">         &lt;p&gt;
</span><del>-                &lt;?php printf(__('&lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt; is your new blog.  &lt;a href=&quot;%3$s&quot;&gt;Login&lt;/a&gt; as &quot;%4$s&quot; using your existing password.', 'buddypress'), $blog_url, $blog_url, $blog_url . &quot;wp-login.php&quot;, $user_name) ?&gt;
</del><ins>+                &lt;?php printf(__( '&lt;a href=&quot;%1$s&quot;&gt;%2$s&lt;/a&gt; is your new blog.  &lt;a href=&quot;%3$s&quot;&gt;Login&lt;/a&gt; as &quot;%4$s&quot; using your existing password.', 'buddypress' ), $blog_url, $blog_url, $blog_url . &quot;wp-login.php&quot;, $user_name ); ?&gt;
</ins><span class="cx">         &lt;/p&gt;
</span><del>-        &lt;?php
</del><ins>+
+&lt;?php
</ins><span class="cx">         do_action('signup_finished');
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_create_blog_link() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><del>-        if ( bp_is_my_profile() )        {
-                echo apply_filters( 'bp_create_blog_link', '&lt;a href=&quot;' . $bp-&gt;root_domain . '/' . $bp-&gt;blogs-&gt;slug . '/create&quot;&gt;' . __('Create a Blog', 'buddypress') . '&lt;/a&gt;' );
-        }
</del><ins>+        if ( bp_is_my_profile() )
+                echo apply_filters( 'bp_create_blog_link', '&lt;a href=&quot;' . $bp-&gt;root_domain . '/' . $bp-&gt;blogs-&gt;root_slug . '/create/&quot;&gt;' . __( 'Create a Blog', 'buddypress' ) . '&lt;/a&gt;' );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_blog_tabs() {
</span><span class="lines">@@ -488,13 +491,14 @@
</span><span class="cx">         if ( bp_is_my_profile() )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        $current_tab = $bp-&gt;current_action
-?&gt;
</del><ins>+        $current_tab = $bp-&gt;current_action; ?&gt;
+
</ins><span class="cx">         &lt;ul class=&quot;content-header-nav&quot;&gt;
</span><del>-                &lt;li&lt;?php if ( 'my-blogs' == $current_tab || empty( $current_tab ) ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug ?&gt;/my-blogs&quot;&gt;&lt;?php printf( __( &quot;%s's Blogs&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname )  ?&gt;&lt;/a&gt;&lt;/li&gt;
-                &lt;li&lt;?php if ( 'recent-posts' == $current_tab ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug ?&gt;/recent-posts&quot;&gt;&lt;?php printf( __( &quot;%s's Recent Posts&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname )  ?&gt;&lt;/a&gt;&lt;/li&gt;
-                &lt;li&lt;?php if ( 'recent-comments' == $current_tab ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug ?&gt;/recent-comments&quot;&gt;&lt;?php printf( __( &quot;%s's Recent Comments&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname )  ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                &lt;li&lt;?php if ( 'my-blogs' == $current_tab || empty( $current_tab ) ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo trailingslashit( $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug . '/my-blogs' ); ?&gt;&quot;&gt;&lt;?php printf( __( &quot;%s's Blogs&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname ); ?&gt;&lt;/a&gt;&lt;/li&gt;
+                &lt;li&lt;?php if ( 'recent-posts' == $current_tab ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo trailingslashit( $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug . '/recent-posts' ); ?&gt;&quot;&gt;&lt;?php printf( __( &quot;%s's Recent Posts&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname ); ?&gt;&lt;/a&gt;&lt;/li&gt;
+                &lt;li&lt;?php if ( 'recent-comments' == $current_tab ) : ?&gt; class=&quot;current&quot;&lt;?php endif; ?&gt;&gt;&lt;a href=&quot;&lt;?php echo trailingslashit( $bp-&gt;displayed_user-&gt;domain . $bp-&gt;blogs-&gt;slug . '/recent-comments' );?&gt;&quot;&gt;&lt;?php printf( __( &quot;%s's Recent Comments&quot;, 'buddypress' ), $bp-&gt;displayed_user-&gt;fullname ); ?&gt;&lt;/a&gt;&lt;/li&gt;
</ins><span class="cx">         &lt;/ul&gt;
</span><ins>+
</ins><span class="cx"> &lt;?php
</span><span class="cx">         do_action( 'bp_blogs_blog_tabs', $current_tab );
</span><span class="cx"> }
</span><span class="lines">@@ -503,13 +507,13 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         $default_search_value = bp_get_search_default_text(); 
</span><del>-        $search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; 
</del><ins>+        $search_value = !empty( $_REQUEST['s'] ) ? stripslashes( $_REQUEST['s'] ) : $default_search_value; ?&gt;
</ins><span class="cx"> 
</span><del>-        ?&gt;
</del><span class="cx">         &lt;form action=&quot;&quot; method=&quot;get&quot; id=&quot;search-blogs-form&quot;&gt;
</span><span class="cx">                 &lt;label&gt;&lt;input type=&quot;text&quot; name=&quot;s&quot; id=&quot;blogs_search&quot; value=&quot;&lt;?php echo esc_attr( $search_value ) ?&gt;&quot;  onfocus=&quot;if (this.value == '&lt;?php echo $default_search_value ?&gt;') {this.value = '';}&quot; onblur=&quot;if (this.value == '') {this.value = '&lt;?php echo $default_search_value ?&gt;';}&quot; /&gt;&lt;/label&gt;
</span><span class="cx">                 &lt;input type=&quot;submit&quot; id=&quot;blogs_search_submit&quot; name=&quot;blogs_search_submit&quot; value=&quot;&lt;?php _e( 'Search', 'buddypress' ) ?&gt;&quot; /&gt;
</span><span class="cx">         &lt;/form&gt;
</span><ins>+
</ins><span class="cx"> &lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcorebuddybarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-buddybar.php (3936 => 3937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-buddybar.php        2011-01-26 20:30:30 UTC (rev 3936)
+++ trunk/bp-core/bp-core-buddybar.php        2011-01-26 20:43:59 UTC (rev 3937)
</span><span class="lines">@@ -445,7 +445,7 @@
</span><span class="cx"> 
</span><span class="cx">         if ( bp_blog_signup_enabled() ) {
</span><span class="cx">                 echo '&lt;li' . $alt . '&gt;';
</span><del>-                echo '&lt;a href=&quot;' . $bp-&gt;root_domain . '/' . $bp-&gt;blogs-&gt;slug . '/create/&quot;&gt;' . __( 'Create a Blog!', 'buddypress' ) . '&lt;/a&gt;';
</del><ins>+                echo '&lt;a href=&quot;' . $bp-&gt;root_domain . '/' . $bp-&gt;blogs-&gt;root_slug . '/create/&quot;&gt;' . __( 'Create a Blog!', 'buddypress' ) . '&lt;/a&gt;';
</ins><span class="cx">                 echo '&lt;/li&gt;';
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcorecomponentphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-component.php (3936 => 3937)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-component.php        2011-01-26 20:30:30 UTC (rev 3936)
+++ trunk/bp-core/bp-core-component.php        2011-01-26 20:43:59 UTC (rev 3937)
</span><span class="lines">@@ -206,14 +206,21 @@
</span><span class="cx">         /**
</span><span class="cx">          * Setup the navigation
</span><span class="cx">          *
</span><del>-         * @param arr $main_nav
-         * @param arr $sub_nav
</del><ins>+         * @param arr $main_nav Optional
+         * @param arr $sub_nav Optional
</ins><span class="cx">          */
</span><del>-        function _setup_nav( $main_nav, $sub_nav ) {
-                bp_core_new_nav_item( $main_nav );
</del><ins>+        function _setup_nav( $main_nav = '', $sub_nav = '' ) {
+                // No sub nav items without a main nav item
+                if ( !empty( $main_nav ) ) {
+                        bp_core_new_nav_item( $main_nav );
</ins><span class="cx"> 
</span><del>-                foreach( $sub_nav as $nav )
-                        bp_core_new_subnav_item( $nav );
</del><ins>+                        // Sub nav items are not required
+                        if ( !empty( $sub_nav ) ) {
+                                foreach( $sub_nav as $nav ) {
+                                        bp_core_new_subnav_item( $nav );
+                                }
+                        }
+                }
</ins><span class="cx"> 
</span><span class="cx">                 // Call action
</span><span class="cx">                 do_action( 'bp_' . $this-&gt;id . '_setup_nav' );
</span></span></pre>
</div>
</div>

</body>
</html>