presslabs / gitium

Keep all your WordPress code on git with a simple plugin and a repo
https://www.presslabs.com/code/gitium/
GNU General Public License v2.0
180 stars 31 forks source link

Implement fix to issue requesting wp-load.php #158

Open mariusveltan opened 6 years ago

mariusveltan commented 6 years ago

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.

cristianuibar commented 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.