本文档介绍了 WordPress 核心中 NUX(新用户体验)数据的相关功能,包括选择器和动作,用于管理用户引导提示和指南的显示状态。
Namespace: core/nux.
Returns whether or not tips are globally enabled.
Parameters
Object: Global application state.Returns
boolean: Whether tips are globally enabled.Returns an object describing the guide, if any, that the given tip is a part of.
Parameters
Object: Global application state.string: The tip to query.Returns
?NUXGuideInfo: Information about the associated guide.Determines whether or not the given tip is showing. Tips are hidden if they are disabled, have been dismissed, or are not the current tip in any guide that they have been added to.
Parameters
Object: Global application state.string: The tip to query.Returns
boolean: Whether or not the given tip is showing.Returns an action object that, when dispatched, prevents all tips from showing again.
Returns
Object: Action object.Returns an action object that, when dispatched, dismisses the given tip. A dismissed tip will not show again.
Parameters
string: The tip to dismiss.Returns
Object: Action object.Returns an action object that, when dispatched, makes all tips show again.
Returns
Object: Action object.Returns an action object that, when dispatched, presents a guide that takes the user through a series of tips step by step.
Parameters
string[]: Which tips to show in the guide.Returns
Object: Action object.