This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from spacedmonkey/v2
Menu and menu item endpoints.
- Loading branch information
Showing
16 changed files
with
1,416 additions
and
463 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin"> | ||
<description>Generally-applicable sniffs for WordPress plugins.</description> | ||
|
||
<!-- What to scan --> | ||
<file>.</file> | ||
<exclude-pattern>/vendor/</exclude-pattern> | ||
<exclude-pattern>/node_modules/</exclude-pattern> | ||
<exclude-pattern>/tests/</exclude-pattern> | ||
<exclude-pattern>/lib/class-wp-rest-widgets-controller.php</exclude-pattern> | ||
|
||
<!-- How to scan --> | ||
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage --> | ||
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | ||
<arg value="sp"/> <!-- Show sniff and progress --> | ||
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit --> | ||
<arg name="colors"/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. --> | ||
|
||
<!-- Rules: WordPress Coding Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards --> | ||
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties --> | ||
<config name="minimum_supported_wp_version" value="5.2"/> | ||
<rule ref="WordPress"> | ||
</rule> | ||
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing"> | ||
<properties> | ||
<property name="blank_line_check" value="true"/> | ||
</properties> | ||
</rule> | ||
</ruleset> |
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,85 +1,60 @@ | ||
# Travis CI Configuration File | ||
sudo: false | ||
dist: trusty | ||
|
||
# Tell Travis CI we're using PHP | ||
language: php | ||
|
||
sudo: false | ||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
|
||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: 5.6 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=latest | ||
- php: 5.6 | ||
env: WP_TRAVISCI=travis:phpvalidate | ||
- php: 5.5 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: 5.4 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: 5.3 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: 5.2 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: hhvm | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
- php: 7.0 | ||
env: WP_TRAVISCI=travis:phpunit WP_VERSION=nightly | ||
allow_failures: | ||
- php: hhvm | ||
fast_finish: true | ||
branches: | ||
only: | ||
- master | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
- node_modules | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
# set up WP install | ||
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
# prepare for running the tests | ||
- cd $TRAVIS_BUILD_DIR | ||
- npm install -g npm | ||
- npm install -g grunt-cli | ||
- npm install | ||
- node --version | ||
- npm --version | ||
- grunt --version | ||
matrix: | ||
include: | ||
- php: 7.3 | ||
env: WP_VERSION=latest | ||
- php: 7.2 | ||
env: WP_VERSION=latest | ||
- php: 7.1 | ||
env: WP_VERSION=latest | ||
- php: 7.0 | ||
env: WP_VERSION=latest | ||
- php: 5.6 | ||
env: WP_VERSION=latest | ||
- php: 5.6 | ||
env: WP_VERSION=trunk | ||
- php: 5.6 | ||
env: WP_TRAVISCI=phpcs | ||
dist: precise | ||
|
||
before_script: | ||
# Setup Coveralls | ||
- export PATH="$HOME/.composer/vendor/bin:$PATH" | ||
- composer install | ||
- | | ||
if [[ "$WP_TRAVISCI" == "travis:phpvalidate" ]] ; then | ||
composer self-update | ||
composer install --no-interaction | ||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then | ||
phpenv config-rm xdebug.ini | ||
else | ||
echo "xdebug.ini does not exist" | ||
fi | ||
# Setup Coveralls | ||
- | | ||
if [[ "$WP_TRAVISCI" == "travis:codecoverage" ]] ; then | ||
composer self-update | ||
composer install --no-interaction | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION | ||
fi | ||
script: | ||
- grunt $WP_TRAVISCI | ||
|
||
after_script: | ||
# Push coverage off to Codecov | ||
- | | ||
if [[ "$WP_TRAVISCI" == "travis:codecoverage" ]] ; then | ||
bash <(curl -s https://codecov.io/bash) | ||
fi | ||
git: | ||
depth: 1 | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: change | ||
- | | ||
if [[ ! -z "$WP_VERSION" ]] ; then | ||
vendor/bin/phpunit | ||
WP_MULTISITE=1 vendor/bin/phpunit | ||
fi | ||
- | | ||
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then | ||
vendor/bin/phpcs | ||
fi |
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 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 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.