Skip to content

Commit

Permalink
Merge pull request #1784 from aristath/develop
Browse files Browse the repository at this point in the history
3.0.26
  • Loading branch information
aristath authored Apr 27, 2018
2 parents 82c56f4 + e1d447d commit a01aeb5
Show file tree
Hide file tree
Showing 106 changed files with 4,368 additions and 1,247 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "wordpress",
"parserOptions": { "ecmaVersion": 6 },
"rules": {
"space-in-parens": ["error", "always"],
"camelcase": ["error", { "properties": "never" }]
}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ _site
#######
.svn
svn

# PHPUNIT #
###########
build/logs
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@ before_script:
- composer install --dev
# After CodeSniffer install you should refresh your path.
- phpenv rehash
# Install JSCS: JavaScript Code Style checker.
# @link http://jscs.info/
- npm install -g jscs
# Install JSHint, a JavaScript Code Quality Tool.
# @link http://jshint.com/docs/
- npm install -g jshint
# Install ESLint.
- npm install -g eslint
- npm install -g eslint-config-wordpress

script:
- mkdir -p build/logs
- phpunit --coverage-clover=coverage.clover
# Search for PHP syntax errors.
# - find . \( -name '*kirki*.php' \) -exec php -lf {} \;
- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
# Run the plugin through JSHint.
- jshint ./controls/js/src/*.js
- jshint ./modules/**/*.js
# Run the plugin through JavaScript Code Style checker.
- jscs ./controls/js/src/*.js
# Run the plugin through ESLint.
- eslint ./controls/js/src/*.js
- eslint ./modules/**/*.js
# WordPress Coding Standards.
# @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
# @link http://pear.php.net/package/PHP_CodeSniffer/
Expand Down
40 changes: 22 additions & 18 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* global module */
module.exports = function( grunt ) {

grunt.initConfig({
grunt.initConfig( {

// Get json file from the google-fonts API
http: {
Expand Down Expand Up @@ -64,15 +64,15 @@ module.exports = function( grunt ) {
'controls/scss/*.scss',
'modules/**/*.scss'
],
tasks: ['sass']
tasks: [ 'sass' ]
},
scripts: {
files: [
'Gruntfile.js',
'controls/js/src/*.js',
'modules/**/*.js'
],
tasks: ['concat', 'uglify']
tasks: [ 'concat', 'uglify' ]
}
},

Expand Down Expand Up @@ -121,21 +121,21 @@ module.exports = function( grunt ) {
dev: {
options: {
mangle: {
reserved: ['jQuery', 'wp', '_']
reserved: [ 'jQuery', 'wp', '_' ]
}
},
files: [{
files: [ {
expand: true,
src: ['controls/js/*.js', '!controls/js/*.min.js'],
src: [ 'controls/js/*.js', '!controls/js/*.min.js' ],
dest: '.',
cwd: '.',
rename: function( dst, src ) {
return dst + '/' + src.replace( '.js', '.min.js' );
}
}]
} ]
}
}
});
} );

grunt.loadNpmTasks( 'grunt-contrib-sass' );
grunt.loadNpmTasks( 'grunt-contrib-concat' );
Expand All @@ -145,20 +145,21 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks( 'grunt-jscs' );

