Skip to content

Commit

Permalink
2.3.56
Browse files Browse the repository at this point in the history
  • Loading branch information
cdukes committed Apr 17, 2017
1 parent dd3d6c1 commit 4759821
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 31 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 2.3.56 (April 17, 2017)
- Use `prettier` for JS formatting
- Add `connect-src` CSP for Chrome for iOS fix
- Add CSS styles to highlight some HTML content issues
- Remove default `@extend` for buttons
- Remove `bfg_do_breadcrumbs()` (Genesis will use Yoast SEO's breadcrumbs when they're enabled)
- Set `X-Frame-Options: SAMEORIGIN` header

## 2.3.55 (March 9, 2017)
- Set default paragraph styles
- Remove `font-smoothing`
Expand Down
9 changes: 8 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ module.exports = function(grunt) {
}
},

shell: {
prettier: {
command: 'prettier --use-tabs --single-quote --parser=flow --write js/**/*.js'
}
},

concat: {
build: {
src: [
Expand Down Expand Up @@ -165,6 +171,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
Expand All @@ -175,6 +182,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-postcss');

grunt.registerTask('default', ['clean', 'imagemin', 'sass', 'concat', 'postcss:css', 'watch']);
grunt.registerTask('build', ['clean', 'imagemin', 'csscomb', 'postcss:scss', 'sass', 'jshint', 'concat', 'uglify', 'postcss:css', 'csso']);
grunt.registerTask('build', ['clean', 'imagemin', 'csscomb', 'postcss:scss', 'sass', 'jshint', 'shell', 'concat', 'uglify', 'postcss:css', 'csso']);

};
16 changes: 16 additions & 0 deletions includes/structure/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function bfg_content_security_policy() {
default-src 'none';
base-uri 'self';
block-all-mixed-content;
connect-src 'self';
font-src 'self' fonts.gstatic.com;
form-action 'self';
frame-ancestors 'none';
Expand All @@ -56,6 +57,21 @@ function bfg_content_security_policy() {

}

add_action( 'wp', 'bfg_send_frame_options_header' );
/**
* Prevent other sites from embedding this one in an iFrame.
*
* @since 2.3.56
*/
function bfg_send_frame_options_header() {

if( is_admin() )
return;

send_frame_options_header();

}

remove_action( 'genesis_doctype', 'genesis_do_doctype' );
add_action( 'genesis_doctype', 'bfg_do_doctype' );
/**
Expand Down
17 changes: 0 additions & 17 deletions includes/structure/loops.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
<?php

if( !defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_loop', 'bfg_do_breadcrumbs' );
/*
* Use WordPress SEO's breadcrumbs when available
*
* @since 2.3.11
*/
function bfg_do_breadcrumbs() {

if( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p class="breadcrumbs">', '</p>' );
} else {
genesis_do_breadcrumbs();
}

}
2 changes: 0 additions & 2 deletions js/admin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
(function() {

'use strict';

})();
2 changes: 0 additions & 2 deletions js/scripts.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
(function() {

'use strict';

// Remove the 'no-js' <body> class
document.body.classList.remove('no-js');

// Enable FitVids on the content area
fitvids('.content');

})();
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"grunt-notify": "*",
"grunt-postcss": "*",
"grunt-sass": "*",
"grunt-shell": "*",
"postcss-assets": "*",
"postcss-color-rgba-fallback": "*",
"postcss-flexbugs-fixes": "*",
Expand All @@ -23,6 +24,7 @@
"postcss-import": "*",
"postcss-line-height-px-to-unitless": "*",
"postcss-scss": "*",
"postcss-will-change": "*"
"postcss-will-change": "*",
"prettier": "*"
}
}
25 changes: 25 additions & 0 deletions sass/_developer-tools.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// https://bitsofco.de/linting-html-using-css/

// Inline styles
*[style] {
border: .5em solid $red;
}

// Missing <a> hrefs
a:not([href]),
a[href='#'],
a[href=''] {
border: .5em solid $red;
}

// Missing <img> alts
img:not([alt]),
img[alt=''] {
border: .5em solid $red;
}

// Empty interactive elements
button:empty,
a:empty {
border: .5em solid $red;
}
7 changes: 0 additions & 7 deletions sass/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ select {
text-overflow: ellipsis;
}

button,
input[type='button'],
input[type='reset'],
input[type='submit'] {
@extend .btn;
}

input[type='search'] {
box-sizing: border-box; // Overrides normalize.css

Expand Down
3 changes: 2 additions & 1 deletion sass/_toolkit.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Use with @extend to make reponsive modules
// Use with @include to make reponsive modules
@mixin wrap {
margin: 0 auto;
padding-right: .5em;
Expand All @@ -21,6 +21,7 @@
}

@mixin unstyled-list {
overflow: initial;
margin: 0;
padding: 0;
list-style: none;
Expand Down
3 changes: 3 additions & 0 deletions sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
@import 'variables';
@import '../bower_components/include-media-export/dist/_include-media-export';

// Development helper styles - should be removed for production
@import 'developer-tools';

// Clearfix & Toolkit
@import 'clearfix';
@import 'toolkit';
Expand Down

0 comments on commit 4759821

Please sign in to comment.