[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

(no description)

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

Defines 11 classes

autosave_monitor_AutosaveMonitor:: (14 methods):
  DocumentOutlineCheck()
  SaveShortcut()
  VisualEditorGlobalKeyboardShortcuts()
  TextEditorGlobalKeyboardShortcuts()
  EditorKeyboardShortcutsRegister()
  EditorHistoryRedo()
  EditorHistoryUndo()
  TemplateValidationNotice()
  EditorNotices()
  EditorSnackbars()
  EntityRecordItem()
  EntityTypeList()
  EntitiesSavedStates()
  CopyButton()

error_boundary_ErrorBoundary:: (25 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()
  writeInterstitialMessage()

post_preview_button_PostPreviewButton:: (8 methods):
  PostLockedModal()
  sendPostLock()
  receivePostLock()
  releasePostLock()
  PostPendingStatusCheck()
  PostPendingStatus()
  PostPingbacks()
  PublishButtonLabel()

post_publish_button_PostPublishButton:: (0 methods):

post_visibility_PostVisibility:: (6 methods):
  PostVisibilityLabel()
  getDayOfTheMonth()
  PostSchedule()
  onChange()
  PostScheduleLabel()
  MostUsedTerms()

flat_term_selector_FlatTermSelector:: (0 methods):

maybe_tags_panel_MaybeTagsPanel:: (3 methods):
  PostFormatPanel()
  PostPublishPanelPrepublish()
  postpublish_CopyButton()

postpublish_PostPublishPanelPostpublish:: (0 methods):

post_publish_panel_PostPublishPanel:: (4 methods):
  PostSwitchToDraftButton()
  PostSavedState()
  PostScheduleCheck()
  PostSlugCheck()

post_slug_PostSlug:: (2 methods):
  PostStickyCheck()
  PostSticky()

hierarchical_term_selector_HierarchicalTermSelector:: (37 methods):
  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()
  lineHeight()
  classNames()
  Icon()
  arrayOf()
  isObjectLike()
  createCache()
  isShallowEqual()
  getRootCache()
  getWeakMapCache()
  clear()
  callSelector()
  _extends()

Defines 37 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  emptyFunction()
  emptyFunctionWithReset()
  shim()
  getShim()
  __()
  TextareaAutosizeClass()
  assign()
  init()
  changeOverflow()
  getParentOverflows()
  resize()
  update()
  destroy()
  update()
  shimAttributeSource()
  setDefaultCompleters()
  getPostRawValue()
  hasSameKeys()
  isUpdatingSamePostProperty()
  shouldOverwriteState()
  reducer_postId()
  reducer_postType()
  reducer_template()
  preferences()
  saving()
  postLock()
  postSavingLock()
  postAutosavingLock()
  reducer_isReady()
  reducer_editorSettings()
  getWPAdminURL()
  cleanForSlug()
  getTemplatePartIcon()
  selectors_isEditedPostNew()
  hasChangedContent()
  selectors_isCleanNewPost()
  selectors_getCurrentPostType()
  selectors_getCurrentPostId()
  getCurrentPostRevisionsCount()
  getCurrentPostLastRevisionId()
  selectors_getCurrentPostAttribute()
  selectors_getEditedPostAttribute()
  selectors_getEditedPostVisibility()
  isCurrentPostPending()
  selectors_isCurrentPostPublished()
  selectors_isCurrentPostScheduled()
  selectors_isEditedPostPublishable()
  selectors_isEditedPostSaveable()
  isEditedPostEmpty()
  selectors_isEditedPostBeingScheduled()
  isEditedPostDateFloating()
  selectors_isAutosavingPost()
  isPreviewingPost()
  selectors_getEditedPostPreviewLink()
  selectors_getSuggestedPostFormat()
  getBlocksForSerialization()
  selectors_isPublishingPost()
  isPermalinkEditable()
  getPermalink()
  getEditedPostSlug()
  getPermalinkParts()
  selectors_isPostLocked()
  selectors_isPostSavingLocked()
  isPostAutosavingLocked()
  isPostLockTakeover()
  getPostLockUser()
  getActivePostLock()
  selectors_canUserUseUnfilteredHTML()
  selectors_isPublishSidebarEnabled()
  getEditorBlocks()
  getEditorSelectionStart()
  getEditorSelectionEnd()
  selectors_getEditorSelection()
  selectors_unstableIsEditorReady()
  selectors_getEditorSettings()
  getStateBeforeOptimisticTransaction()
  inSomeHistory()
  getBlockEditorSelector()
  __experimentalGetDefaultTemplateTypes()
  __experimentalGetTemplateInfo()
  getNotificationArgumentsForSaveSuccess()
  getNotificationArgumentsForSaveFail()
  getNotificationArgumentsForTrashFail()
  actions_experimentalTearDownEditor()
  resetPost()
  __experimentalRequestPostUpdateStart()
  __experimentalRequestPostUpdateFinish()
  updatePost()
  setupEditorState()
  createUndoLevel()
  actions_updatePostLock()
  enablePublishSidebar()
  disablePublishSidebar()
  lockPostSaving()
  unlockPostSaving()
  lockPostAutosaving()
  unlockPostAutosaving()
  actions_updateEditorSettings()
  postKey()
  localAutosaveGet()
  localAutosaveSet()
  localAutosaveClear()

Class: autosave_monitor_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({blocks,children})   X-Ref
No description

SaveShortcut({resetBlocksOnSave})   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({isValid,...props})   X-Ref
No description

EditorNotices({notices,onRemove})   X-Ref
Internal dependencies


EditorSnackbars()   X-Ref
No description

EntityRecordItem({record,checked,onChange,closePanel})   X-Ref
No description

EntityTypeList({list,unselectedEntities,setUnselectedEntities,closePanel})   X-Ref
No description

EntitiesSavedStates({close})   X-Ref
No description

CopyButton({text,children})   X-Ref
No description

Class: error_boundary_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({children})   X-Ref
Internal dependencies


PostTypeSupportCheck({postType,children,supportKeys})   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({})   X-Ref
Internal dependencies


PostAuthorCombobox()   X-Ref
No description

PostAuthorSelect()   X-Ref
No description

PostAuthor()   X-Ref
No description

PostAuthorCheck({hasAssignAuthorAction,authors,children})   X-Ref
Internal dependencies


PostComments({commentStatus = 'open',...props})   X-Ref
No description

PostExcerpt({excerpt,onUpdateExcerpt})   X-Ref
No description

PostExcerptCheck(props)   X-Ref
Internal dependencies


ThemeSupportCheck({themeSupports,children,postType,supportKeys})   X-Ref
WordPress dependencies


PostFeaturedImageCheck(props)   X-Ref
No description

PostFeaturedImage({currentPostId,featuredImageId,onUpdateImage,onDropImage,onRemoveImage,media,postType,noticeUI})   X-Ref
No description

PostFormatCheck({disablePostFormats,...props})   X-Ref
No description

PostFormat()   X-Ref
No description

PostLastRevisionCheck({lastRevisionId,revisionsCount,children})   X-Ref
Internal dependencies


LastRevision({lastRevisionId,revisionsCount})   X-Ref
No description

writeInterstitialMessage(targetDocument)   X-Ref
No description

Class: post_preview_button_PostPreviewButton  - X-Ref

PostLockedModal()   X-Ref
No description

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({hasPublishAction,isPublished,children})   X-Ref
No description

PostPendingStatus({status,onUpdateStatus})   X-Ref
Internal dependencies


PostPingbacks({pingStatus = 'open',...props})   X-Ref
No description

PublishButtonLabel({isPublished,isBeingScheduled,isSaving,isPublishing,hasPublishAction,isAutosaving,hasNonPostEntityChanges})   X-Ref
No description

Class: post_publish_button_PostPublishButton  - X-Ref

Internal dependencies

Class: post_visibility_PostVisibility  - X-Ref

Internal dependencies

PostVisibilityLabel({visibility})   X-Ref
No description

getDayOfTheMonth(date = new Date()   X-Ref
No description

PostSchedule()   X-Ref
No description

onChange(newDate)   X-Ref
No description

PostScheduleLabel({date,isFloating})   X-Ref
No description

MostUsedTerms({onSelect,taxonomy})   X-Ref
No description

Class: flat_term_selector_FlatTermSelector  - X-Ref

Class: maybe_tags_panel_MaybeTagsPanel  - X-Ref

PostFormatPanel()   X-Ref
No description

PostPublishPanelPrepublish({children})   X-Ref
No description

postpublish_CopyButton({text,onCopy,children})   X-Ref
No description

Class: postpublish_PostPublishPanelPostpublish  - X-Ref

Class: post_publish_panel_PostPublishPanel  - X-Ref

PostSwitchToDraftButton({isSaving,isPublished,isScheduled,onClick})   X-Ref
No description

PostSavedState({forceIsDirty,forceIsSaving,showIconLabels = false})   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({hasPublishAction,children})   X-Ref
No description

PostSlugCheck({children})   X-Ref
Internal dependencies


Class: post_slug_PostSlug  - X-Ref

PostStickyCheck({hasStickyAction,postType,children})   X-Ref
No description

PostSticky({onUpdateSticky,postSticky = false})   X-Ref
Internal dependencies


Class: hierarchical_term_selector_HierarchicalTermSelector  - X-Ref

PostTaxonomies({postType,taxonomies,taxonomyWrapper = external_lodash_["identity"]})   X-Ref
No description

PostTaxonomiesCheck({postType,taxonomies,children})   X-Ref
No description

PostTextEditor()   X-Ref
No description

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(event)   X-Ref
No description

onKeyDown(event)   X-Ref
No description

onPaste(event)   X-Ref
No description

PostTrash({isNew,postId,postType,...props})   X-Ref
No description

PostTrashCheck({isNew,postId,canUserDelete,children})   X-Ref
WordPress dependencies


PostVisibilityCheck({hasPublishAction,render})   X-Ref
No description

WordCount()   X-Ref
No description

CharacterCount()   X-Ref
WordPress dependencies


TableOfContentsPanel({hasOutlineItemsDisabled,onRequestClose})   X-Ref
No description

TableOfContents({hasOutlineItemsDisabled,repositionDropdown,...props}, 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({additionalData = {},allowedTypes,filesList,maxUploadFileSize,onError = external_lodash_["noop"],onFileChange})   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({__unstableTemplate,post,settings,recovery,initialEdits,children})   X-Ref
No description

deprecateComponent(name, Wrapped, staticsToHoist = [])   X-Ref
No description

deprecateFunction(name, func)   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.

classNames()   X-Ref
No description

Icon({icon,size = 24,...props})   X-Ref
Return an SVG icon.

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

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.

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.

_extends()   X-Ref
No description

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

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


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

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.

setDefaultCompleters(completers = [])   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.

reducer_postId(state = null, action)   X-Ref
No description

reducer_postType(state = null, action)   X-Ref
No description

reducer_template(state = {isValid: true}, action)   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.

preferences(state = PREFERENCES_DEFAULTS, action)   X-Ref
Reducer returning the user preferences.

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

saving(state = {}, action)   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(state = {isLocked: false}, action)   X-Ref
Reducer returning the post lock status.

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

postSavingLock(state = {}, action)   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(state = {}, action)   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.

reducer_isReady(state = false, action)   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.

reducer_editorSettings(state = EDITOR_SETTINGS_DEFAULTS, action)   X-Ref
Reducer returning the post editor setting.

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

getWPAdminURL(page, query)   X-Ref
Returns the URL of a WPAdmin Page.

TODO: This should be moved to a module less specific to the editor.

param: {string} page  Page to navigate to.
param: {Object} query Query Args.
return: {string} WPAdmin URL.

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

getBlocksForSerialization(state)   X-Ref
Returns a set of blocks which are to be used in consideration of the post's
generated save content.

param: {Object} state Editor state.
return: {WPBlock[]} Filtered set of blocks for save.

selectors_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

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

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

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

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

selectors_isPublishSidebarEnabled(state)   X-Ref
Returns whether the pre-publish panel should be shown
or skipped when the user clicks the "publish" button.

param: {Object} state Global application state.
return: {boolean} Whether the pre-publish panel should be shown or not.

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.

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

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

selectors_unstableIsEditorReady(state)   X-Ref
Is the editor ready

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

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

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.

actions_experimentalTearDownEditor()   X-Ref
No description

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

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

__experimentalRequestPostUpdateStart(options = {})   X-Ref
No description

__experimentalRequestPostUpdateFinish(options = {})   X-Ref
Action for dispatching that a post update request has finished.

param: {Object} options
return: {Object} An action object

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.

createUndoLevel()   X-Ref
No description

actions_updatePostLock(lock)   X-Ref
Returns an action object used to lock the editor.

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

enablePublishSidebar()   X-Ref
Returns an action object used in signalling that the user has enabled the
publish sidebar.

return: {Object} Action object

disablePublishSidebar()   X-Ref
Returns an action object used in signalling that the user has disabled the
publish sidebar.

return: {Object} Action object

lockPostSaving(lockName)   X-Ref
Returns an action object used to signal that post saving is locked.

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

unlockPostSaving(lockName)   X-Ref
Returns an action object used to signal that post saving is unlocked.

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

lockPostAutosaving(lockName)   X-Ref
Returns an action object used to signal that post autosaving is locked.

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

unlockPostAutosaving(lockName)   X-Ref
Returns an action object used to signal that post autosaving is unlocked.

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

actions_updateEditorSettings(settings)   X-Ref
No description

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



Generated : Sat Jul 24 08:20:02 2021 Cross-referenced by PHPXref