Permalink
Browse files

Update to match H5BP.com 5.0, see README.txt

  • Loading branch information...
1 parent ff7f5b3 commit cfa07330fd549eb47acbcc4505ca9197693887ed @aarontgrogg committed Mar 13, 2015
File renamed without changes.
View
@@ -1,12 +1,12 @@
-=== Theme Name ===
+=== HTML5 Boilerplate ===
Contributors: aarontgrogg
Tags: html5, boilerplate
Requires at least: 3.1
Tested up to: 3.6
-Stable tag: 4.4.2
+Stable tag: 5.0.1
-Based on the [HTML5 Boilerplate](http://html5boilerplate.com/) created by
-[Paul Irish](http://paulirish.com/) and [Divya Manian](http://nimbupani.com/),
+Based on the HTML5 Boilerplate (http://html5boilerplate.com/) created by
+Paul Irish (http://paulirish.com/) and Divya Manian (http://nimbupani.com/),
this plug-in allows for easy inclusion and removal of all HTML5 Boilerplate options
that are pertinent to WP.
@@ -98,6 +98,25 @@ aarontgrogg@gmail.com
=== Change Log ===
+= 5.0.1 2015-03-13 =
+* The first update in nearly two years, on Friday the 13th... What could go wrong?? ;-)
+* Updated `css/site-specific.css` with latest `normal.css` and `main.css`
+* Removed `docs/*`; if you want this, please refer to https://github.com/h5bp/html5-boilerplate/tree/master/dist/doc
+* Updated `plugins.js`
+* Updated `jquery.js` to 1.11.2
+* Updated `modernizr.js` to 2.8.3
+* Updated `respond.js` to 1.4.2 (from separate repo: https://github.com/scottjehl/Respond)
+* Updated `html5shiv-printshiv.js` to 3.7.3 (from separate repo: https://github.com/aFarkas/html5shiv)
+* Updated default viewport setting to `width=device-width, initial-scale=1`
+* Finally realized now that I am no longer hog-tied by the WP repo, I can finally, as always, _optionally_, offer the Google Analytics block here, so, ADDED!
+* Please note that, while HTML5 Boilerplate, and truly most of the rest of the world, has moved beyond IE6, 7, and even 8,
+ I retain things like IE Conditionals, IE-only CSS, etc., since you, the developer, can check or uncheck any of these options,
+ based on your individual project needs.
+* Updated `admin-style.css` to make sure if worked well on smaller screens, too
+* Renamed _LICENSE as LICENSE.txt and README as README.txt; and I'm done playing the Rename Game with these two, H5BP peeps...
+* Removed extraneous screenshot images from root
+* Tested & verified in WP 4.1.1
+
= 4.4.2 2013-04-22 =
* Updated <h2> to <h1> in main index loop, and wrapped <h1>s in <header>
@@ -13,11 +13,11 @@
to whatever Child (<a href="http://codex.wordpress.org/Child_Themes">http://codex.wordpress.org/Child_Themes</a>) you care to add,
but you could just as easily use this as a starting point and alter the PHP as your design needs.
More about this theme can be found at <a href="http://aarontgrogg.com/boilerplate/">http://aarontgrogg.com/boilerplate/</a>.
+ Version: 5.0.1
Author: Aaron T. Grogg, based on the work of Paul Irish, Divya Manian, and Elliot Jay Stocks
Author URI: http://aarontgrogg.com/
- Version: 4.3.1
+ Version: 5.0.1
Tags: custom-menu, editor-style, theme-options, threaded-comments, sticky-post, microformats, rtl-language-support, translation-ready
-
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@@ -121,6 +121,7 @@ function H5BP_register_and_build_fields() {
add_settings_field('H5BP_jquery_js', 'jQuery JS?:', 'H5BP_jquery_js_setting', 'boilerplate-admin', 'main_section');
add_settings_field('H5BP_plugins_js', 'jQuery Plug-ins JS?:', 'H5BP_plugins_js_setting', 'boilerplate-admin', 'main_section');
add_settings_field('H5BP_site_js', 'Site-specific JS?:', 'H5BP_site_js_setting', 'boilerplate-admin', 'main_section');
+ add_settings_field('H5BP_google_analytics_js', 'Google Analytics?:', 'H5BP_google_analytics_js_setting', 'boilerplate-admin', 'main_section');
add_settings_field('H5BP_search_form', 'HTML5 Search?:', 'H5BP_search_form_setting', 'boilerplate-admin', 'main_section');
add_settings_field('H5BP_cache_buster', 'Cache-Buster?:', 'H5BP_cache_buster_setting', 'boilerplate-admin', 'main_section');
}
@@ -210,10 +211,10 @@ function H5BP_google_verification_setting() {
function H5BP_viewport_setting() {
$options = get_option('plugin_options');
$checked = (isset($options['H5BP_viewport']) && $options['H5BP_viewport']) ? 'checked="checked" ' : '';
- $setting = (isset($options['H5BP_viewport_setting']) && $options['H5BP_viewport_setting']) ? $options['H5BP_viewport_setting'] : 'width=device-width';
+ $setting = (isset($options['H5BP_viewport_setting']) && $options['H5BP_viewport_setting']) ? $options['H5BP_viewport_setting'] : 'width=device-width, initial-scale=1';
echo '<input class="check-field" type="checkbox" name="plugin_options[H5BP_viewport]" value="true" ' .$checked. '/>';
echo '<p>Force <em><abbr title="iPhone, iTouch, iPad...">iThings</abbr></em> to <a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html#//apple_ref/doc/uid/TP40006509-SW19">show site at full-zoom</a>, instead of trying to show the entire page.</p>';
- echo '<p>The HTML5 Boilerplate project suggests using just <code>width=device-width</code>, but you can use <a href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html">any option you want</a>:</p>';
+ echo '<p>The HTML5 Boilerplate project suggests using just <code>width=device-width, initial-scale=1</code>, but you can use <a href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html">any option you want</a>:</p>';
echo '<p><input type="text" size="40" name="plugin_options[H5BP_viewport_setting]" value="'.$setting.'"></p>';
echo '<p>Selecting this option will add the following code to the <code>&lt;head&gt;</code> of your pages:</p>';
echo '<code>&lt;meta name="viewport" content="'.$setting.'"&gt;</code>';
@@ -276,10 +277,10 @@ function H5BP_modernizr_js_setting() {
echo '<p><a href="http://modernizr.com/">Modernizr</a> is a JS library that appends classes to the <code>&lt;html&gt;</code> that indicate whether the user\'s browser is capable of handling advanced CSS, like "cssreflections" or "no-cssreflections". It\'s a really handy way to apply varying CSS techniques, depending on the user\'s browser\'s abilities, without resorting to CSS hacks.</p>';
echo '<p>Selecting this option will add the following code to the <code>&lt;head&gt;</code> of your pages (note the lack of a version, when you\'re ready to upgrade, simply copy/paste the new version into the file below, and your site is ready to go!):</p>';
echo '<code>&lt;script src="' .H5BP_URL. '/js/modernizr.js"&gt;&lt;/script&gt;</code>';
- echo '<p><strong>Note: If you do <em>not</em> include Modernizr, the IEShiv JS <em>will</em> be added to weaker browsers to accommodate the HTML5 elements used in Boilerplate:</strong></p>';
+ echo '<p><strong>Note: If you do <em>not</em> include Modernizr, the <a href="https://github.com/aFarkas/html5shiv#html5shiv-printshivjs">html5shiv-printshiv.js</a> <em>will</em> be added to accommodate the HTML5 elements used in Boilerplate in weaker browsers and make them ready for printing, you know, just in case:</strong></p>';
echo '<code>&lt;!--[if lt IE 9]&gt;</code>';
echo '<code> &lt;script src="//html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;</code>';
- echo '<code> &lt;script&gt;window.html5 || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/ieshiv.js"%3E%3C/script%3E\'))&lt;/script&gt;</code>';
+ echo '<code> &lt;script&gt;window.html5 || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/html5shiv.js"%3E%3C/script%3E\'))&lt;/script&gt;</code>';
echo '<code>&lt;![endif]--&gt;</code>';
}
endif; // H5BP_modernizr_js_setting
@@ -355,6 +356,27 @@ function H5BP_site_js_setting() {
}
endif; // H5BP_site_js_setting
+ // callback fn for H5BP_google_analytics_js
+ if ( ! function_exists( 'H5BP_google_analytics_js_setting' ) ):
+ function H5BP_google_analytics_js_setting() {
+ $options = get_option('plugin_options');
+ $checked = (isset($options['H5BP_google_analytics_js']) && $options['H5BP_google_analytics_js'] && isset($options['H5BP_google_analytics_account']) && $options['H5BP_google_analytics_account'] && $options['H5BP_google_analytics_account'] !== 'XXXXX-X') ? 'checked="checked" ' : '';
+ $account = (isset($options['H5BP_google_analytics_account']) && $options['H5BP_google_analytics_account']) ? str_replace('UA-','',$options['H5BP_google_analytics_account']) : 'XXXXX-X';
+ $msg = ($account === 'XXXXX-X') ? ', where </code>XXXXX-X</code> will be replaced with the code you insert above' : '';
+ echo '<input class="check-field" type="checkbox" name="plugin_options[H5BP_google_analytics_js]" value="true" ' .$checked. '/>';
+ echo '<p>To include Google Analytics, select this option and include your account number here:<br />';
+ echo 'UA-<input type="text" size="6" name="plugin_options[H5BP_google_analytics_account]" value="'.$account.'" onfocus="javascript:if(this.value===\'XXXXX-X\'){this.select();}"></p>';
+ echo '<p>Selecting this option will add the following code to your pages just before the <code>&lt;/body&gt;</code>'.$msg.':</p>';
+ echo '<code>&lt;script&gt;</code>';
+ echo '<code>var _gaq=[["_setAccount","UA-'.(($account !== 'XXXXX-X') ? $account : 'XXXXX-X').'"],["_trackPageview"]];</code>';
+ echo '<code>(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;</code>';
+ echo '<code>g.src="//www.google-analytics.com/ga.js";</code>';
+ echo '<code>s.parentNode.insertBefore(g,s)}(document,"script"));</code>';
+ echo '<code>&lt;/script&gt;</code>';
+ echo '<p><strong>Note: You must check the box <em>and</em> provide a UA code for this to be added to your pages.</strong></p>';
+ }
+ endif; // H5BP_google_analytics_js_setting
+
// callback fn for H5BP_search_form
if ( ! function_exists( 'H5BP_search_form_setting' ) ):
function H5BP_search_form_setting() {
@@ -450,22 +472,22 @@ function H5BP_add_ie_stylesheet() {
if ( ! function_exists( 'H5BP_add_modernizr_script' ) ):
function H5BP_add_modernizr_script() {
$cache = H5BP_cache_buster();
- wp_deregister_script( 'ieshiv' ); // get rid of IEShiv if it somehow got called too (IEShiv is included in Modernizr)
+ wp_deregister_script( 'html5shiv' ); // get rid of html5shiv if it somehow got called too (html5shiv is included in Modernizr)
wp_deregister_script( 'modernizr' ); // get rid of any native Modernizr
echo '<script src="' .H5BP_URL. '/js/modernizr.js'.$cache.'"></script>'.PHP_EOL;
}
endif; // H5BP_add_modernizr_script
- // $options['ieshiv_script']
- if ( ! function_exists( 'H5BP_add_ieshiv_script' ) ):
- function H5BP_add_ieshiv_script() {
+ // $options['H5BP_html5shiv_script']
+ if ( ! function_exists( 'H5BP_add_html5shiv_script' ) ):
+ function H5BP_add_html5shiv_script() {
$cache = H5BP_cache_buster();
echo '<!--[if lt IE 9]>'.PHP_EOL;
echo ' <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>'.PHP_EOL; // try getting from CDN
- echo ' <script>window.html5 || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/ieshiv.js'.$cache.'"%3E%3C/script%3E\'))</script>'.PHP_EOL; // fallback to local if CDN fails
+ echo ' <script>window.html5 || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/html5shiv.js'.$cache.'"%3E%3C/script%3E\'))</script>'.PHP_EOL; // fallback to local if CDN fails
echo '<![endif]-->'.PHP_EOL;
}
- endif; // H5BP_add_ieshiv_script
+ endif; // H5BP_add_html5shiv_script
// $options['H5BP_respond_js']
if ( ! function_exists( 'H5BP_add_respond_script' ) ):
@@ -480,7 +502,7 @@ function H5BP_add_respond_script() {
function H5BP_add_jquery_script() {
$cache = H5BP_cache_buster();
$options = get_option('plugin_options');
- $version = ($options['H5BP_jquery_version']) ? $options['H5BP_jquery_version'] : '1.10.2';
+ $version = ($options['H5BP_jquery_version']) ? $options['H5BP_jquery_version'] : '1.11.2';
wp_deregister_script( 'jquery' ); // get rid of WP's jQuery
echo '<script src="//ajax.googleapis.com/ajax/libs/jquery/'.$version.'/jquery.min.js"></script>'.PHP_EOL; // try getting from CDN
echo '<script>window.jQuery || document.write(unescape(\'%3Cscript src="' .H5BP_URL. '/js/jquery.js'.$cache.'"%3E%3C/script%3E\'))</script>'.PHP_EOL; // fallback to local if CDN fails
@@ -503,6 +525,20 @@ function H5BP_add_site_script() {
}
endif; // H5BP_add_site_script
+ // $options['H5BP_google_analytics_js']
+ if ( ! function_exists( 'H5BP_add_google_analytics_script' ) ):
+ function H5BP_add_google_analytics_script() {
+ $options = get_option('plugin_options');
+ $account = $options['H5BP_google_analytics_account'];
+ echo PHP_EOL.'<script>'.PHP_EOL;
+ echo 'var _gaq=[["_setAccount","UA-'.str_replace('UA-','',$account).'"],["_trackPageview"]];'.PHP_EOL;
+ echo '(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];'.PHP_EOL;
+ echo 'g.src="//www.google-analytics.com/ga.js";'.PHP_EOL;
+ echo 's.parentNode.insertBefore(g,s)}(document,"script"));'.PHP_EOL;
+ echo '</script>'.PHP_EOL;
+ }
+ endif; // H5BP_add_google_analytics_script
+
// $options['H5BP_search_form']
if ( ! function_exists( 'H5BP_search_form' ) ):
function H5BP_search_form( $form ) {
@@ -564,8 +600,8 @@ function H5BP_cache_buster() {
if (isset($options['H5BP_modernizr_js']) && $options['H5BP_modernizr_js']) {
add_action('wp_print_styles', 'H5BP_add_modernizr_script');
} else {
- // if Modernizr isn't selected, add IEShiv inside an IE Conditional Comment
- add_action('wp_print_styles', 'H5BP_add_ieshiv_script');
+ // if Modernizr isn't selected, add html5shiv inside an IE Conditional Comment
+ add_action('wp_print_styles', 'H5BP_add_html5shiv_script');
}
if (isset($options['H5BP_respond_js']) && $options['H5BP_respond_js']) {
@@ -592,6 +628,10 @@ function H5BP_cache_buster() {
add_action($hook, 'H5BP_add_site_script');
}
+ if (isset($options['H5BP_google_analytics_js']) && $options['H5BP_google_analytics_js'] && isset($options['H5BP_google_analytics_account']) && $options['H5BP_google_analytics_account'] && $options['H5BP_google_analytics_account'] !== 'XXXXX-X') {
+ add_action('wp_footer', 'H5BP_add_google_analytics_script');
+ }
+
if (isset($options['H5BP_search_form']) && $options['H5BP_search_form']) {
add_filter( 'get_search_form', 'H5BP_search_form');
}
@@ -1,8 +1,7 @@
/* body.settings_page_boilerplate-admin */
#boilerplate-options-wrap {
- width: 100%;
max-width: 900px;
- padding: 3em;
+ padding: 3em 0;
}
#boilerplate-options-wrap h2 {
@@ -16,7 +15,6 @@
#boilerplate-options-wrap input[type="checkbox"] {
float:left;
- margin:0 6px 0 -20px;
}
#boilerplate-options-wrap p input {
@@ -31,12 +29,13 @@
background:#ccc;
}
+#boilerplate-options-wrap table.form-table th,
#boilerplate-options-wrap table.form-table td {
- padding:8px 10px 8px 20px;
+ padding:8px 10px;
}
#boilerplate-options-wrap table.form-table p {
- margin:0 0 1px;
+ margin:0 0 .75em;
color:#444;
}
View
@@ -1,37 +0,0 @@
-[HTML5 Boilerplate homepage](http://html5boilerplate.com)
-
-# HTML5 Boilerplate documentation:
-
-## Getting started
-
-* [Usage](usage.md) — Overview of the project contents.
-* [FAQ](faq.md) — Frequently asked questions, along with their answers.
-
-## The core of HTML5 Boilerplate
-
-* [HTML](html.md) — A guide to the default HTML.
-* [CSS](css.md) — A guide to the default CSS.
-* [JavaScript](js.md) — A guide to the default JavaScript.
-* [.htaccess](https://github.com/h5bp/server-configs-apache/tree/master/doc)
- — All about the Apache web server configs (also see our [alternative server
- configs](https://github.com/h5bp/server-configs/blob/master/README.md)).
-* [crossdomain.xml](crossdomain.md) — An introduction to making use of
- crossdomain requests.
-* [Everything else](misc.md).
-
-## Development
-
-* [Extending and customizing HTML5 Boilerplate](extend.md) — Going further with
- the boilerplate.
-
-## Related projects
-
-HTML5 Boilerplate has several related projects to help improve the performance
-of your site/app in various production environments.
-
-* [Server configs](https://github.com/h5bp/server-configs) — Configs for
- different servers.
-* [Node build script](https://github.com/h5bp/node-build-script) — A
- feature-rich [grunt](https://github.com/gruntjs/grunt) plugin.
-* [Ant build script](https://github.com/h5bp/ant-build-script) — The original
- HTML5 Boilerplate build script.
Oops, something went wrong.

0 comments on commit cfa0733

Please sign in to comment.