Darkify 2.2.9 has 11 actions and 11 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Darkify fires an action
add_action( 'darkify_after_cache_purge', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Darkify is about to use
add_filter( 'darkify_exclude_from_cache', function( $enabled ) {
// Change $enabled here.
return $enabled;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * The same filter/actions the retired options framework fired around a save, * with the same names and argument order, so anything hooked into them keeps * working. The second argument used to be the framework instance; it is now * this controller — callbacks in the wild use the `$data` array, which is * unchanged. */ apply_filters( "darkify_{$key}_save", $data, $this ); -
/** * Fires after Darkify asked page caches to purge. Hook in here for a cache * layer not covered above (CDN, host cache, ...). */ do_action( 'darkify_after_cache_purge' ); -
/** * Filters whether Darkify's scripts are excluded from cache/optimization * plugins. */ apply_filters( 'darkify_exclude_from_cache', $enabled ); -
/** * Filters whether Darkify purges page caches after its settings change. */ apply_filters( 'darkify_purge_cache_on_settings_change', true ); -
apply_filters( 'darkify_dev_mode', false ); -
apply_filters( "{$this->client->slug}_tracker_data", $data ); -
apply_filters( 'appsero_custom_deactivation_reasons', [] ); -
apply_filters( 'appsero_endpoint', 'https://api.appsero.com' ); -
apply_filters( 'appsero_is_local', $is_local ); -
do_action( 'breeze_clear_all_cache' ); -
do_action( 'cache_enabler_clear_complete_cache' ); -
do_action( "darkify_{$key}_save_after", $data, $this ); -
do_action( "darkify_{$key}_save_before", $data, $this ); -
do_action( "darkify_{$key}_saved", $data, $this ); -
apply_filters( 'darkify_cache_exclusion_attributes', $attributes ); -
do_action( 'darkify_loaded' ); -
apply_filters( 'darkify_switch_label', __('Dark mode', 'darkify'), $type ); -
apply_filters( 'darkify_ui_permission', $args['menu_capability'] ?? 'manage_options' ); -
do_action( 'litespeed_control_set_nocache', 'Darkify live preview' ); -
do_action( 'litespeed_purge_all' ); -
do_action( 'rt_nginx_helper_purge_all' ); -
do_action( 'wphb_clear_page_cache' );
Generated from Darkify's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: