diff --git a/404.php b/404.php index e100cceb84..8f95604794 100644 --- a/404.php +++ b/404.php @@ -1,22 +1,22 @@ - -
- -
-
-

-
-

-
-

-
    -
  • -
  • home page', 'roots'), home_url()); ?>
  • -
  • Back button', 'roots'); ?>
  • -
-
-
- -
- - \ No newline at end of file + +
+ +
+
+

+
+

+
+

+
    +
  • +
  • home page', 'roots'), home_url()); ?>
  • +
  • Back button', 'roots'); ?>
  • +
+
+
+ +
+ + diff --git a/README.md b/README.md index 399c4c6eb8..5270a6af55 100644 --- a/README.md +++ b/README.md @@ -4,172 +4,172 @@ ### 3.6.0: August 12th, 2011 ### 3.5.0: July 30th, 2011 ### 3.2.4: May 19th, 2011 ### 3.2.3: May 10th, 2011 ### 3.2.2: April 24th, 2011 ### 3.2.1: April 20th, 2011 ### 3.2.0: April 15th, 2011 ### 3.1.1: April 7th, 2011 ### 3.1.0: April 1st, 2011 ### 3.0.0: March 28th, 2011 ### 2.4.0: January 25th, 2011 ### 2.3.0: December 8th, 2010 ### 2.2.0: September 20th, 2010 ### 2.1.0: August 19th, 2010 ### 2.0.1: August 2nd, 2010 ### 2.0.0: July 19th, 2010 ### 1.5.0: April 15th, 2010 ### 1.0.0: December 18th, 2009 ## Contributors: @@ -189,8 +189,8 @@ Major components: Everything else: -* [The Unlicense](http://unlicense.org) (aka: public domain) +* [The Unlicense](http://unlicense.org) (aka: public domain) ## Summary: -Roots is a starting WordPress theme made for developers that's based on HTML5 Boilerplate, Blueprint CSS/960 Grid System/1140 Grid and Starkers that will help you rapidly create brochure sites and blogs. \ No newline at end of file +Roots is a starting WordPress theme made for developers that's based on HTML5 Boilerplate, Blueprint CSS/960 Grid System/1140 Grid and Starkers that will help you rapidly create brochure sites and blogs. diff --git a/archive.php b/archive.php index 05fbb4092a..ef54b4f4c1 100644 --- a/archive.php +++ b/archive.php @@ -1,35 +1,35 @@ - -
- -
-
-

- - - - - - - - - -

- - - -
-
- - - - -
- - \ No newline at end of file + +
+ +
+
+

+ + + + + + + + + +

