[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/js/ -> common.js (summary)

(no description)

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

Defines 20 functions

  deprecatedProperty()
  deprecateL10nObject()
  changeStructureTagButtonState()
  currentMenuItemHasPopup()
  adjustSubmenu()
  makeNoticesDismissible()
  marryControls()
  updateTopSelector()
  updateBottomSelector()
  triggerSubmitClick()
  toggleUploadButton()
  pinMenu()
  resetHeights()
  unpinMenu()
  setPinMenu()
  aria_button_if_js()
  getViewportWidth()
  setMenuState()
  triggerEvent()
  fireOnce()

Functions
Functions that are not part of a class:

deprecatedProperty( propName, version, replacement )   X-Ref
Throws an error for a deprecated property.

since: 5.5.1
param: {string} propName    The property that was used.
param: {string} version     The version of WordPress that deprecated the property.
param: {string} replacement The property that should have been used.

deprecateL10nObject( name, l10nObject, version )   X-Ref
Deprecate all properties on an object.

since: 5.5.1
since: 5.6.0 Added the `version` parameter.
return: {object} The object with all its properties deprecated.
param: {string} name       The name of the object, i.e. commonL10n.
param: {object} l10nObject The object to deprecate the properties on.
param: {string} version    The version of WordPress that deprecated the property.

changeStructureTagButtonState( button )   X-Ref
Enables or disables a structure tag button depending on its usage.

If the structure is already used in the custom permalink structure,
it will be disabled.

param: {Object} button Button jQuery object.

currentMenuItemHasPopup()   X-Ref
Handles the `aria-haspopup` attribute on the current menu item when it has a submenu.

since: 4.4.0
return: {void}

adjustSubmenu( $menuItem )   X-Ref
Ensures an admin submenu is within the visual viewport.

since: 4.1.0
return: {void}
param: {jQuery} $menuItem The parent menu item containing the submenu.

makeNoticesDismissible()   X-Ref
Makes notices dismissible.

since: 4.4.0
return: {void}

marryControls( topSelector, topSubmit, bottomSelector, bottomSubmit )   X-Ref
Marries a secondary control to its primary control.

return: {void}
param: {jQuery} topSelector    The top selector element.
param: {jQuery} topSubmit      The top submit element.
param: {jQuery} bottomSelector The bottom selector element.
param: {jQuery} bottomSubmit   The bottom submit element.

updateTopSelector()   X-Ref
Updates the primary selector when the secondary selector is changed.

since: 5.7.0
return: {void}

updateBottomSelector()   X-Ref
Updates the secondary selector when the primary selector is changed.

since: 5.7.0
return: {void}

triggerSubmitClick(e)   X-Ref
Triggers the primary submit when then secondary submit is clicked.

since: 5.7.0
return: {void}

toggleUploadButton()   X-Ref
Determines if any data is entered in any file upload input.

since: 3.5.0
return: {void}

pinMenu( event )   X-Ref
Pins the menu while distraction-free writing is enabled.

since: 4.1.0
return: {void}
param: {Event} event Event data.

resetHeights()   X-Ref
Determines the height of certain elements.

since: 4.1.0
return: {void}

unpinMenu()   X-Ref
Unpins the menu.

since: 4.1.0
return: {void}

setPinMenu()   X-Ref
Pins and unpins the menu when applicable.

since: 4.1.0
return: {void}

aria_button_if_js()   X-Ref
Add an ARIA role `button` to elements that behave like UI controls when JavaScript is on.

since: 4.5.0
return: {void}

getViewportWidth()   X-Ref
Get the viewport width.

since: 4.7.0
return: {number|boolean} The current viewport width or false if the

setMenuState()   X-Ref
Sets the admin menu collapsed/expanded state.

Sets the global variable `menuState` and triggers a custom event passing
the current menu state.

since: 4.7.0
return: {void}

triggerEvent()   X-Ref
No description

fireOnce()   X-Ref
Fires the trigger event again after 200 ms.

since: 3.8.0
return: {void}



Generated: Mon Oct 14 01:00:02 2024 Cross-referenced by PHPXref 0.7.1