Actions
Example: mmwp_support_booted
add_action( 'mmwp_support_booted', function ( $version, $path ) {
// Your code.
}, 10, 2 );
Action
Since 1.0.0
Fires after the winning copy of the package has booted.
Parameters of mmwp_support_booted | Name | Type | Description |
$version | string | Booted package version. |
$path | string | Directory of the booted copy. |
Fired in src/Kernel.php#L175↗(opens in a new tab) (Kernel::start()).
Filters
Example: mmwp_support_action_link
add_filter( 'mmwp_support_action_link', function ( $enabled, $slug ) {
// Change $enabled here.
return $enabled;
}, 10, 2 );
Filter
Since 1.0.0
Filters whether a plugin gets the "Support" action link.
Parameters of mmwp_support_action_link | Name | Type | Description |
$enabled | bool | Default true. |
$slug | string | Plugin slug. |
Fired in src/Config.php#L157↗(opens in a new tab) (Config::action_link_enabled()).
Filter
Since 1.0.0
Filters whether `site-report-<host>-<date>.json` is attached to the email.
Parameters of mmwp_support_attach_report | Name | Type | Description |
$attach | bool | Default true. |
$slug | string | Plugin slug. |
Fired in src/Config.php#L118↗(opens in a new tab) (Config::attach_report()).
Filter
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 | Name | Type | Description |
$values | array<string,mixed> | Resolved branding values. |
$mode | string | mammoth, neutral, vendor or whitelabel. |
Fired in src/Kernel.php#L243↗(opens in a new tab) (Kernel::branding()).
Filter
Since 1.0.0
Filters the capability required for the Support screen and operations.
Parameters of mmwp_support_capability | Name | Type | Description |
$capability | string | Capability, default `manage_options`. |
$network | bool | True for the network admin screen. |
Fired in src/Config.php#L65↗(opens in a new tab) (Config::capability()).
Filter
Since 1.0.0
Filters the support recipient for a plugin. Wins over the constant, the array and the JSON file.
Parameters of mmwp_support_email | Name | Type | Description |
$email | string | Resolved address so far. |
$slug | string | Plugin slug. |
Fired in src/Plugin_Factory.php#L111↗(opens in a new tab) (Plugin_Factory::email()).
Filter
Since 1.0.0
Filters the canonical Support screen location. Wins over the constant and the default.
Parameters of mmwp_support_menu | Name | Type | Description |
$location | string|null | Null (no override) or toplevel|tools|settings|hidden|parent:<menu-slug>. |
$default | string | The location the package would use without an override. |
Fired in src/Kernel.php#L211↗(opens in a new tab) (Kernel::location()).
Filter
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 | Name | Type | Description |
$icon | string | Data URI or dashicon name. |
Fired in src/Kernel.php#L272↗(opens in a new tab) (Kernel::icon()).
Filter
Since 1.0.0
Filters the position of the top-level menu.
Parameters of mmwp_support_menu_position | Name | Type | Description |
$position | int | Default 80. |
Fired in src/Config.php#L136↗(opens in a new tab) (Config::menu_position()).
Filter
Since 1.0.0
Filters the send rate limit (per user).
Parameters of mmwp_support_rate_limit | Name | Type | Description |
$limit | array{max:int,window:int} | Max sends and window in seconds. |
$user_id | int | User id. |
Fired in src/Config.php#L91↗(opens in a new tab) (Config::rate_limit()).
Filter
Since 1.0.0
Filters the report sections. Add a `Section_Interface` object. Contract: no secrets; redaction runs over everything, but do not rely on it.
Parameters of mmwp_support_report_sections | Name | Type | Description |
$sections | Section_Interface[] | Sections in output order. |
Fired in src/Report/Report_Builder.php#L112↗(opens in a new tab) (Report_Builder::all_sections()).
Filter
Since 1.0.0
Filters the email subject.
Parameters of mmwp_support_subject | Name | Type | Description |
$text | string | Formatted subject. |
$prefix | string | Subject prefix from branding. |
$slug | string | Plugin slug. |
$subject | string | User-entered subject. |
$ref | string | Reference. |
Fired in src/Mail/Ticket_Formatter.php#L74↗(opens in a new tab) (Ticket_Formatter::subject()).
Filter
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 | Name | Type | Description |
$transport | Transport_Interface | Transport. |
Fired in src/Kernel.php#L359↗(opens in a new tab) (Kernel::transport()).