mycred_flush_widget_cache
Description
Wrapper function for wp_cache_delete for deleting widget caches. Used when myCRED widget settings are saved.
Available since version 1.0
Returns
void
Parameters
| Param | Type | Required | Description | |
|---|---|---|---|---|
function mycred_flush_widget_cache( |
||||
$id |
string | Yes | The widget ID to flush. |
|
) { ... } |
||||
) { ... } Examples
Example 1: Flush the cache for a widget with the ID “mycred_widget“.
mycred_flush_widget_cache( 'mycred_widget' );