-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code style: Change namespace, Use PSR 2, PSR4 and WordPress coding st…
…andard
- Loading branch information
Showing
83 changed files
with
2,538 additions
and
2,292 deletions.
There are no files selected for viewing
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,6 +1,3 @@ | ||
linters: | ||
phpcs: | ||
standard: 'WordPress' | ||
|
||
files: | ||
ignore: ['assets/*', 'tests/*', 'vendor/*'] | ||
standard: './ruleset.xml' |
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 @@ | ||
preset: psr2 |
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 |
---|---|---|
|
@@ -3,91 +3,91 @@ | |
* | ||
* A simplified OOP implementation of the WP Settings API. | ||
* | ||
* @package WP_Better_Settings | ||
* @package TypistTech\WPBetterSettings | ||
* @author Typist Tech <[email protected]> | ||
* @copyright 2017 Typist Tech | ||
* @license GPL-2.0+ | ||
* @see https://www.typist.tech/projects/wp-better-settings | ||
* @see https://github.com/TypistTech/wp-better-settings | ||
*/ | ||
|
||
module.exports = function ( grunt ) { | ||
module.exports = function (grunt) { | ||
|
||
'use strict'; | ||
'use strict'; | ||
|
||
// Project configuration. | ||
grunt.initConfig( { | ||
// Project configuration. | ||
grunt.initConfig({ | ||
|
||
pkg: grunt.file.readJSON( 'package.json' ), | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
// Bump version numbers. | ||
version: { | ||
composer: { | ||
options: { | ||
prefix: '"version"\\:\\s+"' | ||
}, | ||
src: ['composer.json'] | ||
}, | ||
changelog: { | ||
options: { | ||
prefix: 'future-release=' | ||
}, | ||
src: ['.github_changelog_generator'] | ||
}, | ||
php: { | ||
options: { | ||
prefix: '\\* Version:\\s+' | ||
}, | ||
src: ['<%= pkg.name %>.php'] | ||
} | ||
}, | ||
// Bump version numbers. | ||
version: { | ||
composer: { | ||
options: { | ||
prefix: '"version"\\:\\s+"' | ||
}, | ||
src: ['composer.json'] | ||
}, | ||
changelog: { | ||
options: { | ||
prefix: 'future-release=' | ||
}, | ||
src: ['.github_changelog_generator'] | ||
}, | ||
php: { | ||
options: { | ||
prefix: '\\* Version:\\s+' | ||
}, | ||
src: ['<%= pkg.name %>.php'] | ||
} | ||
}, | ||
|
||
// Clean the build folder. | ||
clean: { | ||
"pre-build": { | ||
src: [ | ||
'build/', | ||
'release/', | ||
'vendor/' | ||
] | ||
} | ||
}, | ||
// Clean the build folder. | ||
clean: { | ||
"pre-build": { | ||
src: [ | ||
'build/', | ||
'release/', | ||
'vendor/' | ||
] | ||
} | ||
}, | ||
|
||
// Copy to build folder. | ||
copy: { | ||
build: { | ||
expand: true, | ||
src: [ | ||
'partials/**', | ||
'src/**', | ||
'vendor/**', | ||
'class-plugin.php', | ||
'LICENSE', | ||
'<%= pkg.name %>.php' | ||
], | ||
dest: 'build/' | ||
} | ||
}, | ||
// Copy to build folder. | ||
copy: { | ||
build: { | ||
expand: true, | ||
src: [ | ||
'partials/**', | ||
'src/**', | ||
'vendor/**', | ||
'class-plugin.php', | ||
'LICENSE', | ||
'<%= pkg.name %>.php' | ||
], | ||
dest: 'build/' | ||
} | ||
}, | ||
|
||
compress: { | ||
build: { | ||
options: { | ||
archive: 'release/<%= pkg.name %>.zip' | ||
}, | ||
expand: true, | ||
dest: '<%= pkg.name %>/', | ||
cwd: 'build/', | ||
src: ['**'] | ||
} | ||
} | ||
compress: { | ||
build: { | ||
options: { | ||
archive: 'release/<%= pkg.name %>.zip' | ||
}, | ||
expand: true, | ||
dest: '<%= pkg.name %>/', | ||
cwd: 'build/', | ||
src: ['**'] | ||
} | ||
} | ||
|
||
} ); | ||
}); | ||
|
||
require( 'load-grunt-tasks' )( grunt ); | ||
grunt.registerTask( 'pre-build', ['clean:pre-build'] ); | ||
grunt.registerTask( 'build', ['copy:build', 'compress:build'] ); | ||
grunt.registerTask( 'pre-tag', ['version'] ); | ||
require('load-grunt-tasks')(grunt); | ||
grunt.registerTask('pre-build', ['clean:pre-build']); | ||
grunt.registerTask('build', ['copy:build', 'compress:build']); | ||
grunt.registerTask('pre-tag', ['version']); | ||
|
||
grunt.util.linefeed = '\n'; | ||
grunt.util.linefeed = '\n'; | ||
|
||
}; |
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
Oops, something went wrong.