From 187353cbc895cac7c14e1fd1c5ab80af596166d1 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Tue, 27 Aug 2019 11:23:30 +0200 Subject: [PATCH] up --- .gitlab-ci.yml | 2 +- src/Core.php | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3fc4af5..158e8d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,7 +19,7 @@ Unit Test: script: - composer update - echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini - - bin/install-wp-tests.sh wordpress_test root 'somepw' mysql latest + - bin/install-wp-tests.sh wordpress_test root 'somepw' 127.0.0.1 latest - composer update - phpunit --colors=always --coverage-text=1.txt - grep "Lines:" 1.txt diff --git a/src/Core.php b/src/Core.php index d794c92..436d626 100644 --- a/src/Core.php +++ b/src/Core.php @@ -47,6 +47,14 @@ public function add_actions() // disable for post types add_filter('use_block_editor_for_post_type', '__return_false', 10); + //Disable KMM KRoN in json requests + add_filter('krn_kron_enabled', function () { + if (defined('REST_REQUEST') && REST_REQUEST // (#1) + || isset($_GET['rest_route'])) { + return false; + } + }); + //Elastic Search //Reformat the query to support wildcards and order by date add_filter('ep_formatted_args', [$this, 'ep_formatted_args'], 1, 1);