Skip to content

Instantly share code, notes, and snippets.

@viruthagiri
Created May 19, 2016 13:03
Show Gist options
  • Save viruthagiri/93ca4322752027eccaee158859541c55 to your computer and use it in GitHub Desktop.
Save viruthagiri/93ca4322752027eccaee158859541c55 to your computer and use it in GitHub Desktop.
<?php
//delete dummy image cache
$to_be_deleted = array();
for($i=1; $i<=20; $i++) {
$to_be_deleted[] = "dummy_a".$i."_jpg";
}
for($i=1; $i<=18; $i++) {
$to_be_deleted[] = "dummy_hotels".$i."_jpg";
}
for($i=1; $i<=19; $i++) {
$to_be_deleted[] = "dummy_restaurants".$i."_jpg";
}
foreach($to_be_deleted as $value) {
delete_transient($value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment