WordPress.org

The Editor’s UI Data Edit

Selectors Selectors

getEditorMode getEditorMode

Returns the current editing mode.

Parameters

  • state: Global application state.

Top ↑

isEditorSidebarOpened isEditorSidebarOpened

Returns true if the editor sidebar is opened.

Parameters

  • state: Global application state

Returns

Whether the editor sidebar is opened.

Top ↑

isPluginSidebarOpened isPluginSidebarOpened

Returns true if the plugin sidebar is opened.

Parameters

  • state: Global application state

Returns

Whether the plugin sidebar is opened.

Top ↑

getActiveGeneralSidebarName getActiveGeneralSidebarName

Returns the current active general sidebar name, or null if there is no
general sidebar active. The active general sidebar is a unique name to
identify either an editor or plugin sidebar.

Examples:

  • edit-post/document
  • my-plugin/insert-image-sidebar

Parameters

  • state: Global application state.

Returns

Active general sidebar name.

Top ↑

getPreferences getPreferences

Returns the preferences (these preferences are persisted locally).

Parameters

  • state: Global application state.

Returns

Preferences Object.

Top ↑

getPreference getPreference

Parameters

  • state: Global application state.
  • preferenceKey: Preference Key.
  • defaultValue: Default Value.

Returns

Preference Value.

Top ↑

isPublishSidebarOpened isPublishSidebarOpened

Returns true if the publish sidebar is opened.

Parameters

  • state: Global application state

Returns

Whether the publish sidebar is open.

Top ↑

isEditorPanelRemoved isEditorPanelRemoved

Returns true if the given panel was programmatically removed, or false otherwise.
All panels are not removed by default.

Parameters

  • state: Global application state.
  • panelName: A string that identifies the panel.

Returns

Whether or not the panel is removed.

Top ↑

isEditorPanelEnabled isEditorPanelEnabled

Returns true if the given panel is enabled, or false otherwise. Panels are
enabled by default.

Parameters

  • state: Global application state.
  • panelName: A string that identifies the panel.

Returns

Whether or not the panel is enabled.

Top ↑

isEditorPanelOpened isEditorPanelOpened

Returns true if the given panel is open, or false otherwise. Panels are
closed by default.

Parameters

  • state: Global application state.
  • panelName: A string that identifies the panel.

Returns

Whether or not the panel is open.

Top ↑

isModalActive isModalActive

Returns true if a modal is active, or false otherwise.

Parameters

  • state: Global application state.
  • modalName: A string that uniquely identifies the modal.

Returns

Whether the modal is active.

Top ↑

isFeatureActive isFeatureActive

Returns whether the given feature is enabled or not.

Parameters

  • state: Global application state.
  • feature: Feature slug.

Returns

Is active.

Top ↑

isPluginItemPinned isPluginItemPinned

Returns true if the plugin item is pinned to the header.
When the value is not set it defaults to true.

Parameters

  • state: Global application state.
  • pluginName: Plugin item name.

Returns

Whether the plugin item is pinned.

Top ↑

getActiveMetaBoxLocations getActiveMetaBoxLocations

Returns an array of active meta box locations.

Parameters

  • state: Post editor state.

Returns

Active meta box locations.

Top ↑

isMetaBoxLocationVisible isMetaBoxLocationVisible

Returns true if a metabox location is active and visible

Parameters

  • state: Post editor state.
  • location: Meta box location to test.

Returns

Whether the meta box location is active and visible.

Top ↑

isMetaBoxLocationActive isMetaBoxLocationActive

Returns true if there is an active meta box in the given location, or false
otherwise.

Parameters

  • state: Post editor state.
  • location: Meta box location to test.

Returns

Whether the meta box location is active.

Top ↑

getMetaBoxesPerLocation getMetaBoxesPerLocation

Returns the list of all the available meta boxes for a given location.

Parameters

  • state: Global application state.
  • location: Meta box location to test.

Returns

List of meta boxes.

Top ↑

getAllMetaBoxes getAllMetaBoxes

Returns the list of all the available meta boxes.

Parameters

  • state: Global application state.

Returns

List of meta boxes.

Top ↑

hasMetaBoxes hasMetaBoxes

Returns true if the post is using Meta Boxes

Parameters

  • state: Global application state

Returns

Whether there are metaboxes or not.

Top ↑

isSavingMetaBoxes isSavingMetaBoxes

Returns true if the Meta Boxes are being saved.

Parameters

  • state: Global application state.

Returns

Whether the metaboxes are being saved.

Top ↑

Actions Actions

Top ↑

openGeneralSidebar openGeneralSidebar

Returns an action object used in signalling that the user opened an editor sidebar.

Parameters

  • name: Sidebar name to be opened.

Top ↑

closeGeneralSidebar closeGeneralSidebar

Returns an action object signalling that the user closed the sidebar.

Top ↑

openModal openModal

Returns an action object used in signalling that the user opened a modal.

Parameters

  • name: A string that uniquely identifies the modal.

Top ↑

closeModal closeModal

Returns an action object signalling that the user closed a modal.

Top ↑

openPublishSidebar openPublishSidebar

Returns an action object used in signalling that the user opened the publish
sidebar.

Top ↑

closePublishSidebar closePublishSidebar

Returns an action object used in signalling that the user closed the
publish sidebar.

Top ↑

togglePublishSidebar togglePublishSidebar

Returns an action object used in signalling that the user toggles the publish sidebar.

Top ↑

toggleEditorPanelEnabled toggleEditorPanelEnabled

Returns an action object used to enable or disable a panel in the editor.

Parameters

  • panelName: A string that identifies the panel to enable or disable.

Top ↑

toggleEditorPanelOpened toggleEditorPanelOpened

Returns an action object used to open or close a panel in the editor.

Parameters

  • panelName: A string that identifies the panel to open or close.

Top ↑

removeEditorPanel removeEditorPanel

Returns an action object used to remove a panel from the editor.

Parameters

  • panelName: A string that identifies the panel to remove.

Top ↑

toggleFeature toggleFeature

Returns an action object used to toggle a feature flag.

Parameters

  • feature: Feature name.

Top ↑

togglePinnedPluginItem togglePinnedPluginItem

Returns an action object used to toggle a plugin name flag.

Parameters

  • pluginName: Plugin name.

Top ↑

setAvailableMetaBoxesPerLocation setAvailableMetaBoxesPerLocation

Returns an action object used in signaling
what Meta boxes are available in which location.

Parameters

  • metaBoxesPerLocation: Meta boxes per location.

Top ↑

requestMetaBoxUpdates requestMetaBoxUpdates

Returns an action object used to request meta box update.

Top ↑

metaBoxUpdatesSuccess metaBoxUpdatesSuccess

Returns an action object used signal a successful meta box update.

Skip to toolbar