Convert All images to webp via specific URL
-
Hello Marko,
I am trying to achieve convert all images to webp without having human to login to admin backend and manually click on the Convert All button.
What I did was to register action hook somewhere in the ‘template_redirect’. Something like this:
function temp(){ if($_GET['temp'] === 'a very special unique link that can trigger convert all'){ // user has already login via wp_set_current_user and wp_set_auth_cookie do_action('wp_ajax_w3tc_imageservice_all'); } } add_action('template_redirect', temp);
I think that should work but it isn’t. Looking for some help, thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Convert All images to webp via specific URL’ is closed to new replies.