[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> editor.js (summary)

(no description)

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

Defines 9 classes

AutosaveMonitor:: (15 methods):
  DocumentOutlineCheck()
  SaveShortcut()
  VisualEditorGlobalKeyboardShortcuts()
  TextEditorGlobalKeyboardShortcuts()
  EditorKeyboardShortcutsRegister()
  EditorHistoryRedo()
  EditorHistoryUndo()
  TemplateValidationNotice()
  EditorNotices()
  EditorSnackbars()
  EntityRecordItem()
  getEntityDescription()
  EntityTypeList()
  EntitiesSavedStates()
  CopyButton()

ErrorBoundary:: (32 methods):
  useAutosaveNotice()
  useAutosavePurge()
  LocalAutosaveMonitor()
  PageAttributesCheck()
  PostTypeSupportCheck()
  PageAttributesOrderWithChecks()
  buildTermsTree()
  getTitle()
  PageAttributesParent()
  PostTemplate()
  PostAuthorCombobox()
  PostAuthorSelect()
  PostAuthor()
  PostAuthorCheck()
  PostComments()
  PostExcerpt()
  PostExcerptCheck()
  ThemeSupportCheck()
  PostFeaturedImageCheck()
  PostFeaturedImage()
  PostFormatCheck()
  PostFormat()
  PostLastRevisionCheck()
  LastRevision()
  PostLockedModal()
  sendPostLock()
  receivePostLock()
  releasePostLock()
  PostPendingStatusCheck()
  PostPendingStatus()
  PostPingbacks()
  writeInterstitialMessage()

PostPreviewButton:: (1 method):
  PublishButtonLabel()

PostPublishButton:: (1 method):
  _defineProperty()

PostVisibility:: (11 methods):
  PostVisibilityLabel()
  getDayOfTheMonth()
  PostSchedule()
  onChange()
  PostScheduleLabel()
  MostUsedTerms()
  findOrCreateTerm()
  FlatTermSelector()
  onUpdateTerms()
  onChange()
  appendTerm()

MaybeTagsPanel:: (8 methods):
  PostFormatPanel()
  sortBySelected()
  findTerm()
  getFilterMatcher()
  HierarchicalTermSelector()
  MaybeCategoryPanel()
  PostPublishPanelPrepublish()
  postpublish_CopyButton()

PostPublishPanelPostpublish:: (0 methods):

PostPublishPanel:: (5 methods):
  Icon()
  PostSwitchToDraftButton()
  PostSavedState()
  PostScheduleCheck()
  PostSlugCheck()

PostSlug:: (28 methods):
  PostStickyCheck()
  PostSticky()
  PostTaxonomies()
  PostTaxonomiesCheck()
  PostTextEditor()
  PostTitle()
  onEnterPress()
  onInsertBlockAfter()
  onUpdate()
  onSelect()
  onUnselect()
  onChange()
  onKeyDown()
  onPaste()
  PostTrash()
  PostTrashCheck()
  PostVisibilityCheck()
  WordCount()
  CharacterCount()
  TableOfContentsPanel()
  TableOfContents()
  UnsavedChangesWarning()
  mediaUpload()
  useBlockEditorSettings()
  EditorProvider()
  deprecateComponent()
  deprecateFunction()
  cleanForSlug()

Defines 28 functions

  assign()
  init()
  changeOverflow()
  getParentOverflows()
  resize()
  update()
  destroy()
  update()
  classNames()
  lineHeight()
  emptyFunction()
  emptyFunctionWithReset()
  shim()
  getShim()
  __()
  TextareaAutosizeClass()
  __webpack_require__()
  _extends()
  getPostRawValue()
  hasSameKeys()
  isUpdatingSamePostProperty()
  shouldOverwriteState()
  postId()
  postType()
  template()
  saving()
  postLock()
  postSavingLock()
  postAutosavingLock()
  isReady()
  editorSettings()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  rememo()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()
  getTemplatePartIcon()
  isEditedPostNew()
  hasChangedContent()
  isCleanNewPost()
  getCurrentPostType()
  getCurrentPostId()
  getCurrentPostRevisionsCount()
  getCurrentPostLastRevisionId()
  getCurrentPostAttribute()
  getEditedPostAttribute()
  getEditedPostVisibility()
  isCurrentPostPending()
  isCurrentPostPublished()
  isCurrentPostScheduled()
  isEditedPostPublishable()
  isEditedPostSaveable()
  isEditedPostEmpty()
  isEditedPostBeingScheduled()
  isEditedPostDateFloating()
  isAutosavingPost()
  isPreviewingPost()
  getEditedPostPreviewLink()
  getSuggestedPostFormat()
  isPublishingPost()
  isPermalinkEditable()
  getPermalink()
  getEditedPostSlug()
  getPermalinkParts()
  isPostLocked()
  isPostSavingLocked()
  isPostAutosavingLocked()
  isPostLockTakeover()
  getPostLockUser()
  getActivePostLock()
  canUserUseUnfilteredHTML()
  getEditorBlocks()
  getEditorSelectionStart()
  getEditorSelectionEnd()
  getEditorSelection()
  __unstableIsEditorReady()
  getEditorSettings()
  getStateBeforeOptimisticTransaction()
  inSomeHistory()
  getBlockEditorSelector()
  __experimentalGetDefaultTemplateTypes()
  __experimentalGetTemplateInfo()
  postKey()
  localAutosaveGet()
  localAutosaveSet()
  localAutosaveClear()
  getNotificationArgumentsForSaveSuccess()
  getNotificationArgumentsForSaveFail()
  getNotificationArgumentsForTrashFail()
  __experimentalTearDownEditor()
  resetPost()
  updatePost()
  setupEditorState()
  refreshPost()
  createUndoLevel()
  updatePostLock()
  lockPostSaving()
  unlockPostSaving()
  lockPostAutosaving()
  unlockPostAutosaving()
  updateEditorSettings()
  shimAttributeSource()
  getUserLabel()
  setDefaultCompleters()

Class: AutosaveMonitor  - X-Ref

AutosaveMonitor invokes `props.autosave()` within at most `interval` seconds after an unsaved change is detected.

The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.
The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as
the specific way of detecting changes.

There are two caveats:
* If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.
* The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.
DocumentOutlineCheck(_ref)   X-Ref
No description

SaveShortcut(_ref)   X-Ref
No description

VisualEditorGlobalKeyboardShortcuts()   X-Ref
No description

TextEditorGlobalKeyboardShortcuts()   X-Ref
Internal dependencies


EditorKeyboardShortcutsRegister()   X-Ref
No description

EditorHistoryRedo(props, ref)   X-Ref
No description

EditorHistoryUndo(props, ref)   X-Ref
No description

TemplateValidationNotice(_ref)   X-Ref
No description

EditorNotices(_ref)   X-Ref
Internal dependencies


EditorSnackbars()   X-Ref
No description

EntityRecordItem(_ref)   X-Ref
Internal dependencies


getEntityDescription(entity, count)   X-Ref
No description

EntityTypeList(_ref)   X-Ref
No description

EntitiesSavedStates(_ref)   X-Ref
No description

CopyButton(_ref)   X-Ref
No description

Class: ErrorBoundary  - X-Ref

useAutosaveNotice()   X-Ref
Custom hook which manages the creation of a notice prompting the user to
restore a local autosave, if one exists.


useAutosavePurge()   X-Ref
Custom hook which ejects a local autosave after a successful save occurs.


LocalAutosaveMonitor()   X-Ref
No description

PageAttributesCheck(_ref)   X-Ref
Internal dependencies


PostTypeSupportCheck(_ref)   X-Ref
A component which renders its own children only if the current editor post
type supports one of the given `supportKeys` prop.

param: {Object}            props             Props.
param: {string}            [props.postType]  Current post type.
param: {WPElement}         props.children    Children to be rendered if post
param: {(string|string[])} props.supportKeys String or string array of keys
return: {WPComponent} The component to be rendered.

PageAttributesOrderWithChecks(props)   X-Ref
No description

buildTermsTree(flatTerms)   X-Ref
Returns terms in a tree form.

param: {Array} flatTerms Array of terms in flat format.
return: {Array} Array of terms in tree format.

getTitle(post)   X-Ref
No description

PageAttributesParent()   X-Ref
No description

PostTemplate(_ref)   X-Ref
Internal dependencies


PostAuthorCombobox()   X-Ref
No description

PostAuthorSelect()   X-Ref
No description

PostAuthor()   X-Ref
No description

PostAuthorCheck(_ref)   X-Ref
No description

PostComments(_ref)   X-Ref
No description

PostExcerpt(_ref)   X-Ref
No description

PostExcerptCheck(props)   X-Ref
Internal dependencies


ThemeSupportCheck(_ref)   X-Ref
Internal dependencies


PostFeaturedImageCheck(props)   X-Ref
No description

PostFeaturedImage(_ref)   X-Ref
No description

PostFormatCheck(_ref)   X-Ref
No description

PostFormat()   X-Ref
No description

PostLastRevisionCheck(_ref)   X-Ref
No description

LastRevision(_ref)   X-Ref
No description

PostLockedModal()   X-Ref
Internal dependencies


sendPostLock(data)   X-Ref
Keep the lock refreshed.

When the user does not send a heartbeat in a heartbeat-tick
the user is no longer editing and another user can start editing.

param: {Object} data Data to send in the heartbeat request.

receivePostLock(data)   X-Ref
Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.

param: {Object} data Data received in the heartbeat request

releasePostLock()   X-Ref
Unlock the post before the window is exited.


PostPendingStatusCheck(_ref)   X-Ref
Internal dependencies


PostPendingStatus(_ref)   X-Ref
No description

PostPingbacks(_ref)   X-Ref
No description

writeInterstitialMessage(targetDocument)   X-Ref
No description

Class: PostPreviewButton  - X-Ref

PublishButtonLabel(_ref)   X-Ref
Internal dependencies


Class: PostPublishButton  - X-Ref

_defineProperty(obj, key, value)   X-Ref
No description

Class: PostVisibility  - X-Ref

PostVisibilityLabel(_ref)   X-Ref
No description

getDayOfTheMonth()   X-Ref
No description

PostSchedule()   X-Ref
No description

onChange(newDate)   X-Ref
No description

PostScheduleLabel(_ref)   X-Ref
Internal dependencies


MostUsedTerms(_ref)   X-Ref
No description

findOrCreateTerm(termName, restBase)   X-Ref
No description

FlatTermSelector(_ref)   X-Ref
No description

onUpdateTerms(newTermIds)   X-Ref
No description

onChange(termNames)   X-Ref
No description

appendTerm(newTerm)   X-Ref
No description

Class: MaybeTagsPanel  - X-Ref

PostFormatPanel()   X-Ref
No description

sortBySelected(termsTree, terms)   X-Ref
Sort Terms by Selected.

param: {Object[]} termsTree Array of terms in tree format.
param: {number[]} terms     Selected terms.
return: {Object[]} Sorted array of terms.

findTerm(terms, parent, name)   X-Ref
Find term by parent id or name.

param: {Object[]}      terms  Array of Terms.
param: {number|string} parent id.
param: {string}        name   Term name.
return: {Object} Term object.

getFilterMatcher(filterValue)   X-Ref
Get filter matcher function.

param: {string} filterValue Filter value.
return: {(function(Object): (Object|boolean))} Matcher function.

HierarchicalTermSelector(_ref)   X-Ref
Hierarchical term selector.

param: {Object} props      Component props.
param: {string} props.slug Taxonomy slug.
return: {WPElement}        Hierarchical term selector component.

MaybeCategoryPanel()   X-Ref
No description

PostPublishPanelPrepublish(_ref)   X-Ref
No description

postpublish_CopyButton(_ref)   X-Ref
No description

Class: PostPublishPanelPostpublish  - X-Ref

Class: PostPublishPanel  - X-Ref

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

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

PostSwitchToDraftButton(_ref)   X-Ref
No description

PostSavedState(_ref)   X-Ref
Component showing whether the post is saved or not and providing save
buttons.

param: {Object}   props                Component props.
param: {?boolean} props.forceIsDirty   Whether to force the post to be marked
param: {?boolean} props.forceIsSaving  Whether to force the post to be marked
param: {?boolean} props.showIconLabels Whether interface buttons show labels instead of icons
return: {import('@wordpress/element').WPComponent} The component.

PostScheduleCheck(_ref)   X-Ref
Internal dependencies


PostSlugCheck(_ref)   X-Ref
Internal dependencies


Class: PostSlug  - X-Ref

PostStickyCheck(_ref)   X-Ref
Internal dependencies


PostSticky(_ref)   X-Ref
No description

PostTaxonomies(_ref)   X-Ref
No description

PostTaxonomiesCheck(_ref)   X-Ref
Internal dependencies


PostTextEditor()   X-Ref
Internal dependencies


PostTitle()   X-Ref
Constants


onEnterPress()   X-Ref
No description

onInsertBlockAfter(blocks)   X-Ref
No description

onUpdate(newTitle)   X-Ref
No description

onSelect()   X-Ref
No description

onUnselect()   X-Ref
No description

onChange(value)   X-Ref
No description

onKeyDown(event)   X-Ref
No description

onPaste(event)   X-Ref
No description

PostTrash()   X-Ref
Internal dependencies


PostTrashCheck(_ref)   X-Ref
No description

PostVisibilityCheck(_ref)   X-Ref
Internal dependencies


WordCount()   X-Ref
Internal dependencies


CharacterCount()   X-Ref
Internal dependencies


TableOfContentsPanel(_ref)   X-Ref
No description

TableOfContents(_ref, ref)   X-Ref
No description

UnsavedChangesWarning()   X-Ref
Warns the user if there are unsaved changes before leaving the editor.
Compatible with Post Editor and Site Editor.

return: {WPComponent} The component.

mediaUpload(_ref)   X-Ref
Upload a media file when the file upload button is activated.
Wrapper around mediaUpload() that injects the current post ID.

param: {Object}   $0                   Parameters object passed to the function.
param: {?Object}  $0.additionalData    Additional data to include in the request.
param: {string}   $0.allowedTypes      Array with the types of media that can be uploaded, if unset all types are allowed.
param: {Array}    $0.filesList         List of files.
param: {?number}  $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.
param: {Function} $0.onError           Function called when an error happens.
param: {Function} $0.onFileChange      Function called each time a file or a temporary representation of the file is available.

useBlockEditorSettings(settings, hasTemplate)   X-Ref
React hook used to compute the block editor settings to use for the post editor.

param: {Object}  settings    EditorProvider settings prop.
param: {boolean} hasTemplate Whether template mode is enabled.
return: {Object} Block Editor Settings.

EditorProvider(_ref)   X-Ref
No description

deprecateComponent(name, Wrapped)   X-Ref
No description

deprecateFunction(name, func)   X-Ref
No description

cleanForSlug(string)   X-Ref
Performs some basic cleanup of a string for use as a post slug

This replicates some of what sanitize_title() does in WordPress core, but
is only designed to approximate what the slug will be.

Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.
Removes combining diacritical marks. Converts whitespace, periods,
and forward slashes to hyphens. Removes any remaining non-word characters
except hyphens and underscores. Converts remaining string to lowercase.
It does not account for octets, HTML entities, or other encoded characters.

param: {string} string Title or slug to be processed
return: {string} Processed string

Functions
Functions that are not part of a class:

assign(ta)   X-Ref
No description

init()   X-Ref
No description

changeOverflow(value)   X-Ref
No description

getParentOverflows(el)   X-Ref
No description

resize()   X-Ref
No description

update()   X-Ref
No description

destroy(ta)   X-Ref
No description

update(ta)   X-Ref
No description

classNames()   X-Ref
No description

lineHeight(node)   X-Ref
Calculate the `line-height` of a given node

param: {HTMLElement} node Element to calculate line height of. Must be in the DOM.
returns: {Number} `line-height` of the element in pixels

emptyFunction()   X-Ref
No description

emptyFunctionWithReset()   X-Ref
No description

shim(props, propName, componentName, location, propFullName, secret)   X-Ref
No description

getShim()   X-Ref
No description

__()   X-Ref
No description

TextareaAutosizeClass()   X-Ref
A light replacement for built-in textarea component
which automaticaly adjusts its height to match the content


__webpack_require__(moduleId)   X-Ref
No description

_extends()   X-Ref
No description

getPostRawValue(value)   X-Ref
Returns a post attribute value, flattening nested rendered content using its
raw value in place of its original object form.

param: {*} value Original value.
return: {*} Raw value.

hasSameKeys(a, b)   X-Ref
Returns true if the two object arguments have the same keys, or false
otherwise.

param: {Object} a First object.
param: {Object} b Second object.
return: {boolean} Whether the two objects have the same keys.

isUpdatingSamePostProperty(action, previousAction)   X-Ref
Returns true if, given the currently dispatching action and the previously
dispatched action, the two actions are editing the same post property, or
false otherwise.

param: {Object} action         Currently dispatching action.
param: {Object} previousAction Previously dispatched action.
return: {boolean} Whether actions are updating the same post property.

shouldOverwriteState(action, previousAction)   X-Ref
Returns true if, given the currently dispatching action and the previously
dispatched action, the two actions are modifying the same property such that
undo history should be batched.

param: {Object} action         Currently dispatching action.
param: {Object} previousAction Previously dispatched action.
return: {boolean} Whether to overwrite present state.

postId()   X-Ref
No description

postType()   X-Ref
No description

template()   X-Ref
Reducer returning whether the post blocks match the defined template or not.

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

saving()   X-Ref
Reducer returning current network request state (whether a request to
the WP REST API is in progress, successful, or failed).

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

postLock()   X-Ref
Reducer returning the post lock status.

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

postSavingLock()   X-Ref
Post saving lock.

When post saving is locked, the post cannot be published or updated.

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

postAutosavingLock()   X-Ref
Post autosaving lock.

When post autosaving is locked, the post will not autosave.

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

isReady()   X-Ref
Reducer returning whether the editor is ready to be rendered.
The editor is considered ready to be rendered once
the post object is loaded properly and the initial blocks parsed.

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

editorSettings()   X-Ref
Reducer returning the post editor setting.

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

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

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

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.

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

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.

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

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.

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

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.

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

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.

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

getTemplatePartIcon(iconName)   X-Ref
Helper function to retrieve the corresponding icon by name.

param: {string} iconName The name of the icon.
return: {Object} The corresponding icon.

isEditedPostNew(state)   X-Ref
Returns true if the currently edited post is yet to be saved, or false if
the post has been saved.

param: {Object} state Global application state.
return: {boolean} Whether the post is new.

hasChangedContent(state)   X-Ref
Returns true if content includes unsaved changes, or false otherwise.

param: {Object} state Editor state.
return: {boolean} Whether content includes unsaved changes.

isCleanNewPost(state)   X-Ref
Returns true if there are no unsaved values for the current edit session and
if the currently edited post is new (has never been saved before).

param: {Object} state Global application state.
return: {boolean} Whether new post and unsaved values exist.

getCurrentPostType(state)   X-Ref
Returns the post type of the post currently being edited.

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

getCurrentPostId(state)   X-Ref
Returns the ID of the post currently being edited, or null if the post has
not yet been saved.

param: {Object} state Global application state.
return: {?number} ID of current post.

getCurrentPostRevisionsCount(state)   X-Ref
Returns the number of revisions of the post currently being edited.

param: {Object} state Global application state.
return: {number} Number of revisions.

getCurrentPostLastRevisionId(state)   X-Ref
Returns the last revision ID of the post currently being edited,
or null if the post has no revisions.

param: {Object} state Global application state.
return: {?number} ID of the last revision.

getCurrentPostAttribute(state, attributeName)   X-Ref
Returns an attribute value of the saved post.

param: {Object} state         Global application state.
param: {string} attributeName Post attribute name.
return: {*} Post attribute value.

getEditedPostAttribute(state, attributeName)   X-Ref
Returns a single attribute of the post being edited, preferring the unsaved
edit if one exists, but falling back to the attribute for the last known
saved state of the post.

param: {Object} state         Global application state.
param: {string} attributeName Post attribute name.
return: {*} Post attribute value.

getEditedPostVisibility(state)   X-Ref
Returns the current visibility of the post being edited, preferring the
unsaved value if different than the saved post. The return value is one of
"private", "password", or "public".

param: {Object} state Global application state.
return: {string} Post visibility.

isCurrentPostPending(state)   X-Ref
Returns true if post is pending review.

param: {Object} state Global application state.
return: {boolean} Whether current post is pending review.

isCurrentPostPublished(state, currentPost)   X-Ref
Return true if the current post has already been published.

param: {Object}  state       Global application state.
param: {Object?} currentPost Explicit current post for bypassing registry selector.
return: {boolean} Whether the post has been published.

isCurrentPostScheduled(state)   X-Ref
Returns true if post is already scheduled.

param: {Object} state Global application state.
return: {boolean} Whether current post is scheduled to be posted.

isEditedPostPublishable(state)   X-Ref
Return true if the post being edited can be published.

param: {Object} state Global application state.
return: {boolean} Whether the post can been published.

isEditedPostSaveable(state)   X-Ref
Returns true if the post can be saved, or false otherwise. A post must
contain a title, an excerpt, or non-empty content to be valid for save.

param: {Object} state Global application state.
return: {boolean} Whether the post can be saved.

isEditedPostEmpty(state)   X-Ref
Returns true if the edited post has content. A post has content if it has at
least one saveable block or otherwise has a non-empty content property
assigned.

param: {Object} state Global application state.
return: {boolean} Whether post has content.

isEditedPostBeingScheduled(state)   X-Ref
Return true if the post being edited is being scheduled. Preferring the
unsaved status values.

param: {Object} state Global application state.
return: {boolean} Whether the post has been published.

isEditedPostDateFloating(state)   X-Ref
Returns whether the current post should be considered to have a "floating"
date (i.e. that it would publish "Immediately" rather than at a set time).

Unlike in the PHP backend, the REST API returns a full date string for posts
where the 0000-00-00T00:00:00 placeholder is present in the database. To
infer that a post is set to publish "Immediately" we check whether the date
and modified date are the same.

param: {Object} state Editor state.
return: {boolean} Whether the edited post has a floating date value.

isAutosavingPost(state)   X-Ref
Returns true if the post is autosaving, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether the post is autosaving.

isPreviewingPost(state)   X-Ref
Returns true if the post is being previewed, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether the post is being previewed.

getEditedPostPreviewLink(state)   X-Ref
Returns the post preview link

param: {Object} state Global application state.
return: {string?} Preview Link.

getSuggestedPostFormat(state)   X-Ref
Returns a suggested post format for the current post, inferred only if there
is a single block within the post and it is of a type known to match a
default post format. Returns null if the format cannot be determined.

param: {Object} state Global application state.
return: {?string} Suggested post format.

isPublishingPost(state)   X-Ref
Returns true if the post is being published, or false otherwise.

param: {Object} state Global application state.
return: {boolean} Whether post is being published.

isPermalinkEditable(state)   X-Ref
Returns whether the permalink is editable or not.

param: {Object} state Editor state.
return: {boolean} Whether or not the permalink is editable.

getPermalink(state)   X-Ref
Returns the permalink for the post.

param: {Object} state Editor state.
return: {?string} The permalink, or null if the post is not viewable.

getEditedPostSlug(state)   X-Ref
Returns the slug for the post being edited, preferring a manually edited
value if one exists, then a sanitized version of the current post title, and
finally the post ID.

param: {Object} state Editor state.
return: {string} The current slug to be displayed in the editor

getPermalinkParts(state)   X-Ref
Returns the permalink for a post, split into it's three parts: the prefix,
the postName, and the suffix.

param: {Object} state Editor state.
return: {Object} An object containing the prefix, postName, and suffix for

isPostLocked(state)   X-Ref
Returns whether the post is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostSavingLocked(state)   X-Ref
Returns whether post saving is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostAutosavingLocked(state)   X-Ref
Returns whether post autosaving is locked.

param: {Object} state Global application state.
return: {boolean} Is locked.

isPostLockTakeover(state)   X-Ref
Returns whether the edition of the post has been taken over.

param: {Object} state Global application state.
return: {boolean} Is post lock takeover.

getPostLockUser(state)   X-Ref
Returns details about the post lock user.

param: {Object} state Global application state.
return: {Object} A user object.

getActivePostLock(state)   X-Ref
Returns the active post lock.

param: {Object} state Global application state.
return: {Object} The lock object.

canUserUseUnfilteredHTML(state)   X-Ref
Returns whether or not the user has the unfiltered_html capability.

param: {Object} state Editor state.
return: {boolean} Whether the user can or can't post unfiltered HTML.

getEditorBlocks(state)   X-Ref
Return the current block list.

param: {Object} state
return: {Array} Block list.

getEditorSelectionStart(state)   X-Ref
Returns the current selection start.

param: {Object} state
return: {WPBlockSelection} The selection start.

getEditorSelectionEnd(state)   X-Ref
Returns the current selection end.

param: {Object} state
return: {WPBlockSelection} The selection end.

getEditorSelection(state)   X-Ref
Returns the current selection.

param: {Object} state
return: {WPBlockSelection} The selection end.

__unstableIsEditorReady(state)   X-Ref
Is the editor ready

param: {Object} state
return: {boolean} is Ready.

getEditorSettings(state)   X-Ref
Returns the post editor settings.

param: {Object} state Editor state.
return: {Object} The editor settings object.

getStateBeforeOptimisticTransaction()   X-Ref
Returns state object prior to a specified optimist transaction ID, or `null`
if the transaction corresponding to the given ID cannot be found.


inSomeHistory()   X-Ref
Returns true if an optimistic transaction is pending commit, for which the
before state satisfies the given predicate function.


getBlockEditorSelector(name)   X-Ref
No description

__experimentalGetDefaultTemplateTypes(state)   X-Ref
Returns the default template types.

param: {Object} state Global application state.
return: {Object} The template types.

__experimentalGetTemplateInfo(state, template)   X-Ref
Given a template entity, return information about it which is ready to be
rendered, such as the title, description, and icon.

param: {Object} state    Global application state.
param: {Object} template The template for which we need information.
return: {Object} Information about the template, including title, description, and icon.

postKey(postId, isPostNew)   X-Ref
Function returning a sessionStorage key to set or retrieve a given post's
automatic session backup.

Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's
`loggedout` handler can clear sessionStorage of any user-private content.

param: {string}  postId    Post ID.
param: {boolean} isPostNew Whether post new.
return: {string} sessionStorage key

localAutosaveGet(postId, isPostNew)   X-Ref
No description

localAutosaveSet(postId, isPostNew, title, content, excerpt)   X-Ref
No description

localAutosaveClear(postId, isPostNew)   X-Ref
No description

getNotificationArgumentsForSaveSuccess(data)   X-Ref
Builds the arguments for a success notification dispatch.

param: {Object} data Incoming data to build the arguments from.
return: {Array} Arguments for dispatch. An empty array signals no

getNotificationArgumentsForSaveFail(data)   X-Ref
Builds the fail notification arguments for dispatch.

param: {Object} data Incoming data to build the arguments with.
return: {Array} Arguments for dispatch. An empty array signals no

getNotificationArgumentsForTrashFail(data)   X-Ref
Builds the trash fail notification arguments for dispatch.

param: {Object} data
return: {Array} Arguments for dispatch.

__experimentalTearDownEditor()   X-Ref
Returns an action object signalling that the editor is being destroyed and
that any necessary state or side-effect cleanup should occur.

return: {Object} Action object.

resetPost()   X-Ref
Returns an action object used in signalling that the latest version of the
post has been received, either by initialization or save.


updatePost()   X-Ref
Returns an action object used in signalling that a patch of updates for the
latest version of the post have been received.

return: {Object} Action object.

setupEditorState(post)   X-Ref
Returns an action object used to setup the editor state when first opening
an editor.

param: {Object} post Post object.
return: {Object} Action object.

refreshPost()   X-Ref
Action for refreshing the current post.


createUndoLevel()   X-Ref
Action that creates an undo history record.


updatePostLock(lock)   X-Ref
Action that locks the editor.

param: {Object} lock Details about the post lock status, user, and nonce.
return: {Object} Action object.

lockPostSaving(lockName)   X-Ref
Action that locks post saving.

param: {string} lockName The lock name.
return: {Object} Action object

unlockPostSaving(lockName)   X-Ref
Action that unlocks post saving.

param: {string} lockName The lock name.
return: {Object} Action object

lockPostAutosaving(lockName)   X-Ref
Action that locks post autosaving.

param: {string} lockName The lock name.
return: {Object} Action object

unlockPostAutosaving(lockName)   X-Ref
Action that unlocks post autosaving.

param: {string} lockName The lock name.
return: {Object} Action object

updateEditorSettings(settings)   X-Ref
No description

shimAttributeSource(settings)   X-Ref
Filters a registered block's settings to enhance a block's `edit` component
to upgrade meta-sourced attributes to use the post's meta entity property.

param: {WPBlockSettings} settings Registered block settings.
return: {WPBlockSettings} Filtered block settings.

getUserLabel(user)   X-Ref
No description

setDefaultCompleters()   X-Ref
No description



Generated: Tue Dec 3 01:00:02 2024 Cross-referenced by PHPXref 0.7.1