* Update translation text domain * Escape everything that should be escaped. * Add nonce checks where needed. * Sanitize all inputs. * Apply Code style changes across the codebase. * Correct many deprecation notices. * Optimize load order of many filters. * Add Proper Build script * Use emojii flags * Fix i18n deprecation notice for translating too early * Put all scripts in footer and load async
2 lines
1.2 KiB
JavaScript
2 lines
1.2 KiB
JavaScript
(t=>{t(document).ready(function(){_.each(wu_tours,function(e,u){window[u]=new Shepherd.Tour({useModalOverlay:!0,includeStyles:!1,styleVariables:{arrowSize:1.1},defaultStepOptions:{classes:"wu-p-2 wu-bg-white wu-shadow-sm wu-rounded wu-text-left wu-text-gray-700",scrollTo:{block:"center",behavior:"smooth"},tippyOptions:{zIndex:999999,onCreate(t){t.popper.classList.add("wu-styling");t=t.popperChildren.content.children[0].children[0].children;t[0].children[0]&&t[0].children[0].classList.add("wu-p-2","wu-pb-0","wu-m-0","wu--mb-1","wu-text-gray-800"),t[1].classList.add("wu-p-2"),t[2].classList.add("wu--mt-1","wu-p-2","wu-bg-gray-200","wu-rounded","wu-text-right")}}}}),window[u].on("complete",function(){t.ajax({url:ajaxurl,data:{action:"wu_mark_tour_as_finished",tour_id:u,nonce:wu_tours_vars.nonce}})}),_.each(e,function(t,n){n=n+1===e.length;t.buttons=_.isArray(t.buttons)?t.buttons:[],t.buttons=_.map(t.buttons,function(t){var n,e;return t.action=([n,e="_blank"]=[t.url,t.target],()=>{window.open(n,e)}),t}),window[u].addStep({...t,buttons:[...t.buttons,{classes:"button button-primary wu-text-xs sm:wu-normal-case",text:n?wu_tours_vars.i18n.finish:wu_tours_vars.i18n.next,action:window[u].next}]})}),window[u].start()})})})(jQuery);
|