Plugin Directory

Changeset 3465863


Ignore:
Timestamp:
02/20/2026 02:19:54 PM (5 weeks ago)
Author:
swapnilde
Message:

Update to version 1.1.2 from GitHub

Location:
pulseshare
Files:
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • pulseshare/tags/1.1.2/README.md

    r3465238 r3465863  
    55**Requires at least:** 6.6
    66**Tested up to:** 6.9.1
    7 **Stable tag:** 1.1.1 
     7**Stable tag:** 1.1.2 
    88**Requires PHP:** 8.0
    99**License:** GPLv2 or later 
     
    8585## Changelog ##
    8686
     87### 1.1.2 ###
     88* Improvement: Streamlined settings storage for better reliability.
     89* Improvement: Optimized settings page performance.
     90* Dev: Internal code cleanup.
     91
    8792### 1.1.1 ###
    8893* 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  
    33  "apiVersion": 3,
    44  "name": "pulseshare/album-embed",
    5   "version": "1.1.1",
     5  "version": "1.1.2",
    66  "title": "Album & Tracks",
    77  "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' => '832ef2532ce1332a863d');
     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  
    33  "apiVersion": 3,
    44  "name": "pulseshare/list-embed",
    5   "version": "1.1.1",
     5  "version": "1.1.2",
    66  "title": "Podcast & Episodes",
    77  "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  
    2121
    2222    /**
    23      * Encrypt a value using AES-256-CBC.
    24      *
    25      * @since  1.0.3
    26      * @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.3
    50      * @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     /**
    7923     * Check if the spotify client id and secret are set.
    8024     *
     
    8630        $pulseshare_options      = get_option( 'pulseshare_options' );
    8731        $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'] ?? '';
    8933
    9034        return empty( $pulseshareclient_id ) || empty( $pulseshareclient_secret );
     
    10751        $pulseshare_options = get_option( 'pulseshare_options' );
    10852        $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'] ?? '';
    11054
    11155        if ( empty( $client_id ) || empty( $client_secret ) ) {
  • pulseshare/tags/1.1.2/includes/options/OptionsPanel.php

    r3465141 r3465863  
    99
    1010namespace PulseShare\Includes\Options;
    11 
    12 use PulseShare\Includes\Helper;
    1311
    1412// If this file is called directly, abort.
     
    216214                $sanitize_callback = $args['sanitize_callback'] ?? $this->get_sanitize_callback_by_type( $field_type );
    217215                $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                 }
    223216
    224217                $new_value[ $key ] = $sanitized_value;
     
    392385    public function render_password_field( $args ) {
    393386        $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 );
    396388        $description = $this->settings[ $option_name ]['description'] ?? '';
    397389        ?>
  • pulseshare/tags/1.1.2/languages/pulseshare.pot

    r3465238 r3465863  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"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"
    1010"X-Poedit-Basepath: ..\n"
    1111"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"
     
    7979msgstr ""
    8080
    81 #: includes/Helper.php:266
     81#: includes/Helper.php:210
    8282msgid "API Keys"
    8383msgstr ""
    8484
    85 #: includes/Helper.php:267
     85#: includes/Helper.php:211
    8686msgid "Integrations"
    8787msgstr ""
    8888
    89 #: includes/Helper.php:277
     89#: includes/Helper.php:221
    9090msgid "Client ID"
    9191msgstr ""
    9292
    93 #: includes/Helper.php:283
     93#: includes/Helper.php:227
    9494msgid "Client Secret"
    9595msgstr ""
    9696
    97 #: includes/Helper.php:290
     97#: includes/Helper.php:234
    9898msgid "Podcast Show ID"
    9999msgstr ""
    100100
    101 #: includes/Helper.php:296
     101#: includes/Helper.php:240
    102102msgid "Album ID"
    103103msgstr ""
    104104
    105 #: includes/Helper.php:302
     105#: includes/Helper.php:246
    106106msgid "Market"
    107107msgstr ""
    108108
    109 #: includes/Helper.php:304
     109#: includes/Helper.php:248
    110110msgid "ISO 3166-1 alpha-2 country code (e.g. US, GB, IN)."
    111111msgstr ""
     
    215215msgstr ""
    216216
    217 #: includes/options/OptionsPanel.php:109
     217#: includes/options/OptionsPanel.php:107
    218218msgid "Options"
    219219msgstr ""
    220220
    221 #: includes/options/OptionsPanel.php:272
     221#: includes/options/OptionsPanel.php:265
    222222msgid "Settings Saved"
    223223msgstr ""
  • pulseshare/tags/1.1.2/pulseshare.php

    r3465238 r3465863  
    1111 * Plugin URI:        https://swapnild.com
    1212 * 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.1
     13 * Version:           1.1.2
    1414 * Author:            Swapnil Deshpande
    1515 * Author URI:        https://swapnild.com/
     
    3434 * Currently plugin version.
    3535 */
    36 define( 'PULSESHARE_VERSION', '1.1.1' );
     36define( 'PULSESHARE_VERSION', '1.1.2' );
    3737define( 'PULSESHARE_DIRPATH', plugin_dir_path( __FILE__ ) );
    3838define( 'PULSESHARE_URLPATH', plugin_dir_url( __FILE__ ) );
  • pulseshare/tags/1.1.2/readme.txt

    r3465238 r3465863  
    55Requires at least: 6.6
    66Tested up to: 6.9.1
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88Requires PHP: 8.0
    99License: GPLv2 or later 
     
    9191== Changelog ==
    9292
     93= 1.1.2 =
     94* Improvement: Streamlined settings storage for better reliability.
     95* Improvement: Optimized settings page performance.
     96* Dev: Internal code cleanup.
     97
    9398= 1.1.1 =
    9499* Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets.
  • pulseshare/trunk/README.md

    r3465238 r3465863  
    55**Requires at least:** 6.6
    66**Tested up to:** 6.9.1
    7 **Stable tag:** 1.1.1 
     7**Stable tag:** 1.1.2 
    88**Requires PHP:** 8.0
    99**License:** GPLv2 or later 
     
    8585## Changelog ##
    8686
     87### 1.1.2 ###
     88* Improvement: Streamlined settings storage for better reliability.
     89* Improvement: Optimized settings page performance.
     90* Dev: Internal code cleanup.
     91
    8792### 1.1.1 ###
    8893* Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets.
  • pulseshare/trunk/assets/admin/blocks/album-embed/block.json

    r3465238 r3465863  
    33  "apiVersion": 3,
    44  "name": "pulseshare/album-embed",
    5   "version": "1.1.1",
     5  "version": "1.1.2",
    66  "title": "Album & Tracks",
    77  "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' => '832ef2532ce1332a863d');
     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  
    33  "apiVersion": 3,
    44  "name": "pulseshare/list-embed",
    5   "version": "1.1.1",
     5  "version": "1.1.2",
    66  "title": "Podcast & Episodes",
    77  "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  
    2121
    2222    /**
    23      * Encrypt a value using AES-256-CBC.
    24      *
    25      * @since  1.0.3
    26      * @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.3
    50      * @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     /**
    7923     * Check if the spotify client id and secret are set.
    8024     *
     
    8630        $pulseshare_options      = get_option( 'pulseshare_options' );
    8731        $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'] ?? '';
    8933
    9034        return empty( $pulseshareclient_id ) || empty( $pulseshareclient_secret );
     
    10751        $pulseshare_options = get_option( 'pulseshare_options' );
    10852        $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'] ?? '';
    11054
    11155        if ( empty( $client_id ) || empty( $client_secret ) ) {
  • pulseshare/trunk/includes/options/OptionsPanel.php

    r3465141 r3465863  
    99
    1010namespace PulseShare\Includes\Options;
    11 
    12 use PulseShare\Includes\Helper;
    1311
    1412// If this file is called directly, abort.
     
    216214                $sanitize_callback = $args['sanitize_callback'] ?? $this->get_sanitize_callback_by_type( $field_type );
    217215                $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                 }
    223216
    224217                $new_value[ $key ] = $sanitized_value;
     
    392385    public function render_password_field( $args ) {
    393386        $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 );
    396388        $description = $this->settings[ $option_name ]['description'] ?? '';
    397389        ?>
  • pulseshare/trunk/languages/pulseshare.pot

    r3465238 r3465863  
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"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"
    1010"X-Poedit-Basepath: ..\n"
    1111"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"
     
    7979msgstr ""
    8080
    81 #: includes/Helper.php:266
     81#: includes/Helper.php:210
    8282msgid "API Keys"
    8383msgstr ""
    8484
    85 #: includes/Helper.php:267
     85#: includes/Helper.php:211
    8686msgid "Integrations"
    8787msgstr ""
    8888
    89 #: includes/Helper.php:277
     89#: includes/Helper.php:221
    9090msgid "Client ID"
    9191msgstr ""
    9292
    93 #: includes/Helper.php:283
     93#: includes/Helper.php:227
    9494msgid "Client Secret"
    9595msgstr ""
    9696
    97 #: includes/Helper.php:290
     97#: includes/Helper.php:234
    9898msgid "Podcast Show ID"
    9999msgstr ""
    100100
    101 #: includes/Helper.php:296
     101#: includes/Helper.php:240
    102102msgid "Album ID"
    103103msgstr ""
    104104
    105 #: includes/Helper.php:302
     105#: includes/Helper.php:246
    106106msgid "Market"
    107107msgstr ""
    108108
    109 #: includes/Helper.php:304
     109#: includes/Helper.php:248
    110110msgid "ISO 3166-1 alpha-2 country code (e.g. US, GB, IN)."
    111111msgstr ""
     
    215215msgstr ""
    216216
    217 #: includes/options/OptionsPanel.php:109
     217#: includes/options/OptionsPanel.php:107
    218218msgid "Options"
    219219msgstr ""
    220220
    221 #: includes/options/OptionsPanel.php:272
     221#: includes/options/OptionsPanel.php:265
    222222msgid "Settings Saved"
    223223msgstr ""
  • pulseshare/trunk/pulseshare.php

    r3465238 r3465863  
    1111 * Plugin URI:        https://swapnild.com
    1212 * 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.1
     13 * Version:           1.1.2
    1414 * Author:            Swapnil Deshpande
    1515 * Author URI:        https://swapnild.com/
     
    3434 * Currently plugin version.
    3535 */
    36 define( 'PULSESHARE_VERSION', '1.1.1' );
     36define( 'PULSESHARE_VERSION', '1.1.2' );
    3737define( 'PULSESHARE_DIRPATH', plugin_dir_path( __FILE__ ) );
    3838define( 'PULSESHARE_URLPATH', plugin_dir_url( __FILE__ ) );
  • pulseshare/trunk/readme.txt

    r3465238 r3465863  
    55Requires at least: 6.6
    66Tested up to: 6.9.1
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88Requires PHP: 8.0
    99License: GPLv2 or later 
     
    9191== Changelog ==
    9292
     93= 1.1.2 =
     94* Improvement: Streamlined settings storage for better reliability.
     95* Improvement: Optimized settings page performance.
     96* Dev: Internal code cleanup.
     97
    9398= 1.1.1 =
    9499* Improvement: Spotify API error handling and user feedback in blocks and Elementor widgets.
Note: See TracChangeset for help on using the changeset viewer.