[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/ -> admin-bar.js (summary)

(no description)

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

Defines 12 functions

  removeHoverIfEscape()
  toggleHoverIfEnter()
  focusTargetAfterEnter()
  mobileHover()
  clickShortlink()
  emptySessionStorage()
  hasClass()
  addClass()
  removeClass()
  removeAllHoverClass()
  scrollToTop()
  getClosest()

Functions
Functions that are not part of a class:

removeHoverIfEscape( event )   X-Ref
Remove hover class for top level menu item when escape is pressed.

since: 5.3.1
param: {Event} event The keydown event.

toggleHoverIfEnter( event )   X-Ref
Toggle hover class for top level menu item when enter is pressed.

since: 5.3.1
param: {Event} event The keydown event.

focusTargetAfterEnter( event )   X-Ref
Focus the target of skip link after pressing Enter.

since: 5.3.1
param: {Event} event The keydown event.

mobileHover( topMenuItems, event )   X-Ref
Toogle hover class for mobile devices.

since: 5.3.1
param: {NodeList} topMenuItems All menu items.
param: {Event} event The click event.

clickShortlink( event )   X-Ref
Handles the click on the Shortlink link in the adminbar.

return: {boolean} Returns false to prevent default click behavior.
since: 3.1.0
since: 5.3.1 Use querySelector to clean up the function.
param: {Event} event The click event.

emptySessionStorage()   X-Ref
Clear sessionStorage on logging out.

since: 5.3.1

hasClass( element, className )   X-Ref
Check if element has class.

return: {boolean} Whether the element has the className.
since: 5.3.1
param: {HTMLElement} element The HTML element.
param: {string}      className The class name.

addClass( element, className )   X-Ref
Add class to an element.

since: 5.3.1
param: {HTMLElement} element The HTML element.
param: {string}      className The class name.

removeClass( element, className )   X-Ref
Remove class from an element.

since: 5.3.1
param: {HTMLElement} element The HTML element.
param: {string}      className The class name.

removeAllHoverClass( topMenuItems )   X-Ref
Remove hover class for all menu items.

since: 5.3.1
param: {NodeList} topMenuItems All menu items.

scrollToTop( event )   X-Ref
Scrolls to the top of the page.

return: {void}
since: 3.4.0
param: {Event} event The Click event.

getClosest( el, selector )   X-Ref
Get closest Element.

since: 5.3.1
param: {HTMLElement} el Element to get parent.
param: {string} selector CSS selector to match.



Generated: Tue Oct 8 01:00:02 2024 Cross-referenced by PHPXref 0.7.1