Open mariusveltan opened 6 years ago
Maybe we can use https://developer.wordpress.org/reference/hooks/query_vars/ or this https://codex.wordpress.org/Plugin_API/Action_Reference/template_redirect to ultimately get rid of this wp-load.php ? we can use something like: http://example.com/?gitium_webhook=1 so that WP is loaded but no content is generated. This way we get rid of the search for wp-load.
Fixes #148 by doing an explode on the webhook script path, with "wp-content/plugins" as delimiter. This way, the WP core root is obtained, regardless whether WP is running in the site webroot, or under a sub-directory in the webroot.