Mawu Dark Mode for the Admin Dashboard, Editor & Website 0.13.0 has 16 actions and 53 filters, read directly from its source code on Nov 19, 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 Mawu Dark Mode for the Admin Dashboard, Editor & Website fires an action
add_action( 'mawu_hub_after_section', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value Mawu Dark Mode for the Admin Dashboard, Editor & Website is about to use
add_filter( 'mawu_brand_name', function( $default ) {
// Change $default here.
return $default;
}, 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
-
/** * This action is documented in render_studio(). */ do_action( 'mawu_hub_after_section', 'people' ); -
/** * Filters the name used for the Settings menu item, the page title and the hub * heading. */ apply_filters( 'mawu_brand_name', $default ); -
/** * Filters whether it's dark hours for this user right now. Callbacks should * leave the value alone while Mawu_Schedule::is_snoozed(). */ apply_filters( 'mawu_dark_hours_now', $is_dark, $user_id, $settings ); -
/** * Internal (0.12.0): whole groups after First visit (Mawu Pro's "Your site's * own look"). */ do_action( 'mawu_dm_frontend_after_first', $s, $name ); -
/** * Internal (0.12.0): the mode Mawu paints, 'dark' or 'light'. */ apply_filters( 'mawu_dm_frontend_paint', 'dark', is_array( $settings ) ? $settings : self::get_settings() ); -
/** * Internal (0.12.0): the palette for an add-on that paints the light mode * instead of the dark one (see paint_mode()). */ apply_filters( 'mawu_dm_frontend_palette', $palette, $key, $paint ); -
/** * Internal (0.12.0, not a public hook): the visitor settings were saved. * Mawu_Frontend_I18n registers the switch texts here; Mawu Pro's developer * hooks pass it on as `mawu_frontend_settings_saved`. */ do_action( 'mawu_dm_frontend_saved', $settings, $old ); -
/** * Internal (0.12.0): more scripts mawu-frontend.js waits for (an add-on's * engine helpers, registered by the callback). */ apply_filters( 'mawu_dm_frontend_script_deps', $deps, self::approach() ); -
/** * Internal (0.12.0): the class that writes the twins, a subclass of * Mawu_Frontend_Static for an add-on that paints the light mode. */ apply_filters( 'mawu_dm_frontend_static_class', 'Mawu_Frontend_Static', self::get_settings() ); -
/** * Internal (0.12.0): an add-on's own status line ('' for Free's). */ apply_filters( 'mawu_dm_frontend_status', '', $settings, $theme ); -
/** * Filters whether Mawu darkens an editing surface. Default false: the * Customizer and page builders stay light. */ apply_filters( 'mawu_editing_dark', false, $surface ); -
/** * Filters the admin selectors the dark engine never recolours (with their * content). Each must be valid in Element.closest(). */ apply_filters( 'mawu_engine_skip_selectors', $selectors ); -
/** * Filters the settings file before it is downloaded. Pro puts its own settings * under `pro`. */ apply_filters( 'mawu_export_data', $data ); -
/** * Filters how the site goes dark: 'map' (a theme variable map), 'blocks' * (theme.json presets) or 'engine' (per-element fallback). */ apply_filters( 'mawu_frontend_approach', $info ); -
/** * Filters window.MAWU_FRONTEND, the config the head script and * mawu-frontend.js read (0.12.0). Keys are one letter or two; add new ones, * don't remove Free's. `d` is the start mode ('auto', 'light' or 'dark') * before the visitor's own choice. */ apply_filters( 'mawu_frontend_client_config', $config, $settings, $info ); -
/** * Filters the frontend dark mode CSS printed in <head>. */ apply_filters( 'mawu_frontend_css', $css, $settings, $info ); -
/** * Filters whether Mawu asks Dark Reader to stand down on pages where visitor * dark mode runs (<meta name="darkreader-lock">). */ apply_filters( 'mawu_frontend_darkreader_lock', true, $settings ); -
/** * Filters the drawings in the Frontend panel's Design picker, so an add-on can * draw its own switch designs. Inline SVG or spans only (cleaned with * Mawu_Frontend_Switch::allowed_html()). */ apply_filters( 'mawu_frontend_design_icons', $icons ); -
/** * Filters whether the frontend dark mode runs on this request. */ apply_filters( 'mawu_frontend_enabled', true, $settings ); -
/** * Filters extra parts of the page that are never darkened. */ apply_filters( 'mawu_frontend_exclude', array(), $settings, (bool) $for_scripts ); -
/** * Fires after "Never darken these parts" on the Frontend panel, inside the * form (photo brightness; Pro excludes and dark images). */ do_action( 'mawu_frontend_extra_fields', $s, $name ); -
/** * Fires at the end of the "First visit" group (0.12.0), inside the form, for a * note about an extra choice from `mawu_frontend_modes`. */ do_action( 'mawu_frontend_first_visit', $s, $name ); -
/** * Fires after "Never darken and photos", at the end of the Frontend panel's * list of groups, inside the form. Print whole groups with * Mawu_Frontend::group_start() and group_end() (Pro's Seasonal effects for * visitors does). */ do_action( 'mawu_frontend_groups', $s, $name ); -
/** * Filters extra JavaScript for the first-paint head script (0.12.0), run right * after the config. It sees `w` (window), `d` (document), `c` * (window.MAWU_FRONTEND) and `m` (a mode already decided, or undefined). * Setting `c.r` to a function that returns 'dark', 'light' or '' makes it * decide the mode after the visitor's own dark or light choice (also when they * picked "Auto") and before the site defau... */ apply_filters( 'mawu_frontend_head_js', '', $config ); -
/** * Filters the brightness photos get in dark mode (1 = untouched). */ apply_filters( 'mawu_frontend_image_dim', max( 50, min( 100, $pct ) ) / 100 ); -
/** * Filters extra light-to-dark image swaps. */ apply_filters( 'mawu_frontend_image_swap', array(), $settings ); -
/** * Filters the logo shown in dark mode: an image URL, or '' for none. */ apply_filters( 'mawu_frontend_logo', '', $settings ); -
/** * Filters the extra "First visit" choices of the Frontend panel (0.12.0). The * head script decides such a mode through `c.r` (see `mawu_frontend_head_js`); * without it the device decides, as "auto". */ apply_filters( 'mawu_frontend_modes', array() ); -
/** * Fires in the hub preview's toolbar, after the width buttons. Print * `type="button"` controls without a `name`. */ do_action( 'mawu_frontend_preview_tools' ); -
/** * Filters whether the first-paint dark CSS built from the page's stylesheets * is printed. */ apply_filters( 'mawu_frontend_static_css', in_array( $info['approach'], array( 'engine', 'blocks', 'map' ), true ), $info ); -
/** * Filters markup printed right after one switch button, such as a second * button that belongs with it. Printed as returned: escape everything you add. */ apply_filters( 'mawu_frontend_switch_after', '', $variant, $settings ); -
/** * Fires inside the floating switch fields of the Frontend panel. Fields named * `mawu_frontend[key]` save with the form; clean them in * `mawu_frontend_switch_settings`. Pro's switch colours print here. */ do_action( 'mawu_frontend_switch_fields', $s, $name ); -
/** * Filters the parts of one switch before it is put together. The <button * type="button" data-mawu-toggle aria-pressed> shell is always Free's. */ apply_filters( 'mawu_frontend_switch_markup', $parts, $variant, $settings ); -
/** * Fires in the floating switch fields of the Frontend panel right under the * corner and distance fields, before the size. Print a row (`mg-fr`) with a * label, a description and a `type="button"` control without a `name`. Pro's * "Drag to position" row prints here. */ do_action( 'mawu_frontend_switch_place', $s, $name ); -
/** * Filters the cleaned visitor settings, so Pro can add (and clean) its own * switch keys. Free's keys always win. */ apply_filters( 'mawu_frontend_switch_settings', $out, $input ); -
/** * Filters the extra keys a settings file's `frontend` block may set. Types: * 'bool', 'int', 'choice' or 'text'. Free's keys can't be changed or removed. */ apply_filters( 'mawu_frontend_switch_transfer_fields', array() ); -
/** * Filters the classic-theme variable maps the frontend dark mode uses. */ apply_filters( 'mawu_frontend_theme_maps', $maps ); -
/** * Filters the floating switch designs. Each key becomes the class * `mawu-fe-toggle--{key}` on the switch. */ apply_filters( 'mawu_frontend_toggle_styles', array( 'round' => __( 'Round', 'mawu-dark-mode' ), 'pair' => __( 'Sun beside moon', 'mawu-dark-mode' ), ) ); -
/** * Fires inside the Schedule form, above the set times, for extra fields (a * schedule type, sunset, weekdays). They save with the form; add the matching * mawu_schedule_sanitize filter. */ do_action( 'mawu_hours_fields', $user_id, $schedule ); -
/** * Fires after the Editors group's own rows, inside the admin options form, so * more rows can join the group. */ do_action( 'mawu_hub_editor_rows', $settings ); -
/** * Filters the "More settings" rows, so Pro can add Theme builder, Seasonal * effects, Site controls and Agency between Schedule and Tools. Each row: * `title`, `summary` (one live line), `render` (callable that prints the * panel's rows), and optional `wide` and `pro` (true, or 'agency' for the * Agency badge). */ apply_filters( 'mawu_hub_more_settings', $rows ); -
/** * Fires at the end of the Tools panel, so an add-on can put a section there. * Output lands inside #mawu-app (.mawu-true-color); use the hub's own markup * (`mg-section`, `mg-opt` rows). */ do_action( 'mawu_hub_page_sections', 'tools' ); -
/** * Filters what the Admin section's drawn preview is drawn with, so Pro can * pass the person's intensity and OLED black. Keys: any * Mawu_Hub_Preview::render() argument (`intensity` 0-100, `oled` bool, * `caption`), plus `when`: the sentences under the drawing keyed by the "When * to use dark mode" choice (choice, hours, device), so an add-on can say "at * sunset" for its own schedules. */ apply_filters( 'mawu_hub_preview_args', $args, $preview, $saved ); -
/** * Mawu Pro features add their own sections here (Tools page), before the "Mawu * Pro" block. Kept for add-ons written before 0.11.0's pages; new code should * use `mawu_hub_page_sections`. */ do_action( 'mawu_hub_pro_sections' ); -
/** * Filters the rows an import reports, after Free has handled (and, unless this * is a dry run, written) its own settings. Pro reads $data['pro'], validates * it, adds its rows and writes when $dry_run is false. Return a WP_Error to * stop with a message. */ apply_filters( 'mawu_import_data', $rows, $data, (bool) $dry_run ); -
/** * Filters the hub's theme collections: id => array{label, keys}. */ apply_filters( 'mawu_palette_collections', $collections, self::all() ); -
/** * Filters one user's palette for a theme before it becomes CSS. */ apply_filters( 'mawu_palette_for_user', $palette, $key, (int) $user_id ); -
/** * Filters the registered themes: an array of scheme slug => full palette * (every Mawu_Palette::TOKENS entry, colors as "#rrggbb"). The result is * memoised per request (reset() clears it). */ apply_filters( 'mawu_palette_themes', $builtin ); -
/** * Filters the suggested privacy policy text (HTML paragraphs, already * escaped). */ apply_filters( 'mawu_privacy_policy_text', $text ); -
/** * Filters whether the quick switch is offered to a user on a screen. * $screen_id is empty outside a normal admin screen (admin-ajax and admin-post * requests), so only the user-wide part of a rule applies there. */ apply_filters( 'mawu_quick_switch_available', true, $user_id, $screen_id ); -
/** * Filters the schedule about to be stored, so extra fields (sunset, weekdays) * are saved with it. Callbacks must sanitise what they add and keep the four * keys above. The profile screen posts none of the extra fields: keep what is * already stored for $user_id then. */ apply_filters( 'mawu_schedule_sanitize', $clean, $input, (int) $user_id ); -
/** * Filters one user's schedule settings (Pro adds sunset and weekday rules * here). The four keys above are always kept. */ apply_filters( 'mawu_schedule_settings', $settings, $user_id ); -
/** * Filters the plain sentence describing a user's schedule right now. Sunset * and weekday schedules replace it with their own next change. */ apply_filters( 'mawu_schedule_status', self::set_times_sentence( $user_id, $settings ), $user_id, $settings ); -
/** * Filters the one-line summary of the user's schedule under the hub title (set * times by default), while the schedule is not dark right now. */ apply_filters( 'mawu_schedule_summary', $summary, $user_id, $schedule ); -
/** * Filters when this user's current dark-hours window ends (the quick switch * snoozes the schedule until then). Sunset and weekday schedules know their * own end; the set end time above is only right for plain daily hours. */ apply_filters( 'mawu_schedule_window_end', $end->getTimestamp(), $user_id, $settings ); -
/** * Filters what quick-switch.js repaints from for one scheme. Extra keys are * passed through to the script: `globals` (an object of MAWU_* values set on * window before the dark engine starts) and `refresh` (true repaints even if * the scheme did not change). */ apply_filters( 'mawu_scheme_payload', $payload, $key ); -
/** * Filters what the quick switch's cache key is made from. Add anything a * `mawu_scheme_payload` callback reads, so a change to it is never answered * from a browser's cached copy. */ apply_filters( 'mawu_scheme_payload_rev', $parts, $user_id ); -
/** * Filters the options Mawu keeps present and autoloaded because they are read * on every request. Only add options whose readers treat a missing option like * an empty array. */ apply_filters( 'mawu_seed_options', self::SEED_OPTIONS ); -
/** * Filters the theme slugs offered in the pickers. */ apply_filters( 'mawu_selectable_themes', $keys, (int) $user_id ); -
/** * Filters the semantic layer: role => CSS selectors. Roles are keys of * Mawu_Palette::semantic_colors() (danger, success, warning, error, info). * Selectors are joined inside :is(), so each must be valid there. */ apply_filters( 'mawu_semantic_selectors', $selectors ); -
/** * Filters the capability one part of the Mawu hub needs. */ apply_filters( 'mawu_settings_capability', $default, $context ); -
/** * Filters whether to show the rating note, the review links and the Free "Mawu * Pro" section. */ apply_filters( 'mawu_show_promotions', true ); -
/** * Filters the stylesheet chosen for one theme and type. */ apply_filters( 'mawu_theme_asset', self::$memo[ $memo ], $type, $key, $palette ); -
/** * Filters a theme's shown name. The key, the palette and the stylesheets keep * their own names. */ apply_filters( 'mawu_theme_label', $label, $key, $context ); -
/** * Filters the names the import preview shows for settings keys. Add names for * the keys you add to the `frontend` block. Free's names can't be changed. */ apply_filters( 'mawu_transfer_labels', array() ); -
do_action( 'litespeed_control_set_nocache', 'mawu dark mode preview' ); -
do_action( 'mawu_fs_loaded' ); -
do_action( 'wpml_register_single_string', self::CONTEXT, $name, $value ); -
apply_filters( 'wpml_translate_single_string', $value, self::CONTEXT, $names[ $key ] );
Generated from Mawu Dark Mode for the Admin Dashboard, Editor & Website'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: