Quantcast
Channel: User janh - WordPress Development Stack Exchange
Viewing all articles
Browse latest Browse all 40

Answer by janh for Download external images if post is publish

$
0
0

Scheduled posts don't trigger publish_post, only updating the post itself will do that.

Add an action for future_to_publish, see the reference on post status transitions. I don't believe that you'll have access to the user-object in that case, so you might want to refactor that.

Alternatively, just get the images when the user saves the post, not when it gets published. Use the save_post action.


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>