Skip to content

Commit

Permalink
Merge branch 'selective_kron' into 'beta'
Browse files Browse the repository at this point in the history
selektive kron

See merge request WordPress/plugin-hacks!16
  • Loading branch information
Helmut Januschka committed Aug 27, 2019
2 parents 1343f1f + 992f091 commit a4cdced
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ 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 (apply_filters('krn_is_rest_api_request', false)) {
return false;
}

return true;
});

//Elastic Search
//Reformat the query to support wildcards and order by date
add_filter('ep_formatted_args', [$this, 'ep_formatted_args'], 1, 1);
Expand Down

0 comments on commit a4cdced

Please sign in to comment.