About
FreshOptimz Compatibility Extension is an extension
specifically designed for users who previously used the
FreshOptimz theme.
This extension functions to make all shortcode writing formats in the FreshOptimz template
compatible (working) with the formatting system of
NEOS.
With this extension, you do not need to make any changes to the previously written shortcode format.
Specifications
| Extension Version | 1.0 |
|---|
Installation
- Backup Theme - (More details).
-
Go to XML Editor. Search for
id='head_extensions' - You will be taken to a code line similar to the following: View.
-
Copy and paste the Extension Code below into
head_extensions. It should look something like this: View.
Extension Code<b:if cond='true' id='freshoptimz_backward_compatibility' version='1.0'> <b:if cond='data:view.isSingleItem'> <script id='w-js-freshoptimz-backward-compatibility'> /*<![CDATA[*/ (()=>{let e=window,t=document,l=e.Wi,o=l.events,n=o.beforePostBodyInitial,r=(()=>{let e=t;return(t,l,o)=>{t||(t=e);let n=t.getElementsByClassName(l),r=n.length;if(0===r)return null;if("number"==typeof o)return o<r?n[o]:null;{let i=[];for(let a=0;a<r;a++)i.push(n[a]);return i}}})(),i=(e,t)=>{let l=e.childNodes[0];l?e.insertBefore(t,l):e.appendChild(t)},a=(...e)=>{for(let t of e)t.parentNode.removeChild(t)},s=(e,...t)=>{for(let l of t)e.appendChild(l)},f=(e,t)=>{t.parentNode.insertBefore(e,t)},c=(e,...t)=>{for(let l of t)e.classList.add(l)},d=(e,...t)=>{for(let l of t)e.classList.remove(l)},u=(e,t)=>e.classList.contains(t),g=(e,t,l)=>{e.setAttribute("data-"+t,l)},m=(()=>{let e=e=>{let l=[];return t(e,l),l},t=(e,l)=>{if(8===e.nodeType)l.push(e);else{let o=e.childNodes;for(let n of o)t(n,l)}};return e})();n.add(()=>{let e=l.com,o=t.getElementById("w-post-body");{let n=e.button,p=n.def,b=r(o,"button");if(b){let w=["grey","black","green","orange","red","purple","blue"],h=["full-width","auto-width"],y=["left-icon","right-icon"],k=["noicon","arrow","download","cloud-download","shopping-cart","envelope","external-link","youtube-play"],L=["square","circle"],$=["button"].concat(w,h,y,k,L);for(let E of b){let N=u(E,"full-width"),v=p.box_type,x=!u(E,"square"),B;for(let T of w)if(u(E,T)){B=T;break}c(E,"w-button"),g(E,"skin",B||p.skin),g(E,"full-width",N),g(E,"box-type",v),g(E,"rounded",x),d(E,...$)}}}{let q=r(o,"message-box");if(q){let C=["grey","black","green","blue","orange","red"],H=["noicon","arrow","warning","idea","info","question","checklist","message","envelope","plus","minus"],M=["message-box"].concat(C,H);for(let I of q){let V=r(I,"message-title",0),_=r(I,"message-content",0);if(V){let A=t.createElement("b");A.className="w-dblock",A.innerHTML=V.innerHTML,_&&i(_,A),a(V)}_&&d(_,"message-content");let P;for(let W of C)if(u(I,W)){P=W;break}let j;g(I,"type",j=P&&"grey"!==P&&"black"!==P?"green"===P?"success":"blue"===P?"info":"orange"===P?"warn":"red"===P?"error":"general":"general"),c(I,"w-message"),d(I,...M)}}}{let z=r(o,"special-list");if(z){let D=["noicon","arrow","warning","question","checklist","plus","minus"],F=["noborder","hasborder"],G=["special-list"].concat(D,F),J={noicon:"bullet",question:"bullet",arrow:"arrow",warning:"x",checklist:"check",plus:"plus",minus:"minus"};for(let K of z){let O="bullet";for(let Q of D)u(K,Q)&&(O=J[Q]);g(K,"marker-icon",O),d(K,...G)}}}{let R=r(o,"special-heading");if(R){let S=["style1","style2"],U=["special-heading"].concat(S);for(let X of R){d(X,...U),c(X,"w-title");let Y=t.createElement("div");c(Y,"w-heading"),f(Y,X),s(Y,X)}}}{let Z=r(o,"indent-paragraf");if(Z)for(let ee of Z)c(ee,"w-indent"),d(ee,"indent-paragraf")}{let et=r(o,"youtube-container");if(et)for(let el of et){let eo=el.getElementsByTagName("iframe")[0];eo&&f(eo,el),a(el)}}{let en=r(o,"toggle-section-item");if(en)for(let er of en){let ei=r(er,"toggle-item-title",0),ea=r(er,"toggle-item-content",0);if(ei&&ea){let es=t.createElement("details"),ef=t.createElement("summary");ef.innerHTML=ei.innerHTML,s(es,ef),d(ea,"toggle-item-content"),s(es,ea),f(es,er),a(er)}}}{let ec=m(o),ed=/s/g;for(let eu of ec){let eg=eu.nodeValue.replace(ed,"").toLowerCase();"adsense"===eg&&(eu.nodeValue="ad")}}},!1)})(); /*]]>*/ </script> </b:if> </b:if>
- Done. Save changes!