Skip to content

Commit

Permalink
Merge pull request #695 from valendesigns/develop
Browse files Browse the repository at this point in the history
OptionTree version 2.7.0
  • Loading branch information
valendesigns authored Apr 16, 2019
2 parents 1f65d80 + ac9c710 commit 5a45213
Show file tree
Hide file tree
Showing 46 changed files with 17,740 additions and 21,093 deletions.
4 changes: 4 additions & 0 deletions .dev-lib
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DEFAULT_BASE_BRANCH=develop
PHPCS_IGNORE='vendor/*,tests/wp-tests/*,assets/theme-mode/*'
CHECK_SCOPE=patches
DEV_LIB_SKIP=phpunit
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.min.js
**/node_modules/**
**/vendor/**
156 changes: 156 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
{
"env": {
"browser": true
},
"globals": {
"_": false,
"Backbone": false,
"jQuery": false,
"wp": false
},
"rules": {
"accessor-pairs": [2],
"block-scoped-var": [2],
"callback-return": [2],
"complexity": [2, 8],
"consistent-return": [2],
"consistent-this": [2, "self"],
"constructor-super": [2],
"default-case": [2],
"eqeqeq": [2],
"func-style": [0],
"global-require": [2],
"guard-for-in": [0],
"handle-callback-err": [2, "^err(or)?$"],
"id-length": [0],
"id-match": [0],
"indent": ["error", "tab"],
"init-declarations": [0],
"max-depth": [2, 3],
"max-nested-callbacks": [2, 3],
"max-params": [2, 4],
"max-statements": [0],
"new-parens": [0],
"no-alert": [0],
"no-array-constructor": [0],
"no-bitwise": [0],
"no-caller": [2],
"no-case-declarations": [2],
"no-catch-shadow": [2],
"no-class-assign": [2],
"no-cond-assign": [2],
"no-console": [0],
"no-const-assign": [2],
"no-constant-condition": [0],
"no-continue": [0],
"no-control-regex": [2],
"no-debugger": [2],
"no-delete-var": [2],
"no-div-regex": [0],
"no-dupe-args": [2],
"no-dupe-class-members": [2],
"no-dupe-keys": [2],
"no-duplicate-case": [2],
"no-else-return": [0],
"no-empty-character-class": [2],
"no-empty-pattern": [2],
"no-empty": [2],
"no-eq-null": [2],
"no-eval": [2],
"no-ex-assign": [2],
"no-extend-native": [0],
"no-extra-bind": [2],
"no-extra-boolean-cast": [2],
"no-extra-parens": [2],
"no-extra-semi": [2],
"no-fallthrough": [2],
"no-floating-decimal": [2],
"no-func-assign": [2],
"no-implicit-coercion": [2],
"no-implicit-globals": [0],
"no-implied-eval": [2],
"no-inline-comments": [0],
"no-inner-declarations": [2],
"no-invalid-regexp": [2],
"no-invalid-this": [0],
"no-irregular-whitespace": [2],
"no-iterator": [2],
"no-label-var": [2],
"no-labels": [0],
"no-lone-blocks": [2],
"no-lonely-if": [2],
"no-loop-func": [2],
"no-magic-numbers": [2, { "ignoreArrayIndexes": true, "ignore": [ -1, 0 ] }],
"no-mixed-requires": [0],
"no-multi-str": [2],
"no-native-reassign": [2],
"no-negated-condition": [0],
"no-negated-in-lhs": [2],
"no-nested-ternary": [0],
"no-new-func": [0],
"no-new-object": [2],
"no-new-require": [0],
"no-new-wrappers": [2],
"no-new": [2],
"no-obj-calls": [2],
"no-octal-escape": [2],
"no-octal": [2],
"no-param-reassign": [2],
"no-path-concat": [2],
"no-plusplus": [0],
"no-process-env": [2],
"no-process-exit": [0],
"no-proto": [2],
"no-redeclare": [2],
"no-regex-spaces": [0],
"no-restricted-imports": [0],
"no-restricted-syntax": [0],
"no-return-assign": [2],
"no-script-url": [0],
"no-self-compare": [2],
"no-sequences": [2],
"no-shadow-restricted-names": [2],
"no-shadow": [2],
"no-sparse-arrays": [2],
"no-sync": [0],
"no-ternary": [0],
"no-trailing-spaces": [2],
"no-this-before-super": [2],
"no-throw-literal": [2],
"no-undef-init": [0],
"no-undef": [2],
"no-undefined": [0],
"no-unneeded-ternary": [2],
"no-unreachable": [2],
"no-unused-expressions": [2],
"no-unused-vars": [2],
"no-use-before-define": [0],
"no-useless-call": [2],
"no-useless-concat": [2],
"no-var": [0],
"no-void": [0],
"no-with": [2],
"object-shorthand": [0],
"one-var": [ 2, "always" ],
"operator-assignment": [2, "always"],
"prefer-arrow-callback": [0],
"prefer-const": [0],
"prefer-reflect": [0],
"prefer-rest-params": [0],
"prefer-spread": [0],
"prefer-template": [0],
"quotes": [0],
"radix": [2, "always"],
"require-yield": [0],
"sort-imports": [0],
"sort-vars": [0],
"strict": [2, "function"],
"use-isnan": [2],
"valid-typeof": [2],
"valid-jsdoc": [2],
"vars-on-top": [0],
"wrap-iife": [2, "inside"],
"wrap-regex": [0],
"yoda": [0]
}
}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store

# PHPUnit
/coverage
/tests/wp-tests

# Composer
/vendor

# NPM
/node_modules
/build
10 changes: 10 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"preset": "wordpress",
"excludeFiles": [
"**/*.min.js",
"**/*.jsx",
"**/node_modules/**",
"**/vendor/**"
],
"requireCamelCaseOrUpperCaseIdentifiers": false
}
3 changes: 3 additions & 0 deletions .jshintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/*.min.js
**/node_modules/**
**/vendor/**
24 changes: 24 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"boss": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"es3": true,
"expr": true,
"immed": true,
"noarg": true,
"nonbsp": true,
"onevar": true,
"quotmark": "single",
"trailing": true,
"undef": true,
"unused": true,
"browser": true,
"globals": {
"_": false,
"Backbone": false,
"jQuery": false,
"JSON": false,
"wp": false
}
}
55 changes: 55 additions & 0 deletions .phpcs.ruleset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<ruleset name="Option Tree">
<description>Custom ruleset for the Option Tree plugin.</description>

<!-- For help in understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- For help in using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->

<!-- What to scan -->
<file>.</file>
<!-- Ignoring Files and Folders:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/tests/wp-tests/*</exclude-pattern>
<exclude-pattern>/assets/theme-mode/*</exclude-pattern>

<!-- How to scan -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="colors"/> <!-- Show results with colors -->
<arg name="basepath" value="."/> <!-- Strip the file paths down to the relevant bit -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/> <!-- Limit to PHP files -->

<!-- Rules: Check PHP version compatibility - see
https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibilityWP"/>

<!-- For help in understanding this testVersion:
https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="5.3-"/>

<!-- Rules: WordPress Coding Standards - see
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
<rule ref="WordPress-Core"/>
<rule ref="WordPress-Docs"/>
<rule ref="WordPress-Extra"/>

<!-- For help in understanding these custom sniff properties:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="4.4"/>

<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="option-tree"/>
<element value="default"/>
</property>
</properties>
</rule>

<!-- Don't complain about file names. -->
<rule ref="WordPress">
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
</rule>
</ruleset>
34 changes: 34 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
language: php

sudo: false

dist: precise

notifications:
email:
on_success: never
on_failure: change

cache:
directories:
- vendor
- $HOME/phpunit-bin

php:
- 5.6
- 7.3

env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1

install:
- composer install
- export DEV_LIB_PATH=vendor/xwp/wp-dev-lib/scripts
- source "$DEV_LIB_PATH/travis.install.sh"

script:
- source "$DEV_LIB_PATH/travis.script.sh"

after_script:
- source "$DEV_LIB_PATH/travis.after_script.sh"
55 changes: 55 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* global module */
/* jshint node:true */
module.exports = function( grunt ) {
'use strict';

grunt.initConfig( {

// Build a deploy-able plugin
copy: {
build: {
src: [
'!.*',
'!.*/**',
'assets/**',
'includes/**',
'composer.json',
'LICENSE',
'ot-loader.php',
'readme.txt'
],
dest: 'build',
expand: true,
dot: true
}
},

// Clean up the build
clean: {
build: {
src: [ 'build' ]
}
},

// Deploys a git Repo to the WordPress SVN repo
wp_deploy: {
deploy: {
options: {
plugin_slug: 'option-tree',
build_dir: 'build'
}
}
}
} );

// Load tasks
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-wp-deploy' );

grunt.registerTask( 'deploy', [
'copy',
'wp_deploy',
'clean'
] );
};
Loading

0 comments on commit 5a45213

Please sign in to comment.