Skip to main content
7 events
when toggle format what by license comment
Jul 3, 2020 at 10:26 vote accept GeeC
Jul 1, 2020 at 11:21 answer added GeeC timeline score: 0
Jul 1, 2020 at 10:26 comment added mozboz It's also another option to trigger long running scripts from the command line, using PHP and a call to your plugin directly, instead of starting the call via a http request, if you have ssh access, using e.g. wp-cli eval-file. This can be really handy in some cases and can be integrated with your local cron if you want to e.g. trigger the job to run regularly
Jul 1, 2020 at 7:29 comment added GeeC @SallyCJ, thank you. You are absolutely correct! If I add a nopriv hook, it works. But that is not great because I need the user to be authenticated. I will look into authenticating the request and also at the REST API.
Jul 1, 2020 at 7:01 comment added Sally CJ Sorry, what I actually meant in my previous comment is, admin_post_my_action runs only for logged-in users, so your remote call likely didn't call your function because the request wasn't authenticated. But how about using the REST API instead, by creating your own endpoint?
Jul 1, 2020 at 6:28 history edited GeeC CC BY-SA 4.0
added 68 characters in body; edited tags
Jul 1, 2020 at 6:03 history asked GeeC CC BY-SA 4.0