Closed bozzmedia closed 1 year ago
Hi @bozzmedia ,
The _wpnonce
query parameter is required for the request to get through check_admin_referer
.
If not, is there a way to reference the wpnonce cache clearing url in a custom function outside of the plugin?
Though you can construct the URL with the nonce using the same nonce action used in the plugin. But that's not recommended as any parameter name or anything else might change in future which might break your solution.
So, for your requirement-
rt_nginx_helper_purge_all
that you can just do do_action( 'rt_nginx_helper_purge_all' )
and it will purge all the cache.Thanks.
Oh perfect, that's exactly what I need. Thanks so much!
I am trying to make the purge all action more accessible to site editors and was wondering if I simply link to
https://redacted.com/wp-admin/options-general.php?page=nginx&nginx_helper_action=purge&nginx_helper_urls=all
from a dashboard widget, would that clear the cache itself if a user is logged in? If not, is there a way to reference the wpnonce cache clearing url in a custom function outside of the plugin? Thanks for any insight!