+ + + +
+
+ + + + +
+ + diff --git a/comments.php b/comments.php index 3ef0d7e8b6..e079193b90 100644 --- a/comments.php +++ b/comments.php @@ -1,102 +1,102 @@ -
  • > -
    -
    - - %s', 'roots'), get_comment_author_link()) ?> - - -
    + $GLOBALS['comment'] = $comment; ?> +
  • > +
    +
    + + %s', 'roots'), get_comment_author_link()) ?> + + +
    - comment_approved == '0') : ?> -
    -

    -
    - - - -
    - -
    + comment_approved == '0') : ?> +
    +

    +
    - $depth, 'max_depth' => $args['max_depth']))) ?> - -
    + + +
    + +
    + + $depth, 'max_depth' => $args['max_depth']))) ?> + +
  • -
    -
    -

    -
    -
    - +
    +
    +

    +
    +
    + -
    -

    -
      - - -
    -
    - -
    -
    +
    +

    +
      + + +
    +
    + +
    +
    - - -
    -
    -

    -
    -
    - + + +
    +
    +

    +
    +
    +
    -

    -

    - -

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

    - -
    - -

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

    - -

    - - > -

    -

    - - > -

    -

    - - -

    - -

    - - -

    -

    - - ID); ?> -
    - +

    +

    + +

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

    + +
    + +

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

    + +

    + + > +

    +

    + + > +

    +

    + + +

    + +

    + + +

    +

    + + ID); ?> +
    +
    - \ No newline at end of file + diff --git a/css/style.css b/css/style.css index 993578c41a..b6780a5c00 100644 --- a/css/style.css +++ b/css/style.css @@ -33,31 +33,31 @@ a:hover, a:active { color: #09f; outline: 0; } a:active, input.button:active { outline: 0; position: relative; top: 1px; } .button, #post-nav a, #comments-nav a { - display: inline-block; - background: #06c; - background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - color: #fff; - border: none; - padding: 8px 16px; - cursor: pointer; - text-decoration: none; - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.15); - width: auto; - overflow: visible; - -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; - -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; - box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; - -webkit-appearance: none; + display: inline-block; + background: #06c; + background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + color: #fff; + border: none; + padding: 8px 16px; + cursor: pointer; + text-decoration: none; + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.15); + width: auto; + overflow: visible; + -moz-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; + -webkit-box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2), 1px 1px 3px rgba(0, 0, 0, 0.2) inset; + -webkit-appearance: none; } -.button:hover, #post-nav a:hover, #comments-nav a:hover { - background: #09f; - color: #fff; +.button:hover, #post-nav a:hover, #comments-nav a:hover { + background: #09f; + color: #fff; } @@ -168,68 +168,68 @@ td { vertical-align: top; } #logo { float: left; width: 300px; height: 75px; margin: 0 0 16px; padding: 0; } -#nav-main ul { - background: #06c; - background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - background-image: linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); - position: relative; - list-style: none; - margin: 0 0 16px 0; - padding: 0; - float: left; - width: 100%; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; +#nav-main ul { + background: #06c; + background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + background-image: linear-gradient(top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); + position: relative; + list-style: none; + margin: 0 0 16px 0; + padding: 0; + float: left; + width: 100%; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; } -#nav-main ul li { float: left; margin: 0; *zoom: 1; } +#nav-main ul li { float: left; margin: 0; *zoom: 1; } #nav-main ul li:hover { position: relative; } -#nav-main ul li a { - text-decoration: none; - display: block; - font-size: 14px; - padding: 8px 16px; - color: #fff; - margin: 0; - text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.15); +#nav-main ul li a { + text-decoration: none; + display: block; + font-size: 14px; + padding: 8px 16px; + color: #fff; + margin: 0; + text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.15); } -#nav-main ul li a:hover, -#nav-main ul li.current-menu-item > a, -#nav-main ul li.current-menu-parent > a, -#nav-main ul li.current-menu-ancestor > a, -#nav-main ul li:hover > a { - color: #73c8ff; +#nav-main ul li a:hover, +#nav-main ul li.current-menu-item > a, +#nav-main ul li.current-menu-parent > a, +#nav-main ul li.current-menu-ancestor > a, +#nav-main ul li:hover > a { + color: #73c8ff; } -#nav-main ul ul { - position: absolute; - visibility: hidden; - top: 100%; - left: 0; - width: 200px; - background: #73c8ff; - padding: 0; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; +#nav-main ul ul { + position: absolute; + visibility: hidden; + top: 100%; + left: 0; + width: 200px; + background: #73c8ff; + padding: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; } #nav-main ul ul li { float: none; } -#nav-main ul ul li a { - font-size: 12px; - text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1); - padding: 4px 16px; - width: 168px; /* account for the width of ul#nav-main ul and the padding on the anchor */ - display: inline-block; +#nav-main ul ul li a { + font-size: 12px; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1); + padding: 4px 16px; + width: 168px; /* account for the width of ul#nav-main ul and the padding on the anchor */ + display: inline-block; } -#nav-main ul ul li a:hover, -#nav-main ul ul li.current-menu-item > a, -#nav-main ul ul li.current-menu-parent > a, -#nav-main ul ul li.current-menu-ancestor > a, +#nav-main ul ul li a:hover, +#nav-main ul ul li.current-menu-item > a, +#nav-main ul ul li.current-menu-parent > a, +#nav-main ul ul li.current-menu-ancestor > a, #nav-main ul ul li:hover > a { - color: #06c; + color: #06c; } #nav-main ul ul ul { left: 100%; top: 0; } @@ -252,14 +252,14 @@ td { vertical-align: top; } /* ============================================================================= Main content area ========================================================================== */ - + #main { position: relative; } -#main .container { padding: 0; } +#main .container { padding: 0; } /* ============================================================================= Sidebar ========================================================================== */ - + #sidebar { position: relative; } #sidebar .container { width: auto; padding: 0; } #sidebar .widget { clear: both; margin-bottom: 1.5em; } @@ -269,7 +269,7 @@ td { vertical-align: top; } /* ============================================================================= Posts ========================================================================== */ - + .hentry header { margin-bottom: 1.5em; } .hentry h1 { line-height: 1.2em; margin-bottom: 0.2em; } .hentry h2:first-child { line-height: 1.2em; margin-bottom: 0; } @@ -298,7 +298,7 @@ td { vertical-align: top; } /* ============================================================================= Post comments ========================================================================== */ - + ol.commentlist img.avatar { float: left; margin-right: 10px; } ol.commentlist time { display: block; font-size: 1em; margin-bottom: 0.5em; position: relative; } ol.commentlist .comment-reply-link { display: block; margin-bottom: 1.5em; } @@ -313,16 +313,16 @@ ol.commentlist .comment-reply-link { display: block; margin-bottom: 1.5em; } /* ============================================================================= Gallery ========================================================================== */ - + figure.gallery-item { float: left; margin: 0 1em 1em 0; position: relative; } -figure.gallery-item a img { - border: 4px solid #bbb; - -moz-border-radius: 6px; - -webkit-border-radius: 6px; - border-radius: 6px; - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); +figure.gallery-item a img { + border: 4px solid #bbb; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } figure.gallery-item a:hover img { border-color: #ccc; } figure.gallery-item figcaption { display: none; } @@ -347,17 +347,17 @@ figure.gallery-item figcaption { display: none; } .gform_wrapper { margin: 0; max-width: none; } .gform_wrapper .gform_heading { width: 100%; margin-bottom: 1.5em; } -.gform_wrapper .gsection .gfield_label, .gform_wrapper h2.gsection_title, .gform_wrapper h3.gform_title { font-size: 1.5em; font-weight: 400; } +.gform_wrapper .gsection .gfield_label, .gform_wrapper h2.gsection_title, .gform_wrapper h3.gform_title { font-size: 1.5em; font-weight: 400; } .gform_wrapper h3.gform_title { margin-top: 0; } .gform_wrapper .top_label .gfield_label { margin: 6px 0 0 0; } .gform_wrapper .top_label input.medium { padding-right: 0; } .gform_wrapper .left_label .gfield_label, .gform_wrapper .right_label .gfield_label { margin: 10px 10px 0 0; } -.gform_wrapper .left_label ul.gfield_checkbox, -.gform_wrapper .left_label ul.gfield_radio, -.gform_wrapper .right_label ul.gfield_checkbox, +.gform_wrapper .left_label ul.gfield_checkbox, +.gform_wrapper .left_label ul.gfield_radio, +.gform_wrapper .right_label ul.gfield_checkbox, .gform_wrapper .right_label ul.gfield_radio { - margin: 9px 0 0 31%; + margin: 9px 0 0 31%; } .gform_wrapper input[type=text], .gform_wrapper input[type=url], @@ -368,18 +368,18 @@ figure.gallery-item figcaption { display: none; } .gform_wrapper input[type=password], .gform_wrapper textarea, .gform_wrapper select { - font-size: 1em; - line-height: 14px; - padding: 4px; - margin: 6px 0; - border: 1px solid #bbb; - -moz-background-clip: padding; - -webkit-background-clip: padding; - background-clip: padding-box; - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - vertical-align: middle; + font-size: 1em; + line-height: 14px; + padding: 4px; + margin: 6px 0; + border: 1px solid #bbb; + -moz-background-clip: padding; + -webkit-background-clip: padding; + background-clip: padding-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + vertical-align: middle; } .gform_wrapper input[type=text]:focus, .gform_wrapper input[type=url]:focus, @@ -389,50 +389,50 @@ figure.gallery-item figcaption { display: none; } .gform_wrapper input[type=password]:focus, .gform_wrapper textarea:focus, .gform_wrapper select:focus { - border: 1px solid #666; + border: 1px solid #666; } .gform_wrapper select { padding: 3px; } .gform_wrapper .small, .gform_wrapper .large { font-size: 1em; line-height: 14px; } -.gform_wrapper ul.right_label li, -.gform_wrapper ul.left_label li, -.gform_wrapper form ul.right_label li, +.gform_wrapper ul.right_label li, +.gform_wrapper ul.left_label li, +.gform_wrapper form ul.right_label li, .gform_wrapper form ul.left_label li { - margin-bottom: 4px; + margin-bottom: 4px; } -.gform_wrapper .description, -.gform_wrapper .gfield_description, -.gform_wrapper .gsection_description, +.gform_wrapper .description, +.gform_wrapper .gfield_description, +.gform_wrapper .gsection_description, .gform_wrapper .instruction { - font-size: 0.9em; - font-style: normal; - padding: 0; + font-size: 0.9em; + font-style: normal; + padding: 0; } -.gform_wrapper .right_label .gfield_description, +.gform_wrapper .right_label .gfield_description, .gform_wrapper .right_label .instruction, -.gform_wrapper .left_label .gfield_description, +.gform_wrapper .left_label .gfield_description, .gform_wrapper .left_label .instruction { - padding: 0; - margin-left: 31%; + padding: 0; + margin-left: 31%; } -.gform_wrapper .ginput_complex label, -.gform_wrapper .gfield_time_hour label, -.gform_wrapper .gfield_time_minute label, -.gform_wrapper .gfield_date_month label, -.gform_wrapper .gfield_date_day label, -.gform_wrapper .gfield_date_year label, +.gform_wrapper .ginput_complex label, +.gform_wrapper .gfield_time_hour label, +.gform_wrapper .gfield_time_minute label, +.gform_wrapper .gfield_date_month label, +.gform_wrapper .gfield_date_day label, +.gform_wrapper .gfield_date_year label, .gform_wrapper .instruction { - font-size: 0.9em; - font-weight: 400; - letter-spacing: 0; - margin: 0 0 6px 0; + font-size: 0.9em; + font-weight: 400; + letter-spacing: 0; + margin: 0 0 6px 0; } -.gform_wrapper .gfield_checkbox li input[type=checkbox], -.gform_wrapper .gfield_radio li input[type=radio], +.gform_wrapper .gfield_checkbox li input[type=checkbox], +.gform_wrapper .gfield_radio li input[type=radio], .gform_wrapper .gfield_checkbox li input { float: none; display: inline-block; margin-top: 0; vertical-align: middle; } .gform_wrapper .gfield_checkbox li label, .gform_wrapper .gfield_radio li label { display: inline-block; margin: 0 0 0 8px; vertical-align: middle; } -.gform_wrapper .left_label .ginput_complex .ginput_right label, -.gform_wrapper .left_label .ginput_complex .ginput_left label, -.gform_wrapper .right_label .ginput_complex .ginput_right label, +.gform_wrapper .left_label .ginput_complex .ginput_right label, +.gform_wrapper .left_label .ginput_complex .ginput_left label, +.gform_wrapper .right_label .ginput_complex .ginput_right label, .gform_wrapper .right_label .ginput_complex .ginput_left label { word-spacing: 0; } .gform_wrapper .gfield_checkbox li label, .gform_wrapper .gfield_radio li label { font-weight: 400; } img.ui-datepicker-trigger { vertical-align: middle; } @@ -449,19 +449,19 @@ img.ui-datepicker-trigger { vertical-align: middle; } .gform_wrapper .validation_error { font-size: 1em; font-weight: 400; padding: 0.8em; margin-bottom: 1.5em; background: #fbe3e4; color: #8a1f11; border: 2px solid #fbc2c4; } .gform_wrapper .validation_message { display: none; } .gform_wrapper li.gfield.gfield_error { - background: none; - margin-bottom: 6px !important; - padding: 0 !important; - border: none; + background: none; + margin-bottom: 6px !important; + padding: 0 !important; + border: none; } .gform_wrapper .top_label .gfield_error .ginput_container { max-width: none; } .gform_wrapper .top_label .gfield_error { margin-bottom: 0 !important; } .gform_wrapper .gfield_error .gfield_label { color: #8a1f11; } -.gform_wrapper .gfield_error input, -.gform_wrapper .gfield_error select, +.gform_wrapper .gfield_error input, +.gform_wrapper .gfield_error select, .gform_wrapper .gfield_error textarea { background: #FBE3E4; border-color: #FBC2C4; } -.gform_wrapper .top_label .gfield_error input, -.gform_wrapper .top_label .gfield_error textarea, +.gform_wrapper .top_label .gfield_error input, +.gform_wrapper .top_label .gfield_error textarea, .gform_wrapper .top_label .gfield_error select { border-color: #FBC2C4; } .gform_wrapper .top_label .gfield_error { width: auto; } @@ -469,7 +469,7 @@ img.ui-datepicker-trigger { vertical-align: middle; } /* ============================================================================= Search form ========================================================================== */ - + #searchform #s { padding: 5px; } @@ -493,12 +493,12 @@ img.ui-datepicker-trigger { vertical-align: middle; } ========================================================================== */ @media only screen and (min-width: 480px) { - /* Style adjustments for viewports 480px and over go here */ + /* Style adjustments for viewports 480px and over go here */ } @media only screen and (min-width: 768px) { - /* Style adjustments for viewports 768px and over go here */ + /* Style adjustments for viewports 768px and over go here */ } @@ -530,18 +530,18 @@ img.ui-datepicker-trigger { vertical-align: middle; } /* ============================================================================= Print styles ========================================================================== */ - + @media print { - * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } - a, a:visited { text-decoration: underline; } - a[href]:after { content: " (" attr(href) ")"; } - abbr[title]:after { content: " (" attr(title) ")"; } - .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } - pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } - thead { display: table-header-group; } - tr, img { page-break-inside: avoid; } - img { max-width: 100% !important; } - @page { margin: 0.5cm; } - p, h2, h3 { orphans: 3; widows: 3; } - h2, h3 { page-break-after: avoid; } -} \ No newline at end of file + * { background: transparent !important; color: black !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } + a, a:visited { text-decoration: underline; } + a[href]:after { content: " (" attr(href) ")"; } + abbr[title]:after { content: " (" attr(title) ")"; } + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; } + pre, blockquote { border: 1px solid #999; page-break-inside: avoid; } + thead { display: table-header-group; } + tr, img { page-break-inside: avoid; } + img { max-width: 100% !important; } + @page { margin: 0.5cm; } + p, h2, h3 { orphans: 3; widows: 3; } + h2, h3 { page-break-after: avoid; } +} diff --git a/footer.php b/footer.php index 842713ae28..038deeb5aa 100644 --- a/footer.php +++ b/footer.php @@ -1,21 +1,21 @@ - - - - + + + + - + - \ No newline at end of file + diff --git a/front-page.php b/front-page.php index 6d6aa72aca..9e4771484b 100644 --- a/front-page.php +++ b/front-page.php @@ -1,24 +1,24 @@ - -
    - -
    -
    - - - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    + + + +
    +
    + + + + +
    + + diff --git a/functions.php b/functions.php index fd4298d239..68b65fe471 100644 --- a/functions.php +++ b/functions.php @@ -1,66 +1,66 @@ - - __('Primary Navigation', 'roots'), - 'utility_navigation' => __('Utility Navigation', 'roots') - )); + // tell the TinyMCE editor to use editor-style.css + // if you have issues with getting the editor to show your changes then use the following line: + // add_editor_style('editor-style.css?' . time()); + add_editor_style('editor-style.css'); + + // http://codex.wordpress.org/Post_Thumbnails + add_theme_support('post-thumbnails'); + // set_post_thumbnail_size(150, 150, false); + + // http://codex.wordpress.org/Post_Formats + // add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat')); + + // http://codex.wordpress.org/Function_Reference/add_custom_image_header + if (!defined('HEADER_TEXTCOLOR')) { define('HEADER_TEXTCOLOR', ''); } + if (!defined('NO_HEADER_TEXT')) { define('NO_HEADER_TEXT', true); } + if (!defined('HEADER_IMAGE')) { define('HEADER_IMAGE', get_template_directory_uri() . '/img/logo.png'); } + if (!defined('HEADER_IMAGE_WIDTH')) { define('HEADER_IMAGE_WIDTH', 300); } + if (!defined('HEADER_IMAGE_HEIGHT')) { define('HEADER_IMAGE_HEIGHT', 75); } + + function roots_custom_image_header_site() { } + function roots_custom_image_header_admin() { ?> + + __('Primary Navigation', 'roots'), + 'utility_navigation' => __('Utility Navigation', 'roots') + )); } add_action('after_setup_theme', 'roots_setup'); @@ -68,18 +68,18 @@ function roots_custom_image_header_admin() { ?> // create widget areas: sidebar, footer $sidebars = array('Sidebar', 'Footer'); foreach ($sidebars as $sidebar) { - register_sidebar(array('name'=> $sidebar, - 'before_widget' => '
    ', - 'after_widget' => '
    ', - 'before_title' => '

    ', - 'after_title' => '

    ' - )); + register_sidebar(array('name'=> $sidebar, + 'before_widget' => '
    ', + 'after_widget' => '
    ', + 'before_title' => '

    ', + 'after_title' => '

    ' + )); } // return post entry meta information function roots_entry_meta() { - echo ''; - echo '

    '. __('Written by', 'roots') .'

    '; + echo ''; + echo '

    '. __('Written by', 'roots') .'

    '; } -?> \ No newline at end of file +?> diff --git a/header.php b/header.php index 04355497ae..ae8e6fe3a8 100644 --- a/header.php +++ b/header.php @@ -4,63 +4,63 @@ > - + - <?php wp_title('|', true, 'right'); bloginfo('name'); ?> - - + <?php wp_title('|', true, 'right'); bloginfo('name'); ?> - - - + - - - + - - + - - + + + + + + + + + > - -
    - - + diff --git a/inc/roots-actions.php b/inc/roots-actions.php index 74ae43a825..6c229bb695 100644 --- a/inc/roots-actions.php +++ b/inc/roots-actions.php @@ -1,4 +1,4 @@ -\n"; - echo "\t\tvar _gaq=[['_setAccount','$get_roots_google_analytics_id'],['_trackPageview'],['_trackPageLoadTime']];\n"; - echo "\t\t(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];\n"; - echo "\t\tg.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';\n"; - echo "\t\ts.parentNode.insertBefore(g,s)}(document,'script'));\n"; - echo "\t\n"; - } + global $roots_options; + $roots_google_analytics_id = $roots_options['google_analytics_id']; + $get_roots_google_analytics_id = esc_attr($roots_options['google_analytics_id']); + if ($roots_google_analytics_id !== '') { + echo "\n\t\n"; + } } function roots_fout_b_gone() { - global $roots_options; - $roots_fout_b_gone = $roots_options['fout_b_gone']; - $template_uri = get_template_directory_uri(); - if ($roots_fout_b_gone === true) { - echo "\t\n"; - echo "\t"; - } + global $roots_options; + $roots_fout_b_gone = $roots_options['fout_b_gone']; + $template_uri = get_template_directory_uri(); + if ($roots_fout_b_gone === true) { + echo "\t\n"; + echo "\t"; + } } function roots_1140_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === '1140') { - echo "\t"; - } + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + $template_uri = get_template_directory_uri(); + if ($roots_css_framework === '1140') { + echo "\t"; + } } function roots_adapt_head() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - $template_uri = get_template_directory_uri(); - if ($roots_css_framework === 'adapt') { - echo "\n\t\n"; - echo "\t"; - } + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + $template_uri = get_template_directory_uri(); + if ($roots_css_framework === 'adapt') { + echo "\n\t\n"; + echo "\t"; + } } function roots_get_stylesheets() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - - $styles = ''; + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + + $styles = ''; switch ($roots_css_framework) { case 'blueprint' : @@ -102,15 +102,15 @@ function roots_get_stylesheets() { case 'less' : $styles .= stylesheet_link_tag('/less/less.css'); break; - } + } - if (class_exists('RGForms')) { - $styles .= "\t\n"; - } + if (class_exists('RGForms')) { + $styles .= "\t\n"; + } if (is_child_theme()) { $styles .= stylesheet_link_tag('/style.css', 1); - $styles .= "\t\n"; + $styles .= "\t\n"; } else { $styles .= stylesheet_link_tag('/style.css', 1); } @@ -122,9 +122,9 @@ function roots_get_stylesheets() { case '1140' : $styles .= "\t\n"; break; - } + } - echo $styles; + echo $styles; } function stylesheet_link_tag($file, $tabs = 0, $newline = true) { @@ -133,46 +133,46 @@ function stylesheet_link_tag($file, $tabs = 0, $newline = true) { } function roots_1140_header_before() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - if ($roots_css_framework === '1140') { - echo '
    ', "\n"; - } + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + if ($roots_css_framework === '1140') { + echo '
    ', "\n"; + } } function roots_1140_header_after() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - if ($roots_css_framework === '1140') { - echo "
    \n"; - echo '
    ', "\n"; - } + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + if ($roots_css_framework === '1140') { + echo "
    \n"; + echo '
    ', "\n"; + } } function roots_1140_footer_before() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - if ($roots_css_framework === '1140') { - echo "
    \n"; + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + if ($roots_css_framework === '1140') { + echo "
    \n"; echo '
    ', "\n"; - } + } } function roots_1140_footer_after() { - global $roots_options; - $roots_css_framework = $roots_options['css_framework']; - if ($roots_css_framework === '1140') { - echo "
    \n"; - } + global $roots_options; + $roots_css_framework = $roots_options['css_framework']; + if ($roots_css_framework === '1140') { + echo "
    \n"; + } } function roots_page_breadcrumb() { - global $post; - if (function_exists('yoast_breadcrumb')) { - if (is_page() && $post->post_parent) { - yoast_breadcrumb(''); - } - } + global $post; + if (function_exists('yoast_breadcrumb')) { + if (is_page() && $post->post_parent) { + yoast_breadcrumb(''); + } + } } ?> diff --git a/inc/roots-activation.php b/inc/roots-activation.php index 0a77358809..ccaa42ed3f 100644 --- a/inc/roots-activation.php +++ b/inc/roots-activation.php @@ -5,73 +5,73 @@ global $pagenow; if (is_admin() && $pagenow === 'themes.php' && isset( $_GET['activated'])) { - // on theme activation make sure there's a Home page - // create it if there isn't and set the Home page menu order to -1 - // set WordPress to have the front page display the Home page as a static page - $default_pages = array('Home'); - $existing_pages = get_pages(); + // on theme activation make sure there's a Home page + // create it if there isn't and set the Home page menu order to -1 + // set WordPress to have the front page display the Home page as a static page + $default_pages = array('Home'); + $existing_pages = get_pages(); $temp = array(); - foreach ($existing_pages as $page) { - $temp[] = $page->post_title; - } + foreach ($existing_pages as $page) { + $temp[] = $page->post_title; + } $pages_to_create = array_diff($default_pages, $temp); foreach ($pages_to_create as $new_page_title) { - // create post object - $add_default_pages = array( + // create post object + $add_default_pages = array( 'post_title' => $new_page_title, 'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat, orci ac laoreet cursus, dolor sem luctus lorem, eget consequat magna felis a magna. Aliquam scelerisque condimentum ante, eget facilisis tortor lobortis in. In interdum venenatis justo eget consequat. Morbi commodo rhoncus mi nec pharetra. Aliquam erat volutpat. Mauris non lorem eu dolor hendrerit dapibus. Mauris mollis nisl quis sapien posuere consectetur. Nullam in sapien at nisi ornare bibendum at ut lectus. Pellentesque ut magna mauris. Nam viverra suscipit ligula, sed accumsan enim placerat nec. Cras vitae metus vel dolor ultrices sagittis. Duis venenatis augue sed risus laoreet congue ac ac leo. Donec fermentum accumsan libero sit amet iaculis. Duis tristique dictum enim, ac fringilla risus bibendum in. Nunc ornare, quam sit amet ultricies gravida, tortor mi malesuada urna, quis commodo dui nibh in lacus. Nunc vel tortor mi. Pellentesque vel urna a arcu adipiscing imperdiet vitae sit amet neque. Integer eu lectus et nunc dictum sagittis. Curabitur commodo vulputate fringilla. Sed eleifend, arcu convallis adipiscing congue, dui turpis commodo magna, et vehicula sapien turpis sit amet nisi.', 'post_status' => 'publish', 'post_type' => 'page' ); - // insert the post into the database - $result = wp_insert_post($add_default_pages); - } - - $home = get_page_by_title('Home'); - update_option('show_on_front', 'page'); - update_option('page_on_front', $home->ID); - - $home_menu_order = array( + // insert the post into the database + $result = wp_insert_post($add_default_pages); + } + + $home = get_page_by_title('Home'); + update_option('show_on_front', 'page'); + update_option('page_on_front', $home->ID); + + $home_menu_order = array( 'ID' => $home->ID, 'menu_order' => -1 ); - wp_update_post($home_menu_order); - - // set the permalink structure - if (get_option('permalink_structure') !== '/%year%/%postname%/') { - update_option('permalink_structure', '/%year%/%postname%/'); + wp_update_post($home_menu_order); + + // set the permalink structure + if (get_option('permalink_structure') !== '/%year%/%postname%/') { + update_option('permalink_structure', '/%year%/%postname%/'); } - $wp_rewrite->init(); - $wp_rewrite->flush_rules(); - - // don't organize uploads by year and month - update_option('uploads_use_yearmonth_folders', 0); - update_option('upload_path', 'assets'); - - // automatically create menus and set their locations - // add all pages to the Primary Navigation - $roots_nav_theme_mod = false; - - if (!has_nav_menu('primary_navigation')) { - $primary_nav_id = wp_create_nav_menu('Primary Navigation', array('slug' => 'primary_navigation')); - $roots_nav_theme_mod['primary_navigation'] = $primary_nav_id; - } - - if (!has_nav_menu('utility_navigation')) { - $utility_nav_id = wp_create_nav_menu('Utility Navigation', array('slug' => 'utility_navigation')); - $roots_nav_theme_mod['utility_navigation'] = $utility_nav_id; - } - - if ($roots_nav_theme_mod) { + $wp_rewrite->init(); + $wp_rewrite->flush_rules(); + + // don't organize uploads by year and month + update_option('uploads_use_yearmonth_folders', 0); + update_option('upload_path', 'assets'); + + // automatically create menus and set their locations + // add all pages to the Primary Navigation + $roots_nav_theme_mod = false; + + if (!has_nav_menu('primary_navigation')) { + $primary_nav_id = wp_create_nav_menu('Primary Navigation', array('slug' => 'primary_navigation')); + $roots_nav_theme_mod['primary_navigation'] = $primary_nav_id; + } + + if (!has_nav_menu('utility_navigation')) { + $utility_nav_id = wp_create_nav_menu('Utility Navigation', array('slug' => 'utility_navigation')); + $roots_nav_theme_mod['utility_navigation'] = $utility_nav_id; + } + + if ($roots_nav_theme_mod) { set_theme_mod('nav_menu_locations', $roots_nav_theme_mod); } - + $primary_nav = wp_get_nav_menu_object('Primary Navigation'); $primary_nav_term_id = (int) $primary_nav->term_id; @@ -91,4 +91,4 @@ } -?> \ No newline at end of file +?> diff --git a/inc/roots-cleanup.php b/inc/roots-cleanup.php index b813653828..f12a0219dc 100644 --- a/inc/roots-cleanup.php +++ b/inc/roots-cleanup.php @@ -3,20 +3,20 @@ // redirect /?s to /search/ // http://txfx.net/wordpress-plugins/nice-search/ function roots_nice_search_redirect() { - if (is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/search/') === false) { - wp_redirect(home_url('/search/' . str_replace(array(' ', '%20'), array('+', '+'), urlencode(get_query_var( 's' )))), 301); - exit(); - } + if (is_search() && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false && strpos($_SERVER['REQUEST_URI'], '/search/') === false) { + wp_redirect(home_url('/search/' . str_replace(array(' ', '%20'), array('+', '+'), urlencode(get_query_var( 's' )))), 301); + exit(); + } } add_action('template_redirect', 'roots_nice_search_redirect'); function roots_search_query($escaped = true) { - $query = apply_filters('roots_search_query', get_query_var('s')); - if ($escaped) { - $query = esc_attr($query); - } - return urldecode($query); + $query = apply_filters('roots_search_query', get_query_var('s')); + if ($escaped) { + $query = esc_attr($query); + } + return urldecode($query); } add_filter('get_search_query', 'roots_search_query'); @@ -25,90 +25,90 @@ function roots_search_query($escaped = true) { // inspired by http://www.456bereastreet.com/archive/201010/how_to_make_wordpress_urls_root_relative/ // thanks to Scott Walkinshaw (scottwalkinshaw.com) function roots_root_relative_url($input) { - $output = preg_replace_callback( - '!(https?://[^/|"]+)([^"]+)?!', - create_function( - '$matches', - // if full URL is site_url, return a slash for relative root - 'if (isset($matches[0]) && $matches[0] === site_url()) { return "/";' . - // if domain is equal to site_url, then make URL relative - '} elseif (isset($matches[0]) && strpos($matches[0], site_url()) !== false) { return $matches[2];' . - // if domain is not equal to site_url, do not make external link relative - '} else { return $matches[0]; };' - ), - $input - ); - return $output; + $output = preg_replace_callback( + '!(https?://[^/|"]+)([^"]+)?!', + create_function( + '$matches', + // if full URL is site_url, return a slash for relative root + 'if (isset($matches[0]) && $matches[0] === site_url()) { return "/";' . + // if domain is equal to site_url, then make URL relative + '} elseif (isset($matches[0]) && strpos($matches[0], site_url()) !== false) { return $matches[2];' . + // if domain is not equal to site_url, do not make external link relative + '} else { return $matches[0]; };' + ), + $input + ); + return $output; } // Terrible workaround to remove the duplicate subfolder in the src of JS/CSS tags -// Example: /subfolder/subfolder/css/style.css +// Example: /subfolder/subfolder/css/style.css function roots_fix_duplicate_subfolder_urls($input) { - $output = roots_root_relative_url($input); - preg_match_all('!([^/]+)/([^/]+)!', $output, $matches); - if (isset($matches[1]) && isset($matches[2])) { - if ($matches[1][0] === $matches[2][0]) { - $output = substr($output, strlen($matches[1][0]) + 1); - } - } - return $output; + $output = roots_root_relative_url($input); + preg_match_all('!([^/]+)/([^/]+)!', $output, $matches); + if (isset($matches[1]) && isset($matches[2])) { + if ($matches[1][0] === $matches[2][0]) { + $output = substr($output, strlen($matches[1][0]) + 1); + } + } + return $output; } $roots_options = roots_get_theme_options(); if (!is_admin() && !in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')) && $roots_options['root_relative_urls']) { - add_filter('bloginfo_url', 'roots_root_relative_url'); - add_filter('theme_root_uri', 'roots_root_relative_url'); - add_filter('stylesheet_directory_uri', 'roots_root_relative_url'); - add_filter('template_directory_uri', 'roots_root_relative_url'); - add_filter('script_loader_src', 'roots_fix_duplicate_subfolder_urls'); - add_filter('style_loader_src', 'roots_fix_duplicate_subfolder_urls'); - add_filter('plugins_url', 'roots_root_relative_url'); - add_filter('the_permalink', 'roots_root_relative_url'); - add_filter('wp_list_pages', 'roots_root_relative_url'); - add_filter('wp_list_categories', 'roots_root_relative_url'); - add_filter('wp_nav_menu', 'roots_root_relative_url'); - add_filter('the_content_more_link', 'roots_root_relative_url'); - add_filter('the_tags', 'roots_root_relative_url'); - add_filter('get_pagenum_link', 'roots_root_relative_url'); - add_filter('get_comment_link', 'roots_root_relative_url'); - add_filter('month_link', 'roots_root_relative_url'); - add_filter('day_link', 'roots_root_relative_url'); - add_filter('year_link', 'roots_root_relative_url'); - add_filter('tag_link', 'roots_root_relative_url'); - add_filter('the_author_posts_link', 'roots_root_relative_url'); + add_filter('bloginfo_url', 'roots_root_relative_url'); + add_filter('theme_root_uri', 'roots_root_relative_url'); + add_filter('stylesheet_directory_uri', 'roots_root_relative_url'); + add_filter('template_directory_uri', 'roots_root_relative_url'); + add_filter('script_loader_src', 'roots_fix_duplicate_subfolder_urls'); + add_filter('style_loader_src', 'roots_fix_duplicate_subfolder_urls'); + add_filter('plugins_url', 'roots_root_relative_url'); + add_filter('the_permalink', 'roots_root_relative_url'); + add_filter('wp_list_pages', 'roots_root_relative_url'); + add_filter('wp_list_categories', 'roots_root_relative_url'); + add_filter('wp_nav_menu', 'roots_root_relative_url'); + add_filter('the_content_more_link', 'roots_root_relative_url'); + add_filter('the_tags', 'roots_root_relative_url'); + add_filter('get_pagenum_link', 'roots_root_relative_url'); + add_filter('get_comment_link', 'roots_root_relative_url'); + add_filter('month_link', 'roots_root_relative_url'); + add_filter('day_link', 'roots_root_relative_url'); + add_filter('year_link', 'roots_root_relative_url'); + add_filter('tag_link', 'roots_root_relative_url'); + add_filter('the_author_posts_link', 'roots_root_relative_url'); } // remove root relative URLs on any attachments in the feed function roots_root_relative_attachment_urls() { - $roots_options = roots_get_theme_options(); - if (!is_feed() && $roots_options['root_relative_urls']) { - add_filter('wp_get_attachment_url', 'roots_root_relative_url'); - add_filter('wp_get_attachment_link', 'roots_root_relative_url'); - } + $roots_options = roots_get_theme_options(); + if (!is_feed() && $roots_options['root_relative_urls']) { + add_filter('wp_get_attachment_url', 'roots_root_relative_url'); + add_filter('wp_get_attachment_link', 'roots_root_relative_url'); + } } add_action('pre_get_posts', 'roots_root_relative_attachment_urls'); // set lang="en" as default (rather than en-US) function roots_language_attributes() { - $attributes = array(); - $output = ''; - if (function_exists('is_rtl')) { - if (is_rtl() == 'rtl') { - $attributes[] = 'dir="rtl"'; - } - } - - $lang = get_bloginfo('language'); - if ($lang && $lang !== 'en-US') { - $attributes[] = "lang=\"$lang\""; - } else { - $attributes[] = 'lang="en"'; - } - - $output = implode(' ', $attributes); - $output = apply_filters('roots_language_attributes', $output); - return $output; + $attributes = array(); + $output = ''; + if (function_exists('is_rtl')) { + if (is_rtl() == 'rtl') { + $attributes[] = 'dir="rtl"'; + } + } + + $lang = get_bloginfo('language'); + if ($lang && $lang !== 'en-US') { + $attributes[] = "lang=\"$lang\""; + } else { + $attributes[] = 'lang="en"'; + } + + $output = implode(' ', $attributes); + $output = apply_filters('roots_language_attributes', $output); + return $output; } add_filter('language_attributes', 'roots_language_attributes'); @@ -119,173 +119,173 @@ function roots_no_generator() { return ''; } // cleanup wp_head function roots_noindex() { - if (get_option('blog_public') === '0') { - echo '', "\n"; - } -} + if (get_option('blog_public') === '0') { + echo '', "\n"; + } +} function roots_rel_canonical() { - if (!is_singular()) { - return; - } + if (!is_singular()) { + return; + } - global $wp_the_query; - if (!$id = $wp_the_query->get_queried_object_id()) { - return; - } + global $wp_the_query; + if (!$id = $wp_the_query->get_queried_object_id()) { + return; + } - $link = get_permalink($id); - echo "\t\n"; + $link = get_permalink($id); + echo "\t\n"; } // remove CSS from recent comments widget function roots_remove_recent_comments_style() { - global $wp_widget_factory; - if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) { - remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style')); - } + global $wp_widget_factory; + if (isset($wp_widget_factory->widgets['WP_Widget_Recent_Comments'])) { + remove_action('wp_head', array($wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style')); + } } // remove CSS from gallery function roots_gallery_style($css) { - return preg_replace("!!s", '', $css); + return preg_replace("!!s", '', $css); } function roots_head_cleanup() { - // http://wpengineer.com/1438/wordpress-header/ - remove_action('wp_head', 'feed_links', 2); - remove_action('wp_head', 'feed_links_extra', 3); - remove_action('wp_head', 'rsd_link'); - remove_action('wp_head', 'wlwmanifest_link'); - remove_action('wp_head', 'index_rel_link'); - remove_action('wp_head', 'parent_post_rel_link', 10, 0); - remove_action('wp_head', 'start_post_rel_link', 10, 0); - remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); - remove_action('wp_head', 'wp_generator'); - remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); - remove_action('wp_head', 'noindex', 1); - add_action('wp_head', 'roots_noindex'); - remove_action('wp_head', 'rel_canonical'); - add_action('wp_head', 'roots_rel_canonical'); - add_action('wp_head', 'roots_remove_recent_comments_style', 1); - add_filter('gallery_style', 'roots_gallery_style'); - - // stop Gravity Forms from outputting CSS since it's linked in header.php - if (class_exists('RGForms')) { - update_option('rg_gforms_disable_css', 1); - } - - // deregister l10n.js (new since WordPress 3.1) - // why you might want to keep it: http://wordpress.stackexchange.com/questions/5451/what-does-l10n-js-do-in-wordpress-3-1-and-how-do-i-remove-it/5484#5484 - // don't load jQuery through WordPress since it's linked in header.php - if (!is_admin()) { - wp_deregister_script('l10n'); - wp_deregister_script('jquery'); - wp_register_script('jquery', '', '', '', true); - } + // http://wpengineer.com/1438/wordpress-header/ + remove_action('wp_head', 'feed_links', 2); + remove_action('wp_head', 'feed_links_extra', 3); + remove_action('wp_head', 'rsd_link'); + remove_action('wp_head', 'wlwmanifest_link'); + remove_action('wp_head', 'index_rel_link'); + remove_action('wp_head', 'parent_post_rel_link', 10, 0); + remove_action('wp_head', 'start_post_rel_link', 10, 0); + remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0); + remove_action('wp_head', 'wp_generator'); + remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0); + remove_action('wp_head', 'noindex', 1); + add_action('wp_head', 'roots_noindex'); + remove_action('wp_head', 'rel_canonical'); + add_action('wp_head', 'roots_rel_canonical'); + add_action('wp_head', 'roots_remove_recent_comments_style', 1); + add_filter('gallery_style', 'roots_gallery_style'); + + // stop Gravity Forms from outputting CSS since it's linked in header.php + if (class_exists('RGForms')) { + update_option('rg_gforms_disable_css', 1); + } + + // deregister l10n.js (new since WordPress 3.1) + // why you might want to keep it: http://wordpress.stackexchange.com/questions/5451/what-does-l10n-js-do-in-wordpress-3-1-and-how-do-i-remove-it/5484#5484 + // don't load jQuery through WordPress since it's linked in header.php + if (!is_admin()) { + wp_deregister_script('l10n'); + wp_deregister_script('jquery'); + wp_register_script('jquery', '', '', '', true); + } } add_action('init', 'roots_head_cleanup'); // cleanup gallery_shortcode() function roots_gallery_shortcode($attr) { - global $post, $wp_locale; - - static $instance = 0; - $instance++; - - // Allow plugins/themes to override the default gallery template. - $output = apply_filters('post_gallery', '', $attr); - if ( $output != '' ) - return $output; - - // We're trusting author input, so let's at least make sure it looks like a valid orderby statement - if ( isset( $attr['orderby'] ) ) { - $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] ); - if ( !$attr['orderby'] ) - unset( $attr['orderby'] ); - } - - extract(shortcode_atts(array( - 'order' => 'ASC', - 'orderby' => 'menu_order ID', - 'id' => $post->ID, - 'icontag' => 'figure', - 'captiontag' => 'figcaption', - 'columns' => 3, - 'size' => 'thumbnail', - 'include' => '', - 'exclude' => '' - ), $attr)); - - $id = intval($id); - if ( 'RAND' == $order ) - $orderby = 'none'; - - if ( !empty($include) ) { - $include = preg_replace( '/[^0-9,]+/', '', $include ); - $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); - - $attachments = array(); - foreach ( $_attachments as $key => $val ) { - $attachments[$val->ID] = $_attachments[$key]; - } - } elseif ( !empty($exclude) ) { - $exclude = preg_replace( '/[^0-9,]+/', '', $exclude ); - $attachments = get_children( array('post_parent' => $id, 'exclude' => $exclude, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); - } else { - $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); - } - - if ( empty($attachments) ) - return ''; - - if ( is_feed() ) { - $output = "\n"; - foreach ( $attachments as $att_id => $attachment ) - $output .= wp_get_attachment_link($att_id, $size, true) . "\n"; - return $output; - } - - $captiontag = tag_escape($captiontag); - $columns = intval($columns); - $itemwidth = $columns > 0 ? floor(100/$columns) : 100; - $float = is_rtl() ? 'right' : 'left'; - - $selector = "gallery-{$instance}"; - - $gallery_style = $gallery_div = ''; - if ( apply_filters( 'use_default_gallery_style', true ) ) - $gallery_style = ""; - $size_class = sanitize_html_class( $size ); - $gallery_div = "\n"; + + return $output; } remove_shortcode('gallery'); @@ -293,21 +293,21 @@ function roots_gallery_shortcode($attr) { // http://www.deluxeblogtips.com/2011/01/remove-dashboard-widgets-in-wordpress.html function roots_remove_dashboard_widgets() { - remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); - remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); - remove_meta_box('dashboard_primary', 'dashboard', 'normal'); - remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); + remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal'); + remove_meta_box('dashboard_plugins', 'dashboard', 'normal'); + remove_meta_box('dashboard_primary', 'dashboard', 'normal'); + remove_meta_box('dashboard_secondary', 'dashboard', 'normal'); } add_action('admin_init', 'roots_remove_dashboard_widgets'); // excerpt cleanup function roots_excerpt_length($length) { - return 40; + return 40; } function roots_excerpt_more($more) { - return ' … ' . __( 'Continued', 'roots' ) . ''; + return ' … ' . __( 'Continued', 'roots' ) . ''; } add_filter('excerpt_length', 'roots_excerpt_length'); @@ -315,72 +315,72 @@ function roots_excerpt_more($more) { // remove container from menus function roots_nav_menu_args($args = '') { - $args['container'] = false; - return $args; + $args['container'] = false; + return $args; } add_filter('wp_nav_menu_args', 'roots_nav_menu_args'); class roots_nav_walker extends Walker_Nav_Menu { - function start_el(&$output, $item, $depth, $args) { - global $wp_query; - $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; + function start_el(&$output, $item, $depth, $args) { + global $wp_query; + $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; - $slug = sanitize_title($item->title); + $slug = sanitize_title($item->title); - $class_names = $value = ''; - $classes = empty( $item->classes ) ? array() : (array) $item->classes; + $class_names = $value = ''; + $classes = empty( $item->classes ) ? array() : (array) $item->classes; - $classes = array_filter($classes, 'roots_check_current'); + $classes = array_filter($classes, 'roots_check_current'); - $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); - $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; + $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); + $class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : ''; - $id = apply_filters( 'nav_menu_item_id', 'menu-' . $slug, $item, $args ); - $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; + $id = apply_filters( 'nav_menu_item_id', 'menu-' . $slug, $item, $args ); + $id = strlen( $id ) ? ' id="' . esc_attr( $id ) . '"' : ''; - $output .= $indent . ''; + $output .= $indent . ''; - $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; - $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; - $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; - $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; + $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; + $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; + $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; + $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; - $item_output = $args->before; - $item_output .= ''; - $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; - $item_output .= ''; - $item_output .= $args->after; + $item_output = $args->before; + $item_output .= ''; + $item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after; + $item_output .= ''; + $item_output .= $args->after; - $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); - } + $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); + } } function roots_check_current($val) { - return preg_match('/current-menu/', $val); + return preg_match('/current-menu/', $val); } // add to robots.txt // http://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization function roots_robots() { - echo "Disallow: /cgi-bin\n"; - echo "Disallow: /wp-admin\n"; - echo "Disallow: /wp-includes\n"; - echo "Disallow: /wp-content/plugins\n"; - echo "Disallow: /plugins\n"; - echo "Disallow: /wp-content/cache\n"; - echo "Disallow: /wp-content/themes\n"; - echo "Disallow: /trackback\n"; - echo "Disallow: /feed\n"; - echo "Disallow: /comments\n"; - echo "Disallow: /category/*/*\n"; - echo "Disallow: */trackback\n"; - echo "Disallow: */feed\n"; - echo "Disallow: */comments\n"; - echo "Disallow: /*?*\n"; - echo "Disallow: /*?\n"; - echo "Allow: /wp-content/uploads\n"; - echo "Allow: /assets"; + echo "Disallow: /cgi-bin\n"; + echo "Disallow: /wp-admin\n"; + echo "Disallow: /wp-includes\n"; + echo "Disallow: /wp-content/plugins\n"; + echo "Disallow: /plugins\n"; + echo "Disallow: /wp-content/cache\n"; + echo "Disallow: /wp-content/themes\n"; + echo "Disallow: /trackback\n"; + echo "Disallow: /feed\n"; + echo "Disallow: /comments\n"; + echo "Disallow: /category/*/*\n"; + echo "Disallow: */trackback\n"; + echo "Disallow: */feed\n"; + echo "Disallow: */comments\n"; + echo "Disallow: /*?*\n"; + echo "Disallow: /*?\n"; + echo "Allow: /wp-content/uploads\n"; + echo "Allow: /assets"; } add_action('do_robots', 'roots_robots'); @@ -388,7 +388,7 @@ function roots_robots() { // we don't need to self-close these tags in html5: // , function roots_remove_self_closing_tags($input) { - return str_replace(' />', '>', $input); + return str_replace(' />', '>', $input); } add_filter('get_avatar', 'roots_remove_self_closing_tags'); @@ -400,23 +400,23 @@ function roots_remove_self_closing_tags($input) { // you want to change this or remove it because it's used as the description in the RSS feed function roots_notice_tagline() { global $current_user; - $user_id = $current_user->ID; - if (!get_user_meta($user_id, 'ignore_tagline_notice')) { - echo '
    '; - echo '

    ', sprintf(__('Please update your site tagline Hide Notice', 'roots'), admin_url('options-general.php'), '?tagline_notice_ignore=0'), '

    '; - echo '
    '; + $user_id = $current_user->ID; + if (!get_user_meta($user_id, 'ignore_tagline_notice')) { + echo '
    '; + echo '

    ', sprintf(__('Please update your site tagline Hide Notice', 'roots'), admin_url('options-general.php'), '?tagline_notice_ignore=0'), '

    '; + echo '
    '; } } -if (get_option('blogdescription') === 'Just another WordPress site') { - add_action('admin_notices', 'roots_notice_tagline'); +if (get_option('blogdescription') === 'Just another WordPress site') { + add_action('admin_notices', 'roots_notice_tagline'); } function roots_notice_tagline_ignore() { - global $current_user; - $user_id = $current_user->ID; - if (isset($_GET['tagline_notice_ignore']) && '0' == $_GET['tagline_notice_ignore']) { - add_user_meta($user_id, 'ignore_tagline_notice', 'true', true); + global $current_user; + $user_id = $current_user->ID; + if (isset($_GET['tagline_notice_ignore']) && '0' == $_GET['tagline_notice_ignore']) { + add_user_meta($user_id, 'ignore_tagline_notice', 'true', true); } } @@ -428,13 +428,13 @@ function roots_notice_tagline_ignore() { // allow more tags in TinyMCE including iframes function roots_change_mce_options($options) { - $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; - if (isset($initArray['extended_valid_elements'])) { - $options['extended_valid_elements'] .= ',' . $ext; - } else { - $options['extended_valid_elements'] = $ext; - } - return $options; + $ext = 'pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]'; + if (isset($initArray['extended_valid_elements'])) { + $options['extended_valid_elements'] .= ',' . $ext; + } else { + $options['extended_valid_elements'] = $ext; + } + return $options; } add_filter('tiny_mce_before_init', 'roots_change_mce_options'); @@ -445,60 +445,60 @@ function roots_change_mce_options($options) { function roots_clean_style_tag($input) { preg_match_all("!!", $input, $matches); //only display media if it's print - $media = $matches[3][0] === 'print' ? ' media="print"' : ''; + $media = $matches[3][0] === 'print' ? ' media="print"' : ''; return '' . "\n"; } function roots_body_class() { - $term = get_queried_object(); - if (is_single()) - $cat = get_the_category(); - if(!empty($cat)) - return $cat[0]->slug; - elseif(isset($term->slug)) - return $term->slug; - elseif(isset($term->page_name)) - return $term->page_name; - elseif(isset($term->post_name)) - return $term->post_name; - else - return; + $term = get_queried_object(); + if (is_single()) + $cat = get_the_category(); + if(!empty($cat)) + return $cat[0]->slug; + elseif(isset($term->slug)) + return $term->slug; + elseif(isset($term->page_name)) + return $term->page_name; + elseif(isset($term->post_name)) + return $term->post_name; + else + return; } // first and last classes for widgets // http://wordpress.org/support/topic/how-to-first-and-last-css-classes-for-sidebar-widgets function roots_widget_first_last_classes($params) { - global $my_widget_num; - $this_id = $params[0]['id']; - $arr_registered_widgets = wp_get_sidebars_widgets(); + global $my_widget_num; + $this_id = $params[0]['id']; + $arr_registered_widgets = wp_get_sidebars_widgets(); - if (!$my_widget_num) { - $my_widget_num = array(); - } + if (!$my_widget_num) { + $my_widget_num = array(); + } - if (!isset($arr_registered_widgets[$this_id]) || !is_array($arr_registered_widgets[$this_id])) { - return $params; - } + if (!isset($arr_registered_widgets[$this_id]) || !is_array($arr_registered_widgets[$this_id])) { + return $params; + } - if (isset($my_widget_num[$this_id])) { - $my_widget_num[$this_id] ++; - } else { - $my_widget_num[$this_id] = 1; - } + if (isset($my_widget_num[$this_id])) { + $my_widget_num[$this_id] ++; + } else { + $my_widget_num[$this_id] = 1; + } - $class = 'class="widget-' . $my_widget_num[$this_id] . ' '; + $class = 'class="widget-' . $my_widget_num[$this_id] . ' '; - if ($my_widget_num[$this_id] == 1) { - $class .= 'widget-first '; - } elseif ($my_widget_num[$this_id] == count($arr_registered_widgets[$this_id])) { - $class .= 'widget-last '; - } + if ($my_widget_num[$this_id] == 1) { + $class .= 'widget-first '; + } elseif ($my_widget_num[$this_id] == count($arr_registered_widgets[$this_id])) { + $class .= 'widget-last '; + } - $params[0]['before_widget'] = str_replace('class="', $class, $params[0]['before_widget']); + $params[0]['before_widget'] = str_replace('class="', $class, $params[0]['before_widget']); - return $params; + return $params; } add_filter('dynamic_sidebar_params', 'roots_widget_first_last_classes'); -?> \ No newline at end of file +?> diff --git a/inc/roots-hooks.php b/inc/roots-hooks.php index e7041bd56b..468fa683c7 100644 --- a/inc/roots-hooks.php +++ b/inc/roots-hooks.php @@ -1,34 +1,34 @@ - \ No newline at end of file +?> diff --git a/inc/roots-htaccess.php b/inc/roots-htaccess.php index 36df6385d2..28c22f3387 100644 --- a/inc/roots-htaccess.php +++ b/inc/roots-htaccess.php @@ -5,82 +5,82 @@ // https://github.com/retlehs/roots/wiki/Lighttpd if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) { - function roots_htaccess_writable() { - if (!is_writable(get_home_path() . '.htaccess')) { - if (current_user_can('administrator')) { - add_action('admin_notices', create_function('', "echo '

    " . sprintf(__('Please make sure your .htaccess file is writable ', 'roots'), admin_url('options-permalink.php')) . "

    ';")); - } - }; - } - - add_action('admin_init', 'roots_htaccess_writable'); - - // Rewrites DO NOT happen for child themes - // rewrite /wp-content/themes/roots/css/ to /css/ - // rewrite /wp-content/themes/roots/js/ to /js/ - // rewrite /wp-content/themes/roots/img/ to /js/ - // rewrite /wp-content/plugins/ to /plugins/ - - function roots_flush_rewrites() { - global $wp_rewrite; - $wp_rewrite->flush_rules(); - } - - function roots_add_rewrites($content) { - $theme_name = next(explode('/themes/', get_stylesheet_directory())); - global $wp_rewrite; - $roots_new_non_wp_rules = array( - 'css/(.*)' => 'wp-content/themes/'. $theme_name . '/css/$1', - 'js/(.*)' => 'wp-content/themes/'. $theme_name . '/js/$1', - 'img/(.*)' => 'wp-content/themes/'. $theme_name . '/img/$1', - 'plugins/(.*)' => 'wp-content/plugins/$1' - ); - $wp_rewrite->non_wp_rules += $roots_new_non_wp_rules; - } - - add_action('admin_init', 'roots_flush_rewrites'); - - function roots_clean_assets($content) { - $theme_name = next(explode('/themes/', $content)); - $current_path = '/wp-content/themes/' . $theme_name; - $new_path = ''; - $content = str_replace($current_path, $new_path, $content); - return $content; - } - - function roots_clean_plugins($content) { - $current_path = '/wp-content/plugins'; - $new_path = '/plugins'; - $content = str_replace($current_path, $new_path, $content); - return $content; - } - - // only use clean urls if the theme isn't a child or an MU (Network) install - if (!is_multisite() && !is_child_theme()) { - add_action('generate_rewrite_rules', 'roots_add_rewrites'); - if (!is_admin()) { - add_filter('plugins_url', 'roots_clean_plugins'); - add_filter('bloginfo', 'roots_clean_assets'); - add_filter('stylesheet_directory_uri', 'roots_clean_assets'); - add_filter('template_directory_uri', 'roots_clean_assets'); - add_filter('script_loader_src', 'roots_clean_plugins'); - add_filter('style_loader_src', 'roots_clean_plugins'); - } - } - - function roots_add_h5bp_htaccess($rules) { - global $wp_filesystem; - - if (!defined('FS_METHOD')) define('FS_METHOD', 'direct'); - if (is_null($wp_filesystem)) WP_Filesystem(array(), ABSPATH); - - $filename = __DIR__ . '/h5bp-htaccess'; - $rules .= $wp_filesystem->get_contents($filename); - - return $rules; - } - - add_action('mod_rewrite_rules', 'roots_add_h5bp_htaccess'); + function roots_htaccess_writable() { + if (!is_writable(get_home_path() . '.htaccess')) { + if (current_user_can('administrator')) { + add_action('admin_notices', create_function('', "echo '

    " . sprintf(__('Please make sure your .htaccess file is writable ', 'roots'), admin_url('options-permalink.php')) . "

    ';")); + } + }; + } + + add_action('admin_init', 'roots_htaccess_writable'); + + // Rewrites DO NOT happen for child themes + // rewrite /wp-content/themes/roots/css/ to /css/ + // rewrite /wp-content/themes/roots/js/ to /js/ + // rewrite /wp-content/themes/roots/img/ to /js/ + // rewrite /wp-content/plugins/ to /plugins/ + + function roots_flush_rewrites() { + global $wp_rewrite; + $wp_rewrite->flush_rules(); + } + + function roots_add_rewrites($content) { + $theme_name = next(explode('/themes/', get_stylesheet_directory())); + global $wp_rewrite; + $roots_new_non_wp_rules = array( + 'css/(.*)' => 'wp-content/themes/'. $theme_name . '/css/$1', + 'js/(.*)' => 'wp-content/themes/'. $theme_name . '/js/$1', + 'img/(.*)' => 'wp-content/themes/'. $theme_name . '/img/$1', + 'plugins/(.*)' => 'wp-content/plugins/$1' + ); + $wp_rewrite->non_wp_rules += $roots_new_non_wp_rules; + } + + add_action('admin_init', 'roots_flush_rewrites'); + + function roots_clean_assets($content) { + $theme_name = next(explode('/themes/', $content)); + $current_path = '/wp-content/themes/' . $theme_name; + $new_path = ''; + $content = str_replace($current_path, $new_path, $content); + return $content; + } + + function roots_clean_plugins($content) { + $current_path = '/wp-content/plugins'; + $new_path = '/plugins'; + $content = str_replace($current_path, $new_path, $content); + return $content; + } + + // only use clean urls if the theme isn't a child or an MU (Network) install + if (!is_multisite() && !is_child_theme()) { + add_action('generate_rewrite_rules', 'roots_add_rewrites'); + if (!is_admin()) { + add_filter('plugins_url', 'roots_clean_plugins'); + add_filter('bloginfo', 'roots_clean_assets'); + add_filter('stylesheet_directory_uri', 'roots_clean_assets'); + add_filter('template_directory_uri', 'roots_clean_assets'); + add_filter('script_loader_src', 'roots_clean_plugins'); + add_filter('style_loader_src', 'roots_clean_plugins'); + } + } + + function roots_add_h5bp_htaccess($rules) { + global $wp_filesystem; + + if (!defined('FS_METHOD')) define('FS_METHOD', 'direct'); + if (is_null($wp_filesystem)) WP_Filesystem(array(), ABSPATH); + + $filename = __DIR__ . '/h5bp-htaccess'; + $rules .= $wp_filesystem->get_contents($filename); + + return $rules; + } + + add_action('mod_rewrite_rules', 'roots_add_h5bp_htaccess'); } -?> \ No newline at end of file +?> diff --git a/inc/roots-options.php b/inc/roots-options.php index 76724eeb4d..4bd0d5998a 100644 --- a/inc/roots-options.php +++ b/inc/roots-options.php @@ -1,323 +1,323 @@ add_menu(array( - 'parent' => 'appearance', - 'id' => 'theme_options', - 'title' => __('Theme Options', 'roots'), - 'href' => admin_url( 'themes.php?page=theme_options') - )); + global $wp_admin_bar; + + $wp_admin_bar->add_menu(array( + 'parent' => 'appearance', + 'id' => 'theme_options', + 'title' => __('Theme Options', 'roots'), + 'href' => admin_url( 'themes.php?page=theme_options') + )); } add_action('wp_before_admin_bar_render', 'roots_admin_bar_render'); global $roots_css_frameworks; $roots_css_frameworks = array( - 'blueprint' => array( - 'name' => 'blueprint', - 'label' => __('Blueprint CSS', 'roots'), - 'classes' => array( - 'container' => 'span-24', - 'main' => 'span-14 append-1', - 'sidebar' => 'span-8 prepend-1 last' - ) - ), - '960gs_12' => array( - 'name' => '960gs_12', - 'label' => __('960gs (12 cols)', 'roots'), - 'classes' => array( - 'container' => 'container_12', - 'main' => 'grid_7 suffix_1', - 'sidebar' => 'grid_4' - ) - ), - '960gs_16' => array( - 'name' => '960gs_16', - 'label' => __('960gs (16 cols)', 'roots'), - 'classes' => array( - 'container' => 'container_16', - 'main' => 'grid_9 suffix_1', - 'sidebar' => 'grid_6' - ) - ), - '960gs_24' => array( - 'name' => '960gs_24', - 'label' => __('960gs (24 cols)', 'roots'), - 'classes' => array( - 'container' => 'container_24', - 'main' => 'grid_15 suffix_1', - 'sidebar' => 'grid_8' - ) - ), - '1140' => array( - 'name' => '1140', - 'label' => __('1140', 'roots'), - 'classes' => array( - 'container' => 'twelvecol', - 'main' => 'eightcol', - 'sidebar' => 'fourcol last' - ) - ), - 'adapt' => array( - 'name' => 'adapt', - 'label' => __('Adapt.js', 'roots'), - 'classes' => array( - 'container' => 'container_12 clearfix', - 'main' => 'grid_7 suffix_1', - 'sidebar' => 'grid_4' - ) - ), - 'less' => array( - 'name' => 'less', - 'label' => __('Less Framework 4', 'roots'), - 'classes' => array( - 'container' => 'container', - 'main' => '', - 'sidebar' => '' - ) - ), - 'none' => array( - 'name' => 'none', - 'label' => __('None', 'roots'), - 'classes' => array( - 'container' => '', - 'main' => '', - 'sidebar' => '' - ) - ) + 'blueprint' => array( + 'name' => 'blueprint', + 'label' => __('Blueprint CSS', 'roots'), + 'classes' => array( + 'container' => 'span-24', + 'main' => 'span-14 append-1', + 'sidebar' => 'span-8 prepend-1 last' + ) + ), + '960gs_12' => array( + 'name' => '960gs_12', + 'label' => __('960gs (12 cols)', 'roots'), + 'classes' => array( + 'container' => 'container_12', + 'main' => 'grid_7 suffix_1', + 'sidebar' => 'grid_4' + ) + ), + '960gs_16' => array( + 'name' => '960gs_16', + 'label' => __('960gs (16 cols)', 'roots'), + 'classes' => array( + 'container' => 'container_16', + 'main' => 'grid_9 suffix_1', + 'sidebar' => 'grid_6' + ) + ), + '960gs_24' => array( + 'name' => '960gs_24', + 'label' => __('960gs (24 cols)', 'roots'), + 'classes' => array( + 'container' => 'container_24', + 'main' => 'grid_15 suffix_1', + 'sidebar' => 'grid_8' + ) + ), + '1140' => array( + 'name' => '1140', + 'label' => __('1140', 'roots'), + 'classes' => array( + 'container' => 'twelvecol', + 'main' => 'eightcol', + 'sidebar' => 'fourcol last' + ) + ), + 'adapt' => array( + 'name' => 'adapt', + 'label' => __('Adapt.js', 'roots'), + 'classes' => array( + 'container' => 'container_12 clearfix', + 'main' => 'grid_7 suffix_1', + 'sidebar' => 'grid_4' + ) + ), + 'less' => array( + 'name' => 'less', + 'label' => __('Less Framework 4', 'roots'), + 'classes' => array( + 'container' => 'container', + 'main' => '', + 'sidebar' => '' + ) + ), + 'none' => array( + 'name' => 'none', + 'label' => __('None', 'roots'), + 'classes' => array( + 'container' => '', + 'main' => '', + 'sidebar' => '' + ) + ) ); // Write the above array of CSS frameworks into a script tag function roots_add_frameworks_object_script() { - global $roots_css_frameworks; - $json = json_encode($roots_css_frameworks); + global $roots_css_frameworks; + $json = json_encode($roots_css_frameworks); ?> - - + var roots_css_frameworks = ; + + $default_framework, - 'container_class' => $default_framework_settings['classes']['container'], - 'main_class' => $default_framework_settings['classes']['main'], - 'sidebar_class' => $default_framework_settings['classes']['sidebar'], - 'google_analytics_id' => '', - 'root_relative_urls' => true, - 'clean_menu' => true, - 'fout_b_gone' => false - ); - - return apply_filters('roots_default_theme_options', $default_theme_options); + global $roots_css_frameworks; + if ($default_framework == '') { $default_framework = apply_filters('roots_default_css_framework', 'blueprint'); } + $default_framework_settings = $roots_css_frameworks[$default_framework]; + $default_theme_options = array( + 'css_framework' => $default_framework, + 'container_class' => $default_framework_settings['classes']['container'], + 'main_class' => $default_framework_settings['classes']['main'], + 'sidebar_class' => $default_framework_settings['classes']['sidebar'], + 'google_analytics_id' => '', + 'root_relative_urls' => true, + 'clean_menu' => true, + 'fout_b_gone' => false + ); + + return apply_filters('roots_default_theme_options', $default_theme_options); } function roots_get_theme_options() { - return get_option('roots_theme_options', roots_get_default_theme_options()); + return get_option('roots_theme_options', roots_get_default_theme_options()); } function roots_theme_options_render_page() { - global $roots_css_frameworks; - ?> -
    - -

    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    - - -
    -
    - - +
    + +

    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    + + +
    +
    + + \ No newline at end of file +?> diff --git a/inc/roots-widgets.php b/inc/roots-widgets.php index 84a5e08a77..3a024b328e 100644 --- a/inc/roots-widgets.php +++ b/inc/roots-widgets.php @@ -2,72 +2,72 @@ class roots_vcard extends WP_Widget { - function roots_vcard() { - $widget_ops = array('description' => 'Display a vCard'); - parent::WP_Widget(false, __('Roots: vCard', 'roots'), $widget_ops); - } + function roots_vcard() { + $widget_ops = array('description' => 'Display a vCard'); + parent::WP_Widget(false, __('Roots: vCard', 'roots'), $widget_ops); + } - function widget($args, $instance) { - extract($args); - extract($instance); - echo $before_widget; - if ($title) { - echo $before_title, $title, $after_title; - } + function widget($args, $instance) { + extract($args); + extract($instance); + echo $before_widget; + if ($title) { + echo $before_title, $title, $after_title; + } ?> -

    -
    - -
    - , - -
    -
    -
    - -

    +

    +
    + +
    + , + +
    +
    +
    + +

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    -

    - - -

    - +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    +

    + + +

    + \ No newline at end of file +?> diff --git a/index.php b/index.php index 68e3289533..3e6f195f94 100644 --- a/index.php +++ b/index.php @@ -1,23 +1,23 @@ - -
    - -
    -
    -

    - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    +

    + +
    +
    + + + + +
    + + diff --git a/js/script.js b/js/script.js index 206efd4d38..c8ebaef500 100644 --- a/js/script.js +++ b/js/script.js @@ -1,8 +1,3 @@ /* Author: */ - - - - - diff --git a/loop-page.php b/loop-page.php index 662221dea0..51d76b6726 100644 --- a/loop-page.php +++ b/loop-page.php @@ -1,10 +1,10 @@ - - -

    - - '' )); ?> - - - \ No newline at end of file + + +

    + + '' )); ?> + + + diff --git a/loop-search.php b/loop-search.php index 0298f70ffe..a62f60bb53 100644 --- a/loop-search.php +++ b/loop-search.php @@ -1,35 +1,35 @@ -
    -

    -
    - +
    +

    +
    + - -
    > - -
    -

    - -
    -
    - -
    -
    -

    -
    - -
    - + +
    > + +
    +

    + +
    +
    + +
    +
    +

    +
    + +
    + max_num_pages > 1) : ?> - - \ No newline at end of file + + diff --git a/loop-single.php b/loop-single.php index bd16b0e253..b96b02e9ab 100644 --- a/loop-single.php +++ b/loop-single.php @@ -1,21 +1,21 @@ - -
    id="post-"> - -
    -

    - -
    -
    - -
    -
    - '' )); ?> -

    -
    - - -
    - - \ No newline at end of file + +
    id="post-"> + +
    +

    + +
    +
    + +
    +
    + '' )); ?> +

    +
    + + +
    + + diff --git a/loop.php b/loop.php index fa7702338d..94f32a4762 100644 --- a/loop.php +++ b/loop.php @@ -1,39 +1,39 @@ -
    -

    -
    - +
    +

    +
    + - -
    > - -
    -

    - -
    -
    - - - - - -
    -
    -

    -
    - -
    - + +
    > + +
    +

    + +
    +
    + + + + + +
    +
    +

    +
    + +
    + max_num_pages > 1) : ?> - - \ No newline at end of file + + diff --git a/page-custom.php b/page-custom.php index e5a23d47c1..c23dd72413 100644 --- a/page-custom.php +++ b/page-custom.php @@ -3,26 +3,26 @@ Template Name: Custom */ get_header(); ?> - -
    - -
    -
    - - - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    + + + +
    +
    + + + + +
    + + diff --git a/page-full.php b/page-full.php index 76d823d478..25dc6a5129 100644 --- a/page-full.php +++ b/page-full.php @@ -3,17 +3,17 @@ Template Name: Full Width */ get_header(); ?> - -
    - -
    -
    - - - -
    -
    - -
    - - \ No newline at end of file + +
    + +
    +
    + + + +
    +
    + +
    + + diff --git a/page.php b/page.php index c38375b0fb..9e4771484b 100644 --- a/page.php +++ b/page.php @@ -1,24 +1,24 @@ - -
    - -
    -
    - - - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    + + + +
    +
    + + + + +
    + + diff --git a/search.php b/search.php index 32de98bd60..e025a85f09 100644 --- a/search.php +++ b/search.php @@ -1,25 +1,25 @@ - -
    - -
    -
    -

    - - - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    +

    + + + +
    +
    + + + + +
    + + diff --git a/searchform.php b/searchform.php index 8eac35fd18..87ad2c6b07 100644 --- a/searchform.php +++ b/searchform.php @@ -1,5 +1,5 @@ \ No newline at end of file + + + + diff --git a/single.php b/single.php index 336ee42b5e..7d47ecf3a2 100644 --- a/single.php +++ b/single.php @@ -1,24 +1,24 @@ - -
    - -
    -
    - - - -
    -
    - - - - -
    - - \ No newline at end of file + +
    + +
    +
    + + + +
    +
    + + + + +
    + +