Roots 6.5.0

This commit is contained in:
Ben Word
2013-08-22 22:17:35 -05:00
parent 59237e584c
commit d20aa0fe50
19 changed files with 160 additions and 656 deletions

View File

@@ -1,4 +1,7 @@
### HEAD
### 6.5.0: August 23rd, 2013
* Reference new site, [http://roots.io/](http://roots.io/)
* Remove bundled docs, reference [http://roots.io/docs/](http://roots.io/docs/)
* Use Bootstrap variables for media queries
* Update to Bootstrap 3.0.0
* Update to jQuery 1.10.2
* Change media directory from `/assets/` to `/media/`
@@ -15,9 +18,9 @@
### 6.4.0: May 1st, 2013
* Fix Theme Activation page issues
* Fix issues with root relative URLs and rewrites on non-standard setups
* Make sure rewrites are added to .htaccess immediately after activation
* Move HTML5 Boilerplate's .htaccess to a [plugin](https://github.com/retlehs/wp-h5bp-htaccess)
* Rename page-custom.php to template-custom.php
* Make sure rewrites are added to `.htaccess` immediately after activation
* Move HTML5 Boilerplate's `.htaccess` to a [plugin](https://github.com/roots/wp-h5bp-htaccess)
* Rename `page-custom.php` to `template-custom.php`
* Don't warn about unwritable htaccess if that option is disabled
* Add missing collapse class for top navbar
* Add comment template

View File

@@ -1,74 +1,121 @@
# Contributing to Roots Theme
## Reporting issues
Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.
**We only accept issues that are bug reports or feature requests.** Bugs must
be isolated and reproducible problems that we can fix within Roots. Please
read the following guidelines before [opening any issues](https://github.com/retlehs/roots/issues):
Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.
1. **Use the GitHub issue search.** Check to see if the issue has already been
reported. If it has been, please comment on the existing issue. An existing
issue may also already have a fix available.
2. **Isolate the problem to Roots.** Make sure that the code in the Roots
## Using the issue tracker
The issue tracker is the preferred channel for [bug reports](#bugs),
[features requests](#features) and [submitting pull
requests](#pull-requests), but please respect the following restrictions:
* Please **do not** use the issue tracker for personal support requests (use the
[Roots Discourse](http://discourse.roots.io/)).
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others.
<a name="bugs"></a>
## Bug reports
A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!
Guidelines for bug reports:
1. **Use the GitHub issue search** &mdash; check if the issue has already been
reported.
2. **Check if the issue has been fixed** &mdash; try to reproduce it using the
latest `master` or development branch in the repository.
3. **Isolate the problem to Roots** &mdash; make sure that the code in the Roots
repository is _definitely_ responsible for the issue. Switch to a core WordPress
theme (such as Twenty Twelve) to confirm problems before reporting an issue.
theme (such as Twenty Thirteen) to confirm problems before reporting an issue.
Make sure you have reproduced the bug with all plugins disabled. Any issues
related to HTML5 Boilerplate or Bootstrap should be reported to their respected
repositories and follow their contributing guidelines.
3. **Do not use GitHub issues for questions or support.** If you have a question
or support request, please post on the [Google Group](http://groups.google.com/group/roots-theme).
Please try to be as detailed as possible in your report. What steps will
reproduce the issue? What would you expect to be the outcome? All these details
will help people to assess and fix any potential bugs. A good bug report
shouldn't leave people needing to chase you up to get further information.
**[File a bug report](https://github.com/retlehs/roots/issues)**
A good bug report shouldn't leave others needing to chase you up for more
information. Please try to be as detailed as possible in your report.
<a name="features"></a>
## Feature requests
Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of Roots. It's up to *you* to make a strong
case to convince the Roots developers of the merits of this feature. Please
provide as much detail and context as possible.
<a name="pull-requests"></a>
## Pull requests
Good pull requests patches, improvements, new features are a fantastic
Good pull requests - patches, improvements, new features - are a fantastic
help. They should remain focused in scope and avoid containing unrelated
commits.
If your contribution involves a significant amount of work or substantial
changes to any part of the project, please open an issue to discuss it first.
**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code), otherwise you risk spending a lot of
time working on something that the developers might not want to merge into Roots.
Please follow this process; it's the best way to get your work included in the
project:
Please adhere to the coding conventions used throughout the project (indentation,
comments, etc.).
1. [Fork](https://help.github.com/articles/fork-a-repo) the project.
Adhering to the following this process is the best way to get your work
included in Roots:
2. Clone your fork (`git clone
https://github.com/<your-username>/roots.git`).
1. [Fork](http://help.github.com/fork-a-repo/) Roots, clone your fork,
and configure the remotes:
3. Add an `upstream` remote (`git remote add upstream
https://github.com/retlehs/roots.git`).
```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/<repo-name>
# Navigate to the newly cloned directory
cd <repo-name>
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/<upsteam-owner>/<repo-name>
```
4. Get the latest changes from upstream (`git pull upstream
master`).
2. If you cloned a while ago, get the latest changes from upstream:
5. Create a new topic branch to contain your feature, change, or fix (`git
checkout -b <topic-branch-name>`).
```bash
git checkout <dev-branch>
git pull upstream <dev-branch>
```
6. Make sure that your changes adhere to the current coding conventions used
throughout the project - indentation, accurate comments, etc. Please update
any documentation that is relevant to the change you are making.
3. Create a new topic branch (off the main project development branch) to
contain your feature, change, or fix:
7. Commit your changes in logical chunks; use git's [interactive
rebase](https://help.github.com/articles/interactive-rebase) feature to tidy
up your commits before making them public. Please adhere to these [git commit
message
guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your pull request is unlikely be merged.
```bash
git checkout -b <topic-branch-name>
```
8. Locally merge (or rebase) the upstream branch into your topic branch.
4. Commit your changes in logical chunks. Please adhere to these [git commit
message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
or your code is unlikely be merged into the main project. Use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.
9. Push your topic branch up to your fork (`git push origin
<topic-branch-name>`).
5. Locally merge (or rebase) the upstream development branch into your topic branch:
10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a
clear title and description.
```bash
git pull [--rebase] upstream <dev-branch>
```
6. Push your topic branch up to your fork:
```bash
git push origin <topic-branch-name>
```
10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.

View File

@@ -48,14 +48,6 @@ module.exports = function(grunt) {
}
}
},
imageoptim: {
files: [
'assets/img'
],
options: {
quitAfter: true
}
},
watch: {
less: {
files: [
@@ -86,14 +78,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-imageoptim');
// Register tasks
grunt.registerTask('default', [
'clean',
'recess',
'uglify',
'imageoptim',
'version'
]);
grunt.registerTask('dev', [

View File

@@ -1,75 +1,82 @@
# [Roots Theme](http://www.rootstheme.com/)
# [Roots Theme](http://roots.io/)
Roots is a starting WordPress theme made for developers thats based on
[HTML5 Boilerplate](http://html5boilerplate.com/) and [Bootstrap from Twitter](http://twitter.github.com/bootstrap/).
Roots is a WordPress starter theme based on [HTML5 Boilerplate](http://html5boilerplate.com/) & [Bootstrap](http://getbootstrap.com/) that will help you make better themes.
* Source: [https://github.com/retlehs/roots](https://github.com/retlehs/roots)
* Home Page: [http://www.rootstheme.com/](http://www.rootstheme.com/)
* Source: [https://github.com/roots/roots](https://github.com/roots/roots)
* Home Page: [http://roots.io/](http://roots.io/)
* Twitter: [@retlehs](https://twitter.com/retlehs)
* Newsletter: [Subscribe](http://www.rootstheme.com/subscribe/)
* Google Group: [http://groups.google.com/group/roots-theme](http://groups.google.com/group/roots-theme)
* Newsletter: [Subscribe](http://roots.io/subscribe/)
* Forum: [http://discourse.roots.io/](http://discourse.roots.io/)
## Installation
* Clone the git repo - `git clone git://github.com/retlehs/roots.git` - or [download it](https://github.com/retlehs/roots/zipball/master)
* Reference the [theme activation](doc/activation.md) documentation to understand
everything that happens once you activate Roots
Clone the git repo - `git clone git://github.com/roots/roots.git` - or [download it](https://github.com/roots/roots/zipball/master) and then rename the directory to the name of your theme or website. [Install Grunt](http://gruntjs.com/getting-started), and then install the dependencies for Roots contained in `package.json`:
```
npm install
```
If you're using Nginx you'll need to add the Roots rewrites to your server config before the PHP block (`location ~ \.php$`) to use the clean URLs feature:
```nginx
location ~ ^/assets/(img|js|css)/(.*)$ {
try_files $uri $uri/ /wp-content/themes/roots/assets/$1/$2;
}
location ~ ^/plugins/(.*)$ {
try_files $uri $uri/ /wp-content/plugins/$1;
}
```
Reference the [theme activation](http://roots.io/roots-101/#theme-activation) documentation to understand everything that happens once you activate Roots.
## Theme Development
After you've installed Grunt and ran `npm install` from the theme root, use `grunt watch` to watch for updates to your LESS and JS files and Grunt will automatically re-build as you write your code.
## Configuration
Edit `lib/config.php` to enable or disable support for various theme functions
and to define constants that are used throughout the theme.
Edit `lib/config.php` to enable or disable support for various theme functions and to define constants that are used throughout the theme.
Edit `lib/init.php` to setup custom navigation menus and post thumbnail sizes.
## Documentation
Take a look at the [documentation table of contents](doc/TOC.md).
### [Roots Docs](http://roots.io/docs/)
* [Roots 101](http://roots.io/roots-101/) — A guide to installing Roots, the files and theme organization
* [Theme Wrapper](http://roots.io/an-introduction-to-the-roots-theme-wrapper/) — Learn all about the theme wrapper
* [Build Script](http://roots.io/using-grunt-for-wordpress-theme-development/) — A look into the Roots build script powered by Grunt
* [Roots Sidebar](http://roots.io/the-roots-sidebar/) — Understand how to display or hide the sidebar in Roots
## Features
* HTML5 Boilerplates markup
* Bootstrap from Twitter
* [Theme wrapper](doc/wrapper.md)
* Organized file and template structure
* HTML5 Boilerplate's markup along with ARIA roles and microformat
* Bootstrap
* [Grunt build script](http://roots.io/using-grunt-for-wordpress-theme-development/)
* [Theme activation](http://roots.io/getting-started/#theme-activation)
* [Theme wrapper](http://roots.io/an-introduction-to-the-roots-theme-wrapper/)
* Root relative URLs
* Clean URLs (no more `/wp-content/`)
* All static theme assets are rewritten to the website root (`/assets/css/`,
`/assets/img/`, and `/assets/js/`)
* All static theme assets are rewritten to the website root (`/assets/*`)
* Cleaner HTML output of navigation menus
* Cleaner output of `wp_head` and enqueued scripts/styles
* Nice search (`/search/query/`)
* Image captions use `<figure>` and `<figcaption>`
* Example vCard widget
* Posts use the [hNews](http://microformats.org/wiki/hnews) microformat
* [Multilingual ready](http://www.rootstheme.com/wpml/) (Brazilian Portuguese,
Bulgarian, Catalan, Danish, Dutch, English, Finnish, French, German, Hungarian,
Indonesian, Italian, Korean, Macedonian, Norwegian, Polish, Russian, Simplified
Chinese, Spanish, Swedish, Traditional Chinese, Turkish, Vietnamese, Serbian)
### Build Script
The [grunt branch](https://github.com/retlehs/roots/tree/grunt) contains a build
script powered by grunt. More information can be found at [Integrating grunt.js with Roots](http://benword.com/integrating-grunt-js-with-roots/).
* Easily compile LESS files
* Minification and concatenation without plugins
* Fewer requests made to the server (one CSS file, one main JS file besides
Modernizr and jQuery)
* Ensures valid JavaScript
* Others working on your project are able to use the same build script and have
a unified development process
* Code is optimized for production use
* [Multilingual ready](http://roots.io/wpml/) (Brazilian Portuguese, Bulgarian, Catalan, Danish, Dutch, English, Finnish, French, German, Hungarian, Indonesian, Italian, Korean, Macedonian, Norwegian, Polish, Russian, Simplified Chinese, Spanish, Swedish, Traditional Chinese, Turkish, Vietnamese, Serbian)
## Contributing
Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project.
There are several ways you can contribute:
Everyone is welcome to help [contribute](CONTRIBUTING.md) and improve this project. There are several ways you can contribute:
* Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines))
* Suggesting new features
* Writing or editing [docs](doc/TOC.md)
* Writing or refactoring code
* Fixing [issues](https://github.com/retlehs/roots/issues)
* Replying to questions on the [Google Group](http://groups.google.com/group/roots-theme)
* Fixing [issues](https://github.com/roots/roots/issues)
* Replying to questions on the [forum](http://discourse.roots.io/)
## Support
Use the [Google Group](http://groups.google.com/group/roots-theme) to ask
questions and get support.
Use the [Roots Discourse](http://discourse.roots.io/) to ask questions and get support.

File diff suppressed because one or more lines are too long

View File

@@ -1,32 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/)
# Roots Theme documentation
Roots is a starting WordPress theme made for developers thats based on [HTML5 Boilerplate](http://html5boilerplate.com/) and [Bootstrap from Twitter](http://twitter.github.com/bootstrap/).
## Installation
* Clone the git repo - `git clone git://github.com/retlehs/roots.git` - or [download it](https://github.com/retlehs/roots/zipball/master)
* Reference the [theme activation](activation.md) documentation to understand
everything that happens once you activate Roots
## Configuration
Edit `lib/config.php` to enable or disable support for various theme functions
and to define constants that are used throughout the theme.
Edit `lib/init.php` to setup custom navigation menus and post thumbnail sizes.
## Getting started
* [Usage](usage.md) — Overview of the project contents.
* [FAQ](faq.md) — Frequently asked questions, along with their answers.
## The core of Roots
* [Theme library](lib.md) — A guide to the `lib/` directory which contains all of the theme functionality, including: [theme activation](activation.md), the [theme wrapper](wrapper.md), [clean up](cleanup.md), and [rewrites](rewrites.md).
* [Theme templates](templates.md) — A guide to the `templates/` directory which contains all of the theme templates.
## Development
* [Contributing to Roots](../CONTRIBUTING.md) — Guidelines on how to contribute effectively.
* [Extending and customizing Roots](extend.md) — Going further with Roots.

View File

@@ -1,28 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Theme activation
Theme activation is handled by `lib/activation.php`.
After you activate Roots from the WordPress admin you'll be redirected to an activation options page where you can choose to:
### Create static front page
Create a page called Home and set it to be the static front page. This is normally handled from the Reading settings.
### Change permalink structure
Change permalink structure to `/%postname%/`. This is normally handled from the Permalinks settings.
### Change uploads folder
Change uploads folder to `/media/` instead of `/wp-content/uploads/`.
### Create navigation menu
Create the Primary Navigation menu and set the location. This is normally handled from the Menus section under Appearance.
### Add pages to menu
Add all published pages to the Primary Navigation. On a fresh install, this will add the new Home page and existing Sample Page to the navigation.

View File

@@ -1,88 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Clean up
Clean up is handled by `lib/cleanup.php`. Major parts include:
### wp_head() clean up
1. Remove unnecessary `<link>`'s
2. Remove inline CSS used by Recent Comments widget
3. Remove inline CSS used by posts with galleries
4. Remove self-closing tag and change `'`'s to `"`'s on `rel_canonical()`
### Add and remove body_class() classes
1. Add `top-navbar` class to `<body>` if using Bootstrap's navbar (enabled in `lib/config.php`). Used to add styling in `app.css` to account for the WordPress admin bar.
2. Add post/page slug class to `<body>`
3. Remove `page-template-default` class
### Root relative URLs
Root relative URLs are enabled from `lib/config.php`.
Return URLs such as `/assets/css/app.css` instead of `http://example.com/assets/css/app.css`.
### Wrap embedded media as suggested by Readability
The [Readability article publishing guidelines](http://www.readability.com/developers/guidelines#publisher) suggest wrapping embedded media with a class of `entry-content-asset`.
### Use HTML5 figure and figcaption for images with captions
Any images that contain captions will be returned with `<figure>` and `<figcaption>` elements. They also get a `caption` class for additional styling from Bootstrap.
### Clean up gallery_shortcode()
The `[gallery]` shortcode has been re-created to use Bootstrap thumbnail styling.
### Remove unnecessary dashboard widgets
1. Remove Incoming Links
2. Remove Plugins
3. Remove WordPress Blog
4. Remove Other WordPress News
### Clean up the_excerpt()
The excerpt length is defined in `lib/config.php`. Excerpts are ended with anchor to the post and with "… Continued" instead of "[…]".
### Cleaner walker for wp_nav_menu()
Walker_Nav_Menu (WordPress default) example output:
<li id="menu-item-8" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-8"><a href="/">Home</a></li>
<li id="menu-item-9" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-9"><a href="/sample-page/">Sample Page</a></l
Roots_Nav_Walker example output:
<li class="menu-home"><a href="/">Home</a></li>
<li class="menu-sample-page"><a href="/sample-page/">Sample Page</a></li>
If using the Bootstrap top navbar (enabled in `lib/config.php`), the proper markup is added to the items and the depth is restricted to 2 (Bootstrap doesn't support multi-level dropdowns).
Instead of the many different active class varities that WordPress usually uses, only `active` is returned on active items.
### Remove unnecessary self-closing tags
Self-closing tags aren't necessary with HTML5. They're removed on:
1. `get_avatar()` (`<img />`)
2. `comment_id_fields()` (`<input />`)
3. `post_thumbnail_html()` (`<img />`)
### Don't return the default description in the RSS feed if it hasn't been changed
If your site tagline is still `Just another WordPress site` then the description isn't returned in the feed.
### Allow more tags in TinyMCE
Allow `<iframe>` and `<script>` to be used without issues.
### Add additional classes onto widgets
Add `widget-first`, `widget-last`, and `widget-X` (X is the position) classes to widgets.
### Clean up search URLs
Redirect `/?s=query` to `/search/query/`, convert `%20` to `+`.

View File

@@ -1,8 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Extend and customize Roots
Here is some useful advice for how you can make your project with Roots even better.
* [Recommended plugins](plugins.md)

View File

@@ -1,16 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Frequently asked questions
### Do I need to upgrade my sites each time a new version of Roots is released?
No. You don't normally replace the foundations of a house once it has been
built. There is nothing stopping you from trying to work in the latest changes
but you'll have to assess the costs/benefits of doing so.
### Where can I get help for support questions?
Please ask for help on the
[Google Group](https://groups.google.com/forum/?fromgroups#!forum/roots-theme).

View File

@@ -1,102 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Theme library
### activation.php
This file handles the theme activation. [About the theme activation](activation.md).
### cleanup.php
This file handles the various WordPress clean up. [About the clean up](cleanup.md).
### config.php
This file is used to enable various theme features, define which pages get the sidebar, set the CSS classes for `.main` and `.sidebar`, set a Google Analytics ID, and set the post excerpt length.
#### Enable theme features
`add_theme_support()` is used to enable/disable:
1. Root relative URLs
2. [Rewrites](rewrites.md)
3. HTML5 Boilerplate's `.htaccess`
4. Bootstrap's top navbar
5. Nice Search (redirect `/?s=` to `/search/`)
If you don't want to use one of the features, either comment out the line or remove it.
#### Define which pages shouldn't have the sidebar
`roots_display_sidebar()` is used to define which pages shouldn't get the sidebar. By default, the 404, front `front-page.php` and `template-custom.php` templates are full width. If you would like to remove the sidebar from additional pages, add in the appropriate conditional or page template name.
### init.php
This file runs the initial theme setup and defines helper constants for later use
### nav.php
This file contains all the custom nav modifications (for Bootstrap) and clean up.
### rewrites.php
This file handles the clean URL rewrites. [About the rewrites](rewrites.md).
### scripts.php
This file handles all of the CSS and JavaScript.
### sidebar.php
Class which provides a simple configuration interface to define what pages you want to show the sidebar on.
#### Stylesheets
Stylesheets are enqueued in the following order:
1. `/theme/assets/css/bootstrap.css`
2. `/theme/assets/css/bootstrap-responsive.css`
3. `/theme/assets/css/app.css`
4. `/child-theme/style.css` (if a child theme is activated)
`app.css` should be used for your site specific styling.
If you're using LESS, make sure you compile the files to the proper locations:
1. `css/less/bootstrap.less` -> `css/bootstrap.css`
2. `css/less/responsive.less` -> `css/bootstrap-responsive.css`
#### JavaScript
JavaScript is loaded in the following order:
1. `jquery-1.9.1.min.js` via Google CDN with local fallback
2. `/theme/assets/js/vendor/modernizr-2.6.2.min.js`
3. `/theme/assets/js/plugins.js` (in footer)
4. `/theme/assets/js/main.js` (in footer)
jQuery is loaded using the same method from HTML5 Boilerplate: grab Google CDN's jQuery, with a protocol relative URL; fallback to local if offline. It's kept in the header instead of footer to avoid conflicts with plugins.
`plugins.js` contains a minified version of all the latest Bootstrap plugins.
Learn about `plugins.js` and `main.js` in the HTML5 Boilerplate [JavaScript docs](https://github.com/h5bp/html5-boilerplate/blob/master/doc/js.md).
##### jQuery in the footer
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`.
### utils.php
This file contains utility functions used by other files in the theme.
The theme wrapper is used to serve all of the template files. [About the theme wrapper](wrapper.md).
### widgets.php
This file registers the custom sidebars and custom widgets. There are two initial sidebars:
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.

View File

@@ -1,28 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Recommended Plugins
| **Plugin Name** | **Plugin Description**
|:----------------|:----------------------
| [**Soil**](https://github.com/retlehs/soil) | Frequently used plugins for your WordPress installation and a site specific plugin for your custom post types, taxonomies, meta boxes, and shortcodes.
| [**Gravity Forms**](http://www.rootstheme.com/gravity-forms/) | With Gravity Forms you can build complex, interactive contact forms in minutes.
| [**WPML**](http://www.rootstheme.com/wpml/) | WPML makes it easy to build multilingual sites and run them. Roots already includes translations for:<br> English, Spanish, French, Italian, Dutch, Brazilian Portuguese, Macedonian, Finnish, Danish, Turkish, Swedish, Bulgarian, Norwegian, Catalan, Polish, Hungarian, Russian.
| [**WordPress SEO**](http://yoast.com/wordpress/seo/) | Yoast's all in one SEO solution: titles, meta descriptions, XML sitemaps, breadcrumbs & more.
| [**W3 Total Cache**](http://wordpress.org/extend/plugins/w3-total-cache/) | Improve site performance and user experience via caching.
| [Analytics 360](http://wordpress.org/extend/plugins/analytics360/) | Pull Google Analytics and MailChimp data directly into your dashboard.
| [Custom Metaboxes & Fields](https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress) | Easily create metaboxes with custom fields.
| [Front-end Editor](http://scribu.net/wordpress/front-end-editor) | A WordPress plugin that enables "edit in place" functionality on your site.
| [Options Framework](https://github.com/devinsays/options-framework-plugin) | An Options Panel Framework to help speed theme development.
| [Page Links To](http://wordpress.org/extend/plugins/page-links-to/) | Make a WordPress post link to an external URL of your choosing instead of its WordPress URL.
| [Post Types Order](http://wordpress.org/extend/plugins/post-types-order/) | Order posts, pages, and custom post types using a drag and drop interface.
| [Posts 2 Posts](http://scribu.net/wordpress/posts-to-posts) | Create many-to-many connections between posts of all kinds.
| [Query Multiple Taxonomies](http://scribu.net/wordpress/query-multiple-taxonomies) | Filter posts through multiple custom taxonomies.
| [Simple Footnotes](http://wordpress.org/extend/plugins/simple-footnotes/) | Create simple, elegant footnotes on your site. Use the [ref] shortcode and the plugin takes care of the rest.
| [WordPress Domain Changer](https://github.com/veloper/WordPress-Domain-Changer) | A self-contained script that helps ease the migration of WordPress sites from one domain to another.
| [WPAlchemy MetaBox Class](http://www.farinspace.com/wpalchemy-metabox/) | Create custom WordPress meta boxes quickly.
| [WP-DB-Backup](http://wordpress.org/extend/plugins/wp-db-backup/) | WP-DB-Backup allows you easily to backup your WordPress database tables.
| [WP-PageNavi](http://wordpress.org/extend/plugins/wp-pagenavi/) | Adds a more advanced paging navigation interface.
| [WP Database Optimizer](http://www.matthewaprice.com/wp-database-optimizer/) | Automated scheduled database optimization.
| [WP Mail SMTP](http://wordpress.org/extend/plugins/wp-mail-smtp/) | Reconfigures the wp_mail() function to use SMTP instead of mail().
| [Taxonomy Images](http://wordpress.org/extend/plugins/taxonomy-images/) | Associate images from your media library to categories, tags and custom taxonomies.

View File

@@ -1,35 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Rewrites
Rewrites are handled by `lib/rewrites.php`. Rewrites currently do not happen for child themes or network installs.
Rewrite:
1. `/wp-content/themes/themename/assets/css/` to `/assets/css/`
2. `/wp-content/themes/themename/assets/js/` to `/assets/js/`
3. `/wp-content/themes/themename/assets/img/` to `/assets/img/`
4. `/wp-content/plugins/` -> `/plugins/`
## Alternative server configurations
### Nginx
Include these in your Nginx config, before the PHP fastcgi block (`location ~ \.php$`).
location ~ ^/assets/(img|js|css)/(.*)$ {
try_files $uri $uri/ /wp-content/themes/roots/assets/$1/$2;
}
location ~ ^/plugins/(.*)$ {
try_files $uri $uri/ /wp-content/plugins/$1;
}
### Lighttpd
url.rewrite-once = (
"^/css/(.*)$" => "/wp-content/themes/roots/css/$1",
"^/js/(.*)$" => "/wp-content/themes/roots/js/$1",
"^/img/(.*)$" => "/wp-content/themes/roots/img/$1",
"^/plugins/(.*)$" => "/wp-content/plugins/$1"
)

View File

@@ -1,52 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Theme templates
### comments.php
The comments template wraps each comment in an `<article>` and the vCard microformat is used for comment author information.
### content.php
The `content.php` template is included by archive templates in the theme root.
### content-page.php
The `content-page.php` template is included by page templates in the theme root.
### content-single.php
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.
### head.php
`head.php` includes everything in the `<head>`.
### header.php
`header.php` is used if the Bootstrap navbar isn't enabled in `lib/config.php`. The `wp_nav_menu()` outputs with a `nav-pills` class for some basic styling from Bootstrap.
### header-top-navbar.php
`header-top-navbar.php` is used if the Bootstrap navbar is enabled in `lib/config.php`.
### page-header.php
`page-header.php` is included at the top of files in the theme root to display the `<h1>` on pages before the page content.
### searchform.php
`searchform.php` is the template used when `get_search_form()` is called.
### sidebar.php
`sidebar.php` includes the Primary Sidebar.

View File

@@ -1,139 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Usage
The HTML, CSS and JavaScript in Roots comes from a combination of HTML5 Boilerplate and Twitter Bootstrap.
* [HTML5 Boilerplate documentation](https://github.com/h5bp/html5-boilerplate/blob/master/README.md)
* [Twitter Bootstrap documentation](http://twitter.github.com/bootstrap/getting-started.html)
## Basic structure
A basic Roots theme initially looks like this:
```
.
├── assets
│ ├── css
│ │ │── app.css
│ │ │── bootstrap.css
│ │ │── bootstrap-responsive.css
│ │ │── editor-style.css
│ ├── img
│ ├── js
│ │ ├── main.js
│ │ ├── plugins.js (includes bootstrap.js)
│ │ └── vendor
│ │ ├── jquery-1.10.2.min.js
│ │ └── modernizr-2.6.2.min.js
│ └── less
│ │ │── bootstrap.less
│ │ └── responsive.less
├── doc
├── lang
│ └── roots.pot
├── lib
│ ├── activation.php
│ ├── cleanup.php
│ ├── config.php
│ ├── custom.php
│ ├── init.php
│ ├── nav.php
│ ├── rewrites.php
│ ├── scripts.php
│ ├── sidebar.php
│ ├── utils.php
│ └── widgets.php
├── templates
│ ├── comments.php
│ ├── content.php
│ ├── content-page.php
│ ├── content-single.php
│ ├── entry-meta.php
│ ├── footer.php
│ ├── head.php
│ ├── header.php
│ ├── header-top-navbar.php
│ ├── page-header.php
│ ├── searchform.php
│ └── sidebar.php
├── 404.php
├── base.php
├── functions.php
├── index.php
├── page.php
├── screenshot.png
├── single.php
├── style.css
└── template-custom.php
```
What follows is a general overview of each major part and how to use them.
### assets/css/
This directory should contain all your project's CSS files. If you're using LESS, you should have `less/bootstrap.less` compile to `css/bootstrap.css`, and `less/responsive.less` compile to `css/bootstrap-responsive.css`. Any additional LESS files that aren't from Bootstrap should compile to `css/app.css`.
### assets/img/
This directory should contain all your project's image files.
### assets/js/
This directory should contain all your project's JS files. Libraries, plugins,
and custom code can all be included here. It includes some initial JS to help
get you started.
The files and directory structure are adopted from [HTML5 Boilerplate's JavaScript](https://github.com/h5bp/html5-boilerplate/blob/master/doc/js.md).
### doc/
This directory contains all the Roots documentation. You can use it
as the location and basis for your own project's documentation.
### lang/
This directory contains all of the theme translations. [About translating the theme](http://www.icanlocalize.com/site/tutorials/how-to-translate-with-gettext-po-and-pot-files/).
### lib/
This directory contains all of the theme functionality. [About the theme library](lib.md).
### templates/
This directory contains all of the theme templates. [About the templates](templates.md).
### 404.php
A helpful custom 404 to get you started.
### base.php
This is the default HTML skeleton that forms the basis of all pages on
your site. [About the theme wrapper](wrapper.md).
### functions.php
This file loads all of the [theme library](lib.md) files, sets up the default navigation menus, and adds support for post thumbnails.
### index.php
This file is used to serve all of the archive templates.
### page.php
This file is used to serve the page template.
### single.php
This file is used to serve the single post template.
### style.css
This file is used to tell WordPress that we're a theme. None of the actual CSS is contained in this file.
### template-custom.php
An example of a custom page template. By default, this page is full width and doesn't contain a sidebar as defined in `lib/config.php`'s `roots_sidebar()` function.

View File

@@ -1,14 +0,0 @@
[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation
table of contents](TOC.md)
# Theme wrapper
The theme wrapper functionality is found in `lib/wrapper.php`. This code comes directly from [scribu's theme wrapper](http://scribu.net/wordpress/theme-wrappers.html) post.
`base.php` in the roots theme top level directory is used to serve all of the templates for your site. In the theme root, the following files are only used to include files in the `templates/` directory, which contains all of the [theme templates](templates.md):
1. `index.php` (archive page templates) includes `templates/content.php`
2. `page.php` includes `templates/content-page.php`
3. `single.php` includes `templates/content-single.php`
The [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy) is traversed as normal before the wrapper is loaded.

View File

@@ -11,7 +11,7 @@
* 3. /theme/assets/js/main.min.js (in footer)
*/
function roots_scripts() {
wp_enqueue_style('roots_main', get_template_directory_uri() . '/assets/css/main.min.css', false, '21d5bb922df17c9861ba2d713a807b4e');
wp_enqueue_style('roots_main', get_template_directory_uri() . '/assets/css/main.min.css', false, 'c9f2155733c68254f446eb06faa23581');
// jQuery is loaded using the same method from HTML5 Boilerplate:
// Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
@@ -27,7 +27,7 @@ function roots_scripts() {
}
wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.6.2.min.js', false, null, false);
wp_register_script('roots_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, '4ea84cbe0a24ca4fc02cc9503f22126f', true);
wp_register_script('roots_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, '2a3e700c4c6e3d70a95b00241a845695', true);
wp_enqueue_script('modernizr');
wp_enqueue_script('jquery');
wp_enqueue_script('roots_scripts');

View File

@@ -1,14 +1,14 @@
{
"name": "roots",
"version": "6.4.0",
"version": "6.5.0",
"author": "Ben Word <ben@benword.com>",
"homepage": "http://www.rootstheme.com",
"homepage": "http://roots.io",
"repository": {
"type": "git",
"url": "git://github.com/retlehs/roots.git"
"url": "git://github.com/roots/roots.git"
},
"bugs": {
"url" : "https://github.com/retlehs/roots/issues"
"url" : "https://github.com/roots/roots/issues"
},
"licenses": [{
"type": "MIT",
@@ -23,7 +23,6 @@
"grunt-contrib-jshint": "~0.6.3",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-watch": "~0.5.2",
"grunt-recess": "~0.3.5",
"grunt-imageoptim": "~1.2.11"
"grunt-recess": "~0.3.5"
}
}

View File

@@ -1,8 +1,8 @@
/*
Theme Name: Roots
Theme URI: http://www.rootstheme.com/
Theme URI: http://roots.io/
Description: Roots is a starting WordPress theme made for developers that's based on HTML5 Boilerplate and Bootstrap. <a href="https://github.com/retlehs/roots/contributors">Contribute on GitHub</a>
Version: 6.4.0
Version: 6.5.0
Author: Ben Word
Author URI: http://benword.com/