diff --git a/build/block-finder-rtl.css b/build/block-finder-rtl.css index df5d575..d18d41e 100644 --- a/build/block-finder-rtl.css +++ b/build/block-finder-rtl.css @@ -1 +1 @@ -#block-finder-form label{padding-bottom:16px}#block-finder-selector,#post-type-selector{display:block;margin-bottom:10px;max-width:400px;padding:5px;width:100%}#block-finder-results{background-color:#f2f2f2;margin-top:15px}#block-finder-results h3{border-bottom:1px solid #b9b9b9;font-weight:700;margin:0;padding:14px 12px}#block-finder-results ul{list-style-type:none;margin:0;padding:0}#block-finder-results li{border-bottom:1px dotted #b9b9b9;display:flex;gap:8px;margin-bottom:0;padding:14px 12px}#block-finder-results li:last-child{border-bottom:none}#block-finder-results span{align-items:center;display:flex;gap:8px;margin-right:auto}#block-finder-results a{color:#0073aa;font-weight:500;text-decoration:none}#block-finder-results a:last-child{border-right:1px solid #b9b9b9;padding-right:8px}#block-finder-results a:hover{text-decoration:underline} +#block-finder-form label{padding-bottom:16px}#block-finder-selector,#post-type-selector{display:block;margin-bottom:10px;max-width:400px;padding:2px 8px;width:100%}#block-results-loading{padding:14px 12px}#block-finder-results{background-color:#f2f2f2;margin-top:15px}#block-finder-results h3{border-bottom:1px solid #b9b9b9;font-weight:700;margin:0;padding:14px 12px}#block-finder-results ul{list-style-type:none;margin:0;padding:0}#block-finder-results li{border-bottom:1px dotted #b9b9b9;display:flex;gap:8px;margin-bottom:0;padding:14px 12px}#block-finder-results li:last-child{border-bottom:none}#block-finder-results span{align-items:center;display:flex;gap:8px;margin-right:auto}#block-finder-results a{color:#0073aa;font-weight:500;text-decoration:none}#block-finder-results a:last-child{border-right:1px solid #b9b9b9;padding-right:8px}#block-finder-results a:hover{text-decoration:underline} diff --git a/build/block-finder.asset.php b/build/block-finder.asset.php index 8f4900d..5c3ca5f 100644 --- a/build/block-finder.asset.php +++ b/build/block-finder.asset.php @@ -1 +1 @@ - array(), 'version' => '677f28795b4f66f7d30f'); + array(), 'version' => '8ba02d3ad6c07bef19ba'); diff --git a/build/block-finder.css b/build/block-finder.css index 7bce2ce..ecb94cf 100644 --- a/build/block-finder.css +++ b/build/block-finder.css @@ -1 +1 @@ -#block-finder-form label{padding-bottom:16px}#block-finder-selector,#post-type-selector{display:block;margin-bottom:10px;max-width:400px;padding:5px;width:100%}#block-finder-results{background-color:#f2f2f2;margin-top:15px}#block-finder-results h3{border-bottom:1px solid #b9b9b9;font-weight:700;margin:0;padding:14px 12px}#block-finder-results ul{list-style-type:none;margin:0;padding:0}#block-finder-results li{border-bottom:1px dotted #b9b9b9;display:flex;gap:8px;margin-bottom:0;padding:14px 12px}#block-finder-results li:last-child{border-bottom:none}#block-finder-results span{align-items:center;display:flex;gap:8px;margin-left:auto}#block-finder-results a{color:#0073aa;font-weight:500;text-decoration:none}#block-finder-results a:last-child{border-left:1px solid #b9b9b9;padding-left:8px}#block-finder-results a:hover{text-decoration:underline} +#block-finder-form label{padding-bottom:16px}#block-finder-selector,#post-type-selector{display:block;margin-bottom:10px;max-width:400px;padding:2px 8px;width:100%}#block-results-loading{padding:14px 12px}#block-finder-results{background-color:#f2f2f2;margin-top:15px}#block-finder-results h3{border-bottom:1px solid #b9b9b9;font-weight:700;margin:0;padding:14px 12px}#block-finder-results ul{list-style-type:none;margin:0;padding:0}#block-finder-results li{border-bottom:1px dotted #b9b9b9;display:flex;gap:8px;margin-bottom:0;padding:14px 12px}#block-finder-results li:last-child{border-bottom:none}#block-finder-results span{align-items:center;display:flex;gap:8px;margin-left:auto}#block-finder-results a{color:#0073aa;font-weight:500;text-decoration:none}#block-finder-results a:last-child{border-left:1px solid #b9b9b9;padding-left:8px}#block-finder-results a:hover{text-decoration:underline} diff --git a/build/block-finder.js b/build/block-finder.js index 94e3d04..d55bd9f 100644 --- a/build/block-finder.js +++ b/build/block-finder.js @@ -1 +1 @@ -(()=>{"use strict";document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("block-finder-form");e.addEventListener("submit",(async t=>{t.preventDefault();const n=document.getElementById("post-type-selector"),o=document.getElementById("block-finder-selector"),d=n.value,r=o.value,c=document.getElementById("block-finder-results"),a=e.querySelector('button[type="submit"]');if(a.disabled=!0,a.textContent="Finding blocks...",c.innerHTML="

Loading results...

",""===d||""===r)return void(c.innerHTML="

Please select both a post type and a block to find.

");const s=new URLSearchParams;s.append("action","find_blocks"),s.append("post_type",d),s.append("block",r),s.append("nonce",blockFinderAjax.nonce);try{const e=await fetch(blockFinderAjax.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:s.toString()});if(e.ok){const t=await e.text();c.innerHTML=t}else{const t=await e.json();c.innerHTML=`

An error occurred: ${t.message}

`}}catch(e){c.innerHTML=`

An error occurred: ${e.message}

`}finally{a.disabled=!1,a.textContent="Find Block"}}))}))})(); \ No newline at end of file +(()=>{"use strict";document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("block-finder-form");e.addEventListener("submit",(async t=>{t.preventDefault();const n=document.getElementById("post-type-selector"),o=document.getElementById("block-finder-selector"),d=n.value,r=o.value,c=document.getElementById("block-finder-results"),a=e.querySelector('button[type="submit"]');if(a.disabled=!0,a.textContent="Finding blocks...",c.innerHTML='

Loading results...

',""===d||""===r)return void(c.innerHTML="

Please select both a post type and a block to find.

");const s=new URLSearchParams;s.append("action","find_blocks"),s.append("post_type",d),s.append("block",r),s.append("nonce",blockFinderAjax.nonce);try{const e=await fetch(blockFinderAjax.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:s.toString()});if(e.ok){const t=await e.text();c.innerHTML=t}else{const t=await e.json();c.innerHTML=`

An error occurred: ${t.message}

`}}catch(e){c.innerHTML=`

An error occurred: ${e.message}

`}finally{a.disabled=!1,a.textContent="Find Block"}}))}))})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 95abf1e..5c89d3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "block-finder", - "version": "0.1.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "block-finder", - "version": "0.1.0", + "version": "1.0.0", "license": "GPL-2.0-or-later", "devDependencies": { "@commitlint/cli": "^19.3.0", diff --git a/src/Functions.php b/src/Functions.php index 4dadebf..8c79c62 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -61,17 +61,17 @@ public function findBlockForm() }); echo '
'; - echo ''; + echo ''; echo ''; - echo ''; + echo ''; echo '