Plugin Directory

Changeset 3280765


Ignore:
Timestamp:
04/24/2025 09:55:08 AM (10 months ago)
Author:
coderstime
Message:

version 2.0.4 release

Location:
necessary-blocks
Files:
470 added
4 edited

Legend:

Unmodified
Added
Removed
  • necessary-blocks/trunk/build/blocks/button-block/block.json

    r3256512 r3280765  
    6868    "buttonLink": {
    6969      "type": "string",
    70       "default": null
     70      "source": "attribute",
     71      "selector": "a",
     72      "attribute": "href",
     73      "role": "content"
    7174    },
    7275    "buttonColor": {
     
    122125      "type": "object",
    123126      "default": {}
     127    },
     128    "tagName": {
     129      "type": "string",
     130      "enum": [
     131        "a",
     132        "button"
     133      ],
     134      "default": "a"
     135    },
     136    "type": {
     137      "type": "string",
     138      "default": "button"
     139    },
     140    "rel": {
     141      "type": "string",
     142      "source": "attribute",
     143      "selector": "a",
     144      "attribute": "rel",
     145      "role": "content"
    124146    }
    125147  },
  • necessary-blocks/trunk/build/blocks/button-block/index.asset.php

    r3257641 r3280765  
    1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'bd81f022f69cfc323c53');
     1<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '5300e37df08a597d3094');
  • necessary-blocks/trunk/build/blocks/button-block/index.js

    r3257641 r3280765  
    1 (()=>{"use strict";var e,t={6899:()=>{const e=window.wp.blocks;function t(e){var n,o,l="";if("string"==typeof e||"number"==typeof e)l+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(o=t(e[n]))&&(l&&(l+=" "),l+=o)}else for(o in e)e[o]&&(l&&(l+=" "),l+=o);return l}const n=function(){for(var e,n,o=0,l="",s=arguments.length;o<s;o++)(e=arguments[o])&&(n=t(e))&&(l&&(l+=" "),l+=n);return l},o=window.wp.i18n,l=window.wp.blockEditor,s=window.wp.components,r=window.wp.element,a=(0,r.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o})})),i=window.wp.primitives,c=window.ReactJSXRuntime,u=(0,c.jsx)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(i.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),b=JSON.parse('{"UU":"necessary-block/button-block"}');(0,e.registerBlockType)(b.UU,{edit:function({attributes:e,setAttributes:t}){const{align:r,buttonText:i,buttonLink:b,alignment:h,buttonColor:d,buttonBackground:_,buttonWidth:g,buttonHeight:p,buttonNewTab:x,buttonType:v,textAlign:k,hoverbg:y,hoverText:f}=e,w=(e,n)=>t({[e]:n}),m={default:"#475467",info:"#17a2b8",success:"#28a745",warning:"#ffc107",danger:"#dc3545"},j=n("necessary-block-button","align-"+h,"align"+r||0);return(0,c.jsxs)("div",{className:j,style:{width:g?`calc(${g} - 1.2rem * .5)`:"50%",height:p||"auto"},children:[(0,c.jsxs)(l.InspectorControls,{group:"list",children:[(0,c.jsxs)(s.__experimentalToolsPanel,{label:(0,o.__)("Size"),resetAll:!0,children:[(0,c.jsx)(s.__experimentalToolsPanelItem,{hasValue:()=>""!==g,label:(0,o.__)("Button Width","necessary-blocks"),onDeselect:()=>t({buttonWidth:""}),isShownByDefault:!0,children:(0,c.jsx)(s.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,o.__)("Button Width","necessary-blocks"),onChange:e=>t({buttonWidth:e}),value:g,step:5,units:(0,s.__experimentalUseCustomUnits)({availableUnits:["%","vw"]}),min:0,max:100})}),(0,c.jsx)(s.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,o.__)("Button Height","necessary-blocks"),onDeselect:()=>t({buttonHeight:""}),children:(0,c.jsx)(s.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,o.__)("Button Height","necessary-blocks"),placeholder:(0,o.__)("Auto","necessary-blocks"),help:(0,o.__)("Keep blank or reset for auto","necessary-blocks"),onChange:e=>t({buttonHeight:e}),value:p})})]}),!["100%","100em","100rem","100vw"].includes(g)&&(0,c.jsxs)(s.PanelBody,{title:(0,o.__)("General","necessary-blocks"),children:[(0,c.jsx)("p",{children:(0,o.__)("Button Allignment","necessary-blocks")}),(0,c.jsx)(s.ButtonGroup,{style:{textAlign:"center",display:"block"},children:["left","center","right"].map((e=>(0,c.jsx)(s.Button,{onClick:()=>w("alignment",e),isPrimary:h===e,children:(0,o.__)(e.charAt(0).toUpperCase()+e.slice(1))},e)))})]}),(0,c.jsx)(s.PanelBody,{children:(0,c.jsx)(s.SelectControl,{label:(0,o.__)("Button Type","necessary-blocks"),value:v,options:[{label:(0,o.__)("Select Button Type","necessary-blocks"),value:"default"},{label:(0,o.__)("Info","necessary-blocks"),value:"info"},{label:(0,o.__)("Success","necessary-blocks"),value:"success"},{label:(0,o.__)("Warning","necessary-blocks"),value:"warning"},{label:(0,o.__)("Danger","necessary-blocks"),value:"danger"}],onChange:e=>{w("buttonType",e),w("buttonBackground",m[e])}})}),(0,c.jsx)(s.PanelBody,{children:(0,c.jsx)(s.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,c.jsx)(s.__experimentalInputControlPrefixWrapper,{children:(0,c.jsx)(a,{icon:u})}),help:(0,o.__)("Please enter a valid URL","necessary-blocks"),label:(0,o.__)("Button Link","necessary-blocks"),value:b,onChange:e=>{var n;t({buttonLink:(n=e,new RegExp("^((https?:\\/\\/)?([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n)?/^https?:\/\//i.test(n)?n:`http://${n}`:"")})},placeholder:(0,o.__)("Enter link address","necessary-blocks")})}),(0,c.jsx)(l.PanelColorSettings,{title:(0,o.__)("Button Colors","necessary-blocks"),initialOpen:!1,colorSettings:[{value:d,onChange:e=>t({buttonColor:e}),label:(0,o.__)("Button Text Color","necessary-blocks")},{value:_,onChange:e=>t({buttonBackground:e}),label:(0,o.__)("Background color","necessary-blocks")},{value:f,onChange:e=>t({hoverText:e}),label:(0,o.__)("Hover Text Color","necessary-blocks")},{value:y,onChange:e=>t({hoverbg:e}),label:(0,o.__)("Hover Background","necessary-blocks")}]}),(0,c.jsx)(s.PanelBody,{children:(0,c.jsx)(s.ToggleControl,{label:(0,o.__)("Open in New Tab","necessary-blocks"),checked:x,onChange:e=>w("buttonNewTab",e)})})]}),(0,c.jsx)(l.BlockControls,{children:(0,c.jsx)(l.AlignmentToolbar,{value:k,onChange:e=>t({textAlign:void 0===e?"none":e})})}),(0,c.jsx)("div",{...(0,l.useBlockProps)({className:`button button-${v}`,style:{"--button-hover-color":f+"","--button-hover-bg":y+"",textAlign:k,background:_,color:d,textDecoration:"none"}}),children:(0,c.jsx)(l.RichText,{value:i,onChange:e=>t({buttonText:e}),placeholder:(0,o.__)("Add text","necessary-blocks")})})]})},save:function({attributes:e}){const{align:t,buttonText:o,buttonLink:s,alignment:r,buttonBackground:a,buttonColor:i,buttonWidth:u,buttonHeight:b,buttonNewTab:h,buttonType:d,textAlign:_,hoverText:g,hoverbg:p}=e,x=n("necessary-block-button","align-"+r,"align"+t||0);return(0,c.jsx)("div",{className:x,style:{width:u?`calc(${u} - 1.2rem * .5)`:"50%",height:b||"auto"},children:(0,c.jsx)("a",{href:s,target:h?"_blank":"_self",rel:"noopener noreferrer",...l.useBlockProps.save({className:`button button-${d} align-${r}`,style:{"--button-hover-color":g+"","--button-hover-bg":p+"",textAlign:_,background:a,color:i,textDecoration:"none"}}),children:(0,c.jsx)(l.RichText.Content,{value:o})})})}})}},n={};function o(e){var l=n[e];if(void 0!==l)return l.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,n,l,s)=>{if(!n){var r=1/0;for(u=0;u<e.length;u++){for(var[n,l,s]=e[u],a=!0,i=0;i<n.length;i++)(!1&s||r>=s)&&Object.keys(o.O).every((e=>o.O[e](n[i])))?n.splice(i--,1):(a=!1,s<r&&(r=s));if(a){e.splice(u--,1);var c=l();void 0!==c&&(t=c)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[n,l,s]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={5297:0,933:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var l,s,[r,a,i]=n,c=0;if(r.some((t=>0!==e[t]))){for(l in a)o.o(a,l)&&(o.m[l]=a[l]);if(i)var u=i(o)}for(t&&t(n);c<r.length;c++)s=r[c],o.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return o.O(u)},n=globalThis.webpackChunknecessary_blocks=globalThis.webpackChunknecessary_blocks||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var l=o.O(void 0,[933],(()=>o(6899)));l=o.O(l)})();
     1(()=>{"use strict";var e,t={907:()=>{const e=window.wp.blocks;function t(e){var o,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(o=0;o<l;o++)e[o]&&(n=t(e[o]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}const o=function(){for(var e,o,n=0,s="",l=arguments.length;n<l;n++)(e=arguments[n])&&(o=t(e))&&(s&&(s+=" "),s+=o);return s},n=window.wp.i18n,s=window.wp.blockEditor,l=window.wp.components,a=window.wp.element,r=(0,a.forwardRef)((function({icon:e,size:t=24,...o},n){return(0,a.cloneElement)(e,{width:t,height:t,...o,ref:n})})),c=window.wp.primitives,i=window.ReactJSXRuntime,u=(0,i.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(c.Path,{d:"M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z"})}),b=(0,i.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(c.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})}),d=window.wp.data,h=window.wp.editor,_=window.wp.coreData,p=JSON.parse('{"UU":"necessary-block/button-block"}');(0,e.registerBlockType)(p.UU,{edit:function({attributes:e,setAttributes:t}){const{align:c,buttonText:p,buttonLink:g,alignment:x,buttonColor:y,buttonBackground:v,buttonWidth:k,buttonHeight:m,buttonNewTab:w,buttonType:f,textAlign:C,hoverbg:j,hoverText:P,tagName:T,type:B,rel:A}=e,z=T||"a",S=(0,a.useRef)(),{postTitle:D,postId:H,postDate:N,postExcerpt:E,postContent:M,postAuthor:O,categoryNames:I,tagNames:R,postType:U,postStatus:$}=(0,d.useSelect)((e=>{const t=e(h.store),o=e(_.store),n=t.getEditedPostAttribute("categories")||[],s=t.getEditedPostAttribute("tags")||[],l=o.getEntityRecords("taxonomy","category",{include:n})||[],a=o.getEntityRecords("taxonomy","post_tag",{include:s})||[];return{postTitle:t.getEditedPostAttribute("title"),postId:t.getCurrentPostId(),postDate:t.getEditedPostAttribute("date"),postExcerpt:t.getEditedPostAttribute("excerpt"),postContent:t.getEditedPostAttribute("content"),postAuthor:t.getEditedPostAttribute("author"),categoryNames:l.map((e=>e.name)),tagNames:a.map((e=>e.name)),postType:t.getCurrentPostType(),postStatus:t.getEditedPostAttribute("status")}}),[]),V=[{label:(0,n.__)("Post Title","necessary-blocks"),value:D},{label:(0,n.__)("Post ID","necessary-blocks"),value:H},{label:(0,n.__)("Post Date","necessary-blocks"),value:N},{label:(0,n.__)("Post Excerpt","necessary-blocks"),value:E},{label:(0,n.__)("Post Content","necessary-blocks"),value:M},{label:(0,n.__)("Post Author","necessary-blocks"),value:O},{label:(0,n.__)("Post Categories","necessary-blocks"),value:I},{label:(0,n.__)("Post Tags","necessary-blocks"),value:R},{label:(0,n.__)("Post Status","necessary-blocks"),value:U},{label:(0,n.__)("Post Type","necessary-blocks"),value:$}],W=(e,o)=>t({[e]:o}),L={default:"#475467",info:"#17a2b8",success:"#28a745",warning:"#ffc107",danger:"#dc3545"},G=o("necessary-block-button","align-"+x,"align"+c||0),Z="a"===z;return(0,i.jsxs)("div",{className:G,style:{width:k?`calc(${k} - 1.2rem * .5)`:"50%",height:m||"auto"},children:[(0,i.jsxs)(s.InspectorControls,{children:[(0,i.jsxs)(l.__experimentalToolsPanel,{label:(0,n.__)("Size"),resetAll:!0,children:[(0,i.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>""!==k,label:(0,n.__)("Button Width","necessary-blocks"),onDeselect:()=>t({buttonWidth:""}),isShownByDefault:!0,children:(0,i.jsx)(l.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,n.__)("Button Width","necessary-blocks"),onChange:e=>t({buttonWidth:e}),value:k,step:5,units:(0,l.__experimentalUseCustomUnits)({availableUnits:["%","vw"]}),min:0,max:100})}),(0,i.jsx)(l.__experimentalToolsPanelItem,{hasValue:()=>!!m,label:(0,n.__)("Button Height","necessary-blocks"),onDeselect:()=>t({buttonHeight:""}),children:(0,i.jsx)(l.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,n.__)("Button Height","necessary-blocks"),placeholder:(0,n.__)("Auto","necessary-blocks"),help:(0,n.__)("Keep blank or reset for auto","necessary-blocks"),onChange:e=>t({buttonHeight:e}),value:m})})]}),!["100%","100em","100rem","100vw"].includes(k)&&(0,i.jsxs)(l.PanelBody,{title:(0,n.__)("General","necessary-blocks"),children:[(0,i.jsx)("p",{children:(0,n.__)("Button Allignment","necessary-blocks")}),(0,i.jsx)(l.ButtonGroup,{style:{textAlign:"center",display:"block"},children:["left","center","right"].map((e=>(0,i.jsx)(l.Button,{onClick:()=>W("alignment",e),isPrimary:x===e,children:(0,n.__)(e.charAt(0).toUpperCase()+e.slice(1))},e)))})]}),(0,i.jsx)(l.PanelBody,{children:(0,i.jsx)(l.SelectControl,{label:(0,n.__)("Button Type","necessary-blocks"),value:f,options:[{label:(0,n.__)("Select Button Type","necessary-blocks"),value:"default"},{label:(0,n.__)("Info","necessary-blocks"),value:"info"},{label:(0,n.__)("Success","necessary-blocks"),value:"success"},{label:(0,n.__)("Warning","necessary-blocks"),value:"warning"},{label:(0,n.__)("Danger","necessary-blocks"),value:"danger"}],onChange:e=>{W("buttonType",e),W("buttonBackground",L[e])}})}),Z&&(0,i.jsx)(l.PanelBody,{children:(0,i.jsx)(l.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,i.jsx)(l.__experimentalInputControlPrefixWrapper,{children:(0,i.jsx)(r,{icon:u})}),help:(0,n.__)("Please enter a valid URL","necessary-blocks"),label:(0,n.__)("Button Link","necessary-blocks"),value:g,onChange:e=>{var o;t({buttonLink:(o=e,new RegExp("^((https?:\\/\\/)?([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(o)?/^https?:\/\//i.test(o)?o:`http://${o}`:"")})},placeholder:(0,n.__)("Enter link address","necessary-blocks")})}),(0,i.jsx)(s.PanelColorSettings,{title:(0,n.__)("Button Colors","necessary-blocks"),initialOpen:!1,colorSettings:[{value:y,onChange:e=>t({buttonColor:e}),label:(0,n.__)("Button Text Color","necessary-blocks")},{value:v,onChange:e=>t({buttonBackground:e}),label:(0,n.__)("Background color","necessary-blocks")},{value:P,onChange:e=>t({hoverText:e}),label:(0,n.__)("Hover Text Color","necessary-blocks")},{value:j,onChange:e=>t({hoverbg:e}),label:(0,n.__)("Hover Background","necessary-blocks")}]}),Z&&(0,i.jsx)(l.PanelBody,{children:(0,i.jsx)(l.ToggleControl,{label:(0,n.__)("Open in New Tab","necessary-blocks"),checked:w,onChange:e=>W("buttonNewTab",e)})})]}),(0,i.jsxs)(s.BlockControls,{children:[(0,i.jsx)(s.AlignmentToolbar,{value:C,onChange:e=>t({textAlign:void 0===e?"none":e})}),(0,i.jsx)(l.ToolbarDropdownMenu,{title:(0,n.__)("Dynamic Value by Necessary Block","necessary-blocks"),icon:b,popoverProps:{position:"bottom right"},children:({onClose:e})=>(0,i.jsxs)(l.Modal,{title:(0,n.__)("Dynamic Value by Necessary Block","necessary-blocks"),onRequestClose:e,children:[(0,i.jsxs)(l.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Dynamic Data Type","necessary-blocks"),onChange:e=>{console.log(e)},children:[(0,i.jsxs)("option",{value:"",children:[" ",(0,n.__)("Select an option","necessary-blocks")," "]}),(0,i.jsx)("optgroup",{label:(0,n.__)("Posts","necessary-blocks"),children:V.map(((e,t)=>(0,i.jsx)("option",{value:e.value,children:e.label},t)))})]}),(0,i.jsx)(l.Button,{className:"insertdata",variant:"secondary",onClick:e,children:(0,n.__)("Insert","necessary-blocks")})]})})]}),(0,i.jsx)(s.InspectorControls,{group:"advanced",children:Z&&(0,i.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,n.__)("Link rel","necessary-blocks"),value:A||"",onChange:e=>t({rel:e})})}),(0,i.jsx)("div",{...(0,s.useBlockProps)({className:`button button-${f}`,style:{"--button-hover-color":P+"","--button-hover-bg":j+"",textAlign:C,background:v,color:y,textDecoration:"none"}}),children:(0,i.jsx)(s.RichText,{ref:S,value:p,onChange:e=>t({buttonText:e}),placeholder:(0,n.__)("Add text","necessary-blocks")})})]})},save:function({attributes:e}){const{align:t,buttonText:n,buttonLink:l,alignment:a,buttonBackground:r,buttonColor:c,buttonWidth:u,buttonHeight:b,buttonNewTab:d,buttonType:h,textAlign:_,hoverText:p,hoverbg:g,tagName:x,type:y,rel:v}=e,k=o("necessary-block-button","align-"+a,"align"+t||0);return(0,i.jsx)("div",{className:k,style:{width:u?`calc(${u} - 1.2rem * .5)`:"50%",height:b||"auto"},children:"button"===x?(0,i.jsx)("button",{...s.useBlockProps.save({className:`button button-${h} align-${a}`,style:{"--button-hover-color":p+"","--button-hover-bg":g+"",textAlign:_,background:r,color:c,textDecoration:"none"}}),type:y,children:(0,i.jsx)(s.RichText.Content,{value:n})}):(0,i.jsx)("a",{href:l,target:d?"_blank":"_self",rel:v,...s.useBlockProps.save({className:`button button-${h} align-${a}`,style:{"--button-hover-color":p+"","--button-hover-bg":g+"",textAlign:_,background:r,color:c,textDecoration:"none"}}),children:(0,i.jsx)(s.RichText.Content,{value:n})})})}})}},o={};function n(e){var s=o[e];if(void 0!==s)return s.exports;var l=o[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,o,s,l)=>{if(!o){var a=1/0;for(u=0;u<e.length;u++){for(var[o,s,l]=e[u],r=!0,c=0;c<o.length;c++)(!1&l||a>=l)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(r=!1,l<a&&(a=l));if(r){e.splice(u--,1);var i=s();void 0!==i&&(t=i)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[o,s,l]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={5297:0,933:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var s,l,[a,r,c]=o,i=0;if(a.some((t=>0!==e[t]))){for(s in r)n.o(r,s)&&(n.m[s]=r[s]);if(c)var u=c(n)}for(t&&t(o);i<a.length;i++)l=a[i],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(u)},o=globalThis.webpackChunknecessary_blocks=globalThis.webpackChunknecessary_blocks||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var s=n.O(void 0,[933],(()=>n(907)));s=n.O(s)})();
  • necessary-blocks/trunk/necessary-blocks.php

    r3260087 r3280765  
    66 * Requires at least: 6.1
    77 * Requires PHP:      7.0
    8  * Version:           2.0.3
     8 * Version:           2.0.4
    99 * Author:            coderstime
    1010 * Author URI:        https://necessaryblocks.com/
     
    8989        'social-share',
    9090        'social-shares',
     91        'stack',
     92        'stacks',
    9193        'tab-block',
    9294        'tabs-block',
Note: See TracChangeset for help on using the changeset viewer.