<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[BuddyPress] [3325] trunk/bp-themes/bp-default:
First pass of menu support for BP-Default.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>3325</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2010-10-27 22:05:52 +0000 (Wed, 27 Oct 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>First pass of menu support for BP-Default. See #2691.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpthemesbpdefault_inccssdefaultcss">trunk/bp-themes/bp-default/_inc/css/default.css</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultheaderphp">trunk/bp-themes/bp-default/header.php</a></li>
<li><a href="#trunkbpthemesbpdefaultstylecss">trunk/bp-themes/bp-default/style.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpthemesbpdefault_inccssdefaultcss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/default.css (3324 => 3325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/default.css        2010-10-27 19:37:59 UTC (rev 3324)
+++ trunk/bp-themes/bp-default/_inc/css/default.css        2010-10-27 22:05:52 UTC (rev 3325)
</span><span class="lines">@@ -1761,3 +1761,21 @@
</span><span class="cx">         #footer a {
</span><span class="cx">                 color: #bbb;
</span><span class="cx">         }
</span><ins>+
+/* Menu
+-------------------------------------------------------------- */
+
+#nav ul {
+        display: none;
+        position: absolute;
+        z-index: 99999;
+        right: 0;
+}
+        #nav li:hover > ul {
+                display: block;
+        }
+
+        #nav ul li {
+                margin-right: 0;
+                min-width: 186px;
+        }
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (3324 => 3325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-10-27 19:37:59 UTC (rev 3324)
+++ trunk/bp-themes/bp-default/functions.php        2010-10-27 22:05:52 UTC (rev 3325)
</span><span class="lines">@@ -1,5 +1,4 @@
</span><span class="cx"> <?php
</span><del>-
</del><span class="cx"> // Stop the theme from killing WordPress if BuddyPress is not enabled.
</span><span class="cx"> if ( !class_exists( 'BP_Core_User' ) )
</span><span class="cx">         return false;
</span><span class="lines">@@ -15,6 +14,11 @@
</span><span class="cx">         )
</span><span class="cx"> );
</span><span class="cx">
</span><ins>+// Register navigation menu
+register_nav_menus( array(
+        'primary' => __( 'Primary Navigation', 'buddypress' ),
+) );
+
</ins><span class="cx"> // Load the AJAX functions for the theme
</span><span class="cx"> require_once( TEMPLATEPATH . '/_inc/ajax.php' );
</span><span class="cx">
</span><span class="lines">@@ -335,7 +339,29 @@
</span><span class="cx"> if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
</span><span class="cx">         add_action( 'admin_notices', 'bp_dtheme_show_notice' );
</span><span class="cx">
</span><ins>+/**
+ * wp_nav_menu() callback from the main navigation in header.php
+ *
+ * Used when the custom menus haven't been configured.
+ *
+ * @param array Menu arguments from wp_nav_menu()
+ * @package BuddyPress Theme
+ * @see wp_nav_menu()
+ * @since 1.3
+ */
+function bp_dtheme_main_nav( $args ) {
+?>
+        <ul id="nav">
+                <li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>>
+                        <a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a>
+                </li>
</ins><span class="cx">
</span><ins>+                <?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>
+                <?php do_action( 'bp_nav_items' ); ?>
+        </ul><!-- #nav -->
+<?php
+}
+
</ins><span class="cx"> // Member Buttons
</span><span class="cx"> if ( bp_is_active( 'friends' ) )
</span><span class="cx">         add_action( 'bp_member_header_actions', 'bp_add_friend_button' );
</span><span class="lines">@@ -356,5 +382,4 @@
</span><span class="cx"> // Blog Buttons
</span><span class="cx"> if ( bp_is_active( 'blogs' ) )
</span><span class="cx">         add_action( 'bp_directory_blogs_actions', 'bp_blogs_visit_blog_button' );
</span><del>-
-?>
</del><ins>+?>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (3324 => 3325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2010-10-27 19:37:59 UTC (rev 3324)
+++ trunk/bp-themes/bp-default/header.php        2010-10-27 22:05:52 UTC (rev 3325)
</span><span class="lines">@@ -43,16 +43,8 @@
</span><span class="cx">
</span><span class="cx">                         <h1 id="logo"><a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php bp_site_name() ?></a></h1>
</span><span class="cx">
</span><del>-                        <ul id="nav">
-                                <li<?php if ( bp_is_front_page() ) : ?> class="selected"<?php endif; ?>>
-                                        <a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a>
-                                </li>
</del><ins>+                        <?php wp_nav_menu( array( 'container' => false, 'menu_id' => 'nav', 'theme_location' => 'primary', 'fallback_cb' => 'bp_dtheme_main_nav' ) ); ?>
</ins><span class="cx">
</span><del>-                                <?php wp_list_pages( 'title_li=&depth=1&exclude=' . bp_dtheme_page_on_front() ); ?>
-
-                                <?php do_action( 'bp_nav_items' ); ?>
-                        </ul><!-- #nav -->
-
</del><span class="cx">                         <div id="search-bar">
</span><span class="cx">                                 <div class="padder">
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultstylecss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/style.css (3324 => 3325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/style.css        2010-10-27 19:37:59 UTC (rev 3324)
+++ trunk/bp-themes/bp-default/style.css        2010-10-27 22:05:52 UTC (rev 3325)
</span><span class="lines">@@ -5,7 +5,7 @@
</span><span class="cx"> Version: 1.3-bleeding
</span><span class="cx"> Author: BuddyPress.org
</span><span class="cx"> Author URI: http://buddypress.org
</span><del>-Tags: buddypress, two-columns, custom-header, white, blue
</del><ins>+Tags: buddypress, two-columns, custom-header, white, blue, translation-ready
</ins><span class="cx">
</span><span class="cx"> ** IMPORTANT - DO NOT COPY THIS THEME **
</span><span class="cx"> If you want to make a custom theme based on this theme, DO NOT copy and edit it. By
</span></span></pre>
</div>
</div>
</body>
</html>