grunt.registerTask( 'dev', ['sass', 'jscs', 'watch'] );
grunt.registerTask( 'dev', [ 'sass', 'jscs', 'watch' ] );
grunt.registerTask( 'googlefontsProcess', function() {
var alphaFonts,
popularityFonts,
trendingFonts,
finalObject = {
popularityFonts,
trendingFonts,
finalObject = {
items: {},
order: {
popularity: [],
trending: []
}
},
finalJSON,
i;
},
finalJSON,
i,
fontNames = [];

// Get file contents.
alphaFonts = grunt.file.readJSON( 'modules/webfonts/webfonts-alpha.json' );
Expand All @@ -171,6 +172,7 @@ module.exports = function( grunt ) {
family: alphaFonts.items[ i ].family,
category: alphaFonts.items[ i ].category,
variants: alphaFonts.items[ i ].variants.sort()

/* Deprecated
subsets: alphaFonts.items[ i ].subsets.sort(),
files: alphaFonts.items[ i ].files
Expand All @@ -181,6 +183,7 @@ module.exports = function( grunt ) {
// Add the popularity order.
for ( i = 0; i < popularityFonts.items.length; i++ ) {
finalObject.order.popularity.push( popularityFonts.items[ i ].family );
fontNames.push( popularityFonts.items[ i ].family );
}

// Add the rrending order.
Expand All @@ -191,6 +194,7 @@ module.exports = function( grunt ) {
// Write the final object to json.
finalJSON = JSON.stringify( finalObject );
grunt.file.write( 'modules/webfonts/webfonts.json', finalJSON );
grunt.file.write( 'modules/webfonts/webfont-names.json', JSON.stringify( fontNames ) );

// Delete files no longer needed.
grunt.file.delete( 'modules/webfonts/webfonts-alpha.json' ); // jshint ignore:line
Expand All @@ -201,7 +205,7 @@ module.exports = function( grunt ) {
grunt.task.run( 'http' );
grunt.task.run( 'googlefontsProcess' );
} );
grunt.registerTask( 'default', ['sass:dist', 'concat', 'uglify'] );
grunt.registerTask( 'readme', ['wp_readme_to_markdown'] );
grunt.registerTask( 'all', ['default', 'googlefonts', 'wp_readme_to_markdown'] );
grunt.registerTask( 'default', [ 'sass:dist', 'concat', 'uglify' ] );
grunt.registerTask( 'readme', [ 'wp_readme_to_markdown' ] );
grunt.registerTask( 'all', [ 'default', 'googlefonts', 'wp_readme_to_markdown' ] );
};
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Donate link:** https://aristath.github.io/donate
**Requires at least:** 4.9
**Tested up to:** 4.9.2
**Stable tag:** 3.0.24
**Stable tag:** 3.0.26
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -33,6 +33,33 @@ If you want to integrate Kirki in your theme or plugin, please read the instruct

## Changelog ##

### 3.0.26

April 27 2018, dev time: 43 hours.

* Fix: Color Palette: material colors 'light-blue' doesn't work [#1783](https://github.com/aristath/kirki/issues/1783).
* Fix: Google Fonts switch error [#1791](https://github.com/aristath/kirki/issues/1791).
* Fix: FontAwesome JS is being loaded even if you don't need it on front end [#1786](https://github.com/aristath/kirki/issues/1786).
* Fix: Color Palette: Active color before section title [#1782](https://github.com/aristath/kirki/issues/1782).
* Fix: Removed version from the webfont script.
* Fix: Validation error for dimension fields.
* Fix: `button_label` argument for repeater fields (props @felipeelia).
* Fix: Allow html on radio-buttonset choices [#1818](https://github.com/aristath/kirki/issues/1818).
* Fix: `Kirki_Helper::compare_values` vs. `field-dependencies.js` boolean issue (props @CaptJiggly) [#1825](https://github.com/aristath/kirki/issues/1825).
* Fix: `active_callback` not working for checkboxes [#1809](https://github.com/aristath/kirki/issues/1809).
* Fix: Nested `active_callback` args not working properly (AND|OR relations) [#1809](https://github.com/aristath/kirki/issues/1809).
* Fix: Updated google-fonts.
* Fix: Display typography with no default values [#1797](https://github.com/aristath/kirki/issues/1797).
* Fix: Define "normal" as a valid css-value for sanitizations [#1814](https://github.com/aristath/kirki/issues/1814).
* Fix: `background` controls now output `background-color` as simply `background` if no `background-image` is defined in the value [#1808](https://github.com/aristath/kirki/issues/1808).
* Fix: @media-queries fix due to minimized CSS. [#1787](https://github.com/aristath/kirki/issues/1787).
* Fix: `Kirki_Helper::compare_values` contains/in PHP warning if value doesn't exist in array [#1828](https://github.com/aristath/kirki/issues/1828).
* Fix: Invalid Value in the Dimension control [#1844](https://github.com/aristath/kirki/issues/1844).
* Fix: Add `fr` to the array of valid units used in validations [
86adedb](https://github.com/aristath/kirki/pull/1784/commits/86adedb8cd4c06c7e6538c3087233a6840dee562)
* Fix: Updated webfonts.
* New: Migrated `number` control to new structure.
###
### 3.0.25 ###

January 23 2018, dev time: 1 hour.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"require": {
"php": ">=5.2",
"php-coveralls/php-coveralls": "^2.0",
"phpunit/phpunit": "^6.5"
"phpunit/phpunit": "*"
},
"require-dev": {
"composer/installers": "*",
Expand Down
1 change: 1 addition & 0 deletions controls/class-kirki-controls.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Kirki_Controls {
'code',
'color',
'generic',
'number',
'radio',
'select',
'textarea',
Expand Down
4 changes: 3 additions & 1 deletion controls/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion controls/css/styles.css.map

Large diffs are not rendered by default.

Loading

0 comments on commit a01aeb5

Please sign in to comment.