- +
©
- \ No newline at end of file + + + + + diff --git a/templates/head.php b/templates/head.php index 2b65031..b07f791 100644 --- a/templates/head.php +++ b/templates/head.php @@ -14,4 +14,8 @@ - \ No newline at end of file + + + + +diff --git a/CHANGELOG.md b/CHANGELOG.md index 6509ffd..2b9b744 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### HEAD +* Move custom entry_meta code into template +* Move Google Analytics code into footer template +* Add CONTRIBUTING.md to assist with the new GitHub UI +* Add nav walker support for CSS dividers and nav-header + ### 6.0.0: September 16th, 2012 * Simplify nav walker and support 3rd level dropdowns * Update to Bootstrap 2.1.1, jQuery 1.8.1, Modernizr 2.6.2 diff --git a/doc/lib.md b/doc/lib.md index 63caad9..6760b08 100644 --- a/doc/lib.md +++ b/doc/lib.md @@ -3,14 +3,6 @@ table of contents](README.md) # Theme library -### actions.php - -This file is used to hook into [WordPress actions](http://codex.wordpress.org/Plugin_API/Action_Reference). - -The `roots_feed_link()` function is used to hook into `wp_head()` to return a feed link if your site has any posts. - -The `roots_google_analytics()` function is used to hook into `wp_footer()` to return the [asynchronous Google Analytics snippet](http://mathiasbynens.be/notes/async-analytics-snippet) from HTML5 Boilerplate if an ID is defined in `config.php`. - ### activation.php This file handles the theme activation. [About the theme activation](activation.md). @@ -106,13 +98,6 @@ Learn about `plugins.js` and `main.js` in the HTML5 Boilerplate [JavaScript docs It's safe to move jQuery to the footer if you're able to avoid problems with certain plugins that improperly use jQuery. Copy the necessary lines from `head.php` to `footer.php` right before `wp_footer()`, then update the `wp_register_script()` calls `scripts.php` to have scripts in the footer by setting the last argument to `true`. -### template-tags.php - -This file contains custom template tags. - -`roots_entry_meta()` is used by the [theme templates](templates.md) to return the author byline and post time and date information. - - ### utils.php This file contains utility functions used by other files in the theme. @@ -126,4 +111,4 @@ This file registers the custom sidebars and custom widgets. There are two initia 1. Primary Sidebar (used by `templates/sidebar.php`, included from `base.php` within `#sidebar`) 2. Footer (used by `templates/footer.php`) -The included vCard widget can be used to build additional, custom widgets. \ No newline at end of file +The included vCard widget can be used to build additional, custom widgets. diff --git a/doc/templates.md b/doc/templates.md index a387ccb..2289459 100644 --- a/doc/templates.md +++ b/doc/templates.md @@ -19,10 +19,16 @@ The `content-page.php` template is included by page templates in the theme root. The `content-single.php` template is included by single post templates in the theme root. +### entry-meta.php + +`entry-meta.php` displays the author byline, post time, and date information. + ### footer.php `footer.php` includes the Footer sidebar area and displays the site copyright information. +Also included is the [asynchronous Google Analytics snippet](http://mathiasbynens.be/notes/async-analytics-snippet) from HTML5 Boilerplate if an ID is defined in `config.php`. + ### head.php `head.php` includes everything in the `
`. @@ -45,4 +51,4 @@ The `content-single.php` template is included by single post templates in the th ### sidebar.php -`sidebar.php` includes the Primary Sidebar. \ No newline at end of file +`sidebar.php` includes the Primary Sidebar. diff --git a/functions.php b/functions.php index 6d0a540..16a8c6b 100644 --- a/functions.php +++ b/functions.php @@ -11,8 +11,6 @@ require_once locate_template('/lib/activation.php'); // Theme activation require_once locate_template('/lib/cleanup.php'); // Cleanup 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/template-tags.php'); // Template tags -require_once locate_template('/lib/actions.php'); // Actions require_once locate_template('/lib/scripts.php'); // Scripts and stylesheets require_once locate_template('/lib/post-types.php'); // Custom post types require_once locate_template('/lib/metaboxes.php'); // Custom metaboxes diff --git a/lib/actions.php b/lib/actions.php deleted file mode 100644 index d429aea..0000000 --- a/lib/actions.php +++ /dev/null @@ -1,31 +0,0 @@ - if there's posts - */ -function roots_feed_link() { - $count = wp_count_posts('post'); if ($count->publish > 0) { - echo "\n\t\n"; - } -} - -add_action('wp_head', 'roots_feed_link', -2); - -/** - * Add the asynchronous Google Analytics snippet from HTML5 Boilerplate - * if an ID is defined in config.php - * - * @link mathiasbynens.be/notes/async-analytics-snippet - */ -function roots_google_analytics() { - if (GOOGLE_ANALYTICS_ID) { - echo "\n\t\n"; - } -} - -add_action('wp_footer', 'roots_google_analytics'); diff --git a/lib/template-tags.php b/lib/template-tags.php deleted file mode 100644 index 1de1a7a..0000000 --- a/lib/template-tags.php +++ /dev/null @@ -1,7 +0,0 @@ -'. sprintf(__('Posted on %s at %s.', 'roots'), get_the_date(), get_the_time()) .''; - echo ''; -} diff --git a/lib/utils.php b/lib/utils.php index 233160e..8449d20 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -68,3 +68,8 @@ function is_element_empty($element) { $element = trim($element); return empty($element) ? false : true; } + +function has_posts() { + $count = wp_count_posts('post'); + return ($count->publish > 0) ? true : false; +} diff --git a/templates/content-single.php b/templates/content-single.php index 52e6b17..eb8c310 100644 --- a/templates/content-single.php +++ b/templates/content-single.php @@ -2,7 +2,7 @@©
- \ No newline at end of file + + + + + diff --git a/templates/head.php b/templates/head.php index 2b65031..b07f791 100644 --- a/templates/head.php +++ b/templates/head.php @@ -14,4 +14,8 @@ - \ No newline at end of file + + + + +