This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import Image and set as Featured image from an ACF custom field URL: custom_field_name | |
// Import is done when the post is visited and logged in as admin | |
// so you can process and test one by one | |
function does_file_exists($filename) { | |
global $wpdb; | |
$data = $wpdb->get_results( "SELECT post_id FROM {$wpdb->postmeta} WHERE meta_value LIKE '%/$filename'" ); | |
foreach ($data as $ID){ | |
$ID = $ID->post_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h1 style="margin-bottom:2000px" >Scroll down to trigger the image load.</h1> | |
<iframe src="https://davidwalsh.name/" loading="lazy" onload="alert('Loaded!');" /> | |
</body> | |
</html> |