Slim down the travis script, add js checks and fix js errors thrown up.
What it will now do: - Lint the php files against relevant PHP versions. - Lint the js files once - the result won't change across PHP versions. - Check against WPCS once - the result won't change across PHP versions. What I have changed: - Added linting against PHP 7 and HHVM, with HHVM being allowed to fail. - Added js linting and style check per example from Twenty Sixteen. - Moved to the faster container based environment for running travis. - Script will no longer pull in PHPCS, WPCS and the JS linters in every build. Now they will only be pulled in when needed. - Limited the clone depth for quicker cloning of external repositories. - Removed the pulling in of WP and running builds against different WP versions as this wasn't used at all in the actual test scripts.
This commit is contained in:
parent
e57d8c38b4
commit
b8d776c59c
6 changed files with 102 additions and 83 deletions
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* customizer.js
|
||||
* File customizer.js.
|
||||
*
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
*
|
||||
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
// Site title and description.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
|
@ -18,6 +19,7 @@
|
|||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Header text color.
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/**
|
||||
* navigation.js
|
||||
* File navigation.js.
|
||||
*
|
||||
* Handles toggling the navigation menu for small screens and enables tab
|
||||
* support for dropdown menus.
|
||||
*/
|
||||
( function() {
|
||||
var container, button, menu, links, subMenus;
|
||||
var container, button, menu, links, subMenus, i, len;
|
||||
|
||||
container = document.getElementById( 'site-navigation' );
|
||||
if ( ! container ) {
|
||||
|
@ -47,7 +47,7 @@
|
|||
subMenus = menu.getElementsByTagName( 'ul' );
|
||||
|
||||
// Set menu items with submenus to aria-haspopup="true".
|
||||
for ( var i = 0, len = subMenus.length; i < len; i++ ) {
|
||||
for ( i = 0, len = subMenus.length; i < len; i++ ) {
|
||||
subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue