-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autoloading and make branding consistent (#50)
- Loading branch information
Showing
28 changed files
with
7,091 additions
and
273 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "plugin:@wordpress/eslint-plugin/es5", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"Gruntfile.js" | ||
], | ||
"extends": "plugin:@wordpress/eslint-plugin/recommended" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
/node_modules | ||
/vendor | ||
/.vagrant | ||
/composer.lock | ||
/package-lock.json | ||
/phpcs.xml | ||
/phpunit.xml | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
language: php | ||
dist: xenial | ||
|
||
language: | ||
- php | ||
- node_js | ||
|
||
php: | ||
- 7.2 | ||
- 5.6 | ||
- "7.3" | ||
- "7.2" | ||
- "5.6" | ||
|
||
install: | ||
- composer install | ||
- npm install | ||
|
||
script: | ||
- composer lint | ||
- composer test | ||
- npm run lint | ||
- npm run test | ||
- npm run mess -- -- --ignore-violations-on-exit | ||
|
||
after_script: | ||
- vendor/bin/php-coveralls -v | ||
- npm run coverage | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
notifications: | ||
email: false | ||
|
||
cache: | ||
npm: true | ||
directories: | ||
- $HOME/.composer/cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,10 @@ | ||
require 'yaml' | ||
# Local dev environment https://github.com/wpsh/wpsh-local | ||
|
||
confDir = File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__)) | ||
homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__)) | ||
load File.join( | ||
File.dirname(__FILE__), | ||
"vendor/wpsh/local/Vagrantfile" | ||
) | ||
|
||
require File.expand_path(confDir + '/scripts/homestead.rb') | ||
|
||
Vagrant.require_version '>= 1.9.0' | ||
|
||
Vagrant.configure("2") do |config| | ||
settings = YAML::load(File.read(homesteadYamlPath)) | ||
|
||
Homestead.configure(config, settings) | ||
|
||
# Download and setup our WP site; wp-cli provided out of the box. | ||
config.vm.provision "shell", | ||
inline: "wp config create", | ||
privileged: false | ||
|
||
if defined? VagrantPlugins::HostsUpdater | ||
config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] } | ||
end | ||
Vagrant.configure(2) do |config| | ||
config.vm.hostname = "widgetcontext" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,20 @@ | ||
jQuery(document).ready(function($) { | ||
|
||
function show_hide_controls( widget_id ) { | ||
|
||
var condition = $( '#widget-context-' + widget_id + ' .wc-field-select-condition select' ).val(); | ||
|
||
$( '#widget-context-' + widget_id ).toggleClass( 'context-global', ( condition == 'show' || condition == 'hide' ) ); | ||
/* global jQuery, document */ | ||
jQuery( document ).ready( function( $ ) { | ||
function showHideControls( widgetId ) { | ||
var condition = $( '#widget-context-' + widgetId + ' .wc-field-select-condition select' ).val(); | ||
|
||
$( '#widget-context-' + widgetId ).toggleClass( 'context-global', ( condition === 'show' || condition === 'hide' ) ); | ||
} | ||
|
||
$('.widget-context-inside').each(function() { | ||
|
||
show_hide_controls( $(this).data('widget-id') ); | ||
|
||
}); | ||
$( '.widget-context-inside' ).each( function() { | ||
showHideControls( $( this ).data( 'widget-id' ) ); | ||
} ); | ||
|
||
$('#widgets-right, #widgets-left, #customize-theme-controls').on( 'change', '.wc-field-select-condition select', function(){ | ||
|
||
show_hide_controls( $(this).parent().data('widget-id') ); | ||
|
||
}); | ||
$( '#widgets-right, #widgets-left, #customize-theme-controls' ).on( 'change', '.wc-field-select-condition select', function() { | ||
showHideControls( $( this ).parent().data( 'widget-id' ) ); | ||
} ); | ||
|
||
$( document ).on( 'widget-updated widget-added', function( e, widget ) { | ||
|
||
show_hide_controls( widget.find('input[name="widget-id"]').val() ); | ||
|
||
}); | ||
|
||
}); | ||
showHideControls( widget.find( 'input[name="widget-id"]' ).val() ); | ||
} ); | ||
} ); |
Oops, something went wrong.