diff --git a/CHANGELOG.md b/CHANGELOG.md index bfa7d2d..4740d6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### HEAD +* Move nav customizations into `lib/nav.php` + ### 6.1.0: October 2nd, 2012 * Change roots_sidebar into a more explicit configuration array * Re-organize configuration/setup files diff --git a/doc/lib.md b/doc/lib.md index fa89bbf..e2c1590 100644 --- a/doc/lib.md +++ b/doc/lib.md @@ -59,6 +59,10 @@ This file runs the initial theme setup and defines helper constants for later us This file is a placeholder for you to put in custom metaboxes. We recommend the use of [Custom Metaboxes and Fields for WordPress](https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress). +### nav.php + +This file contains all the custom nav modifications (for Bootstrap) and cleanup. + ### post-types.php This file is a placeholder for you to put in [custom post types](http://codex.wordpress.org/Function_Reference/register_post_type) and [taxonomies](http://codex.wordpress.org/Function_Reference/register_taxonomy). diff --git a/functions.php b/functions.php index c2a1d0e..08c0bbf 100644 --- a/functions.php +++ b/functions.php @@ -11,6 +11,7 @@ require_once locate_template('/lib/sidebar.php'); // Sidebar class require_once locate_template('/lib/config.php'); // Configuration require_once locate_template('/lib/activation.php'); // Theme activation require_once locate_template('/lib/cleanup.php'); // Cleanup +require_once locate_template('/lib/nav.php'); // Custom nav modifications require_once locate_template('/lib/htaccess.php'); // Rewrites for assets, H5BP .htaccess require_once locate_template('/lib/widgets.php'); // Sidebars and widgets require_once locate_template('/lib/scripts.php'); // Scripts and stylesheets diff --git a/lib/cleanup.php b/lib/cleanup.php index e4d25f9..dfec989 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -407,107 +407,6 @@ function roots_excerpt_more($more) { add_filter('excerpt_length', 'roots_excerpt_length'); add_filter('excerpt_more', 'roots_excerpt_more'); -/** - * Cleaner walker for wp_nav_menu() - * - * Walker_Nav_Menu (WordPress default) example output: - *
  • Home
  • - *
  • Sample PageHome
  • - * - */ -class Roots_Nav_Walker extends Walker_Nav_Menu { - function check_current($classes) { - return preg_match('/(current[-_])|active|dropdown/', $classes); - } - - function start_lvl(&$output, $depth = 0, $args = array()) { - $output .= "\n