Filter: gk/foundation/onboarding/products
Declares products that provide onboarding: their tours, checklist, facts and links.
Parameters
| Name | Type | Description |
|---|---|---|
| $products | array | Product declarations keyed by product slug (lowercase letters, numbers and dashes; not one of RESERVED_SLUGS). |
| ↳ $contract | int | Declaration format version. Required. |
| ↳ $name | string | Product name, already translated. Required. |
| ↳ $description | string | One line about the product, already translated. Optional. |
| ↳ $capability | string|string[] | One capability, or a list of which any one grants, to see this product's onboarding. With Gravity Forms active, gform_full_access counts for any gravityforms_ capability. Required. |
| ↳ $icon | string | Icon URL. Optional. |
| ↳ $order | int | Position in the product list. Default: 10. |
| ↳ $facts | callable | Returns what the product knows about this site, as name => scalar or list of scalars, for |
| ↳ $checklist | callable | Returns the "your site today" items. Called only when shown. Optional. |
| ↳ $links | array | List of [ 'label' => string, 'url' => string ]. Optional. |
| ↳ $welcome | array|false | Optional Welcome presentation; false hides the product only on Welcome. Anything else is reported and treated as absent. See Welcome::sanitize() and docs/onboarding-api.md. |
| ↳ $tours | array | Tours keyed by tour id (lowercase letters, numbers and dashes). At least one unless welcome supplies content. { |
| ↳ $name | string | Tour name, already translated. Required. |
| ↳ $description | string | One line about the tour. Optional. |
| ↳ $screen | string | The screen's name, for "On Manage Your Kit". Optional. |
| ↳ $screens | array | Where the tour runs: a list of matchers with any of page, base, post_type, id. Optional; a tour with none is a demo only. |
| ↳ $url | string | Address of the screen the tour runs on. Optional. |
| ↳ $content | callable | Returns the tour content (steps, elements, ready, recording). Called only when shown. Required. |
| ↳ $start | array | How the tour is offered: how (link, invite or open), style (pill, card or title), label, body, unless (a check). Optional; default link. |
| ↳ $order | int | Position among the product's tours. Default: 10. |
Since
- TBD: TBD
Source
Defined in Onboarding/Registry.php at line 103