[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

(no description)

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

Defines 14 functions

  changeStructureTagButtonState()
  currentMenuItemHasPopup()
  adjustSubmenu()
  makeNoticesDismissible()
  toggleUploadButton()
  pinMenu()
  resetHeights()
  unpinMenu()
  setPinMenu()
  aria_button_if_js()
  getViewportWidth()
  setMenuState()
  triggerEvent()
  fireOnce()

Functions
Functions that are not part of a class:

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.

returns: {void}
since: 4.4.0

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

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

makeNoticesDismissible()   X-Ref
Makes notices dismissible.

returns: {void}
since: 4.4.0

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

returns: {void}
since: 3.5.0

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

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

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

returns: {void}
since: 4.1.0

unpinMenu()   X-Ref
Unpins the menu.

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.1.0

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

returns: {void}
since: 4.5.0

getViewportWidth()   X-Ref
Get the viewport width.

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

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.

returns: {void}
since: 4.7.0

triggerEvent()   X-Ref
Triggers the WP window-resize event.

returns: {void}
since: 3.8.0

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

returns: {void}
since: 3.8.0



Generated: Tue Sep 17 01:00:03 2019 Cross-referenced by PHPXref 0.7.1