[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> edit-post.js (summary)

(no description)

File Size: 9492 lines (329 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

BrowserURL:: (33 methods):
  FullscreenModeClose()
  HeaderToolbar()
  ModeSwitcher()
  PreferencesMenuItem()
  WritingMenu()
  PostPublishButtonOrToggle()
  DevicePreview()
  DeleteTemplate()
  EditTemplateTitle()
  TemplateDescription()
  TemplateTitle()
  Header()
  InserterSidebar()
  ListViewSidebar()
  closeOnEscape()
  PostVisibility()
  PostTrash()
  PostSchedule()
  PostSticky()
  PostAuthor()
  PostSlug()
  PostFormat()
  PostPendingStatus()
  PostStatus()
  LastRevision()
  TaxonomyPanel()
  PostTaxonomies()
  FeaturedImage()
  PostExcerpt()
  PostLink()
  DiscussionPanel()
  PageAttributes()
  MetaBoxesArea()

MetaBoxVisibility:: (19 methods):
  MetaBoxes()
  PluginSidebarEditPost()
  PostTemplateActions()
  TemplatePanel()
  TemplateSummary()
  WelcomeGuideImage()
  WelcomeGuideDefault()
  WelcomeGuideTemplate()
  WelcomeGuide()
  ActionsPanel()
  PatternSelection()
  StartPageOptions()
  Layout()
  onPluginAreaError()
  EditorInitialization()
  Editor()
  PluginSidebarMoreMenuItem()
  reinitializeEditor()
  initializeEditor()

Defines 19 functions

  classNames()
  __webpack_require__()
  _extends()
  getOutboundType()
  CopyContentMenuItem()
  onSuccess()
  removedPanels()
  activeModal()
  publishSidebarActive()
  isSavingMetaBoxes()
  metaBoxLocations()
  deviceType()
  blockInserterPanel()
  listViewPanel()
  isEditingTemplate()
  metaBoxesInitialized()
  toggleFeature()
  setFeatureValue()
  setFeatureDefaults()
  ComplementaryAreaToggle()
  ActionItemSlot()
  ActionItem()
  ComplementaryAreaMoreMenuItem()
  PinnedItems()
  PinnedItemsSlot()
  ComplementaryAreaSlot()
  ComplementaryAreaFill()
  useAdjustComplementaryListener()
  ComplementaryArea()
  useHTMLClass()
  InterfaceSkeleton()
  MoreMenuDropdown()
  PreferencesModal()
  Icon()
  PreferencesModalTabs()
  BaseOption()
  openModal()
  closeModal()
  openPublishSidebar()
  closePublishSidebar()
  togglePublishSidebar()
  removeEditorPanel()
  metaBoxUpdatesSuccess()
  metaBoxUpdatesFailure()
  __experimentalSetPreviewDeviceType()
  setIsInserterOpened()
  setIsListViewOpened()
  setIsEditingTemplate()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  rememo()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()
  convertPanelsToOldFormat()
  getPreference()
  isPublishSidebarOpened()
  isEditorPanelRemoved()
  isModalActive()
  isMetaBoxLocationVisible()
  isMetaBoxLocationActive()
  getMetaBoxesPerLocation()
  hasMetaBoxes()
  selectors_isSavingMetaBoxes()
  __experimentalGetPreviewDeviceType()
  isInserterOpened()
  __experimentalGetInsertionPoint()
  isListViewOpened()
  selectors_isEditingTemplate()
  areMetaBoxesInitialized()
  KeyboardShortcutsHelpMenuItem()
  WelcomeGuideMenuItem()
  TextEditor()
  BlockInspectorButton()
  MaybeIframe()
  VisualEditor()
  KeyboardShortcuts()
  KeyCombination()
  Shortcut()
  DynamicShortcut()
  KeyboardShortcutHelpModal()
  CustomFieldsConfirmation()
  EnableCustomFieldsOption()
  MetaBoxesSection()
  BlockTypesChecklist()
  BlockManagerCategory()
  BlockManager()
  EditPostPreferencesModal()
  getPostEditURL()
  getPostTrashedURL()

Class: BrowserURL  - X-Ref

FullscreenModeClose(_ref)   X-Ref
No description

HeaderToolbar()   X-Ref
No description

ModeSwitcher()   X-Ref
No description

PreferencesMenuItem()   X-Ref
Internal dependencies


WritingMenu()   X-Ref
No description

PostPublishButtonOrToggle(_ref)   X-Ref
Internal dependencies


DevicePreview()   X-Ref
Internal dependencies


DeleteTemplate()   X-Ref
Internal dependencies


EditTemplateTitle()   X-Ref
Internal dependencies


TemplateDescription()   X-Ref
Internal dependencies


TemplateTitle()   X-Ref
No description

Header(_ref)   X-Ref
No description

InserterSidebar()   X-Ref
Internal dependencies


ListViewSidebar()   X-Ref
Internal dependencies


closeOnEscape(event)   X-Ref
No description

PostVisibility()   X-Ref
No description

PostTrash()   X-Ref
WordPress dependencies


PostSchedule()   X-Ref
No description

PostSticky()   X-Ref
WordPress dependencies


PostAuthor()   X-Ref
WordPress dependencies


PostSlug()   X-Ref
WordPress dependencies


PostFormat()   X-Ref
WordPress dependencies


PostPendingStatus()   X-Ref
WordPress dependencies


PostStatus(_ref)   X-Ref
No description

LastRevision()   X-Ref
No description

TaxonomyPanel(_ref)   X-Ref
No description

PostTaxonomies()   X-Ref
No description

FeaturedImage(_ref)   X-Ref
No description

PostExcerpt(_ref)   X-Ref
No description

PostLink(_ref)   X-Ref
No description

DiscussionPanel(_ref)   X-Ref
No description

PageAttributes()   X-Ref
Module Constants


MetaBoxesArea(_ref)   X-Ref
Render metabox area.

return: {WPComponent} The component to be rendered.
param: {Object} props          Component props.
param: {string} props.location metabox location.

Class: MetaBoxVisibility  - X-Ref

MetaBoxes(_ref)   X-Ref
No description

PluginSidebarEditPost(_ref)   X-Ref
Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.
It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.
If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:

```js
wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );
```

param: {Object}                props                                 Element props.
param: {string}                props.name                            A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.
param: {string}                [props.className]                     An optional class name added to the sidebar body.
param: {string}                props.title                           Title displayed at the top of the sidebar.
param: {boolean}               [props.isPinnable=true]               Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.
param: {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.

PostTemplateActions(_ref)   X-Ref
No description

TemplatePanel()   X-Ref
Module Constants


TemplateSummary()   X-Ref
No description

WelcomeGuideImage(_ref)   X-Ref
No description

WelcomeGuideDefault()   X-Ref
No description

WelcomeGuideTemplate()   X-Ref
No description

WelcomeGuide()   X-Ref
No description

ActionsPanel(_ref)   X-Ref
No description

PatternSelection(_ref)   X-Ref
No description

StartPageOptions()   X-Ref
No description

Layout(_ref)   X-Ref
No description

onPluginAreaError(name)   X-Ref
No description

EditorInitialization(_ref)   X-Ref
Data component used for initializing the editor and re-initializes
when postId changes or on unmount.

return: {null} This is a data component so does not render any ui.
param: {number} postId The id of the post.

Editor(_ref)   X-Ref
No description

PluginSidebarMoreMenuItem(props)   X-Ref
Renders a menu item in `Plugins` group in `More Menu` drop down,
and can be used to activate the corresponding `PluginSidebar` component.
The text within the component appears as the menu item label.

return: {WPComponent} The component to be rendered.
param: {Object}                props                                 Component props.
param: {string}                props.target                          A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.
param: {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.

reinitializeEditor(postType, postId, target, settings, initialEdits)   X-Ref
Reinitializes the editor after the user chooses to reboot the editor after
an unhandled error occurs, replacing previously mounted editor element using
an initial state from prior to the crash.

param: {Object}  postType     Post type of the post to edit.
param: {Object}  postId       ID of the post to edit.
param: {Element} target       DOM node in which editor is rendered.
param: {?Object} settings     Editor settings object.
param: {Object}  initialEdits Programmatic edits to apply initially, to be

initializeEditor(id, postType, postId, settings, initialEdits)   X-Ref
Initializes and returns an instance of Editor.

param: {string}  id           Unique identifier for editor instance.
param: {string}  postType     Post type of the post to edit.
param: {Object}  postId       ID of the post to edit.
param: {?Object} settings     Editor settings object.
param: {Object}  initialEdits Programmatic edits to apply initially, to be

Functions
Functions that are not part of a class:

classNames()   X-Ref
No description

__webpack_require__(moduleId)   X-Ref
No description

_extends()   X-Ref
No description

getOutboundType(blockName)   X-Ref
Given a base block name, returns the default block type to which to offer
transforms.

return: {?Object} The chosen default block type.
param: {string} blockName Base block name.

CopyContentMenuItem()   X-Ref
No description

onSuccess()   X-Ref
No description

removedPanels()   X-Ref
Reducer storing the list of all programmatically removed panels.

return: {Array} Updated state.
param: {Array}  state  Current state.
param: {Object} action Action object.

activeModal()   X-Ref
Reducer for storing the name of the open modal, or null if no modal is open.

return: {Object} Updated state
param: {Object} state  Previous state.
param: {Object} action Action object containing the `name` of the modal

publishSidebarActive()   X-Ref
No description

isSavingMetaBoxes()   X-Ref
Reducer keeping track of the meta boxes isSaving state.
A "true" value means the meta boxes saving request is in-flight.

return: {Object} Updated state.
param: {boolean} state  Previous state.
param: {Object}  action Action Object.

metaBoxLocations()   X-Ref
Reducer keeping track of the meta boxes per location.

return: {Object} Updated state.
param: {boolean} state  Previous state.
param: {Object}  action Action Object.

deviceType()   X-Ref
Reducer returning the editing canvas device type.

return: {Object} Updated state.
param: {Object} state  Current state.
param: {Object} action Dispatched action.

blockInserterPanel()   X-Ref
Reducer to set the block inserter panel open or closed.

Note: this reducer interacts with the list view panel reducer
to make sure that only one of the two panels is open at the same time.

param: {Object} state  Current state.
param: {Object} action Dispatched action.

listViewPanel()   X-Ref
Reducer to set the list view panel open or closed.

Note: this reducer interacts with the inserter panel reducer
to make sure that only one of the two panels is open at the same time.

param: {Object} state  Current state.
param: {Object} action Dispatched action.

isEditingTemplate()   X-Ref
Reducer tracking whether the inserter is open.

param: {boolean} state
param: {Object}  action

metaBoxesInitialized()   X-Ref
Reducer tracking whether meta boxes are initialized.

return: {boolean} Updated state.
param: {boolean} state
param: {Object}  action

toggleFeature(scope, featureName)   X-Ref
Returns an action object used in signalling that a feature should be toggled.

param: {string} scope       The feature scope (e.g. core/edit-post).
param: {string} featureName The feature name.

setFeatureValue(scope, featureName, value)   X-Ref
Returns an action object used in signalling that a feature should be set to
a true or false value

return: {Object} Action object.
param: {string}  scope       The feature scope (e.g. core/edit-post).
param: {string}  featureName The feature name.
param: {boolean} value       The value to set.

setFeatureDefaults(scope, defaults)   X-Ref
Returns an action object used in signalling that defaults should be set for features.

return: {Object} Action object.
param: {string}                  scope    The feature scope (e.g. core/edit-post).
param: {Object<string, boolean>} defaults A key/value map of feature names to values.

ComplementaryAreaToggle(_ref)   X-Ref
No description

ActionItemSlot(_ref)   X-Ref
No description

ActionItem(_ref3)   X-Ref
No description

ComplementaryAreaMoreMenuItem(_ref)   X-Ref
No description

PinnedItems(_ref)   X-Ref
No description

PinnedItemsSlot(_ref2)   X-Ref
No description

ComplementaryAreaSlot(_ref)   X-Ref
No description

ComplementaryAreaFill(_ref2)   X-Ref
No description

useAdjustComplementaryListener(scope, identifier, activeArea, isActive, isSmall)   X-Ref
No description

ComplementaryArea(_ref3)   X-Ref
No description

useHTMLClass(className)   X-Ref
No description

InterfaceSkeleton(_ref, ref)   X-Ref
No description

MoreMenuDropdown(_ref)   X-Ref
No description

PreferencesModal(_ref)   X-Ref
WordPress dependencies


Icon(_ref)   X-Ref
Return an SVG icon.

return: {JSX.Element}  Icon component
param: {IconProps} props icon is the SVG component to render

PreferencesModalTabs(_ref)   X-Ref
No description

BaseOption(_ref)   X-Ref
WordPress dependencies


openModal(name)   X-Ref
Returns an action object used in signalling that the user opened a modal.

return: {Object} Action object.
param: {string} name A string that uniquely identifies the modal.

closeModal()   X-Ref
Returns an action object signalling that the user closed a modal.

return: {Object} Action object.

openPublishSidebar()   X-Ref
Returns an action object used in signalling that the user opened the publish
sidebar.

return: {Object} Action object

closePublishSidebar()   X-Ref
Returns an action object used in signalling that the user closed the
publish sidebar.

return: {Object} Action object.

togglePublishSidebar()   X-Ref
Returns an action object used in signalling that the user toggles the publish sidebar.

return: {Object} Action object

removeEditorPanel(panelName)   X-Ref
Returns an action object used to remove a panel from the editor.

return: {Object} Action object.
param: {string} panelName A string that identifies the panel to remove.

metaBoxUpdatesSuccess()   X-Ref
Returns an action object used to signal a successful meta box update.

return: {Object} Action object.

metaBoxUpdatesFailure()   X-Ref
Returns an action object used to signal a failed meta box update.

return: {Object} Action object.

__experimentalSetPreviewDeviceType(deviceType)   X-Ref
Returns an action object used to toggle the width of the editing canvas.

return: {Object} Action object.
param: {string} deviceType

setIsInserterOpened(value)   X-Ref
Returns an action object used to open/close the inserter.

return: {Object} Action object.
param: {boolean|Object} value                Whether the inserter should be
param: {string}         value.rootClientId   The root client ID to insert at.
param: {number}         value.insertionIndex The index to insert at.

setIsListViewOpened(isOpen)   X-Ref
Returns an action object used to open/close the list view.

return: {Object} Action object.
param: {boolean} isOpen A boolean representing whether the list view should be opened or closed.

setIsEditingTemplate(value)   X-Ref
Returns an action object used to switch to template editing.

return: {Object} Action object.
param: {boolean} value Is editing template.

arrayOf( value )   X-Ref
Returns the first argument as the sole entry in an array.

return: {Array} Value returned as entry in array.
param: {*} value Value to return.

isObjectLike( value )   X-Ref
Returns true if the value passed is object-like, or false otherwise. A value
is object-like if it can support property assignment, e.g. object or array.

return: {boolean} Whether value is object-like.
param: {*} value Value to test.

createCache()   X-Ref
Creates and returns a new cache object.

return: {Object} Cache object.

isShallowEqual( a, b, fromIndex )   X-Ref
Returns true if entries within the two arrays are strictly equal by
reference from a starting index.

return: {boolean} Whether arrays are shallowly equal.
param: {Array}  a         First array.
param: {Array}  b         Second array.
param: {number} fromIndex Index from which to start comparison.

rememo(selector, getDependants )   X-Ref
Returns a memoized selector function. The getDependants function argument is
called before the memoized selector and is expected to return an immutable
reference or array of references on which the selector depends for computing
its own return value. The memoize cache is preserved only as long as those
dependant references remain the same. If getDependants returns a different
reference(s), the cache is cleared and the selector value regenerated.

return: {Function} Memoized selector.
param: {Function} selector      Selector function.
param: {Function} getDependants Dependant getter returning an immutable

getRootCache()   X-Ref
Returns the root cache. If WeakMap is supported, this is assigned to the
root WeakMap cache set, otherwise it is a shared instance of the default
cache object.

return: {(WeakMap|Object)} Root cache object.

getWeakMapCache( dependants )   X-Ref
Returns the cache for a given dependants array. When possible, a WeakMap
will be used to create a unique cache for each set of dependants. This
is feasible due to the nature of WeakMap in allowing garbage collection
to occur on entries where the key object is no longer referenced. Since
WeakMap requires the key to be an object, this is only possible when the
dependant is object-like. The root cache is created as a hierarchy where
each top-level key is the first entry in a dependants set, the value a
WeakMap where each key is the next dependant, and so on. This continues
so long as the dependants are object-like. If no dependants are object-
like, then the cache is shared across all invocations.

return: {Object} Cache object.
param: {Array} dependants Selector dependants.

clear()   X-Ref
Resets root memoization cache.


callSelector( )   X-Ref
The augmented selector call, considering first whether dependants have
changed before passing it to underlying memoize function.

return: {*} Selector result.
param: {Object} source    Source object for derivation.
param: {...*}   extraArgs Additional arguments to pass to selector.

convertPanelsToOldFormat(inactivePanels, openPanels)   X-Ref
Converts panels from the new preferences store format to the old format
that the post editor previously used.

The resultant converted data should look like this:
{
panelName: {
enabled: false,
opened: true,
},
anotherPanelName: {
opened: true
},
}

return: {Object} The converted panel data.
param: {string[] | undefined} inactivePanels An array of inactive panel names.
param: {string[] | undefined} openPanels     An array of open panel names.

getPreference(state, preferenceKey, defaultValue)   X-Ref

return: {*} Preference Value.
param: {Object} state         Global application state.
param: {string} preferenceKey Preference Key.
param: {*}      defaultValue  Default Value.

isPublishSidebarOpened(state)   X-Ref
Returns true if the publish sidebar is opened.

return: {boolean} Whether the publish sidebar is open.
param: {Object} state Global application state

isEditorPanelRemoved(state, panelName)   X-Ref
Returns true if the given panel was programmatically removed, or false otherwise.
All panels are not removed by default.

return: {boolean} Whether or not the panel is removed.
param: {Object} state     Global application state.
param: {string} panelName A string that identifies the panel.

isModalActive(state, modalName)   X-Ref
Returns true if a modal is active, or false otherwise.

return: {boolean} Whether the modal is active.
param: {Object} state     Global application state.
param: {string} modalName A string that uniquely identifies the modal.

isMetaBoxLocationVisible(state, location)   X-Ref
Returns true if a metabox location is active and visible

return: {boolean} Whether the meta box location is active and visible.
param: {Object} state    Post editor state.
param: {string} location Meta box location to test.

isMetaBoxLocationActive(state, location)   X-Ref
Returns true if there is an active meta box in the given location, or false
otherwise.

return: {boolean} Whether the meta box location is active.
param: {Object} state    Post editor state.
param: {string} location Meta box location to test.

getMetaBoxesPerLocation(state, location)   X-Ref
Returns the list of all the available meta boxes for a given location.

return: {?Array} List of meta boxes.
param: {Object} state    Global application state.
param: {string} location Meta box location to test.

hasMetaBoxes(state)   X-Ref
Returns true if the post is using Meta Boxes

return: {boolean} Whether there are metaboxes or not.
param: {Object} state Global application state

selectors_isSavingMetaBoxes(state)   X-Ref
Returns true if the Meta Boxes are being saved.

return: {boolean} Whether the metaboxes are being saved.
param: {Object} state Global application state.

__experimentalGetPreviewDeviceType(state)   X-Ref
Returns the current editing canvas device type.

return: {string} Device type.
param: {Object} state Global application state.

isInserterOpened(state)   X-Ref
Returns true if the inserter is opened.

return: {boolean} Whether the inserter is opened.
param: {Object} state Global application state.

__experimentalGetInsertionPoint(state)   X-Ref
Get the insertion point for the inserter.

return: {Object} The root client ID, index to insert at and starting filter value.
param: {Object} state Global application state.

isListViewOpened(state)   X-Ref
Returns true if the list view is opened.

return: {boolean} Whether the list view is opened.
param: {Object} state Global application state.

selectors_isEditingTemplate(state)   X-Ref
Returns true if the template editing mode is enabled.

return: {boolean} Whether we're editing the template.
param: {Object} state Global application state.

areMetaBoxesInitialized(state)   X-Ref
Returns true if meta boxes are initialized.

return: {boolean} Whether meta boxes are initialized.
param: {Object} state Global application state.

KeyboardShortcutsHelpMenuItem(_ref)   X-Ref
Internal dependencies


WelcomeGuideMenuItem()   X-Ref
Internal dependencies


TextEditor(_ref)   X-Ref
No description

BlockInspectorButton(_ref)   X-Ref
Internal dependencies


MaybeIframe(_ref)   X-Ref
No description

VisualEditor(_ref2)   X-Ref
No description

KeyboardShortcuts()   X-Ref
No description

KeyCombination(_ref)   X-Ref
No description

Shortcut(_ref2)   X-Ref
No description

DynamicShortcut(_ref)   X-Ref
No description

KeyboardShortcutHelpModal(_ref4)   X-Ref
No description

CustomFieldsConfirmation(_ref)   X-Ref
No description

EnableCustomFieldsOption(_ref2)   X-Ref
No description

MetaBoxesSection(_ref)   X-Ref
No description

BlockTypesChecklist(_ref)   X-Ref
No description

BlockManagerCategory(_ref)   X-Ref
No description

BlockManager(_ref)   X-Ref
No description

EditPostPreferencesModal()   X-Ref
No description

getPostEditURL(postId)   X-Ref
Returns the Post's Edit URL.

return: {string} Post edit URL.
param: {number} postId Post ID.

getPostTrashedURL(postId, postType)   X-Ref
Returns the Post's Trashed URL.

return: {string} Post trashed URL.
param: {number} postId   Post ID.
param: {string} postType Post Type.



Generated: Sat Apr 27 01:00:02 2024 Cross-referenced by PHPXref 0.7.1