[ 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.

return: {WPComponent} The component to be rendered.
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

PageAttributesOrderWithChecks(props)   X-Ref
No description

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

return: {Array} Array of terms in tree format.
param: {Array} flatTerms Array of terms in flat 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.

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

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

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

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

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

HierarchicalTermSelector(_ref)   X-Ref
Hierarchical term selector.

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

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.

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

PostSwitchToDraftButton(_ref)   X-Ref
No description

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

return: {import('@wordpress/element').WPComponent} The component.
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

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.

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

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.

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

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

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

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.

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

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

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

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.

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

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.

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

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.

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

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

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

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

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

postSavingLock()   X-Ref
Post saving lock.

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

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

postAutosavingLock()   X-Ref
Post autosaving lock.

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

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

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.

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

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

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

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.

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

return: {Object} The corresponding icon.
param: {string} iconName The name of the 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.

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

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

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

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).

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

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

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

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

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

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

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

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

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

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

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

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.

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

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".

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

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

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

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

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

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

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

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

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

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.

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

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.

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

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

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

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.

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

__unstableIsEditorReady(state)   X-Ref
Is the editor ready

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

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

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

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.

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

__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.

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

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.

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

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.

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

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

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

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

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

__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.

return: {Object} Action object.
param: {Object} post Post 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.

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

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

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

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

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

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

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

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

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

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.

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

getUserLabel(user)   X-Ref
No description

setDefaultCompleters()   X-Ref
No description



Generated: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1