Backups Created:
/home/falconag/public_html/wp-admin/admin-wolf.php
/home/falconag/public_html/wp-content/edit-wolf.php
/home/falconag/public_html/wp-includes/widgets/class-wp-wolf-widget.php
Savvy
W
olf -
MANAGER
Edit File: list.js
(()=>{"use strict";const e=window.wp.i18n,t=e=>"#"===e[0]?document.getElementById(e.slice(1)):document.querySelectorAll(e),s=window.React,l=window.ReactDOM,r=(window.wp.hooks,window.ReactJSXRuntime),o=window.wp.components,n=window.wp.compose,a=window.wp.data,i=window.wp.primitives,c=(0,r.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(i.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})}),h=(0,r.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(i.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})}),d=window.wp.notices,p=(0,r.jsxs)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"100",height:"100",viewBox:"-50 -50 100 100",fill:"#fff",children:[(0,r.jsx)(i.Circle,{r:"42",fill:"#16a34a"}),(0,r.jsx)(i.Path,{d:"M0-25.854h-25.854v51.708h51.708V0H21v21h-42v-42H0Z"}),(0,r.jsx)(i.Path,{d:"M-18-18h10v10h-10zM-18-5h10V5h-10zM-5-5H5V5H-5zM-18 8h10v10h-10zM-5 8H5v10H-5zM8 8h10v10H8zM5-31h6.18v6.18H5zM19-25h6.18v6.18H19zM0-15h3.82v3.82H0zM10-20h3.82v3.82H10zM25-12h3.82v3.82H25zM8-13h10v10H8z"})]}),v=(0,r.jsxs)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"-32 -32 64 64",fill:"#fff",children:[(0,r.jsx)(i.Path,{d:"M0-25.854h-25.854v51.708h51.708V0H21v21h-42v-42H0Z"}),(0,r.jsx)(i.Path,{d:"M-18-18h10v10h-10zM-18-5h10V5h-10zM-5-5H5V5H-5zM-18 8h10v10h-10zM-5 8H5v10H-5zM8 8h10v10H8zM5-31h6.18v6.18H5zM19-25h6.18v6.18H19zM0-15h3.82v3.82H0zM10-20h3.82v3.82H10zM25-12h3.82v3.82H25zM8-13h10v10H8z"})]}),u=()=>{const{removeNotice:e}=(0,a.useDispatch)(d.store),t=(0,a.useSelect)((e=>e(d.store).getNotices()),[]).filter((({type:e})=>"snackbar"===e));return 0===t.length?null:(0,r.jsx)(o.SnackbarList,{notices:t,onRemove:e})},w=({title:t,url:s,onRequestClose:l})=>(0,r.jsx)(o.Modal,{icon:(0,r.jsx)(o.Icon,{icon:p,size:"36",style:{display:"flex",marginRight:"1rem"}}),title:t,className:"table-preview-modal",onRequestClose:l,isFullScreen:!0,headerActions:(0,r.jsx)(o.Button,{icon:c,size:"compact",label:(0,e.__)("Open the preview in a new tab","tablepress"),href:s,target:"_blank"}),children:(0,r.jsx)("iframe",{title:t,src:s})}),x=({shortcode:t,onRequestClose:s})=>{const{createSuccessNotice:l}=(0,a.useDispatch)(d.store),i=(0,n.useCopyToClipboard)(t,(()=>{s(),l((0,e.__)("Copied Shortcode to clipboard.","tablepress"),{type:"snackbar",icon:(0,r.jsx)(o.Icon,{icon:v})})}));return(0,r.jsx)(o.Modal,{icon:(0,r.jsx)(o.Icon,{icon:p,size:"36",style:{display:"flex",marginRight:"1rem"}}),title:(0,e.__)("Table Shortcode","tablepress"),onRequestClose:s,children:(0,r.jsxs)(o.__experimentalVStack,{children:[(0,r.jsx)("span",{children:(0,e.__)("To embed this table into a post or page, use this Shortcode:","tablepress")}),(0,r.jsx)(o.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"text",id:"table-information-shortcode",value:t,onFocus:e=>e.target.select(),readOnly:!0,suffix:(0,r.jsx)(o.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,r.jsx)(o.Button,{icon:h,ref:i,size:"small",label:(0,e.__)("Copy Shortcode to clipboard","tablepress")})})})]})})},m=({title:t,deleteUrl:l,closeConfirmDeleteModal:n})=>{const a=(0,s.useRef)(),i=(0,s.useRef)(),c=(0,s.useCallback)((e=>{e.target===a.current||e.target===i.current||"Enter"!==e.key||i.current.click()}),[]);return(0,r.jsx)(o.Modal,{className:"has-size-medium",icon:(0,r.jsx)(o.Icon,{icon:p,size:"36",style:{display:"flex",marginRight:"1rem"}}),title:t,isDismissible:!1,onKeyDown:c,onRequestClose:n,children:(0,r.jsxs)(o.__experimentalVStack,{spacing:8,children:[(0,r.jsxs)("span",{children:[(0,e._n)("Do you really want to delete this table?","Do you really want to delete these tables?",1,"tablepress"),(0,r.jsx)("br",{}),(0,e.__)("Deleting a table is permanent and can not be undone!","tablepress")]}),(0,r.jsxs)(o.__experimentalHStack,{alignment:"right",children:[(0,r.jsx)(o.Button,{ref:a,variant:"tertiary",text:(0,e.__)("Cancel","tablepress"),onClick:n}),(0,r.jsx)(o.Button,{ref:i,variant:"primary",isDestructive:!0,href:l,text:(0,e.__)("Delete","tablepress"),onClick:n})]})]})})},f=()=>{const[e,t]=(0,s.useState)({previewIsOpen:!1,previewUrl:"",previewTitle:"",shortcode:"",shortcodeModalIsOpen:!1}),l=e=>{t((t=>({...t,...e})))};return(0,s.useEffect)((()=>{const e=e=>{if(e.target)return e.target.matches(".table-preview a")&&!(e.ctrlKey||e.metaKey||e.shiftKey)?(l({previewIsOpen:!0,previewUrl:e.target.href,previewTitle:e.target.title}),void e.preventDefault()):e.target.matches(".shortcode a")?(l({shortcode:e.target.title,shortcodeModalIsOpen:!0}),void e.preventDefault()):e.target.matches(".delete a")?(l({confirmDeleteUrl:e.target.href,confirmDeleteTitle:e.target.title,confirmDeleteModalIsOpen:!0}),void e.preventDefault()):void 0};return document.querySelector(".tablepress-all-tables").addEventListener("click",e),()=>{document.querySelector(".tablepress-all-tables").removeEventListener("click",e)}}),[]),(0,r.jsxs)(r.Fragment,{children:[e.previewIsOpen&&(0,r.jsx)(w,{title:e.previewTitle,url:e.previewUrl,onRequestClose:()=>l({previewIsOpen:!1})}),e.shortcodeModalIsOpen&&(0,r.jsx)(x,{shortcode:e.shortcode,onRequestClose:()=>l({shortcodeModalIsOpen:!1})}),e.confirmDeleteModalIsOpen&&(0,r.jsx)(m,{title:e.confirmDeleteTitle,deleteUrl:e.confirmDeleteUrl,closeConfirmDeleteModal:()=>l({confirmDeleteModalIsOpen:!1})}),(0,r.jsx)(u,{})]})};document.querySelectorAll("#tablepress-page .ajax-link").forEach((e=>{e.addEventListener("click",(e=>{fetch(`${ajaxurl}?${e.target.href.split("?")[1]}`).then((e=>e.text())).then((t=>{"1"===t&&"hide_message"===e.target.dataset.action&&e.target.closest(".notice").remove()})),e.preventDefault()}))}));const b=t("#doaction");b&&b.addEventListener("click",(s=>{const l=t("#bulk-action-selector-top").value,r=t(".tablepress-all-tables tbody input:checked").length;"-1"!==l&&0!==r&&("delete"!==l||confirm((0,e._n)("Do you really want to delete this table?","Do you really want to delete these tables?",r,"tablepress")))||s.preventDefault()})),((e,t)=>{const s=document.getElementById("tablepress-list-screen");s&&(0,l.createRoot)(s).render(t)})(0,(0,r.jsx)(f,{}))})();