Changeset 3465863
- Timestamp:
- 02/20/2026 02:19:54 PM (5 weeks ago)
- Location:
- pulseshare
- Files:
-
- 24 edited
- 1 copied
-
tags/1.1.2 (copied) (copied from pulseshare/trunk)
-
tags/1.1.2/README.md (modified) (2 diffs)
-
tags/1.1.2/assets/admin/blocks/album-embed/block.json (modified) (1 diff)
-
tags/1.1.2/assets/admin/blocks/album-embed/index.asset.php (modified) (1 diff)
-
tags/1.1.2/assets/admin/blocks/album-embed/index.js (modified) (1 diff)
-
tags/1.1.2/assets/admin/blocks/list-embed/block.json (modified) (1 diff)
-
tags/1.1.2/assets/admin/blocks/list-embed/index.asset.php (modified) (1 diff)
-
tags/1.1.2/assets/admin/blocks/list-embed/index.js (modified) (1 diff)
-
tags/1.1.2/includes/Helper.php (modified) (3 diffs)
-
tags/1.1.2/includes/options/OptionsPanel.php (modified) (3 diffs)
-
tags/1.1.2/languages/pulseshare.pot (modified) (3 diffs)
-
tags/1.1.2/pulseshare.php (modified) (2 diffs)
-
tags/1.1.2/readme.txt (modified) (2 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/assets/admin/blocks/album-embed/block.json (modified) (1 diff)
-
trunk/assets/admin/blocks/album-embed/index.asset.php (modified) (1 diff)
-
trunk/assets/admin/blocks/album-embed/index.js (modified) (1 diff)
-
trunk/assets/admin/blocks/list-embed/block.json (modified) (1 diff)
-
trunk/assets/admin/blocks/list-embed/index.asset.php (modified) (1 diff)
-
trunk/assets/admin/blocks/list-embed/index.js (modified) (1 diff)
-
trunk/includes/Helper.php (modified) (3 diffs)
-
trunk/includes/options/OptionsPanel.php (modified) (3 diffs)
-
trunk/languages/pulseshare.pot (modified) (3 diffs)
-
trunk/pulseshare.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pulseshare/tags/1.1.2/README.md
r3465238 r3465863 5 5 **Requires at least:** 6.6 6 6 **Tested up to:** 6.9.1 7 **Stable tag:** 1.1. 17 **Stable tag:** 1.1.2 8 8 **Requires PHP:** 8.0 9 9 **License:** GPLv2 or later … … 85 85 ## Changelog ## 86 86 87 ### 1.1.2 ### 88 * Improvement: Streamlined settings storage for better reliability. 89 * Improvement: Optimized settings page performance. 90 * Dev: Internal code cleanup. 91 87 92 ### 1.1.1 ### 88 93 * Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets. -
pulseshare/tags/1.1.2/assets/admin/blocks/album-embed/block.json
r3465238 r3465863 3 3 "apiVersion": 3, 4 4 "name": "pulseshare/album-embed", 5 "version": "1.1. 1",5 "version": "1.1.2", 6 6 "title": "Album & Tracks", 7 7 "category": "pulseshare", -
pulseshare/tags/1.1.2/assets/admin/blocks/album-embed/index.asset.php
r3465238 r3465863 1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '8 32ef2532ce1332a863d');1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '8fdc43e43affd255db58'); -
pulseshare/tags/1.1.2/assets/admin/blocks/album-embed/index.js
r3465238 r3465863 1 !function(){var e,t={235:function(e,t,l){"use strict";var r=window.wp.blocks,a=window.React,n=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,s=window.wp.element,c=window.wp.apiFetch,u=l.n(c),p=l(942),d=l.n(p),m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/album-embed","version":"1.1. 1","title":"Album & Tracks","category":"pulseshare","description":"Display a list of album tracks to embed in your posts.","keywords":["spotify","album","track","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"albumArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentTrack":{"type":"object","default":{}},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,a.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,a.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));const f=(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,a.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,a.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}));(0,r.registerBlockType)(m,{icon:{src:f,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:r}){var c;const{blockID:p,albumArray:m,displayType:f,currentTrack:h,height:b,width:v}=e;(0,s.useEffect)((()=>{p||t({blockID:`album-embed-${l}`})}),[p,l,t]);const[y,w]=(0,s.useState)(null);(0,s.useEffect)((()=>{u()({path:"/pulseshare/v1/tracks"}).then((e=>{t({albumArray:e}),w(null)})).catch((e=>{console.error("PulseShare: Failed to fetch tracks",e),w((null==e?void 0:e.message)||"Failed to load tracks from Spotify.")}))}),[]);const g=d()(r,"album-embed");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)("div",{className:"sfwe-block-sidebar"},(0,a.createElement)(i.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,a.createElement)(i.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the album.",selected:f||"full",options:[{label:"Full Album",value:"full"},{label:"Single Track",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===f&&(0,a.createElement)(i.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Track","pulseshare"),help:"Selected track will be displayed in the frontend.",value:null!=h&&h.id?h.id:null===(c=m[0])||void 0===c?void 0:c.id,options:m.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentTrack:m.find((t=>String(t.id)===String(e)))})}}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:b}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:v})))),(0,a.createElement)("div",{className:g,id:p},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},y&&(0,a.createElement)("div",{className:"notice notice-error alt"},(0,a.createElement)("p",null,y)),"single"===f&&!(null!=h&&h.id)&&!y&&(0,a.createElement)("div",{className:"notice notice-info alt"},(0,a.createElement)("p",null,(0,a.createElement)("i",null,(0,n.__)("Please select a track from the block settings.","pulseshare")))),"single"===f&&(null==h?void 0:h.id)&&(0,a.createElement)("iframe",{id:"sfwe-track-"+h.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"200",src:"https://open.spotify.com/embed/track/"+h.id+"?utm_source=generator"}),"full"===f&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:r,currentTrack:n,displayType:i,height:o,width:s}=l,c=d()(t,"album-embed");return(0,a.createElement)("div",{className:c,id:r},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},"single"===i&&n.id&&(0,a.createElement)("iframe",{id:"sfwe-track-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"200",src:"https://open.spotify.com/embed/track/"+n.id+"?utm_source=generator"}),"full"===i&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=i(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)r.call(e,l)&&e[l]&&(t=i(t,l));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()}},l={};function r(e){var a=l[e];if(void 0!==a)return a.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=function(t,l,a,n){if(!l){var i=1/0;for(u=0;u<e.length;u++){l=e[u][0],a=e[u][1],n=e[u][2];for(var o=!0,s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(r.O).every((function(e){return r.O[e](l[s])}))?l.splice(s--,1):(o=!1,n<i&&(i=n));if(o){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[l,a,n]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={141:0,137:0};r.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,i=l[0],o=l[1],s=l[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var u=s(r)}for(t&&t(l);c<i.length;c++)n=i[c],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(u)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var a=r.O(void 0,[137],(function(){return r(235)}));a=r.O(a)}();1 !function(){var e,t={235:function(e,t,l){"use strict";var r=window.wp.blocks,a=window.React,n=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,s=window.wp.element,c=window.wp.apiFetch,u=l.n(c),p=l(942),d=l.n(p),m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/album-embed","version":"1.1.2","title":"Album & Tracks","category":"pulseshare","description":"Display a list of album tracks to embed in your posts.","keywords":["spotify","album","track","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"albumArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentTrack":{"type":"object","default":{}},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,a.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,a.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));const f=(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,a.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,a.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}));(0,r.registerBlockType)(m,{icon:{src:f,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:r}){var c;const{blockID:p,albumArray:m,displayType:f,currentTrack:h,height:b,width:v}=e;(0,s.useEffect)((()=>{p||t({blockID:`album-embed-${l}`})}),[p,l,t]);const[y,w]=(0,s.useState)(null);(0,s.useEffect)((()=>{u()({path:"/pulseshare/v1/tracks"}).then((e=>{t({albumArray:e}),w(null)})).catch((e=>{console.error("PulseShare: Failed to fetch tracks",e),w((null==e?void 0:e.message)||"Failed to load tracks from Spotify.")}))}),[]);const g=d()(r,"album-embed");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)("div",{className:"sfwe-block-sidebar"},(0,a.createElement)(i.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,a.createElement)(i.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the album.",selected:f||"full",options:[{label:"Full Album",value:"full"},{label:"Single Track",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===f&&(0,a.createElement)(i.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Track","pulseshare"),help:"Selected track will be displayed in the frontend.",value:null!=h&&h.id?h.id:null===(c=m[0])||void 0===c?void 0:c.id,options:m.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentTrack:m.find((t=>String(t.id)===String(e)))})}}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:b}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:v})))),(0,a.createElement)("div",{className:g,id:p},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},y&&(0,a.createElement)("div",{className:"notice notice-error alt"},(0,a.createElement)("p",null,y)),"single"===f&&!(null!=h&&h.id)&&!y&&(0,a.createElement)("div",{className:"notice notice-info alt"},(0,a.createElement)("p",null,(0,a.createElement)("i",null,(0,n.__)("Please select a track from the block settings.","pulseshare")))),"single"===f&&(null==h?void 0:h.id)&&(0,a.createElement)("iframe",{id:"sfwe-track-"+h.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"200",src:"https://open.spotify.com/embed/track/"+h.id+"?utm_source=generator"}),"full"===f&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:r,currentTrack:n,displayType:i,height:o,width:s}=l,c=d()(t,"album-embed");return(0,a.createElement)("div",{className:c,id:r},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},"single"===i&&n.id&&(0,a.createElement)("iframe",{id:"sfwe-track-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"200",src:"https://open.spotify.com/embed/track/"+n.id+"?utm_source=generator"}),"full"===i&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=i(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)r.call(e,l)&&e[l]&&(t=i(t,l));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()}},l={};function r(e){var a=l[e];if(void 0!==a)return a.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=function(t,l,a,n){if(!l){var i=1/0;for(u=0;u<e.length;u++){l=e[u][0],a=e[u][1],n=e[u][2];for(var o=!0,s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(r.O).every((function(e){return r.O[e](l[s])}))?l.splice(s--,1):(o=!1,n<i&&(i=n));if(o){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[l,a,n]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={141:0,137:0};r.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,i=l[0],o=l[1],s=l[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var u=s(r)}for(t&&t(l);c<i.length;c++)n=i[c],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(u)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var a=r.O(void 0,[137],(function(){return r(235)}));a=r.O(a)}(); -
pulseshare/tags/1.1.2/assets/admin/blocks/list-embed/block.json
r3465238 r3465863 3 3 "apiVersion": 3, 4 4 "name": "pulseshare/list-embed", 5 "version": "1.1. 1",5 "version": "1.1.2", 6 6 "title": "Podcast & Episodes", 7 7 "category": "pulseshare", -
pulseshare/tags/1.1.2/assets/admin/blocks/list-embed/index.asset.php
r3465238 r3465863 1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' c61584cd22fdaf7b9c40');1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'f4109a95fd5ef396d104'); -
pulseshare/tags/1.1.2/assets/admin/blocks/list-embed/index.js
r3465238 r3465863 1 !function(){var e,t={744:function(e,t,l){"use strict";var i=window.wp.blocks,r=window.React,n=window.wp.i18n,o=window.wp.components,a=window.wp.blockEditor,s=window.wp.element,d=window.wp.apiFetch,c=l.n(d),p=l(942),u=l.n(p),f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/list-embed","version":"1.1. 1","title":"Podcast & Episodes","category":"pulseshare","description":"Display a list of episodes to embed in your posts.","keywords":["spotify","podcast","show","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"episodesArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentEpisode":{"type":"object","default":{}},"isVideo":{"type":"boolean","default":false},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');const h=(0,r.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,r.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));(0,r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,r.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})),(0,i.registerBlockType)(f,{icon:{src:h,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:i}){var d;const{blockID:p,episodesArray:f,displayType:h,currentEpisode:m,isVideo:v,height:w,width:y}=e;(0,s.useEffect)((()=>{p||t({blockID:`list-embed-${l}`})}),[p,l,t]);const[g,b]=(0,s.useState)(null);(0,s.useEffect)((()=>{c()({path:"/pulseshare/v1/episodes"}).then((e=>{t({episodesArray:e}),b(null)})).catch((e=>{console.error("PulseShare: Failed to fetch episodes",e),b((null==e?void 0:e.message)||"Failed to load episodes from Spotify.")}))}),[]);const E=u()(i,"list-embed"),_=v?"video":"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)("div",{className:"sfwe-block-sidebar"},(0,r.createElement)(o.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,r.createElement)(o.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the episode.",selected:h||"full",options:[{label:"Full Show",value:"full"},{label:"Single Episode",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===h&&(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Episode","pulseshare"),help:"Selected episode will be displayed in the frontend.",value:null!=m&&m.id?m.id:null===(d=f[0])||void 0===d?void 0:d.id,options:f.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentEpisode:f.find((t=>String(t.id)===String(e)))})}}),"single"===h&&(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,checked:v||!1,help:(0,n.__)("Enable this option if this episode is a video.","pulseshare"),label:(0,n.__)("Is this a video episode?","pulseshare"),onChange:e=>{t({isVideo:e})}}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:w}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:y})))),(0,r.createElement)("div",{className:E,id:p},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},g&&(0,r.createElement)("div",{className:"notice notice-error alt"},(0,r.createElement)("p",null,g)),"single"===h&&!(null!=m&&m.id)&&!g&&(0,r.createElement)("div",{className:"notice notice-info alt"},(0,r.createElement)("p",null,(0,r.createElement)("i",null,(0,n.__)("Please select an episode from the block settings.","pulseshare")))),"single"===h&&(null==m?void 0:m.id)&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+m.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/episode/"+m.id+"/"+_+"?utm_source=generator"}),"full"===h&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:i,currentEpisode:n,displayType:o,height:a,width:s}=l,d=u()(t,"list-embed");return(0,r.createElement)("div",{className:d,id:i},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},"single"===o&&n.id&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/episode/"+n.id+"?utm_source=generator"}),"full"===o&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=o(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)i.call(e,l)&&e[l]&&(t=o(t,l));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(l=function(){return r}.apply(t,[]))||(e.exports=l)}()}},l={};function i(e){var r=l[e];if(void 0!==r)return r.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=function(t,l,r,n){if(!l){var o=1/0;for(c=0;c<e.length;c++){l=e[c][0],r=e[c][1],n=e[c][2];for(var a=!0,s=0;s<l.length;s++)(!1&n||o>=n)&&Object.keys(i.O).every((function(e){return i.O[e](l[s])}))?l.splice(s--,1):(a=!1,n<o&&(o=n));if(a){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,r,n]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={266:0,542:0};i.O.j=function(t){return 0===e[t]};var t=function(t,l){var r,n,o=l[0],a=l[1],s=l[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(s)var c=s(i)}for(t&&t(l);d<o.length;d++)n=o[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var r=i.O(void 0,[542],(function(){return i(744)}));r=i.O(r)}();1 !function(){var e,t={744:function(e,t,l){"use strict";var i=window.wp.blocks,r=window.React,n=window.wp.i18n,o=window.wp.components,a=window.wp.blockEditor,s=window.wp.element,d=window.wp.apiFetch,c=l.n(d),p=l(942),u=l.n(p),f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/list-embed","version":"1.1.2","title":"Podcast & Episodes","category":"pulseshare","description":"Display a list of episodes to embed in your posts.","keywords":["spotify","podcast","show","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"episodesArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentEpisode":{"type":"object","default":{}},"isVideo":{"type":"boolean","default":false},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');const h=(0,r.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,r.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));(0,r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,r.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})),(0,i.registerBlockType)(f,{icon:{src:h,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:i}){var d;const{blockID:p,episodesArray:f,displayType:h,currentEpisode:m,isVideo:v,height:w,width:y}=e;(0,s.useEffect)((()=>{p||t({blockID:`list-embed-${l}`})}),[p,l,t]);const[g,b]=(0,s.useState)(null);(0,s.useEffect)((()=>{c()({path:"/pulseshare/v1/episodes"}).then((e=>{t({episodesArray:e}),b(null)})).catch((e=>{console.error("PulseShare: Failed to fetch episodes",e),b((null==e?void 0:e.message)||"Failed to load episodes from Spotify.")}))}),[]);const E=u()(i,"list-embed"),_=v?"video":"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)("div",{className:"sfwe-block-sidebar"},(0,r.createElement)(o.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,r.createElement)(o.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the episode.",selected:h||"full",options:[{label:"Full Show",value:"full"},{label:"Single Episode",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===h&&(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Episode","pulseshare"),help:"Selected episode will be displayed in the frontend.",value:null!=m&&m.id?m.id:null===(d=f[0])||void 0===d?void 0:d.id,options:f.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentEpisode:f.find((t=>String(t.id)===String(e)))})}}),"single"===h&&(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,checked:v||!1,help:(0,n.__)("Enable this option if this episode is a video.","pulseshare"),label:(0,n.__)("Is this a video episode?","pulseshare"),onChange:e=>{t({isVideo:e})}}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:w}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:y})))),(0,r.createElement)("div",{className:E,id:p},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},g&&(0,r.createElement)("div",{className:"notice notice-error alt"},(0,r.createElement)("p",null,g)),"single"===h&&!(null!=m&&m.id)&&!g&&(0,r.createElement)("div",{className:"notice notice-info alt"},(0,r.createElement)("p",null,(0,r.createElement)("i",null,(0,n.__)("Please select an episode from the block settings.","pulseshare")))),"single"===h&&(null==m?void 0:m.id)&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+m.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/episode/"+m.id+"/"+_+"?utm_source=generator"}),"full"===h&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:i,currentEpisode:n,displayType:o,height:a,width:s}=l,d=u()(t,"list-embed");return(0,r.createElement)("div",{className:d,id:i},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},"single"===o&&n.id&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/episode/"+n.id+"?utm_source=generator"}),"full"===o&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=o(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)i.call(e,l)&&e[l]&&(t=o(t,l));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(l=function(){return r}.apply(t,[]))||(e.exports=l)}()}},l={};function i(e){var r=l[e];if(void 0!==r)return r.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=function(t,l,r,n){if(!l){var o=1/0;for(c=0;c<e.length;c++){l=e[c][0],r=e[c][1],n=e[c][2];for(var a=!0,s=0;s<l.length;s++)(!1&n||o>=n)&&Object.keys(i.O).every((function(e){return i.O[e](l[s])}))?l.splice(s--,1):(a=!1,n<o&&(o=n));if(a){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,r,n]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={266:0,542:0};i.O.j=function(t){return 0===e[t]};var t=function(t,l){var r,n,o=l[0],a=l[1],s=l[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(s)var c=s(i)}for(t&&t(l);d<o.length;d++)n=o[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var r=i.O(void 0,[542],(function(){return i(744)}));r=i.O(r)}(); -
pulseshare/tags/1.1.2/includes/Helper.php
r3465141 r3465863 21 21 22 22 /** 23 * Encrypt a value using AES-256-CBC.24 *25 * @since 1.0.326 * @param string $value The plaintext value to encrypt.27 * @return string The encrypted value (base64-encoded).28 */29 public static function encrypt( $value ) {30 if ( empty( $value ) ) {31 return '';32 }33 34 $key = AUTH_KEY;35 $iv = \openssl_random_pseudo_bytes( \openssl_cipher_iv_length( 'aes-256-cbc' ) );36 $cipher = \openssl_encrypt( $value, 'aes-256-cbc', $key, 0, $iv );37 38 if ( false === $cipher ) {39 return '';40 }41 42 // Store IV alongside ciphertext so we can decrypt later.43 return \base64_encode( $iv . '::' . $cipher ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- Used for encryption storage, not obfuscation.44 }45 46 /**47 * Decrypt a value encrypted with self::encrypt().48 *49 * @since 1.0.350 * @param string $value The encrypted value (base64-encoded).51 * @return string The decrypted plaintext value.52 */53 public static function decrypt( $value ) {54 if ( empty( $value ) ) {55 return '';56 }57 58 $decoded = \base64_decode( $value, true ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode -- Used for decrypting stored values, not obfuscation.59 60 if ( false === $decoded || strpos( $decoded, '::' ) === false ) {61 // Not encrypted (legacy plaintext value), return as-is.62 return $value;63 }64 65 $parts = explode( '::', $decoded, 2 );66 if ( count( $parts ) !== 2 ) {67 return $value;68 }69 70 $key = AUTH_KEY;71 $iv = $parts[0];72 $cipher = $parts[1];73 $decrypted = \openssl_decrypt( $cipher, 'aes-256-cbc', $key, 0, $iv );74 75 return ( false !== $decrypted ) ? $decrypted : '';76 }77 78 /**79 23 * Check if the spotify client id and secret are set. 80 24 * … … 86 30 $pulseshare_options = get_option( 'pulseshare_options' ); 87 31 $pulseshareclient_id = $pulseshare_options['pulseshare_client_id'] ?? ''; 88 $pulseshareclient_secret = self::decrypt( $pulseshare_options['pulseshare_client_secret'] ?? '' );32 $pulseshareclient_secret = $pulseshare_options['pulseshare_client_secret'] ?? ''; 89 33 90 34 return empty( $pulseshareclient_id ) || empty( $pulseshareclient_secret ); … … 107 51 $pulseshare_options = get_option( 'pulseshare_options' ); 108 52 $client_id = $pulseshare_options['pulseshare_client_id'] ?? ''; 109 $client_secret = self::decrypt( $pulseshare_options['pulseshare_client_secret'] ?? '' );53 $client_secret = $pulseshare_options['pulseshare_client_secret'] ?? ''; 110 54 111 55 if ( empty( $client_id ) || empty( $client_secret ) ) { -
pulseshare/tags/1.1.2/includes/options/OptionsPanel.php
r3465141 r3465863 9 9 10 10 namespace PulseShare\Includes\Options; 11 12 use PulseShare\Includes\Helper;13 11 14 12 // If this file is called directly, abort. … … 216 214 $sanitize_callback = $args['sanitize_callback'] ?? $this->get_sanitize_callback_by_type( $field_type ); 217 215 $sanitized_value = call_user_func( $sanitize_callback, $new_option_value, $args ); 218 219 // Encrypt password fields before storing.220 if ( 'password' === $field_type && ! empty( $sanitized_value ) ) {221 $sanitized_value = Helper::encrypt( $sanitized_value );222 }223 216 224 217 $new_value[ $key ] = $sanitized_value; … … 392 385 public function render_password_field( $args ) { 393 386 $option_name = $args['label_for']; 394 $raw_value = $this->get_option_value( $option_name ); 395 $value = Helper::decrypt( $raw_value ); 387 $value = $this->get_option_value( $option_name ); 396 388 $description = $this->settings[ $option_name ]['description'] ?? ''; 397 389 ?> -
pulseshare/tags/1.1.2/languages/pulseshare.pot
r3465238 r3465863 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2026-02- 19 16:56+0000\n"9 "POT-Creation-Date: 2026-02-20 14:19+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" … … 79 79 msgstr "" 80 80 81 #: includes/Helper.php:2 6681 #: includes/Helper.php:210 82 82 msgid "API Keys" 83 83 msgstr "" 84 84 85 #: includes/Helper.php:2 6785 #: includes/Helper.php:211 86 86 msgid "Integrations" 87 87 msgstr "" 88 88 89 #: includes/Helper.php:2 7789 #: includes/Helper.php:221 90 90 msgid "Client ID" 91 91 msgstr "" 92 92 93 #: includes/Helper.php:2 8393 #: includes/Helper.php:227 94 94 msgid "Client Secret" 95 95 msgstr "" 96 96 97 #: includes/Helper.php:2 9097 #: includes/Helper.php:234 98 98 msgid "Podcast Show ID" 99 99 msgstr "" 100 100 101 #: includes/Helper.php:2 96101 #: includes/Helper.php:240 102 102 msgid "Album ID" 103 103 msgstr "" 104 104 105 #: includes/Helper.php: 302105 #: includes/Helper.php:246 106 106 msgid "Market" 107 107 msgstr "" 108 108 109 #: includes/Helper.php: 304109 #: includes/Helper.php:248 110 110 msgid "ISO 3166-1 alpha-2 country code (e.g. US, GB, IN)." 111 111 msgstr "" … … 215 215 msgstr "" 216 216 217 #: includes/options/OptionsPanel.php:10 9217 #: includes/options/OptionsPanel.php:107 218 218 msgid "Options" 219 219 msgstr "" 220 220 221 #: includes/options/OptionsPanel.php:2 72221 #: includes/options/OptionsPanel.php:265 222 222 msgid "Settings Saved" 223 223 msgstr "" -
pulseshare/tags/1.1.2/pulseshare.php
r3465238 r3465863 11 11 * Plugin URI: https://swapnild.com 12 12 * Description: PulseShare help you share interactive content from Spotify on your website. Embed podcast, an album, or other audio and video content to your website and promote your music, share your new podcast episodes with fans, or highlight your favourite album or playlist. 13 * Version: 1.1. 113 * Version: 1.1.2 14 14 * Author: Swapnil Deshpande 15 15 * Author URI: https://swapnild.com/ … … 34 34 * Currently plugin version. 35 35 */ 36 define( 'PULSESHARE_VERSION', '1.1. 1' );36 define( 'PULSESHARE_VERSION', '1.1.2' ); 37 37 define( 'PULSESHARE_DIRPATH', plugin_dir_path( __FILE__ ) ); 38 38 define( 'PULSESHARE_URLPATH', plugin_dir_url( __FILE__ ) ); -
pulseshare/tags/1.1.2/readme.txt
r3465238 r3465863 5 5 Requires at least: 6.6 6 6 Tested up to: 6.9.1 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 Requires PHP: 8.0 9 9 License: GPLv2 or later … … 91 91 == Changelog == 92 92 93 = 1.1.2 = 94 * Improvement: Streamlined settings storage for better reliability. 95 * Improvement: Optimized settings page performance. 96 * Dev: Internal code cleanup. 97 93 98 = 1.1.1 = 94 99 * Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets. -
pulseshare/trunk/README.md
r3465238 r3465863 5 5 **Requires at least:** 6.6 6 6 **Tested up to:** 6.9.1 7 **Stable tag:** 1.1. 17 **Stable tag:** 1.1.2 8 8 **Requires PHP:** 8.0 9 9 **License:** GPLv2 or later … … 85 85 ## Changelog ## 86 86 87 ### 1.1.2 ### 88 * Improvement: Streamlined settings storage for better reliability. 89 * Improvement: Optimized settings page performance. 90 * Dev: Internal code cleanup. 91 87 92 ### 1.1.1 ### 88 93 * Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets. -
pulseshare/trunk/assets/admin/blocks/album-embed/block.json
r3465238 r3465863 3 3 "apiVersion": 3, 4 4 "name": "pulseshare/album-embed", 5 "version": "1.1. 1",5 "version": "1.1.2", 6 6 "title": "Album & Tracks", 7 7 "category": "pulseshare", -
pulseshare/trunk/assets/admin/blocks/album-embed/index.asset.php
r3465238 r3465863 1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '8 32ef2532ce1332a863d');1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '8fdc43e43affd255db58'); -
pulseshare/trunk/assets/admin/blocks/album-embed/index.js
r3465238 r3465863 1 !function(){var e,t={235:function(e,t,l){"use strict";var r=window.wp.blocks,a=window.React,n=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,s=window.wp.element,c=window.wp.apiFetch,u=l.n(c),p=l(942),d=l.n(p),m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/album-embed","version":"1.1. 1","title":"Album & Tracks","category":"pulseshare","description":"Display a list of album tracks to embed in your posts.","keywords":["spotify","album","track","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"albumArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentTrack":{"type":"object","default":{}},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,a.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,a.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));const f=(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,a.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,a.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}));(0,r.registerBlockType)(m,{icon:{src:f,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:r}){var c;const{blockID:p,albumArray:m,displayType:f,currentTrack:h,height:b,width:v}=e;(0,s.useEffect)((()=>{p||t({blockID:`album-embed-${l}`})}),[p,l,t]);const[y,w]=(0,s.useState)(null);(0,s.useEffect)((()=>{u()({path:"/pulseshare/v1/tracks"}).then((e=>{t({albumArray:e}),w(null)})).catch((e=>{console.error("PulseShare: Failed to fetch tracks",e),w((null==e?void 0:e.message)||"Failed to load tracks from Spotify.")}))}),[]);const g=d()(r,"album-embed");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)("div",{className:"sfwe-block-sidebar"},(0,a.createElement)(i.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,a.createElement)(i.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the album.",selected:f||"full",options:[{label:"Full Album",value:"full"},{label:"Single Track",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===f&&(0,a.createElement)(i.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Track","pulseshare"),help:"Selected track will be displayed in the frontend.",value:null!=h&&h.id?h.id:null===(c=m[0])||void 0===c?void 0:c.id,options:m.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentTrack:m.find((t=>String(t.id)===String(e)))})}}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:b}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:v})))),(0,a.createElement)("div",{className:g,id:p},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},y&&(0,a.createElement)("div",{className:"notice notice-error alt"},(0,a.createElement)("p",null,y)),"single"===f&&!(null!=h&&h.id)&&!y&&(0,a.createElement)("div",{className:"notice notice-info alt"},(0,a.createElement)("p",null,(0,a.createElement)("i",null,(0,n.__)("Please select a track from the block settings.","pulseshare")))),"single"===f&&(null==h?void 0:h.id)&&(0,a.createElement)("iframe",{id:"sfwe-track-"+h.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"200",src:"https://open.spotify.com/embed/track/"+h.id+"?utm_source=generator"}),"full"===f&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:r,currentTrack:n,displayType:i,height:o,width:s}=l,c=d()(t,"album-embed");return(0,a.createElement)("div",{className:c,id:r},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},"single"===i&&n.id&&(0,a.createElement)("iframe",{id:"sfwe-track-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"200",src:"https://open.spotify.com/embed/track/"+n.id+"?utm_source=generator"}),"full"===i&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=i(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)r.call(e,l)&&e[l]&&(t=i(t,l));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()}},l={};function r(e){var a=l[e];if(void 0!==a)return a.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=function(t,l,a,n){if(!l){var i=1/0;for(u=0;u<e.length;u++){l=e[u][0],a=e[u][1],n=e[u][2];for(var o=!0,s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(r.O).every((function(e){return r.O[e](l[s])}))?l.splice(s--,1):(o=!1,n<i&&(i=n));if(o){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[l,a,n]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={141:0,137:0};r.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,i=l[0],o=l[1],s=l[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var u=s(r)}for(t&&t(l);c<i.length;c++)n=i[c],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(u)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var a=r.O(void 0,[137],(function(){return r(235)}));a=r.O(a)}();1 !function(){var e,t={235:function(e,t,l){"use strict";var r=window.wp.blocks,a=window.React,n=window.wp.i18n,i=window.wp.components,o=window.wp.blockEditor,s=window.wp.element,c=window.wp.apiFetch,u=l.n(c),p=l(942),d=l.n(p),m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/album-embed","version":"1.1.2","title":"Album & Tracks","category":"pulseshare","description":"Display a list of album tracks to embed in your posts.","keywords":["spotify","album","track","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"albumArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentTrack":{"type":"object","default":{}},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');(0,a.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,a.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));const f=(0,a.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,a.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,a.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,a.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}));(0,r.registerBlockType)(m,{icon:{src:f,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:r}){var c;const{blockID:p,albumArray:m,displayType:f,currentTrack:h,height:b,width:v}=e;(0,s.useEffect)((()=>{p||t({blockID:`album-embed-${l}`})}),[p,l,t]);const[y,w]=(0,s.useState)(null);(0,s.useEffect)((()=>{u()({path:"/pulseshare/v1/tracks"}).then((e=>{t({albumArray:e}),w(null)})).catch((e=>{console.error("PulseShare: Failed to fetch tracks",e),w((null==e?void 0:e.message)||"Failed to load tracks from Spotify.")}))}),[]);const g=d()(r,"album-embed");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(o.InspectorControls,null,(0,a.createElement)("div",{className:"sfwe-block-sidebar"},(0,a.createElement)(i.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,a.createElement)(i.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the album.",selected:f||"full",options:[{label:"Full Album",value:"full"},{label:"Single Track",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===f&&(0,a.createElement)(i.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Track","pulseshare"),help:"Selected track will be displayed in the frontend.",value:null!=h&&h.id?h.id:null===(c=m[0])||void 0===c?void 0:c.id,options:m.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentTrack:m.find((t=>String(t.id)===String(e)))})}}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:b}),(0,a.createElement)(i.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:v})))),(0,a.createElement)("div",{className:g,id:p},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},y&&(0,a.createElement)("div",{className:"notice notice-error alt"},(0,a.createElement)("p",null,y)),"single"===f&&!(null!=h&&h.id)&&!y&&(0,a.createElement)("div",{className:"notice notice-info alt"},(0,a.createElement)("p",null,(0,a.createElement)("i",null,(0,n.__)("Please select a track from the block settings.","pulseshare")))),"single"===f&&(null==h?void 0:h.id)&&(0,a.createElement)("iframe",{id:"sfwe-track-"+h.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"200",src:"https://open.spotify.com/embed/track/"+h.id+"?utm_source=generator"}),"full"===f&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:v||"100%",height:b||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:r,currentTrack:n,displayType:i,height:o,width:s}=l,c=d()(t,"album-embed");return(0,a.createElement)("div",{className:c,id:r},(0,a.createElement)("div",{className:"container"},(0,a.createElement)("div",{className:"sfwe-episode"},"single"===i&&n.id&&(0,a.createElement)("iframe",{id:"sfwe-track-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"200",src:"https://open.spotify.com/embed/track/"+n.id+"?utm_source=generator"}),"full"===i&&(0,a.createElement)("iframe",{id:"sfwe-album-"+PulseShareAdminVars.pulseshare_options.album_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:o||"380",src:"https://open.spotify.com/embed/album/"+PulseShareAdminVars.pulseshare_options.album_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=i(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)r.call(e,l)&&e[l]&&(t=i(t,l));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(l=function(){return a}.apply(t,[]))||(e.exports=l)}()}},l={};function r(e){var a=l[e];if(void 0!==a)return a.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,r),n.exports}r.m=t,e=[],r.O=function(t,l,a,n){if(!l){var i=1/0;for(u=0;u<e.length;u++){l=e[u][0],a=e[u][1],n=e[u][2];for(var o=!0,s=0;s<l.length;s++)(!1&n||i>=n)&&Object.keys(r.O).every((function(e){return r.O[e](l[s])}))?l.splice(s--,1):(o=!1,n<i&&(i=n));if(o){e.splice(u--,1);var c=a();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[l,a,n]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var l in t)r.o(t,l)&&!r.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={141:0,137:0};r.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,i=l[0],o=l[1],s=l[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(a in o)r.o(o,a)&&(r.m[a]=o[a]);if(s)var u=s(r)}for(t&&t(l);c<i.length;c++)n=i[c],r.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return r.O(u)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var a=r.O(void 0,[137],(function(){return r(235)}));a=r.O(a)}(); -
pulseshare/trunk/assets/admin/blocks/list-embed/block.json
r3465238 r3465863 3 3 "apiVersion": 3, 4 4 "name": "pulseshare/list-embed", 5 "version": "1.1. 1",5 "version": "1.1.2", 6 6 "title": "Podcast & Episodes", 7 7 "category": "pulseshare", -
pulseshare/trunk/assets/admin/blocks/list-embed/index.asset.php
r3465238 r3465863 1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' c61584cd22fdaf7b9c40');1 <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'f4109a95fd5ef396d104'); -
pulseshare/trunk/assets/admin/blocks/list-embed/index.js
r3465238 r3465863 1 !function(){var e,t={744:function(e,t,l){"use strict";var i=window.wp.blocks,r=window.React,n=window.wp.i18n,o=window.wp.components,a=window.wp.blockEditor,s=window.wp.element,d=window.wp.apiFetch,c=l.n(d),p=l(942),u=l.n(p),f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/list-embed","version":"1.1. 1","title":"Podcast & Episodes","category":"pulseshare","description":"Display a list of episodes to embed in your posts.","keywords":["spotify","podcast","show","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"episodesArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentEpisode":{"type":"object","default":{}},"isVideo":{"type":"boolean","default":false},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');const h=(0,r.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,r.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));(0,r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,r.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})),(0,i.registerBlockType)(f,{icon:{src:h,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:i}){var d;const{blockID:p,episodesArray:f,displayType:h,currentEpisode:m,isVideo:v,height:w,width:y}=e;(0,s.useEffect)((()=>{p||t({blockID:`list-embed-${l}`})}),[p,l,t]);const[g,b]=(0,s.useState)(null);(0,s.useEffect)((()=>{c()({path:"/pulseshare/v1/episodes"}).then((e=>{t({episodesArray:e}),b(null)})).catch((e=>{console.error("PulseShare: Failed to fetch episodes",e),b((null==e?void 0:e.message)||"Failed to load episodes from Spotify.")}))}),[]);const E=u()(i,"list-embed"),_=v?"video":"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)("div",{className:"sfwe-block-sidebar"},(0,r.createElement)(o.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,r.createElement)(o.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the episode.",selected:h||"full",options:[{label:"Full Show",value:"full"},{label:"Single Episode",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===h&&(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Episode","pulseshare"),help:"Selected episode will be displayed in the frontend.",value:null!=m&&m.id?m.id:null===(d=f[0])||void 0===d?void 0:d.id,options:f.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentEpisode:f.find((t=>String(t.id)===String(e)))})}}),"single"===h&&(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,checked:v||!1,help:(0,n.__)("Enable this option if this episode is a video.","pulseshare"),label:(0,n.__)("Is this a video episode?","pulseshare"),onChange:e=>{t({isVideo:e})}}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:w}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:y})))),(0,r.createElement)("div",{className:E,id:p},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},g&&(0,r.createElement)("div",{className:"notice notice-error alt"},(0,r.createElement)("p",null,g)),"single"===h&&!(null!=m&&m.id)&&!g&&(0,r.createElement)("div",{className:"notice notice-info alt"},(0,r.createElement)("p",null,(0,r.createElement)("i",null,(0,n.__)("Please select an episode from the block settings.","pulseshare")))),"single"===h&&(null==m?void 0:m.id)&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+m.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/episode/"+m.id+"/"+_+"?utm_source=generator"}),"full"===h&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:i,currentEpisode:n,displayType:o,height:a,width:s}=l,d=u()(t,"list-embed");return(0,r.createElement)("div",{className:d,id:i},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},"single"===o&&n.id&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/episode/"+n.id+"?utm_source=generator"}),"full"===o&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=o(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)i.call(e,l)&&e[l]&&(t=o(t,l));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(l=function(){return r}.apply(t,[]))||(e.exports=l)}()}},l={};function i(e){var r=l[e];if(void 0!==r)return r.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=function(t,l,r,n){if(!l){var o=1/0;for(c=0;c<e.length;c++){l=e[c][0],r=e[c][1],n=e[c][2];for(var a=!0,s=0;s<l.length;s++)(!1&n||o>=n)&&Object.keys(i.O).every((function(e){return i.O[e](l[s])}))?l.splice(s--,1):(a=!1,n<o&&(o=n));if(a){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,r,n]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={266:0,542:0};i.O.j=function(t){return 0===e[t]};var t=function(t,l){var r,n,o=l[0],a=l[1],s=l[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(s)var c=s(i)}for(t&&t(l);d<o.length;d++)n=o[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var r=i.O(void 0,[542],(function(){return i(744)}));r=i.O(r)}();1 !function(){var e,t={744:function(e,t,l){"use strict";var i=window.wp.blocks,r=window.React,n=window.wp.i18n,o=window.wp.components,a=window.wp.blockEditor,s=window.wp.element,d=window.wp.apiFetch,c=l.n(d),p=l(942),u=l.n(p),f=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"pulseshare/list-embed","version":"1.1.2","title":"Podcast & Episodes","category":"pulseshare","description":"Display a list of episodes to embed in your posts.","keywords":["spotify","podcast","show","embed"],"supports":{"html":false},"attributes":{"blockID":{"type":"string","default":""},"episodesArray":{"type":"array","default":[]},"displayType":{"type":"string","default":"full"},"currentEpisode":{"type":"object","default":{}},"isVideo":{"type":"boolean","default":false},"height":{"type":"string"},"width":{"type":"string"}},"textdomain":"pulseshare","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./view.js"}');const h=(0,r.createElement)("svg",{width:"24",height:"24",fill:"none"},(0,r.createElement)("path",{d:"M16 5H4v2h12V5ZM16 9H4v2h12V9ZM4 13h8v2H4v-2ZM20 16l-6-3v6l6-3Z",fill:"currentColor"}));(0,r.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("path",{d:"M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm-1 3a1 1 0 1 0 2 0 1 1 0 0 0-2 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"}),(0,r.createElement)("path",{d:"M5 12a7 7 0 0 1 7-7v2a5 5 0 0 0-5 5H5zM12 17a5 5 0 0 0 5-5h2a7 7 0 0 1-7 7v-2z",fill:"currentColor"}),(0,r.createElement)("path",{d:"M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM3 12a9 9 0 1 0 18 0 9 9 0 0 0-18 0z","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})),(0,i.registerBlockType)(f,{icon:{src:h,foreground:"#2BA266"},edit:function({attributes:e,setAttributes:t,clientId:l,className:i}){var d;const{blockID:p,episodesArray:f,displayType:h,currentEpisode:m,isVideo:v,height:w,width:y}=e;(0,s.useEffect)((()=>{p||t({blockID:`list-embed-${l}`})}),[p,l,t]);const[g,b]=(0,s.useState)(null);(0,s.useEffect)((()=>{c()({path:"/pulseshare/v1/episodes"}).then((e=>{t({episodesArray:e}),b(null)})).catch((e=>{console.error("PulseShare: Failed to fetch episodes",e),b((null==e?void 0:e.message)||"Failed to load episodes from Spotify.")}))}),[]);const E=u()(i,"list-embed"),_=v?"video":"";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)("div",{className:"sfwe-block-sidebar"},(0,r.createElement)(o.PanelBody,{title:(0,n.__)("Settings","pulseshare"),initialOpen:!0},(0,r.createElement)(o.RadioControl,{label:(0,n.__)("Display Type","pulseshare"),help:"Select the display type for the episode.",selected:h||"full",options:[{label:"Full Show",value:"full"},{label:"Single Episode",value:"single"}],onChange:e=>{t({displayType:e})}}),"single"===h&&(0,r.createElement)(o.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,n.__)("Select Episode","pulseshare"),help:"Selected episode will be displayed in the frontend.",value:null!=m&&m.id?m.id:null===(d=f[0])||void 0===d?void 0:d.id,options:f.map((e=>({label:e.name,value:e.id}))),onChange:e=>{t({currentEpisode:f.find((t=>String(t.id)===String(e)))})}}),"single"===h&&(0,r.createElement)(o.ToggleControl,{__nextHasNoMarginBottom:!0,checked:v||!1,help:(0,n.__)("Enable this option if this episode is a video.","pulseshare"),label:(0,n.__)("Is this a video episode?","pulseshare"),onChange:e=>{t({isVideo:e})}}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Height",onChange:e=>{t({height:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:w}),(0,r.createElement)(o.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:"Width",onChange:e=>{t({width:e})},units:[{a11yLabel:"Pixels (px)",label:"px",step:1,value:"px"},{a11yLabel:"Percent (%)",label:"%",step:1,value:"%"}],value:y})))),(0,r.createElement)("div",{className:E,id:p},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},g&&(0,r.createElement)("div",{className:"notice notice-error alt"},(0,r.createElement)("p",null,g)),"single"===h&&!(null!=m&&m.id)&&!g&&(0,r.createElement)("div",{className:"notice notice-info alt"},(0,r.createElement)("p",null,(0,r.createElement)("i",null,(0,n.__)("Please select an episode from the block settings.","pulseshare")))),"single"===h&&(null==m?void 0:m.id)&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+m.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/episode/"+m.id+"/"+_+"?utm_source=generator"}),"full"===h&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:y||"100%",height:w||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"})))))},save:function(e){const{className:t,attributes:l}=e,{blockID:i,currentEpisode:n,displayType:o,height:a,width:s}=l,d=u()(t,"list-embed");return(0,r.createElement)("div",{className:d,id:i},(0,r.createElement)("div",{className:"container"},(0,r.createElement)("div",{className:"sfwe-episode"},"single"===o&&n.id&&(0,r.createElement)("iframe",{id:"sfwe-episode-"+n.id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/episode/"+n.id+"?utm_source=generator"}),"full"===o&&(0,r.createElement)("iframe",{id:"sfwe-show-"+PulseShareAdminVars.pulseshare_options.show_id,frameBorder:"0",allowFullScreen:"",allow:"autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture",loading:"lazy",width:s||"100%",height:a||"200",src:"https://open.spotify.com/embed/show/"+PulseShareAdminVars.pulseshare_options.show_id+"?utm_source=generator"}))))}})},942:function(e,t){var l;!function(){"use strict";var i={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var l=arguments[t];l&&(e=o(e,n(l)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var l in e)i.call(e,l)&&e[l]&&(t=o(t,l));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(l=function(){return r}.apply(t,[]))||(e.exports=l)}()}},l={};function i(e){var r=l[e];if(void 0!==r)return r.exports;var n=l[e]={exports:{}};return t[e](n,n.exports,i),n.exports}i.m=t,e=[],i.O=function(t,l,r,n){if(!l){var o=1/0;for(c=0;c<e.length;c++){l=e[c][0],r=e[c][1],n=e[c][2];for(var a=!0,s=0;s<l.length;s++)(!1&n||o>=n)&&Object.keys(i.O).every((function(e){return i.O[e](l[s])}))?l.splice(s--,1):(a=!1,n<o&&(o=n));if(a){e.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}n=n||0;for(var c=e.length;c>0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[l,r,n]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={266:0,542:0};i.O.j=function(t){return 0===e[t]};var t=function(t,l){var r,n,o=l[0],a=l[1],s=l[2],d=0;if(o.some((function(t){return 0!==e[t]}))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(s)var c=s(i)}for(t&&t(l);d<o.length;d++)n=o[d],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(c)},l=self.webpackChunkpulseshare=self.webpackChunkpulseshare||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var r=i.O(void 0,[542],(function(){return i(744)}));r=i.O(r)}(); -
pulseshare/trunk/includes/Helper.php
r3465141 r3465863 21 21 22 22 /** 23 * Encrypt a value using AES-256-CBC.24 *25 * @since 1.0.326 * @param string $value The plaintext value to encrypt.27 * @return string The encrypted value (base64-encoded).28 */29 public static function encrypt( $value ) {30 if ( empty( $value ) ) {31 return '';32 }33 34 $key = AUTH_KEY;35 $iv = \openssl_random_pseudo_bytes( \openssl_cipher_iv_length( 'aes-256-cbc' ) );36 $cipher = \openssl_encrypt( $value, 'aes-256-cbc', $key, 0, $iv );37 38 if ( false === $cipher ) {39 return '';40 }41 42 // Store IV alongside ciphertext so we can decrypt later.43 return \base64_encode( $iv . '::' . $cipher ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode -- Used for encryption storage, not obfuscation.44 }45 46 /**47 * Decrypt a value encrypted with self::encrypt().48 *49 * @since 1.0.350 * @param string $value The encrypted value (base64-encoded).51 * @return string The decrypted plaintext value.52 */53 public static function decrypt( $value ) {54 if ( empty( $value ) ) {55 return '';56 }57 58 $decoded = \base64_decode( $value, true ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode -- Used for decrypting stored values, not obfuscation.59 60 if ( false === $decoded || strpos( $decoded, '::' ) === false ) {61 // Not encrypted (legacy plaintext value), return as-is.62 return $value;63 }64 65 $parts = explode( '::', $decoded, 2 );66 if ( count( $parts ) !== 2 ) {67 return $value;68 }69 70 $key = AUTH_KEY;71 $iv = $parts[0];72 $cipher = $parts[1];73 $decrypted = \openssl_decrypt( $cipher, 'aes-256-cbc', $key, 0, $iv );74 75 return ( false !== $decrypted ) ? $decrypted : '';76 }77 78 /**79 23 * Check if the spotify client id and secret are set. 80 24 * … … 86 30 $pulseshare_options = get_option( 'pulseshare_options' ); 87 31 $pulseshareclient_id = $pulseshare_options['pulseshare_client_id'] ?? ''; 88 $pulseshareclient_secret = self::decrypt( $pulseshare_options['pulseshare_client_secret'] ?? '' );32 $pulseshareclient_secret = $pulseshare_options['pulseshare_client_secret'] ?? ''; 89 33 90 34 return empty( $pulseshareclient_id ) || empty( $pulseshareclient_secret ); … … 107 51 $pulseshare_options = get_option( 'pulseshare_options' ); 108 52 $client_id = $pulseshare_options['pulseshare_client_id'] ?? ''; 109 $client_secret = self::decrypt( $pulseshare_options['pulseshare_client_secret'] ?? '' );53 $client_secret = $pulseshare_options['pulseshare_client_secret'] ?? ''; 110 54 111 55 if ( empty( $client_id ) || empty( $client_secret ) ) { -
pulseshare/trunk/includes/options/OptionsPanel.php
r3465141 r3465863 9 9 10 10 namespace PulseShare\Includes\Options; 11 12 use PulseShare\Includes\Helper;13 11 14 12 // If this file is called directly, abort. … … 216 214 $sanitize_callback = $args['sanitize_callback'] ?? $this->get_sanitize_callback_by_type( $field_type ); 217 215 $sanitized_value = call_user_func( $sanitize_callback, $new_option_value, $args ); 218 219 // Encrypt password fields before storing.220 if ( 'password' === $field_type && ! empty( $sanitized_value ) ) {221 $sanitized_value = Helper::encrypt( $sanitized_value );222 }223 216 224 217 $new_value[ $key ] = $sanitized_value; … … 392 385 public function render_password_field( $args ) { 393 386 $option_name = $args['label_for']; 394 $raw_value = $this->get_option_value( $option_name ); 395 $value = Helper::decrypt( $raw_value ); 387 $value = $this->get_option_value( $option_name ); 396 388 $description = $this->settings[ $option_name ]['description'] ?? ''; 397 389 ?> -
pulseshare/trunk/languages/pulseshare.pot
r3465238 r3465863 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 2026-02- 19 16:56+0000\n"9 "POT-Creation-Date: 2026-02-20 14:19+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n" … … 79 79 msgstr "" 80 80 81 #: includes/Helper.php:2 6681 #: includes/Helper.php:210 82 82 msgid "API Keys" 83 83 msgstr "" 84 84 85 #: includes/Helper.php:2 6785 #: includes/Helper.php:211 86 86 msgid "Integrations" 87 87 msgstr "" 88 88 89 #: includes/Helper.php:2 7789 #: includes/Helper.php:221 90 90 msgid "Client ID" 91 91 msgstr "" 92 92 93 #: includes/Helper.php:2 8393 #: includes/Helper.php:227 94 94 msgid "Client Secret" 95 95 msgstr "" 96 96 97 #: includes/Helper.php:2 9097 #: includes/Helper.php:234 98 98 msgid "Podcast Show ID" 99 99 msgstr "" 100 100 101 #: includes/Helper.php:2 96101 #: includes/Helper.php:240 102 102 msgid "Album ID" 103 103 msgstr "" 104 104 105 #: includes/Helper.php: 302105 #: includes/Helper.php:246 106 106 msgid "Market" 107 107 msgstr "" 108 108 109 #: includes/Helper.php: 304109 #: includes/Helper.php:248 110 110 msgid "ISO 3166-1 alpha-2 country code (e.g. US, GB, IN)." 111 111 msgstr "" … … 215 215 msgstr "" 216 216 217 #: includes/options/OptionsPanel.php:10 9217 #: includes/options/OptionsPanel.php:107 218 218 msgid "Options" 219 219 msgstr "" 220 220 221 #: includes/options/OptionsPanel.php:2 72221 #: includes/options/OptionsPanel.php:265 222 222 msgid "Settings Saved" 223 223 msgstr "" -
pulseshare/trunk/pulseshare.php
r3465238 r3465863 11 11 * Plugin URI: https://swapnild.com 12 12 * Description: PulseShare help you share interactive content from Spotify on your website. Embed podcast, an album, or other audio and video content to your website and promote your music, share your new podcast episodes with fans, or highlight your favourite album or playlist. 13 * Version: 1.1. 113 * Version: 1.1.2 14 14 * Author: Swapnil Deshpande 15 15 * Author URI: https://swapnild.com/ … … 34 34 * Currently plugin version. 35 35 */ 36 define( 'PULSESHARE_VERSION', '1.1. 1' );36 define( 'PULSESHARE_VERSION', '1.1.2' ); 37 37 define( 'PULSESHARE_DIRPATH', plugin_dir_path( __FILE__ ) ); 38 38 define( 'PULSESHARE_URLPATH', plugin_dir_url( __FILE__ ) ); -
pulseshare/trunk/readme.txt
r3465238 r3465863 5 5 Requires at least: 6.6 6 6 Tested up to: 6.9.1 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 Requires PHP: 8.0 9 9 License: GPLv2 or later … … 91 91 == Changelog == 92 92 93 = 1.1.2 = 94 * Improvement: Streamlined settings storage for better reliability. 95 * Improvement: Optimized settings page performance. 96 * Dev: Internal code cleanup. 97 93 98 = 1.1.1 = 94 99 * Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets.
Note: See TracChangeset
for help on using the changeset viewer.