Mawu Dark Mode for the Admin Dashboard, Editor & Website icon
Admin & Maintenance

Mawu Dark Mode for the Admin Dashboard, Editor & Website hooks reference

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.

functions.phpyour child theme
// 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

  • includes/class-mawu-settings.php line 921 · used in 5 places
    /**
     * This action is documented in render_studio().
     */
    do_action( 'mawu_hub_after_section', 'people' );
  • includes/class-mawu-settings.php line 286
    /**
     * Filters the name used for the Settings menu item, the page title and the hub
     * heading.
     */
    apply_filters( 'mawu_brand_name', $default );
  • includes/class-mawu-schedule.php line 234
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 2088
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 224
    /**
     * 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() );
  • includes/class-mawu-frontend.php line 202
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 1907
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 1576
    /**
     * 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() );
  • includes/class-mawu-frontend.php line 1398
    /**
     * 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() );
  • includes/class-mawu-frontend.php line 1934
    /**
     * Internal (0.12.0): an add-on's own status line ('' for Free's).
     */
    apply_filters( 'mawu_dm_frontend_status', '', $settings, $theme );
  • includes/class-mawu-color-scheme.php line 129
    /**
     * Filters whether Mawu darkens an editing surface. Default false: the
     * Customizer and page builders stay light.
     */
    apply_filters( 'mawu_editing_dark', false, $surface );
  • includes/class-mawu-palette.php line 1039
    /**
     * 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 );
  • includes/class-mawu-transfer.php line 159
    /**
     * Filters the settings file before it is downloaded. Pro puts its own settings
     * under `pro`.
     */
    apply_filters( 'mawu_export_data', $data );
  • includes/class-mawu-frontend.php line 591
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 1222
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 901
    /**
     * Filters the frontend dark mode CSS printed in <head>.
     */
    apply_filters( 'mawu_frontend_css', $css, $settings, $info );
  • includes/class-mawu-frontend.php line 1367
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 736
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 539
    /**
     * Filters whether the frontend dark mode runs on this request.
     */
    apply_filters( 'mawu_frontend_enabled', true, $settings );
  • includes/class-mawu-frontend.php line 440
    /**
     * Filters extra parts of the page that are never darkened.
     */
    apply_filters( 'mawu_frontend_exclude', array(), $settings, (bool) $for_scripts );
  • includes/class-mawu-frontend.php line 2120
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 2078
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 2132
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 1274
    /**
     * 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 );
  • includes/class-mawu-frontend-extras.php line 124
    /**
     * Filters the brightness photos get in dark mode (1 = untouched).
     */
    apply_filters( 'mawu_frontend_image_dim', max( 50, min( 100, $pct ) ) / 100 );
  • includes/class-mawu-frontend.php line 1078
    /**
     * Filters extra light-to-dark image swaps.
     */
    apply_filters( 'mawu_frontend_image_swap', array(), $settings );
  • includes/class-mawu-frontend.php line 333
    /**
     * 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() );
  • includes/class-mawu-frontend-preview.php line 429
    /**
     * Fires in the hub preview's toolbar, after the width buttons. Print
     * `type="button"` controls without a `name`.
     */
    do_action( 'mawu_frontend_preview_tools' );
  • includes/class-mawu-frontend.php line 1388
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 480
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 1003
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 464
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 926
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 163
    /**
     * 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 );
  • includes/class-mawu-frontend-switch.php line 305
    /**
     * 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() );
  • includes/class-mawu-frontend-maps.php line 310
    /**
     * Filters the classic-theme variable maps the frontend dark mode uses.
     */
    apply_filters( 'mawu_frontend_theme_maps', $maps );
  • includes/class-mawu-frontend.php line 256
    /**
     * 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' ), ) );
  • includes/class-mawu-settings.php line 1140
    /**
     * 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 );
  • includes/class-mawu-settings.php line 1203
    /**
     * 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 );
  • includes/class-mawu-settings.php line 1383
    /**
     * 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 );
  • includes/class-mawu-settings.php line 1456
    /**
     * 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' );
  • includes/class-mawu-settings.php line 2036
    /**
     * 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 );
  • includes/class-mawu-settings.php line 1475
    /**
     * 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' );
  • includes/class-mawu-transfer.php line 379
    /**
     * 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 );
  • includes/class-mawu-palette.php line 1191
    /**
     * Filters the hub's theme collections: id => array{label, keys}.
     */
    apply_filters( 'mawu_palette_collections', $collections, self::all() );
  • includes/class-mawu-palette.php line 278
    /**
     * Filters one user's palette for a theme before it becomes CSS.
     */
    apply_filters( 'mawu_palette_for_user', $palette, $key, (int) $user_id );
  • includes/class-mawu-palette.php line 126
    /**
     * 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 );
  • includes/class-mawu-frontend.php line 115
    /**
     * Filters the suggested privacy policy text (HTML paragraphs, already
     * escaped).
     */
    apply_filters( 'mawu_privacy_policy_text', $text );
  • includes/class-mawu-quick-switch.php line 93
    /**
     * 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 );
  • includes/class-mawu-schedule.php line 526
    /**
     * 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 );
  • includes/class-mawu-schedule.php line 86
    /**
     * 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 );
  • includes/class-mawu-schedule.php line 299
    /**
     * 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 );
  • includes/class-mawu-settings.php line 1857
    /**
     * 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 );
  • includes/class-mawu-schedule.php line 274
    /**
     * 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 );
  • includes/class-mawu-quick-switch.php line 234
    /**
     * 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 );
  • includes/class-mawu-quick-switch.php line 370
    /**
     * 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 );
  • includes/class-mawu-settings.php line 144
    /**
     * 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 );
  • includes/class-mawu-palette.php line 1499
    /**
     * Filters the theme slugs offered in the pickers.
     */
    apply_filters( 'mawu_selectable_themes', $keys, (int) $user_id );
  • includes/class-mawu-palette.php line 975
    /**
     * 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 );
  • includes/class-mawu-settings.php line 265
    /**
     * Filters the capability one part of the Mawu hub needs.
     */
    apply_filters( 'mawu_settings_capability', $default, $context );
  • includes/class-mawu-settings.php line 304
    /**
     * Filters whether to show the rating note, the review links and the Free "Mawu
     * Pro" section.
     */
    apply_filters( 'mawu_show_promotions', true );
  • includes/class-mawu-theme-css.php line 141
    /**
     * Filters the stylesheet chosen for one theme and type.
     */
    apply_filters( 'mawu_theme_asset', self::$memo[ $memo ], $type, $key, $palette );
  • includes/class-mawu-palette.php line 1345
    /**
     * 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 );
  • includes/class-mawu-transfer.php line 1100
    /**
     * 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() );
  • includes/class-mawu-frontend-preview.php line 201
    do_action( 'litespeed_control_set_nocache', 'mawu dark mode preview' );
  • mawu-dark-mode.php line 128
    do_action( 'mawu_fs_loaded' );
  • includes/class-mawu-frontend-i18n.php line 99
    do_action( 'wpml_register_single_string', self::CONTEXT, $name, $value );
  • includes/class-mawu-frontend-i18n.php line 122
    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.

Plugin 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 this

Not 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: