Hooks in WordPress are a way for one piece of code to interact and/or modify another piece of code at specific, pre-defined spots. They are used extensively throughout third-party plugins, themes, and by Core itself.
Pressidium specific WordPress actions
The following actions are defined in our must-use plugin and can be used to implement theme or plugin specific workflows and additional logic when triggered.
Action | Arguments | Description |
|
| Fires after the site was entirely purged from the cache. |
|
| Fires after all sites of the network were entirely purged from cache. |
|
| Fires after one or more posts were automatically purged from the cache (on posts insert/update/delete, comments update, etc.)
This is not triggered when the cache is manually purged. |
|
| Fires after one or more posts were manually purged. |
|
| (Deprecated) Use
Fires after one or more pages were automatically purged from cache from our must-use plugin (on posts insert/update/delete, comments update, etc.). It is not triggered when a manual cache purge is requested via |
|
| (Deprecated) Use
Fires after one or more pages were purged from cache by manually invoking the |
pressidium_site_purged
Fires after the site was entirely purged from cache.
do_action( 'pressidium_site_purged', array $blog_domains )
Parameters
$blog_domains
(array) Mapped domains to purge from cache.
pressidium_network_site_purged
Fires after all sites of the network were entirely purged from cache.
do_action( 'pressidium_network_site_purged', array $blog_domains )
Parameters
$blog_domains
(array) Mapped domains to purge from cache.
pressidium_partial_cache_purged
Fires after one or more posts were automatically purged from the cache (on posts insert/update/delete, comments update, etc.) This is not triggered when the cache is manually purged.
do_action( 'pressidium_partial_cache_purged', array $post_ids, array $domains, array $paths, array $cache_tags )
Parameters
$posts
(array) IDs of the posts (or pages) to purge from the cache.
$domains
(array) Mapped domains to purge from the cache.
$paths
(array) Paths to purge from the cache.
$cache_tags
(array) Cache tags to purge from the cache.
pressidium_partial_cache_purged_manually
Fires after one or more posts were manually purged from the cache.
do_action( 'pressidium_partial_cache_purged_manually', array $domains, array $paths, array $cache_tags )
Parameters
$domains
(array) Domains purged.
$paths
(array) Paths purged.
$cache_tags
(array) Cache tags purged.
Pressidium specific WordPress filters
The following hooks are defined in our must-use plugin and can be used to modify the default behavior.
Filter | Arguments | Description |
|
| Filters the list of cache tags to add to the response. |
|
| Filters the computed paths that are going to be purged from the cache. |
|
| Filters the computed cache tags that are going to be purged from the cache. |
|
| Filters the list of mapped domains a blog may be associated with. |
|
| (Deprecated) Use
Filters the computed paths that are going to be purged from the cache. |
pressidium_cache_tags
Filters the list of cache tags to add to the response.
apply_filters( 'pressidium_cache_tags', array $cache_tags )
Parameters
$cache_tags
(array) The list of cache tags to add.
pressidium_purge_paths
Filters the computed paths that are going to be purged.
apply_filters( 'pressidium_purge_paths', array $paths, array $post_ids )
Parameters
$paths
(array) Paths to be purged.
$post_ids
(array) IDs of the posts (or pages) to be purged.
pressidium_purge_cache_tags
Filters the computed cache tags that are going to be purged.
apply_filters( 'pressidium_purge_cache_tags', array $cache_tags, array $post_ids )
Parameters
$cache_tags
(array) Cache tags to be purged.
$post_ids
(array) IDs of the posts (or pages) to be purged.
pressidium_multisite_mapped_domains
Filters the list of mapped domains a blog may be associated with.
apply_filters( 'pressidium_multisite_mapped_domains', array $mapped_domains, int|null $blog_id )
Parameters
$mapped_domains
(array) Mapped domains.
$blog_id
(int|null) ID of the blog.