PluginProbe ʕ •ᴥ•ʔ
Post Views Counter / 1.7.2
Post Views Counter v1.7.2
1.7.13 1.7.12 1.7.11 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.3.1 1.3.10 1.3.11 1.3.12 1.3.13 1.3.2 1.3.2.1 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9
post-views-counter / blocks / post-views / build / index.js
post-views-counter / blocks / post-views / build Last commit date
block.json 1 year ago index.asset.php 1 year ago index.js 1 year ago
index.js
1 lines
1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.components,r=window.wp.i18n,s=window.wp.blockEditor,n=window.wp.serverSideRender;var i=e.n(n);const p=window.ReactJSXRuntime;(0,o.registerBlockType)("post-views-counter/post-views",{edit:function({attributes:e,setAttributes:o}){const{postID:n,period:c}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(s.InspectorControls,{children:(0,p.jsxs)(t.PanelBody,{title:(0,r.__)("Settings","post-views-counter"),children:[(0,p.jsx)(t.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Post ID","post-views-counter"),value:n,onChange:e=>o({postID:Number(e)}),help:(0,r.__)("Enter 0 to use current visited post.","post-views-counter")}),(0,p.jsx)(t.SelectControl,{__nextHasNoMarginBottom:!0,disabled:1===pvcBlockEditorData.periods.length,label:(0,r.__)("Views period","post-views-counter"),value:c,options:pvcBlockEditorData.periods,onChange:e=>o({period:e})})]})}),(0,p.jsx)("div",{...(0,s.useBlockProps)(),children:(0,p.jsx)(i(),{httpMethod:"POST",block:"post-views-counter/post-views",attributes:e,LoadingResponsePlaceholder:()=>(0,p.jsx)(t.Spinner,{}),ErrorResponsePlaceholder:e=>(0,p.jsx)(t.Notice,{status:"error",children:(0,r.__)("Something went wrong. Try again or refresh the page.","post-views-counter")})})})]})}})})();