static function drop_cache($id) { $gallery = asg_get_gallery($id); $page = 1; $per_page = $gallery['load_more']['page_size']; while (get_transient($transient_key = ASG_Http_Source::get_transient_key($id, $page, $per_page))) { delete_transient($transient_key); $page += 1; } }
function _edit_form_after_title() { global $post; if ($post->post_type != ASG_POST_TYPE) { return; } $gallery = asg_get_gallery($post); require 'templates/edit-form-after-title.php'; }
function asg_refresh_gallery($options = array()) { if (!isset($options['id'])) { return; } $id = $options['id']; $gallery = new ASG_Gallery($id, asg_get_gallery($id)); $gallery->get_images(1, true); $gallery->get_images(2, true); }