support: hooks and filters

1 action and 12 filters, read from the source of support at v1.1.1. Each hook links to the line that fires it.

Actions

Example: mmwp_support_booted

add_action( 'mmwp_support_booted', function ( $version, $path ) {
    // Your code.
}, 10, 2 );

Filters

Example: mmwp_support_action_link

add_filter( 'mmwp_support_action_link', function ( $enabled, $slug ) {
    // Change $enabled here.
    return $enabled;
}, 10, 2 );

Filter

mmwp_support_branding

Since 1.0.0

Filters the resolved branding values (site-owner white-label; wins over everything).

Keys: name, menu_title, page_title, icon, logo_url (local URL only), subject_prefix, ref_prefix, show_powered_by, show_vendor_names.

Parameters of mmwp_support_branding
NameTypeDescription
$valuesarray<string,mixed>Resolved branding values.
$modestringmammoth, neutral, vendor or whitelabel.

Fired in src/Kernel.php#L243(opens in a new tab) (Kernel::branding()).

Filter

mmwp_support_capability

Since 1.0.0

Filters the capability required for the Support screen and operations.

Parameters of mmwp_support_capability
NameTypeDescription
$capabilitystringCapability, default `manage_options`.
$networkboolTrue for the network admin screen.

Fired in src/Config.php#L65(opens in a new tab) (Config::capability()).

Filter

mmwp_support_menu

Since 1.0.0

Filters the canonical Support screen location. Wins over the constant and the default.

Parameters of mmwp_support_menu
NameTypeDescription
$locationstring|nullNull (no override) or toplevel|tools|settings|hidden|parent:<menu-slug>.
$defaultstringThe location the package would use without an override.

Fired in src/Kernel.php#L211(opens in a new tab) (Kernel::location()).

Filter

mmwp_support_menu_icon

Since 1.0.1

Filters the Mammoth WP menu icon (SVG data URI or dashicon name).

Use a 20x20 viewBox, one path, `fill="black"` so WordPress recolours it to the admin scheme.

Parameters of mmwp_support_menu_icon
NameTypeDescription
$iconstringData URI or dashicon name.

Fired in src/Kernel.php#L272(opens in a new tab) (Kernel::icon()).

Filter

mmwp_support_transport

Since 1.0.0

Filters the mail transport. Only MailTransport (wp_mail) ships. Any transport that sends data off-site needs the same explicit user action as the built-in one.

Parameters of mmwp_support_transport
NameTypeDescription
$transportTransport_InterfaceTransport.

Fired in src/Kernel.php#L359(opens in a new tab) (Kernel::transport()).