Plugin callback page

admin2025-04-19  1

I am trying to create a page in my plugin which will simply act as a callback page for oAuth.

Following the advice on this article: - /

For example, if you are developing your plugin named ‘foo’ on your website ‘example’ and you put your blank oAuth callback file named ‘oauth2callback’ in that plugin folder, the URL you should be able to load into your browser would be ‘’

I've created a page in my custom plugin: /custom-plugin/0auth2callback.php

Checked what my plugin directory URL is:

define( 'PLUGIN_BASE_DIR', plugins_url( '/', __FILE__ ) );
var_dump(PLUGIN_BASE_DIR);

/

So I expected to use:

I simply get a 404 page. The contents of my oauth2callback page is die('test'); I don't see that text.

Note I am using roots.io framework, this is why my plugin directory URL is slightly different to the norm.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745002102a279291.html

最新回复(0)