Skip to content

Commit

Permalink
Merge pull request #42 from wearerequired/40-remove-callout-option
Browse files Browse the repository at this point in the history
Remove Gutenberg callout option for WP 5.0
  • Loading branch information
grappler authored Dec 31, 2018
2 parents 71ac14d + b01f9b2 commit 7c6cf06
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1,712 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vendor (e.g. Composer)
vendor/*
composer.lock

# PHPCS
phpcs.xml
18 changes: 2 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,15 @@ before_install:
- |
composer config --list --global
export PATH=`composer config --list --global | grep '\[home\]' | { read a; echo "${a#* }/vendor/bin:$PATH"; }`
- case "$TRAVIS_PHP_VERSION" in
7.2|7.1|7.0|nightly)
echo "Using PHPUnit 6.x";
composer global require --dev "phpunit/phpunit:~6.5"
;;
5.6|5.5|5.4|5.3)
echo "Using PHPUnit 4.x";
composer global require --dev "phpunit/phpunit:~4.8"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1
;;
esac
install:
- composer install --ignore-platform-reqs
- composer install

before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION

script: phpunit
script: vendor/bin/phpunit

jobs:
fast_finish: true
Expand Down
9 changes: 7 additions & 2 deletions classes/class-wp-widget-disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,12 @@ public function render_dashboard_checkboxes() {
?>
</label>
</p>
<?php if ( version_compare( get_bloginfo( 'version' ), '4.9.8-RC1', '>=' ) ) : ?>
<?php
if (
version_compare( get_bloginfo( 'version' ), '4.9.8-RC1', '>=' ) &&
version_compare( get_bloginfo( 'version' ), '5.0-alpha-43807', '<' )
) :
?>
<p>
<input type="checkbox" id="try_gutenberg_panel" name="rplus_wp_widget_disable_dashboard_option[try_gutenberg_panel]" value="normal"
<?php checked( 'try_gutenberg_panel', ( array_key_exists( 'try_gutenberg_panel', $options ) ? 'try_gutenberg_panel' : false ) ); ?>>
Expand All @@ -659,7 +664,7 @@ public function render_dashboard_checkboxes() {
?>
</label>
</p>
<?php
<?php
endif;
}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=5.3",
"php": ">=5.4",
"wearerequired/wp-requirements-check": "~1.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
"phpunit/phpunit": "~6.5",
"phpunit/phpunit": "~4.8 || ~6.5",
"wp-coding-standards/wpcs": "^0.14.0"
},
"scripts": {
Expand Down
Loading

0 comments on commit 7c6cf06

Please sign in to comment.