Skip to main content
Pressidium specific WordPress actions and filters

Actions and hooks in use by our MU (Must-use) plugin.

T
Written by Team Pressidium
Updated over a week ago

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 MU plugin and can be used to implement theme or plugin specific workflows and additional logic when triggered.

Action

Arguments

Description

pressidium_site_purged

$blog_domains

Fires after the site was entirely purged from the cache.

pressidium_network_site_purged

$blog_domains

Fires after all sites of the network were entirely purged from cache.

pressidium_page_purged

$posts, $domains, $paths

Fires after one or more pages were automatically purged from cache from our MU plugin (on posts insert/update/delete, comments update etc.). It is not triggered when a manual cache purge is requested via NinukisCaching::purge_cache().

pressidium_page_paths_purged

$domains, $paths

Fires after one or more pages were purged from cache by manually invoking the NinukisCaching::purge_cache() method.


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_page_purged

Fires after one or more pages were automatically purged from cache from our MU plugin (on posts insert/update/delete, comments update etc.). It is not triggered when a manual cache purge is requested via NinukisCaching::purge_cache().

do_action( 'pressidium_page_purged', array $posts, array $domains, array $paths )

Parameters

$posts

(array) IDs of the posts/pages to purge from cache.

$domains
(array) Mapped domains to purge from cache.

$paths

(array) Paths to purge from cache (formatted like ^/my-path/).


pressidium_page_paths_purged

Fires after one or more pages were purged from cache by manually invoking the NinukisCaching::purge_cache() method.

do_action( 'pressidium_page_paths_purged', array $domains, array $paths )

Parameters

$domains

(array) Domains purged.

$paths

(array) Paths purged.

Pressidium specific WordPress filters

The following hooks are defined in our MU plugin and can be used to modify the default behavior.

Filter

Arguments

Description

pressidium_purge_page_cache

$paths, $posts

Filters computed paths that are going to be purged from cache.

pressidium_multisite_mapped_domains

$mapped_domains, $blog_id

Filters the list of mapped domains a blog may be associated with.

pressidium_purge_page_cache

Filters computed paths that are going to be purged.

apply_filters( 'pressidium_purge_page_cache', array $paths, array $posts )

Parameters

$paths
(array) Paths to be purged.

$posts
(array) IDs of the posts/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.

Did this answer your question?