Skip to content

Instantly share code, notes, and snippets.

@filipslavik
filipslavik / functions.php
Last active June 20, 2017 07:18
Pressidium Cache Functions
<?php
public function purgeSite() {
if ( class_exists('Ninukis_Plugin') && Ninukis_Plugin::isCachingEnabled() ) {
return NinukisCaching::get_instance()->purgeAllCaches();
} else {
return TRUE;
}
}
@filipslavik
filipslavik / gist:6c5330f0083e89897cf3
Created June 5, 2015 19:30
delete un-attached images
<?php
$args = array(
'author' => 3,
'post_status' => 'any',
'post_mime_type'=>'image',
'post_type' => 'attachment',
'nopaging' => true,
'post_parent' => 0,
'date_query' => array('before' => '-10 day'),