function supercache_admin_bar_render() { global $wp_admin_bar, $wp_cache_not_logged_in; if (!is_user_logged_in() && !$wp_cache_not_logged_in) { return false; } if (!wpsupercache_site_admin()) { return false; } $wp_admin_bar->add_menu(array('parent' => '', 'id' => 'delete-cache', 'title' => __('Delete Cache', 'wp-super-cache'), 'href' => wp_nonce_url(admin_url('options-general.php?page=wpsupercache&action=delete&path=' . urlencode($_SERVER['REQUEST_URI'])), 'delete-cache'))); }
function wp_cache_favorite_action($actions) { if (false == wpsupercache_site_admin()) { return $actions; } if (function_exists('current_user_can') && !current_user_can('manage_options')) { return $actions; } $actions[wp_nonce_url('options-general.php?page=wpsupercache&wp_delete_cache=1&tab=contents', 'wp-cache')] = array(__('Delete Cache', 'wp-super-cache'), 'manage_options'); return $actions; }