alo-easymail-admin-preview.php most recent content
-
Hi, when testing a PHP newsletter theme I noticed alo-easymail-admin-preview.php prefers using the post autosave even when the post itself has a more recent version of the content that I wish to preview.
Might be better to use something along the lines of:
$newsletter_autosave = wp_get_post_autosave( $newsletter_id ); $newsletter = get_post($newsletter_id); if($newsletter_autosave && strtotime($newsletter_autosave->post_modified_gmt) > strtotime($newsletter->post_modified_gmt)) { $newsletter = $newsletter_autosave; }Also something I noticed: Autosaves don’t benefit from any content filtering/actions such as ‘content_save_pre’. Autosaves walk a different path than a regular save.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘alo-easymail-admin-preview.php most recent content’ is closed to new replies.