Using a Cron Job to dynamically populate a field ONCE, and then making the field blank the next time someone visits page

I’m gonna attempt an answer here: In your GF code, you’re going to need to have a snippet that checks the hidden field in the db first. IF value is blank.. THEN they are not a winner = Proceed. If value is ‘winner’.. then update value to blank… Proceed with ‘winner’ functionality. In your cron, … Read more

Get filenames of available image sizes

/** *** return_image_thumbnails *** – return a list of thumbnails based on filesystem report. *** @param (string) $image – Original image location. *** @return (array) $results *** @author Oleg Butuzov **/ if (!function_exists(‘return_image_thumbnails’)){ function return_image_thumbnails($image){ $extension = array_pop(explode(‘.’, basename($image))); if (!file_exists($image) || !(@getimagesize($image))) return array(); return glob(dirname($image).”https://wordpress.stackexchange.com/”.basename($image, ‘.’.$extension).’-[0-9]*x[0-9]*.’.$extension); } } usage example return_image_thumbnails(get_attached_file( $image_id ));