: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
import tippy from 'tippy.js';
import '../scss/otgsPopoverTooltip.scss';
window.addEventListener("DOMContentLoaded", () => {
* @param {Element} element
export function initSingle(element) {
* @see https://atomiks.github.io/tippyjs/#all-options
* @type {{arrow: boolean, theme: string, animation: string, sticky: boolean, interactive: boolean}}
if ( !element.getAttribute('data-tippy-content') && element.getAttribute('title') ) {
args.content = element.getAttribute('title');
element.removeAttribute('title');
export function initialize() {
* @param {NodeList} elements
//TODO change all .wpml-popover to otgs-popover
const elements = [...document.querySelectorAll('.js-otgs-popover-tooltip, .js-wpml-popover-tooltip')];
* @param {Element} element
elements.forEach(element => initSingle(element));