Version Description
Jan 10, 2022 = * New: Gutenberg Block added.
Download this release
Release Info
Developer | shapedplugin |
Plugin | Carousel, Slider, Gallery by WP Carousel – Image Carousel & Photo Gallery, Post Carousel & Post Grid, Product Carousel & Product Grid for WooCommerce |
Version | 2.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.4.2
- admin/GutenbergBlock/build/index.asset.php +1 -0
- admin/GutenbergBlock/build/index.js +330 -0
- admin/GutenbergBlock/build/index.js.map +1 -0
- admin/GutenbergBlock/class-wp-carousel-free-gutenberg-block-init.php +188 -0
- admin/GutenbergBlock/src/wp-carousel-icon.svg +19 -0
- admin/GutenbergBlock/src/wpc-block-preview.svg +54 -0
- admin/class-wp-carousel-free-gutenberg-block.php +33 -0
- admin/css/wp-carousel-free-admin.css +17 -3
- admin/css/wp-carousel-free-admin.min.css +1 -1
- public/css/wp-carousel-free-public.css +1 -0
- public/css/wp-carousel-free-public.min.css +1 -1
- public/js/wp-carousel-free-public.js +1 -1
- public/js/wp-carousel-free-public.min.js +1 -1
- readme.txt +4 -1
- wp-carousel-free.php +9 -3
admin/GutenbergBlock/build/index.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-element', 'wp-escape-html'), 'version' => '7281eec516c5022e7db405b3a61aad80');
|
admin/GutenbergBlock/build/index.js
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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() { // webpackBootstrap
|
2 |
+
/******/ "use strict";
|
3 |
+
/******/ var __webpack_modules__ = ({
|
4 |
+
|
5 |
+
/***/ "./src/shortcode/blockIcon.js":
|
6 |
+
/*!************************************!*\
|
7 |
+
!*** ./src/shortcode/blockIcon.js ***!
|
8 |
+
\************************************/
|
9 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
10 |
+
|
11 |
+
__webpack_require__.r(__webpack_exports__);
|
12 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html");
|
13 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_0__);
|
14 |
+
|
15 |
+
const el = wp.element.createElement;
|
16 |
+
const icons = {};
|
17 |
+
icons.spwpcfIcon = el('img', {
|
18 |
+
src: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_0__.escapeAttribute)(sp_wp_carousel_free.url + 'admin/GutenbergBlock/src/wp-carousel-icon.svg')
|
19 |
+
});
|
20 |
+
/* harmony default export */ __webpack_exports__["default"] = (icons);
|
21 |
+
|
22 |
+
/***/ }),
|
23 |
+
|
24 |
+
/***/ "./src/shortcode/dynamicShortcode.js":
|
25 |
+
/*!*******************************************!*\
|
26 |
+
!*** ./src/shortcode/dynamicShortcode.js ***!
|
27 |
+
\*******************************************/
|
28 |
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
29 |
+
|
30 |
+
__webpack_require__.r(__webpack_exports__);
|
31 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
32 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
33 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html");
|
34 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__);
|
35 |
+
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Shortcode select component.
|
39 |
+
*/
|
40 |
+
|
41 |
+
const {
|
42 |
+
__
|
43 |
+
} = wp.i18n;
|
44 |
+
const {
|
45 |
+
Fragment
|
46 |
+
} = wp.element;
|
47 |
+
const el = wp.element.createElement;
|
48 |
+
|
49 |
+
const DynamicShortcodeInput = _ref => {
|
50 |
+
let {
|
51 |
+
attributes: {
|
52 |
+
shortcode,
|
53 |
+
shortcodelist
|
54 |
+
},
|
55 |
+
shortcodeUpdate
|
56 |
+
} = _ref;
|
57 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, el('div', {
|
58 |
+
className: 'spwpcf-gutenberg-shortcode editor-styles-wrapper'
|
59 |
+
}, el('select', {
|
60 |
+
className: 'spwpcf-shortcode-selector',
|
61 |
+
onChange: e => shortcodeUpdate(e),
|
62 |
+
value: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeAttribute)(shortcode)
|
63 |
+
}, el('option', {
|
64 |
+
value: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeAttribute)('0')
|
65 |
+
}, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeHTML)(__('-- Select a shortcode --', 'wp-carousel-free'))), shortcodelist.map(shortcode => {
|
66 |
+
var title = shortcode.title.length > 35 ? shortcode.title.substring(0, 30) + '.... #(' + shortcode.id + ')' : shortcode.title + ' #(' + shortcode.id + ')';
|
67 |
+
return el('option', {
|
68 |
+
value: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeAttribute)(shortcode.id.toString()),
|
69 |
+
key: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeAttribute)(shortcode.id.toString())
|
70 |
+
}, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_1__.escapeHTML)(title));
|
71 |
+
}))));
|
72 |
+
};
|
73 |
+
|
74 |
+
/* harmony default export */ __webpack_exports__["default"] = (DynamicShortcodeInput);
|
75 |
+
|
76 |
+
/***/ }),
|
77 |
+
|
78 |
+
/***/ "@wordpress/element":
|
79 |
+
/*!*********************************!*\
|
80 |
+
!*** external ["wp","element"] ***!
|
81 |
+
\*********************************/
|
82 |
+
/***/ (function(module) {
|
83 |
+
|
84 |
+
module.exports = window["wp"]["element"];
|
85 |
+
|
86 |
+
/***/ }),
|
87 |
+
|
88 |
+
/***/ "@wordpress/escape-html":
|
89 |
+
/*!************************************!*\
|
90 |
+
!*** external ["wp","escapeHtml"] ***!
|
91 |
+
\************************************/
|
92 |
+
/***/ (function(module) {
|
93 |
+
|
94 |
+
module.exports = window["wp"]["escapeHtml"];
|
95 |
+
|
96 |
+
/***/ })
|
97 |
+
|
98 |
+
/******/ });
|
99 |
+
/************************************************************************/
|
100 |
+
/******/ // The module cache
|
101 |
+
/******/ var __webpack_module_cache__ = {};
|
102 |
+
/******/
|
103 |
+
/******/ // The require function
|
104 |
+
/******/ function __webpack_require__(moduleId) {
|
105 |
+
/******/ // Check if module is in cache
|
106 |
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
107 |
+
/******/ if (cachedModule !== undefined) {
|
108 |
+
/******/ return cachedModule.exports;
|
109 |
+
/******/ }
|
110 |
+
/******/ // Create a new module (and put it into the cache)
|
111 |
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
112 |
+
/******/ // no module.id needed
|
113 |
+
/******/ // no module.loaded needed
|
114 |
+
/******/ exports: {}
|
115 |
+
/******/ };
|
116 |
+
/******/
|
117 |
+
/******/ // Execute the module function
|
118 |
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
119 |
+
/******/
|
120 |
+
/******/ // Return the exports of the module
|
121 |
+
/******/ return module.exports;
|
122 |
+
/******/ }
|
123 |
+
/******/
|
124 |
+
/************************************************************************/
|
125 |
+
/******/ /* webpack/runtime/compat get default export */
|
126 |
+
/******/ !function() {
|
127 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
128 |
+
/******/ __webpack_require__.n = function(module) {
|
129 |
+
/******/ var getter = module && module.__esModule ?
|
130 |
+
/******/ function() { return module['default']; } :
|
131 |
+
/******/ function() { return module; };
|
132 |
+
/******/ __webpack_require__.d(getter, { a: getter });
|
133 |
+
/******/ return getter;
|
134 |
+
/******/ };
|
135 |
+
/******/ }();
|
136 |
+
/******/
|
137 |
+
/******/ /* webpack/runtime/define property getters */
|
138 |
+
/******/ !function() {
|
139 |
+
/******/ // define getter functions for harmony exports
|
140 |
+
/******/ __webpack_require__.d = function(exports, definition) {
|
141 |
+
/******/ for(var key in definition) {
|
142 |
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
143 |
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
144 |
+
/******/ }
|
145 |
+
/******/ }
|
146 |
+
/******/ };
|
147 |
+
/******/ }();
|
148 |
+
/******/
|
149 |
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
150 |
+
/******/ !function() {
|
151 |
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
152 |
+
/******/ }();
|
153 |
+
/******/
|
154 |
+
/******/ /* webpack/runtime/make namespace object */
|
155 |
+
/******/ !function() {
|
156 |
+
/******/ // define __esModule on exports
|
157 |
+
/******/ __webpack_require__.r = function(exports) {
|
158 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
159 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
160 |
+
/******/ }
|
161 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
162 |
+
/******/ };
|
163 |
+
/******/ }();
|
164 |
+
/******/
|
165 |
+
/************************************************************************/
|
166 |
+
var __webpack_exports__ = {};
|
167 |
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
168 |
+
!function() {
|
169 |
+
/*!**********************!*\
|
170 |
+
!*** ./src/index.js ***!
|
171 |
+
\**********************/
|
172 |
+
__webpack_require__.r(__webpack_exports__);
|
173 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
174 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
175 |
+
/* harmony import */ var _shortcode_blockIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./shortcode/blockIcon */ "./src/shortcode/blockIcon.js");
|
176 |
+
/* harmony import */ var _shortcode_dynamicShortcode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./shortcode/dynamicShortcode */ "./src/shortcode/dynamicShortcode.js");
|
177 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html");
|
178 |
+
/* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__);
|
179 |
+
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
const {
|
184 |
+
__
|
185 |
+
} = wp.i18n;
|
186 |
+
const {
|
187 |
+
registerBlockType
|
188 |
+
} = wp.blocks;
|
189 |
+
const {
|
190 |
+
PanelBody,
|
191 |
+
PanelRow
|
192 |
+
} = wp.components;
|
193 |
+
const {
|
194 |
+
InspectorControls
|
195 |
+
} = wp.editor;
|
196 |
+
const {
|
197 |
+
Fragment
|
198 |
+
} = wp.element;
|
199 |
+
const ServerSideRender = wp.serverSideRender;
|
200 |
+
const el = wp.element.createElement;
|
201 |
+
/**
|
202 |
+
* Register: aa Gutenberg Block.
|
203 |
+
*/
|
204 |
+
|
205 |
+
registerBlockType("sp-wp-carousel-free/shortcode", {
|
206 |
+
title: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("WP Carousel", "wp-carousel-free")),
|
207 |
+
description: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("Use WP Carousel to insert a carousel or gallery in your page.", "wp-carousel-free")),
|
208 |
+
icon: _shortcode_blockIcon__WEBPACK_IMPORTED_MODULE_1__["default"].spwpcfIcon,
|
209 |
+
category: "common",
|
210 |
+
supports: {
|
211 |
+
html: true
|
212 |
+
},
|
213 |
+
edit: props => {
|
214 |
+
const {
|
215 |
+
attributes,
|
216 |
+
setAttributes
|
217 |
+
} = props;
|
218 |
+
|
219 |
+
let scriptLoad = shortcodeId => {
|
220 |
+
let spwpcfBlockLoaded = false;
|
221 |
+
let spwpcfBlockLoadedInterval = setInterval(function () {
|
222 |
+
let uniqId = jQuery(".wpcp-wrapper-" + shortcodeId).parents().attr('id');
|
223 |
+
|
224 |
+
if (document.getElementById(uniqId)) {
|
225 |
+
//Actual functions goes here
|
226 |
+
jQuery.getScript(sp_wp_carousel_free.loadScript);
|
227 |
+
jQuery('#wpcp-preloader-' + shortcodeId).animate({
|
228 |
+
opacity: 0
|
229 |
+
}, 600).remove();
|
230 |
+
jQuery('#sp-wp-carousel-free-id-' + shortcodeId).animate({
|
231 |
+
opacity: 1
|
232 |
+
}, 600);
|
233 |
+
spwpcfBlockLoaded = true;
|
234 |
+
uniqId = '';
|
235 |
+
}
|
236 |
+
|
237 |
+
if (spwpcfBlockLoaded) {
|
238 |
+
clearInterval(spwpcfBlockLoadedInterval);
|
239 |
+
}
|
240 |
+
|
241 |
+
if (0 == shortcodeId) {
|
242 |
+
clearInterval(spwpcfBlockLoadedInterval);
|
243 |
+
}
|
244 |
+
}, 10);
|
245 |
+
};
|
246 |
+
|
247 |
+
let updateShortcode = updateShortcode => {
|
248 |
+
setAttributes({
|
249 |
+
shortcode: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(updateShortcode.target.value)
|
250 |
+
});
|
251 |
+
};
|
252 |
+
|
253 |
+
let shortcodeUpdate = e => {
|
254 |
+
updateShortcode(e);
|
255 |
+
let shortcodeId = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(e.target.value);
|
256 |
+
scriptLoad(shortcodeId);
|
257 |
+
};
|
258 |
+
|
259 |
+
document.addEventListener('readystatechange', event => {
|
260 |
+
if (event.target.readyState === "complete") {
|
261 |
+
let shortcodeId = (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(attributes.shortcode);
|
262 |
+
scriptLoad(shortcodeId);
|
263 |
+
}
|
264 |
+
});
|
265 |
+
|
266 |
+
if (attributes.preview) {
|
267 |
+
return el('div', {
|
268 |
+
className: 'spwpcf_shortcode_block_preview_image'
|
269 |
+
}, el('img', {
|
270 |
+
src: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(sp_wp_carousel_free.url + "admin/GutenbergBlock/src/wpc-block-preview.svg")
|
271 |
+
}));
|
272 |
+
}
|
273 |
+
|
274 |
+
if (attributes.shortcodelist.length === 0) {
|
275 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, el('div', {
|
276 |
+
className: 'components-placeholder components-placeholder is-large'
|
277 |
+
}, el('div', {
|
278 |
+
className: 'components-placeholder__label'
|
279 |
+
}, el('img', {
|
280 |
+
className: 'block-editor-block-icon',
|
281 |
+
src: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(sp_wp_carousel_free.url + 'admin/GutenbergBlock/src/wp-carousel-icon.svg')
|
282 |
+
}), (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("WP Carousel", "wp-carousel-free"))), el('div', {
|
283 |
+
className: 'components-placeholder__instructions'
|
284 |
+
}, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("No shortcode found. ", "wp-carousel-free")), el('a', {
|
285 |
+
href: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(sp_wp_carousel_free.link)
|
286 |
+
}, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("Create a shortcode now!", "wp-carousel-free"))))));
|
287 |
+
}
|
288 |
+
|
289 |
+
if (!attributes.shortcode || attributes.shortcode == 0) {
|
290 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelBody, {
|
291 |
+
title: "Select a shortcode"
|
292 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_shortcode_dynamicShortcode__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
293 |
+
attributes: attributes,
|
294 |
+
shortcodeUpdate: shortcodeUpdate
|
295 |
+
})))), el('div', {
|
296 |
+
className: 'components-placeholder components-placeholder is-large'
|
297 |
+
}, el('div', {
|
298 |
+
className: 'components-placeholder__label'
|
299 |
+
}, el('img', {
|
300 |
+
className: 'block-editor-block-icon',
|
301 |
+
src: (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeAttribute)(sp_wp_carousel_free.url + "admin/GutenbergBlock/src/wp-carousel-icon.svg")
|
302 |
+
}), (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("WP Carousel", "wp-carousel-free"))), el('div', {
|
303 |
+
className: 'components-placeholder__instructions'
|
304 |
+
}, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_3__.escapeHTML)(__("Select a shortcode", "wp-carousel-free"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_shortcode_dynamicShortcode__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
305 |
+
attributes: attributes,
|
306 |
+
shortcodeUpdate: shortcodeUpdate
|
307 |
+
})));
|
308 |
+
}
|
309 |
+
|
310 |
+
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelBody, {
|
311 |
+
title: "Select a shortcode"
|
312 |
+
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_shortcode_dynamicShortcode__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
313 |
+
attributes: attributes,
|
314 |
+
shortcodeUpdate: shortcodeUpdate
|
315 |
+
})))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ServerSideRender, {
|
316 |
+
block: "sp-wp-carousel-free/shortcode",
|
317 |
+
attributes: attributes
|
318 |
+
}));
|
319 |
+
},
|
320 |
+
|
321 |
+
save() {
|
322 |
+
// Rendering in PHP
|
323 |
+
return null;
|
324 |
+
}
|
325 |
+
|
326 |
+
});
|
327 |
+
}();
|
328 |
+
/******/ })()
|
329 |
+
;
|
330 |
+
//# sourceMappingURL=index.js.map
|
admin/GutenbergBlock/build/index.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;AAAA;AACA,MAAMC,EAA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E;AAAZ,OAAR,EACAlB,EAAE,CAAC,KAAD,EAAQ;AAAEkB,QAAAA,SAAS,EAAE,yBAAb;AAAwCZ,QAAAA,GAAG,EAAEP,uEAAe,CAAEQ,mBAAmB,CAACC,GAApB,GAA0B,+CAA5B;AAA5D,OAAR,CADF,EAEAC,kEAAU,CAAEC,EAAE,CAAC,aAAD,EAAgB,kBAAhB,CAAJ,CAFV,CADF,EAKAV,EAAE,CAAC,KAAD,EAAQ;AAACkB,QAAAA,SAAS,EAAE;AAAZ,OAAR,EAA6DT,kEAAU,CAAEC,EAAE,CAAC,oBAAD,EAAuB,kBAAvB,CAAJ,CAAvE,CALF,EAMA,kEAAC,mEAAD;AACE,kBAAU,EAAEI,UADd;AAEE,uBAAe,EAAEG;AAFnB,QANA,CAZN,CADF;AA2BD;;AAED,WACE,kEAAC,QAAD,QACE,kEAAC,iBAAD,QACI,kEAAC,SAAD;AAAW,WAAK,EAAC;AAAjB,OACI,kEAAC,QAAD,QACE,kEAAC,mEAAD;AACE,gBAAU,EAAEH,UADd;AAEE,qBAAe,EAAEG;AAFnB,MADF,CADJ,CADJ,CADF,EAWE,kEAAC,gBAAD;AAAkB,WAAK,EAAC,+BAAxB;AAAwD,gBAAU,EAAEH;AAApE,MAXF,CADF;AAeD,GA9HgD;;AA+HjDyD,EAAAA,IAAI,GAAG;AACL;AACA,WAAO,IAAP;AACD;;AAlIgD,CAAlC,CAAjB,C","sources":["webpack://wp-carousel-free-gutenberg-shortcode-block/./src/shortcode/blockIcon.js","webpack://wp-carousel-free-gutenberg-shortcode-block/./src/shortcode/dynamicShortcode.js","webpack://wp-carousel-free-gutenberg-shortcode-block/external window [\"wp\",\"element\"]","webpack://wp-carousel-free-gutenberg-shortcode-block/external window [\"wp\",\"escapeHtml\"]","webpack://wp-carousel-free-gutenberg-shortcode-block/webpack/bootstrap","webpack://wp-carousel-free-gutenberg-shortcode-block/webpack/runtime/compat get default export","webpack://wp-carousel-free-gutenberg-shortcode-block/webpack/runtime/define property getters","webpack://wp-carousel-free-gutenberg-shortcode-block/webpack/runtime/hasOwnProperty shorthand","webpack://wp-carousel-free-gutenberg-shortcode-block/webpack/runtime/make namespace object","webpack://wp-carousel-free-gutenberg-shortcode-block/./src/index.js"],"sourcesContent":["import { escapeAttribute } from \"@wordpress/escape-html\";\r\nconst el = wp.element.createElement;\r\nconst icons = {};\r\nicons.spwpcfIcon = el('img', {src: escapeAttribute( sp_wp_carousel_free.url + 'admin/GutenbergBlock/src/wp-carousel-icon.svg' )})\r\nexport default icons;","/**\r\n * Shortcode select component.\r\n */\r\n import { escapeAttribute, escapeHTML } from \"@wordpress/escape-html\";\r\n const { __ } = wp.i18n;\r\n const { Fragment } = wp.element;\r\n const el = wp.element.createElement;\r\n \r\n const DynamicShortcodeInput = ( { attributes : { shortcode, shortcodelist}, shortcodeUpdate } ) => (\r\n <Fragment>\r\n {el('div', {className: 'spwpcf-gutenberg-shortcode editor-styles-wrapper'},\r\n el('select', {className: 'spwpcf-shortcode-selector', onChange: e => shortcodeUpdate(e), value: escapeAttribute( shortcode ) },\r\n el('option', {value: escapeAttribute('0')}, escapeHTML( __( '-- Select a shortcode --', 'wp-carousel-free' ))),\r\n shortcodelist.map( shortcode => {\r\n var title = (shortcode.title.length > 35) ? shortcode.title.substring(0,30) + '.... #(' + shortcode.id + ')' : shortcode.title + ' #(' + shortcode.id + ')';\r\n return el('option', {value: escapeAttribute( shortcode.id.toString() ), key: escapeAttribute( shortcode.id.toString() )}, escapeHTML( title ) )\r\n })\r\n )\r\n )}\r\n </Fragment>\r\n );\r\n \r\n export default DynamicShortcodeInput;","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"escapeHtml\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import icons from \"./shortcode/blockIcon\";\r\nimport DynamicShortcodeInput from \"./shortcode/dynamicShortcode\";\r\nimport { escapeAttribute, escapeHTML } from \"@wordpress/escape-html\";\r\n\r\nconst { __ } = wp.i18n;\r\nconst { registerBlockType } = wp.blocks;\r\nconst { PanelBody, PanelRow } = wp.components;\r\nconst { InspectorControls } = wp.editor;\r\nconst { Fragment } = wp.element;\r\nconst ServerSideRender = wp.serverSideRender;\r\nconst el = wp.element.createElement;\r\n\r\n/**\r\n * Register: aa Gutenberg Block.\r\n */\r\nregisterBlockType(\"sp-wp-carousel-free/shortcode\", {\r\n title: escapeHTML( __(\"WP Carousel\", \"wp-carousel-free\") ),\r\n description: escapeHTML( __(\r\n \"Use WP Carousel to insert a carousel or gallery in your page.\",\r\n \"wp-carousel-free\"\r\n )),\r\n icon: icons.spwpcfIcon,\r\n category: \"common\",\r\n supports: {\r\n html: true,\r\n },\r\n edit: (props) => {\r\n const { attributes, setAttributes } = props;\r\n \r\n let scriptLoad = ( shortcodeId ) => {\r\n let spwpcfBlockLoaded = false;\r\n let spwpcfBlockLoadedInterval = setInterval(function () {\r\n let uniqId = jQuery(\".wpcp-wrapper-\" + shortcodeId).parents().attr('id');\r\n if (document.getElementById(uniqId)) {\r\n //Actual functions goes here\r\n jQuery.getScript(sp_wp_carousel_free.loadScript);\r\n jQuery('#wpcp-preloader-' + shortcodeId).animate({ opacity: 0 }, 600).remove();\r\n jQuery('#sp-wp-carousel-free-id-' + shortcodeId).animate({ opacity: 1 }, 600);\r\n spwpcfBlockLoaded = true;\r\n uniqId = '';\r\n }\r\n if (spwpcfBlockLoaded) {\r\n clearInterval(spwpcfBlockLoadedInterval);\r\n }\r\n if ( 0 == shortcodeId ) {\r\n clearInterval(spwpcfBlockLoadedInterval);\r\n }\r\n }, 10);\r\n }\r\n\r\n let updateShortcode = ( updateShortcode ) => {\r\n setAttributes({shortcode: escapeAttribute( updateShortcode.target.value )});\r\n }\r\n\r\n let shortcodeUpdate = (e) => {\r\n updateShortcode(e);\r\n let shortcodeId = escapeAttribute( e.target.value );\r\n scriptLoad(shortcodeId);\r\n }\r\n\r\n document.addEventListener('readystatechange', event => {\r\n if (event.target.readyState === \"complete\") {\r\n let shortcodeId = escapeAttribute( attributes.shortcode );\r\n scriptLoad(shortcodeId);\r\n }\r\n });\r\n\r\n if( attributes.preview ) {\r\n return (\r\n el('div', {className: 'spwpcf_shortcode_block_preview_image'},\r\n el('img', { src: escapeAttribute( sp_wp_carousel_free.url + \"admin/GutenbergBlock/src/wpc-block-preview.svg\" )})\r\n )\r\n )\r\n }\r\n\r\n if (attributes.shortcodelist.length === 0 ) {\r\n return (\r\n <Fragment>\r\n {\r\n el('div', {className: 'components-placeholder components-placeholder is-large'}, \r\n el('div', {className: 'components-placeholder__label'}, \r\n el('img', {className: 'block-editor-block-icon', src: escapeAttribute( sp_wp_carousel_free.url + 'admin/GutenbergBlock/src/wp-carousel-icon.svg' )}),\r\n escapeHTML( __(\"WP Carousel\", \"wp-carousel-free\") )\r\n ),\r\n el('div', {className: 'components-placeholder__instructions'}, \r\n escapeHTML( __(\"No shortcode found. \", \"wp-carousel-free\") ),\r\n el('a', {href: escapeAttribute( sp_wp_carousel_free.link )}, \r\n escapeHTML( __(\"Create a shortcode now!\", \"wp-carousel-free\") )\r\n )\r\n )\r\n )\r\n }\r\n </Fragment>\r\n );\r\n }\r\n\r\n if ( ! attributes.shortcode || attributes.shortcode == 0 ) {\r\n return (\r\n <Fragment>\r\n <InspectorControls>\r\n <PanelBody title=\"Select a shortcode\">\r\n <PanelRow>\r\n <DynamicShortcodeInput\r\n attributes={attributes}\r\n shortcodeUpdate={shortcodeUpdate}\r\n />\r\n </PanelRow>\r\n </PanelBody>\r\n </InspectorControls>\r\n {\r\n el('div', {className: 'components-placeholder components-placeholder is-large'}, \r\n el('div', {className: 'components-placeholder__label'},\r\n el('img', { className: 'block-editor-block-icon', src: escapeAttribute( sp_wp_carousel_free.url + \"admin/GutenbergBlock/src/wp-carousel-icon.svg\" )}),\r\n escapeHTML( __(\"WP Carousel\", \"wp-carousel-free\") )\r\n ),\r\n el('div', {className: 'components-placeholder__instructions'}, escapeHTML( __(\"Select a shortcode\", \"wp-carousel-free\") ) ),\r\n <DynamicShortcodeInput\r\n attributes={attributes}\r\n shortcodeUpdate={shortcodeUpdate}\r\n />\r\n )\r\n }\r\n </Fragment>\r\n );\r\n }\r\n\r\n return (\r\n <Fragment>\r\n <InspectorControls>\r\n <PanelBody title=\"Select a shortcode\">\r\n <PanelRow>\r\n <DynamicShortcodeInput\r\n attributes={attributes}\r\n shortcodeUpdate={shortcodeUpdate}\r\n />\r\n </PanelRow>\r\n </PanelBody>\r\n </InspectorControls>\r\n <ServerSideRender block=\"sp-wp-carousel-free/shortcode\" attributes={attributes} />\r\n </Fragment>\r\n );\r\n },\r\n save() {\r\n // Rendering in PHP\r\n return null;\r\n },\r\n});\r\n"],"names":["escapeAttribute","el","wp","element","createElement","icons","spwpcfIcon","src","sp_wp_carousel_free","url","escapeHTML","__","i18n","Fragment","DynamicShortcodeInput","attributes","shortcode","shortcodelist","shortcodeUpdate","className","onChange","e","value","map","title","length","substring","id","toString","key","registerBlockType","blocks","PanelBody","PanelRow","components","InspectorControls","editor","ServerSideRender","serverSideRender","description","icon","category","supports","html","edit","props","setAttributes","scriptLoad","shortcodeId","spwpcfBlockLoaded","spwpcfBlockLoadedInterval","setInterval","uniqId","jQuery","parents","attr","document","getElementById","getScript","loadScript","animate","opacity","remove","clearInterval","updateShortcode","target","addEventListener","event","readyState","preview","href","link","save"],"sourceRoot":""}
|
admin/GutenbergBlock/class-wp-carousel-free-gutenberg-block-init.php
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The plugin gutenberg block Initializer.
|
5 |
+
*
|
6 |
+
* @link https://shapedplugin.com/
|
7 |
+
* @since 2.4.1
|
8 |
+
*
|
9 |
+
* @package WP_Carousel_Free
|
10 |
+
* @subpackage WP_Carousel_Free/Admin
|
11 |
+
* @author ShapedPlugin <support@shapedplugin.com>
|
12 |
+
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly.
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( ! class_exists( 'WP_Carousel_Free_Gutenberg_Block_Init' ) ) {
|
20 |
+
/**
|
21 |
+
* WP_Carousel_Free_Gutenberg_Block_Init class.
|
22 |
+
*/
|
23 |
+
class WP_Carousel_Free_Gutenberg_Block_Init {
|
24 |
+
/**
|
25 |
+
* Script and style suffix
|
26 |
+
*
|
27 |
+
* @since 2.4.1
|
28 |
+
* @access protected
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
protected $suffix;
|
32 |
+
/**
|
33 |
+
* Custom Gutenberg Block Initializer.
|
34 |
+
*/
|
35 |
+
public function __construct() {
|
36 |
+
$this->suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG || defined( 'WP_DEBUG' ) && WP_DEBUG ? '' : '.min';
|
37 |
+
add_action( 'init', array( $this, 'sp_wp_carousel_free_gutenberg_shortcode_block' ) );
|
38 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'sp_wp_carousel_free_block_editor_assets' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Register block editor script for backend.
|
43 |
+
*/
|
44 |
+
public function sp_wp_carousel_free_block_editor_assets() {
|
45 |
+
wp_enqueue_script(
|
46 |
+
'sp-wp-carousel-free-shortcode-block',
|
47 |
+
plugins_url( '/GutenbergBlock/build/index.js', dirname( __FILE__ ) ),
|
48 |
+
array( 'jquery', 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-components', 'wp-editor' ),
|
49 |
+
WPCAROUSELF_VERSION,
|
50 |
+
true
|
51 |
+
);
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Register block editor css file enqueue for backend.
|
55 |
+
*/
|
56 |
+
if ( wpcf_get_option( 'wpcp_enqueue_slick_css', true ) ) {
|
57 |
+
wp_enqueue_style( 'wpcf-slick', WPCAROUSELF_URL . 'public/css/slick' . $this->suffix . '.css', array(), WPCAROUSELF_VERSION, 'all' );
|
58 |
+
}
|
59 |
+
if ( wpcf_get_option( 'wpcp_enqueue_fa_css', true ) ) {
|
60 |
+
wp_enqueue_style( 'wp-carousel-free-fontawesome', WPCAROUSELF_URL . 'public/css/font-awesome.min.css', array(), WPCAROUSELF_VERSION, 'all' );
|
61 |
+
}
|
62 |
+
wp_enqueue_style( 'wp-carousel-free', WPCAROUSELF_URL . 'public/css/wp-carousel-free-public' . $this->suffix . '.css', array(), WPCAROUSELF_VERSION, 'all' );
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Shortcode list.
|
66 |
+
*
|
67 |
+
* @return array
|
68 |
+
*/
|
69 |
+
public function sp_wp_carousel_free_post_list() {
|
70 |
+
$shortcodes = get_posts(
|
71 |
+
array(
|
72 |
+
'post_type' => 'sp_wp_carousel',
|
73 |
+
'post_status' => 'publish',
|
74 |
+
'posts_per_page' => 9999,
|
75 |
+
)
|
76 |
+
);
|
77 |
+
|
78 |
+
if ( count( $shortcodes ) < 1 ) {
|
79 |
+
return array();
|
80 |
+
}
|
81 |
+
|
82 |
+
return array_map(
|
83 |
+
function ( $shortcode ) {
|
84 |
+
return (object) array(
|
85 |
+
'id' => absint( $shortcode->ID ),
|
86 |
+
'title' => esc_html( $shortcode->post_title ),
|
87 |
+
);
|
88 |
+
},
|
89 |
+
$shortcodes
|
90 |
+
);
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Register Gutenberg shortcode block.
|
95 |
+
*/
|
96 |
+
public function sp_wp_carousel_free_gutenberg_shortcode_block() {
|
97 |
+
/**
|
98 |
+
* Register block editor js file enqueue for backend.
|
99 |
+
*/
|
100 |
+
wp_register_script( 'wpcp-preloader', WPCAROUSELF_URL . 'public/js/preloader' . $this->suffix . '.js', array( 'jquery' ), WPCAROUSELF_VERSION, true );
|
101 |
+
wp_register_script( 'wpcf-slick', WPCAROUSELF_URL . 'public/js/slick' . $this->suffix . '.js', array( 'jquery' ), WPCAROUSELF_VERSION, true );
|
102 |
+
wp_register_script( 'wpcf-slick-config', WPCAROUSELF_URL . 'public/js/wp-carousel-free-public' . $this->suffix . '.js', array( 'jquery' ), WPCAROUSELF_VERSION, true );
|
103 |
+
|
104 |
+
wp_localize_script(
|
105 |
+
'wpcf-slick-config',
|
106 |
+
'sp_wp_carousel_free',
|
107 |
+
array(
|
108 |
+
'url' => WPCAROUSELF_URL,
|
109 |
+
'loadScript' => WPCAROUSELF_URL . 'public/js/wp-carousel-free-public.min.js',
|
110 |
+
'link' => admin_url( 'post-new.php?post_type=sp_wp_carousel' ),
|
111 |
+
)
|
112 |
+
);
|
113 |
+
/**
|
114 |
+
* Register Gutenberg block on server-side.
|
115 |
+
*/
|
116 |
+
register_block_type(
|
117 |
+
'sp-wp-carousel-free/shortcode',
|
118 |
+
array(
|
119 |
+
'attributes' => array(
|
120 |
+
'shortcodelist' => array(
|
121 |
+
'type' => 'object',
|
122 |
+
'default' => $this->sp_wp_carousel_free_post_list(),
|
123 |
+
),
|
124 |
+
'shortcode' => array(
|
125 |
+
'type' => 'string',
|
126 |
+
'default' => '',
|
127 |
+
),
|
128 |
+
'showInputShortcode' => array(
|
129 |
+
'type' => 'boolean',
|
130 |
+
'default' => true,
|
131 |
+
),
|
132 |
+
'preview' => array(
|
133 |
+
'type' => 'boolean',
|
134 |
+
'default' => false,
|
135 |
+
),
|
136 |
+
'is_admin' => array(
|
137 |
+
'type' => 'boolean',
|
138 |
+
'default' => is_admin(),
|
139 |
+
),
|
140 |
+
),
|
141 |
+
'example' => array(
|
142 |
+
'attributes' => array(
|
143 |
+
'preview' => true,
|
144 |
+
),
|
145 |
+
),
|
146 |
+
// Enqueue blocks.editor.build.js in the editor only.
|
147 |
+
'editor_script' => array(
|
148 |
+
'wpcp-preloader',
|
149 |
+
'wpcf-slick',
|
150 |
+
'wpcf-slick-config',
|
151 |
+
),
|
152 |
+
// Enqueue blocks.editor.build.css in the editor only.
|
153 |
+
'editor_style' => array(),
|
154 |
+
'render_callback' => array( $this, 'sp_wp_carousel_free_render_shortcode' ),
|
155 |
+
)
|
156 |
+
);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Render callback.
|
161 |
+
*
|
162 |
+
* @param string $attributes Shortcode.
|
163 |
+
* @return string
|
164 |
+
*/
|
165 |
+
public function sp_wp_carousel_free_render_shortcode( $attributes ) {
|
166 |
+
|
167 |
+
$class_name = '';
|
168 |
+
if ( ! empty( $attributes['className'] ) ) {
|
169 |
+
$class_name = 'class="' . $attributes['className'] . '"';
|
170 |
+
}
|
171 |
+
|
172 |
+
if ( ! $attributes['is_admin'] ) {
|
173 |
+
return '<div ' . $class_name . '>' . do_shortcode( '[sp_wpcarousel id="' . sanitize_text_field( $attributes['shortcode'] ) . '"]' ) . '</div>';
|
174 |
+
}
|
175 |
+
|
176 |
+
$post_id = intval( $attributes['shortcode'] );
|
177 |
+
$the_wpcf_dynamic_css = '';
|
178 |
+
include WPCAROUSELF_PATH . '/public/dynamic-style.php';
|
179 |
+
$the_wpcf_dynamic_css .= trim( html_entity_decode( wpcf_get_option( 'wpcp_custom_css' ) ) );
|
180 |
+
include WPCAROUSELF_PATH . '/public/responsive.php';
|
181 |
+
|
182 |
+
// Add dynamic style.
|
183 |
+
$style = '<style>' . $the_wpcf_dynamic_css . '</style>';
|
184 |
+
|
185 |
+
return $style . '<div id="' . uniqid() . '" ' . $class_name . ' >' . do_shortcode( '[sp_wpcarousel id="' . sanitize_text_field( $attributes['shortcode'] ) . '"]' ) . '</div>';
|
186 |
+
}
|
187 |
+
}
|
188 |
+
}
|
admin/GutenbergBlock/src/wp-carousel-icon.svg
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 687.6 535.2" style="enable-background:new 0 0 687.6 535.2;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#1E1E1E;}
|
7 |
+
</style>
|
8 |
+
<g>
|
9 |
+
<path class="st0" d="M687.6,535.2H0V0h687.6V535.2z M77.7,457.5h532.2V77.7H77.7V457.5z"/>
|
10 |
+
</g>
|
11 |
+
<g>
|
12 |
+
<path d="M544.4,277.61l-80.12,80.12c-5.54,5.54-14.49,5.54-19.97,0L431,344.42c-5.54-5.54-5.54-14.49,0-19.97l56.79-56.79
|
13 |
+
L431,210.87c-5.54-5.54-5.54-14.49,0-19.97l13.25-13.43c5.54-5.54,14.49-5.54,19.97,0l80.12,80.12
|
14 |
+
C549.94,263.12,549.94,272.08,544.4,277.61z"/>
|
15 |
+
<path d="M143.45,257.59l80.12-80.12c5.54-5.54,14.49-5.54,19.97,0l13.31,13.31c5.54,5.54,5.54,14.49,0,19.97l-56.79,56.79
|
16 |
+
l56.79,56.79c5.54,5.54,5.54,14.49,0,19.97l-13.25,13.43c-5.54,5.54-14.49,5.54-19.97,0l-80.12-80.12
|
17 |
+
C137.91,272.08,137.91,263.12,143.45,257.59z"/>
|
18 |
+
</g>
|
19 |
+
</svg>
|
admin/GutenbergBlock/src/wpc-block-preview.svg
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
4 |
+
viewBox="0 0 800 400" style="enable-background:new 0 0 800 400;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#F1F0F0;}
|
7 |
+
.st1{fill:#767676;}
|
8 |
+
</style>
|
9 |
+
<rect y="0" class="st0" width="800" height="400"/>
|
10 |
+
<g>
|
11 |
+
<g>
|
12 |
+
<path class="st1" d="M473.8,275.5H326.2c-1.4,0-2.4-1.2-2.4-3v-6c0-1.8,1-3,2.4-3h147.5c1.4,0,2.4,1.2,2.4,3v6
|
13 |
+
C476.1,274,475.2,275.5,473.8,275.5z"/>
|
14 |
+
<path class="st1" d="M493.4,291.1H306.6c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
15 |
+
C496.4,289.6,495.2,291.1,493.4,291.1z"/>
|
16 |
+
<path class="st1" d="M493.4,303.2H306.6c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
17 |
+
C496.4,301.7,495.2,303.2,493.4,303.2z"/>
|
18 |
+
<g>
|
19 |
+
<path class="st1" d="M485.3,95.3H314.7c-6.9,0-12.4,5.4-12.4,12.4v127.1c0,6.9,5.4,12.4,12.4,12.4h170.5
|
20 |
+
c6.9,0,12.4-5.4,12.4-12.4V107.7C497.6,101,492.2,95.3,485.3,95.3z M485.3,107.7v90.1l-24.4-22.3c-3.6-3.3-9.3-3.3-13,0.3
|
21 |
+
l-24.7,25l-48.5-58.1c-3.6-4.5-10.5-4.5-14.2,0l-45.8,52.7v-87.7H485.3z M432.5,140.2c0-9.3,7.5-17.2,17.2-17.2
|
22 |
+
c9.3,0,17.2,7.5,17.2,17.2c0,9.6-7.5,17.2-17.2,17.2C440.4,157.4,432.5,149.8,432.5,140.2z"/>
|
23 |
+
</g>
|
24 |
+
</g>
|
25 |
+
<g>
|
26 |
+
<path class="st1" d="M255.9,277H108.4c-1.4,0-2.4-1.2-2.4-3v-6c0-1.8,1-3,2.4-3h147.5c1.4,0,2.4,1.2,2.4,3v6
|
27 |
+
C258.3,275.5,257.3,277,255.9,277z"/>
|
28 |
+
<path class="st1" d="M275.5,292.6H88.7c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
29 |
+
C278.5,291.1,277.3,292.6,275.5,292.6z"/>
|
30 |
+
<path class="st1" d="M275.5,304.7H88.7c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
31 |
+
C278.5,303.2,277.3,304.7,275.5,304.7z"/>
|
32 |
+
<g>
|
33 |
+
<path class="st1" d="M267.4,96.8H96.9c-6.9,0-12.4,5.4-12.4,12.4v127.1c0,6.9,5.4,12.4,12.4,12.4h170.5c6.9,0,12.4-5.4,12.4-12.4
|
34 |
+
V109.2C279.7,102.5,274.3,96.8,267.4,96.8z M267.4,109.2v90.1L243,177c-3.6-3.3-9.3-3.3-13,0.3l-24.7,25l-48.5-58.1
|
35 |
+
c-3.6-4.5-10.5-4.5-14.2,0l-45.8,52.7v-87.7H267.4z M214.6,141.7c0-9.3,7.5-17.2,17.2-17.2c9.3,0,17.2,7.5,17.2,17.2
|
36 |
+
c0,9.6-7.5,17.2-17.2,17.2C222.5,158.9,214.6,151.3,214.6,141.7z"/>
|
37 |
+
</g>
|
38 |
+
</g>
|
39 |
+
<g>
|
40 |
+
<path class="st1" d="M691.6,277H544.1c-1.4,0-2.4-1.2-2.4-3v-6c0-1.8,1-3,2.4-3h147.5c1.4,0,2.4,1.2,2.4,3v6
|
41 |
+
C694,275.5,693.1,277,691.6,277z"/>
|
42 |
+
<path class="st1" d="M711.3,292.6H524.5c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
43 |
+
C714.3,291.1,713.1,292.6,711.3,292.6z"/>
|
44 |
+
<path class="st1" d="M711.3,304.7H524.5c-1.8,0-3-1.2-3-3v-1.5c0-1.8,1.2-3,3-3h186.8c1.8,0,3,1.2,3,3v1.5
|
45 |
+
C714.3,303.2,713.1,304.7,711.3,304.7z"/>
|
46 |
+
<g>
|
47 |
+
<path class="st1" d="M703.1,96.8H532.6c-6.9,0-12.4,5.4-12.4,12.4v127.1c0,6.9,5.4,12.4,12.4,12.4h170.5
|
48 |
+
c6.9,0,12.4-5.4,12.4-12.4V109.2C715.5,102.5,710.1,96.8,703.1,96.8z M703.1,109.2v90.1L678.7,177c-3.6-3.3-9.3-3.3-13,0.3
|
49 |
+
l-24.7,25l-48.5-58.1c-3.6-4.5-10.5-4.5-14.2,0l-45.8,52.7v-87.7H703.1z M650.4,141.7c0-9.3,7.5-17.2,17.2-17.2
|
50 |
+
c9.3,0,17.2,7.5,17.2,17.2c0,9.6-7.5,17.2-17.2,17.2C658.3,158.9,650.4,151.3,650.4,141.7z"/>
|
51 |
+
</g>
|
52 |
+
</g>
|
53 |
+
</g>
|
54 |
+
</svg>
|
admin/class-wp-carousel-free-gutenberg-block.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly.
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* The plugin gutenberg block.
|
9 |
+
*
|
10 |
+
* @link https://shapedplugin.com/
|
11 |
+
* @since 2.4.1
|
12 |
+
*
|
13 |
+
* @package WP_Carousel_Free
|
14 |
+
* @subpackage WP_Carousel_Free/Admin
|
15 |
+
* @author ShapedPlugin <support@shapedplugin.com>
|
16 |
+
*/
|
17 |
+
if ( ! class_exists( 'WP_Carousel_Free_Gutenberg_Block' ) ) {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Custom Gutenberg Block.
|
21 |
+
*/
|
22 |
+
class WP_Carousel_Free_Gutenberg_Block {
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Block Initializer.
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
require_once WPCAROUSELF_PATH . '/admin/GutenbergBlock/class-wp-carousel-free-gutenberg-block-init.php';
|
29 |
+
new WP_Carousel_Free_Gutenberg_Block_Init();
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
}
|
admin/css/wp-carousel-free-admin.css
CHANGED
@@ -370,12 +370,10 @@
|
|
370 |
font-size: 24px;
|
371 |
line-height: 28px;
|
372 |
padding: 0;
|
373 |
-
font-weight: 700;
|
374 |
}
|
375 |
|
376 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-post-title {
|
377 |
-
|
378 |
-
line-height: 30px;
|
379 |
}
|
380 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions p,
|
381 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-product-title a {
|
@@ -388,4 +386,20 @@
|
|
388 |
}
|
389 |
#sp_wpcf_live_preview img {
|
390 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
370 |
font-size: 24px;
|
371 |
line-height: 28px;
|
372 |
padding: 0;
|
|
|
373 |
}
|
374 |
|
375 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-post-title {
|
376 |
+
padding: 0;
|
|
|
377 |
}
|
378 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions p,
|
379 |
#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-product-title a {
|
386 |
}
|
387 |
#sp_wpcf_live_preview img {
|
388 |
width: 100%;
|
389 |
+
}
|
390 |
+
|
391 |
+
/* Gutenberg selector field style */
|
392 |
+
.spwpcf-gutenberg-shortcode.editor-styles-wrapper {
|
393 |
+
padding: 0;
|
394 |
+
line-height: 24px;
|
395 |
+
}
|
396 |
+
.block-editor-page .editor-styles-wrapper select,
|
397 |
+
.block-editor-page select.spwpcf-shortcode-selector,
|
398 |
+
.block-editor-page select.spwpcf-shortcode-selector:focus,
|
399 |
+
.block-editor-page select.spwpcf-shortcode-selector:focus-visible {
|
400 |
+
width: 250px;
|
401 |
+
padding: 5px;
|
402 |
+
border: 1px solid #ccc;
|
403 |
+
font-size: 13px;
|
404 |
+
padding-right: 24px;
|
405 |
}
|
admin/css/wp-carousel-free-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.text-center{text-align:center}#adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img{width:22px;padding:7px 0;height:20px}.spwpcp-gallery-list li{display:inline;margin:5px}.js .tmce-active .wp-editor-area{color:#000}.disable-color-picker .wpcf-field-color{pointer-events:none;opacity:.6}.sp_wpcp_shortcode_generator .wpcf-wrapper{min-height:200px;z-index:999;background-image:url(../img/preloader.gif);background-repeat:no-repeat;background-color:#fff;background-position:center}.sp_wpcp_shortcode_generator .wpcf-wrapper li{opacity:0}.sp-wpcp-help .wp-badge{border:none;background:url(../img/wpcp-icon-256.png) right no-repeat;background-size:100px 100px;box-shadow:none;height:auto;top:-75px}.about-wrap.sp-wpcf-upgrade [class$="-col"],.about-wrap.sp-wpcp-help [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col,.about-wrap.sp-wpcp-help [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:40px}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col{margin-left:0}.about-wrap.sp-wpcp-help [class$="-col"] .col+.col{margin-left:20px}.sp-wpcf-upgrade .headline-feature.feature-video,.sp-wpcp-help .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.sp-wpcf-upgrade .headline-feature.feature-video iframe,.sp-wpcp-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}.sp-wpcp-help .feature-section .sp-wpcp-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcp-help .feature-section .sp-wpcp-feature h3{font-size:16px;margin-top:18px}.sp-wpcp-help .feature-section i.sp-wpcp-font-icon{font-size:30px;display:block;color:#18afb9;font-family:fontawesome;font-style:normal}@media (max-width:500px){.sp-wpcp-help .wp-badge{background-position-x:center;top:0}}.sp-wpc-text-center{text-align:center}.sp-wpcf-upgrade>h1{font-size:2.5em;color:#444;font-weight:300}.sp-wpcf-upgrade>h1 span{font-weight:400}.sp-wpcf-upgrade .about-text{margin-bottom:0}.sp-wpcf-upgrade ul{margin-top:0}.sp-wpcf-upgrade .wp-badge{border:none;background:url(../img/premium-logo.png) no-repeat;background-size:150px 150px;box-shadow:none;top:0;padding-right:8px}.about-wrap.sp-wpcf-upgrade .about-text{min-height:60px}.about-wrap.sp-wpcf-upgrade hr{order:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.sp-wpcf-upgrade .feature-section .sp-wpc-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcf-upgrade .feature-section .sp-wpc-feature h3{font-size:16px;margin-top:18px}.sp-wpcf-upgrade .feature-section i.fa{font-size:30px;display:block;color:#22afba}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section span.dashicons{font-size:22px;color:#fff;background-color:#22afba;width:28px;height:28px;line-height:28px;border-radius:50%;margin-right:10px}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section{margin-bottom:40px;display:flex;flex-wrap:wrap}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{margin-top:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature p{margin-bottom:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section.three-col .col{min-width:32%;max-width:32%;margin-top:20px;display:flex;align-self:auto}.sp-wpcf-upgrade .sp-wpc-pro-features .sp-wpc-pro-subtitle{font-size:1.2em;margin-bottom:26px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer{position:fixed;bottom:0;background:#fff;width:calc(100% - 195px);z-index:9;margin-left:-25px;text-align:center;border:1px solid #dfdfdf;padding:15px 0;border-bottom:none}.sp-wpcf-upgrade .sp-wpc-pro-features h2,.sp-wpcf-upgrade .sp-wpcp-promo-video-title{font-size:2.2em;font-weight:400}.sp-wpcp-join-community h2{font-size:2em}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer a.button{margin:0 8px}.sp-wpcf-upgrade .wpcf-upgrade-btn{display:inline-block;padding:0 20px 0 0}.sp-wpcf-upgrade .wpcf-upgrade-btn a,.sp-wpcf-upgrade a.wpcf-upgrade-btn{text-decoration:none;text-align:center;font-size:16px}.sp-wpcf-upgrade .wpcf-upgrade-btn a:focus{outline:0}.sp-wpcf-upgrade a.wpcf-upgrade-btn,.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:first-child a{background:#7cc048;padding:0 15px;line-height:46px;display:block;color:#fff;border-radius:3px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a{text-decoration:underline}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn a i{margin-left:4px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a i{font-size:14px}.sp-wpcf-upgrade a.wpcf-upgrade-btn{display:inline-block}#sp-wpcfree-review-notice{padding:15px 15px 15px 0;background-color:#fff;border-radius:3px;margin:20px 20px 0 0}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon{width:125px;float:left;line-height:90px;text-align:center}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon img{max-width:83px;vertical-align:middle}#sp-wpcfree-review-notice .sp-wpcfree-notice-text{overflow:hidden}#sp-wpcfree-review-notice .sp-wpcfree-notice-text h3{font-size:24px;margin:0 0 5px;font-weight:400;line-height:1}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p{margin:10px 0 10px 0;font-size:13px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p.sp-wpcfree-review-actions{margin:10px 0 2px 0}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a{text-decoration:none;margin-right:8px;color:#63a37b;display:inline-block;position:relative}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a span{padding-right:2px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a.button{color:#fff}@media screen and (max-width:782px){.about-wrap .three-col .col{min-width:48%!important;max-width:48%!important;margin-left:0!important}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:20px}}@media (max-width:960px){.sp-wpc-help .sp-wpc-upgrade-sticky-footer{width:calc(100%)}}@media only screen and (max-width:500px){.about-wrap .three-col .col{min-width:100%!important}.sp-wpcf-upgrade .wp-badge{background-position-x:center}}.spwpc-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}.spwpc-after-copy-text,.spwpc-pagination-not-work{bottom:0;opacity:0;z-index:9999999;position:fixed;width:230px;left:180px;text-align:center;padding:15px 15px;line-height:15px;color:#fff;border-radius:3px;background:#32373c;border:1px solid #32373c}.spwpc-pagination-not-work{width:280px}.spwpc-after-copy-text .fa-check-circle,.spwpc-pagination-not-work .fa-check-circle{font-size:14px;margin-right:2px;color:#5db62e}#sp_wpcf_live_preview #poststuff .wpcp-carousel-wrapper .sp-wpcpro-section-title,#sp_wpcf_live_preview .wpcp-carousel-wrapper .sp-wpcpro-section-title{font-size:24px;line-height:28px;padding:0
|
1 |
+
.text-center{text-align:center}#adminmenu .menu-icon-sp_wp_carousel .wp-menu-image img{width:22px;padding:7px 0;height:20px}.spwpcp-gallery-list li{display:inline;margin:5px}.js .tmce-active .wp-editor-area{color:#000}.disable-color-picker .wpcf-field-color{pointer-events:none;opacity:.6}.sp_wpcp_shortcode_generator .wpcf-wrapper{min-height:200px;z-index:999;background-image:url(../img/preloader.gif);background-repeat:no-repeat;background-color:#fff;background-position:center}.sp_wpcp_shortcode_generator .wpcf-wrapper li{opacity:0}.sp-wpcp-help .wp-badge{border:none;background:url(../img/wpcp-icon-256.png) right no-repeat;background-size:100px 100px;box-shadow:none;height:auto;top:-75px}.about-wrap.sp-wpcf-upgrade [class$="-col"],.about-wrap.sp-wpcp-help [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col,.about-wrap.sp-wpcp-help [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:40px}.about-wrap.sp-wpcf-upgrade [class$="-col"] .col+.col{margin-left:0}.about-wrap.sp-wpcp-help [class$="-col"] .col+.col{margin-left:20px}.sp-wpcf-upgrade .headline-feature.feature-video,.sp-wpcp-help .headline-feature.feature-video{position:relative;margin:40px 0;padding-bottom:56.25%;width:100%;max-width:100%;height:0;text-align:center}.sp-wpcf-upgrade .headline-feature.feature-video iframe,.sp-wpcp-help .headline-feature.feature-video iframe{position:absolute;top:0;left:0;width:100%;height:100%}.sp-wpcp-help .feature-section .sp-wpcp-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcp-help .feature-section .sp-wpcp-feature h3{font-size:16px;margin-top:18px}.sp-wpcp-help .feature-section i.sp-wpcp-font-icon{font-size:30px;display:block;color:#18afb9;font-family:fontawesome;font-style:normal}@media (max-width:500px){.sp-wpcp-help .wp-badge{background-position-x:center;top:0}}.sp-wpc-text-center{text-align:center}.sp-wpcf-upgrade>h1{font-size:2.5em;color:#444;font-weight:300}.sp-wpcf-upgrade>h1 span{font-weight:400}.sp-wpcf-upgrade .about-text{margin-bottom:0}.sp-wpcf-upgrade ul{margin-top:0}.sp-wpcf-upgrade .wp-badge{border:none;background:url(../img/premium-logo.png) no-repeat;background-size:150px 150px;box-shadow:none;top:0;padding-right:8px}.about-wrap.sp-wpcf-upgrade .about-text{min-height:60px}.about-wrap.sp-wpcf-upgrade hr{order:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,.1)}.sp-wpcf-upgrade .feature-section .sp-wpc-feature{background-color:#fff;padding:20px 20px;border:1px solid #ddd}.sp-wpcf-upgrade .feature-section .sp-wpc-feature h3{font-size:16px;margin-top:18px}.sp-wpcf-upgrade .feature-section i.fa{font-size:30px;display:block;color:#22afba}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section span.dashicons{font-size:22px;color:#fff;background-color:#22afba;width:28px;height:28px;line-height:28px;border-radius:50%;margin-right:10px}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section{margin-bottom:40px;display:flex;flex-wrap:wrap}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature h3{margin-top:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature p{margin-bottom:0}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section .sp-wpc-feature{box-shadow:0 0 10px 0 #ddd;margin:4px;border:0 solid}.sp-wpcf-upgrade .sp-wpc-pro-features .feature-section.three-col .col{min-width:32%;max-width:32%;margin-top:20px;display:flex;align-self:auto}.sp-wpcf-upgrade .sp-wpc-pro-features .sp-wpc-pro-subtitle{font-size:1.2em;margin-bottom:26px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer{position:fixed;bottom:0;background:#fff;width:calc(100% - 195px);z-index:9;margin-left:-25px;text-align:center;border:1px solid #dfdfdf;padding:15px 0;border-bottom:none}.sp-wpcf-upgrade .sp-wpc-pro-features h2,.sp-wpcf-upgrade .sp-wpcp-promo-video-title{font-size:2.2em;font-weight:400}.sp-wpcp-join-community h2{font-size:2em}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer h3{margin-top:17px;margin-bottom:20px}.sp-wpcf-upgrade .sp-wpc-upgrade-sticky-footer a.button{margin:0 8px}.sp-wpcf-upgrade .wpcf-upgrade-btn{display:inline-block;padding:0 20px 0 0}.sp-wpcf-upgrade .wpcf-upgrade-btn a,.sp-wpcf-upgrade a.wpcf-upgrade-btn{text-decoration:none;text-align:center;font-size:16px}.sp-wpcf-upgrade .wpcf-upgrade-btn a:focus{outline:0}.sp-wpcf-upgrade a.wpcf-upgrade-btn,.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:first-child a{background:#7cc048;padding:0 15px;line-height:46px;display:block;color:#fff;border-radius:3px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a{text-decoration:underline}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn a i{margin-left:4px}.sp-wpcf-upgrade ul li.wpcf-upgrade-btn:last-child a i{font-size:14px}.sp-wpcf-upgrade a.wpcf-upgrade-btn{display:inline-block}#sp-wpcfree-review-notice{padding:15px 15px 15px 0;background-color:#fff;border-radius:3px;margin:20px 20px 0 0}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon{width:125px;float:left;line-height:90px;text-align:center}#sp-wpcfree-review-notice .sp-wpcfree-plugin-icon img{max-width:83px;vertical-align:middle}#sp-wpcfree-review-notice .sp-wpcfree-notice-text{overflow:hidden}#sp-wpcfree-review-notice .sp-wpcfree-notice-text h3{font-size:24px;margin:0 0 5px;font-weight:400;line-height:1}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p{margin:10px 0 10px 0;font-size:13px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text p.sp-wpcfree-review-actions{margin:10px 0 2px 0}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a{text-decoration:none;margin-right:8px;color:#63a37b;display:inline-block;position:relative}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a span{padding-right:2px}#sp-wpcfree-review-notice .sp-wpcfree-notice-text .sp-wpcfree-review-actions a.button{color:#fff}@media screen and (max-width:782px){.about-wrap .three-col .col{min-width:48%!important;max-width:48%!important;margin-left:0!important}.about-wrap.sp-wpcp-help .feature-section .col{margin-top:20px}}@media (max-width:960px){.sp-wpc-help .sp-wpc-upgrade-sticky-footer{width:calc(100%)}}@media only screen and (max-width:500px){.about-wrap .three-col .col{min-width:100%!important}.sp-wpcf-upgrade .wp-badge{background-position-x:center}}.spwpc-copy-btn{width:16px;margin-left:13px;position:absolute;top:50%;margin-top:-8px}.spwpc-after-copy-text,.spwpc-pagination-not-work{bottom:0;opacity:0;z-index:9999999;position:fixed;width:230px;left:180px;text-align:center;padding:15px 15px;line-height:15px;color:#fff;border-radius:3px;background:#32373c;border:1px solid #32373c}.spwpc-pagination-not-work{width:280px}.spwpc-after-copy-text .fa-check-circle,.spwpc-pagination-not-work .fa-check-circle{font-size:14px;margin-right:2px;color:#5db62e}#sp_wpcf_live_preview #poststuff .wpcp-carousel-wrapper .sp-wpcpro-section-title,#sp_wpcf_live_preview .wpcp-carousel-wrapper .sp-wpcpro-section-title{font-size:24px;line-height:28px;padding:0}#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-post-title{padding:0}#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions .wpcp-product-title a,#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions p{font-size:16px;line-height:26px}#sp_wpcf_live_preview .wpcp-carousel-wrapper .wpcp-all-captions ul li{font-size:14px;line-height:24px}#sp_wpcf_live_preview img{width:100%}.spwpcf-gutenberg-shortcode.editor-styles-wrapper{padding:0;line-height:24px}.block-editor-page .editor-styles-wrapper select,.block-editor-page select.spwpcf-shortcode-selector,.block-editor-page select.spwpcf-shortcode-selector:focus,.block-editor-page select.spwpcf-shortcode-selector:focus-visible{width:250px;padding:5px;border:1px solid #ccc;font-size:13px;padding-right:24px}
|
public/css/wp-carousel-free-public.css
CHANGED
@@ -115,6 +115,7 @@
|
|
115 |
overflow: hidden;
|
116 |
}
|
117 |
|
|
|
118 |
.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2 {
|
119 |
font-size: 16px;
|
120 |
font-weight: 600;
|
115 |
overflow: hidden;
|
116 |
}
|
117 |
|
118 |
+
#poststuff h2,
|
119 |
.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2 {
|
120 |
font-size: 16px;
|
121 |
font-weight: 600;
|
public/css/wp-carousel-free-public.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wpcp-carousel-wrapper *{word-break:break-word;word-wrap:break-word;box-sizing:border-box}.wpcp-carousel-section.wpcp-standard:not(.wpcp-preloader){display:none}.wpcp-carousel-section.wpcp-standard.slick-initialized:not(.wpcp-preloader){display:block}.wpcp-carousel-wrapper{position:relative}.wpcp-carousel-section.wpcp-preloader{opacity:0}.wpcp-carousel-preloader{position:absolute;left:0;top:0;height:100%;width:100%;text-align:center;display:flex;align-items:center;justify-content:center}.sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard,.wpcp-carousel-section.wpcp-standard .slick-list{overflow:hidden}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px}.wpcp-carousel-section.wpcp-standard.slick-initialized{position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none;max-width:100%}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img[data-lazy]{width:32px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;height:auto;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}
|
1 |
+
.wpcp-carousel-wrapper *{word-break:break-word;word-wrap:break-word;box-sizing:border-box}.wpcp-carousel-section.wpcp-standard:not(.wpcp-preloader){display:none}.wpcp-carousel-section.wpcp-standard.slick-initialized:not(.wpcp-preloader){display:block}.wpcp-carousel-wrapper{position:relative}.wpcp-carousel-section.wpcp-preloader{opacity:0}.wpcp-carousel-preloader{position:absolute;left:0;top:0;height:100%;width:100%;text-align:center;display:flex;align-items:center;justify-content:center}.sp-wpcp-wrapper{margin-bottom:0}.wpcp-carousel-section.wpcp-standard,.wpcp-carousel-section.wpcp-standard .slick-list{overflow:hidden}.wpcp-carousel-section.wpcp-standard{overflow:hidden;padding-right:2px}.wpcp-carousel-section.wpcp-standard.slick-initialized{position:relative}.wpcp-carousel-section .wpcp-single-item{overflow:hidden;display:inline-block;vertical-align:middle;float:none;max-width:100%}.wpcp-all-captions li{list-style:none;margin:0}.wpcp-carousel-section p,.wpcp-carousel-section ul,.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions h2{margin:0}.wpcp-carousel-section.wpcp-video-carousel .wpcp-single-item .wpcp-slide-image{position:relative}.wpcp-carousel-section.wpcp-content-carousel .wpcp-single-item{padding-left:15px;padding-right:15px}.wpcp-carousel-section .wpcp-single-item img[data-lazy]{width:32px}.wpcp-carousel-section .wpcp-single-item img{margin:0 auto;max-width:100%;height:auto;box-shadow:none}.wpcp-carousel-section.wpcp-image-carousel .wpcp-single-item .wpcp-all-captions{padding:10px 20px 15px}.wpcp-carousel-section .wpcp-single-item .wpcp-all-captions .wpcp-image-description{margin:6px 0 0}.wpcp-carousel-section .wpcp-single-item .wpcp-slide-image a:focus{outline:0}.wpcp-carousel-section .slick-slide:focus{outline:0}.wpcp-carousel-section.slick-initialized .slick-slide{margin-right:20px;float:none;display:inline-block;vertical-align:middle}.wpcp-carousel-section .slick-list{margin-right:-20px}.wpcp-carousel-section .wpcp-all-captions a,.wpcp-carousel-section a,.wpcp-carousel-section a:hover{text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden}#poststuff h2,.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions h2{font-size:16px;font-weight:600;margin:0 0 10px}.wpcp-single-item h2 a{color:#444;text-decoration:none}.wpcp-post-carousel .wpcp-single-item .wpcp-all-captions .post-categories{margin:0 0 7px;padding:0;display:block}.wpcp-post-carousel .wpcp-all-captions p{margin-bottom:15px}.wpcp_readmore{border:1px solid;display:inline-block;background:#22afba;margin:0 0 14px;line-height:32px;padding:5px 14px;font-weight:600}.wpcp_readmore,.wpcp_readmore:focus,.wpcp_readmore:hover{color:#fff}.wpcp-single-item .wpcp-all-captions .wpcp-post-meta{margin:0 0 20px;padding:0}.wpcp-post-carousel .wpcp-post-meta li{display:inline-block;margin-right:5px}.wpcp-post-carousel .wpcp-post-meta li:last-child{margin-right:0}.wpcp-post-meta li,.wpcp-post-meta li a{color:#999}.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-all-captions,.wpcp-carousel-section.detail-on-right .wpcp-single-item .wpcp-slide-image{float:left;width:50%;box-sizing:border-box}.wpcp-carousel-section.detail-with-overlay .wpcp-all-captions{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;justify-content:center;height:100%}.wpcp-carousel-section.detail-with-overlay.overlay-lower .wpcp-all-captions{top:auto;display:block;height:auto}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-all-captions{visibility:hidden;opacity:0;transition:visibility .3s linear,opacity .3s linear}.wpcp-carousel-section.detail-with-overlay.overlay-on-hover .wpcp-single-item:hover .wpcp-all-captions{visibility:visible;opacity:1}.wpcp-carousel-section.detail-with-overlay .wpcp-single-item{position:relative}.wpcp-carousel-section .wpcp-single-item:focus{outline:0}.wpcp-product-carousel .wpcp-single-item .wpcp-all-captions{padding:15px 20px 0;overflow:hidden;text-align:center}.wpcp-product-carousel .wpcp-single-item .wpcp-product-title{margin:0;font-size:16px;line-height:23px;font-weight:600}.wpcp-product-price{margin-top:5px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button{margin-top:12px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-cart-button a.button{background:#ebebeb;color:#545454;border:1px solid #d1d1d1;font-weight:500;padding:0 20px;line-height:38px;display:inline-block;font-size:14px}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.add_to_cart_button.added{display:none}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .added_to_cart{font-size:100%;margin:0;line-height:38px;cursor:pointer;position:relative;text-decoration:none;overflow:visible;padding:0 20px;font-weight:600;border-radius:3px;left:auto;color:#515151;background-color:#ebe9eb;border:0;display:inline-block;background-image:none;box-shadow:none;text-shadow:none;border:1px solid}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button a.button:hover{background:#3f3f3f;border-color:#d1d1d1;color:#fff}.wpcp-carousel-section.wpcp-product-carousel .wpcp-all-captions .wpcp-cart-button .wc-forward::after{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-style:normal;font-variant:normal;font-weight:400;line-height:1;vertical-align:-.125em;font:normal normal normal 14px/1 FontAwesome;font-weight:900;line-height:inherit;vertical-align:baseline;content:"\f178";margin-left:.5407911001em}.wpcp-carousel-section .woocommerce-product-rating .star-rating{margin:4px auto;float:none}.wpcp-product-price span{font-weight:700;font-size:14px}.wpcp-carousel-section .slick-next:after,.wpcp-carousel-section .slick-next:before,.wpcp-carousel-section .slick-prev:after,.wpcp-carousel-section .slick-prev:before{display:none}.wpcp-carousel-section .slick-prev{left:0}.wpcp-carousel-section .slick-next{right:0}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-prev{width:30px;height:30px;line-height:30px;position:absolute;z-index:22;left:auto;top:auto;font-size:30px;-webkit-transition:ease all .3s;-moz-transition:ease all .3s;-ms-transition:ease all .3s;-o-transition:ease all .3s;transition:ease all .3s;margin-top:-15px;cursor:pointer}.wpcp-carousel-section.nav-vertical-center{padding:0 25px}.wpcp-carousel-section .slick-next,.wpcp-carousel-section .slick-next i,.wpcp-carousel-section .slick-prev,.wpcp-carousel-section .slick-prev i{line-height:28px;font-family:fontawesome;color:#000}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{top:50%}.wpcp-carousel-section.nav-vertical-center .slick-prev{left:0}.wpcp-carousel-section.nav-vertical-center .slick-next,.wpcp-carousel-section.nav-vertical-center .slick-prev{margin-top:-15px}.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-next,.wpcp-carousel-section.nav-vertical-center.slick-dotted .slick-prev{margin-top:-35px}.wpcp-carousel-section.nav-vertical-center .slick-next{right:0;text-align:right}.wpcp-carousel-section ul.slick-dots{list-style:none;padding:0!important;margin:0;text-align:center;margin-top:18px;position:relative}.wpcp-carousel-section ul.slick-dots li{display:inline;margin:0}.wpcp-carousel-section ul.slick-dots li button{background-color:#ccc;border:0 solid;border-radius:50%;font-size:0;margin:3px;overflow:hidden;padding:0;text-indent:-999px;width:12px;height:12px;cursor:pointer}.wpcp-carousel-section ul.slick-dots,.wpcp-carousel-section ul.slick-dots li,.wpcp-carousel-section ul.slick-dots li button{line-height:1!important}.wpcp-carousel-section ul.slick-dots li button:focus{outline:0}.wpcp-carousel-section ul.slick-dots li.slick-active button{background-color:#666}.wpcpro-row.no-gutters>[class*=wpcpro-col-]{padding-right:0;padding-left:0}.wpcpro-row>[class*=wpcpro-col-]{padding:0 10px;padding-bottom:20px}.wpcpro-row{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px}.wpcpro-post-pagination .ajax-page-numbers,.wpcpro-post-pagination .page-numbers{background:#fff;color:#5e5e5e;border:2px solid #bbb;width:38px;height:38px;line-height:38px;font-size:16px;text-align:center;display:inline-block;margin-right:4px;text-decoration:none;font-weight:700;border-radius:3px;-webkit-transition:all .33s;transition:all .33s;-webkit-box-sizing:content-box;box-sizing:content-box}.wpcpro-post-pagination .ajax-page-numbers.current,.wpcpro-post-pagination .page-numbers.current{cursor:auto;color:#fff;background:#178087;border-color:#178087}.wpcpro-post-pagination-number{margin-top:20px}.wpcpro-post-pagination a.page-numbers:hover,.wpcpro-post-pagination span.current,.wpcpro-post-pagination span:hover{color:#fff;background:#178087;border-color:#178087}
|
public/js/wp-carousel-free-public.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
var carousel_id = $(this).attr('id');
|
6 |
var _this = $(this);
|
7 |
|
8 |
-
if (jQuery().slick) {
|
9 |
|
10 |
jQuery('#' + carousel_id).slick({
|
11 |
prevArrow: '<div class="slick-prev"><i class="fa fa-angle-left"></i></div>',
|
5 |
var carousel_id = $(this).attr('id');
|
6 |
var _this = $(this);
|
7 |
|
8 |
+
if (jQuery().slick && ! jQuery('#' + carousel_id).hasClass('slick-initialized') ) {
|
9 |
|
10 |
jQuery('#' + carousel_id).slick({
|
11 |
prevArrow: '<div class="slick-prev"><i class="fa fa-angle-left"></i></div>',
|
public/js/wp-carousel-free-public.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function($){"use strict";jQuery("body").find(".wpcp-carousel-section.wpcp-standard").each((function(){var carousel_id=$(this).attr("id"),_this=$(this);jQuery().slick&&jQuery("#"+carousel_id).slick({prevArrow:'<div class="slick-prev"><i class="fa fa-angle-left"></i></div>',nextArrow:'<div class="slick-next"><i class="fa fa-angle-right"></i></div>'})}))}(jQuery);
|
1 |
+
!function($){"use strict";jQuery("body").find(".wpcp-carousel-section.wpcp-standard").each((function(){var carousel_id=$(this).attr("id"),_this=$(this);jQuery().slick&&!jQuery("#"+carousel_id).hasClass("slick-initialized")&&jQuery("#"+carousel_id).slick({prevArrow:'<div class="slick-prev"><i class="fa fa-angle-left"></i></div>',nextArrow:'<div class="slick-next"><i class="fa fa-angle-right"></i></div>'})}))}(jQuery);
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shapedplugin.com/donate
|
|
4 |
Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.8.2
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -327,6 +327,9 @@ Thank you!
|
|
327 |
|
328 |
== Changelog ==
|
329 |
|
|
|
|
|
|
|
330 |
= 2.4.1 – Dec 06, 2021 =
|
331 |
* New: Shortcode Live Preview added.
|
332 |
* Fix: Some minor issues.
|
4 |
Tags: wordpress carousel, best carousel plugin, image carousel, image slider, post carousel, custom post carousel, custom taxonomy carousel, woocommerce product carousel, content carousel, video carousel, video slider, video lightbox, youtube carousel, video gallery, carousel, slider, responsive slider, responsive carousel, carousel slider, ticker carousel, center mode carousel, slide anything, image gallery, image lightbox, wordpress image gallery, photo gallery, gallery slider, wordpress gallery plugin, gallery, post slider, vimeo slider, self hosted video carousel, content slider, wordpress slider, featured content slider, html slider, horizontal carousel slider, posts content slider, product carousel, woocommerce slider, woocommerce product slider
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.8.2
|
7 |
+
Stable tag: 2.4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
327 |
|
328 |
== Changelog ==
|
329 |
|
330 |
+
= 2.4.2 – Jan 10, 2022 =
|
331 |
+
* New: Gutenberg Block added.
|
332 |
+
|
333 |
= 2.4.1 – Dec 06, 2021 =
|
334 |
* New: Shortcode Live Preview added.
|
335 |
* Fix: Some minor issues.
|
wp-carousel-free.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin Name: WordPress Carousel
|
10 |
* Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
|
11 |
* Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
12 |
-
* Version: 2.4.
|
13 |
* Author: ShapedPlugin
|
14 |
* Author URI: https://shapedplugin.com/
|
15 |
* License: GPL-2.0+
|
@@ -17,7 +17,7 @@
|
|
17 |
* Text Domain: wp-carousel-free
|
18 |
* Domain Path: /languages
|
19 |
* WC requires at least: 4.0
|
20 |
-
* WC tested up to:
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
@@ -119,7 +119,7 @@ class SP_WP_Carousel_Free {
|
|
119 |
*/
|
120 |
public function setup() {
|
121 |
$this->plugin_name = 'wp-carousel-free';
|
122 |
-
$this->version = '2.4.
|
123 |
$this->define_constants();
|
124 |
$this->includes();
|
125 |
$this->load_dependencies();
|
@@ -183,6 +183,7 @@ class SP_WP_Carousel_Free {
|
|
183 |
include_once WPCAROUSELF_PATH . '/admin/views/help.php';
|
184 |
include_once WPCAROUSELF_PATH . '/admin/views/premium.php';
|
185 |
include_once WPCAROUSELF_PATH . '/admin/preview/class-wp-carousel-free-preview.php';
|
|
|
186 |
}
|
187 |
|
188 |
/**
|
@@ -268,6 +269,11 @@ class SP_WP_Carousel_Free {
|
|
268 |
$upgrade_page = new WP_Carousel_Free_Upgrade( $this->get_plugin_name(), $this->get_version() );
|
269 |
$this->loader->add_action( 'admin_menu', $upgrade_page, 'upgrade_admin_menu', 35 );
|
270 |
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
|
273 |
/**
|
9 |
* Plugin Name: WordPress Carousel
|
10 |
* Plugin URI: https://shapedplugin.com/plugin/wordpress-carousel-pro/?ref=1
|
11 |
* Description: The Most Powerful and User-friendly WordPress Carousel Plugin. Create beautiful carousels in minutes using Images, Posts, WooCommerce Products etc.
|
12 |
+
* Version: 2.4.2
|
13 |
* Author: ShapedPlugin
|
14 |
* Author URI: https://shapedplugin.com/
|
15 |
* License: GPL-2.0+
|
17 |
* Text Domain: wp-carousel-free
|
18 |
* Domain Path: /languages
|
19 |
* WC requires at least: 4.0
|
20 |
+
* WC tested up to: 6.0.0
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
119 |
*/
|
120 |
public function setup() {
|
121 |
$this->plugin_name = 'wp-carousel-free';
|
122 |
+
$this->version = '2.4.2';
|
123 |
$this->define_constants();
|
124 |
$this->includes();
|
125 |
$this->load_dependencies();
|
183 |
include_once WPCAROUSELF_PATH . '/admin/views/help.php';
|
184 |
include_once WPCAROUSELF_PATH . '/admin/views/premium.php';
|
185 |
include_once WPCAROUSELF_PATH . '/admin/preview/class-wp-carousel-free-preview.php';
|
186 |
+
include_once WPCAROUSELF_PATH . '/admin/class-wp-carousel-free-gutenberg-block.php';
|
187 |
}
|
188 |
|
189 |
/**
|
269 |
$upgrade_page = new WP_Carousel_Free_Upgrade( $this->get_plugin_name(), $this->get_version() );
|
270 |
$this->loader->add_action( 'admin_menu', $upgrade_page, 'upgrade_admin_menu', 35 );
|
271 |
|
272 |
+
// Gutenberg block.
|
273 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.3', '>=' ) ) {
|
274 |
+
new WP_Carousel_Free_Gutenberg_Block();
|
275 |
+
}
|
276 |
+
|
277 |
}
|
278 |
|
279 |
/**
|