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 purged from 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 purged from the Varnish 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_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.

Did this answer your question?