From 517bf44c9e538372318808b6ea48933e6529c01e Mon Sep 17 00:00:00 2001 From: Nathaniel Taintor Date: Fri, 11 Aug 2017 11:08:23 -0700 Subject: [PATCH 1/4] Fix field type for term_select field in example shortcode We added a term select field to the example plugin, but because the type was set wrong, it isn't actually rendering. This just fixes the field type, so that it's correct in our documentation. --- dev.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.php b/dev.php index dbd5e312..e3ff8e05 100644 --- a/dev.php +++ b/dev.php @@ -199,7 +199,7 @@ function shortcode_ui_dev_advanced_example() { array( 'label' => __( 'Select Tag', 'shortcode-ui-example', 'shortcode-ui' ), 'attr' => 'tag', - 'type' => 'tag_select', + 'type' => 'term_select', 'taxonomy' => 'post_tag', 'multiple' => true, ), From 3b3e98ba7efb88f40eba08039e6c293a63c018f0 Mon Sep 17 00:00:00 2001 From: Nathaniel Taintor Date: Tue, 5 Sep 2017 12:24:14 -0700 Subject: [PATCH 2/4] Remove PHP 5.2 from Travis matrix There's no reason we need to be testing against PHP 5.2, and since it's not pre-installed on Travis any more, it's just causing our tests to error out. Removing that from the matrix and adding PHP 7.1, which is actually relevant. --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c06a92f0..4848c657 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,15 +4,13 @@ language: php matrix: include: - - php: 5.2 - env: WP_VERSION=latest WP_MULTISITE=0 WP_TRAVISCI=travis:phpunit - php: 5.6 env: WP_VERSION=latest WP_MULTISITE=0 WP_TRAVISCI=travis:phpunit - - php: 5.6 + - php: 7.1 env: WP_VERSION=latest WP_MULTISITE=1 WP_TRAVISCI=travis:phpunit - php: 5.6 env: WP_TRAVISCI=travis:js-tests - - php: 5.6 + - php: 7.1 env: WP_TRAVISCI=travis:php-lint cache: From 35a00afd6651a18de5473ae1054ae2ce0e8bf488 Mon Sep 17 00:00:00 2001 From: Nathaniel Taintor Date: Tue, 5 Sep 2017 12:44:38 -0700 Subject: [PATCH 3/4] Create empty theme directory for test suite --- bin/install-wp-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 0aaf09f3..fca3639b 100644 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -69,7 +69,7 @@ install_test_suite() { # set up testing suite if it doesn't yet exist if [ ! -d $WP_TESTS_DIR ]; then # set up testing suite - mkdir -p $WP_TESTS_DIR + mkdir -p $WP_TESTS_DIR/data/themedir1 svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes fi From f3b1a4d9d7a06f710951bfd61734de7942d06455 Mon Sep 17 00:00:00 2001 From: Nathaniel Taintor Date: Tue, 5 Sep 2017 12:46:28 -0700 Subject: [PATCH 4/4] Fix phpcs indentation issue --- inc/class-shortcode-ui.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/class-shortcode-ui.php b/inc/class-shortcode-ui.php index 6e08d476..5d7b19e2 100644 --- a/inc/class-shortcode-ui.php +++ b/inc/class-shortcode-ui.php @@ -261,8 +261,8 @@ public function action_admin_enqueue_scripts( $editor_supports ) { ); if ( 'select2' !== self::$select2_handle ) { - wp_add_inline_script( self::$select2_handle, 'var existingSelect2 = jQuery.fn.select2 || null; if (existingSelect2) { delete jQuery.fn.select2; }', 'before' ); - wp_add_inline_script( self::$select2_handle, 'jQuery.fn[ shortcodeUIData.select2_handle ] = jQuery.fn.select2; if (existingSelect2) { delete jQuery.fn.select2; jQuery.fn.select2 = existingSelect2; }', 'after' ); + wp_add_inline_script( self::$select2_handle, 'var existingSelect2 = jQuery.fn.select2 || null; if (existingSelect2) { delete jQuery.fn.select2; }', 'before' ); + wp_add_inline_script( self::$select2_handle, 'jQuery.fn[ shortcodeUIData.select2_handle ] = jQuery.fn.select2; if (existingSelect2) { delete jQuery.fn.select2; jQuery.fn.select2 = existingSelect2; }', 'after' ); } wp_register_style( self::$select2_handle,