Changeset 3400905
- Timestamp:
- 11/22/2025 11:47:04 AM (4 months ago)
- Location:
- image-carousel/trunk
- Files:
-
- 5 edited
-
image-carousel.php (modified) (2 diffs)
-
inc/block/carousel-block/dist/blocks.build.js (modified) (1 diff)
-
inc/block/class-block.php (modified) (1 diff)
-
inc/functions/icp-functions.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-carousel/trunk/image-carousel.php
r3210310 r3400905 8 8 Text Domain: image-carousel 9 9 Domain Path: /languages 10 Version: 1.0.0. 3910 Version: 1.0.0.41 11 11 Author URI: https://www.ghozylab.com/plugins/ 12 12 */ … … 22 22 $icp_plugin_dir = substr( plugin_dir_path( __FILE__ ), 0, -1 ); 23 23 24 define( 'ICP_VERSION', '1.0.0. 39' );24 define( 'ICP_VERSION', '1.0.0.41' ); 25 25 define( 'ICP_URL', $icp_plugin_url ); 26 26 define( 'ICP_DIR', $icp_plugin_dir ); -
image-carousel/trunk/inc/block/carousel-block/dist/blocks.build.js
r2567724 r3400905 1 !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var o=n(2),r=(n.n(o),n(3)),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("carousel/block",{title:__("Image Carousel"),description:__("Available options for carousel"),icon:"format-gallery",category:" common",keywords:[__("carousel"),__("slider"),__("images")],supports:{html:!1,customClassName:!1},edit:r.a,save:function(e){Object(r.b)(e,"shortcode")}})},function(e,t){},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return Math.min(3,JSON.parse(e.images).length)}function s(e,t){switch(t){case"shortcode":e.attributes.native_shortcode=c(e)}}function c(e){var t=JSON.parse(e.attributes.images),n=[],o=e.attributes.style_boxshadow?'shadowbox="'+e.attributes.style_boxshadow+'"':"",r="",i=icp_block_vars.is_widget?"icp_widget_carousel":"gallery";return t.forEach(function(e){n.push(e.id)}),n.length&&(r="["+i+' ids="'+n.join()+'" columns="'+e.attributes.columns+'" '+o+"]"),r}t.b=s;var u=n(4),p=(n.n(u),n(5)),m=(n.n(p),n(6)),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=wp.element,b=f.Component,g=f.Fragment,__=wp.i18n.__,h=wp.components,y=h.IconButton,w=h.Button,v=h.DropZone,S=h.PanelBody,_=h.RangeControl,k=h.ToggleControl,E=h.Toolbar,C=h.withNotices,I=icp_block_vars.is_widget?wp.blockEditor:wp.editor,O=I.BlockControls,N=I.MediaUpload,x=I.MediaPlaceholder,A=I.InspectorControls,j=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onSelectImage=e.onSelectImage.bind(e),e.onSelectImages=e.onSelectImages.bind(e),e.setColumnsNumber=e.setColumnsNumber.bind(e),e.setStyleShadow=e.setStyleShadow.bind(e),e.onRemoveImage=e.onRemoveImage.bind(e),e.setImageAttributes=e.setImageAttributes.bind(e),e.addFiles=e.addFiles.bind(e),e.uploadFromFiles=e.uploadFromFiles.bind(e),e.state={selectedImage:null},e}return a(t,e),d(t,[{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(u.filter)(JSON.parse(t.props.attributes.images),function(t,n){return e!==n}),o=t.props.attributes.columns;t.setState({selectedImage:null}),t.props.setAttributes({images:JSON.stringify(n),columns:o?Math.min(n.length,o):o})}}},{key:"onSelectImages",value:function(e){var t=[].concat(o(e.map(function(e){return Array.isArray(e.caption)&&(e.caption=e.caption[0]),Object(u.pick)(e,["alt","caption","id","link","url","sizes.thumbnail"])})));this.props.setAttributes({images:JSON.stringify(t)})}},{key:"setColumnsNumber",value:function(e){this.props.setAttributes({columns:e})}},{key:"setStyleShadow",value:function(){var e=this.props.attributes.style_boxshadow;this.props.setAttributes({style_boxshadow:!e})}},{key:"setImageAttributes",value:function(e,t){var n=this.props,r=n.attributes.images,i=n.setAttributes,a="string"===typeof r?JSON.parse(r):r;a[e]&&i({images:JSON.stringify([].concat(o(a.slice(0,e)),[Object.assign({},a[e],t)],o(a.slice(e+1))))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=JSON.parse(this.props.attributes.images)||[],n=this.props,o=n.noticeOperations,r=n.setAttributes;mediaUpload({allowedType:"image",filesList:e,onFileChange:function(e){r({images:JSON.stringify(t.concat(e))})},onError:o.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,o=t.isSelected,r=t.className,i=t.noticeOperations,a=t.noticeUI,s=n.images,c=n.columns,u=void 0===c?l(n):c,p=n.style_boxshadow,d=wp.element.createElement(v,{onFilesDrop:this.addFiles}),f="string"===typeof s?JSON.parse(s):s,b=wp.element.createElement(O,null,!!f.length&&wp.element.createElement(E,null,wp.element.createElement(N,{onSelect:this.onSelectImages,type:"image",multiple:!0,gallery:!0,value:f.map(function(e){return e.id}),render:function(e){var t=e.open;return wp.element.createElement(y,{className:"components-toolbar__control",label:__("Edit Carousel"),icon:"edit",onClick:t})}})));return 0===f.length?wp.element.createElement(g,null,b,wp.element.createElement(x,{icon:"format-gallery",className:r,labels:{title:__("Image Carousel"),instructions:__("Drag images, upload new ones or select files from your library."),name:__("images")},onSelect:this.onSelectImages,accept:["image/*"],allowedTypes:["image"],multiple:!0,gallery:!0,notices:a,onError:i.createErrorNotice})):wp.element.createElement(g,null,b,wp.element.createElement(A,null,wp.element.createElement(S,{title:__("Carousel Settings")},f.length>1&&wp.element.createElement(_,{label:__("Image per Slide"),value:u,onChange:this.setColumnsNumber,min:1,max:9}),wp.element.createElement(k,{label:__("Box Shadow"),checked:!!p,onChange:this.setStyleShadow,help:__(p?"Box Shadow will appear in your Carousel.":"Hidden Box Shadow from your Carousel.")}))),a,wp.element.createElement("div",{className:"icp-blocks-gallery-item "+r+" "},d,wp.element.createElement("div",{className:"icp-blocks-gallery-container"},f.map(function(t,n){return 0===u&&n>0?null:wp.element.createElement(m.a,{key:t.id||t.url,url:t.sizes&&t.sizes.thumbnail.url,alt:t.alt,id:t.id,classes:"icp-"+u+"-cols is-thumb",isSelected:o&&e.state.selectedImage===n,onRemove:e.onRemoveImage(n),onSelect:e.onSelectImage(n),setAttributes:function(t){return e.setImageAttributes(n,t)},caption:t.caption})})),o&&wp.element.createElement("div",null,wp.element.createElement(N,{onSelect:this.onSelectImages,type:"image",multiple:!0,gallery:!0,value:f.map(function(e){return e.id}),render:function(e){var t=e.open;return wp.element.createElement("div",{className:"icp-blocks-edit-gallery"},wp.element.createElement(w,{className:"components-button is-button is-default is-large",onClick:t},__("Edit Carousel")))}}))))}}]),t}(b);t.a=C(j)},function(e,t){e.exports=lodash},function(e,t){},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),l=n.n(a),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=wp.element,u=c.Component,p=c.Fragment,m=wp.components,d=m.IconButton,f=m.Spinner,__=(m.Modal,wp.i18n.__),b=wp.keycodes,g=b.BACKSPACE,h=b.DELETE,y=wp.data.withSelect,w=(wp.editor.RichText,wp.blob.isBlobURL),v=function(e){function t(){o(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onImageClick=e.onImageClick.bind(e),e.onSelectCaption=e.onSelectCaption.bind(e),e.onKeyDown=e.onKeyDown.bind(e),e.bindContainer=e.bindContainer.bind(e),e.state={captionSelected:!1},e}return i(t,e),s(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[g,h].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,o=t.image,r=t.url;o&&!r&&this.props.setAttributes({url:o.source_url,alt:o.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.alt,o=e.id,r=(e.link,e.isSelected),i=e.caption,a=e.onRemove,s=(e.setAttributes,e.classes),c=e["aria-label"],u=wp.element.createElement(p,null,wp.element.createElement("img",{src:t,alt:n,"data-id":o,onClick:this.onImageClick,tabIndex:"0",onKeyDown:this.onImageClick,"aria-label":c}),w(t)&&wp.element.createElement(f,null)),m=l()({"is-selected":r,"is-transient":w(t)},s);return wp.element.createElement("figure",{className:m,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},r&&wp.element.createElement("div",{className:"core-blocks-gallery-item__inline-menu"},wp.element.createElement(d,{icon:"no-alt",onClick:a,className:"blocks-gallery-item__remove",label:__("Remove Image")})),u,(i&&i.length,null))}}]),t}(u);t.a=y(function(e,t){var n=e("core"),o=n.getMedia,r=t.id;return{image:r?o(r):null}})(v)},function(e,t,n){var o,r;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===r)for(var l in o)i.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(o=[],void 0!==(r=function(){return n}.apply(t,o))&&(e.exports=r))}()}]);1 !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(1)},function(e,t,n){"use strict";var o=n(2),r=(n.n(o),n(3)),__=wp.i18n.__;(0,wp.blocks.registerBlockType)("carousel/block",{title:__("Image Carousel"),description:__("Available options for carousel"),icon:"format-gallery",category:"media",keywords:[__("carousel"),__("slider"),__("images")],supports:{html:!1,customClassName:!1},edit:r.a,save:function(e){Object(r.b)(e,"shortcode")}})},function(e,t){},function(e,t,n){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function a(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){return Math.min(3,JSON.parse(e.images).length)}function s(e,t){switch(t){case"shortcode":e.attributes.native_shortcode=c(e)}}function c(e){var t=JSON.parse(e.attributes.images),n=[],o=e.attributes.style_boxshadow?'shadowbox="'+e.attributes.style_boxshadow+'"':"",r="",i=icp_block_vars.is_widget?"icp_widget_carousel":"gallery";return t.forEach(function(e){n.push(e.id)}),n.length&&(r="["+i+' ids="'+n.join()+'" columns="'+e.attributes.columns+'" '+o+"]"),r}t.b=s;var u=n(4),p=(n.n(u),n(5)),m=(n.n(p),n(6)),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),f=wp.element,b=f.Component,g=f.Fragment,__=wp.i18n.__,h=wp.components,y=h.IconButton,w=h.Button,v=h.DropZone,S=h.PanelBody,_=h.RangeControl,k=h.ToggleControl,E=h.Toolbar,C=h.withNotices,I=icp_block_vars.is_widget?wp.blockEditor:wp.editor,O=I.BlockControls,N=I.MediaUpload,x=I.MediaPlaceholder,A=I.InspectorControls,j=function(e){function t(){r(this,t);var e=i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onSelectImage=e.onSelectImage.bind(e),e.onSelectImages=e.onSelectImages.bind(e),e.setColumnsNumber=e.setColumnsNumber.bind(e),e.setStyleShadow=e.setStyleShadow.bind(e),e.onRemoveImage=e.onRemoveImage.bind(e),e.setImageAttributes=e.setImageAttributes.bind(e),e.addFiles=e.addFiles.bind(e),e.uploadFromFiles=e.uploadFromFiles.bind(e),e.state={selectedImage:null},e}return a(t,e),d(t,[{key:"onSelectImage",value:function(e){var t=this;return function(){t.state.selectedImage!==e&&t.setState({selectedImage:e})}}},{key:"onRemoveImage",value:function(e){var t=this;return function(){var n=Object(u.filter)(JSON.parse(t.props.attributes.images),function(t,n){return e!==n}),o=t.props.attributes.columns;t.setState({selectedImage:null}),t.props.setAttributes({images:JSON.stringify(n),columns:o?Math.min(n.length,o):o})}}},{key:"onSelectImages",value:function(e){var t=[].concat(o(e.map(function(e){return Array.isArray(e.caption)&&(e.caption=e.caption[0]),Object(u.pick)(e,["alt","caption","id","link","url","sizes.thumbnail"])})));this.props.setAttributes({images:JSON.stringify(t)})}},{key:"setColumnsNumber",value:function(e){this.props.setAttributes({columns:e})}},{key:"setStyleShadow",value:function(){var e=this.props.attributes.style_boxshadow;this.props.setAttributes({style_boxshadow:!e})}},{key:"setImageAttributes",value:function(e,t){var n=this.props,r=n.attributes.images,i=n.setAttributes,a="string"===typeof r?JSON.parse(r):r;a[e]&&i({images:JSON.stringify([].concat(o(a.slice(0,e)),[Object.assign({},a[e],t)],o(a.slice(e+1))))})}},{key:"uploadFromFiles",value:function(e){this.addFiles(e.target.files)}},{key:"addFiles",value:function(e){var t=JSON.parse(this.props.attributes.images)||[],n=this.props,o=n.noticeOperations,r=n.setAttributes;mediaUpload({allowedType:"image",filesList:e,onFileChange:function(e){r({images:JSON.stringify(t.concat(e))})},onError:o.createErrorNotice})}},{key:"componentDidUpdate",value:function(e){!this.props.isSelected&&e.isSelected&&this.setState({selectedImage:null,captionSelected:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.attributes,o=t.isSelected,r=t.className,i=t.noticeOperations,a=t.noticeUI,s=n.images,c=n.columns,u=void 0===c?l(n):c,p=n.style_boxshadow,d=wp.element.createElement(v,{onFilesDrop:this.addFiles}),f="string"===typeof s?JSON.parse(s):s,b=wp.element.createElement(O,null,!!f.length&&wp.element.createElement(E,null,wp.element.createElement(N,{onSelect:this.onSelectImages,type:"image",multiple:!0,gallery:!0,value:f.map(function(e){return e.id}),render:function(e){var t=e.open;return wp.element.createElement(y,{className:"components-toolbar__control",label:__("Edit Carousel"),icon:"edit",onClick:t})}})));return 0===f.length?wp.element.createElement(g,null,b,wp.element.createElement(x,{icon:"format-gallery",className:r,labels:{title:__("Image Carousel"),instructions:__("Drag images, upload new ones or select files from your library."),name:__("images")},onSelect:this.onSelectImages,accept:["image/*"],allowedTypes:["image"],multiple:!0,gallery:!0,notices:a,onError:i.createErrorNotice})):wp.element.createElement(g,null,b,wp.element.createElement(A,null,wp.element.createElement(S,{title:__("Carousel Settings")},f.length>1&&wp.element.createElement(_,{label:__("Image per Slide"),value:u,onChange:this.setColumnsNumber,min:1,max:9}),wp.element.createElement(k,{label:__("Box Shadow"),checked:!!p,onChange:this.setStyleShadow,help:__(p?"Box Shadow will appear in your Carousel.":"Hidden Box Shadow from your Carousel.")}))),a,wp.element.createElement("div",{className:"icp-blocks-gallery-item "+r+" "},d,wp.element.createElement("div",{className:"icp-blocks-gallery-container"},f.map(function(t,n){return 0===u&&n>0?null:wp.element.createElement(m.a,{key:t.id||t.url,url:t.sizes&&t.sizes.thumbnail.url,alt:t.alt,id:t.id,classes:"icp-"+u+"-cols is-thumb",isSelected:o&&e.state.selectedImage===n,onRemove:e.onRemoveImage(n),onSelect:e.onSelectImage(n),setAttributes:function(t){return e.setImageAttributes(n,t)},caption:t.caption})})),o&&wp.element.createElement("div",null,wp.element.createElement(N,{onSelect:this.onSelectImages,type:"image",multiple:!0,gallery:!0,value:f.map(function(e){return e.id}),render:function(e){var t=e.open;return wp.element.createElement("div",{className:"icp-blocks-edit-gallery"},wp.element.createElement(w,{className:"components-button is-button is-default is-large",onClick:t},__("Edit Carousel")))}}))))}}]),t}(b);t.a=C(j)},function(e,t){e.exports=lodash},function(e,t){},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(7),l=n.n(a),s=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=wp.element,u=c.Component,p=c.Fragment,m=wp.components,d=m.IconButton,f=m.Spinner,__=(m.Modal,wp.i18n.__),b=wp.keycodes,g=b.BACKSPACE,h=b.DELETE,y=wp.data.withSelect,w=(wp.editor.RichText,wp.blob.isBlobURL),v=function(e){function t(){o(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return e.onImageClick=e.onImageClick.bind(e),e.onSelectCaption=e.onSelectCaption.bind(e),e.onKeyDown=e.onKeyDown.bind(e),e.bindContainer=e.bindContainer.bind(e),e.state={captionSelected:!1},e}return i(t,e),s(t,[{key:"bindContainer",value:function(e){this.container=e}},{key:"onSelectCaption",value:function(){this.state.captionSelected||this.setState({captionSelected:!0}),this.props.isSelected||this.props.onSelect()}},{key:"onImageClick",value:function(){this.props.isSelected||this.props.onSelect(),this.state.captionSelected&&this.setState({captionSelected:!1})}},{key:"onKeyDown",value:function(e){this.container===document.activeElement&&this.props.isSelected&&-1!==[g,h].indexOf(e.keyCode)&&(e.stopPropagation(),e.preventDefault(),this.props.onRemove())}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isSelected,o=t.image,r=t.url;o&&!r&&this.props.setAttributes({url:o.source_url,alt:o.alt_text}),this.state.captionSelected&&!n&&e.isSelected&&this.setState({captionSelected:!1})}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.alt,o=e.id,r=(e.link,e.isSelected),i=e.caption,a=e.onRemove,s=(e.setAttributes,e.classes),c=e["aria-label"],u=wp.element.createElement(p,null,wp.element.createElement("img",{src:t,alt:n,"data-id":o,onClick:this.onImageClick,tabIndex:"0",onKeyDown:this.onImageClick,"aria-label":c}),w(t)&&wp.element.createElement(f,null)),m=l()({"is-selected":r,"is-transient":w(t)},s);return wp.element.createElement("figure",{className:m,tabIndex:"-1",onKeyDown:this.onKeyDown,ref:this.bindContainer},r&&wp.element.createElement("div",{className:"core-blocks-gallery-item__inline-menu"},wp.element.createElement(d,{icon:"no-alt",onClick:a,className:"blocks-gallery-item__remove",label:__("Remove Image")})),u,(i&&i.length,null))}}]),t}(u);t.a=y(function(e,t){var n=e("core"),o=n.getMedia,r=t.id;return{image:r?o(r):null}})(v)},function(e,t,n){var o,r;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===r)for(var l in o)i.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?(n.default=n,e.exports=n):(o=[],void 0!==(r=function(){return n}.apply(t,o))&&(e.exports=r))}()}]); -
image-carousel/trunk/inc/block/class-block.php
r2567724 r3400905 40 40 41 41 $is_widget = false; 42 $dependencies = apply_filters( 'icp_script_dependencies', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ) );42 $dependencies = apply_filters( 'icp_script_dependencies', array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor', 'lodash' ) ); 43 43 44 44 $currentScreen = get_current_screen(); -
image-carousel/trunk/inc/functions/icp-functions.php
r2678112 r3400905 320 320 pause: <?php echo $params['interval']; ?>, 321 321 autoHover: true, 322 moveSlides: <?php echo $columns; ?>,323 minSlides: <?php echo $columns; ?>,324 maxSlides: <?php echo $columns; ?>,322 moveSlides: <?php echo esc_html( $columns ); ?>, 323 minSlides: <?php echo esc_html( $columns ); ?>, 324 maxSlides: <?php echo esc_html( $columns ); ?>, 325 325 slideWidth: <?php echo $params['s_width']; ?>, 326 326 slideMargin: <?php echo $params['margin']; ?>, -
image-carousel/trunk/readme.txt
r3276950 r3400905 5 5 Requires at least: 3.3 6 6 Tested up to: 6.8 7 Stable tag: 1.0.0. 397 Stable tag: 1.0.0.41 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 119 119 == Upgrade Notice == 120 120 121 = 1.0.0. 39=121 = 1.0.0.41 = 122 122 IMPORTANT! BUGS FIX, PLEASE UPDATE NOW! 123 123 124 124 == Changelog == 125 126 = 1.0.0.41 = 127 128 * Fixed : Cross Site Scripting (XSS) issue reported by Patchstack 129 * Fixed : Carousel Block 130 * Fixed : Many other PHP and CSS clean and optimization 125 131 126 132 = 1.0.0.39 =
Note: See TracChangeset
for help on using the changeset viewer.