Skip to main content

Filter: gk/foundation/onboarding/products

Declares products that provide onboarding: their tours, checklist, facts and links.

Parameters​

NameTypeDescription
$productsarrayProduct declarations keyed by product slug (lowercase letters, numbers and dashes; not one of RESERVED_SLUGS).
↳ $contractintDeclaration format version. Required.
↳ $namestringProduct name, already translated. Required.
↳ $descriptionstringOne line about the product, already translated. Optional.
↳ $capabilitystring|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.
↳ $iconstringIcon URL. Optional.
↳ $orderintPosition in the product list. Default: 10.
↳ $factscallableReturns what the product knows about this site, as name => scalar or list of scalars, for
↳ $checklistcallableReturns the "your site today" items. Called only when shown. Optional.
↳ $linksarrayList of [ 'label' => string, 'url' => string ]. Optional.
↳ $welcomearray|falseOptional 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.
↳ $toursarrayTours keyed by tour id (lowercase letters, numbers and dashes). At least one unless welcome supplies content. {
↳ $namestringTour name, already translated. Required.
↳ $descriptionstringOne line about the tour. Optional.
↳ $screenstringThe screen's name, for "On Manage Your Kit". Optional.
↳ $screensarrayWhere the tour runs: a list of matchers with any of page, base, post_type, id. Optional; a tour with none is a demo only.
↳ $urlstringAddress of the screen the tour runs on. Optional.
↳ $contentcallableReturns the tour content (steps, elements, ready, recording). Called only when shown. Required.
↳ $startarrayHow the tour is offered: how (link, invite or open), style (pill, card or title), label, body, unless (a check). Optional; default link.
↳ $orderintPosition among the product's tours. Default: 10.

Since​

  • TBD: TBD

Source​

Defined in Onboarding/Registry.php at line 103