From ee1f86d2c13af09874178d75f773a37b11dbaa4c Mon Sep 17 00:00:00 2001 From: QWp6t Date: Thu, 28 Aug 2014 20:37:52 -0700 Subject: [PATCH 01/14] Adds Bower installation instructions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8fa6f8c..4c61a05 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,13 @@ Roots uses [Grunt](http://gruntjs.com/) for compiling LESS to CSS, checking for If you'd like to use Bootstrap Sass, look at the [Roots Sass](https://github.com/roots/roots-sass) fork. -### Install Grunt +### Install Grunt and Bower **Unfamiliar with npm? Don't have node installed?** [Download and install node.js](http://nodejs.org/download/) before proceeding. From the command line: -1. Install `grunt-cli` globally with `npm install -g grunt-cli`. +1. Install `grunt-cli` and `bower` globally with `npm install -g grunt-cli bower`. 2. Navigate to the theme directory, then run `npm install`. npm will look at `package.json` and automatically install the necessary dependencies. It will also automatically run `bower install`, which installs front-end packages defined in `bower.json`. When completed, you'll be able to run the various Grunt commands provided from the command line. From 76dff647318a247a53d29e42979d9728974be2a4 Mon Sep 17 00:00:00 2001 From: QWp6t Date: Thu, 28 Aug 2014 21:16:51 -0700 Subject: [PATCH 02/14] Adds notes about privileges. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4c61a05..56d3559 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,11 @@ From the command line: When completed, you'll be able to run the various Grunt commands provided from the command line. +**N.B.** +You will need write permission to the global npm directory to install `grunt-cli` and `bower`. You will also likely have to be using an elevated terminal or prefix the command with `sudo`, i.e., `sudo install -g grunt-cli bower`. + +We also advise against running as root user. NPM deliberately uses limited privileges when executing certain commands such as those included in the Roots post-install process, and when this happens to the root user, any file system objects that are not expressly writable by the root user will fail to write during the execution of the command. These might include directories such as `/var/www` or `/home/someotheruser`. If you're running as root and have problems, don't say we didn't warn you. + ### Available Grunt commands * `grunt dev` — Compile LESS to CSS, concatenate and validate JS From c5488950f7e798f8f7402ce1039db1864c7bafcb Mon Sep 17 00:00:00 2001 From: QWp6t Date: Fri, 29 Aug 2014 04:30:05 -0700 Subject: [PATCH 03/14] Fix typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 56d3559..638b90a 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ From the command line: When completed, you'll be able to run the various Grunt commands provided from the command line. **N.B.** -You will need write permission to the global npm directory to install `grunt-cli` and `bower`. You will also likely have to be using an elevated terminal or prefix the command with `sudo`, i.e., `sudo install -g grunt-cli bower`. +You will need write permission to the global npm directory to install `grunt-cli` and `bower`. You will also likely have to be using an elevated terminal or prefix the command with `sudo`, i.e., `sudo npm install -g grunt-cli bower`. We also advise against running as root user. NPM deliberately uses limited privileges when executing certain commands such as those included in the Roots post-install process, and when this happens to the root user, any file system objects that are not expressly writable by the root user will fail to write during the execution of the command. These might include directories such as `/var/www` or `/home/someotheruser`. If you're running as root and have problems, don't say we didn't warn you. From 977a76cc42dc8a9977b65d26bf9ecb72acd0ffa7 Mon Sep 17 00:00:00 2001 From: Michael Silber Date: Sun, 28 Sep 2014 10:18:24 -0400 Subject: [PATCH 04/14] Move wp_footer() from footer template into base.php for easier footer customization and DRY --- base.php | 2 ++ templates/footer.php | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base.php b/base.php index 27c050b..9828b4c 100644 --- a/base.php +++ b/base.php @@ -27,5 +27,7 @@ + + diff --git a/templates/footer.php b/templates/footer.php index f34fe5f..3c83574 100644 --- a/templates/footer.php +++ b/templates/footer.php @@ -3,5 +3,3 @@ - - From 309917ae6730cb159094c7a3edc73358c220a168 Mon Sep 17 00:00:00 2001 From: Eric Wafford Date: Tue, 7 Oct 2014 11:41:04 -0500 Subject: [PATCH 05/14] Add roots_body_class function that checks for page slug in body_class classes and adds it as needed --- lib/utils.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/utils.php b/lib/utils.php index 118c2f3..8f6b56d 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -14,3 +14,17 @@ function roots_get_search_form($form) { return $form; } add_filter('get_search_form', 'roots_get_search_form'); + +/** + * Add page slug to body_class() classes if it doesn't exist + */ +function roots_body_class($classes) { + // Add post/page slug + if (is_single() || is_page() && !is_front_page()) { + if (!in_array(basename(get_permalink()), $classes)) { + $classes[] = basename(get_permalink()); + } + } + return $classes; +} +add_filter('body_class', 'roots_body_class'); From dcab2b30402177a9f2162bcef10fda25565e1982 Mon Sep 17 00:00:00 2001 From: Michael Silber Date: Sat, 18 Oct 2014 19:32:10 -0400 Subject: [PATCH 06/14] Move variables into main.less in case it needs to come after other imports (e.g., fontawesome) --- assets/less/_bootstrap.less | 1 - assets/less/main.less | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/less/_bootstrap.less b/assets/less/_bootstrap.less index 700f225..425658e 100644 --- a/assets/less/_bootstrap.less +++ b/assets/less/_bootstrap.less @@ -6,7 +6,6 @@ // Variables @import "../vendor/bootstrap/less/variables"; -@import "_variables"; // Bootstrap variable overrides and custom variables // Mixins: Utilities @import "../vendor/bootstrap/less/mixins/hide-text"; diff --git a/assets/less/main.less b/assets/less/main.less index e300484..5affb9f 100644 --- a/assets/less/main.less +++ b/assets/less/main.less @@ -1,6 +1,9 @@ // Bootstrap @import "_bootstrap"; +// Variable overrides and custom variables +@import "_variables"; + // Roots @import "_global"; // Base styling & custom mixins @import "components/_buttons"; // Button tweaks From 43507e4dd3818dd5dd21875fb2105cffe00e20de Mon Sep 17 00:00:00 2001 From: Eric Wafford Date: Sun, 19 Oct 2014 12:20:56 -0500 Subject: [PATCH 07/14] Fix Spaces --- lib/utils.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils.php b/lib/utils.php index 8f6b56d..93e5116 100644 --- a/lib/utils.php +++ b/lib/utils.php @@ -21,9 +21,9 @@ add_filter('get_search_form', 'roots_get_search_form'); function roots_body_class($classes) { // Add post/page slug if (is_single() || is_page() && !is_front_page()) { - if (!in_array(basename(get_permalink()), $classes)) { - $classes[] = basename(get_permalink()); - } + if (!in_array(basename(get_permalink()), $classes)) { + $classes[] = basename(get_permalink()); + } } return $classes; } From 9cf5709813f4b7b34f15373a9ad04b46708ff5bf Mon Sep 17 00:00:00 2001 From: Chris Carr Date: Mon, 20 Oct 2014 13:41:23 -0700 Subject: [PATCH 08/14] Update hEntry schema to use `updated` instead of `published` on the time element --- templates/entry-meta.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/entry-meta.php b/templates/entry-meta.php index e0ba57e..cbab2e4 100644 --- a/templates/entry-meta.php +++ b/templates/entry-meta.php @@ -1,2 +1,2 @@ - + From 2978eb3d9701d35f2541cdb8d76994421c87e409 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 13:00:14 -0500 Subject: [PATCH 09/14] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a147d2..5985208 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### HEAD +* Update hEntry schema to use `updated` instead of `published` +* Move variables into `main.less` +* Add `roots_body_class` function that checks for page slug in `body_class` +* Move `wp_footer` from footer template into `base.php` + ### 7.0.1: August 15th, 2014 * Move `
` and `.sidebar` markup out of PHP and into LESS * Define `WP_ENV` if it is not already defined From 4ab11733453cf1516893b5800187aa1281a57695 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 13:06:36 -0500 Subject: [PATCH 10/14] Move JavaScript to footer Ref https://github.com/h5bp/html5-boilerplate/issues/1605 --- CHANGELOG.md | 1 + lib/scripts.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5985208..63e9e9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Move JavaScript to footer * Update hEntry schema to use `updated` instead of `published` * Move variables into `main.less` * Add `roots_body_class` function that checks for page slug in `body_class` diff --git a/lib/scripts.php b/lib/scripts.php index ac3f22f..573ff1f 100644 --- a/lib/scripts.php +++ b/lib/scripts.php @@ -8,7 +8,7 @@ * Enqueue scripts in the following order: * 1. jquery-1.11.1.min.js via Google CDN * 2. /theme/assets/js/vendor/modernizr.min.js - * 3. /theme/assets/js/scripts.js (in footer) + * 3. /theme/assets/js/scripts.js * * Google Analytics is loaded after enqueued scripts if: * - An ID has been defined in config.php @@ -46,7 +46,7 @@ function roots_scripts() { */ if (!is_admin() && current_theme_supports('jquery-cdn')) { wp_deregister_script('jquery'); - wp_register_script('jquery', $assets['jquery'], array(), null, false); + wp_register_script('jquery', $assets['jquery'], array(), null, true); add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2); } @@ -54,7 +54,7 @@ function roots_scripts() { wp_enqueue_script('comment-reply'); } - wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, false); + wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, true); wp_enqueue_script('jquery'); wp_enqueue_script('roots_js', get_template_directory_uri() . $assets['js'], array(), null, true); } @@ -79,7 +79,7 @@ add_action('wp_head', 'roots_jquery_local_fallback'); /** * Google Analytics snippet from HTML5 Boilerplate - * + * * Cookie domain is 'auto' configured. See: http://goo.gl/VUCHKM */ function roots_google_analytics() { ?> From b7094fcc2d2e122e22e6ba4bad8ffb310d399f9b Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 15:44:17 -0500 Subject: [PATCH 11/14] Remove HTML5 shiv from Modernizr build --- Gruntfile.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 75da245..d93c7b3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -103,6 +103,9 @@ module.exports = function(grunt) { ['assets/css/main.min.css'] ] }, + extra: { + shiv: false + }, uglify: true, parseFiles: true } From 0c1ae408e0f9d808b5f30c0e17839cebbe3ea801 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 16:44:33 -0500 Subject: [PATCH 12/14] Simplify comments, use core comment form and list --- functions.php | 1 - lib/comments.php | 52 -------------------------------------- lib/init.php | 2 +- templates/comment.php | 14 ----------- templates/comments.php | 57 ++++++------------------------------------ 5 files changed, 9 insertions(+), 117 deletions(-) delete mode 100644 lib/comments.php delete mode 100644 templates/comment.php diff --git a/functions.php b/functions.php index 515a348..a93b5e1 100644 --- a/functions.php +++ b/functions.php @@ -19,7 +19,6 @@ $roots_includes = array( 'lib/titles.php', // Page titles 'lib/nav.php', // Custom nav modifications 'lib/gallery.php', // Custom [gallery] modifications - 'lib/comments.php', // Custom comments modifications 'lib/scripts.php', // Scripts and stylesheets 'lib/extras.php', // Custom functions ); diff --git a/lib/comments.php b/lib/comments.php deleted file mode 100644 index afe1f11..0000000 --- a/lib/comments.php +++ /dev/null @@ -1,52 +0,0 @@ - -
    > - '; - } - - function start_el(&$output, $comment, $depth = 0, $args = array(), $id = 0) { - $depth++; - $GLOBALS['comment_depth'] = $depth; - $GLOBALS['comment'] = $comment; - - if (!empty($args['callback'])) { - call_user_func($args['callback'], $comment, $args, $depth); - return; - } - - extract($args, EXTR_SKIP); ?> - -
  • > - - located in templates/comment.php, and then the comment's
  • - echo "
  • \n"; - } -} - -function roots_get_avatar($avatar, $type) { - if (!is_object($type)) { return $avatar; } - - $avatar = str_replace("class='avatar", "class='avatar pull-left media-object", $avatar); - return $avatar; -} -add_filter('get_avatar', 'roots_get_avatar', 10, 2); diff --git a/lib/init.php b/lib/init.php index d70a899..a2ba3b1 100644 --- a/lib/init.php +++ b/lib/init.php @@ -25,7 +25,7 @@ function roots_setup() { // Add HTML5 markup for captions // http://codex.wordpress.org/Function_Reference/add_theme_support#HTML5 - add_theme_support('html5', array('caption')); + add_theme_support('html5', array('caption', 'comment-form', 'comment-list')); // Tell the TinyMCE editor to use a custom stylesheet add_editor_style('/assets/css/editor-style.css'); diff --git a/templates/comment.php b/templates/comment.php deleted file mode 100644 index 5a0ed55..0000000 --- a/templates/comment.php +++ /dev/null @@ -1,14 +0,0 @@ - -
    -

    - - - - comment_approved == '0') : ?> -
    - -
    - - - - $depth, 'max_depth' => $args['max_depth']))); ?> diff --git a/templates/comments.php b/templates/comments.php index 84eb59b..46e996b 100644 --- a/templates/comments.php +++ b/templates/comments.php @@ -4,12 +4,12 @@ } ?> -
    +
    -

    +

    ' . get_the_title() . ''); ?>

    -
      - new Roots_Walker_Comment)); ?> +
        + 'ol', 'short_ping' => true)); ?>
      1 && get_option('page_comments')) : ?> @@ -24,54 +24,13 @@
+ - -
- -
- - +
- -
- -

-

- -

logged in to post a comment.', 'roots'), wp_login_url(get_permalink())); ?>

- -
- -

- %s.', 'roots'), get_option('siteurl'), $user_identity); ?> - -

- -
- - > -
-
- - > -
-
- - -
- -
- - -
-

- - ID); ?> -
- - -
+ + From 2c91354d176d98d993bf3965f9bfba7d9f117446 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 17:09:52 -0500 Subject: [PATCH 13/14] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63e9e9e..625817e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ### HEAD +* Simplify comments, use core comment form and list +* Remove HTML5 shiv from Modernizr build * Move JavaScript to footer * Update hEntry schema to use `updated` instead of `published` * Move variables into `main.less` From 246594f2308393df619e28038a9db0fa5f272502 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Fri, 24 Oct 2014 17:21:44 -0500 Subject: [PATCH 14/14] Roots 7.0.2 --- CHANGELOG.md | 2 +- bower.json | 2 +- lang/roots.pot | 88 +++++++++++--------------------------------------- package.json | 2 +- style.css | 2 +- 5 files changed, 22 insertions(+), 74 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625817e..a3addc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### HEAD +### 7.0.2: October 24th, 2014 * Simplify comments, use core comment form and list * Remove HTML5 shiv from Modernizr build * Move JavaScript to footer diff --git a/bower.json b/bower.json index 0d8195d..89821c6 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "roots", - "version": "7.0.1", + "version": "7.0.2", "homepage": "http://roots.io", "authors": [ "Ben Word " diff --git a/lang/roots.pot b/lang/roots.pot index 746b034..4315807 100644 --- a/lang/roots.pot +++ b/lang/roots.pot @@ -1,5 +1,4 @@ msgid "" -msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -20,10 +19,12 @@ msgid "an out-of-date link" msgstr "" #: base.php:6 -msgid "You are using an outdated browser. Please upgrade your browser to improve your experience." +msgid "" +"You are using an outdated browser. Please upgrade your browser to improve your experience." msgstr "" -#: functions.php:29 +#: functions.php:28 msgid "Error locating %s for inclusion" msgstr "" @@ -48,7 +49,9 @@ msgid "%s Theme Activation" msgstr "" #: lib/activation.php:52 -msgid "These settings are optional and should usually be used only on a fresh installation" +msgid "" +"These settings are optional and should usually be used only on a fresh " +"installation" msgstr "" #: lib/activation.php:59 lib/activation.php:62 @@ -110,11 +113,11 @@ msgstr "" msgid "Continued" msgstr "" -#: lib/init.php:36 +#: lib/init.php:40 msgid "Primary" msgstr "" -#: lib/init.php:45 +#: lib/init.php:49 msgid "Footer" msgstr "" @@ -146,21 +149,10 @@ msgstr "" msgid "Not Found" msgstr "" -#: templates/comment.php:4 -msgid "%1$s" -msgstr "" - -#: templates/comment.php:5 -msgid "(Edit)" -msgstr "" - -#: templates/comment.php:9 -msgid "Your comment is awaiting moderation." -msgstr "" - #: templates/comments.php:9 -msgid "One Response to “%2$s”" -msgid_plural "%1$s Responses to “%2$s”" +msgctxt "comments title" +msgid "One response to “%2$s”" +msgid_plural "%1$s responses to “%2$s”" msgstr[0] "" msgstr[1] "" @@ -172,58 +164,10 @@ msgstr "" msgid "Newer comments →" msgstr "" -#: templates/comments.php:30 templates/comments.php:35 +#: templates/comments.php:31 msgid "Comments are closed." msgstr "" -#: templates/comments.php:42 -msgid "Leave a Reply" -msgstr "" - -#: templates/comments.php:42 -msgid "Leave a Reply to %s" -msgstr "" - -#: templates/comments.php:45 -msgid "You must be logged in to post a comment." -msgstr "" - -#: templates/comments.php:50 -msgid "Logged in as %s." -msgstr "" - -#: templates/comments.php:51 -msgid "Log out of this account" -msgstr "" - -#: templates/comments.php:51 -msgid "Log out »" -msgstr "" - -#: templates/comments.php:55 -msgid "Name" -msgstr "" - -#: templates/comments.php:55 templates/comments.php:59 -msgid " (required)" -msgstr "" - -#: templates/comments.php:59 -msgid "Email (will not be published)" -msgstr "" - -#: templates/comments.php:63 -msgid "Website" -msgstr "" - -#: templates/comments.php:68 -msgid "Comment" -msgstr "" - -#: templates/comments.php:71 -msgid "Submit Comment" -msgstr "" - #: templates/content-single.php:11 msgid "Pages:" msgstr "" @@ -239,6 +183,7 @@ msgstr "" #: templates/searchform.php:4 templates/searchform.php:6 msgid "Search" msgstr "" + #. Theme Name of the plugin/theme msgid "Roots Starter Theme" msgstr "" @@ -248,7 +193,10 @@ msgid "http://roots.io/starter-theme/" msgstr "" #. Description of the plugin/theme -msgid "Roots is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap. Contribute on GitHub" +msgid "" +"Roots is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap. " +"Contribute on " +"GitHub" msgstr "" #. Author of the plugin/theme diff --git a/package.json b/package.json index 1807b6d..cd2024f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "roots", - "version": "7.0.1", + "version": "7.0.2", "author": "Ben Word ", "homepage": "http://roots.io", "repository": { diff --git a/style.css b/style.css index 59173f5..1fecc68 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ Theme Name: Roots Starter Theme Theme URI: http://roots.io/starter-theme/ Description: Roots is a WordPress starter theme based on HTML5 Boilerplate & Bootstrap. Contribute on GitHub -Version: 7.0.1 +Version: 7.0.2 Author: Roots Author URI: http://roots.io/