Page Builder by SiteOrigin - Version 2.10.2

Version Description

  • 28 February 2019 =
  • Don't remove left/right border when Full Width Stretch Padding is enabled on row.
  • Display widget count for inline-save.
  • Live editor: Press escape to close.
  • Live editor: Give the user an option to either close or close and save.
  • Added widget class to widgets in builder interface.
  • Dialog crumbtrail fix.
  • Only close topmost Page Builder window when escape key is pressed.
  • Layout Block: Retrieve sanitized panels data from server as changes are made.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 Page Builder by SiteOrigin
Version 2.10.2
Comparing to
See all releases

Code changes from version 2.10.1 to 2.10.2

Files changed (87) hide show
  1. compat/js/siteorigin-panels-layout-block.js +351 -341
  2. compat/js/siteorigin-panels-layout-block.min.js +1 -1
  3. compat/layout-block.php +3 -2
  4. css/admin.css +5 -1
  5. css/admin.min.css +1 -1
  6. inc/admin.php +19 -5
  7. inc/renderer.php +2 -1
  8. trunk/js/siteorigin-panels-2101.js → js/siteorigin-panels-2102.js +193 -184
  9. js/siteorigin-panels-2102.min.js +1 -0
  10. trunk/js/styling-2101.js → js/styling-2102.js +2 -2
  11. trunk/js/styling-2101.min.js → js/styling-2102.min.js +1 -1
  12. lang/siteorigin-panels.pot +102 -102
  13. readme.txt +13 -3
  14. siteorigin-panels.php +10 -4
  15. tpl/js-templates.php +9 -7
  16. trunk/compat/js/siteorigin-panels-layout-block.js +0 -342
  17. trunk/compat/js/siteorigin-panels-layout-block.min.js +0 -1
  18. trunk/compat/layout-block.php +0 -103
  19. trunk/compat/pb-icon.svg +0 -1
  20. trunk/compat/pb-icon_white.svg +0 -1
  21. trunk/css/admin.css +0 -2686
  22. trunk/css/admin.min.css +0 -1
  23. trunk/css/dashboard.css +0 -9
  24. trunk/css/dashboard.min.css +0 -1
  25. trunk/css/front-flex.css +0 -53
  26. trunk/css/front-flex.min.css +0 -1
  27. trunk/css/front-legacy.css +0 -50
  28. trunk/css/front-legacy.min.css +0 -1
  29. trunk/css/front.css +0 -47
  30. trunk/css/front.min.css +0 -1
  31. trunk/css/icons/panels-icons.eot +0 -0
  32. trunk/css/icons/panels-icons.svg +0 -19
  33. trunk/css/icons/panels-icons.ttf +0 -0
  34. trunk/css/icons/panels-icons.woff +0 -0
  35. trunk/css/icons/readme.txt +0 -5
  36. trunk/css/images/cell-selected.png +0 -0
  37. trunk/css/images/cell-width.png +0 -0
  38. trunk/css/images/dialog-separator.png +0 -0
  39. trunk/css/images/dialog-separator@2x.png +0 -0
  40. trunk/css/images/dropdown-pointer.png +0 -0
  41. trunk/css/images/pb-icon.svg +0 -1
  42. trunk/css/images/pb-icon_white.svg +0 -1
  43. trunk/css/images/prebuilt-default.png +0 -0
  44. trunk/css/images/tooltip-pointer.png +0 -0
  45. trunk/css/images/wpspin_light-2x.gif +0 -0
  46. trunk/css/images/wpspin_light.gif +0 -0
  47. trunk/css/live-editor-front.css +0 -10
  48. trunk/css/live-editor-front.min.css +0 -1
  49. trunk/css/live-editor-preview.css +0 -744
  50. trunk/css/live-editor-preview.min.css +0 -1
  51. trunk/css/mixins.less +0 -173
  52. trunk/inc/admin-dashboard.php +0 -117
  53. trunk/inc/admin-layouts.php +0 -494
  54. trunk/inc/admin-tutorials.php +0 -50
  55. trunk/inc/admin-widget-dialog.php +0 -193
  56. trunk/inc/admin-widgets-bundle.php +0 -143
  57. trunk/inc/admin.php +0 -1469
  58. trunk/inc/cache-renderer.php +0 -37
  59. trunk/inc/css-builder.php +0 -242
  60. trunk/inc/data/widgets-bundle.php +0 -76
  61. trunk/inc/functions.php +0 -106
  62. trunk/inc/home.php +0 -54
  63. trunk/inc/live-editor.php +0 -95
  64. trunk/inc/post-content-filters.php +0 -89
  65. trunk/inc/renderer-legacy.php +0 -168
  66. trunk/inc/renderer.php +0 -853
  67. trunk/inc/revisions.php +0 -107
  68. trunk/inc/settings.php +0 -651
  69. trunk/inc/sidebars-emulator.php +0 -215
  70. trunk/inc/styles-admin.php +0 -513
  71. trunk/inc/styles.php +0 -709
  72. trunk/inc/widget-shortcode.php +0 -122
  73. trunk/inc/widgets/layout.php +0 -129
  74. trunk/inc/widgets/post-content.php +0 -76
  75. trunk/inc/widgets/post-loop-helper.php +0 -100
  76. trunk/inc/widgets/post-loop.php +0 -422
  77. trunk/js/live-editor/jquery.scrollTo.js +0 -210
  78. trunk/js/live-editor/jquery.scrollTo.min.js +0 -1
  79. trunk/js/live-editor/live-editor-front.js +0 -41
  80. trunk/js/live-editor/live-editor-front.min.js +0 -1
  81. trunk/js/siteorigin-panels-2101.min.js +0 -1
  82. trunk/js/siteorigin-parallax.js +0 -153
  83. trunk/js/siteorigin-parallax.min.js +0 -1
  84. trunk/js/yoast-compat.js +0 -118
  85. trunk/js/yoast-compat.min.js +0 -1
  86. trunk/lang/siteorigin-panels.pot +0 -1756
  87. trunk/license.txt +0 -426
compat/js/siteorigin-panels-layout-block.js CHANGED
@@ -1,342 +1,352 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
-
7
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
-
9
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
-
11
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
-
13
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
-
15
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
-
17
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
18
-
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
-
21
- var _lodash = lodash,
22
- isEqual = _lodash.isEqual,
23
- debounce = _lodash.debounce,
24
- isEmpty = _lodash.isEmpty,
25
- isFunction = _lodash.isFunction;
26
- var registerBlockType = wp.blocks.registerBlockType;
27
- var _wp$element = wp.element,
28
- Component = _wp$element.Component,
29
- Fragment = _wp$element.Fragment,
30
- RawHTML = _wp$element.RawHTML,
31
- createRef = _wp$element.createRef;
32
- var BlockControls = wp.editor.BlockControls;
33
- var _wp$components = wp.components,
34
- Toolbar = _wp$components.Toolbar,
35
- IconButton = _wp$components.IconButton,
36
- Spinner = _wp$components.Spinner;
37
- var __ = wp.i18n.__;
38
- var soPanelsBlockEditorAdmin = window.soPanelsBlockEditorAdmin;
39
-
40
- var SiteOriginPanelsLayoutBlock =
41
- /*#__PURE__*/
42
- function (_Component) {
43
- _inherits(SiteOriginPanelsLayoutBlock, _Component);
44
-
45
- function SiteOriginPanelsLayoutBlock(props) {
46
- var _this;
47
-
48
- _classCallCheck(this, SiteOriginPanelsLayoutBlock);
49
-
50
- _this = _possibleConstructorReturn(this, _getPrototypeOf(SiteOriginPanelsLayoutBlock).call(this, props));
51
- var editMode = soPanelsBlockEditorAdmin.defaultMode === 'edit' || isEmpty(props.panelsData);
52
- _this.state = {
53
- editing: editMode,
54
- loadingPreview: !editMode,
55
- previewHtml: ''
56
- };
57
- _this.panelsContainer = createRef();
58
- _this.previewContainer = createRef();
59
- _this.panelsInitialized = false;
60
- _this.previewInitialized = false;
61
- return _this;
62
- }
63
-
64
- _createClass(SiteOriginPanelsLayoutBlock, [{
65
- key: "componentDidMount",
66
- value: function componentDidMount() {
67
- this.isStillMounted = true;
68
-
69
- if (this.state.editing) {
70
- this.setupPanels();
71
- } else if (!this.state.editing && !this.previewInitialized) {
72
- this.fetchPreview(this.props);
73
- this.fetchPreview = debounce(this.fetchPreview, 500);
74
- }
75
- }
76
- }, {
77
- key: "componentWillUnmount",
78
- value: function componentWillUnmount() {
79
- this.isStillMounted = false;
80
-
81
- if (this.builderView) {
82
- this.builderView.off('content_change');
83
- }
84
- }
85
- }, {
86
- key: "componentDidUpdate",
87
- value: function componentDidUpdate(prevProps) {
88
- // let propsChanged = !isEqual( prevProps.panelsData, this.props.panelsData );
89
- if (this.state.editing && !this.panelsInitialized) {
90
- this.setupPanels();
91
- } else if (this.state.loadingPreview) {
92
- this.fetchPreview(this.props);
93
- } else if (!this.previewInitialized && this.previewContainer.current) {
94
- $(document).trigger('panels_setup_preview');
95
- this.previewInitialized = true;
96
- }
97
- }
98
- }, {
99
- key: "setupPanels",
100
- value: function setupPanels() {
101
- var _this2 = this;
102
-
103
- var $panelsContainer = jQuery(this.panelsContainer.current);
104
- var config = {
105
- editorType: 'standalone'
106
- };
107
- var builderModel = new panels.model.builder();
108
- this.builderView = new panels.view.builder({
109
- model: builderModel,
110
- config: config
111
- }); // Make sure panelsData is defined and clone so that we don't alter the underlying attribute.
112
-
113
- var panelsData = JSON.parse(JSON.stringify($.extend({}, this.props.panelsData))); // Disable block selection while dragging rows or widgets.
114
-
115
- var rowOrWidgetMouseDown = function rowOrWidgetMouseDown() {
116
- if (isFunction(_this2.props.onRowOrWidgetMouseDown)) {
117
- _this2.props.onRowOrWidgetMouseDown();
118
- }
119
-
120
- var rowOrWidgetMouseUp = function rowOrWidgetMouseUp() {
121
- $(document).off('mouseup', rowOrWidgetMouseUp);
122
-
123
- if (isFunction(_this2.props.onRowOrWidgetMouseUp)) {
124
- _this2.props.onRowOrWidgetMouseUp();
125
- }
126
- };
127
-
128
- $(document).on('mouseup', rowOrWidgetMouseUp);
129
- };
130
-
131
- this.builderView.on('row_added', function () {
132
- _this2.builderView.$('.so-row-move').off('mousedown', rowOrWidgetMouseDown);
133
-
134
- _this2.builderView.$('.so-row-move').on('mousedown', rowOrWidgetMouseDown);
135
-
136
- _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
137
-
138
- _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
139
- });
140
- this.builderView.on('widget_added', function () {
141
- _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
142
-
143
- _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
144
- });
145
- this.builderView.render().attach({
146
- container: $panelsContainer
147
- }).setData(panelsData);
148
- this.builderView.trigger('builder_resize');
149
- this.builderView.on('content_change', function () {
150
- var newPanelsData = _this2.builderView.getData();
151
-
152
- _this2.panelsDataChanged = !isEqual(panelsData, newPanelsData);
153
-
154
- if (_this2.panelsDataChanged) {
155
- if (_this2.props.onContentChange && isFunction(_this2.props.onContentChange)) {
156
- _this2.props.onContentChange(newPanelsData);
157
- }
158
-
159
- _this2.setState({
160
- loadingPreview: true,
161
- previewHtml: ''
162
- });
163
- }
164
- });
165
- $(document).trigger('panels_setup', this.builderView);
166
- this.panelsInitialized = true;
167
- }
168
- }, {
169
- key: "fetchPreview",
170
- value: function fetchPreview(props) {
171
- var _this3 = this;
172
-
173
- if (!this.isStillMounted) {
174
- return;
175
- }
176
-
177
- this.previewInitialized = false; // var loadingPreview = !props.editing && !props.previewHtml && props.attributes.panelsData;
178
-
179
- var fetchRequest = this.currentFetchRequest = $.post({
180
- url: soPanelsBlockEditorAdmin.previewUrl,
181
- data: {
182
- action: 'so_panels_block_editor_preview',
183
- panelsData: JSON.stringify(props.panelsData)
184
- }
185
- }).then(function (preview) {
186
- if (_this3.isStillMounted && fetchRequest === _this3.currentFetchRequest && preview) {
187
- _this3.setState({
188
- previewHtml: preview,
189
- loadingPreview: false
190
- });
191
- }
192
- });
193
- return fetchRequest;
194
- }
195
- }, {
196
- key: "render",
197
- value: function render() {
198
- var _this4 = this;
199
-
200
- var panelsData = this.props.panelsData;
201
-
202
- var switchToEditing = function switchToEditing() {
203
- _this4.panelsInitialized = false;
204
-
205
- _this4.setState({
206
- editing: true
207
- });
208
- };
209
-
210
- var switchToPreview = function switchToPreview() {
211
- if (panelsData) {
212
- _this4.setState({
213
- editing: false
214
- });
215
- }
216
- };
217
-
218
- if (this.state.editing) {
219
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
220
- icon: "visibility",
221
- className: "components-icon-button components-toolbar__control",
222
- label: __('Preview layout.', 'siteorigin-panels'),
223
- onClick: switchToPreview
224
- }))), React.createElement("div", {
225
- key: "layout-block",
226
- className: "siteorigin-panels-layout-block-container",
227
- ref: this.panelsContainer
228
- }));
229
- } else {
230
- var loadingPreview = this.state.loadingPreview;
231
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
232
- icon: "edit",
233
- className: "components-icon-button components-toolbar__control",
234
- label: __('Edit layout.', 'siteorigin-panels'),
235
- onClick: switchToEditing
236
- }))), React.createElement("div", {
237
- key: "preview",
238
- className: "so-panels-block-layout-preview-container"
239
- }, loadingPreview ? React.createElement("div", {
240
- className: "so-panels-spinner-container"
241
- }, React.createElement("span", null, React.createElement(Spinner, null))) : React.createElement("div", {
242
- className: "so-panels-raw-html-container",
243
- ref: this.previewContainer
244
- }, React.createElement(RawHTML, null, this.state.previewHtml))));
245
- }
246
- }
247
- }]);
248
-
249
- return SiteOriginPanelsLayoutBlock;
250
- }(Component);
251
-
252
- registerBlockType('siteorigin-panels/layout-block', {
253
- title: __('SiteOrigin Layout', 'siteorigin-panels'),
254
- description: __("Build a layout using SiteOrigin's Page Builder.", 'siteorigin-panels'),
255
- icon: function icon() {
256
- return React.createElement("span", {
257
- className: "siteorigin-panels-block-icon"
258
- });
259
- },
260
- category: 'layout',
261
- keywords: ['page builder', 'column,grid', 'panel'],
262
- supports: {
263
- html: false
264
- },
265
- attributes: {
266
- panelsData: {
267
- type: 'object'
268
- }
269
- },
270
- edit: function edit(_ref) {
271
- var attributes = _ref.attributes,
272
- setAttributes = _ref.setAttributes,
273
- toggleSelection = _ref.toggleSelection;
274
-
275
- var onLayoutBlockContentChange = function onLayoutBlockContentChange(newContent) {
276
- setAttributes({
277
- panelsData: newContent
278
- });
279
- };
280
-
281
- var disableSelection = function disableSelection() {
282
- toggleSelection(false);
283
- };
284
-
285
- var enableSelection = function enableSelection() {
286
- toggleSelection(true);
287
- };
288
-
289
- return React.createElement(SiteOriginPanelsLayoutBlock, {
290
- panelsData: attributes.panelsData,
291
- onContentChange: onLayoutBlockContentChange,
292
- onRowOrWidgetMouseDown: disableSelection,
293
- onRowOrWidgetMouseUp: enableSelection
294
- });
295
- },
296
- save: function save() {
297
- // Render in PHP
298
- return null;
299
- }
300
- });
301
-
302
- (function ($) {
303
- if (soPanelsBlockEditorAdmin.showAddButton) {
304
- $(function () {
305
- setTimeout(function () {
306
- var editorDispatch = wp.data.dispatch('core/editor');
307
- var editorSelect = wp.data.select('core/editor');
308
- var tmpl = $('#siteorigin-panels-add-layout-block-button').html();
309
- var $addButton = $(tmpl).insertAfter('.editor-writing-flow > div:first');
310
- $addButton.on('click', function () {
311
- var layoutBlock = wp.blocks.createBlock('siteorigin-panels/layout-block', {});
312
- var isEmpty = editorSelect.isEditedPostEmpty();
313
-
314
- if (isEmpty) {
315
- var blocks = editorSelect.getBlocks();
316
-
317
- if (blocks.length) {
318
- editorDispatch.replaceBlock(blocks[0].clientId, layoutBlock);
319
- } else {
320
- editorDispatch.insertBlock(layoutBlock);
321
- }
322
- } else {
323
- editorDispatch.insertBlock(layoutBlock);
324
- }
325
- });
326
-
327
- var hideButtonIfBlocks = function hideButtonIfBlocks() {
328
- var isEmpty = wp.data.select('core/editor').isEditedPostEmpty();
329
-
330
- if (isEmpty) {
331
- $addButton.show();
332
- } else {
333
- $addButton.hide();
334
- }
335
- };
336
-
337
- wp.data.subscribe(hideButtonIfBlocks);
338
- hideButtonIfBlocks();
339
- }, 100);
340
- });
341
- }
 
 
 
 
 
 
 
 
 
 
342
  })(jQuery);
1
+ "use strict";
2
+
3
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
+
7
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
+
9
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
+
11
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
+
13
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
+
15
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
+
17
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
18
+
19
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
+
21
+ var _lodash = lodash,
22
+ isEqual = _lodash.isEqual,
23
+ debounce = _lodash.debounce,
24
+ isEmpty = _lodash.isEmpty,
25
+ isFunction = _lodash.isFunction;
26
+ var registerBlockType = wp.blocks.registerBlockType;
27
+ var _wp$element = wp.element,
28
+ Component = _wp$element.Component,
29
+ Fragment = _wp$element.Fragment,
30
+ RawHTML = _wp$element.RawHTML,
31
+ createRef = _wp$element.createRef;
32
+ var BlockControls = wp.editor.BlockControls;
33
+ var _wp$components = wp.components,
34
+ Toolbar = _wp$components.Toolbar,
35
+ IconButton = _wp$components.IconButton,
36
+ Spinner = _wp$components.Spinner;
37
+ var __ = wp.i18n.__;
38
+ var _window = window,
39
+ soPanelsBlockEditorAdmin = _window.soPanelsBlockEditorAdmin;
40
+
41
+ var SiteOriginPanelsLayoutBlock =
42
+ /*#__PURE__*/
43
+ function (_Component) {
44
+ _inherits(SiteOriginPanelsLayoutBlock, _Component);
45
+
46
+ function SiteOriginPanelsLayoutBlock(props) {
47
+ var _this;
48
+
49
+ _classCallCheck(this, SiteOriginPanelsLayoutBlock);
50
+
51
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(SiteOriginPanelsLayoutBlock).call(this, props));
52
+ var editMode = soPanelsBlockEditorAdmin.defaultMode === 'edit' || isEmpty(props.panelsData);
53
+ _this.state = {
54
+ editing: editMode,
55
+ loadingPreview: !editMode,
56
+ previewHtml: ''
57
+ };
58
+ _this.panelsContainer = createRef();
59
+ _this.previewContainer = createRef();
60
+ _this.panelsInitialized = false;
61
+ _this.previewInitialized = false;
62
+ return _this;
63
+ }
64
+
65
+ _createClass(SiteOriginPanelsLayoutBlock, [{
66
+ key: "componentDidMount",
67
+ value: function componentDidMount() {
68
+ this.isStillMounted = true;
69
+
70
+ if (this.state.editing) {
71
+ this.setupPanels();
72
+ } else if (!this.state.editing && !this.previewInitialized) {
73
+ this.fetchPreview(this.props);
74
+ this.fetchPreview = debounce(this.fetchPreview, 500);
75
+ }
76
+ }
77
+ }, {
78
+ key: "componentWillUnmount",
79
+ value: function componentWillUnmount() {
80
+ this.isStillMounted = false;
81
+
82
+ if (this.builderView) {
83
+ this.builderView.off('content_change');
84
+ }
85
+ }
86
+ }, {
87
+ key: "componentDidUpdate",
88
+ value: function componentDidUpdate(prevProps) {
89
+ // let propsChanged = !isEqual( prevProps.panelsData, this.props.panelsData );
90
+ if (this.state.editing && !this.panelsInitialized) {
91
+ this.setupPanels();
92
+ } else if (this.state.loadingPreview) {
93
+ this.fetchPreview(this.props);
94
+ } else if (!this.previewInitialized && this.previewContainer.current) {
95
+ $(document).trigger('panels_setup_preview');
96
+ this.previewInitialized = true;
97
+ }
98
+ }
99
+ }, {
100
+ key: "setupPanels",
101
+ value: function setupPanels() {
102
+ var _this2 = this;
103
+
104
+ var $panelsContainer = jQuery(this.panelsContainer.current);
105
+ var config = {
106
+ editorType: 'standalone'
107
+ };
108
+ var builderModel = new panels.model.builder();
109
+ this.builderView = new panels.view.builder({
110
+ model: builderModel,
111
+ config: config
112
+ }); // Make sure panelsData is defined and clone so that we don't alter the underlying attribute.
113
+
114
+ var panelsData = JSON.parse(JSON.stringify($.extend({}, this.props.panelsData))); // Disable block selection while dragging rows or widgets.
115
+
116
+ var rowOrWidgetMouseDown = function rowOrWidgetMouseDown() {
117
+ if (isFunction(_this2.props.onRowOrWidgetMouseDown)) {
118
+ _this2.props.onRowOrWidgetMouseDown();
119
+ }
120
+
121
+ var rowOrWidgetMouseUp = function rowOrWidgetMouseUp() {
122
+ $(document).off('mouseup', rowOrWidgetMouseUp);
123
+
124
+ if (isFunction(_this2.props.onRowOrWidgetMouseUp)) {
125
+ _this2.props.onRowOrWidgetMouseUp();
126
+ }
127
+ };
128
+
129
+ $(document).on('mouseup', rowOrWidgetMouseUp);
130
+ };
131
+
132
+ this.builderView.on('row_added', function () {
133
+ _this2.builderView.$('.so-row-move').off('mousedown', rowOrWidgetMouseDown);
134
+
135
+ _this2.builderView.$('.so-row-move').on('mousedown', rowOrWidgetMouseDown);
136
+
137
+ _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
138
+
139
+ _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
140
+ });
141
+ this.builderView.on('widget_added', function () {
142
+ _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
143
+
144
+ _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
145
+ });
146
+ this.builderView.render().attach({
147
+ container: $panelsContainer
148
+ }).setData(panelsData);
149
+ this.builderView.trigger('builder_resize');
150
+ this.builderView.on('content_change', function () {
151
+ var newPanelsData = _this2.builderView.getData();
152
+
153
+ _this2.panelsDataChanged = !isEqual(panelsData, newPanelsData);
154
+
155
+ if (_this2.panelsDataChanged) {
156
+ if (_this2.props.onContentChange && isFunction(_this2.props.onContentChange)) {
157
+ _this2.props.onContentChange(newPanelsData);
158
+ }
159
+
160
+ _this2.setState({
161
+ loadingPreview: true,
162
+ previewHtml: ''
163
+ });
164
+ }
165
+ });
166
+ $(document).trigger('panels_setup', this.builderView);
167
+ this.panelsInitialized = true;
168
+ }
169
+ }, {
170
+ key: "fetchPreview",
171
+ value: function fetchPreview(props) {
172
+ var _this3 = this;
173
+
174
+ if (!this.isStillMounted) {
175
+ return;
176
+ }
177
+
178
+ this.previewInitialized = false;
179
+ var fetchRequest = this.currentFetchRequest = $.post({
180
+ url: soPanelsBlockEditorAdmin.previewUrl,
181
+ data: {
182
+ action: 'so_panels_layout_block_preview',
183
+ panelsData: JSON.stringify(props.panelsData)
184
+ }
185
+ }).then(function (preview) {
186
+ if (_this3.isStillMounted && fetchRequest === _this3.currentFetchRequest && preview) {
187
+ _this3.setState({
188
+ previewHtml: preview,
189
+ loadingPreview: false
190
+ });
191
+ }
192
+ });
193
+ return fetchRequest;
194
+ }
195
+ }, {
196
+ key: "render",
197
+ value: function render() {
198
+ var _this4 = this;
199
+
200
+ var panelsData = this.props.panelsData;
201
+
202
+ var switchToEditing = function switchToEditing() {
203
+ _this4.panelsInitialized = false;
204
+
205
+ _this4.setState({
206
+ editing: true
207
+ });
208
+ };
209
+
210
+ var switchToPreview = function switchToPreview() {
211
+ if (panelsData) {
212
+ _this4.setState({
213
+ editing: false
214
+ });
215
+ }
216
+ };
217
+
218
+ if (this.state.editing) {
219
+ return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
220
+ icon: "visibility",
221
+ className: "components-icon-button components-toolbar__control",
222
+ label: __('Preview layout.', 'siteorigin-panels'),
223
+ onClick: switchToPreview
224
+ }))), React.createElement("div", {
225
+ key: "layout-block",
226
+ className: "siteorigin-panels-layout-block-container",
227
+ ref: this.panelsContainer
228
+ }));
229
+ } else {
230
+ var loadingPreview = this.state.loadingPreview;
231
+ return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
232
+ icon: "edit",
233
+ className: "components-icon-button components-toolbar__control",
234
+ label: __('Edit layout.', 'siteorigin-panels'),
235
+ onClick: switchToEditing
236
+ }))), React.createElement("div", {
237
+ key: "preview",
238
+ className: "so-panels-block-layout-preview-container"
239
+ }, loadingPreview ? React.createElement("div", {
240
+ className: "so-panels-spinner-container"
241
+ }, React.createElement("span", null, React.createElement(Spinner, null))) : React.createElement("div", {
242
+ className: "so-panels-raw-html-container",
243
+ ref: this.previewContainer
244
+ }, React.createElement(RawHTML, null, this.state.previewHtml))));
245
+ }
246
+ }
247
+ }]);
248
+
249
+ return SiteOriginPanelsLayoutBlock;
250
+ }(Component);
251
+
252
+ registerBlockType('siteorigin-panels/layout-block', {
253
+ title: __('SiteOrigin Layout', 'siteorigin-panels'),
254
+ description: __("Build a layout using SiteOrigin's Page Builder.", 'siteorigin-panels'),
255
+ icon: function icon() {
256
+ return React.createElement("span", {
257
+ className: "siteorigin-panels-block-icon"
258
+ });
259
+ },
260
+ category: 'layout',
261
+ keywords: ['page builder', 'column,grid', 'panel'],
262
+ supports: {
263
+ html: false
264
+ },
265
+ attributes: {
266
+ panelsData: {
267
+ type: 'object'
268
+ }
269
+ },
270
+ edit: function edit(_ref) {
271
+ var attributes = _ref.attributes,
272
+ setAttributes = _ref.setAttributes,
273
+ toggleSelection = _ref.toggleSelection;
274
+
275
+ var onLayoutBlockContentChange = function onLayoutBlockContentChange(newPanelsData) {
276
+ if (!_.isEmpty(newPanelsData.widgets)) {
277
+ // Send panels data to server for sanitization.
278
+ $.post(soPanelsBlockEditorAdmin.sanitizeUrl, {
279
+ action: 'so_panels_layout_block_sanitize',
280
+ panelsData: JSON.stringify(newPanelsData)
281
+ }, function (sanitizedPanelsData) {
282
+ if (sanitizedPanelsData !== '') {
283
+ setAttributes({
284
+ panelsData: sanitizedPanelsData
285
+ });
286
+ }
287
+ });
288
+ }
289
+ };
290
+
291
+ var disableSelection = function disableSelection() {
292
+ toggleSelection(false);
293
+ };
294
+
295
+ var enableSelection = function enableSelection() {
296
+ toggleSelection(true);
297
+ };
298
+
299
+ return React.createElement(SiteOriginPanelsLayoutBlock, {
300
+ panelsData: attributes.panelsData,
301
+ onContentChange: onLayoutBlockContentChange,
302
+ onRowOrWidgetMouseDown: disableSelection,
303
+ onRowOrWidgetMouseUp: enableSelection
304
+ });
305
+ },
306
+ save: function save() {
307
+ // Render in PHP
308
+ return null;
309
+ }
310
+ });
311
+
312
+ (function ($) {
313
+ if (soPanelsBlockEditorAdmin.showAddButton) {
314
+ $(function () {
315
+ setTimeout(function () {
316
+ var editorDispatch = wp.data.dispatch('core/editor');
317
+ var editorSelect = wp.data.select('core/editor');
318
+ var tmpl = $('#siteorigin-panels-add-layout-block-button').html();
319
+ var $addButton = $(tmpl).insertAfter('.editor-writing-flow > div:first');
320
+ $addButton.on('click', function () {
321
+ var layoutBlock = wp.blocks.createBlock('siteorigin-panels/layout-block', {});
322
+ var isEmpty = editorSelect.isEditedPostEmpty();
323
+
324
+ if (isEmpty) {
325
+ var blocks = editorSelect.getBlocks();
326
+
327
+ if (blocks.length) {
328
+ editorDispatch.replaceBlock(blocks[0].clientId, layoutBlock);
329
+ } else {
330
+ editorDispatch.insertBlock(layoutBlock);
331
+ }
332
+ } else {
333
+ editorDispatch.insertBlock(layoutBlock);
334
+ }
335
+ });
336
+
337
+ var hideButtonIfBlocks = function hideButtonIfBlocks() {
338
+ var isEmpty = wp.data.select('core/editor').isEditedPostEmpty();
339
+
340
+ if (isEmpty) {
341
+ $addButton.show();
342
+ } else {
343
+ $addButton.hide();
344
+ }
345
+ };
346
+
347
+ wp.data.subscribe(hideButtonIfBlocks);
348
+ hideButtonIfBlocks();
349
+ }, 100);
350
+ });
351
+ }
352
  })(jQuery);
compat/js/siteorigin-panels-layout-block.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _lodash=lodash,isEqual=_lodash.isEqual,debounce=_lodash.debounce,isEmpty=_lodash.isEmpty,isFunction=_lodash.isFunction,registerBlockType=wp.blocks.registerBlockType,_wp$element=wp.element,Component=_wp$element.Component,Fragment=_wp$element.Fragment,RawHTML=_wp$element.RawHTML,createRef=_wp$element.createRef,BlockControls=wp.editor.BlockControls,_wp$components=wp.components,Toolbar=_wp$components.Toolbar,IconButton=_wp$components.IconButton,Spinner=_wp$components.Spinner,__=wp.i18n.__,soPanelsBlockEditorAdmin=window.soPanelsBlockEditorAdmin,SiteOriginPanelsLayoutBlock=function(e){function i(e){var t;_classCallCheck(this,i),t=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this,e));var n="edit"===soPanelsBlockEditorAdmin.defaultMode||isEmpty(e.panelsData);return t.state={editing:n,loadingPreview:!n,previewHtml:""},t.panelsContainer=createRef(),t.previewContainer=createRef(),t.panelsInitialized=!1,t.previewInitialized=!1,t}return _inherits(i,Component),_createClass(i,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.state.editing?this.setupPanels():this.state.editing||this.previewInitialized||(this.fetchPreview(this.props),this.fetchPreview=debounce(this.fetchPreview,500))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1,this.builderView&&this.builderView.off("content_change")}},{key:"componentDidUpdate",value:function(e){this.state.editing&&!this.panelsInitialized?this.setupPanels():this.state.loadingPreview?this.fetchPreview(this.props):!this.previewInitialized&&this.previewContainer.current&&($(document).trigger("panels_setup_preview"),this.previewInitialized=!0)}},{key:"setupPanels",value:function(){var t=this,e=jQuery(this.panelsContainer.current),n=new panels.model.builder;this.builderView=new panels.view.builder({model:n,config:{editorType:"standalone"}});var i=JSON.parse(JSON.stringify($.extend({},this.props.panelsData))),o=function(){isFunction(t.props.onRowOrWidgetMouseDown)&&t.props.onRowOrWidgetMouseDown();$(document).on("mouseup",function e(){$(document).off("mouseup",e),isFunction(t.props.onRowOrWidgetMouseUp)&&t.props.onRowOrWidgetMouseUp()})};this.builderView.on("row_added",function(){t.builderView.$(".so-row-move").off("mousedown",o),t.builderView.$(".so-row-move").on("mousedown",o),t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.on("widget_added",function(){t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.render().attach({container:e}).setData(i),this.builderView.trigger("builder_resize"),this.builderView.on("content_change",function(){var e=t.builderView.getData();t.panelsDataChanged=!isEqual(i,e),t.panelsDataChanged&&(t.props.onContentChange&&isFunction(t.props.onContentChange)&&t.props.onContentChange(e),t.setState({loadingPreview:!0,previewHtml:""}))}),$(document).trigger("panels_setup",this.builderView),this.panelsInitialized=!0}},{key:"fetchPreview",value:function(e){var t=this;if(this.isStillMounted){this.previewInitialized=!1;var n=this.currentFetchRequest=$.post({url:soPanelsBlockEditorAdmin.previewUrl,data:{action:"so_panels_block_editor_preview",panelsData:JSON.stringify(e.panelsData)}}).then(function(e){t.isStillMounted&&n===t.currentFetchRequest&&e&&t.setState({previewHtml:e,loadingPreview:!1})});return n}}},{key:"render",value:function(){var e=this,t=this.props.panelsData;if(this.state.editing)return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"visibility",className:"components-icon-button components-toolbar__control",label:__("Preview layout.","siteorigin-panels"),onClick:function(){t&&e.setState({editing:!1})}}))),React.createElement("div",{key:"layout-block",className:"siteorigin-panels-layout-block-container",ref:this.panelsContainer}));var n=this.state.loadingPreview;return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"edit",className:"components-icon-button components-toolbar__control",label:__("Edit layout.","siteorigin-panels"),onClick:function(){e.panelsInitialized=!1,e.setState({editing:!0})}}))),React.createElement("div",{key:"preview",className:"so-panels-block-layout-preview-container"},n?React.createElement("div",{className:"so-panels-spinner-container"},React.createElement("span",null,React.createElement(Spinner,null))):React.createElement("div",{className:"so-panels-raw-html-container",ref:this.previewContainer},React.createElement(RawHTML,null,this.state.previewHtml))))}}]),i}();registerBlockType("siteorigin-panels/layout-block",{title:__("SiteOrigin Layout","siteorigin-panels"),description:__("Build a layout using SiteOrigin's Page Builder.","siteorigin-panels"),icon:function(){return React.createElement("span",{className:"siteorigin-panels-block-icon"})},category:"layout",keywords:["page builder","column,grid","panel"],supports:{html:!1},attributes:{panelsData:{type:"object"}},edit:function(e){var t=e.attributes,n=e.setAttributes,i=e.toggleSelection;return React.createElement(SiteOriginPanelsLayoutBlock,{panelsData:t.panelsData,onContentChange:function(e){n({panelsData:e})},onRowOrWidgetMouseDown:function(){i(!1)},onRowOrWidgetMouseUp:function(){i(!0)}})},save:function(){return null}}),function(r){soPanelsBlockEditorAdmin.showAddButton&&r(function(){setTimeout(function(){var n=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),e=r("#siteorigin-panels-add-layout-block-button").html(),t=r(e).insertAfter(".editor-writing-flow > div:first");t.on("click",function(){var e=wp.blocks.createBlock("siteorigin-panels/layout-block",{});if(i.isEditedPostEmpty()){var t=i.getBlocks();t.length?n.replaceBlock(t[0].clientId,e):n.insertBlock(e)}else n.insertBlock(e)});var o=function(){wp.data.select("core/editor").isEditedPostEmpty()?t.show():t.hide()};wp.data.subscribe(o),o()},100)})}(jQuery);
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _lodash=lodash,isEqual=_lodash.isEqual,debounce=_lodash.debounce,isEmpty=_lodash.isEmpty,isFunction=_lodash.isFunction,registerBlockType=wp.blocks.registerBlockType,_wp$element=wp.element,Component=_wp$element.Component,Fragment=_wp$element.Fragment,RawHTML=_wp$element.RawHTML,createRef=_wp$element.createRef,BlockControls=wp.editor.BlockControls,_wp$components=wp.components,Toolbar=_wp$components.Toolbar,IconButton=_wp$components.IconButton,Spinner=_wp$components.Spinner,__=wp.i18n.__,_window=window,soPanelsBlockEditorAdmin=_window.soPanelsBlockEditorAdmin,SiteOriginPanelsLayoutBlock=function(e){function i(e){var t;_classCallCheck(this,i),t=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this,e));var n="edit"===soPanelsBlockEditorAdmin.defaultMode||isEmpty(e.panelsData);return t.state={editing:n,loadingPreview:!n,previewHtml:""},t.panelsContainer=createRef(),t.previewContainer=createRef(),t.panelsInitialized=!1,t.previewInitialized=!1,t}return _inherits(i,Component),_createClass(i,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.state.editing?this.setupPanels():this.state.editing||this.previewInitialized||(this.fetchPreview(this.props),this.fetchPreview=debounce(this.fetchPreview,500))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1,this.builderView&&this.builderView.off("content_change")}},{key:"componentDidUpdate",value:function(e){this.state.editing&&!this.panelsInitialized?this.setupPanels():this.state.loadingPreview?this.fetchPreview(this.props):!this.previewInitialized&&this.previewContainer.current&&($(document).trigger("panels_setup_preview"),this.previewInitialized=!0)}},{key:"setupPanels",value:function(){var t=this,e=jQuery(this.panelsContainer.current),n=new panels.model.builder;this.builderView=new panels.view.builder({model:n,config:{editorType:"standalone"}});var i=JSON.parse(JSON.stringify($.extend({},this.props.panelsData))),o=function(){isFunction(t.props.onRowOrWidgetMouseDown)&&t.props.onRowOrWidgetMouseDown();$(document).on("mouseup",function e(){$(document).off("mouseup",e),isFunction(t.props.onRowOrWidgetMouseUp)&&t.props.onRowOrWidgetMouseUp()})};this.builderView.on("row_added",function(){t.builderView.$(".so-row-move").off("mousedown",o),t.builderView.$(".so-row-move").on("mousedown",o),t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.on("widget_added",function(){t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.render().attach({container:e}).setData(i),this.builderView.trigger("builder_resize"),this.builderView.on("content_change",function(){var e=t.builderView.getData();t.panelsDataChanged=!isEqual(i,e),t.panelsDataChanged&&(t.props.onContentChange&&isFunction(t.props.onContentChange)&&t.props.onContentChange(e),t.setState({loadingPreview:!0,previewHtml:""}))}),$(document).trigger("panels_setup",this.builderView),this.panelsInitialized=!0}},{key:"fetchPreview",value:function(e){var t=this;if(this.isStillMounted){this.previewInitialized=!1;var n=this.currentFetchRequest=$.post({url:soPanelsBlockEditorAdmin.previewUrl,data:{action:"so_panels_layout_block_preview",panelsData:JSON.stringify(e.panelsData)}}).then(function(e){t.isStillMounted&&n===t.currentFetchRequest&&e&&t.setState({previewHtml:e,loadingPreview:!1})});return n}}},{key:"render",value:function(){var e=this,t=this.props.panelsData;if(this.state.editing)return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"visibility",className:"components-icon-button components-toolbar__control",label:__("Preview layout.","siteorigin-panels"),onClick:function(){t&&e.setState({editing:!1})}}))),React.createElement("div",{key:"layout-block",className:"siteorigin-panels-layout-block-container",ref:this.panelsContainer}));var n=this.state.loadingPreview;return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"edit",className:"components-icon-button components-toolbar__control",label:__("Edit layout.","siteorigin-panels"),onClick:function(){e.panelsInitialized=!1,e.setState({editing:!0})}}))),React.createElement("div",{key:"preview",className:"so-panels-block-layout-preview-container"},n?React.createElement("div",{className:"so-panels-spinner-container"},React.createElement("span",null,React.createElement(Spinner,null))):React.createElement("div",{className:"so-panels-raw-html-container",ref:this.previewContainer},React.createElement(RawHTML,null,this.state.previewHtml))))}}]),i}();registerBlockType("siteorigin-panels/layout-block",{title:__("SiteOrigin Layout","siteorigin-panels"),description:__("Build a layout using SiteOrigin's Page Builder.","siteorigin-panels"),icon:function(){return React.createElement("span",{className:"siteorigin-panels-block-icon"})},category:"layout",keywords:["page builder","column,grid","panel"],supports:{html:!1},attributes:{panelsData:{type:"object"}},edit:function(e){var t=e.attributes,n=e.setAttributes,i=e.toggleSelection;return React.createElement(SiteOriginPanelsLayoutBlock,{panelsData:t.panelsData,onContentChange:function(e){_.isEmpty(e.widgets)||$.post(soPanelsBlockEditorAdmin.sanitizeUrl,{action:"so_panels_layout_block_sanitize",panelsData:JSON.stringify(e)},function(e){""!==e&&n({panelsData:e})})},onRowOrWidgetMouseDown:function(){i(!1)},onRowOrWidgetMouseUp:function(){i(!0)}})},save:function(){return null}}),function(r){soPanelsBlockEditorAdmin.showAddButton&&r(function(){setTimeout(function(){var n=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),e=r("#siteorigin-panels-add-layout-block-button").html(),t=r(e).insertAfter(".editor-writing-flow > div:first");t.on("click",function(){var e=wp.blocks.createBlock("siteorigin-panels/layout-block",{});if(i.isEditedPostEmpty()){var t=i.getBlocks();t.length?n.replaceBlock(t[0].clientId,e):n.insertBlock(e)}else n.insertBlock(e)});var o=function(){wp.data.select("core/editor").isEditedPostEmpty()?t.show():t.hide()};wp.data.subscribe(o),o()},100)})}(jQuery);
compat/layout-block.php CHANGED
@@ -56,7 +56,8 @@ class SiteOrigin_Panels_Compat_Layout_Block {
56
  'siteorigin-panels-layout-block',
57
  'soPanelsBlockEditorAdmin',
58
  array(
59
- 'previewUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'block-editor-preview', '_panelsnonce' ),
 
60
  'defaultMode' => siteorigin_panels_setting( 'layout-block-default-mode' ),
61
  'showAddButton' => $is_panels_post_type,
62
  )
@@ -96,7 +97,7 @@ class SiteOrigin_Panels_Compat_Layout_Block {
96
  private function sanitize_panels_data( $panels_data ) {
97
  // We force calling widgets' update functions here, but a better solution is to ensure these are called when
98
  // the block is saved, but there is currently no simple method to do so.
99
- $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], false, true, true );
100
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
101
  return $panels_data;
102
  }
56
  'siteorigin-panels-layout-block',
57
  'soPanelsBlockEditorAdmin',
58
  array(
59
+ 'sanitizeUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'layout-block-sanitize', '_panelsnonce' ),
60
+ 'previewUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'layout-block-preview', '_panelsnonce' ),
61
  'defaultMode' => siteorigin_panels_setting( 'layout-block-default-mode' ),
62
  'showAddButton' => $is_panels_post_type,
63
  )
97
  private function sanitize_panels_data( $panels_data ) {
98
  // We force calling widgets' update functions here, but a better solution is to ensure these are called when
99
  // the block is saved, but there is currently no simple method to do so.
100
+ $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], false, true );
101
  $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
102
  return $panels_data;
103
  }
css/admin.css CHANGED
@@ -2202,8 +2202,12 @@
2202
  height: 46px;
2203
  width: 360px;
2204
  }
 
 
 
 
2205
  .so-panels-live-editor .so-sidebar-tools .live-editor-close {
2206
- margin: 9px 10px 0 15px;
2207
  float: right;
2208
  }
2209
  .so-panels-live-editor .so-sidebar-tools .live-editor-mode {
2202
  height: 46px;
2203
  width: 360px;
2204
  }
2205
+ .so-panels-live-editor .so-sidebar-tools .live-editor-save {
2206
+ margin: 9px 10px 0 5px;
2207
+ float: right;
2208
+ }
2209
  .so-panels-live-editor .so-sidebar-tools .live-editor-close {
2210
+ margin: 9px 5px 0 15px;
2211
  float: right;
2212
  }
2213
  .so-panels-live-editor .so-sidebar-tools .live-editor-mode {
css/admin.min.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:siteorigin-panels-icons;src:url(icons/panels-icons.eot);src:url(icons/panels-icons.eot) format("embedded-opentype"),url(icons/panels-icons.woff) format("woff"),url(icons/panels-icons.ttf) format("truetype"),url(icons/panels-icons.svg) format("svg");font-weight:400;font-style:normal}#so-panels-panels.attached-to-editor{margin-top:20px}#so-panels-panels.attached-to-editor .handlediv,#so-panels-panels.attached-to-editor .hndle{display:none!important}#so-panels-panels.attached-to-editor .inside{margin:0!important;padding:0!important}#so-panels-panels.attached-to-editor .so-toolbar .so-switch-to-standard{display:block}.siteorigin-panels-builder{position:relative}.siteorigin-panels-builder .so-tool-button{padding:6px 7px;text-decoration:none;line-height:1em;float:left;margin-right:2px;display:block;visibility:visible;position:relative;cursor:pointer;border:1px solid #bebebe;background:#eee;background:-o-linear-gradient(#f9f9f9,#eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#f9f9f9",endColorstr="#eeeeee",GradientType=0);box-shadow:0 1px 1px rgba(0,0,0,.04),inset 0 1px 0 hsla(0,0%,100%,.5);outline:none;border-radius:2px}.siteorigin-panels-builder .so-tool-button .so-panels-icon{font-size:12px}.siteorigin-panels-builder .so-tool-button span{display:inline-block;color:#666;text-shadow:0 1px 0 #fff;min-width:10px;text-align:center}.siteorigin-panels-builder .so-tool-button:hover{background:#fff}.siteorigin-panels-builder .so-tool-button:hover span{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-tool-button.so-row-settings{margin-right:8px}}.siteorigin-panels-builder .so-builder-toolbar{-ms-box-sizing:border-box;box-sizing:border-box;border-bottom:1px solid #d0d0d0;background:#f5f5f5;line-height:1em;z-index:101;white-space:nowrap;overflow-x:hidden;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.04);top:0;left:0;width:100%;padding:6px 9px;margin-top:0!important;zoom:1}.siteorigin-panels-builder .so-builder-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-builder-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{display:inline-block;color:#666;padding:2px 10px 2px 8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:3px 0 2px;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{float:left;margin:3px 7px 2px 0;font-size:14px;color:#747474}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover,.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover .so-panels-icon{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{margin-right:8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:7px 0 2px 5px;font-size:14px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{margin:3px 0;font-size:21px}}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard{cursor:pointer;float:right;display:none;text-decoration:none;color:#666;padding:5px 6px;border-radius:2px;border:1px solid transparent;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard:hover{background:#fafafa;border:1px solid #999;color:#444}.siteorigin-panels-builder .so-rows-container{padding:20px 15px 0}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color{background-color:#cde2ec;border:1px solid #a4cadd}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color.so-row-color-selected:before{background:#a8cdde}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .cell-wrapper{background-color:#cde2ec}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99c4d8}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle{background-color:#e7f1f6}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle:hover{background-color:#dcebf2}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color{background-color:#f2c2be;border:1px solid #e9968f}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color.so-row-color-selected:before{background:#ea9a93}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .cell-wrapper{background-color:#f2c2be}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell.cell-selected .cell-wrapper{background-color:#e68a83}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle{background-color:#f8dedc}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle:hover{background-color:#f5d2cf}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color{background-color:#d5ccdf;border:1px solid #b9aac9}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color.so-row-color-selected:before{background:#bbadcb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .cell-wrapper{background-color:#d5ccdf}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell.cell-selected .cell-wrapper{background-color:#b1a0c3}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle{background-color:#e7e2ed}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle:hover{background-color:#dfd9e7}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color{background-color:#cae7cd;border:1px solid #a3d6a9}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color.so-row-color-selected:before{background:#a7d7ac}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .cell-wrapper{background-color:#cae7cd}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99d19f}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle{background-color:#e3f2e4}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle:hover{background-color:#d8edda}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color{background-color:#e2dcb1;border:1px solid #d3ca88}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color.so-row-color-selected:before{background:#d4cb8c}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .cell-wrapper{background-color:#e2dcb1}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell.cell-selected .cell-wrapper{background-color:#cfc57d}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle{background-color:#ece8cb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle:hover{background-color:#e8e3c0}.siteorigin-panels-builder .so-rows-container h3.so-row-label{display:inline-block;font-size:1em;font-weight:500;color:#474747;margin:0 0 0 4px;line-height:22px;float:left}.siteorigin-panels-builder .so-rows-container .so-row-toolbar{zoom:1;margin-bottom:4px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button{-ms-box-sizing:border-box;box-sizing:border-box;padding:4px;float:right}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{color:#777;font-size:11px;width:11px;height:11px;display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button:hover .so-panels-icon{color:#555}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button.so-row-move{cursor:move}@media (max-width:782px){.siteorigin-panels-builder .so-rows-container .so-row-toolbar{margin-bottom:8px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{font-size:21px;width:21px;height:21px}}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper{visibility:hidden;opacity:0;transition:visibility 0s linear 75ms,opacity 75ms linear;z-index:101;right:-10px;top:100%;width:125px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete{color:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete:hover{color:#fff;background:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container{display:flex;justify-content:space-around;padding:5px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color{display:inline-block;cursor:pointer;position:relative;text-align:center;width:14px;height:14px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color.so-row-color-selected:before{content:"";display:block;position:absolute;top:2px;bottom:2px;left:2px;right:2px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper:hover .so-dropdown-links-wrapper{visibility:visible;opacity:1;transition-delay:0s}.siteorigin-panels-builder .so-rows-container .ui-sortable-placeholder{visibility:visible!important;background:#f7f7f7;-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container{margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.siteorigin-panels-builder .so-rows-container .so-row-container.ui-sortable-helper{opacity:.9}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells{zoom:1;margin:0 -5px;position:relative;display:flex}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w{width:10px;left:-11px;cursor:col-resize;background:rgba(0,150,211,.25);transition:background .25s ease-in-out}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w:hover{background:rgba(0,150,211,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell{-ms-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 5px}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-first{margin-left:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-last{margin-right:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{background:#e4eff4;padding:7px 7px 0;height:100%;min-height:63px;transition:background .25s ease-in-out 0s}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.cell-selected .cell-wrapper{background-size:3px 3px}}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget{cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-move{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-edit h4{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover{background:#feffff}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover a{opacity:1}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a{display:none;margin-right:3px;text-decoration:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete{color:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete:hover{color:#fff;background:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover .title a{display:inline-block;opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.panel-being-dragged .title .actions{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget small{display:block;height:16px;overflow:hidden;color:#777}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only small{opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small{color:#eee}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight{border:1px solid rgba(0,0,0,.075);background:rgba(0,0,0,.025);-ms-box-sizing:border-box;box-sizing:border-box;height:49px;margin-bottom:7px;position:relative;box-shadow:inset 2px 2px 2px rgba(0,0,0,.01)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .resize-handle{z-index:100;position:absolute;top:0;width:10px;left:-5px;cursor:col-resize;background:#f6fafb;height:100%;transition:background .25s ease-in-out 0s}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell:first-child .resize-handle{display:none}.siteorigin-panels-builder .so-panels-welcome-message{text-align:center;padding:0 15px 20px;color:#555;line-height:1.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{padding:15px 10px;background:#f8f8f8;border:1px solid #e0e0e0}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{font-size:14px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{font-size:inherit;display:inline-block;float:none;color:#666;padding:5px 10px;margin:0 3px}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{padding:9px 10px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button .so-panels-icon{color:#777;font-size:.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-tip-wrapper{margin-top:15px;font-size:.95em}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar{padding:10px}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button .so-panels-icon{margin:3px 0}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button.so-learn,.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button span.so-button-text{display:none}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar .so-switch-to-standard{display:none!important}.so-widget.ui-sortable-helper.widget-being-dragged{z-index:500002!important;opacity:.9;pointer-events:none;border:1px solid rgba(0,0,0,.35)!important;cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-move{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.so-widget.ui-sortable-helper.widget-being-dragged h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.so-widget.ui-sortable-helper.widget-being-dragged h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-edit h4{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover{background:#feffff}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover a{opacity:1}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a{display:none;margin-right:3px;text-decoration:none}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete{color:red}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete:hover{color:#fff;background:red}.so-widget.ui-sortable-helper.widget-being-dragged:hover .title a{display:inline-block;opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.panel-being-dragged .title .actions{display:none}.so-widget.ui-sortable-helper.widget-being-dragged small{display:block;height:16px;overflow:hidden;color:#777}.so-widget.ui-sortable-helper.widget-being-dragged .form{display:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover small,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only small{opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small{color:#eee}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container{padding-top:0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-rows-container{padding:10px 0 0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-toolbar{padding-left:15px;padding-right:15px;margin:0 -15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-overlay,.block-editor .so-right-sidebar,.block-editor .so-title-bar,.block-editor .so-toolbar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-overlay,.so-panels-dialog .so-right-sidebar,.so-panels-dialog .so-title-bar,.so-panels-dialog .so-toolbar{z-index:100001;position:fixed;-ms-box-sizing:border-box;box-sizing:border-box;padding:15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{overflow-y:auto}.block-editor .so-overlay,.so-panels-dialog .so-overlay{top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.block-editor .so-content,.so-panels-dialog .so-content{top:80px;left:30px;right:30px;bottom:88px;background-color:#fdfdfd;overflow-x:hidden;box-shadow:inset 0 2px 2px rgba(0,0,0,.03)}.block-editor .so-content>:first-child,.so-panels-dialog .so-content>:first-child{margin-top:0}.block-editor .so-content>:last-child,.so-panels-dialog .so-content>:last-child{margin-bottom:0}.block-editor .so-content .so-content-tabs>*,.so-panels-dialog .so-content .so-content-tabs>*{display:none}.block-editor .so-title-bar,.so-panels-dialog .so-title-bar{left:30px;right:30px;top:30px;height:50px;background-color:#fafafa;border-bottom:1px solid #d8d8d8;padding:0}.block-editor .so-title-bar h3.so-title,.so-panels-dialog .so-title-bar h3.so-title{-ms-box-sizing:border-box;box-sizing:border-box;margin:0 150px 0 -3px;padding:15px;display:inline-block}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.block-editor .so-title-bar h3.so-title.so-title-editable:hover,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:hover{outline:none;background-color:#f0f0f0}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus{border:1px solid #e4e4e4}.block-editor .so-title-bar input[type=text].so-edit-title,.so-panels-dialog .so-title-bar input[type=text].so-edit-title{margin-top:-3px;margin-left:-3px;display:none;color:#23282d;font-size:1.3em;font-weight:600;border:none;box-shadow:none;background-color:#f0f0f0;padding:4px 5px}.block-editor .so-title-bar h3.so-parent-link,.so-panels-dialog .so-title-bar h3.so-parent-link{cursor:pointer;position:relative;float:left;margin:0 15px 0 0;padding:15px 27px 15px 3px}.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{position:absolute;top:0;right:0;width:12px;height:50px;display:block;background:url(images/dialog-separator.png) no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{background:url(images/dialog-separator@2x.png) no-repeat;background-size:cover}}.block-editor .so-title-bar a,.so-panels-dialog .so-title-bar a{cursor:pointer;position:relative;box-sizing:border-box;width:50px;height:50px;display:inline-block;transition:all .2s ease 0s;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a:hover,.so-panels-dialog .so-title-bar a:hover{background:#e9e9e9}.block-editor .so-title-bar a:hover .so-dialog-icon,.so-panels-dialog .so-title-bar a:hover .so-dialog-icon{color:#333}.block-editor .so-title-bar a .so-dialog-icon,.so-panels-dialog .so-title-bar a .so-dialog-icon{position:absolute;top:50%;left:50%;text-decoration:none;width:20px;height:20px;margin-left:-10px;margin-top:-10px;color:#666;text-align:center}.block-editor .so-title-bar a .so-dialog-icon:before,.so-panels-dialog .so-title-bar a .so-dialog-icon:before{font:400 20px/1em dashicons;top:7px;left:13px}.block-editor .so-title-bar a.so-close,.so-panels-dialog .so-title-bar a.so-close{right:0}.block-editor .so-title-bar a.so-close .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-close .so-dialog-icon:before{content:"\f335"}.block-editor .so-title-bar a.so-show-left-sidebar,.so-panels-dialog .so-title-bar a.so-show-left-sidebar{float:left;display:inline;padding:16px 25px;border-right:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before{content:"\f333"}.block-editor .so-title-bar a.so-show-right-sidebar,.so-panels-dialog .so-title-bar a.so-show-right-sidebar{display:inline-block}.block-editor .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before{content:"\f100"}.block-editor .so-title-bar a.so-next .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-next .so-dialog-icon:before{content:"\f345"}.block-editor .so-title-bar a.so-previous .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-previous .so-dialog-icon:before{content:"\f341"}.block-editor .so-title-bar a.so-nav.so-disabled,.so-panels-dialog .so-title-bar a.so-nav.so-disabled{cursor:default;pointer-events:none}.block-editor .so-title-bar a.so-nav.so-disabled .so-dialog-icon,.so-panels-dialog .so-title-bar a.so-nav.so-disabled .so-dialog-icon{color:#ddd}.block-editor .so-title-bar .so-title-bar-buttons,.so-panels-dialog .so-title-bar .so-title-bar-buttons{position:absolute;right:0;top:0}.block-editor .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon{left:70px}.block-editor .so-title-bar.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-icon .so-panels-icon{float:left;padding:14px;font-size:22px;line-height:22px;display:inline-block;width:22px;height:22px;text-align:center;color:#666}.block-editor .so-toolbar,.so-panels-dialog .so-toolbar{left:30px;right:30px;bottom:30px;height:58px;background-color:#fafafa;border-top:1px solid #d8d8d8;z-index:100002}.block-editor .so-toolbar .so-status,.so-panels-dialog .so-toolbar .so-status{float:left;padding-top:6px;padding-bottom:6px;font-style:italic;color:#999;line-height:1em}.block-editor .so-toolbar .so-status.so-panels-loading,.so-panels-dialog .so-toolbar .so-status.so-panels-loading{padding-left:26px;background-position:0}.block-editor .so-toolbar .so-status .dashicons-warning,.so-panels-dialog .so-toolbar .so-status .dashicons-warning{color:#a00;vertical-align:middle;margin-right:7px;margin-top:-1px}.block-editor .so-toolbar .so-buttons,.so-panels-dialog .so-toolbar .so-buttons{float:right}.block-editor .so-toolbar .so-buttons .action-buttons,.so-panels-dialog .so-toolbar .so-buttons .action-buttons{position:absolute;left:15px;top:50%;margin-top:-.65em}.block-editor .so-toolbar .so-buttons .action-buttons a,.so-panels-dialog .so-toolbar .so-buttons .action-buttons a{cursor:pointer;display:inline;padding:.2em .5em;line-height:1em;margin-right:.5em;text-decoration:none}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete{color:#a00}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover{background:#a00;color:#fff}.block-editor .so-toolbar .so-buttons .action-buttons .so-duplicate:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover{text-decoration:underline}.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{background-color:#f3f3f3}.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{display:none;top:30px;left:30px;bottom:30px;width:290px;border-right:1px solid #d8d8d8}@media only screen and (max-width:980px){.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{top:80px;z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-left-sidebar h4,.so-panels-dialog .so-left-sidebar h4{margin:0 0 20px;font-size:18px}.block-editor .so-left-sidebar .so-sidebar-search,.so-panels-dialog .so-left-sidebar .so-sidebar-search{width:100%;padding:6px;margin-bottom:20px}.block-editor .so-left-sidebar .so-sidebar-tabs,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs{list-style:none;margin:0 -15px}.block-editor .so-left-sidebar .so-sidebar-tabs li,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li{margin-bottom:0}.block-editor .so-left-sidebar .so-sidebar-tabs li a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a{padding:7px 16px;display:block;font-size:14px;text-decoration:none;box-shadow:none!important}.block-editor .so-left-sidebar .so-sidebar-tabs li a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a:hover{background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a{color:#555;font-weight:700;background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover{background:#fff}.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{display:none;top:80px;right:30px;bottom:88px;width:290px;border-left:1px solid #d8d8d8}.block-editor .so-right-sidebar h3,.so-panels-dialog .so-right-sidebar h3{color:#333}.block-editor .so-right-sidebar h3:first-child,.so-panels-dialog .so-right-sidebar h3:first-child{margin-top:0}@media only screen and (max-width:980px){.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-sidebar .form-field,.so-panels-dialog .so-sidebar .form-field{margin-bottom:20px}.block-editor .so-sidebar .form-field label,.so-panels-dialog .so-sidebar .form-field label{font-weight:500;font-size:15px;display:block;margin-bottom:10px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.block-editor.so-panels-dialog-has-left-sidebar .so-title-bar,.block-editor.so-panels-dialog-has-left-sidebar .so-toolbar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-title-bar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-toolbar{left:320px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content{box-shadow:inset 2px 2px 2px rgba(0,0,0,.03)}.block-editor.so-panels-dialog-has-left-sidebar .so-left-sidebar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-left-sidebar{display:block}.block-editor.so-panels-dialog-has-right-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-content{right:320px}.block-editor.so-panels-dialog-has-right-sidebar .so-right-sidebar,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-right-sidebar{display:block}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget{border-radius:2px;border:1px solid #ccc;cursor:pointer;padding:10px;background:#f9f9f9;box-shadow:0 1px 2px rgba(0,0,0,.075),inset 0 1px 0 #fff;margin-bottom:15px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover{border:1px solid #bbb;background:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current{border-color:#0074a2;background:#2ea2cc;cursor:auto;box-shadow:0 1px 2px rgba(0,0,0,.15),inset 0 1px 0 hsla(0,0%,100%,.2)}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3{color:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small{color:#eee}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover{border-color:#0074a2;background:#2ea2cc}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child{margin-bottom:0}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3{margin:0 0 7px;padding:0;height:1.2em;color:#222;font-size:14px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small{font-size:11px;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list{zoom:1;margin:0 -5px -10px;min-height:10px}.block-editor.so-panels-dialog-add-widget .widget-type-list:before,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:before{content:"";display:block}.block-editor.so-panels-dialog-add-widget .widget-type-list:after,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;-ms-box-sizing:border-box;box-sizing:border-box;width:25%;padding:0 5px;margin-bottom:10px;float:left}@media (max-width:1280px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:33.333%}}@media (max-width:960px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:50%}}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type h3,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type h3{margin:0 0 7px;padding:0;color:#222;font-size:14px}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type small,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type small{font-size:11px;min-height:2.5em;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon{font-size:20px;width:20px;height:20px;color:#666;float:left;margin:-1px .5em 0 0}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper{border:1px solid #ccc;cursor:pointer;padding:10px;background:#f8f8f8;box-shadow:0 1px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover{border:1px solid #bbb;background:#fff;box-shadow:0 2px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form{zoom:1;padding:8px;border:1px solid #ccc;margin-bottom:20px;background:#f3f3f3}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:before,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:before{content:"";display:block}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form input,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form select,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form span,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form strong,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form select,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form span,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form strong{display:inline;margin:1px 5px;width:auto;outline:none;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button{margin-top:2px}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form label,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form label{display:inline}.block-editor.so-panels-dialog-row-edit .so-content .row-preview,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview{margin:0 -6px;height:360px;position:relative;white-space:nowrap}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight{-ms-box-sizing:border-box;box-sizing:border-box}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell{display:inline-block;position:relative;padding:0 6px;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in{border:1px solid #bcccd2;min-height:360px;background:#e4eff4;position:relative}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected{background:#cae7f4 url(images/cell-selected.png) repeat;border-color:#9abcc7;box-shadow:0 0 5px rgba(0,0,0,.2)}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{position:absolute;font-size:17px;font-weight:700;top:50%;left:50%;width:80px;text-align:center;color:#5e6d72;margin:-.95em 0 0 -40px;padding:10px 0;border:1px solid transparent;line-height:1.4em!important;overflow:hidden;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after{content:"%"}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover{background:#f6f6f6;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{background:#f6f6f6;border:1px solid #d0d0d0;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle{z-index:100;position:absolute;top:0;width:12px;left:-6px;cursor:col-resize;background:#e5f4fb;height:360px;transition:background .15s ease-in-out 0s}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover{background:#b7e0f1}.block-editor.so-panels-dialog-history .so-left-sidebar,.so-panels-dialog.so-panels-dialog-history .so-left-sidebar{padding:0}.block-editor.so-panels-dialog-history .history-entries .history-entry,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry{padding:10px;background:#f8f8f8;cursor:pointer;border-bottom:1px solid #ccc}.block-editor.so-panels-dialog-history .history-entries .history-entry h3,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry h3{margin:0 0 .6em;font-size:12px;font-weight:700;color:#444;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry .timesince,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .timesince{color:#999;font-size:11px;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry:hover,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry:hover{background:#f0f0f0}.block-editor.so-panels-dialog-history .history-entries .history-entry.so-selected,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry.so-selected{background:#eee}.block-editor.so-panels-dialog-history .history-entries .history-entry .count,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .count{color:#999}.block-editor.so-panels-dialog-history .so-content,.so-panels-dialog.so-panels-dialog-history .so-content{padding:0;overflow-y:hidden}.block-editor.so-panels-dialog-history .so-content form.history-form,.so-panels-dialog.so-panels-dialog-history .so-content form.history-form{display:none}.block-editor.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe,.so-panels-dialog.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe{width:100%;height:100%}.block-editor.so-panels-dialog-prebuilt-layouts .so-content,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content{padding-left:10px;padding-right:10px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-error-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-error-message{font-size:14px;border:1px solid #ccc;background:#f8f8f8;padding:15px 20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui{padding:5px 15px;text-align:right}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui{padding:15px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message{display:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message{display:block}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message{font-size:1em;margin-bottom:0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area{display:block;-ms-box-sizing:border-box;box-sizing:border-box;padding:50px 30px;border:4px dashed #e0e0e0;text-align:center;transition:all .25s ease 0s}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover{background-color:#f2f9fc;border-color:#0074a2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar{display:none;padding:2px;border:2px solid #2181b1;border-radius:2px;margin-top:20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent{height:14px;background-color:#358ebe;border-radius:1px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button{padding:12px 30px;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse{background:#f3f3f3;border-bottom:1px solid #d0d0d0;margin:-15px -10px 15px;padding:15px;font-weight:700}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper{display:flex;flex-flow:row wrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results{margin:20px 0;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{-ms-box-sizing:border-box;box-sizing:border-box;padding:6px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper{display:flex;flex-flow:column nowrap;height:100%;box-sizing:border-box;padding:15px 10px;background:#f7f7f7;border:1px solid #d0d0d0;box-shadow:0 1px 1px rgba(0,0,0,.1)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title{font-size:15px;margin:0 0 13px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot{flex:3 auto;margin-bottom:10px;cursor:pointer}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img{display:block;width:100%;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper{display:block;min-height:40px;background:gray;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description{flex:1 auto;font-size:.9em;color:#666;margin-bottom:10px;max-height:60px;overflow:hidden}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom{flex:1 auto;position:relative;max-height:50px;margin:10px -10px -15px;background:#fcfcfc;border-top:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title{margin:0;padding:16px 10px;cursor:pointer;overflow:hidden;white-space:nowrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons{position:absolute;z-index:2;top:0;bottom:0;right:0;height:100%;visibility:hidden;-ms-box-sizing:border-box;box-sizing:border-box;padding:11px 10px 10px 15px;border-left:1px solid #d0d0d0;background:#f6f6f6;box-shadow:-1px 0 1px rgba(0,0,0,.05)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons{visibility:visible}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected{background-color:#e5f4fa}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper{background:#deeef4;border-color:#9abcc7}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom{background:#f8fdff;border-color:#bcccd2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title{color:#3e484c}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons{background:#eaf2f6;border-color:#bcccd2}@media only screen and (min-width:1680px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:20%}}@media only screen and (max-width:1679px) and (min-width:1280px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:25%}}@media only screen and (max-width:1279px) and (min-width:1140px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:33.333%}}@media only screen and (max-width:1139px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:50%}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages{margin-top:15px;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled{pointer-events:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position{vertical-align:baseline}.block-editor .so-visual-styles,.so-panels-dialog .so-visual-styles{margin:-15px;height:auto}.block-editor .so-visual-styles h3,.so-panels-dialog .so-visual-styles h3{line-height:1em;margin:0;padding:20px 15px;border-bottom:1px solid #ddd}.block-editor .so-visual-styles .style-section-head,.so-panels-dialog .so-visual-styles .style-section-head{background:#fff;padding:15px 10px;border-bottom:1px solid #ddd;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-section-head h4,.so-panels-dialog .so-visual-styles .style-section-head h4{margin:0}.block-editor .so-visual-styles .style-section-fields,.so-panels-dialog .so-visual-styles .style-section-fields{padding:15px;border-bottom:1px solid #ddd;background:#f7f7f7}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper{margin-bottom:20px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper:last-child,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper:last-child{margin-bottom:0}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper>label,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper>label{font-weight:700;display:block;margin-bottom:3px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field{zoom:1}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before{content:"";display:block}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field input,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field input{font-size:12px}.block-editor .so-visual-styles .style-input-wrapper,.so-panels-dialog .so-visual-styles .style-input-wrapper{zoom:1}.block-editor .so-visual-styles .style-input-wrapper:before,.so-panels-dialog .so-visual-styles .style-input-wrapper:before{content:"";display:block}.block-editor .so-visual-styles .style-input-wrapper:after,.so-panels-dialog .so-visual-styles .style-input-wrapper:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-input-wrapper input,.so-panels-dialog .so-visual-styles .style-input-wrapper input{max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-inputs,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-inputs{overflow:auto;margin:0 -3px 4px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper{box-sizing:border-box;float:left;width:25%;padding:0 3px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value{border-width:1px;display:block;max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top{box-shadow:inset 0 2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right{box-shadow:inset -3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom{box-shadow:inset 0 -2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left{box-shadow:inset 3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-multiple,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-multiple{width:100%;display:block}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-single{float:right;width:25%}.block-editor .so-visual-styles .style-field-measurement .measurement-value-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-value-single{float:left;width:72%}.block-editor .so-visual-styles .style-field-image .so-image-selector,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector{display:inline-block;background-color:#f7f7f7;border:1px solid #ccc;height:28px;float:left;border-radius:3px;cursor:pointer;box-shadow:inset 0 1px #fff}.block-editor .so-visual-styles .style-field-image .so-image-selector .current-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .current-image{height:28px;width:28px;float:left;background:#fff;border-right:1px solid #ccc;background-size:cover;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px;background-clip:padding-box}.block-editor .so-visual-styles .style-field-image .so-image-selector .select-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .select-image{font-size:12px;line-height:28px;float:left;padding:0 8px;color:#555}.block-editor .so-visual-styles .style-field-image .remove-image,.so-panels-dialog .so-visual-styles .style-field-image .remove-image{font-size:12px;margin-top:4px;margin-left:15px;display:inline-block;float:left;color:#666;text-decoration:none}.block-editor .so-visual-styles .style-field-image .remove-image.hidden,.so-panels-dialog .so-visual-styles .style-field-image .remove-image.hidden{display:none}.block-editor .so-visual-styles .style-field-image .image-fallback,.so-panels-dialog .so-visual-styles .style-field-image .image-fallback{margin-top:4px}.block-editor .so-visual-styles .style-field-checkbox label,.so-panels-dialog .so-visual-styles .style-field-checkbox label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-field-radio label,.so-panels-dialog .so-visual-styles .style-field-radio label{display:block}.block-editor .so-visual-styles .so-field-code,.so-panels-dialog .so-visual-styles .so-field-code{font-size:12px;font-family:Courier\ 10 Pitch,Courier,monospace}.block-editor .so-visual-styles .so-description,.so-panels-dialog .so-visual-styles .so-description{color:#999;font-size:12px;margin-top:5px;margin-bottom:0;font-style:italic;clear:both}.block-editor .so-visual-styles.so-cell-styles,.so-panels-dialog .so-visual-styles.so-cell-styles{margin-top:15px}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.block-editor .so-content .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .so-content .siteorigin-panels-builder .so-builder-toolbar{border:1px solid #dedede;z-index:1}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.block-editor .so-content .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .so-content .siteorigin-panels-builder .so-rows-container{padding:20px 0 0}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.block-editor .so-content .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .so-content .siteorigin-panels-builder .so-panels-welcome-message{padding-left:0;padding-right:0;line-height:2.5em}.block-editor .siteorigin-panels-layout-block-container,.so-panels-dialog .siteorigin-panels-layout-block-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4em}.block-editor .siteorigin-panels-layout-block-container ul,.so-panels-dialog .siteorigin-panels-layout-block-container ul{list-style:none}.block-editor .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-block-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.block-editor .siteorigin-panels-block-icon.white,.so-panels-dialog .siteorigin-panels-block-icon.white{background-image:url(images/pb-icon_white.svg)}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container{text-align:center}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container>span,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container>span{display:inline-block}.block-editor .siteorigin-panels-add-layout-block,.so-panels-dialog .siteorigin-panels-add-layout-block{text-align:center;margin-left:auto;margin-right:auto}.block-editor .siteorigin-panels-add-layout-block>button,.so-panels-dialog .siteorigin-panels-add-layout-block>button{height:100%;padding:5px 10px;font-size:16px}.block-editor .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon{margin:3px 10px 0 0}.block-editor .so-dropdown-wrapper input[type=button].button-primary,.so-panels-dialog .so-dropdown-wrapper input[type=button].button-primary{width:125px;height:28px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper{display:block;z-index:11;bottom:28px;width:125px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden{display:none}.wp-customizer .so-panels-dialog .so-content,.wp-customizer .so-panels-dialog .so-overlay,.wp-customizer .so-panels-dialog .so-title-bar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500001}.wp-customizer .so-panels-dialog .so-left-sidebar,.wp-customizer .so-panels-dialog .so-right-sidebar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500002}.so-panels-live-editor>div{position:fixed;z-index:99999;-ms-box-sizing:border-box;box-sizing:border-box}.so-panels-live-editor .live-editor-form{display:none}.so-panels-live-editor .live-editor-collapse{position:fixed;top:18px;left:10px;line-height:1em;cursor:pointer;z-index:100000}.so-panels-live-editor .live-editor-collapse .collapse-icon{float:left;margin:-4px 6px 0 0;border-radius:50%;width:20px;height:20px;overflow:hidden;transition:all .25s ease 0s}.so-panels-live-editor .live-editor-collapse .collapse-icon:before{display:block;content:"\f148";background:#eee;font:normal 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased}.so-panels-live-editor .live-editor-collapse:hover{color:#0073aa}.so-panels-live-editor .live-editor-collapse:hover .collapse-icon{box-shadow:0 0 3px rgba(30,140,190,.8)}.so-panels-live-editor .so-sidebar-tools{background:#eee;border-bottom:1px solid #ddd;border-right:1px solid #d0d0d0;top:0;left:0;height:46px;width:360px}.so-panels-live-editor .so-sidebar-tools .live-editor-close{margin:9px 10px 0 15px;float:right}.so-panels-live-editor .so-sidebar-tools .live-editor-mode{float:right;margin:9px 4px 0 0}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons{font-size:30px;width:30px;height:30px;cursor:pointer;color:#999}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons:hover{color:#666}.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons,.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons:hover{color:#0073aa}.so-panels-live-editor .so-sidebar{top:46px;left:0;bottom:0;width:360px;overflow-y:auto;background:#f7f7f7;border-right:1px solid #d0d0d0}.so-panels-live-editor .so-sidebar .siteorigin-panels-builder .so-rows-container{padding:10px 10px 0!important}.so-panels-live-editor .so-preview{top:0;right:0;bottom:0;left:360px;background-color:#191e23}.so-panels-live-editor .so-preview form{display:none}.so-panels-live-editor .so-preview iframe{float:left;width:100%;height:100%;margin:0 auto}.so-panels-live-editor .so-preview-overlay{display:none;opacity:.975;top:0;right:0;bottom:0;left:360px;background-color:#f4f4f4;cursor:wait}.so-panels-live-editor .so-preview-overlay .so-loading-container{opacity:.6;position:absolute;top:50%;width:200px;padding:2px;border-radius:5px;left:50%;margin-left:-104px;margin-top:-9px;border:2px solid #aaa}.so-panels-live-editor .so-preview-overlay .so-loading-container .so-loading-bar{width:50%;border-radius:3px;height:10px;background:#aaa}.so-panels-live-editor.so-collapsed .live-editor-collapse .collapse-icon{transform:rotate(180deg)}.so-panels-live-editor.so-collapsed .so-sidebar,.so-panels-live-editor.so-collapsed .so-sidebar-tools{display:none}.so-panels-live-editor.so-collapsed .so-preview,.so-panels-live-editor.so-collapsed .so-preview-overlay{left:0}.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{max-width:480px;max-height:640px;position:absolute;top:50%;left:50%;margin-left:-240px;margin-top:-320px}@media (max-width:840px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}@media (max-height:640px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:absolute;max-width:768px;top:0;left:50%;margin-left:-384px}@media (max-width:1128px){.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-panels-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#panels-home-page .switch{margin:0 10px 0 0;float:left;position:relative;display:inline-block;vertical-align:top;width:68px;height:24px;padding:3px;background-color:#fff;border-radius:24px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px rgba(0,0,0,.05);cursor:pointer;background-image:linear-gradient(180deg,#eee,#fff 25px)}#panels-home-page .switch .switch-input{position:absolute;top:0;left:0;opacity:0}#panels-home-page .switch .switch-label{position:relative;display:block;height:inherit;font-size:12px;text-transform:uppercase;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px rgba(0,0,0,.12),inset 0 0 2px rgba(0,0,0,.15);transition:.15s ease-out;transition-property:opacity background}#panels-home-page .switch .switch-label:after,#panels-home-page .switch .switch-label:before{position:absolute;top:50%;margin-top:-.5em;line-height:1;transition:inherit}#panels-home-page .switch .switch-label:before{content:attr(data-off);right:11px;color:#aaa;text-shadow:0 1px hsla(0,0%,100%,.5)}#panels-home-page .switch .switch-label:after{content:attr(data-on);left:13px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label{background:#47a8d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}#panels-home-page .switch .switch-input:checked~.switch-label:before{opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label:after{opacity:1}#panels-home-page .switch .switch-handle{position:absolute;top:4px;left:4px;width:22px;height:22px;background:#fff;border-radius:12px;box-shadow:1px 1px 5px rgba(0,0,0,.2);background-image:linear-gradient(180deg,#fff 40%,#f0f0f0);transition:left .15s ease-out}#panels-home-page .switch .switch-handle:before{content:"";position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px;width:14px;height:14px;background:#f9f9f9;border-radius:7px;box-shadow:inset 0 1px rgba(0,0,0,.02);background-image:linear-gradient(180deg,#eee,#fff)}#panels-home-page .switch .switch-input:checked~.switch-handle{left:48px;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}#panels-home-page .switch .switch-green>.switch-input:checked~.switch-label{background:#4fb845}#panels-home-page #panels-view-as-page{display:inline-block;margin-left:50px}.siteorigin-panels-builder-form .siteorigin-panels-builder{border:1px solid #d0d0d0;background-color:#fff;margin:10px 0}.siteorigin-panels-builder-form .siteorigin-panels-builder.so-panels-loading{min-height:150px}.siteorigin-page-builder-widget .siteorigin-panels-display-builder{display:inline-block!important}.siteorigin-page-builder-widget .siteorigin-panels-no-builder{display:none!important}.so-panels-contextual-menu{border:1px solid silver;background:#f9f9f9;box-shadow:0 1px 1px rgba(0,0,0,.04);outline:none;border-radius:2px;position:absolute;width:180px;top:20px;left:20px;z-index:999999;display:none;overflow-y:auto}.so-panels-contextual-menu,.so-panels-contextual-menu *{font-size:12px}.so-panels-contextual-menu .so-section{border-bottom:1px solid silver}.so-panels-contextual-menu .so-section:last-child{border-bottom:none}.so-panels-contextual-menu .so-section h5{margin:0 0 5px;padding:8px 10px 5px;border-bottom:1px solid #d0d0d0;background:#f6f6f6}.so-panels-contextual-menu .so-section .so-search-wrapper{margin:-5px 0 5px;border-bottom:1px solid #d0d0d0;background:#f4f4f4}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]{box-sizing:border-box;display:block;width:100%;margin:0;border:none;padding:5px 10px;background:#fbfbfb}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:active,.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:focus{border:none;box-shadow:none;background:#fff}.so-panels-contextual-menu .so-section ul{margin:5px 0 0;padding:0 0 5px}.so-panels-contextual-menu .so-section ul li{cursor:pointer;margin:0;padding:4px 10px;line-height:1em}.so-panels-contextual-menu .so-section ul li.so-active,.so-panels-contextual-menu .so-section ul li:hover{background:#f0f0f0;color:#444}.so-panels-contextual-menu .so-section ul li.so-confirm{color:#a00}.so-panels-contextual-menu .so-section ul li.so-confirm.so-active,.so-panels-contextual-menu .so-section ul li.so-confirm:hover{background:#a00;color:#fff}.so-panels-contextual-menu .so-section ul li .dashicons{width:12px;height:12px;font-size:12px;margin:0;float:right;line-height:12px}.so-panels-contextual-menu .so-section .so-no-results{padding:0 10px 5px;display:none;font-style:italic}.so-dropdown-wrapper{position:relative;float:right}.so-dropdown-wrapper .so-dropdown-links-wrapper{position:absolute;padding:6px 0 0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul{margin:0;border:1px solid silver;background:#f9f9f9;border-radius:2px;padding:4px 0;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li{margin:0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li:first-child{border-top-width:1px}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a{display:block;padding:2px 8px;text-decoration:none;color:#666;font-size:11px;cursor:pointer;outline:0!important;box-shadow:none}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a:hover{background:#f0f0f0;color:#444}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a .dashicons{font-size:16px;margin:0;float:right;line-height:16px}.so-dropdown-wrapper .so-dropdown-links-wrapper .so-pointer{width:12px;height:6px;position:absolute;z-index:12;background:url(images/dropdown-pointer.png);background-size:12px 6px;top:1px;right:18px}.so-panels-icon{font-family:siteorigin-panels-icons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.so-panels-icon.so-panels-icon-add-row:before{content:"\e900"}.so-panels-icon.so-panels-icon-add-widget:before{content:"\e901"}.so-panels-icon.so-panels-icon-addons:before{content:"\e902"}.so-panels-icon.so-panels-icon-history:before{content:"\e903"}.so-panels-icon.so-panels-icon-layouts:before{content:"\e904"}.so-panels-icon.so-panels-icon-learn:before{content:"\e905"}.so-panels-icon.so-panels-icon-live-editor:before{content:"\e906"}.so-panels-icon.so-panels-icon-move:before{content:"\e907"}.so-panels-icon.so-panels-icon-settings:before{content:"\e908"}#post-status-info.for-siteorigin-panels{margin-top:-21px!important}.siteorigin-page-builder-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.siteorigin-page-builder-icon.white{background-image:url(images/pb-icon_white.svg)}
1
+ @font-face{font-family:siteorigin-panels-icons;src:url(icons/panels-icons.eot);src:url(icons/panels-icons.eot) format("embedded-opentype"),url(icons/panels-icons.woff) format("woff"),url(icons/panels-icons.ttf) format("truetype"),url(icons/panels-icons.svg) format("svg");font-weight:400;font-style:normal}#so-panels-panels.attached-to-editor{margin-top:20px}#so-panels-panels.attached-to-editor .handlediv,#so-panels-panels.attached-to-editor .hndle{display:none!important}#so-panels-panels.attached-to-editor .inside{margin:0!important;padding:0!important}#so-panels-panels.attached-to-editor .so-toolbar .so-switch-to-standard{display:block}.siteorigin-panels-builder{position:relative}.siteorigin-panels-builder .so-tool-button{padding:6px 7px;text-decoration:none;line-height:1em;float:left;margin-right:2px;display:block;visibility:visible;position:relative;cursor:pointer;border:1px solid #bebebe;background:#eee;background:-o-linear-gradient(#f9f9f9,#eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#f9f9f9",endColorstr="#eeeeee",GradientType=0);box-shadow:0 1px 1px rgba(0,0,0,.04),inset 0 1px 0 hsla(0,0%,100%,.5);outline:none;border-radius:2px}.siteorigin-panels-builder .so-tool-button .so-panels-icon{font-size:12px}.siteorigin-panels-builder .so-tool-button span{display:inline-block;color:#666;text-shadow:0 1px 0 #fff;min-width:10px;text-align:center}.siteorigin-panels-builder .so-tool-button:hover{background:#fff}.siteorigin-panels-builder .so-tool-button:hover span{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-tool-button.so-row-settings{margin-right:8px}}.siteorigin-panels-builder .so-builder-toolbar{-ms-box-sizing:border-box;box-sizing:border-box;border-bottom:1px solid #d0d0d0;background:#f5f5f5;line-height:1em;z-index:101;white-space:nowrap;overflow-x:hidden;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.04);top:0;left:0;width:100%;padding:6px 9px;margin-top:0!important;zoom:1}.siteorigin-panels-builder .so-builder-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-builder-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{display:inline-block;color:#666;padding:2px 10px 2px 8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:3px 0 2px;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{float:left;margin:3px 7px 2px 0;font-size:14px;color:#747474}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover,.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover .so-panels-icon{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{margin-right:8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:7px 0 2px 5px;font-size:14px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{margin:3px 0;font-size:21px}}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard{cursor:pointer;float:right;display:none;text-decoration:none;color:#666;padding:5px 6px;border-radius:2px;border:1px solid transparent;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard:hover{background:#fafafa;border:1px solid #999;color:#444}.siteorigin-panels-builder .so-rows-container{padding:20px 15px 0}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color{background-color:#cde2ec;border:1px solid #a4cadd}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color.so-row-color-selected:before{background:#a8cdde}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .cell-wrapper{background-color:#cde2ec}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99c4d8}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle{background-color:#e7f1f6}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle:hover{background-color:#dcebf2}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color{background-color:#f2c2be;border:1px solid #e9968f}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color.so-row-color-selected:before{background:#ea9a93}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .cell-wrapper{background-color:#f2c2be}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell.cell-selected .cell-wrapper{background-color:#e68a83}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle{background-color:#f8dedc}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle:hover{background-color:#f5d2cf}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color{background-color:#d5ccdf;border:1px solid #b9aac9}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color.so-row-color-selected:before{background:#bbadcb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .cell-wrapper{background-color:#d5ccdf}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell.cell-selected .cell-wrapper{background-color:#b1a0c3}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle{background-color:#e7e2ed}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle:hover{background-color:#dfd9e7}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color{background-color:#cae7cd;border:1px solid #a3d6a9}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color.so-row-color-selected:before{background:#a7d7ac}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .cell-wrapper{background-color:#cae7cd}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99d19f}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle{background-color:#e3f2e4}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle:hover{background-color:#d8edda}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color{background-color:#e2dcb1;border:1px solid #d3ca88}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color.so-row-color-selected:before{background:#d4cb8c}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .cell-wrapper{background-color:#e2dcb1}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell.cell-selected .cell-wrapper{background-color:#cfc57d}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle{background-color:#ece8cb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle:hover{background-color:#e8e3c0}.siteorigin-panels-builder .so-rows-container h3.so-row-label{display:inline-block;font-size:1em;font-weight:500;color:#474747;margin:0 0 0 4px;line-height:22px;float:left}.siteorigin-panels-builder .so-rows-container .so-row-toolbar{zoom:1;margin-bottom:4px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button{-ms-box-sizing:border-box;box-sizing:border-box;padding:4px;float:right}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{color:#777;font-size:11px;width:11px;height:11px;display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button:hover .so-panels-icon{color:#555}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button.so-row-move{cursor:move}@media (max-width:782px){.siteorigin-panels-builder .so-rows-container .so-row-toolbar{margin-bottom:8px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{font-size:21px;width:21px;height:21px}}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper{visibility:hidden;opacity:0;transition:visibility 0s linear 75ms,opacity 75ms linear;z-index:101;right:-10px;top:100%;width:125px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete{color:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete:hover{color:#fff;background:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container{display:flex;justify-content:space-around;padding:5px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color{display:inline-block;cursor:pointer;position:relative;text-align:center;width:14px;height:14px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color.so-row-color-selected:before{content:"";display:block;position:absolute;top:2px;bottom:2px;left:2px;right:2px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper:hover .so-dropdown-links-wrapper{visibility:visible;opacity:1;transition-delay:0s}.siteorigin-panels-builder .so-rows-container .ui-sortable-placeholder{visibility:visible!important;background:#f7f7f7;-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container{margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.siteorigin-panels-builder .so-rows-container .so-row-container.ui-sortable-helper{opacity:.9}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells{zoom:1;margin:0 -5px;position:relative;display:flex}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w{width:10px;left:-11px;cursor:col-resize;background:rgba(0,150,211,.25);transition:background .25s ease-in-out}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w:hover{background:rgba(0,150,211,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell{-ms-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 5px}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-first{margin-left:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-last{margin-right:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{background:#e4eff4;padding:7px 7px 0;height:100%;min-height:63px;transition:background .25s ease-in-out 0s}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.cell-selected .cell-wrapper{background-size:3px 3px}}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget{cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-move{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-edit h4{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover{background:#feffff}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover a{opacity:1}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a{display:none;margin-right:3px;text-decoration:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete{color:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete:hover{color:#fff;background:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover .title a{display:inline-block;opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.panel-being-dragged .title .actions{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget small{display:block;height:16px;overflow:hidden;color:#777}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only small{opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small{color:#eee}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight{border:1px solid rgba(0,0,0,.075);background:rgba(0,0,0,.025);-ms-box-sizing:border-box;box-sizing:border-box;height:49px;margin-bottom:7px;position:relative;box-shadow:inset 2px 2px 2px rgba(0,0,0,.01)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .resize-handle{z-index:100;position:absolute;top:0;width:10px;left:-5px;cursor:col-resize;background:#f6fafb;height:100%;transition:background .25s ease-in-out 0s}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell:first-child .resize-handle{display:none}.siteorigin-panels-builder .so-panels-welcome-message{text-align:center;padding:0 15px 20px;color:#555;line-height:1.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{padding:15px 10px;background:#f8f8f8;border:1px solid #e0e0e0}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{font-size:14px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{font-size:inherit;display:inline-block;float:none;color:#666;padding:5px 10px;margin:0 3px}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{padding:9px 10px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button .so-panels-icon{color:#777;font-size:.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-tip-wrapper{margin-top:15px;font-size:.95em}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar{padding:10px}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button .so-panels-icon{margin:3px 0}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button.so-learn,.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button span.so-button-text{display:none}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar .so-switch-to-standard{display:none!important}.so-widget.ui-sortable-helper.widget-being-dragged{z-index:500002!important;opacity:.9;pointer-events:none;border:1px solid rgba(0,0,0,.35)!important;cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-move{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.so-widget.ui-sortable-helper.widget-being-dragged h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.so-widget.ui-sortable-helper.widget-being-dragged h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-edit h4{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover{background:#feffff}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover a{opacity:1}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a{display:none;margin-right:3px;text-decoration:none}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete{color:red}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete:hover{color:#fff;background:red}.so-widget.ui-sortable-helper.widget-being-dragged:hover .title a{display:inline-block;opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.panel-being-dragged .title .actions{display:none}.so-widget.ui-sortable-helper.widget-being-dragged small{display:block;height:16px;overflow:hidden;color:#777}.so-widget.ui-sortable-helper.widget-being-dragged .form{display:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover small,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only small{opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small{color:#eee}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container{padding-top:0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-rows-container{padding:10px 0 0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-toolbar{padding-left:15px;padding-right:15px;margin:0 -15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-overlay,.block-editor .so-right-sidebar,.block-editor .so-title-bar,.block-editor .so-toolbar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-overlay,.so-panels-dialog .so-right-sidebar,.so-panels-dialog .so-title-bar,.so-panels-dialog .so-toolbar{z-index:100001;position:fixed;-ms-box-sizing:border-box;box-sizing:border-box;padding:15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{overflow-y:auto}.block-editor .so-overlay,.so-panels-dialog .so-overlay{top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.block-editor .so-content,.so-panels-dialog .so-content{top:80px;left:30px;right:30px;bottom:88px;background-color:#fdfdfd;overflow-x:hidden;box-shadow:inset 0 2px 2px rgba(0,0,0,.03)}.block-editor .so-content>:first-child,.so-panels-dialog .so-content>:first-child{margin-top:0}.block-editor .so-content>:last-child,.so-panels-dialog .so-content>:last-child{margin-bottom:0}.block-editor .so-content .so-content-tabs>*,.so-panels-dialog .so-content .so-content-tabs>*{display:none}.block-editor .so-title-bar,.so-panels-dialog .so-title-bar{left:30px;right:30px;top:30px;height:50px;background-color:#fafafa;border-bottom:1px solid #d8d8d8;padding:0}.block-editor .so-title-bar h3.so-title,.so-panels-dialog .so-title-bar h3.so-title{-ms-box-sizing:border-box;box-sizing:border-box;margin:0 150px 0 -3px;padding:15px;display:inline-block}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.block-editor .so-title-bar h3.so-title.so-title-editable:hover,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:hover{outline:none;background-color:#f0f0f0}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus{border:1px solid #e4e4e4}.block-editor .so-title-bar input[type=text].so-edit-title,.so-panels-dialog .so-title-bar input[type=text].so-edit-title{margin-top:-3px;margin-left:-3px;display:none;color:#23282d;font-size:1.3em;font-weight:600;border:none;box-shadow:none;background-color:#f0f0f0;padding:4px 5px}.block-editor .so-title-bar h3.so-parent-link,.so-panels-dialog .so-title-bar h3.so-parent-link{cursor:pointer;position:relative;float:left;margin:0 15px 0 0;padding:15px 27px 15px 3px}.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{position:absolute;top:0;right:0;width:12px;height:50px;display:block;background:url(images/dialog-separator.png) no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{background:url(images/dialog-separator@2x.png) no-repeat;background-size:cover}}.block-editor .so-title-bar a,.so-panels-dialog .so-title-bar a{cursor:pointer;position:relative;box-sizing:border-box;width:50px;height:50px;display:inline-block;transition:all .2s ease 0s;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a:hover,.so-panels-dialog .so-title-bar a:hover{background:#e9e9e9}.block-editor .so-title-bar a:hover .so-dialog-icon,.so-panels-dialog .so-title-bar a:hover .so-dialog-icon{color:#333}.block-editor .so-title-bar a .so-dialog-icon,.so-panels-dialog .so-title-bar a .so-dialog-icon{position:absolute;top:50%;left:50%;text-decoration:none;width:20px;height:20px;margin-left:-10px;margin-top:-10px;color:#666;text-align:center}.block-editor .so-title-bar a .so-dialog-icon:before,.so-panels-dialog .so-title-bar a .so-dialog-icon:before{font:400 20px/1em dashicons;top:7px;left:13px}.block-editor .so-title-bar a.so-close,.so-panels-dialog .so-title-bar a.so-close{right:0}.block-editor .so-title-bar a.so-close .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-close .so-dialog-icon:before{content:"\f335"}.block-editor .so-title-bar a.so-show-left-sidebar,.so-panels-dialog .so-title-bar a.so-show-left-sidebar{float:left;display:inline;padding:16px 25px;border-right:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before{content:"\f333"}.block-editor .so-title-bar a.so-show-right-sidebar,.so-panels-dialog .so-title-bar a.so-show-right-sidebar{display:inline-block}.block-editor .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before{content:"\f100"}.block-editor .so-title-bar a.so-next .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-next .so-dialog-icon:before{content:"\f345"}.block-editor .so-title-bar a.so-previous .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-previous .so-dialog-icon:before{content:"\f341"}.block-editor .so-title-bar a.so-nav.so-disabled,.so-panels-dialog .so-title-bar a.so-nav.so-disabled{cursor:default;pointer-events:none}.block-editor .so-title-bar a.so-nav.so-disabled .so-dialog-icon,.so-panels-dialog .so-title-bar a.so-nav.so-disabled .so-dialog-icon{color:#ddd}.block-editor .so-title-bar .so-title-bar-buttons,.so-panels-dialog .so-title-bar .so-title-bar-buttons{position:absolute;right:0;top:0}.block-editor .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon{left:70px}.block-editor .so-title-bar.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-icon .so-panels-icon{float:left;padding:14px;font-size:22px;line-height:22px;display:inline-block;width:22px;height:22px;text-align:center;color:#666}.block-editor .so-toolbar,.so-panels-dialog .so-toolbar{left:30px;right:30px;bottom:30px;height:58px;background-color:#fafafa;border-top:1px solid #d8d8d8;z-index:100002}.block-editor .so-toolbar .so-status,.so-panels-dialog .so-toolbar .so-status{float:left;padding-top:6px;padding-bottom:6px;font-style:italic;color:#999;line-height:1em}.block-editor .so-toolbar .so-status.so-panels-loading,.so-panels-dialog .so-toolbar .so-status.so-panels-loading{padding-left:26px;background-position:0}.block-editor .so-toolbar .so-status .dashicons-warning,.so-panels-dialog .so-toolbar .so-status .dashicons-warning{color:#a00;vertical-align:middle;margin-right:7px;margin-top:-1px}.block-editor .so-toolbar .so-buttons,.so-panels-dialog .so-toolbar .so-buttons{float:right}.block-editor .so-toolbar .so-buttons .action-buttons,.so-panels-dialog .so-toolbar .so-buttons .action-buttons{position:absolute;left:15px;top:50%;margin-top:-.65em}.block-editor .so-toolbar .so-buttons .action-buttons a,.so-panels-dialog .so-toolbar .so-buttons .action-buttons a{cursor:pointer;display:inline;padding:.2em .5em;line-height:1em;margin-right:.5em;text-decoration:none}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete{color:#a00}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover{background:#a00;color:#fff}.block-editor .so-toolbar .so-buttons .action-buttons .so-duplicate:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover{text-decoration:underline}.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{background-color:#f3f3f3}.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{display:none;top:30px;left:30px;bottom:30px;width:290px;border-right:1px solid #d8d8d8}@media only screen and (max-width:980px){.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{top:80px;z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-left-sidebar h4,.so-panels-dialog .so-left-sidebar h4{margin:0 0 20px;font-size:18px}.block-editor .so-left-sidebar .so-sidebar-search,.so-panels-dialog .so-left-sidebar .so-sidebar-search{width:100%;padding:6px;margin-bottom:20px}.block-editor .so-left-sidebar .so-sidebar-tabs,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs{list-style:none;margin:0 -15px}.block-editor .so-left-sidebar .so-sidebar-tabs li,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li{margin-bottom:0}.block-editor .so-left-sidebar .so-sidebar-tabs li a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a{padding:7px 16px;display:block;font-size:14px;text-decoration:none;box-shadow:none!important}.block-editor .so-left-sidebar .so-sidebar-tabs li a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a:hover{background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a{color:#555;font-weight:700;background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover{background:#fff}.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{display:none;top:80px;right:30px;bottom:88px;width:290px;border-left:1px solid #d8d8d8}.block-editor .so-right-sidebar h3,.so-panels-dialog .so-right-sidebar h3{color:#333}.block-editor .so-right-sidebar h3:first-child,.so-panels-dialog .so-right-sidebar h3:first-child{margin-top:0}@media only screen and (max-width:980px){.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-sidebar .form-field,.so-panels-dialog .so-sidebar .form-field{margin-bottom:20px}.block-editor .so-sidebar .form-field label,.so-panels-dialog .so-sidebar .form-field label{font-weight:500;font-size:15px;display:block;margin-bottom:10px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.block-editor.so-panels-dialog-has-left-sidebar .so-title-bar,.block-editor.so-panels-dialog-has-left-sidebar .so-toolbar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-title-bar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-toolbar{left:320px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content{box-shadow:inset 2px 2px 2px rgba(0,0,0,.03)}.block-editor.so-panels-dialog-has-left-sidebar .so-left-sidebar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-left-sidebar{display:block}.block-editor.so-panels-dialog-has-right-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-content{right:320px}.block-editor.so-panels-dialog-has-right-sidebar .so-right-sidebar,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-right-sidebar{display:block}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget{border-radius:2px;border:1px solid #ccc;cursor:pointer;padding:10px;background:#f9f9f9;box-shadow:0 1px 2px rgba(0,0,0,.075),inset 0 1px 0 #fff;margin-bottom:15px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover{border:1px solid #bbb;background:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current{border-color:#0074a2;background:#2ea2cc;cursor:auto;box-shadow:0 1px 2px rgba(0,0,0,.15),inset 0 1px 0 hsla(0,0%,100%,.2)}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3{color:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small{color:#eee}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover{border-color:#0074a2;background:#2ea2cc}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child{margin-bottom:0}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3{margin:0 0 7px;padding:0;height:1.2em;color:#222;font-size:14px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small{font-size:11px;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list{zoom:1;margin:0 -5px -10px;min-height:10px}.block-editor.so-panels-dialog-add-widget .widget-type-list:before,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:before{content:"";display:block}.block-editor.so-panels-dialog-add-widget .widget-type-list:after,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;-ms-box-sizing:border-box;box-sizing:border-box;width:25%;padding:0 5px;margin-bottom:10px;float:left}@media (max-width:1280px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:33.333%}}@media (max-width:960px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:50%}}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type h3,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type h3{margin:0 0 7px;padding:0;color:#222;font-size:14px}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type small,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type small{font-size:11px;min-height:2.5em;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon{font-size:20px;width:20px;height:20px;color:#666;float:left;margin:-1px .5em 0 0}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper{border:1px solid #ccc;cursor:pointer;padding:10px;background:#f8f8f8;box-shadow:0 1px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover{border:1px solid #bbb;background:#fff;box-shadow:0 2px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form{zoom:1;padding:8px;border:1px solid #ccc;margin-bottom:20px;background:#f3f3f3}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:before,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:before{content:"";display:block}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form input,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form select,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form span,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form strong,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form select,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form span,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form strong{display:inline;margin:1px 5px;width:auto;outline:none;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button{margin-top:2px}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form label,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form label{display:inline}.block-editor.so-panels-dialog-row-edit .so-content .row-preview,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview{margin:0 -6px;height:360px;position:relative;white-space:nowrap}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight{-ms-box-sizing:border-box;box-sizing:border-box}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell{display:inline-block;position:relative;padding:0 6px;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in{border:1px solid #bcccd2;min-height:360px;background:#e4eff4;position:relative}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected{background:#cae7f4 url(images/cell-selected.png) repeat;border-color:#9abcc7;box-shadow:0 0 5px rgba(0,0,0,.2)}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{position:absolute;font-size:17px;font-weight:700;top:50%;left:50%;width:80px;text-align:center;color:#5e6d72;margin:-.95em 0 0 -40px;padding:10px 0;border:1px solid transparent;line-height:1.4em!important;overflow:hidden;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after{content:"%"}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover{background:#f6f6f6;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{background:#f6f6f6;border:1px solid #d0d0d0;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle{z-index:100;position:absolute;top:0;width:12px;left:-6px;cursor:col-resize;background:#e5f4fb;height:360px;transition:background .15s ease-in-out 0s}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover{background:#b7e0f1}.block-editor.so-panels-dialog-history .so-left-sidebar,.so-panels-dialog.so-panels-dialog-history .so-left-sidebar{padding:0}.block-editor.so-panels-dialog-history .history-entries .history-entry,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry{padding:10px;background:#f8f8f8;cursor:pointer;border-bottom:1px solid #ccc}.block-editor.so-panels-dialog-history .history-entries .history-entry h3,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry h3{margin:0 0 .6em;font-size:12px;font-weight:700;color:#444;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry .timesince,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .timesince{color:#999;font-size:11px;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry:hover,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry:hover{background:#f0f0f0}.block-editor.so-panels-dialog-history .history-entries .history-entry.so-selected,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry.so-selected{background:#eee}.block-editor.so-panels-dialog-history .history-entries .history-entry .count,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .count{color:#999}.block-editor.so-panels-dialog-history .so-content,.so-panels-dialog.so-panels-dialog-history .so-content{padding:0;overflow-y:hidden}.block-editor.so-panels-dialog-history .so-content form.history-form,.so-panels-dialog.so-panels-dialog-history .so-content form.history-form{display:none}.block-editor.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe,.so-panels-dialog.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe{width:100%;height:100%}.block-editor.so-panels-dialog-prebuilt-layouts .so-content,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content{padding-left:10px;padding-right:10px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-error-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-error-message{font-size:14px;border:1px solid #ccc;background:#f8f8f8;padding:15px 20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui{padding:5px 15px;text-align:right}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui{padding:15px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message{display:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message{display:block}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message{font-size:1em;margin-bottom:0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area{display:block;-ms-box-sizing:border-box;box-sizing:border-box;padding:50px 30px;border:4px dashed #e0e0e0;text-align:center;transition:all .25s ease 0s}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover{background-color:#f2f9fc;border-color:#0074a2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar{display:none;padding:2px;border:2px solid #2181b1;border-radius:2px;margin-top:20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent{height:14px;background-color:#358ebe;border-radius:1px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button{padding:12px 30px;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse{background:#f3f3f3;border-bottom:1px solid #d0d0d0;margin:-15px -10px 15px;padding:15px;font-weight:700}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper{display:flex;flex-flow:row wrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results{margin:20px 0;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{-ms-box-sizing:border-box;box-sizing:border-box;padding:6px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper{display:flex;flex-flow:column nowrap;height:100%;box-sizing:border-box;padding:15px 10px;background:#f7f7f7;border:1px solid #d0d0d0;box-shadow:0 1px 1px rgba(0,0,0,.1)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title{font-size:15px;margin:0 0 13px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot{flex:3 auto;margin-bottom:10px;cursor:pointer}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img{display:block;width:100%;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper{display:block;min-height:40px;background:gray;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description{flex:1 auto;font-size:.9em;color:#666;margin-bottom:10px;max-height:60px;overflow:hidden}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom{flex:1 auto;position:relative;max-height:50px;margin:10px -10px -15px;background:#fcfcfc;border-top:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title{margin:0;padding:16px 10px;cursor:pointer;overflow:hidden;white-space:nowrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons{position:absolute;z-index:2;top:0;bottom:0;right:0;height:100%;visibility:hidden;-ms-box-sizing:border-box;box-sizing:border-box;padding:11px 10px 10px 15px;border-left:1px solid #d0d0d0;background:#f6f6f6;box-shadow:-1px 0 1px rgba(0,0,0,.05)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons{visibility:visible}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected{background-color:#e5f4fa}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper{background:#deeef4;border-color:#9abcc7}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom{background:#f8fdff;border-color:#bcccd2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title{color:#3e484c}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons{background:#eaf2f6;border-color:#bcccd2}@media only screen and (min-width:1680px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:20%}}@media only screen and (max-width:1679px) and (min-width:1280px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:25%}}@media only screen and (max-width:1279px) and (min-width:1140px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:33.333%}}@media only screen and (max-width:1139px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:50%}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages{margin-top:15px;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled{pointer-events:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position{vertical-align:baseline}.block-editor .so-visual-styles,.so-panels-dialog .so-visual-styles{margin:-15px;height:auto}.block-editor .so-visual-styles h3,.so-panels-dialog .so-visual-styles h3{line-height:1em;margin:0;padding:20px 15px;border-bottom:1px solid #ddd}.block-editor .so-visual-styles .style-section-head,.so-panels-dialog .so-visual-styles .style-section-head{background:#fff;padding:15px 10px;border-bottom:1px solid #ddd;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-section-head h4,.so-panels-dialog .so-visual-styles .style-section-head h4{margin:0}.block-editor .so-visual-styles .style-section-fields,.so-panels-dialog .so-visual-styles .style-section-fields{padding:15px;border-bottom:1px solid #ddd;background:#f7f7f7}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper{margin-bottom:20px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper:last-child,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper:last-child{margin-bottom:0}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper>label,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper>label{font-weight:700;display:block;margin-bottom:3px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field{zoom:1}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before{content:"";display:block}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field input,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field input{font-size:12px}.block-editor .so-visual-styles .style-input-wrapper,.so-panels-dialog .so-visual-styles .style-input-wrapper{zoom:1}.block-editor .so-visual-styles .style-input-wrapper:before,.so-panels-dialog .so-visual-styles .style-input-wrapper:before{content:"";display:block}.block-editor .so-visual-styles .style-input-wrapper:after,.so-panels-dialog .so-visual-styles .style-input-wrapper:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-input-wrapper input,.so-panels-dialog .so-visual-styles .style-input-wrapper input{max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-inputs,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-inputs{overflow:auto;margin:0 -3px 4px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper{box-sizing:border-box;float:left;width:25%;padding:0 3px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value{border-width:1px;display:block;max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top{box-shadow:inset 0 2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right{box-shadow:inset -3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom{box-shadow:inset 0 -2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left{box-shadow:inset 3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-multiple,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-multiple{width:100%;display:block}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-single{float:right;width:25%}.block-editor .so-visual-styles .style-field-measurement .measurement-value-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-value-single{float:left;width:72%}.block-editor .so-visual-styles .style-field-image .so-image-selector,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector{display:inline-block;background-color:#f7f7f7;border:1px solid #ccc;height:28px;float:left;border-radius:3px;cursor:pointer;box-shadow:inset 0 1px #fff}.block-editor .so-visual-styles .style-field-image .so-image-selector .current-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .current-image{height:28px;width:28px;float:left;background:#fff;border-right:1px solid #ccc;background-size:cover;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px;background-clip:padding-box}.block-editor .so-visual-styles .style-field-image .so-image-selector .select-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .select-image{font-size:12px;line-height:28px;float:left;padding:0 8px;color:#555}.block-editor .so-visual-styles .style-field-image .remove-image,.so-panels-dialog .so-visual-styles .style-field-image .remove-image{font-size:12px;margin-top:4px;margin-left:15px;display:inline-block;float:left;color:#666;text-decoration:none}.block-editor .so-visual-styles .style-field-image .remove-image.hidden,.so-panels-dialog .so-visual-styles .style-field-image .remove-image.hidden{display:none}.block-editor .so-visual-styles .style-field-image .image-fallback,.so-panels-dialog .so-visual-styles .style-field-image .image-fallback{margin-top:4px}.block-editor .so-visual-styles .style-field-checkbox label,.so-panels-dialog .so-visual-styles .style-field-checkbox label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-field-radio label,.so-panels-dialog .so-visual-styles .style-field-radio label{display:block}.block-editor .so-visual-styles .so-field-code,.so-panels-dialog .so-visual-styles .so-field-code{font-size:12px;font-family:Courier\ 10 Pitch,Courier,monospace}.block-editor .so-visual-styles .so-description,.so-panels-dialog .so-visual-styles .so-description{color:#999;font-size:12px;margin-top:5px;margin-bottom:0;font-style:italic;clear:both}.block-editor .so-visual-styles.so-cell-styles,.so-panels-dialog .so-visual-styles.so-cell-styles{margin-top:15px}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.block-editor .so-content .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .so-content .siteorigin-panels-builder .so-builder-toolbar{border:1px solid #dedede;z-index:1}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.block-editor .so-content .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .so-content .siteorigin-panels-builder .so-rows-container{padding:20px 0 0}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.block-editor .so-content .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .so-content .siteorigin-panels-builder .so-panels-welcome-message{padding-left:0;padding-right:0;line-height:2.5em}.block-editor .siteorigin-panels-layout-block-container,.so-panels-dialog .siteorigin-panels-layout-block-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4em}.block-editor .siteorigin-panels-layout-block-container ul,.so-panels-dialog .siteorigin-panels-layout-block-container ul{list-style:none}.block-editor .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-block-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.block-editor .siteorigin-panels-block-icon.white,.so-panels-dialog .siteorigin-panels-block-icon.white{background-image:url(images/pb-icon_white.svg)}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container{text-align:center}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container>span,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container>span{display:inline-block}.block-editor .siteorigin-panels-add-layout-block,.so-panels-dialog .siteorigin-panels-add-layout-block{text-align:center;margin-left:auto;margin-right:auto}.block-editor .siteorigin-panels-add-layout-block>button,.so-panels-dialog .siteorigin-panels-add-layout-block>button{height:100%;padding:5px 10px;font-size:16px}.block-editor .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon{margin:3px 10px 0 0}.block-editor .so-dropdown-wrapper input[type=button].button-primary,.so-panels-dialog .so-dropdown-wrapper input[type=button].button-primary{width:125px;height:28px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper{display:block;z-index:11;bottom:28px;width:125px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden{display:none}.wp-customizer .so-panels-dialog .so-content,.wp-customizer .so-panels-dialog .so-overlay,.wp-customizer .so-panels-dialog .so-title-bar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500001}.wp-customizer .so-panels-dialog .so-left-sidebar,.wp-customizer .so-panels-dialog .so-right-sidebar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500002}.so-panels-live-editor>div{position:fixed;z-index:99999;-ms-box-sizing:border-box;box-sizing:border-box}.so-panels-live-editor .live-editor-form{display:none}.so-panels-live-editor .live-editor-collapse{position:fixed;top:18px;left:10px;line-height:1em;cursor:pointer;z-index:100000}.so-panels-live-editor .live-editor-collapse .collapse-icon{float:left;margin:-4px 6px 0 0;border-radius:50%;width:20px;height:20px;overflow:hidden;transition:all .25s ease 0s}.so-panels-live-editor .live-editor-collapse .collapse-icon:before{display:block;content:"\f148";background:#eee;font:normal 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased}.so-panels-live-editor .live-editor-collapse:hover{color:#0073aa}.so-panels-live-editor .live-editor-collapse:hover .collapse-icon{box-shadow:0 0 3px rgba(30,140,190,.8)}.so-panels-live-editor .so-sidebar-tools{background:#eee;border-bottom:1px solid #ddd;border-right:1px solid #d0d0d0;top:0;left:0;height:46px;width:360px}.so-panels-live-editor .so-sidebar-tools .live-editor-save{margin:9px 10px 0 5px;float:right}.so-panels-live-editor .so-sidebar-tools .live-editor-close{margin:9px 5px 0 15px;float:right}.so-panels-live-editor .so-sidebar-tools .live-editor-mode{float:right;margin:9px 4px 0 0}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons{font-size:30px;width:30px;height:30px;cursor:pointer;color:#999}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons:hover{color:#666}.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons,.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons:hover{color:#0073aa}.so-panels-live-editor .so-sidebar{top:46px;left:0;bottom:0;width:360px;overflow-y:auto;background:#f7f7f7;border-right:1px solid #d0d0d0}.so-panels-live-editor .so-sidebar .siteorigin-panels-builder .so-rows-container{padding:10px 10px 0!important}.so-panels-live-editor .so-preview{top:0;right:0;bottom:0;left:360px;background-color:#191e23}.so-panels-live-editor .so-preview form{display:none}.so-panels-live-editor .so-preview iframe{float:left;width:100%;height:100%;margin:0 auto}.so-panels-live-editor .so-preview-overlay{display:none;opacity:.975;top:0;right:0;bottom:0;left:360px;background-color:#f4f4f4;cursor:wait}.so-panels-live-editor .so-preview-overlay .so-loading-container{opacity:.6;position:absolute;top:50%;width:200px;padding:2px;border-radius:5px;left:50%;margin-left:-104px;margin-top:-9px;border:2px solid #aaa}.so-panels-live-editor .so-preview-overlay .so-loading-container .so-loading-bar{width:50%;border-radius:3px;height:10px;background:#aaa}.so-panels-live-editor.so-collapsed .live-editor-collapse .collapse-icon{transform:rotate(180deg)}.so-panels-live-editor.so-collapsed .so-sidebar,.so-panels-live-editor.so-collapsed .so-sidebar-tools{display:none}.so-panels-live-editor.so-collapsed .so-preview,.so-panels-live-editor.so-collapsed .so-preview-overlay{left:0}.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{max-width:480px;max-height:640px;position:absolute;top:50%;left:50%;margin-left:-240px;margin-top:-320px}@media (max-width:840px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}@media (max-height:640px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:absolute;max-width:768px;top:0;left:50%;margin-left:-384px}@media (max-width:1128px){.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-panels-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#panels-home-page .switch{margin:0 10px 0 0;float:left;position:relative;display:inline-block;vertical-align:top;width:68px;height:24px;padding:3px;background-color:#fff;border-radius:24px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px rgba(0,0,0,.05);cursor:pointer;background-image:linear-gradient(180deg,#eee,#fff 25px)}#panels-home-page .switch .switch-input{position:absolute;top:0;left:0;opacity:0}#panels-home-page .switch .switch-label{position:relative;display:block;height:inherit;font-size:12px;text-transform:uppercase;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px rgba(0,0,0,.12),inset 0 0 2px rgba(0,0,0,.15);transition:.15s ease-out;transition-property:opacity background}#panels-home-page .switch .switch-label:after,#panels-home-page .switch .switch-label:before{position:absolute;top:50%;margin-top:-.5em;line-height:1;transition:inherit}#panels-home-page .switch .switch-label:before{content:attr(data-off);right:11px;color:#aaa;text-shadow:0 1px hsla(0,0%,100%,.5)}#panels-home-page .switch .switch-label:after{content:attr(data-on);left:13px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label{background:#47a8d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}#panels-home-page .switch .switch-input:checked~.switch-label:before{opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label:after{opacity:1}#panels-home-page .switch .switch-handle{position:absolute;top:4px;left:4px;width:22px;height:22px;background:#fff;border-radius:12px;box-shadow:1px 1px 5px rgba(0,0,0,.2);background-image:linear-gradient(180deg,#fff 40%,#f0f0f0);transition:left .15s ease-out}#panels-home-page .switch .switch-handle:before{content:"";position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px;width:14px;height:14px;background:#f9f9f9;border-radius:7px;box-shadow:inset 0 1px rgba(0,0,0,.02);background-image:linear-gradient(180deg,#eee,#fff)}#panels-home-page .switch .switch-input:checked~.switch-handle{left:48px;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}#panels-home-page .switch .switch-green>.switch-input:checked~.switch-label{background:#4fb845}#panels-home-page #panels-view-as-page{display:inline-block;margin-left:50px}.siteorigin-panels-builder-form .siteorigin-panels-builder{border:1px solid #d0d0d0;background-color:#fff;margin:10px 0}.siteorigin-panels-builder-form .siteorigin-panels-builder.so-panels-loading{min-height:150px}.siteorigin-page-builder-widget .siteorigin-panels-display-builder{display:inline-block!important}.siteorigin-page-builder-widget .siteorigin-panels-no-builder{display:none!important}.so-panels-contextual-menu{border:1px solid silver;background:#f9f9f9;box-shadow:0 1px 1px rgba(0,0,0,.04);outline:none;border-radius:2px;position:absolute;width:180px;top:20px;left:20px;z-index:999999;display:none;overflow-y:auto}.so-panels-contextual-menu,.so-panels-contextual-menu *{font-size:12px}.so-panels-contextual-menu .so-section{border-bottom:1px solid silver}.so-panels-contextual-menu .so-section:last-child{border-bottom:none}.so-panels-contextual-menu .so-section h5{margin:0 0 5px;padding:8px 10px 5px;border-bottom:1px solid #d0d0d0;background:#f6f6f6}.so-panels-contextual-menu .so-section .so-search-wrapper{margin:-5px 0 5px;border-bottom:1px solid #d0d0d0;background:#f4f4f4}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]{box-sizing:border-box;display:block;width:100%;margin:0;border:none;padding:5px 10px;background:#fbfbfb}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:active,.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:focus{border:none;box-shadow:none;background:#fff}.so-panels-contextual-menu .so-section ul{margin:5px 0 0;padding:0 0 5px}.so-panels-contextual-menu .so-section ul li{cursor:pointer;margin:0;padding:4px 10px;line-height:1em}.so-panels-contextual-menu .so-section ul li.so-active,.so-panels-contextual-menu .so-section ul li:hover{background:#f0f0f0;color:#444}.so-panels-contextual-menu .so-section ul li.so-confirm{color:#a00}.so-panels-contextual-menu .so-section ul li.so-confirm.so-active,.so-panels-contextual-menu .so-section ul li.so-confirm:hover{background:#a00;color:#fff}.so-panels-contextual-menu .so-section ul li .dashicons{width:12px;height:12px;font-size:12px;margin:0;float:right;line-height:12px}.so-panels-contextual-menu .so-section .so-no-results{padding:0 10px 5px;display:none;font-style:italic}.so-dropdown-wrapper{position:relative;float:right}.so-dropdown-wrapper .so-dropdown-links-wrapper{position:absolute;padding:6px 0 0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul{margin:0;border:1px solid silver;background:#f9f9f9;border-radius:2px;padding:4px 0;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li{margin:0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li:first-child{border-top-width:1px}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a{display:block;padding:2px 8px;text-decoration:none;color:#666;font-size:11px;cursor:pointer;outline:0!important;box-shadow:none}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a:hover{background:#f0f0f0;color:#444}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a .dashicons{font-size:16px;margin:0;float:right;line-height:16px}.so-dropdown-wrapper .so-dropdown-links-wrapper .so-pointer{width:12px;height:6px;position:absolute;z-index:12;background:url(images/dropdown-pointer.png);background-size:12px 6px;top:1px;right:18px}.so-panels-icon{font-family:siteorigin-panels-icons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.so-panels-icon.so-panels-icon-add-row:before{content:"\e900"}.so-panels-icon.so-panels-icon-add-widget:before{content:"\e901"}.so-panels-icon.so-panels-icon-addons:before{content:"\e902"}.so-panels-icon.so-panels-icon-history:before{content:"\e903"}.so-panels-icon.so-panels-icon-layouts:before{content:"\e904"}.so-panels-icon.so-panels-icon-learn:before{content:"\e905"}.so-panels-icon.so-panels-icon-live-editor:before{content:"\e906"}.so-panels-icon.so-panels-icon-move:before{content:"\e907"}.so-panels-icon.so-panels-icon-settings:before{content:"\e908"}#post-status-info.for-siteorigin-panels{margin-top:-21px!important}.siteorigin-page-builder-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.siteorigin-page-builder-icon.white{background-image:url(images/pb-icon_white.svg)}
inc/admin.php CHANGED
@@ -19,7 +19,7 @@ class SiteOrigin_Panels_Admin {
19
  'plugin_action_links'
20
  ) );
21
 
22
- add_action( 'current_screen', array( $this, 'admin_init' ) );
23
 
24
  add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
25
  add_action( 'admin_init', array( $this, 'save_home_page' ) );
@@ -54,7 +54,8 @@ class SiteOrigin_Panels_Admin {
54
  add_action( 'wp_ajax_so_panels_builder_content', array( $this, 'action_builder_content' ) );
55
  add_action( 'wp_ajax_so_panels_widget_form', array( $this, 'action_widget_form' ) );
56
  add_action( 'wp_ajax_so_panels_live_editor_preview', array( $this, 'action_live_editor_preview' ) );
57
- add_action( 'wp_ajax_so_panels_block_editor_preview', array( $this, 'block_editor_preview' ) );
 
58
 
59
  // Initialize the additional admin classes.
60
  SiteOrigin_Panels_Admin_Widget_Dialog::single();
@@ -92,7 +93,7 @@ class SiteOrigin_Panels_Admin {
92
  /**
93
  * Do some general admin initialization
94
  */
95
- public function admin_init(){
96
  if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
97
 
98
  // Add the custom columns
@@ -1111,9 +1112,9 @@ class SiteOrigin_Panels_Admin {
1111
  /**
1112
  * Preview in the block editor.
1113
  */
1114
- public function block_editor_preview() {
1115
 
1116
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'block-editor-preview' ) ) {
1117
  wp_die();
1118
  }
1119
 
@@ -1139,6 +1140,19 @@ class SiteOrigin_Panels_Admin {
1139
  echo $rendered_layout;
1140
  wp_die();
1141
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
1142
 
1143
  /**
1144
  * Add a column that indicates if a column is powered by Page Builder
19
  'plugin_action_links'
20
  ) );
21
 
22
+ add_action( 'plugins_loaded', array( $this, 'admin_init_widget_count' ) );
23
 
24
  add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
25
  add_action( 'admin_init', array( $this, 'save_home_page' ) );
54
  add_action( 'wp_ajax_so_panels_builder_content', array( $this, 'action_builder_content' ) );
55
  add_action( 'wp_ajax_so_panels_widget_form', array( $this, 'action_widget_form' ) );
56
  add_action( 'wp_ajax_so_panels_live_editor_preview', array( $this, 'action_live_editor_preview' ) );
57
+ add_action( 'wp_ajax_so_panels_layout_block_sanitize', array( $this, 'layout_block_sanitize' ) );
58
+ add_action( 'wp_ajax_so_panels_layout_block_preview', array( $this, 'layout_block_preview' ) );
59
 
60
  // Initialize the additional admin classes.
61
  SiteOrigin_Panels_Admin_Widget_Dialog::single();
93
  /**
94
  * Do some general admin initialization
95
  */
96
+ public function admin_init_widget_count(){
97
  if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
98
 
99
  // Add the custom columns
1112
  /**
1113
  * Preview in the block editor.
1114
  */
1115
+ public function layout_block_preview() {
1116
 
1117
+ if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'layout-block-preview' ) ) {
1118
  wp_die();
1119
  }
1120
 
1140
  echo $rendered_layout;
1141
  wp_die();
1142
  }
1143
+
1144
+ public function layout_block_sanitize() {
1145
+
1146
+ if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'layout-block-sanitize' ) ) {
1147
+ wp_die();
1148
+ }
1149
+
1150
+ $panels_data = json_decode( wp_unslash( $_POST['panelsData'] ), true );
1151
+ $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], false, true, true );
1152
+ $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1153
+
1154
+ wp_send_json( $panels_data );
1155
+ }
1156
 
1157
  /**
1158
  * Add a column that indicates if a column is powered by Page Builder
inc/renderer.php CHANGED
@@ -86,6 +86,7 @@ class SiteOrigin_Panels_Renderer {
86
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
87
  $rounded_width = round( $weight * 100, 4 ) . '%';
88
  $calc_width = 'calc(' . $rounded_width . ' - ( ' . ( 1 - $weight ) . ' * ' . $gutter . ' ) )';
 
89
  // Add the width and ensure we have correct formatting for CSS.
90
  $css->add_cell_css( $post_id, $ri, $ci, '', array(
91
  'width' => array(
@@ -93,7 +94,7 @@ class SiteOrigin_Panels_Renderer {
93
  // This seems to happen when a plugin calls `setlocale(LC_ALL, 'de_DE');` or `setlocale(LC_NUMERIC, 'de_DE');`
94
  // This should prevent issues with column sizes in these cases.
95
  str_replace( ',', '.', $rounded_width ),
96
- str_replace( ',', '.', $calc_width ),
97
  )
98
  ) );
99
 
86
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
87
  $rounded_width = round( $weight * 100, 4 ) . '%';
88
  $calc_width = 'calc(' . $rounded_width . ' - ( ' . ( 1 - $weight ) . ' * ' . $gutter . ' ) )';
89
+
90
  // Add the width and ensure we have correct formatting for CSS.
91
  $css->add_cell_css( $post_id, $ri, $ci, '', array(
92
  'width' => array(
94
  // This seems to happen when a plugin calls `setlocale(LC_ALL, 'de_DE');` or `setlocale(LC_NUMERIC, 'de_DE');`
95
  // This should prevent issues with column sizes in these cases.
96
  str_replace( ',', '.', $rounded_width ),
97
+ str_replace( ',', '.', intval($gutter) ? $calc_width : '' ), // Exclude if there's a zero gutter
98
  )
99
  ) );
100
 
trunk/js/siteorigin-panels-2101.js → js/siteorigin-panels-2102.js RENAMED
@@ -2474,161 +2474,171 @@ module.exports = function ( config, force ) {
2474
  };
2475
 
2476
  },{}],16:[function(require,module,exports){
2477
- /**
2478
- * Everything we need for SiteOrigin Page Builder.
2479
- *
2480
- * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
2481
- * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
2482
- */
2483
-
2484
- /* global Backbone, _, jQuery, tinyMCE, panelsOptions, plupload, confirm, console, require */
2485
-
2486
- var panels = {};
2487
-
2488
- // Store everything globally
2489
- window.panels = panels;
2490
- window.siteoriginPanels = panels;
2491
-
2492
- // Helpers
2493
- panels.helpers = {};
2494
- panels.helpers.clipboard = require( './helpers/clipboard' );
2495
- panels.helpers.utils = require( './helpers/utils' );
2496
- panels.helpers.serialize = require( './helpers/serialize' );
2497
- panels.helpers.pageScroll = require( './helpers/page-scroll' );
2498
-
2499
- // The models
2500
- panels.model = {};
2501
- panels.model.widget = require( './model/widget' );
2502
- panels.model.cell = require( './model/cell' );
2503
- panels.model.row = require( './model/row' );
2504
- panels.model.builder = require( './model/builder' );
2505
- panels.model.historyEntry = require( './model/history-entry' );
2506
-
2507
- // The collections
2508
- panels.collection = {};
2509
- panels.collection.widgets = require( './collection/widgets' );
2510
- panels.collection.cells = require( './collection/cells' );
2511
- panels.collection.rows = require( './collection/rows' );
2512
- panels.collection.historyEntries = require( './collection/history-entries' );
2513
-
2514
- // The views
2515
- panels.view = {};
2516
- panels.view.widget = require( './view/widget' );
2517
- panels.view.cell = require( './view/cell' );
2518
- panels.view.row = require( './view/row' );
2519
- panels.view.builder = require( './view/builder' );
2520
- panels.view.dialog = require( './view/dialog' );
2521
- panels.view.styles = require( './view/styles' );
2522
- panels.view.liveEditor = require( './view/live-editor' );
2523
-
2524
- // The dialogs
2525
- panels.dialog = {};
2526
- panels.dialog.builder = require( './dialog/builder' );
2527
- panels.dialog.widgets = require( './dialog/widgets' );
2528
- panels.dialog.widget = require( './dialog/widget' );
2529
- panels.dialog.prebuilt = require( './dialog/prebuilt' );
2530
- panels.dialog.row = require( './dialog/row' );
2531
- panels.dialog.history = require( './dialog/history' );
2532
-
2533
- // The utils
2534
- panels.utils = {};
2535
- panels.utils.menu = require( './utils/menu' );
2536
-
2537
- // jQuery Plugins
2538
- jQuery.fn.soPanelsSetupBuilderWidget = require( './jquery/setup-builder-widget' );
2539
-
2540
-
2541
- // Set up Page Builder if we're on the main interface
2542
- jQuery( function ( $ ) {
2543
-
2544
- var container,
2545
- field,
2546
- form,
2547
- builderConfig;
2548
-
2549
- var $panelsMetabox = $( '#siteorigin-panels-metabox' );
2550
- form = $( 'form#post' );
2551
- if ( $panelsMetabox.length && form.length ) {
2552
- // This is usually the case when we're in the post edit interface
2553
- container = $panelsMetabox;
2554
- field = $panelsMetabox.find( '.siteorigin-panels-data-field' );
2555
-
2556
- builderConfig = {
2557
- editorType: 'tinyMCE',
2558
- postId: $( '#post_ID' ).val(),
2559
- editorId: '#content',
2560
- builderType: $panelsMetabox.data( 'builder-type' ),
2561
- builderSupports: $panelsMetabox.data( 'builder-supports' ),
2562
- loadOnAttach: panelsOptions.loadOnAttach && $( '#auto_draft' ).val() == 1,
2563
- loadLiveEditor: $panelsMetabox.data('live-editor') == 1,
2564
- liveEditorPreview: container.data('preview-url')
2565
- };
2566
- }
2567
- else if ( $( '.siteorigin-panels-builder-form' ).length ) {
2568
- // We're dealing with another interface like the custom home page interface
2569
- var $$ = $( '.siteorigin-panels-builder-form' );
2570
-
2571
- container = $$.find( '.siteorigin-panels-builder-container' );
2572
- field = $$.find( 'input[name="panels_data"]' );
2573
- form = $$;
2574
-
2575
- builderConfig = {
2576
- editorType: 'standalone',
2577
- postId: $$.data( 'post-id' ),
2578
- editorId: '#post_content',
2579
- builderType: $$.data( 'type' ),
2580
- builderSupports: $$.data( 'builder-supports' ),
2581
- loadLiveEditor: false,
2582
- liveEditorPreview: $$.data( 'preview-url' )
2583
- };
2584
- }
2585
-
2586
- if ( ! _.isUndefined( container ) ) {
2587
- // If we have a container, then set up the main builder
2588
- var panels = window.siteoriginPanels;
2589
-
2590
- // Create the main builder model
2591
- var builderModel = new panels.model.builder();
2592
-
2593
- // Now for the view to display the builder
2594
- var builderView = new panels.view.builder( {
2595
- model: builderModel,
2596
- config: builderConfig
2597
- } );
2598
-
2599
- // Set up the builder view
2600
- builderView
2601
- .render()
2602
- .attach( {
2603
- container: container
2604
- } )
2605
- .setDataField( field )
2606
- .attachToEditor();
2607
-
2608
- // When the form is submitted, update the panels data
2609
- form.submit( function () {
2610
- // Refresh the data
2611
- builderModel.refreshPanelsData();
2612
- } );
2613
-
2614
- container.removeClass( 'so-panels-loading' );
2615
-
2616
- // Trigger a global jQuery event after we've setup the builder view. Everything is accessible form there
2617
- $( document ).trigger( 'panels_setup', builderView, window.panels );
2618
- }
2619
-
2620
- // Setup new widgets when they're added in the standard widget interface
2621
- $( document ).on( 'widget-added', function ( e, widget ) {
2622
- $( widget ).find( '.siteorigin-page-builder-widget' ).soPanelsSetupBuilderWidget();
2623
- } );
2624
-
2625
- // Setup existing widgets on the page (for the widgets interface)
2626
- if ( ! $( 'body' ).hasClass( 'wp-customizer' ) ) {
2627
- $( function () {
2628
- $( '.siteorigin-page-builder-widget' ).soPanelsSetupBuilderWidget();
2629
- } );
2630
- }
2631
- } );
 
 
 
 
 
 
 
 
 
 
2632
 
2633
  },{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(require,module,exports){
2634
  module.exports = Backbone.Model.extend({
@@ -3532,6 +3542,10 @@ module.exports = Backbone.Model.extend( {
3532
  var titleFields = ['title', 'text'];
3533
 
3534
  for ( var k in values ) {
 
 
 
 
3535
  if ( values.hasOwnProperty( k ) ) {
3536
  titleFields.push( k );
3537
  }
@@ -3993,8 +4007,7 @@ module.exports = Backbone.View.extend( {
3993
  this.displayAttachedBuilder( { confirm: false } );
3994
  }, this );
3995
  }
3996
-
3997
-
3998
  return this;
3999
  },
4000
 
@@ -5385,13 +5398,12 @@ module.exports = Backbone.View.extend( {
5385
 
5386
  if ( this.parentDialog !== false ) {
5387
  // Add a link to the parent dialog as a sort of crumbtrail.
5388
- var thisDialog = this;
5389
  var dialogParent = $( '<h3 class="so-parent-link"></h3>' ).html( this.parentDialog.text + '<div class="so-separator"></div>' );
5390
  dialogParent.click( function ( e ) {
5391
  e.preventDefault();
5392
- thisDialog.closeDialog();
5393
- thisDialog.parentDialog.openDialog();
5394
- } );
5395
  this.$( '.so-title-bar .so-title' ).before( dialogParent );
5396
  }
5397
 
@@ -5593,9 +5605,6 @@ module.exports = Backbone.View.extend( {
5593
  // Stop scrolling for the main body
5594
  panels.helpers.pageScroll.lock();
5595
 
5596
- // Start listen for keyboard keypresses.
5597
- $( window ).on( 'keyup', this.keyboardListen );
5598
-
5599
  this.onResize();
5600
 
5601
  this.$el.show();
@@ -5628,9 +5637,6 @@ module.exports = Backbone.View.extend( {
5628
  this.$el.hide();
5629
  panels.helpers.pageScroll.unlock();
5630
 
5631
- // Stop listen for keyboard keypresses.
5632
- $( window ).off( 'keyup', this.keyboardListen );
5633
-
5634
  if ( ! options.silent ) {
5635
  // This triggers once everything is hidden
5636
  this.trigger( 'close_dialog_complete' );
@@ -5638,16 +5644,6 @@ module.exports = Backbone.View.extend( {
5638
  }
5639
  },
5640
 
5641
- /**
5642
- * Keyboard events handler
5643
- */
5644
- keyboardListen: function ( e ) {
5645
- // [Esc] to close
5646
- if ( e.which === 27 ) {
5647
- $( '.so-panels-dialog-wrapper .so-close' ).trigger( 'click' );
5648
- }
5649
- },
5650
-
5651
  /**
5652
  * Navigate to the previous dialog
5653
  */
@@ -5889,6 +5885,7 @@ module.exports = Backbone.View.extend( {
5889
 
5890
  events: {
5891
  'click .live-editor-close': 'close',
 
5892
  'click .live-editor-collapse': 'collapse',
5893
  'click .live-editor-mode': 'mobileToggle'
5894
  },
@@ -5916,6 +5913,11 @@ module.exports = Backbone.View.extend( {
5916
  render: function () {
5917
  this.setElement( this.template() );
5918
  this.$el.hide();
 
 
 
 
 
5919
 
5920
  var isMouseDown = false;
5921
  $( document )
@@ -6005,7 +6007,7 @@ module.exports = Backbone.View.extend( {
6005
  },
6006
 
6007
  /**
6008
- * Close the live editor
6009
  */
6010
  close: function () {
6011
  if ( ! this.$el.is( ':visible' ) ) {
@@ -6021,14 +6023,20 @@ module.exports = Backbone.View.extend( {
6021
  this.builder.trigger( 'builder_resize' );
6022
  },
6023
 
 
 
 
 
 
 
 
 
 
6024
  /**
6025
  * Collapse the live editor
6026
  */
6027
  collapse: function () {
6028
  this.$el.toggleClass( 'so-collapsed' );
6029
-
6030
- var text = this.$( '.live-editor-collapse span' );
6031
- text.html( text.data( this.$el.hasClass( 'so-collapsed' ) ? 'expand' : 'collapse' ) );
6032
  },
6033
 
6034
  /**
@@ -6077,7 +6085,7 @@ module.exports = Backbone.View.extend( {
6077
  contentWindow.liveEditorScrollTo( over );
6078
  },
6079
 
6080
- handleRefreshData: function ( newData, args ) {
6081
  if ( ! this.$el.is( ':visible' ) ) {
6082
  return this;
6083
  }
@@ -6152,7 +6160,7 @@ module.exports = Backbone.View.extend( {
6152
  'id' : iframeId,
6153
  'name' : iframeId,
6154
  } )
6155
- .appendTo( target )
6156
 
6157
  this.setupPreviewFrame( this.previewIframe );
6158
 
@@ -7031,7 +7039,8 @@ module.exports = Backbone.View.extend( {
7031
 
7032
  this.setElement( this.template( {
7033
  title: this.model.getWidgetField( 'title' ),
7034
- description: this.model.getTitle()
 
7035
  } ) );
7036
 
7037
  this.$el.data( 'view', this );
2474
  };
2475
 
2476
  },{}],16:[function(require,module,exports){
2477
+ /**
2478
+ * Everything we need for SiteOrigin Page Builder.
2479
+ *
2480
+ * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
2481
+ * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
2482
+ */
2483
+
2484
+ /* global Backbone, _, jQuery, tinyMCE, panelsOptions, plupload, confirm, console, require */
2485
+
2486
+ var panels = {};
2487
+
2488
+ // Store everything globally
2489
+ window.panels = panels;
2490
+ window.siteoriginPanels = panels;
2491
+
2492
+ // Helpers
2493
+ panels.helpers = {};
2494
+ panels.helpers.clipboard = require( './helpers/clipboard' );
2495
+ panels.helpers.utils = require( './helpers/utils' );
2496
+ panels.helpers.serialize = require( './helpers/serialize' );
2497
+ panels.helpers.pageScroll = require( './helpers/page-scroll' );
2498
+
2499
+ // The models
2500
+ panels.model = {};
2501
+ panels.model.widget = require( './model/widget' );
2502
+ panels.model.cell = require( './model/cell' );
2503
+ panels.model.row = require( './model/row' );
2504
+ panels.model.builder = require( './model/builder' );
2505
+ panels.model.historyEntry = require( './model/history-entry' );
2506
+
2507
+ // The collections
2508
+ panels.collection = {};
2509
+ panels.collection.widgets = require( './collection/widgets' );
2510
+ panels.collection.cells = require( './collection/cells' );
2511
+ panels.collection.rows = require( './collection/rows' );
2512
+ panels.collection.historyEntries = require( './collection/history-entries' );
2513
+
2514
+ // The views
2515
+ panels.view = {};
2516
+ panels.view.widget = require( './view/widget' );
2517
+ panels.view.cell = require( './view/cell' );
2518
+ panels.view.row = require( './view/row' );
2519
+ panels.view.builder = require( './view/builder' );
2520
+ panels.view.dialog = require( './view/dialog' );
2521
+ panels.view.styles = require( './view/styles' );
2522
+ panels.view.liveEditor = require( './view/live-editor' );
2523
+
2524
+ // The dialogs
2525
+ panels.dialog = {};
2526
+ panels.dialog.builder = require( './dialog/builder' );
2527
+ panels.dialog.widgets = require( './dialog/widgets' );
2528
+ panels.dialog.widget = require( './dialog/widget' );
2529
+ panels.dialog.prebuilt = require( './dialog/prebuilt' );
2530
+ panels.dialog.row = require( './dialog/row' );
2531
+ panels.dialog.history = require( './dialog/history' );
2532
+
2533
+ // The utils
2534
+ panels.utils = {};
2535
+ panels.utils.menu = require( './utils/menu' );
2536
+
2537
+ // jQuery Plugins
2538
+ jQuery.fn.soPanelsSetupBuilderWidget = require( './jquery/setup-builder-widget' );
2539
+
2540
+
2541
+ // Set up Page Builder if we're on the main interface
2542
+ jQuery( function ( $ ) {
2543
+
2544
+ var container,
2545
+ field,
2546
+ form,
2547
+ builderConfig;
2548
+
2549
+ var $panelsMetabox = $( '#siteorigin-panels-metabox' );
2550
+ form = $( 'form#post' );
2551
+ if ( $panelsMetabox.length && form.length ) {
2552
+ // This is usually the case when we're in the post edit interface
2553
+ container = $panelsMetabox;
2554
+ field = $panelsMetabox.find( '.siteorigin-panels-data-field' );
2555
+
2556
+ builderConfig = {
2557
+ editorType: 'tinyMCE',
2558
+ postId: $( '#post_ID' ).val(),
2559
+ editorId: '#content',
2560
+ builderType: $panelsMetabox.data( 'builder-type' ),
2561
+ builderSupports: $panelsMetabox.data( 'builder-supports' ),
2562
+ loadOnAttach: panelsOptions.loadOnAttach && $( '#auto_draft' ).val() == 1,
2563
+ loadLiveEditor: $panelsMetabox.data('live-editor') == 1,
2564
+ liveEditorPreview: container.data('preview-url')
2565
+ };
2566
+ }
2567
+ else if ( $( '.siteorigin-panels-builder-form' ).length ) {
2568
+ // We're dealing with another interface like the custom home page interface
2569
+ var $$ = $( '.siteorigin-panels-builder-form' );
2570
+
2571
+ container = $$.find( '.siteorigin-panels-builder-container' );
2572
+ field = $$.find( 'input[name="panels_data"]' );
2573
+ form = $$;
2574
+
2575
+ builderConfig = {
2576
+ editorType: 'standalone',
2577
+ postId: $$.data( 'post-id' ),
2578
+ editorId: '#post_content',
2579
+ builderType: $$.data( 'type' ),
2580
+ builderSupports: $$.data( 'builder-supports' ),
2581
+ loadLiveEditor: false,
2582
+ liveEditorPreview: $$.data( 'preview-url' )
2583
+ };
2584
+ }
2585
+
2586
+ if ( ! _.isUndefined( container ) ) {
2587
+ // If we have a container, then set up the main builder
2588
+ var panels = window.siteoriginPanels;
2589
+
2590
+ // Create the main builder model
2591
+ var builderModel = new panels.model.builder();
2592
+
2593
+ // Now for the view to display the builder
2594
+ var builderView = new panels.view.builder( {
2595
+ model: builderModel,
2596
+ config: builderConfig
2597
+ } );
2598
+
2599
+ // Set up the builder view
2600
+ builderView
2601
+ .render()
2602
+ .attach( {
2603
+ container: container
2604
+ } )
2605
+ .setDataField( field )
2606
+ .attachToEditor();
2607
+
2608
+ // When the form is submitted, update the panels data
2609
+ form.submit( function () {
2610
+ // Refresh the data
2611
+ builderModel.refreshPanelsData();
2612
+ } );
2613
+
2614
+ container.removeClass( 'so-panels-loading' );
2615
+
2616
+ // Trigger a global jQuery event after we've setup the builder view. Everything is accessible form there
2617
+ $( document ).trigger( 'panels_setup', builderView, window.panels );
2618
+ }
2619
+
2620
+ // Setup new widgets when they're added in the standard widget interface
2621
+ $( document ).on( 'widget-added', function ( e, widget ) {
2622
+ $( widget ).find( '.siteorigin-page-builder-widget' ).soPanelsSetupBuilderWidget();
2623
+ } );
2624
+
2625
+ // Setup existing widgets on the page (for the widgets interface)
2626
+ if ( ! $( 'body' ).hasClass( 'wp-customizer' ) ) {
2627
+ $( function () {
2628
+ $( '.siteorigin-page-builder-widget' ).soPanelsSetupBuilderWidget();
2629
+ } );
2630
+ }
2631
+
2632
+ // A global escape handler
2633
+ $(window).on('keyup', function(e){
2634
+ // [Esc] to close
2635
+ if ( e.which === 27 ) {
2636
+ // Trigger a click on the last visible Page Builder window
2637
+ $( '.so-panels-dialog-wrapper, .so-panels-live-editor' ).filter(':visible')
2638
+ .last().find('.so-title-bar .so-close, .live-editor-close').click();
2639
+ }
2640
+ });
2641
+ } );
2642
 
2643
  },{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(require,module,exports){
2644
  module.exports = Backbone.Model.extend({
3542
  var titleFields = ['title', 'text'];
3543
 
3544
  for ( var k in values ) {
3545
+ if(k.charAt(0) === '_' || k === 'so_sidebar_emulator_id' || k === 'option_name'){
3546
+ // Skip Widgets Bundle supporting fields
3547
+ continue;
3548
+ }
3549
  if ( values.hasOwnProperty( k ) ) {
3550
  titleFields.push( k );
3551
  }
4007
  this.displayAttachedBuilder( { confirm: false } );
4008
  }, this );
4009
  }
4010
+
 
4011
  return this;
4012
  },
4013
 
5398
 
5399
  if ( this.parentDialog !== false ) {
5400
  // Add a link to the parent dialog as a sort of crumbtrail.
 
5401
  var dialogParent = $( '<h3 class="so-parent-link"></h3>' ).html( this.parentDialog.text + '<div class="so-separator"></div>' );
5402
  dialogParent.click( function ( e ) {
5403
  e.preventDefault();
5404
+ this.closeDialog();
5405
+ this.parentDialog.dialog.openDialog();
5406
+ }.bind(this) );
5407
  this.$( '.so-title-bar .so-title' ).before( dialogParent );
5408
  }
5409
 
5605
  // Stop scrolling for the main body
5606
  panels.helpers.pageScroll.lock();
5607
 
 
 
 
5608
  this.onResize();
5609
 
5610
  this.$el.show();
5637
  this.$el.hide();
5638
  panels.helpers.pageScroll.unlock();
5639
 
 
 
 
5640
  if ( ! options.silent ) {
5641
  // This triggers once everything is hidden
5642
  this.trigger( 'close_dialog_complete' );
5644
  }
5645
  },
5646
 
 
 
 
 
 
 
 
 
 
 
5647
  /**
5648
  * Navigate to the previous dialog
5649
  */
5885
 
5886
  events: {
5887
  'click .live-editor-close': 'close',
5888
+ 'click .live-editor-save': 'closeAndSave',
5889
  'click .live-editor-collapse': 'collapse',
5890
  'click .live-editor-mode': 'mobileToggle'
5891
  },
5913
  render: function () {
5914
  this.setElement( this.template() );
5915
  this.$el.hide();
5916
+
5917
+ if ( $( '#submitdiv #save-post' ).length > 0 ) {
5918
+ var $saveButton = this.$el.find( '.live-editor-save' );
5919
+ $saveButton.text( $saveButton.data( 'save' ) );
5920
+ }
5921
 
5922
  var isMouseDown = false;
5923
  $( document )
6007
  },
6008
 
6009
  /**
6010
+ * Close the Live Editor
6011
  */
6012
  close: function () {
6013
  if ( ! this.$el.is( ':visible' ) ) {
6023
  this.builder.trigger( 'builder_resize' );
6024
  },
6025
 
6026
+ /**
6027
+ * Close the Live Editor and save the post.
6028
+ */
6029
+ closeAndSave: function(){
6030
+ this.close();
6031
+ // Finds the submit input for saving without publishing draft posts.
6032
+ $('#submitdiv input[type="submit"][name="save"]').click();
6033
+ },
6034
+
6035
  /**
6036
  * Collapse the live editor
6037
  */
6038
  collapse: function () {
6039
  this.$el.toggleClass( 'so-collapsed' );
 
 
 
6040
  },
6041
 
6042
  /**
6085
  contentWindow.liveEditorScrollTo( over );
6086
  },
6087
 
6088
+ handleRefreshData: function ( newData ) {
6089
  if ( ! this.$el.is( ':visible' ) ) {
6090
  return this;
6091
  }
6160
  'id' : iframeId,
6161
  'name' : iframeId,
6162
  } )
6163
+ .appendTo( target );
6164
 
6165
  this.setupPreviewFrame( this.previewIframe );
6166
 
7039
 
7040
  this.setElement( this.template( {
7041
  title: this.model.getWidgetField( 'title' ),
7042
+ description: this.model.getTitle(),
7043
+ widget_class: this.model.attributes.class
7044
  } ) );
7045
 
7046
  this.$el.data( 'view', this );
js/siteorigin-panels-2102.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function o(n,a,r){function d(t,e){if(!a[t]){if(!n[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(h)return h(t,!0);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}var l=a[t]={exports:{}};n[t][0].call(l.exports,function(e){return d(n[t][1][e]||e)},l,l.exports,o,n,a,r)}return a[t].exports}for(var h="function"==typeof require&&require,e=0;e<r.length;e++)d(r[e]);return d}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var t=0;return this.each(function(e){t+=e.get("weight")}),t}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(1<this.models.length){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",function(){e.builder.initSortable()}),this.on("open_dialog_complete",function(){e.builder.trigger("builder_resize")})}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var t=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").load(function(){var e=l(this);e.show(),e.contents().scrollTop(t.previewScrollTop)})},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var i=this,s=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(s),this.entries.each(function(e){var t=i.historyEntryTemplate({title:panelsOptions.loc.history[e.get("text")],count:e.get("count")});l(t).data("historyEntry",e).prependTo(s)}),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(s),s.find(".history-entry").click(function(){var e=jQuery(this);s.find(".history-entry").not(e).removeClass("so-selected"),e.addClass("so-selected");var t=e.data("historyEntry");i.selectedEntry=t,i.selectedEntry.cid!==i.currentEntry.cid?i.$(".so-buttons .so-restore").removeClass("disabled"):i.$(".so-buttons .so-restore").addClass("disabled"),i.previewEntry(t)}),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").submit()},restoreSelectedEntry:function(){return this.$(".so-buttons .so-restore").hasClass("disabled")||(this.currentEntry.get("data")===this.selectedEntry.get("data")||("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data")))),this.closeDialog()),!1},updateEntryTimes:function(){var s=this;this.$(".history-entries .history-entry").each(function(){var e=jQuery(this),t=e.find(".timesince"),i=e.data("historyEntry");t.html(s.timeSince(i.get("time")))})},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return 3600<i&&(1===(t=Math.floor(i/3600))?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),60<i&&(1===(t=Math.floor(i/60))?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),0<i&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,r=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(r("#siteorigin-panels-dialog-prebuilt").html(),{})),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=r(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");this.$(".so-content").empty(),"import"==(this.currentTab=i)?this.displayImportExport():this.displayLayoutDirectory("",1,i),this.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(r("#siteorigin-panels-dialog-prebuilt-importexport").html());var l=this,o=l.$(".import-upload-ui"),t=new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:o.find(".file-browse-button").get(0),container:o.get(0),drop_element:o.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&o.addClass("has-drag-drop"),o.find(".progress-precent").css("width","0%")},FilesAdded:function(e){o.find(".file-browse-button").blur(),o.find(".drag-upload-area").removeClass("file-dragover"),o.find(".progress-bar").fadeIn("fast"),l.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){o.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,t,i){var s=JSON.parse(i.response);_.isUndefined(s.widgets)?alert(panelsOptions.plupload.error_message):(l.uploadedLayout=s,o.find(".progress-bar").hide(),l.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",t.name)),l.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}});t.init(),/Edge\/\d./i.test(navigator.userAgent)&&setTimeout(function(){t.refresh()},250),o.find(".drag-upload-area").on("dragover",function(){r(this).addClass("file-dragover")}).on("dragleave",function(){r(this).removeClass("file-dragover")}),e.find(".so-export").submit(function(e){var t=r(this),i=l.builder.model.getPanelsData(),s=r('input[name="post_title"]').val();s||(s=r('input[name="post_ID"]').val()),i.name=s,t.find('input[name="panels_export_data"]').val(JSON.stringify(i))})},displayLayoutDirectory:function(s,l,o){var n=this,a=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===s&&(s=""),void 0===l&&(l=1),void 0===o&&(o="directory-siteorigin"),o.match("^directory-")&&!panelsOptions.directory_enabled)return a.removeClass("so-panels-loading").html(r("#siteorigin-panels-directory-enable").html()),void a.find(".so-panels-enable-directory").click(function(e){e.preventDefault(),r.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},function(){}),panelsOptions.directory_enabled=!0,a.addClass("so-panels-loading"),n.displayLayoutDirectory(s,l,o)});r.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:s,page:l,type:o},function(e){if(n.currentTab===o){a.removeClass("so-panels-loading").html(n.directoryTemplate(e));var t=a.find(".so-previous"),i=a.find(".so-next");l<=1?t.addClass("button-disabled"):t.click(function(e){e.preventDefault(),n.displayLayoutDirectory(s,l-1,n.currentTab)}),l===e.max_num_pages||0===e.max_num_pages?i.addClass("button-disabled"):i.click(function(e){e.preventDefault(),n.displayLayoutDirectory(s,l+1,n.currentTab)}),a.find(".so-screenshot").each(function(){var e=r(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=r("<img/>").attr("src",e.data("src")).load(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")});else r("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")}),a.find(".so-directory-browse").html(e.title)}},"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout(function(){e.removeClass("so-confirmed").html(i)},2500),setTimeout(function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")},200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout"}),i=new r.Deferred;return r.get(panelsOptions.ajaxurl,e,function(e){var t="";e.success?i.resolve(e.data):(t=e.data.message,i.reject(e.data)),this.setStatusMessage(t,!1,!e.success),this.updateButtonState(!0)}.bind(this)),i.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(r(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var a=window.panels,h=jQuery;t.exports=a.view.dialog.extend({cellPreviewTemplate:_.template(a.helpers.utils.processTemplate(h("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},rowView:null,dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview(),this.renderStyles()},this),this.row={cells:new a.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(h("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");return this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove(),_.isUndefined(this.model)||(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.$("input.so-row-field").keyup(function(){h(this).trigger("change")}),this},renderStyles:function(){this.styles&&(this.styles.off("styles_loaded"),this.styles.remove()),this.styles=new a.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e||(this.styles.remove(),0===t.children().length&&(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.hide()))},this)},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)||(this.row={cells:this.model.get("cells").clone(),style:{},ratio:this.model.get("ratio"),ratio_direction:this.model.get("ratio_direction")},this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction")),this.clearCellStylesCache()),this},regenerateRowPreview:function(){var t,r=this,d=this.$(".row-preview"),s=this.getSelectedCellIndex();d.empty(),this.row.cells.each(function(i,n){var o=h(this.cellPreviewTemplate({weight:i.get("weight")}));d.append(o),n==s&&o.find(".preview-cell-in").addClass("cell-selected");var e,a=o.prev();a.length&&((e=h('<div class="resize-handle"></div>')).appendTo(o).dblclick(function(){var e=r.row.cells.at(n-1),t=i.get("weight")+e.get("weight");i.set("weight",t/2),e.set("weight",t/2),r.scaleRowWidths()}),e.draggable({axis:"x",containment:d,start:function(e,t){var i=o.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:o.outerWidth(),left:6,height:o.outerHeight()});i.find(".resize-handle").remove();var s=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),right:6,height:a.outerHeight()});s.find(".resize-handle").remove(),h(this).data({newCellClone:i,prevCellClone:s}),o.find("> .preview-cell-in").css("visibility","hidden"),a.find("> .preview-cell-in").css("visibility","hidden")},drag:function(e,t){var i=r.row.cells.at(n).get("weight"),s=r.row.cells.at(n-1).get("weight"),l=i-(t.position.left+6)/d.width(),o=s+(t.position.left+6)/d.width();t.helper.offset().left,d.offset().left;h(this).data("newCellClone").css("width",d.width()*l).find(".preview-cell-weight").html(Math.round(1e3*l)/10),h(this).data("prevCellClone").css("width",d.width()*o).find(".preview-cell-weight").html(Math.round(1e3*o)/10)},stop:function(e,t){h(this).data("newCellClone").remove(),h(this).data("prevCellClone").remove(),o.find(".preview-cell-in").css("visibility","visible"),a.find(".preview-cell-in").css("visibility","visible");var i=(t.position.left+6)/d.width(),s=r.row.cells.at(n),l=r.row.cells.at(n-1);.02<s.get("weight")-i&&.02<l.get("weight")+i&&(s.set("weight",s.get("weight")-i),l.set("weight",l.get("weight")+i)),r.scaleRowWidths(),t.helper.css("left",-6)}})),o.click(function(e){if(h(e.target).is(".preview-cell")||h(e.target).is(".preview-cell-in")){var t=h(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),o.find(".preview-cell-weight").click(function(e){r.$(".resize-handle").css("pointer-event","none").draggable("disable"),d.find(".preview-cell-weight").each(function(){var e=jQuery(this).hide();h('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(e.html())).insertAfter(e).focus(function(){clearTimeout(t)}).keyup(function(e){9!==e.keyCode&&h(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),h(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var t=d.find(".preview-cell-weight-input"),i=t.index(h(this));i===t.length-1?t.eq(0).focus().select():t.eq(i+1).focus().select()}}).blur(function(){d.find(".preview-cell-weight-input").each(function(e,t){isNaN(parseFloat(h(t).val()))&&h(t).val(Math.floor(1e3*r.row.cells.at(e).get("weight"))/10)}),t=setTimeout(function(){if(0===d.find(".preview-cell-weight-input").length)return!1;var l=[],o=[],n=0,a=0;if(d.find(".preview-cell-weight-input").each(function(e,t){var i=parseFloat(h(t).val());i=isNaN(i)?1/r.row.cells.length:Math.round(10*i)/1e3;var s=!h(t).hasClass("no-user-interacted");l.push(i),o.push(s),s?n+=i:a+=i}),0<n&&0<a&&0<1-n)for(var e=0;e<l.length;e++)o[e]||(l[e]=l[e]/a*(1-n));var t=_.reduce(l,function(e,t){return e+t});l=l.map(function(e){return e/t}),.01<Math.min.apply(Math,l)&&r.row.cells.each(function(e,t){e.set("weight",l[t])}),d.find(".preview-cell").each(function(e,t){var i=r.row.cells.at(e).get("weight");h(t).animate({width:Math.round(1e3*i)/10+"%"},250),h(t).find(".preview-cell-weight-input").val(Math.round(1e3*i)/10)}),d.find(".preview-cell").css("overflow","visible"),setTimeout(r.regenerateRowPreview.bind(r),260)},100)}).click(function(){h(this).select()})}),h(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var i=-1;return this.$(".preview-cell .preview-cell-in").each(function(e,t){h(t).is(".cell-selected")&&(i=e)}),i},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.on("styles_loaded",function(e){e&&(t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"),t.show())})}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(-1<e){var t=this.cellStylesCache[e];t||((t=new a.view.styles).model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach(function(e){e.remove()}),this.cellStylesCache=[]},scaleRowWidths:function(){var s=this;this.$(".row-preview .preview-cell").each(function(e,t){var i=s.row.cells.at(e);h(t).css("width",100*i.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*i.get("weight"))/10)})},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):12<e.cells&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form select[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,s=1,l=0;l<e.cells;l++)t.push(s),s*=e.ratio;var o=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/o}),t=_.filter(t,function(e){return.01<e}),"left"===e.direction&&(t=t.reverse()),this.row.cells=new a.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new a.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),this.row.ratio=e.ratio,this.row.ratio_direction=e.direction,i)this.regenerateRowPreview();else{var n=this;this.$(".preview-cell").each(function(e,t){var i=n.row.cells.at(e).get("weight");h(t).animate({width:Math.round(1e3*i)/10+"%"},250),h(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)}),this.$(".preview-cell").css("overflow","visible"),setTimeout(n.regenerateRowPreview.bind(n),260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||(this.model.setCells(this.row.cells),this.model.set("ratio",this.row.ratio),this.model.set("ratio_direction",this.row.ratio_direction)),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.rowView.visualDestroyModel(),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery,o=e("../view/widgets/js-widget");t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.listenTo(this.model,"change:values",this.handleChangeValues),this.listenTo(this.model,"destroy",this.remove),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e||(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this)},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(0===i)return!1;do{if(t=e.eq(--i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t)&&0<i);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){this.$(".so-content").addClass("so-panels-loading");var e={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")},i=this.$(".so-content");l.post(panelsOptions.ajaxurl,e,null,"html").done(function(e){var t=e.replace(/{\$id}/g,this.model.cid);i.removeClass("so-panels-loading").html(t),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),0<i.find("> .widget-content").length&&o.addWidget(i,this.model.widget_id)}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,i.removeClass("so-panels-loading").html(t)})}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();t=_.isUndefined(t.widgets)?{}:(t=t.widgets)[Object.keys(t)[0]],this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.widgetView.visualDestroyModel(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.widgetView.duplicateHandler(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":31}],10:[function(e,t,i){var s=window.panels,o=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(o("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler"},initializeDialog:function(){this.on("open_dialog",function(){this.filter.search="",this.filterWidgets(this.filter)},this),this.on("open_dialog_complete",function(){this.$(".so-sidebar-search").val("").focus(),this.balanceWidgetHeights()}),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(o("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,function(e){var t=o(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),o('<span class="widget-icon" />').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))},this);var t=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,function(e){o(this.dialogTabTemplate({title:e.title})).data({message:e.message,filter:e.filter}).appendTo(t)},this),this.initTabs();var e=this;o(window).resize(function(){e.balanceWidgetHeights()})},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.click()}else this.filter.search=o(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(l){_.isUndefined(l)&&(l={}),_.isUndefined(l.groups)&&(l.groups=""),this.$(".widget-type-list .widget-type").each(function(){var e,t=o(this),i=t.data("class"),s=_.isUndefined(panelsOptions.widgets[i])?null:panelsOptions.widgets[i];(e=!!_.isEmpty(l.groups)||null!==s&&!_.isEmpty(_.intersection(l.groups,panelsOptions.widgets[i].groups)))&&(_.isUndefined(l.search)||""===l.search||-1===s.title.toLowerCase().indexOf(l.search.toLowerCase())&&(e=!1)),e?t.show():t.hide()}),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.trigger("before_user_adds_widget"),this.builder.addHistoryEntry("widget_added");var t=o(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData(),this.builder.trigger("after_user_adds_widget",i)},balanceWidgetHeights:function(e){var s=[[]],l=null,i=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each(function(e,t){e%i==0&&0!==e&&o(t).css("clear","both")}),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each(function(e,t){var i=o(t);null!==l&&l.position().top!==i.position().top&&(s[s.length]=[]),l=i,s[s.length-1].push(i)}),_.each(s,function(e,t){var i=_.max(e.map(function(e){return e.height()}));_.each(e,function(e){e.height(i)})})}})},{}],11:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e);return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&((t=JSON.parse(t)).thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t)).thingType&&t.thingType===e?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],13:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;(t=e.attributes[s])instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)(t=e.models[o])instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":(s=new panels.model.row).builder=i;var l={style:e.style};e.hasOwnProperty("label")&&(l.label=e.label),e.hasOwnProperty("color_label")&&(l.color_label=e.color_label),s.set(l),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":(s=new panels.model.cell).row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":for(var o in(s=new panels.model.widget).cell=i,e)e.hasOwnProperty(o)&&s.set(o,e[o]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var n=0;n<e.length;n++)s.push(this.unserialize(e[n],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(n=0;n<e.length;n++)s.push(this.unserialize(e[n],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[function(e,t,i){t.exports={generateUUID:function(){var i=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"==e?t:3&t|8).toString(16)})},processTemplate:function(e){return _.isUndefined(e)||_.isNull(e)?"":e=(e=(e=e.replace(/{{%/g,"<%")).replace(/%}}/g,"%>")).trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var d=window.panels,h=jQuery;t.exports=function(a,r){return this.each(function(){var e=jQuery(this);if(!e.data("soPanelsBuilderWidgetInitialized")||r){var t=e.closest("form").find(".widget-id").val(),i=h.extend(!0,{},a);if(_.isUndefined(t)||!(-1<t.indexOf("__i__"))){var s=new d.model.builder,l=new d.view.builder({model:s,config:i}),o=e.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(o)||(o.on("close_dialog",function(){s.refreshPanelsData()}),o.on("open_dialog_complete",function(){l.trigger("builder_resize")}),o.model.on("destroy",function(){s.emptyRows().destroy()}),l.setDialogParents(panelsOptions.loc.layout_widget,o));var n=Boolean(e.closest(".widget-content").length);l.render().attach({container:e,dialog:n||"dialog"===e.data("mode"),type:e.data("type")}).setDataField(e.find("input.panels-data")),n||"dialog"===e.data("mode")?(l.setDialogParents(panelsOptions.loc.layout_widget,l.dialog),e.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),l.dialog.openDialog()})):e.find(".siteorigin-panels-display-builder").parent().remove(),h(document).trigger("panels_setup",l),e.data("soPanelsBuilderWidgetInitialized",!0)}}})}},{}],16:[function(e,t,i){var s={};window.panels=s,(window.siteoriginPanels=s).helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery(function(i){var e,t,s,l,o=i("#siteorigin-panels-metabox");if(s=i("form#post"),o.length&&s.length)t=(e=o).find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:i("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==i("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorPreview:e.data("preview-url")};else if(i(".siteorigin-panels-builder-form").length){var n=i(".siteorigin-panels-builder-form");e=n.find(".siteorigin-panels-builder-container"),t=n.find('input[name="panels_data"]'),l={editorType:"standalone",postId:(s=n).data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:n.data("preview-url")}}if(!_.isUndefined(e)){var a=window.siteoriginPanels,r=new a.model.builder,d=new a.view.builder({model:r,config:l});d.render().attach({container:e}).setDataField(t).attachToEditor(),s.submit(function(){r.refreshPanelsData()}),e.removeClass("so-panels-loading"),i(document).trigger("panels_setup",d,window.panels)}i(document).on("widget-added",function(e,t){i(t).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()}),i("body").hasClass("wp-customizer")||i(function(){i(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()}),i(window).on("keyup",function(e){27===e.which&&i(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").click()})})},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return(l.builder=this).get("rows").add(l,i),l},loadPanelsData:function(s,e){try{e===this.layoutPosition.BEFORE?s=this.concatPanelsData(s,this.getPanelsData()):e===this.layoutPosition.AFTER&&(s=this.concatPanelsData(this.getPanelsData(),s)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(s)),{silent:!0});var t,i=[];if(_.isUndefined(s.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<s.grid_cells.length;l++)t=parseInt(s.grid_cells[l].grid),_.isUndefined(i[t])&&(i[t]=[]),i[t].push(s.grid_cells[l]);var o=this;if(_.each(i,function(e,t){var i={};_.isUndefined(s.grids[t].style)||(i.style=s.grids[t].style),_.isUndefined(s.grids[t].ratio)||(i.ratio=s.grids[t].ratio),_.isUndefined(s.grids[t].ratio_direction)||(i.ratio_direction=s.grids[t].ratio_direction),_.isUndefined(s.grids[t].color_label)||(i.color_label=s.grids[t].color_label),_.isUndefined(s.grids[t].label)||(i.label=s.grids[t].label),o.addRow(i,e,{noAnimate:!0})}),_.isUndefined(s.widgets))return;_.each(s.widgets,function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),(s.cell=i).get("widgets").add(s,{noAnimate:!0})}),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var a=t.widgets[i];a.panels_info.grid=parseInt(a.panels_info.grid)+s,a.panels_info.id=parseInt(a.panels_info.id)+l,o.widgets.push(a)}return o},getPanelsData:function(){var n={widgets:[],grids:[],grid_cells:[]},a=0;return this.get("rows").each(function(e,o){e.get("cells").each(function(e,l){e.get("widgets").each(function(e,t){var i={class:e.get("class"),raw:e.get("raw"),grid:o,cell:l,id:a++,widget_id:e.get("widget_id"),style:e.get("style"),label:e.get("label")};_.isEmpty(i.widget_id)&&(i.widget_id=panels.helpers.utils.generateUUID());var s=_.extend(_.clone(e.get("values")),{panels_info:i});n.widgets.push(s)}),n.grid_cells.push({grid:o,index:l,weight:e.get("weight"),style:e.get("style")})}),n.grids.push({cells:e.get("cells").length,style:e.get("style"),ratio:e.get("ratio"),ratio_direction:e.get("ratio_direction"),color_label:e.get("color_label"),label:e.get("label")})}),n},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,c){var t,u=this,i=jQuery('<div id="wrapper">'+e+"</div>");if(i.find(".panel-layout .panel-grid").length){var p={grids:[],grid_cells:[],widgets:[]},g=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),f=(t=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}),w=function(e){var t,i=e.find("div");if(!i.length)return e.html();for(t=0;t<i.length-1&&jQuery.trim(i.eq(t).text())==jQuery.trim(i.eq(t+1).text());t++);var s=i.eq(t).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:i.eq(t).html()}},s=i.find(".panel-layout").eq(0),l=function(e,t){return jQuery(t).closest(".panel-layout").is(s)};return i.find("> .panel-layout > .panel-grid").filter(l).each(function(h,e){var t=jQuery(e),i=t.find(".panel-grid-cell").filter(l);p.grids.push({cells:i.length,style:t.data("style"),ratio:t.data("ratio"),ratio_direction:t.data("ratio-direction"),color_label:t.data("color-label"),label:t.data("label")}),i.each(function(d,e){var t=jQuery(e),i=t.find(".so-panel").filter(l);p.grid_cells.push({grid:h,weight:_.isUndefined(t.data("weight"))?1:parseFloat(t.data("weight")),style:t.data("style")}),i.each(function(e,t){var i=jQuery(t),s=i.find(".panel-widget-style").length?i.find(".panel-widget-style").html():i.html(),l={grid:h,cell:d,style:i.data("style"),raw:!1,label:i.data("label")};s=s.trim();var o=g.exec(s);if(_.isNull(o)||""!==s.replace(g,"").trim())return-1!==s.indexOf("panel-layout")&&jQuery("<div>"+s+"</div>").find(".panel-layout .panel-grid").length?(l.class="SiteOrigin_Panels_Widgets_Layout",p.widgets.push({panels_data:u.getPanelsDataFromHtml(s,c),panels_info:l})):(l.class=c,p.widgets.push(_.extend(w(i),{filter:"1",type:"visual",panels_info:l}))),!0;try{var n=/class="(.*?)"/.exec(o[3]),a=jQuery(o[5]),r=JSON.parse(f(a.val())).instance;l.class=n[1].replace(/\\\\+/g,"\\"),l.raw=!1,r.panels_info=l,p.widgets.push(r)}catch(e){l.class=c,p.widgets.push(_.extend(w(i),{filter:"1",type:"visual",panels_info:l}))}return!0})})}),i.find(".panel-layout").remove(),i.find("style[data-panels-style-for-post]").remove(),i.html().replace(/^\s+|\s+$/gm,"").length&&(p.grids.push({cells:1,style:{}}),p.grid_cells.push({grid:p.grids.length-1,weight:1}),p.widgets.push({filter:"1",text:i.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:c,raw:!1,grid:p.grids.length-1,cell:0}})),p}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:c,raw:!1,grid:0,cell:0}}]}}})},{}],18:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each(function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})}),i}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(n){var a=this.get("cells")||new panels.collection.cells,r=[];a.each(function(e,t){var i=n.at(t);if(i)e.set("weight",i.get("weight"));else{for(var s=a.at(n.length-1),l=e.get("widgets").models.slice(),o=0;o<l.length;o++)l[o].moveToCell(s,{silent:!1});r.push(e)}}),_.each(r,function(e){a.remove(e)}),n.length>a.length&&_.each(n.slice(a.length,n.length),function(e){e.set({collection:a}),e.row=this,a.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var t=0,e=this.get("cells");e.each(function(e){t+=e.get("weight")}),e.each(function(e){e.set("weight",e.get("weight")/t)}),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each(function(e){i.add(e.clone(t),{silent:!0})}),t.set("cells",i),t}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(i){return _.each(i,function(e,t){_.isString(t)&&"_"===t[0]?delete i[t]:_.isObject(i[t])&&l(i[t])}),i};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)"_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.hasOwnProperty(s)&&i.push(s);for(var l in i=_.uniq(i))if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]],n=(o=o.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(n=n.slice(0,20)).join(" ")}return this.getWidgetField("description")}})},{}],22:[function(e,t,i){var s=window.panels,r=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var t=this;r(window).on("contextmenu",function(e){return t.active&&!t.isOverEl(t.$el,e)?(t.closeMenu(),t.active=!1,e.preventDefault(),!1):!!t.active||(t.active=!1,t.trigger("activate_context",e,t),void(t.active&&(e.preventDefault(),t.openMenu({left:e.pageX,top:e.pageY}))))})},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),r(window).on("keyup",{menu:this},this.keyboardListen),r(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",r(window).height()-20),e.left+this.$el.outerWidth()+10>=r(window).width()&&(e.left=r(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-r(window).scrollTop()+10>=r(window).height()&&(e.top=r(window).height()+r(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),r(window).off("keyup",this.keyboardListen),r(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var l=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var o=r(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(o),o.find(".so-item:not(.so-confirm)").click(function(){var e=r(this);s(e.data("key")),l.closeMenu()}),o.find(".so-item.so-confirm").click(function(){var e=r(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void l.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout(function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))},2500)}),o.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return 0<this.$el.find("#panels-menu-section-"+e).length},searchKeyUp:function(e){var t=r(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var l=i.find("ul li:visible"),o=l.filter(".so-active").eq(0);if(o.length){l.removeClass("so-active");var n=l.index(o);38===e.which?o=n-1<0?l.last():l.eq(n-1):40===e.which&&(o=n+1>=l.length?l.first():l.eq(n+1))}else 38===e.which?o=l.last():40===e.which&&(o=l.first());return o.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?i.find("ul li:visible").trigger("click"):i.find("ul li.so-active:visible").trigger("click"),!1;if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each(function(){var e=r(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()});i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],23:[function(e,t,i){var a=window.panels,n=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(a.helpers.utils.processTemplate(n("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var s=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",function(){this.displayLiveEditor()}),this.dialogs={widgets:new a.dialog.widgets,row:new a.dialog.row,prebuilt:new a.dialog.prebuilt},_.each(this.dialogs,function(e,t,i){i[t].setBuilder(s)}),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),n(window).resize(function(e){e.target===window&&s.trigger("builder_resize")}),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new a.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",function(){this.displayAttachedBuilder({confirm:!1})},this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new a.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),s=panelsOptions.loc.welcomeMessage,l=[];this.supports("addWidget")?l.push(s.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?l.push(s.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?l.push(s.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var o="";3===l.length?o=s.threeEnabled:2===l.length?o=s.twoEnabled:1===l.length?o=s.oneEnabled:0===l.length&&(o=s.addingDisabled);var n=_.template(a.helpers.utils.processTemplate(o))({items:l})+" "+s.docsMessage;return i.find(".so-message-wrapper").html(n),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var t=this.metabox,l=this;n("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click(function(e){e.preventDefault(),n("#wp-content-editor-container").show(),n("#wp-content-wrap").removeClass("panels-active"),n("#content-resize-handle").show(),l.trigger("hide_builder")}).end().append(n('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+t.find(".hndle span").html()+"</button>").click(function(e){l.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&t.find(".so-switch-to-standard").click(function(e){e.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(l.addHistoryEntry("back_to_editor"),l.model.loadPanelsData(!1),n("#wp-content-wrap").show(),t.hide(),n(window).resize(),l.attachedVisible=!1,l.trigger("hide_builder"))}).show(),t.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var e=this.model.get("data");_.isEmpty(e.widgets)&&_.isEmpty(e.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var i=function(){var e=l.$(".so-builder-toolbar");if(l.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void l.$el.css("padding-top",e.outerHeight());var t=n(window).scrollTop()-l.$el.offset().top;"fixed"===n("#wpadminbar").css("position")&&(t+=n("#wpadminbar").outerHeight());var i=0,s=l.$el.outerHeight()-e.outerHeight()+20;i<t&&t<s?"fixed"!==e.css("position")&&e.css({top:n("#wpadminbar").outerHeight(),left:l.$el.offset().left,width:l.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(t,0),l.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),l.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",i,this),n(document).scroll(i),i(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():n("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return n("#wp-content-wrap").hide(),n("#editor-expand-toggle").on("change.editor-expand",function(){n(this).prop("checked")||n("#wp-content-wrap").hide()}),this.metabox.show().find("> .inside").show(),n(window).resize(),n(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var o=this,e=o.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+e+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(e,t){o.model.get("rows").remove(n(t.item).data("view").model,{silent:!0}),o.model.refreshPanelsData()},receive:function(e,t){o.model.get("rows").add(n(t.item).data("view").model,{silent:!0,at:n(t.item).index()}),o.model.refreshPanelsData()},stop:function(e,t){var i=n(t.item),s=i.data("view"),l=o.model.get("rows");l.get(s.model)&&(o.addHistoryEntry("row_moved"),l.remove(s.model,{silent:!0}),l.add(s.model,{silent:!0,at:i.index()}),s.trigger("move",i.index()),o.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));n(this.dataField).val()!==e&&(n(this.dataField).val(e),n(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new a.view.row({model:e});s.builder=this,s.render(),_.isUndefined(i.at)||t.length<=1?s.$el.appendTo(this.$(".so-rows-container")):s.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&s.visualCreate(),this.refreshSortable(),s.resize(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var t=new a.model.row,e=new a.collection.cells([{weight:.5},{weight:.5}]);e.each(function(e){e.row=t}),t.set("cells",e),t.builder=this.model,this.dialogs.row.setRowModel(t),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=a.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof a.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)||(this.liveEditor=new a.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added")),this},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new a.dialog.history,(this.dialogs.history.builder=this).dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||n.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){n(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(n("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents")).initEvent("keyup",!0,!0):(e=document.createEventObject()).eventType="keyup",e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():n("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}n("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){n("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var t,e=(n.hasData(window)&&n._data(window)).events.scroll,i=0;i<e.length;i++)if("editor-expand"===e[i].namespace){t=e[i],n(window).unbind("scroll",t.handler),n(window).bind("scroll",function(e){this.attachedVisible||t.handler(e)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e&&(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow")),this},setDialogParents:function(s,l){_.each(this.dialogs,function(e,t,i){i[t].setParent(s,l)}),this.on("add_dialog",function(e){e.setParent(s,l)},this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(t,i){var e=this;if(n.contains(e.$el.get(0),t.target)){var s=n([]).add(e.$(".so-panels-welcome-message:visible")).add(e.$(".so-rows-container > .so-row-container")).add(e.$(".so-cells > .cell")).add(e.$(".cell-wrapper > .so-widget")).filter(function(e){return i.isOverEl(n(this),t)}),l=s.last().data("view");void 0!==l&&void 0!==l.buildContextualMenu?l.buildContextualMenu(t,i):s.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(t,i)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),a.helpers.clipboard.canCopyPaste()&&a.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],24:[function(e,t,i){var l=window.panels,r=jQuery;t.exports=Backbone.View.extend({template:_.template(l.helpers.utils.processTemplate(r("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var i=this;return this.model.get("widgets").each(function(e){var t=new l.view.widget({model:e});t.cell=i,t.render(),t.$el.appendTo(i.$(".widgets-container"))}),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var o=this,e=o.row.builder,t=e.$el.attr("id"),n=e.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(e,t){o.row.builder.trigger("widget_sortable_move")},remove:function(e,t){o.model.get("widgets").remove(r(t.item).data("view").model,{silent:!0}),n.refreshPanelsData()},receive:function(e,t){var i=r(t.item).data("view").model;i.cell=o.model,o.model.get("widgets").add(i,{silent:!0,at:r(t.item).index()}),n.refreshPanelsData()},stop:function(e,t){var i=r(t.item),s=i.data("view"),l=i.closest(".cell").data("view");o.model.get("widgets").get(s.model)&&(o.row.builder.addHistoryEntry("widget_moved"),s.model.moveToCell(l.model,{},i.index()),s.cell=l,n.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return 720<t.outerWidth()&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var o,n=this.$(".resize-handle").css("position","absolute"),e=this.row.$el,a=this;return n.draggable({axis:"x",containment:e,start:function(e,t){if(o=a.$el.prev().data("view"),!_.isUndefined(o)){var i=a.$el.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.$el.outerWidth(),left:5,height:a.$el.outerHeight()});i.find(".resize-handle").remove();var s=o.$el.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:o.$el.outerWidth(),right:5,height:o.$el.outerHeight()});s.find(".resize-handle").remove(),r(this).data({newCellClone:i,prevCellClone:s})}},drag:function(e,t){var i=a.row.$el.width()+10,s=a.model.get("weight")-(t.position.left+n.outerWidth()/2)/i,l=o.model.get("weight")+(t.position.left+n.outerWidth()/2)/i;r(this).data("newCellClone").css("width",i*s).find(".preview-cell-weight").html(Math.round(1e3*s)/10),r(this).data("prevCellClone").css("width",i*l).find(".preview-cell-weight").html(Math.round(1e3*l)/10)},stop:function(e,t){r(this).data("newCellClone").remove(),r(this).data("prevCellClone").remove();var i=a.row.$el.width()+10,s=a.model.get("weight")-(t.position.left+n.outerWidth()/2)/i,l=o.model.get("weight")+(t.position.left+n.outerWidth()/2)/i;.02<s&&.02<l&&(a.row.builder.addHistoryEntry("cell_resized"),a.model.set("weight",s),o.model.set("weight",l),a.row.resize()),t.helper.css("left",-n.outerWidth()/2),a.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new l.view.widget({model:e});s.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),s.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?s.$el.appendTo(this.$(".widgets-container")):s.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&s.visualCreate(),this.refreshSortable(),this.row.resize(),this.row.builder.trigger("widget_added")},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=l.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof l.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new l.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)});var s={};this.row.builder.supports("addWidget")&&l.helpers.clipboard.isModel("widget-model")&&(s.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(s)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},s,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],25:[function(e,t,i){var o=window.panels,d=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(o.helpers.utils.processTemplate(d("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(o.helpers.utils.processTemplate(d("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return(this.builder=e).trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=d(_.template(o.helpers.utils.processTemplate(e))(t)),s={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(s.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(s.right_sidebar=i.find(".right-sidebar").html()),s},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=d('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.click(function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(d(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var l=this;return e.click(function(e){e.preventDefault();var t=d(this);l.$(".so-sidebar-tabs li").removeClass("tab-active"),l.$(".so-content .so-content-tabs > *").hide(),t.parent().addClass("tab-active");var i=t.attr("href");if(!_.isUndefined(i)&&"#"===i.charAt(0)){var s=i.split("#")[1];l.$(".so-content .so-content-tabs .tab-"+s).show()}l.trigger("tab_click",t)}),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",d(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=d(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),d("html").click(function(l){this.$(".so-dropdown-links-wrapper").not(".hidden").each(function(e,t){var i=d(t),s=d(l.target);0!==s.length&&(s.is(".so-needs-confirm")&&!s.is(".so-confirmed")||s.is(".so-dropdown-button"))||i.addClass("hidden")})}.bind(this))},initEditableLabel:function(){var l=this.$(".so-title-bar .so-title-editable");l.keypress(function(e){var t="keypress"===e.type&&13===e.keyCode;if(t){var i=d(":tabbable"),s=i.index(l);i.eq(s+1).focus(),window.getSelection().removeAllRanges()}return!t}).blur(function(){var e=l.text().replace(/^\s+|\s+$/gm,"");e!==l.data("original-value").replace(/^\s+|\s+$/gm,"")&&(l.text(e),this.trigger("edit_label",e))}.bind(this)),l.focus(function(){l.data("original-value",l.text()),o.helpers.utils.selectElementContents(this)})},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),o.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),d(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),o.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var a,t=this.$(e),r={};return t.find("[name]").each(function(){var t=d(this);try{var e=/([A-Za-z_]+)\[(.*)\]/.exec(t.attr("name"));if(_.isEmpty(e))return!0;_.isUndefined(e[2])?a=t.attr("name"):(a=e[2].split("][")).unshift(e[1]),a=a.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var i=r,s=null,l=!!_.isString(t.attr("type"))&&t.attr("type").toLowerCase();if("checkbox"===l)s=t.is(":checked")?""===t.val()||t.val():null;else if("radio"===l){if(!t.is(":checked"))return;s=t.val()}else if("SELECT"===t.prop("tagName")){var o=t.find("option:selected");1===o.length?s=t.find("option:selected").val():1<o.length&&(s=_.map(t.find("option:selected"),function(e,t){return d(e).val()}))}else s=t.val();if(!_.isUndefined(t.data("panels-filter")))switch(t.data("panels-filter")){case"json_parse":try{s=JSON.parse(s)}catch(e){s=""}}if(null!==s)for(var n=0;n<a.length;n++)n===a.length-1?""===a[n]?i.push(s):i[a[n]]=s:(_.isUndefined(i[a[n]])&&(""===a[n+1]?i[a[n]]=[]:i[a[n]]={}),i=i[a[n]])}catch(e){console.log("Field ["+t.attr("name")+"] could not be processed and was skipped - "+e.message)}}),r},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var s=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(e){var t=this.$(".so-"+e+"-sidebar"),i=this.$(".so-show-"+e+"-sidebar");this.hasSidebar(e)?(i.hide(),s.matches?(i.show(),i.closest(".so-title-bar").addClass("so-has-"+e+"-button"),t.hide(),t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+e+"-sidebar")):(i.hide(),i.closest(".so-title-bar").removeClass("so-has-"+e+"-button"),t.show(),t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+e+"-sidebar"))):(t.hide(),i.hide())}.bind(this))},hasSidebar:function(e){return 0<this.$(".so-"+e+"-sidebar").children().length},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],26:[function(e,t,i){var s=window.panels,o=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(o("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),0<o("#submitdiv #save-post").length){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;o(document).mousedown(function(){t=!0}).mouseup(function(){t=!1});var i=this;return this.$el.on("mouseenter",".so-widget-wrapper",function(){var e=o(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))}),this.$el.on("mouseleave",".so-widget-wrapper",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",function(){this.resetHighlights()}),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===o("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===o('#title[name="post_title"]').val()&&o('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),o(document).one("heartbeat-tick.autosave",function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())}),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},closeAndSave:function(){this.close(),o('#submitdiv input[type="submit"][name="save"]').click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return 0===o(this).parents(".so-panel").length}).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout(function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")},100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,function(e,t){return e+t},0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=o('<iframe src="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var l=o('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return o.each(e,function(e,t){o('<input type="hidden" />').attr({name:e,value:t}).appendTo(l)}),l.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var l=this;e.data("iframeready",!1).on("iframeready",function(){var e=o(this),t=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(l.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(l.loadTimes)||(l.loadTimes=l.loadTimes.slice(0,4))),setTimeout(function(){t.scrollTop(l.previewScrollTop),l.$(".so-preview-overlay").hide()},100);var i=t.find("#pl-"+l.builder.config.postId);i.find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return o(this).closest(".panel-layout").is(i)}).each(function(e,t){var i=o(t),s=l.$(".so-live-editor-builder .so-widget-wrapper").eq(i.data("index"));s.data("live-editor-preview-widget",i),i.css({cursor:"pointer"}).mouseenter(function(){s.parent().addClass("so-hovered"),l.highlightElement(i)}).mouseleave(function(){s.parent().removeClass("so-hovered"),l.resetHighlights()}).click(function(e){e.preventDefault(),s.find(".title h4").click()})}),t.find("a").css({"pointer-events":"none"}).click(function(e){e.preventDefault()})}}).on("load",function(){var e=o(this);e.data("iframeready")||e.trigger("iframeready")})},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=o(e.currentTarget);this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode")}})},{}],27:[function(e,t,i){var n=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(n.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resize),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),e.on("add",function(e){t.listenTo(e.get("widgets"),"add",t.resize)},this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each(function(e){var t=new n.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))}),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resize),this.listenTo(this.builder,"builder_resize",this.resize),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",function(){e.model.destroy(),e.builder.model.refreshPanelsData()})},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){n.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=n.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof n.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout(function(){t.removeClass("so-confirmed").html(i)},2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new n.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new n.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(t){this.$(".so-cells > .cell").each(function(){var e=l(this).data("view");_.isUndefined(e)||e.model.cid===t.cid&&e.remove()})},buildContextualMenu:function(e,t){for(var i=[],s=1;s<5;s++)i.push({title:s+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],s=0;s<t;s++)i.push({weight:100/t});var l=new n.model.row({collection:this.collection}),o=new n.collection.cells(i);o.each(function(e){e.row=l}),l.setCells(o),l.builder=this.builder.model,this.builder.model.get("rows").add(l,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var l={};this.builder.supports("editRow")&&(l.edit={title:panelsOptions.loc.contextual.row_edit}),n.helpers.clipboard.canCopyPaste()&&(l.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&n.helpers.clipboard.isModel("row-model")&&(l.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(l.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(l.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(l)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},l,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],28:[function(e,t,i){window.panels;var d=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var s={builderType:i.builderType};return"cell"===e&&(s.index=i.index),d.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(s),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each(function(){var t=d(this);t.find(".style-section-head").click(function(e){e.preventDefault(),t.find(".style-section-fields").slideToggle("fast")})}),_.isUndefined(d.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!d.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=d.map(panelsOptions.wpColorPickerOptions.palettes,function(e){return e})),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each(function(){var s=null,l=d(this);l.find(".so-image-selector").click(function(e){e.preventDefault(),null===s&&(s=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",function(){var t=s.state().get("selection").first().attributes,i=t.url;if(!_.isUndefined(t.sizes))try{i=t.sizes.thumbnail.url}catch(e){i=t.sizes.full.url}l.find(".current-image").css("background-image","url("+i+")"),l.find(".so-image-selector > input").val(t.id),l.find(".remove-image").removeClass("hidden")}),s.open()}),l.find(".remove-image").click(function(e){e.preventDefault(),l.find(".current-image").css("background-image","none"),l.find(".so-image-selector > input").val(""),l.find(".remove-image").addClass("hidden")})}),this.$(".style-field-measurement").each(function(){var e=d(this),n=e.find('input[type="text"]'),a=e.find("select"),r=e.find('input[type="hidden"]');n.focus(function(){d(this).select()});!function(e){if(""!==e){var t=/(?:([0-9\.,\-]+)(.*))+/,i=r.val().split(" "),s=[];for(var l in i){var o=t.exec(i[l]);_.isNull(o)||_.isUndefined(o[1])||_.isUndefined(o[2])||(s.push(o[1]),a.val(o[2]))}1===n.length?n.val(s.join(" ")):(1===s.length?s=[s[0],s[0],s[0],s[0]]:2===s.length?s=[s[0],s[1],s[0],s[1]]:3===s.length&&(s=[s[0],s[1],s[2],s[1]]),n.each(function(e,t){d(t).val(s[e])}))}}(r.val());var t=function(e){if(1===n.length){var t=n.val().split(" ").filter(function(e){return""!==e}).map(function(e){return e+a.val()}).join(" ");r.val(t)}else{var i=d(e.target),s=[],l=[],o=[];n.each(function(e,t){var i=""!==d(t).val()?parseFloat(d(t).val()):null;s.push(i),null===i?l.push(e):o.push(e)}),3===l.length&&o[0]===n.index(i)&&(n.val(i.val()),s=[i.val(),i.val(),i.val(),i.val()]),JSON.stringify(s)===JSON.stringify([null,null,null,null])?r.val(""):r.val(s.map(function(e){return(null===e?0:e)+a.val()}).join(" "))}};n.change(t),a.change(t)})}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")||this.getEditDialog().openDialog(),this},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resize(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],30:[function(e,t,i){var a=jQuery,s={addWidget:function(e,t,i){var s=wp.customHtmlWidgets,l=a("<div></div>"),o=t.find(".widget-content:first");o.before(l);var n=new s.CustomHtmlWidgetControl({el:l,syncContainer:o});return n.initializeEditor(),n.editor.codemirror.refresh(),n}};t.exports=s},{}],31:[function(e,t,i){var l=e("./custom-html-widget"),o=e("./media-widget"),n=e("./text-widget"),s={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,s=e.find("> .id_base").val();switch(s){case this.CUSTOM_HTML:i=l;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=o;break;case this.TEXT:i=n}i.addWidget(s,e,t)}};t.exports=s},{"./custom-html-widget":30,"./media-widget":32,"./text-widget":33}],32:[function(e,t,i){var h=jQuery,s={addWidget:function(e,t,i){var s=wp.mediaWidgets,l=s.controlConstructors[e];if(l){var o=s.modelConstructors[e]||s.MediaWidgetModel,n=t.find("> .widget-content"),a=h('<div class="media-widget-control"></div>');n.before(a);var r={};n.find(".media-widget-instance-property").each(function(){var e=h(this);r[e.data("property")]=e.val()}),r.widget_id=i;var d=new l({el:a,syncContainer:n,model:new o(r)});return d.render(),d}}};t.exports=s},{}],33:[function(e,t,i){var h=jQuery,s={addWidget:function(e,t,i){var s=wp.textWidgets,l={},o=t.find(".visual");if(0<o.length){if(!o.val())return null;var n=h("<div></div>"),a=t.find(".widget-content:first");a.before(n),l={el:n,syncContainer:a}}else l={el:t};var r=new s.TextWidgetControl(l),d=wp.oldEditor?wp.oldEditor:wp.editor;return d&&d.hasOwnProperty("autop")&&(wp.editor.autop=d.autop,wp.editor.removep=d.removep,wp.editor.initialize=d.initialize),r.initializeEditor(),r}};t.exports=s},{}]},{},[16]);
trunk/js/styling-2101.js → js/styling-2102.js RENAMED
@@ -44,8 +44,8 @@ jQuery( function ( $ ) {
44
  }
45
 
46
  $$.css( {
47
- 'border-left': 0,
48
- 'border-right': 0
49
  } );
50
  } );
51
 
44
  }
45
 
46
  $$.css( {
47
+ 'border-left': defaultSidePadding,
48
+ 'border-right': defaultSidePadding
49
  } );
50
  } );
51
 
trunk/js/styling-2101.min.js → js/styling-2102.min.js RENAMED
@@ -1 +1 @@
1
- jQuery(function(a){var d=a(panelsStyles.fullContainer);0===d.length&&(d=a("body"));var e=function(){var e=a(".siteorigin-panels-stretch.panel-row-style");e.each(function(){var e=a(this),t=e.data("stretch-type"),r="full-stretched-padded"===t?"":0;e.css({"margin-left":0,"margin-right":0,"padding-left":r,"padding-right":r});var i=e.offset().left-d.offset().left,n=d.outerWidth()-i-e.parent().outerWidth();e.css({"margin-left":-i,"margin-right":-n,"padding-left":"full"===t?i:r,"padding-right":"full"===t?n:r});var l=e.find("> .panel-grid-cell");"full-stretched"===t&&1===l.length&&l.css({"padding-left":0,"padding-right":0}),e.css({"border-left":0,"border-right":0})}),e.length&&a(window).trigger("panelsStretchRows")};a(window).on("resize load",e),e(),a("body").removeClass("siteorigin-panels-before-js")});
1
+ jQuery(function(a){var d=a(panelsStyles.fullContainer);0===d.length&&(d=a("body"));var e=function(){var e=a(".siteorigin-panels-stretch.panel-row-style");e.each(function(){var e=a(this),t=e.data("stretch-type"),r="full-stretched-padded"===t?"":0;e.css({"margin-left":0,"margin-right":0,"padding-left":r,"padding-right":r});var i=e.offset().left-d.offset().left,n=d.outerWidth()-i-e.parent().outerWidth();e.css({"margin-left":-i,"margin-right":-n,"padding-left":"full"===t?i:r,"padding-right":"full"===t?n:r});var l=e.find("> .panel-grid-cell");"full-stretched"===t&&1===l.length&&l.css({"padding-left":0,"padding-right":0}),e.css({"border-left":r,"border-right":r})}),e.length&&a(window).trigger("panelsStretchRows")};a(window).on("resize load",e),e(),a("body").removeClass("siteorigin-panels-before-js")});
lang/siteorigin-panels.pot CHANGED
@@ -16,7 +16,7 @@ msgstr ""
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
- #: compat/layout-block.php:86
20
  msgid "You need to add a widget, row, or prebuilt layout before you'll see anything here. :)"
21
  msgstr ""
22
 
@@ -44,7 +44,7 @@ msgstr ""
44
  msgid "(email SiteOrigin support)"
45
  msgstr ""
46
 
47
- #: inc/admin-dashboard.php:95, inc/admin.php:158
48
  msgid "Support Forum"
49
  msgstr ""
50
 
@@ -121,371 +121,371 @@ msgstr ""
121
  msgid "Installing %s"
122
  msgstr ""
123
 
124
- #: inc/admin.php:161, tpl/js-templates.php:44
125
  msgid "Addons"
126
  msgstr ""
127
 
128
- #: inc/admin.php:175, inc/admin.php:571, inc/admin.php:1156, inc/admin.php:1161, inc/settings.php:198, tpl/js-templates.php:197
129
  msgid "Page Builder"
130
  msgstr ""
131
 
132
- #: inc/admin.php:327
133
  msgid "All Widgets"
134
  msgstr ""
135
 
136
- #: inc/admin.php:354
137
  msgid "Missing Widget"
138
  msgstr ""
139
 
140
- #: inc/admin.php:355
141
  msgid "Page Builder doesn't know about this widget."
142
  msgstr ""
143
 
144
  #. translators: Number of seconds since
145
- #: inc/admin.php:359
146
  msgid "%d seconds"
147
  msgstr ""
148
 
149
  #. translators: Number of minutes since
150
- #: inc/admin.php:361
151
  msgid "%d minutes"
152
  msgstr ""
153
 
154
  #. translators: Number of hours since
155
- #: inc/admin.php:363
156
  msgid "%d hours"
157
  msgstr ""
158
 
159
  #. translators: A single second since
160
- #: inc/admin.php:366
161
  msgid "%d second"
162
  msgstr ""
163
 
164
  #. translators: A single minute since
165
- #: inc/admin.php:368
166
  msgid "%d minute"
167
  msgstr ""
168
 
169
  #. translators: A single hour since
170
- #: inc/admin.php:370
171
  msgid "%d hour"
172
  msgstr ""
173
 
174
  #. translators: Time ago - eg. "1 minute before".
175
- #: inc/admin.php:373
176
  msgid "%s before"
177
  msgstr ""
178
 
179
- #: inc/admin.php:374
180
  msgid "Now"
181
  msgstr ""
182
 
183
- #: inc/admin.php:378
184
  msgid "Current"
185
  msgstr ""
186
 
187
- #: inc/admin.php:379
188
  msgid "Original"
189
  msgstr ""
190
 
191
- #: inc/admin.php:380
192
  msgid "Version restored"
193
  msgstr ""
194
 
195
- #: inc/admin.php:381
196
  msgid "Converted to editor"
197
  msgstr ""
198
 
199
  #. translators: Message displayed in the history when a widget is deleted
200
- #: inc/admin.php:385
201
  msgid "Widget deleted"
202
  msgstr ""
203
 
204
  #. translators: Message displayed in the history when a widget is added
205
- #: inc/admin.php:387
206
  msgid "Widget added"
207
  msgstr ""
208
 
209
  #. translators: Message displayed in the history when a widget is edited
210
- #: inc/admin.php:389
211
  msgid "Widget edited"
212
  msgstr ""
213
 
214
  #. translators: Message displayed in the history when a widget is duplicated
215
- #: inc/admin.php:391
216
  msgid "Widget duplicated"
217
  msgstr ""
218
 
219
  #. translators: Message displayed in the history when a widget position is changed
220
- #: inc/admin.php:393
221
  msgid "Widget moved"
222
  msgstr ""
223
 
224
  #. translators: Message displayed in the history when a row is deleted
225
- #: inc/admin.php:397
226
  msgid "Row deleted"
227
  msgstr ""
228
 
229
  #. translators: Message displayed in the history when a row is added
230
- #: inc/admin.php:399
231
  msgid "Row added"
232
  msgstr ""
233
 
234
  #. translators: Message displayed in the history when a row is edited
235
- #: inc/admin.php:401
236
  msgid "Row edited"
237
  msgstr ""
238
 
239
  #. translators: Message displayed in the history when a row position is changed
240
- #: inc/admin.php:403
241
  msgid "Row moved"
242
  msgstr ""
243
 
244
  #. translators: Message displayed in the history when a row is duplicated
245
- #: inc/admin.php:405
246
  msgid "Row duplicated"
247
  msgstr ""
248
 
249
  #. translators: Message displayed in the history when a row is pasted
250
- #: inc/admin.php:407
251
  msgid "Row pasted"
252
  msgstr ""
253
 
254
- #: inc/admin.php:410
255
  msgid "Cell resized"
256
  msgstr ""
257
 
258
- #: inc/admin.php:413
259
  msgid "Prebuilt layout loaded"
260
  msgstr ""
261
 
262
- #: inc/admin.php:417
263
  msgid "Loading prebuilt layout"
264
  msgstr ""
265
 
266
- #: inc/admin.php:418
267
  msgid "Would you like to copy this editor's existing content to Page Builder?"
268
  msgstr ""
269
 
270
- #: inc/admin.php:419
271
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
272
  msgstr ""
273
 
274
  #. translators: This is the title for a widget called "Layout Builder"
275
- #: inc/admin.php:421
276
  msgid "Layout Builder Widget"
277
  msgstr ""
278
 
279
  #. translators: A standard confirmation message
280
- #: inc/admin.php:423, tpl/js-templates.php:97, tpl/js-templates.php:422
281
  msgid "Are you sure?"
282
  msgstr ""
283
 
284
  #. translators: When a layout file is ready to be inserted. %s is the filename.
285
- #: inc/admin.php:425
286
  msgid "%s is ready to insert."
287
  msgstr ""
288
 
289
- #: inc/admin.php:429
290
  msgid "Add Widget Below"
291
  msgstr ""
292
 
293
- #: inc/admin.php:430
294
  msgid "Add Widget to Cell"
295
  msgstr ""
296
 
297
- #: inc/admin.php:431, tpl/js-templates.php:224
298
  msgid "Search Widgets"
299
  msgstr ""
300
 
301
- #: inc/admin.php:433, tpl/js-templates.php:17, tpl/js-templates.php:19
302
  msgid "Add Row"
303
  msgstr ""
304
 
305
- #: inc/admin.php:434
306
  msgid "Column"
307
  msgstr ""
308
 
309
- #: inc/admin.php:436
310
  msgid "Cell Actions"
311
  msgstr ""
312
 
313
- #: inc/admin.php:437
314
  msgid "Paste Widget"
315
  msgstr ""
316
 
317
- #: inc/admin.php:439
318
  msgid "Widget Actions"
319
  msgstr ""
320
 
321
- #: inc/admin.php:440
322
  msgid "Edit Widget"
323
  msgstr ""
324
 
325
- #: inc/admin.php:441
326
  msgid "Duplicate Widget"
327
  msgstr ""
328
 
329
- #: inc/admin.php:442
330
  msgid "Delete Widget"
331
  msgstr ""
332
 
333
- #: inc/admin.php:443
334
  msgid "Copy Widget"
335
  msgstr ""
336
 
337
- #: inc/admin.php:444
338
  msgid "Paste Widget Below"
339
  msgstr ""
340
 
341
- #: inc/admin.php:446
342
  msgid "Row Actions"
343
  msgstr ""
344
 
345
- #: inc/admin.php:447, tpl/js-templates.php:95
346
  msgid "Edit Row"
347
  msgstr ""
348
 
349
- #: inc/admin.php:448, tpl/js-templates.php:96
350
  msgid "Duplicate Row"
351
  msgstr ""
352
 
353
- #: inc/admin.php:449, tpl/js-templates.php:97
354
  msgid "Delete Row"
355
  msgstr ""
356
 
357
- #: inc/admin.php:450
358
  msgid "Copy Row"
359
  msgstr ""
360
 
361
- #: inc/admin.php:451
362
  msgid "Paste Row"
363
  msgstr ""
364
 
365
- #: inc/admin.php:453
366
  msgid "Draft"
367
  msgstr ""
368
 
369
- #: inc/admin.php:454
370
  msgid "Untitled"
371
  msgstr ""
372
 
373
- #: inc/admin.php:456
374
  msgid "New Row"
375
  msgstr ""
376
 
377
- #: inc/admin.php:457, inc/admin.php:465, inc/styles.php:184, tpl/js-templates.php:62
378
  msgid "Row"
379
  msgstr ""
380
 
381
- #: inc/admin.php:460
382
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
383
  msgstr ""
384
 
385
- #: inc/admin.php:461
386
  msgid "Add a {{%= items[0] %}} to get started."
387
  msgstr ""
388
 
389
- #: inc/admin.php:462
390
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
391
  msgstr ""
392
 
393
- #: inc/admin.php:463
394
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
395
  msgstr ""
396
 
397
- #: inc/admin.php:464, inc/styles.php:318, tpl/js-templates.php:61
398
  msgid "Widget"
399
  msgstr ""
400
 
401
- #: inc/admin.php:466, tpl/js-templates.php:63
402
  msgid "Prebuilt Layout"
403
  msgstr ""
404
 
405
- #: inc/admin.php:468
406
  msgid "Read our %s if you need help."
407
  msgstr ""
408
 
409
- #: inc/admin.php:469, tpl/js-templates.php:64
410
  msgid "documentation"
411
  msgstr ""
412
 
413
- #: inc/admin.php:478
414
  msgid "Page Builder layouts"
415
  msgstr ""
416
 
417
- #: inc/admin.php:479
418
  msgid "Error uploading or importing file."
419
  msgstr ""
420
 
421
- #: inc/admin.php:486
422
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
423
  msgstr ""
424
 
425
  #. translators: This is the default name given to a user's home page
426
- #: inc/admin.php:654, inc/home.php:26
427
  msgid "Home Page"
428
  msgstr ""
429
 
430
- #: inc/admin.php:755
431
  msgid "Untitled Widget"
432
  msgstr ""
433
 
434
- #: inc/admin.php:935
435
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
436
  msgstr ""
437
 
438
- #: inc/admin.php:941
439
  msgid "Save and reload this page to start using the widget after you've installed it."
440
  msgstr ""
441
 
442
- #: inc/admin.php:957
443
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
444
  msgstr ""
445
 
446
- #: inc/admin.php:1072, inc/styles-admin.php:23
447
  msgid "The supplied nonce is invalid."
448
  msgstr ""
449
 
450
- #: inc/admin.php:1073, inc/styles-admin.php:24
451
  msgid "Invalid nonce."
452
  msgstr ""
453
 
454
- #: inc/admin.php:1079
455
  msgid "Please specify the type of widget form to be rendered."
456
  msgstr ""
457
 
458
- #: inc/admin.php:1080
459
  msgid "Missing widget type."
460
  msgstr ""
461
 
462
- #: inc/admin.php:1174
463
  msgid "%s Widget"
464
  msgid_plural "%s Widgets"
465
  msgstr[0] ""
466
  msgstr[1] ""
467
 
468
- #: inc/admin.php:1217
469
  msgid "Get a lightbox addon for SiteOrigin widgets"
470
  msgstr ""
471
 
472
- #: inc/admin.php:1221
473
  msgid "Get the row, cell and widget animations addon"
474
  msgstr ""
475
 
476
- #: inc/admin.php:1225
477
  msgid "Get premium email support for SiteOrigin Page Builder"
478
  msgstr ""
479
 
480
- #: inc/admin.php:1416
481
  msgid "Toggle editor selection menu"
482
  msgstr ""
483
 
484
- #: inc/admin.php:1417, inc/admin.php:1464, inc/settings.php:198, settings/tpl/settings.php:9
485
  msgid "SiteOrigin Page Builder"
486
  msgstr ""
487
 
488
- #: inc/admin.php:1418
489
  msgid "Block Editor"
490
  msgstr ""
491
 
@@ -1262,15 +1262,15 @@ msgstr ""
1262
  msgid "https://siteorigin.com"
1263
  msgstr ""
1264
 
1265
- #: siteorigin-panels.php:325
1266
  msgid "Read More"
1267
  msgstr ""
1268
 
1269
- #: siteorigin-panels.php:473
1270
  msgid "Edit Home Page"
1271
  msgstr ""
1272
 
1273
- #: siteorigin-panels.php:493, tpl/js-templates.php:34, tpl/js-templates.php:36
1274
  msgid "Live Editor"
1275
  msgstr ""
1276
 
@@ -1354,7 +1354,7 @@ msgstr ""
1354
  msgid "Delete"
1355
  msgstr ""
1356
 
1357
- #: tpl/js-templates.php:206, tpl/js-templates.php:271, tpl/js-templates.php:360, tpl/js-templates.php:554
1358
  msgid "Done"
1359
  msgstr ""
1360
 
@@ -1362,7 +1362,7 @@ msgstr ""
1362
  msgid "Add New Widget %s"
1363
  msgstr ""
1364
 
1365
- #: tpl/js-templates.php:236
1366
  msgid "Close"
1367
  msgstr ""
1368
 
@@ -1458,31 +1458,31 @@ msgstr ""
1458
  msgid "Restore Version"
1459
  msgstr ""
1460
 
1461
- #: tpl/js-templates.php:548, tpl/js-templates.php:549
1462
- msgid "Collapse"
1463
  msgstr ""
1464
 
1465
- #: tpl/js-templates.php:548
1466
- msgid "Expand"
1467
  msgstr ""
1468
 
1469
- #: tpl/js-templates.php:556
1470
  msgid "Toggle desktop mode"
1471
  msgstr ""
1472
 
1473
- #: tpl/js-templates.php:559
1474
  msgid "Toggle tablet mode"
1475
  msgstr ""
1476
 
1477
- #: tpl/js-templates.php:562
1478
  msgid "Toggle mobile mode"
1479
  msgstr ""
1480
 
1481
- #: tpl/js-templates.php:601
1482
  msgid "No Results"
1483
  msgstr ""
1484
 
1485
- #: tpl/js-templates.php:611
1486
  msgid "Add SiteOrigin Layout Block"
1487
  msgstr ""
1488
 
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
 
19
+ #: compat/layout-block.php:87
20
  msgid "You need to add a widget, row, or prebuilt layout before you'll see anything here. :)"
21
  msgstr ""
22
 
44
  msgid "(email SiteOrigin support)"
45
  msgstr ""
46
 
47
+ #: inc/admin-dashboard.php:95, inc/admin.php:159
48
  msgid "Support Forum"
49
  msgstr ""
50
 
121
  msgid "Installing %s"
122
  msgstr ""
123
 
124
+ #: inc/admin.php:162, tpl/js-templates.php:44
125
  msgid "Addons"
126
  msgstr ""
127
 
128
+ #: inc/admin.php:176, inc/admin.php:572, inc/admin.php:1170, inc/admin.php:1175, inc/settings.php:198, tpl/js-templates.php:197
129
  msgid "Page Builder"
130
  msgstr ""
131
 
132
+ #: inc/admin.php:328
133
  msgid "All Widgets"
134
  msgstr ""
135
 
136
+ #: inc/admin.php:355
137
  msgid "Missing Widget"
138
  msgstr ""
139
 
140
+ #: inc/admin.php:356
141
  msgid "Page Builder doesn't know about this widget."
142
  msgstr ""
143
 
144
  #. translators: Number of seconds since
145
+ #: inc/admin.php:360
146
  msgid "%d seconds"
147
  msgstr ""
148
 
149
  #. translators: Number of minutes since
150
+ #: inc/admin.php:362
151
  msgid "%d minutes"
152
  msgstr ""
153
 
154
  #. translators: Number of hours since
155
+ #: inc/admin.php:364
156
  msgid "%d hours"
157
  msgstr ""
158
 
159
  #. translators: A single second since
160
+ #: inc/admin.php:367
161
  msgid "%d second"
162
  msgstr ""
163
 
164
  #. translators: A single minute since
165
+ #: inc/admin.php:369
166
  msgid "%d minute"
167
  msgstr ""
168
 
169
  #. translators: A single hour since
170
+ #: inc/admin.php:371
171
  msgid "%d hour"
172
  msgstr ""
173
 
174
  #. translators: Time ago - eg. "1 minute before".
175
+ #: inc/admin.php:374
176
  msgid "%s before"
177
  msgstr ""
178
 
179
+ #: inc/admin.php:375
180
  msgid "Now"
181
  msgstr ""
182
 
183
+ #: inc/admin.php:379
184
  msgid "Current"
185
  msgstr ""
186
 
187
+ #: inc/admin.php:380
188
  msgid "Original"
189
  msgstr ""
190
 
191
+ #: inc/admin.php:381
192
  msgid "Version restored"
193
  msgstr ""
194
 
195
+ #: inc/admin.php:382
196
  msgid "Converted to editor"
197
  msgstr ""
198
 
199
  #. translators: Message displayed in the history when a widget is deleted
200
+ #: inc/admin.php:386
201
  msgid "Widget deleted"
202
  msgstr ""
203
 
204
  #. translators: Message displayed in the history when a widget is added
205
+ #: inc/admin.php:388
206
  msgid "Widget added"
207
  msgstr ""
208
 
209
  #. translators: Message displayed in the history when a widget is edited
210
+ #: inc/admin.php:390
211
  msgid "Widget edited"
212
  msgstr ""
213
 
214
  #. translators: Message displayed in the history when a widget is duplicated
215
+ #: inc/admin.php:392
216
  msgid "Widget duplicated"
217
  msgstr ""
218
 
219
  #. translators: Message displayed in the history when a widget position is changed
220
+ #: inc/admin.php:394
221
  msgid "Widget moved"
222
  msgstr ""
223
 
224
  #. translators: Message displayed in the history when a row is deleted
225
+ #: inc/admin.php:398
226
  msgid "Row deleted"
227
  msgstr ""
228
 
229
  #. translators: Message displayed in the history when a row is added
230
+ #: inc/admin.php:400
231
  msgid "Row added"
232
  msgstr ""
233
 
234
  #. translators: Message displayed in the history when a row is edited
235
+ #: inc/admin.php:402
236
  msgid "Row edited"
237
  msgstr ""
238
 
239
  #. translators: Message displayed in the history when a row position is changed
240
+ #: inc/admin.php:404
241
  msgid "Row moved"
242
  msgstr ""
243
 
244
  #. translators: Message displayed in the history when a row is duplicated
245
+ #: inc/admin.php:406
246
  msgid "Row duplicated"
247
  msgstr ""
248
 
249
  #. translators: Message displayed in the history when a row is pasted
250
+ #: inc/admin.php:408
251
  msgid "Row pasted"
252
  msgstr ""
253
 
254
+ #: inc/admin.php:411
255
  msgid "Cell resized"
256
  msgstr ""
257
 
258
+ #: inc/admin.php:414
259
  msgid "Prebuilt layout loaded"
260
  msgstr ""
261
 
262
+ #: inc/admin.php:418
263
  msgid "Loading prebuilt layout"
264
  msgstr ""
265
 
266
+ #: inc/admin.php:419
267
  msgid "Would you like to copy this editor's existing content to Page Builder?"
268
  msgstr ""
269
 
270
+ #: inc/admin.php:420
271
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
272
  msgstr ""
273
 
274
  #. translators: This is the title for a widget called "Layout Builder"
275
+ #: inc/admin.php:422
276
  msgid "Layout Builder Widget"
277
  msgstr ""
278
 
279
  #. translators: A standard confirmation message
280
+ #: inc/admin.php:424, tpl/js-templates.php:97, tpl/js-templates.php:422
281
  msgid "Are you sure?"
282
  msgstr ""
283
 
284
  #. translators: When a layout file is ready to be inserted. %s is the filename.
285
+ #: inc/admin.php:426
286
  msgid "%s is ready to insert."
287
  msgstr ""
288
 
289
+ #: inc/admin.php:430
290
  msgid "Add Widget Below"
291
  msgstr ""
292
 
293
+ #: inc/admin.php:431
294
  msgid "Add Widget to Cell"
295
  msgstr ""
296
 
297
+ #: inc/admin.php:432, tpl/js-templates.php:224
298
  msgid "Search Widgets"
299
  msgstr ""
300
 
301
+ #: inc/admin.php:434, tpl/js-templates.php:17, tpl/js-templates.php:19
302
  msgid "Add Row"
303
  msgstr ""
304
 
305
+ #: inc/admin.php:435
306
  msgid "Column"
307
  msgstr ""
308
 
309
+ #: inc/admin.php:437
310
  msgid "Cell Actions"
311
  msgstr ""
312
 
313
+ #: inc/admin.php:438
314
  msgid "Paste Widget"
315
  msgstr ""
316
 
317
+ #: inc/admin.php:440
318
  msgid "Widget Actions"
319
  msgstr ""
320
 
321
+ #: inc/admin.php:441
322
  msgid "Edit Widget"
323
  msgstr ""
324
 
325
+ #: inc/admin.php:442
326
  msgid "Duplicate Widget"
327
  msgstr ""
328
 
329
+ #: inc/admin.php:443
330
  msgid "Delete Widget"
331
  msgstr ""
332
 
333
+ #: inc/admin.php:444
334
  msgid "Copy Widget"
335
  msgstr ""
336
 
337
+ #: inc/admin.php:445
338
  msgid "Paste Widget Below"
339
  msgstr ""
340
 
341
+ #: inc/admin.php:447
342
  msgid "Row Actions"
343
  msgstr ""
344
 
345
+ #: inc/admin.php:448, tpl/js-templates.php:95
346
  msgid "Edit Row"
347
  msgstr ""
348
 
349
+ #: inc/admin.php:449, tpl/js-templates.php:96
350
  msgid "Duplicate Row"
351
  msgstr ""
352
 
353
+ #: inc/admin.php:450, tpl/js-templates.php:97
354
  msgid "Delete Row"
355
  msgstr ""
356
 
357
+ #: inc/admin.php:451
358
  msgid "Copy Row"
359
  msgstr ""
360
 
361
+ #: inc/admin.php:452
362
  msgid "Paste Row"
363
  msgstr ""
364
 
365
+ #: inc/admin.php:454
366
  msgid "Draft"
367
  msgstr ""
368
 
369
+ #: inc/admin.php:455
370
  msgid "Untitled"
371
  msgstr ""
372
 
373
+ #: inc/admin.php:457
374
  msgid "New Row"
375
  msgstr ""
376
 
377
+ #: inc/admin.php:458, inc/admin.php:466, inc/styles.php:184, tpl/js-templates.php:62
378
  msgid "Row"
379
  msgstr ""
380
 
381
+ #: inc/admin.php:461
382
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
383
  msgstr ""
384
 
385
+ #: inc/admin.php:462
386
  msgid "Add a {{%= items[0] %}} to get started."
387
  msgstr ""
388
 
389
+ #: inc/admin.php:463
390
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
391
  msgstr ""
392
 
393
+ #: inc/admin.php:464
394
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
395
  msgstr ""
396
 
397
+ #: inc/admin.php:465, inc/styles.php:318, tpl/js-templates.php:61
398
  msgid "Widget"
399
  msgstr ""
400
 
401
+ #: inc/admin.php:467, tpl/js-templates.php:63
402
  msgid "Prebuilt Layout"
403
  msgstr ""
404
 
405
+ #: inc/admin.php:469
406
  msgid "Read our %s if you need help."
407
  msgstr ""
408
 
409
+ #: inc/admin.php:470, tpl/js-templates.php:64
410
  msgid "documentation"
411
  msgstr ""
412
 
413
+ #: inc/admin.php:479
414
  msgid "Page Builder layouts"
415
  msgstr ""
416
 
417
+ #: inc/admin.php:480
418
  msgid "Error uploading or importing file."
419
  msgstr ""
420
 
421
+ #: inc/admin.php:487
422
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
423
  msgstr ""
424
 
425
  #. translators: This is the default name given to a user's home page
426
+ #: inc/admin.php:655, inc/home.php:26
427
  msgid "Home Page"
428
  msgstr ""
429
 
430
+ #: inc/admin.php:756
431
  msgid "Untitled Widget"
432
  msgstr ""
433
 
434
+ #: inc/admin.php:936
435
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
436
  msgstr ""
437
 
438
+ #: inc/admin.php:942
439
  msgid "Save and reload this page to start using the widget after you've installed it."
440
  msgstr ""
441
 
442
+ #: inc/admin.php:958
443
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
444
  msgstr ""
445
 
446
+ #: inc/admin.php:1073, inc/styles-admin.php:23
447
  msgid "The supplied nonce is invalid."
448
  msgstr ""
449
 
450
+ #: inc/admin.php:1074, inc/styles-admin.php:24
451
  msgid "Invalid nonce."
452
  msgstr ""
453
 
454
+ #: inc/admin.php:1080
455
  msgid "Please specify the type of widget form to be rendered."
456
  msgstr ""
457
 
458
+ #: inc/admin.php:1081
459
  msgid "Missing widget type."
460
  msgstr ""
461
 
462
+ #: inc/admin.php:1188
463
  msgid "%s Widget"
464
  msgid_plural "%s Widgets"
465
  msgstr[0] ""
466
  msgstr[1] ""
467
 
468
+ #: inc/admin.php:1231
469
  msgid "Get a lightbox addon for SiteOrigin widgets"
470
  msgstr ""
471
 
472
+ #: inc/admin.php:1235
473
  msgid "Get the row, cell and widget animations addon"
474
  msgstr ""
475
 
476
+ #: inc/admin.php:1239
477
  msgid "Get premium email support for SiteOrigin Page Builder"
478
  msgstr ""
479
 
480
+ #: inc/admin.php:1430
481
  msgid "Toggle editor selection menu"
482
  msgstr ""
483
 
484
+ #: inc/admin.php:1431, inc/admin.php:1478, inc/settings.php:198, settings/tpl/settings.php:9
485
  msgid "SiteOrigin Page Builder"
486
  msgstr ""
487
 
488
+ #: inc/admin.php:1432
489
  msgid "Block Editor"
490
  msgstr ""
491
 
1262
  msgid "https://siteorigin.com"
1263
  msgstr ""
1264
 
1265
+ #: siteorigin-panels.php:331
1266
  msgid "Read More"
1267
  msgstr ""
1268
 
1269
+ #: siteorigin-panels.php:479
1270
  msgid "Edit Home Page"
1271
  msgstr ""
1272
 
1273
+ #: siteorigin-panels.php:499, tpl/js-templates.php:34, tpl/js-templates.php:36
1274
  msgid "Live Editor"
1275
  msgstr ""
1276
 
1354
  msgid "Delete"
1355
  msgstr ""
1356
 
1357
+ #: tpl/js-templates.php:206, tpl/js-templates.php:271, tpl/js-templates.php:360
1358
  msgid "Done"
1359
  msgstr ""
1360
 
1362
  msgid "Add New Widget %s"
1363
  msgstr ""
1364
 
1365
+ #: tpl/js-templates.php:236, tpl/js-templates.php:556
1366
  msgid "Close"
1367
  msgstr ""
1368
 
1458
  msgid "Restore Version"
1459
  msgstr ""
1460
 
1461
+ #: tpl/js-templates.php:553
1462
+ msgid "Save Draft"
1463
  msgstr ""
1464
 
1465
+ #: tpl/js-templates.php:554, tpl/js-templates.php:555
1466
+ msgid "Update"
1467
  msgstr ""
1468
 
1469
+ #: tpl/js-templates.php:558
1470
  msgid "Toggle desktop mode"
1471
  msgstr ""
1472
 
1473
+ #: tpl/js-templates.php:561
1474
  msgid "Toggle tablet mode"
1475
  msgstr ""
1476
 
1477
+ #: tpl/js-templates.php:564
1478
  msgid "Toggle mobile mode"
1479
  msgstr ""
1480
 
1481
+ #: tpl/js-templates.php:603
1482
  msgid "No Results"
1483
  msgstr ""
1484
 
1485
+ #: tpl/js-templates.php:613
1486
  msgid "Add SiteOrigin Layout Block"
1487
  msgstr ""
1488
 
readme.txt CHANGED
@@ -2,11 +2,11 @@
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.4
4
  Tested up to: 5.1
5
- Stable tag: 2.10.1
6
- Build time: 2019-02-07T13:55:34-08:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
- Donate link: https://siteorigin.com/downloads/contribution/
10
  Contributors: gpriday, braam-genis
11
 
12
  Build responsive page layouts using the widgets you know and love using this simple drag and drop page builder.
@@ -96,6 +96,16 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
96
 
97
  == Changelog ==
98
 
 
 
 
 
 
 
 
 
 
 
99
  = 2.10.1 - 7 February 2019 =
100
  * Layout block: Fix front end rendering not always updating widgets correctly.
101
  * Fix notice when using WP 4.9.9.
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.4
4
  Tested up to: 5.1
5
+ Stable tag: 2.10.2
6
+ Build time: 2019-02-28T11:29:02-08:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
+ Donate link: https://siteorigin.com/downloads/premium/
10
  Contributors: gpriday, braam-genis
11
 
12
  Build responsive page layouts using the widgets you know and love using this simple drag and drop page builder.
96
 
97
  == Changelog ==
98
 
99
+ = 2.10.2 - 28 February 2019 =
100
+ * Don't remove left/right border when Full Width Stretch Padding is enabled on row.
101
+ * Display widget count for inline-save.
102
+ * Live editor: Press escape to close.
103
+ * Live editor: Give the user an option to either close or close and save.
104
+ * Added widget class to widgets in builder interface.
105
+ * Dialog crumbtrail fix.
106
+ * Only close topmost Page Builder window when escape key is pressed.
107
+ * Layout Block: Retrieve sanitized panels data from server as changes are made.
108
+
109
  = 2.10.1 - 7 February 2019 =
110
  * Layout block: Fix front end rendering not always updating widgets correctly.
111
  * Fix notice when using WP 4.9.9.
siteorigin-panels.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
- Version: 2.10.1
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,12 +11,12 @@ License URI: http://www.gnu.org/licenses/gpl.html
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
- define( 'SITEORIGIN_PANELS_VERSION', '2.10.1' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
18
  define( 'SITEORIGIN_PANELS_CSS_SUFFIX', '.min' );
19
- define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-2101' );
20
 
21
  require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
22
 
@@ -38,11 +38,17 @@ class SiteOrigin_Panels {
38
  add_filter( 'siteorigin_panels_data', array( $this, 'process_panels_data' ), 5 );
39
  add_filter( 'siteorigin_panels_widget_class', array( $this, 'fix_namespace_escaping' ), 5 );
40
 
 
 
 
 
 
 
 
41
  if ( is_admin() ) {
42
  // Setup all the admin classes
43
  SiteOrigin_Panels_Settings::single();
44
  SiteOrigin_Panels_Revisions::single();
45
- SiteOrigin_Panels_Admin::single();
46
  }
47
 
48
  // Include the live editor file if we're in live editor mode.
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
+ Version: 2.10.2
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
+ define( 'SITEORIGIN_PANELS_VERSION', '2.10.2' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
18
  define( 'SITEORIGIN_PANELS_CSS_SUFFIX', '.min' );
19
+ define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-2102' );
20
 
21
  require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
22
 
38
  add_filter( 'siteorigin_panels_data', array( $this, 'process_panels_data' ), 5 );
39
  add_filter( 'siteorigin_panels_widget_class', array( $this, 'fix_namespace_escaping' ), 5 );
40
 
41
+ if (
42
+ is_admin() ||
43
+ ( wp_doing_ajax() && isset($_REQUEST['action']) && $_REQUEST['action'] == 'inline-save' )
44
+ ) {
45
+ SiteOrigin_Panels_Admin::single();
46
+ }
47
+
48
  if ( is_admin() ) {
49
  // Setup all the admin classes
50
  SiteOrigin_Panels_Settings::single();
51
  SiteOrigin_Panels_Revisions::single();
 
52
  }
53
 
54
  // Include the live editor file if we're in live editor mode.
tpl/js-templates.php CHANGED
@@ -39,9 +39,9 @@ $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
39
  <?php endif; ?>
40
 
41
  <?php if( SiteOrigin_Panels::display_premium_teaser() ) : ?>
42
- <a class="so-tool-button so-learn" title="<?php echo esc_attr_e( 'Page Builder Addons', 'siteorigin-panels' ) ?>" href="<?php echo esc_url( SiteOrigin_Panels::premium_url() ) ?>" target="_blank" rel="noopener noreferrer" style="margin-left: 10px;">
43
  <span class="so-panels-icon so-panels-icon-addons"></span>
44
- <span class="so-button-text"><?php echo esc_html_e( 'Addons', 'siteorigin-panels' ) ?></span>
45
  </a>
46
  <?php endif; ?>
47
 
@@ -133,7 +133,7 @@ $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
133
  </script>
134
 
135
  <script type="text/template" id="siteorigin-panels-builder-widget">
136
- <div class="so-widget ui-draggable">
137
  <div class="so-widget-wrapper">
138
  <div class="title">
139
  <h4>{{%= title %}}</h4>
@@ -545,13 +545,15 @@ $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
545
 
546
  <div class="live-editor-collapse">
547
  <div class="collapse-icon"></div>
548
- <span data-collapse="<?php esc_attr_e( 'Collapse', 'siteorigin-panels' ) ?>" data-expand="<?php esc_attr_e( 'Expand', 'siteorigin-panels' ) ?>">
549
- <?php _e( 'Collapse', 'siteorigin-panels' ) ?>
550
- </span>
551
  </div>
552
 
553
  <div class="so-sidebar-tools">
554
- <button class="live-editor-close button-primary"><?php esc_html_e('Done', 'siteorigin-panels') ?></button>
 
 
 
 
 
555
 
556
  <a class="live-editor-mode live-editor-desktop so-active" title="<?php esc_attr_e( 'Toggle desktop mode', 'siteorigin-panels' ) ?>" data-mode="desktop">
557
  <span class="dashicons dashicons-desktop"></span>
39
  <?php endif; ?>
40
 
41
  <?php if( SiteOrigin_Panels::display_premium_teaser() ) : ?>
42
+ <a class="so-tool-button so-learn" title="<?php esc_attr_e( 'Page Builder Addons', 'siteorigin-panels' ) ?>" href="<?php echo esc_url( SiteOrigin_Panels::premium_url() ) ?>" target="_blank" rel="noopener noreferrer" style="margin-left: 10px;">
43
  <span class="so-panels-icon so-panels-icon-addons"></span>
44
+ <span class="so-button-text"><?php esc_html_e( 'Addons', 'siteorigin-panels' ) ?></span>
45
  </a>
46
  <?php endif; ?>
47
 
133
  </script>
134
 
135
  <script type="text/template" id="siteorigin-panels-builder-widget">
136
+ <div class="so-widget ui-draggable" data-widget-class="{{%- widget_class %}}">
137
  <div class="so-widget-wrapper">
138
  <div class="title">
139
  <h4>{{%= title %}}</h4>
545
 
546
  <div class="live-editor-collapse">
547
  <div class="collapse-icon"></div>
 
 
 
548
  </div>
549
 
550
  <div class="so-sidebar-tools">
551
+ <button
552
+ class="live-editor-save button-primary"
553
+ data-save="<?php esc_html_e('Save Draft', 'siteorigin-panels') ?>"
554
+ data-update="<?php esc_html_e('Update', 'siteorigin-panels') ?>"
555
+ ><?php esc_html_e('Update', 'siteorigin-panels') ?></button>
556
+ <button class="live-editor-close button-secondary"><?php esc_html_e('Close', 'siteorigin-panels') ?></button>
557
 
558
  <a class="live-editor-mode live-editor-desktop so-active" title="<?php esc_attr_e( 'Toggle desktop mode', 'siteorigin-panels' ) ?>" data-mode="desktop">
559
  <span class="dashicons dashicons-desktop"></span>
trunk/compat/js/siteorigin-panels-layout-block.js DELETED
@@ -1,342 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6
-
7
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
8
-
9
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
10
-
11
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
12
-
13
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
-
15
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
-
17
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
18
-
19
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
20
-
21
- var _lodash = lodash,
22
- isEqual = _lodash.isEqual,
23
- debounce = _lodash.debounce,
24
- isEmpty = _lodash.isEmpty,
25
- isFunction = _lodash.isFunction;
26
- var registerBlockType = wp.blocks.registerBlockType;
27
- var _wp$element = wp.element,
28
- Component = _wp$element.Component,
29
- Fragment = _wp$element.Fragment,
30
- RawHTML = _wp$element.RawHTML,
31
- createRef = _wp$element.createRef;
32
- var BlockControls = wp.editor.BlockControls;
33
- var _wp$components = wp.components,
34
- Toolbar = _wp$components.Toolbar,
35
- IconButton = _wp$components.IconButton,
36
- Spinner = _wp$components.Spinner;
37
- var __ = wp.i18n.__;
38
- var soPanelsBlockEditorAdmin = window.soPanelsBlockEditorAdmin;
39
-
40
- var SiteOriginPanelsLayoutBlock =
41
- /*#__PURE__*/
42
- function (_Component) {
43
- _inherits(SiteOriginPanelsLayoutBlock, _Component);
44
-
45
- function SiteOriginPanelsLayoutBlock(props) {
46
- var _this;
47
-
48
- _classCallCheck(this, SiteOriginPanelsLayoutBlock);
49
-
50
- _this = _possibleConstructorReturn(this, _getPrototypeOf(SiteOriginPanelsLayoutBlock).call(this, props));
51
- var editMode = soPanelsBlockEditorAdmin.defaultMode === 'edit' || isEmpty(props.panelsData);
52
- _this.state = {
53
- editing: editMode,
54
- loadingPreview: !editMode,
55
- previewHtml: ''
56
- };
57
- _this.panelsContainer = createRef();
58
- _this.previewContainer = createRef();
59
- _this.panelsInitialized = false;
60
- _this.previewInitialized = false;
61
- return _this;
62
- }
63
-
64
- _createClass(SiteOriginPanelsLayoutBlock, [{
65
- key: "componentDidMount",
66
- value: function componentDidMount() {
67
- this.isStillMounted = true;
68
-
69
- if (this.state.editing) {
70
- this.setupPanels();
71
- } else if (!this.state.editing && !this.previewInitialized) {
72
- this.fetchPreview(this.props);
73
- this.fetchPreview = debounce(this.fetchPreview, 500);
74
- }
75
- }
76
- }, {
77
- key: "componentWillUnmount",
78
- value: function componentWillUnmount() {
79
- this.isStillMounted = false;
80
-
81
- if (this.builderView) {
82
- this.builderView.off('content_change');
83
- }
84
- }
85
- }, {
86
- key: "componentDidUpdate",
87
- value: function componentDidUpdate(prevProps) {
88
- // let propsChanged = !isEqual( prevProps.panelsData, this.props.panelsData );
89
- if (this.state.editing && !this.panelsInitialized) {
90
- this.setupPanels();
91
- } else if (this.state.loadingPreview) {
92
- this.fetchPreview(this.props);
93
- } else if (!this.previewInitialized && this.previewContainer.current) {
94
- $(document).trigger('panels_setup_preview');
95
- this.previewInitialized = true;
96
- }
97
- }
98
- }, {
99
- key: "setupPanels",
100
- value: function setupPanels() {
101
- var _this2 = this;
102
-
103
- var $panelsContainer = jQuery(this.panelsContainer.current);
104
- var config = {
105
- editorType: 'standalone'
106
- };
107
- var builderModel = new panels.model.builder();
108
- this.builderView = new panels.view.builder({
109
- model: builderModel,
110
- config: config
111
- }); // Make sure panelsData is defined and clone so that we don't alter the underlying attribute.
112
-
113
- var panelsData = JSON.parse(JSON.stringify($.extend({}, this.props.panelsData))); // Disable block selection while dragging rows or widgets.
114
-
115
- var rowOrWidgetMouseDown = function rowOrWidgetMouseDown() {
116
- if (isFunction(_this2.props.onRowOrWidgetMouseDown)) {
117
- _this2.props.onRowOrWidgetMouseDown();
118
- }
119
-
120
- var rowOrWidgetMouseUp = function rowOrWidgetMouseUp() {
121
- $(document).off('mouseup', rowOrWidgetMouseUp);
122
-
123
- if (isFunction(_this2.props.onRowOrWidgetMouseUp)) {
124
- _this2.props.onRowOrWidgetMouseUp();
125
- }
126
- };
127
-
128
- $(document).on('mouseup', rowOrWidgetMouseUp);
129
- };
130
-
131
- this.builderView.on('row_added', function () {
132
- _this2.builderView.$('.so-row-move').off('mousedown', rowOrWidgetMouseDown);
133
-
134
- _this2.builderView.$('.so-row-move').on('mousedown', rowOrWidgetMouseDown);
135
-
136
- _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
137
-
138
- _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
139
- });
140
- this.builderView.on('widget_added', function () {
141
- _this2.builderView.$('.so-widget').off('mousedown', rowOrWidgetMouseDown);
142
-
143
- _this2.builderView.$('.so-widget').on('mousedown', rowOrWidgetMouseDown);
144
- });
145
- this.builderView.render().attach({
146
- container: $panelsContainer
147
- }).setData(panelsData);
148
- this.builderView.trigger('builder_resize');
149
- this.builderView.on('content_change', function () {
150
- var newPanelsData = _this2.builderView.getData();
151
-
152
- _this2.panelsDataChanged = !isEqual(panelsData, newPanelsData);
153
-
154
- if (_this2.panelsDataChanged) {
155
- if (_this2.props.onContentChange && isFunction(_this2.props.onContentChange)) {
156
- _this2.props.onContentChange(newPanelsData);
157
- }
158
-
159
- _this2.setState({
160
- loadingPreview: true,
161
- previewHtml: ''
162
- });
163
- }
164
- });
165
- $(document).trigger('panels_setup', this.builderView);
166
- this.panelsInitialized = true;
167
- }
168
- }, {
169
- key: "fetchPreview",
170
- value: function fetchPreview(props) {
171
- var _this3 = this;
172
-
173
- if (!this.isStillMounted) {
174
- return;
175
- }
176
-
177
- this.previewInitialized = false; // var loadingPreview = !props.editing && !props.previewHtml && props.attributes.panelsData;
178
-
179
- var fetchRequest = this.currentFetchRequest = $.post({
180
- url: soPanelsBlockEditorAdmin.previewUrl,
181
- data: {
182
- action: 'so_panels_block_editor_preview',
183
- panelsData: JSON.stringify(props.panelsData)
184
- }
185
- }).then(function (preview) {
186
- if (_this3.isStillMounted && fetchRequest === _this3.currentFetchRequest && preview) {
187
- _this3.setState({
188
- previewHtml: preview,
189
- loadingPreview: false
190
- });
191
- }
192
- });
193
- return fetchRequest;
194
- }
195
- }, {
196
- key: "render",
197
- value: function render() {
198
- var _this4 = this;
199
-
200
- var panelsData = this.props.panelsData;
201
-
202
- var switchToEditing = function switchToEditing() {
203
- _this4.panelsInitialized = false;
204
-
205
- _this4.setState({
206
- editing: true
207
- });
208
- };
209
-
210
- var switchToPreview = function switchToPreview() {
211
- if (panelsData) {
212
- _this4.setState({
213
- editing: false
214
- });
215
- }
216
- };
217
-
218
- if (this.state.editing) {
219
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
220
- icon: "visibility",
221
- className: "components-icon-button components-toolbar__control",
222
- label: __('Preview layout.', 'siteorigin-panels'),
223
- onClick: switchToPreview
224
- }))), React.createElement("div", {
225
- key: "layout-block",
226
- className: "siteorigin-panels-layout-block-container",
227
- ref: this.panelsContainer
228
- }));
229
- } else {
230
- var loadingPreview = this.state.loadingPreview;
231
- return React.createElement(Fragment, null, React.createElement(BlockControls, null, React.createElement(Toolbar, null, React.createElement(IconButton, {
232
- icon: "edit",
233
- className: "components-icon-button components-toolbar__control",
234
- label: __('Edit layout.', 'siteorigin-panels'),
235
- onClick: switchToEditing
236
- }))), React.createElement("div", {
237
- key: "preview",
238
- className: "so-panels-block-layout-preview-container"
239
- }, loadingPreview ? React.createElement("div", {
240
- className: "so-panels-spinner-container"
241
- }, React.createElement("span", null, React.createElement(Spinner, null))) : React.createElement("div", {
242
- className: "so-panels-raw-html-container",
243
- ref: this.previewContainer
244
- }, React.createElement(RawHTML, null, this.state.previewHtml))));
245
- }
246
- }
247
- }]);
248
-
249
- return SiteOriginPanelsLayoutBlock;
250
- }(Component);
251
-
252
- registerBlockType('siteorigin-panels/layout-block', {
253
- title: __('SiteOrigin Layout', 'siteorigin-panels'),
254
- description: __("Build a layout using SiteOrigin's Page Builder.", 'siteorigin-panels'),
255
- icon: function icon() {
256
- return React.createElement("span", {
257
- className: "siteorigin-panels-block-icon"
258
- });
259
- },
260
- category: 'layout',
261
- keywords: ['page builder', 'column,grid', 'panel'],
262
- supports: {
263
- html: false
264
- },
265
- attributes: {
266
- panelsData: {
267
- type: 'object'
268
- }
269
- },
270
- edit: function edit(_ref) {
271
- var attributes = _ref.attributes,
272
- setAttributes = _ref.setAttributes,
273
- toggleSelection = _ref.toggleSelection;
274
-
275
- var onLayoutBlockContentChange = function onLayoutBlockContentChange(newContent) {
276
- setAttributes({
277
- panelsData: newContent
278
- });
279
- };
280
-
281
- var disableSelection = function disableSelection() {
282
- toggleSelection(false);
283
- };
284
-
285
- var enableSelection = function enableSelection() {
286
- toggleSelection(true);
287
- };
288
-
289
- return React.createElement(SiteOriginPanelsLayoutBlock, {
290
- panelsData: attributes.panelsData,
291
- onContentChange: onLayoutBlockContentChange,
292
- onRowOrWidgetMouseDown: disableSelection,
293
- onRowOrWidgetMouseUp: enableSelection
294
- });
295
- },
296
- save: function save() {
297
- // Render in PHP
298
- return null;
299
- }
300
- });
301
-
302
- (function ($) {
303
- if (soPanelsBlockEditorAdmin.showAddButton) {
304
- $(function () {
305
- setTimeout(function () {
306
- var editorDispatch = wp.data.dispatch('core/editor');
307
- var editorSelect = wp.data.select('core/editor');
308
- var tmpl = $('#siteorigin-panels-add-layout-block-button').html();
309
- var $addButton = $(tmpl).insertAfter('.editor-writing-flow > div:first');
310
- $addButton.on('click', function () {
311
- var layoutBlock = wp.blocks.createBlock('siteorigin-panels/layout-block', {});
312
- var isEmpty = editorSelect.isEditedPostEmpty();
313
-
314
- if (isEmpty) {
315
- var blocks = editorSelect.getBlocks();
316
-
317
- if (blocks.length) {
318
- editorDispatch.replaceBlock(blocks[0].clientId, layoutBlock);
319
- } else {
320
- editorDispatch.insertBlock(layoutBlock);
321
- }
322
- } else {
323
- editorDispatch.insertBlock(layoutBlock);
324
- }
325
- });
326
-
327
- var hideButtonIfBlocks = function hideButtonIfBlocks() {
328
- var isEmpty = wp.data.select('core/editor').isEditedPostEmpty();
329
-
330
- if (isEmpty) {
331
- $addButton.show();
332
- } else {
333
- $addButton.hide();
334
- }
335
- };
336
-
337
- wp.data.subscribe(hideButtonIfBlocks);
338
- hideButtonIfBlocks();
339
- }, 100);
340
- });
341
- }
342
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/compat/js/siteorigin-panels-layout-block.min.js DELETED
@@ -1 +0,0 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _lodash=lodash,isEqual=_lodash.isEqual,debounce=_lodash.debounce,isEmpty=_lodash.isEmpty,isFunction=_lodash.isFunction,registerBlockType=wp.blocks.registerBlockType,_wp$element=wp.element,Component=_wp$element.Component,Fragment=_wp$element.Fragment,RawHTML=_wp$element.RawHTML,createRef=_wp$element.createRef,BlockControls=wp.editor.BlockControls,_wp$components=wp.components,Toolbar=_wp$components.Toolbar,IconButton=_wp$components.IconButton,Spinner=_wp$components.Spinner,__=wp.i18n.__,soPanelsBlockEditorAdmin=window.soPanelsBlockEditorAdmin,SiteOriginPanelsLayoutBlock=function(e){function i(e){var t;_classCallCheck(this,i),t=_possibleConstructorReturn(this,_getPrototypeOf(i).call(this,e));var n="edit"===soPanelsBlockEditorAdmin.defaultMode||isEmpty(e.panelsData);return t.state={editing:n,loadingPreview:!n,previewHtml:""},t.panelsContainer=createRef(),t.previewContainer=createRef(),t.panelsInitialized=!1,t.previewInitialized=!1,t}return _inherits(i,Component),_createClass(i,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.state.editing?this.setupPanels():this.state.editing||this.previewInitialized||(this.fetchPreview(this.props),this.fetchPreview=debounce(this.fetchPreview,500))}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1,this.builderView&&this.builderView.off("content_change")}},{key:"componentDidUpdate",value:function(e){this.state.editing&&!this.panelsInitialized?this.setupPanels():this.state.loadingPreview?this.fetchPreview(this.props):!this.previewInitialized&&this.previewContainer.current&&($(document).trigger("panels_setup_preview"),this.previewInitialized=!0)}},{key:"setupPanels",value:function(){var t=this,e=jQuery(this.panelsContainer.current),n=new panels.model.builder;this.builderView=new panels.view.builder({model:n,config:{editorType:"standalone"}});var i=JSON.parse(JSON.stringify($.extend({},this.props.panelsData))),o=function(){isFunction(t.props.onRowOrWidgetMouseDown)&&t.props.onRowOrWidgetMouseDown();$(document).on("mouseup",function e(){$(document).off("mouseup",e),isFunction(t.props.onRowOrWidgetMouseUp)&&t.props.onRowOrWidgetMouseUp()})};this.builderView.on("row_added",function(){t.builderView.$(".so-row-move").off("mousedown",o),t.builderView.$(".so-row-move").on("mousedown",o),t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.on("widget_added",function(){t.builderView.$(".so-widget").off("mousedown",o),t.builderView.$(".so-widget").on("mousedown",o)}),this.builderView.render().attach({container:e}).setData(i),this.builderView.trigger("builder_resize"),this.builderView.on("content_change",function(){var e=t.builderView.getData();t.panelsDataChanged=!isEqual(i,e),t.panelsDataChanged&&(t.props.onContentChange&&isFunction(t.props.onContentChange)&&t.props.onContentChange(e),t.setState({loadingPreview:!0,previewHtml:""}))}),$(document).trigger("panels_setup",this.builderView),this.panelsInitialized=!0}},{key:"fetchPreview",value:function(e){var t=this;if(this.isStillMounted){this.previewInitialized=!1;var n=this.currentFetchRequest=$.post({url:soPanelsBlockEditorAdmin.previewUrl,data:{action:"so_panels_block_editor_preview",panelsData:JSON.stringify(e.panelsData)}}).then(function(e){t.isStillMounted&&n===t.currentFetchRequest&&e&&t.setState({previewHtml:e,loadingPreview:!1})});return n}}},{key:"render",value:function(){var e=this,t=this.props.panelsData;if(this.state.editing)return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"visibility",className:"components-icon-button components-toolbar__control",label:__("Preview layout.","siteorigin-panels"),onClick:function(){t&&e.setState({editing:!1})}}))),React.createElement("div",{key:"layout-block",className:"siteorigin-panels-layout-block-container",ref:this.panelsContainer}));var n=this.state.loadingPreview;return React.createElement(Fragment,null,React.createElement(BlockControls,null,React.createElement(Toolbar,null,React.createElement(IconButton,{icon:"edit",className:"components-icon-button components-toolbar__control",label:__("Edit layout.","siteorigin-panels"),onClick:function(){e.panelsInitialized=!1,e.setState({editing:!0})}}))),React.createElement("div",{key:"preview",className:"so-panels-block-layout-preview-container"},n?React.createElement("div",{className:"so-panels-spinner-container"},React.createElement("span",null,React.createElement(Spinner,null))):React.createElement("div",{className:"so-panels-raw-html-container",ref:this.previewContainer},React.createElement(RawHTML,null,this.state.previewHtml))))}}]),i}();registerBlockType("siteorigin-panels/layout-block",{title:__("SiteOrigin Layout","siteorigin-panels"),description:__("Build a layout using SiteOrigin's Page Builder.","siteorigin-panels"),icon:function(){return React.createElement("span",{className:"siteorigin-panels-block-icon"})},category:"layout",keywords:["page builder","column,grid","panel"],supports:{html:!1},attributes:{panelsData:{type:"object"}},edit:function(e){var t=e.attributes,n=e.setAttributes,i=e.toggleSelection;return React.createElement(SiteOriginPanelsLayoutBlock,{panelsData:t.panelsData,onContentChange:function(e){n({panelsData:e})},onRowOrWidgetMouseDown:function(){i(!1)},onRowOrWidgetMouseUp:function(){i(!0)}})},save:function(){return null}}),function(r){soPanelsBlockEditorAdmin.showAddButton&&r(function(){setTimeout(function(){var n=wp.data.dispatch("core/editor"),i=wp.data.select("core/editor"),e=r("#siteorigin-panels-add-layout-block-button").html(),t=r(e).insertAfter(".editor-writing-flow > div:first");t.on("click",function(){var e=wp.blocks.createBlock("siteorigin-panels/layout-block",{});if(i.isEditedPostEmpty()){var t=i.getBlocks();t.length?n.replaceBlock(t[0].clientId,e):n.insertBlock(e)}else n.insertBlock(e)});var o=function(){wp.data.select("core/editor").isEditedPostEmpty()?t.show():t.hide()};wp.data.subscribe(o),o()},100)})}(jQuery);
 
trunk/compat/layout-block.php DELETED
@@ -1,103 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Compat_Layout_Block {
4
-
5
- const BLOCK_NAME = 'siteorigin-panels/layout-block';
6
-
7
- /**
8
- * Get the singleton instance
9
- *
10
- * @return SiteOrigin_Panels_Compat_Layout_Block
11
- */
12
- public static function single() {
13
- static $single;
14
-
15
- return empty( $single ) ? $single = new self() : $single;
16
- }
17
-
18
- public function __construct() {
19
- add_action( 'init', array( $this, 'register_layout_block' ) );
20
- // This action is slightly later than `enqueue_block_editor_assets`,
21
- // which we need to use to ensure our templates are loaded at the right time.
22
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_layout_block_editor_assets' ) );
23
- }
24
-
25
- public function register_layout_block() {
26
- register_block_type( self::BLOCK_NAME, array(
27
- 'render_callback' => array( $this, 'render_layout_block' ),
28
- ) );
29
- }
30
-
31
- public function enqueue_layout_block_editor_assets() {
32
- if ( SiteOrigin_Panels_Admin::is_block_editor() ) {
33
- $panels_admin = SiteOrigin_Panels_Admin::single();
34
- $panels_admin->enqueue_admin_scripts();
35
- $panels_admin->enqueue_admin_styles();
36
- $panels_admin->js_templates();
37
-
38
- wp_enqueue_script(
39
- 'siteorigin-panels-layout-block',
40
- plugins_url( 'js/siteorigin-panels-layout-block' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', __FILE__ ),
41
- array(
42
- 'wp-editor',
43
- 'wp-blocks',
44
- 'wp-i18n',
45
- 'wp-element',
46
- 'wp-components',
47
- 'wp-compose',
48
- 'so-panels-admin'
49
- ),
50
- SITEORIGIN_PANELS_VERSION
51
- );
52
-
53
- $current_screen = get_current_screen();
54
- $is_panels_post_type = in_array( $current_screen->id, siteorigin_panels_setting( 'post-types' ) );
55
- wp_localize_script(
56
- 'siteorigin-panels-layout-block',
57
- 'soPanelsBlockEditorAdmin',
58
- array(
59
- 'previewUrl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'block-editor-preview', '_panelsnonce' ),
60
- 'defaultMode' => siteorigin_panels_setting( 'layout-block-default-mode' ),
61
- 'showAddButton' => $is_panels_post_type,
62
- )
63
- );
64
- // This is only available in WP5.
65
- if ( function_exists( 'wp_set_script_translations' ) ) {
66
- wp_set_script_translations( 'siteorigin-panels-layout-block', 'siteorigin-panels' );
67
- }
68
- SiteOrigin_Panels_Styles::register_scripts();
69
- wp_enqueue_script( 'siteorigin-panels-front-styles' );
70
-
71
- // Enqueue front end scripts for our widgets bundle.
72
- if ( class_exists( 'SiteOrigin_Widgets_Bundle' ) ) {
73
- $sowb = SiteOrigin_Widgets_Bundle::single();
74
- $sowb->register_general_scripts();
75
- if ( method_exists( $sowb, 'enqueue_registered_widgets_scripts' ) ) {
76
- $sowb->enqueue_registered_widgets_scripts( true, false );
77
- }
78
- }
79
- }
80
- }
81
-
82
- public function render_layout_block( $attributes ) {
83
-
84
- if ( empty( $attributes['panelsData'] ) ) {
85
- return '<div>'.
86
- __( "You need to add a widget, row, or prebuilt layout before you'll see anything here. :)", 'siteorigin-panels' ) .
87
- '</div>';
88
- }
89
- $panels_data = $attributes['panelsData'];
90
- $panels_data = $this->sanitize_panels_data( $panels_data );
91
- $builder_id = isset( $attributes['builder_id'] ) ? $attributes['builder_id'] : uniqid( 'gb' . get_the_ID() . '-' );
92
- $rendered_layout = SiteOrigin_Panels::renderer()->render( $builder_id, true, $panels_data );
93
- return $rendered_layout;
94
- }
95
-
96
- private function sanitize_panels_data( $panels_data ) {
97
- // We force calling widgets' update functions here, but a better solution is to ensure these are called when
98
- // the block is saved, but there is currently no simple method to do so.
99
- $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], false, true, true );
100
- $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
101
- return $panels_data;
102
- }
103
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/compat/pb-icon.svg DELETED
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 703.29 745.09"><defs><style>.cls-1{opacity:0.5;}.cls-2{opacity:0.2;}</style></defs><title>pb-icon</title><path d="M731.52,232.52,397,430.73a17.11,17.11,0,0,1-17.45,0L45,232.52a17.12,17.12,0,0,1,0-29.46L379.54,4.85a17.11,17.11,0,0,1,17.45,0L731.52,203.06A17.12,17.12,0,0,1,731.52,232.52Z" transform="translate(-36.62 -2.46)"/><path class="cls-1" d="M731.52,399.94,397,598.15a17.11,17.11,0,0,1-17.45,0L45,399.94a17.12,17.12,0,0,1,0-29.46L379.54,172.27a17.11,17.11,0,0,1,17.45,0L731.52,370.48A17.12,17.12,0,0,1,731.52,399.94Z" transform="translate(-36.62 -2.46)"/><path class="cls-2" d="M731.52,546.94,397,745.15a17.11,17.11,0,0,1-17.45,0L45,546.94a17.12,17.12,0,0,1,0-29.46L379.54,319.27a17.11,17.11,0,0,1,17.45,0L731.52,517.48A17.12,17.12,0,0,1,731.52,546.94Z" transform="translate(-36.62 -2.46)"/></svg>
 
trunk/compat/pb-icon_white.svg DELETED
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 703.29 745.09"><defs><style>.cls-1{opacity:0.5;}.cls-2{opacity:0.2;}</style></defs><title>pb-icon</title><path fill="white" d="M731.52,232.52,397,430.73a17.11,17.11,0,0,1-17.45,0L45,232.52a17.12,17.12,0,0,1,0-29.46L379.54,4.85a17.11,17.11,0,0,1,17.45,0L731.52,203.06A17.12,17.12,0,0,1,731.52,232.52Z" transform="translate(-36.62 -2.46)"/><path class="cls-1" fill="white" d="M731.52,399.94,397,598.15a17.11,17.11,0,0,1-17.45,0L45,399.94a17.12,17.12,0,0,1,0-29.46L379.54,172.27a17.11,17.11,0,0,1,17.45,0L731.52,370.48A17.12,17.12,0,0,1,731.52,399.94Z" transform="translate(-36.62 -2.46)"/><path fill="white" class="cls-2" d="M731.52,546.94,397,745.15a17.11,17.11,0,0,1-17.45,0L45,546.94a17.12,17.12,0,0,1,0-29.46L379.54,319.27a17.11,17.11,0,0,1,17.45,0L731.52,517.48A17.12,17.12,0,0,1,731.52,546.94Z" transform="translate(-36.62 -2.46)"/></svg>
 
trunk/css/admin.css DELETED
@@ -1,2686 +0,0 @@
1
- @font-face {
2
- font-family: 'siteorigin-panels-icons';
3
- src: url('icons/panels-icons.eot');
4
- src: url('icons/panels-icons.eot') format('embedded-opentype'), url('icons/panels-icons.woff') format('woff'), url('icons/panels-icons.ttf') format('truetype'), url('icons/panels-icons.svg') format('svg');
5
- font-weight: normal;
6
- font-style: normal;
7
- }
8
- /* This is for the metabox */
9
- #so-panels-panels.attached-to-editor {
10
- margin-top: 20px;
11
- }
12
- #so-panels-panels.attached-to-editor .hndle,
13
- #so-panels-panels.attached-to-editor .handlediv {
14
- display: none !important;
15
- }
16
- #so-panels-panels.attached-to-editor .inside {
17
- margin: 0 !important;
18
- padding: 0 !important;
19
- }
20
- #so-panels-panels.attached-to-editor .so-toolbar .so-switch-to-standard {
21
- display: block;
22
- }
23
- /* Everything for the main builder interface */
24
- .siteorigin-panels-builder {
25
- position: relative;
26
- /* These are generic iconic buttons used in the page builder interface */
27
- }
28
- .siteorigin-panels-builder .so-tool-button {
29
- padding: 6px 7px;
30
- text-decoration: none;
31
- line-height: 1em;
32
- float: left;
33
- margin-right: 2px;
34
- display: block;
35
- visibility: visible;
36
- position: relative;
37
- cursor: pointer;
38
- border: 1px solid #bebebe;
39
- background: #eeeeee;
40
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #f9f9f9));
41
- background: -ms-linear-gradient(bottom, #eeeeee, #f9f9f9);
42
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #f9f9f9 100%);
43
- background: -o-linear-gradient(#f9f9f9, #eeeeee);
44
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#eeeeee', GradientType=0);
45
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.5);
46
- outline: none;
47
- border-radius: 2px;
48
- }
49
- .siteorigin-panels-builder .so-tool-button .so-panels-icon {
50
- font-size: 12px;
51
- }
52
- .siteorigin-panels-builder .so-tool-button span {
53
- display: inline-block;
54
- color: #666666;
55
- text-shadow: 0 1px 0 #FFFFFF;
56
- min-width: 10px;
57
- text-align: center;
58
- }
59
- .siteorigin-panels-builder .so-tool-button:hover {
60
- background: #FFFFFF;
61
- }
62
- .siteorigin-panels-builder .so-tool-button:hover span {
63
- color: #444444;
64
- }
65
- @media (max-width: 782px) {
66
- .siteorigin-panels-builder .so-tool-button.so-row-settings {
67
- margin-right: 8px;
68
- }
69
- }
70
- .siteorigin-panels-builder .so-builder-toolbar {
71
- -ms-box-sizing: border-box;
72
- -moz-box-sizing: border-box;
73
- -webkit-box-sizing: border-box;
74
- box-sizing: border-box;
75
- border-bottom: 1px solid #D0D0D0;
76
- background: #F5F5F5;
77
- line-height: 1em;
78
- z-index: 101;
79
- white-space: nowrap;
80
- overflow-x: hidden;
81
- position: relative;
82
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
83
- top: 0;
84
- left: 0;
85
- width: 100%;
86
- padding: 6px 9px;
87
- margin-top: 0 !important;
88
- zoom: 1;
89
- /* The toolbar buttons */
90
- }
91
- .siteorigin-panels-builder .so-builder-toolbar:before {
92
- content: '';
93
- display: block;
94
- }
95
- .siteorigin-panels-builder .so-builder-toolbar:after {
96
- content: '';
97
- display: table;
98
- clear: both;
99
- }
100
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button {
101
- display: inline-block;
102
- color: #666666;
103
- padding: 2px 10px 2px 8px;
104
- }
105
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text {
106
- margin: 3px 0 2px 0;
107
- font-size: 11px;
108
- }
109
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon {
110
- float: left;
111
- margin: 3px 7px 2px 0;
112
- font-size: 14px;
113
- color: #747474;
114
- }
115
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover,
116
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover .so-panels-icon {
117
- color: #444444;
118
- }
119
- @media (max-width: 782px) {
120
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button {
121
- margin-right: 8px;
122
- }
123
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text {
124
- margin: 7px 0px 2px 5px;
125
- font-size: 14px;
126
- }
127
- .siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon {
128
- margin: 3px 0;
129
- font-size: 21px;
130
- }
131
- }
132
- .siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard {
133
- cursor: pointer;
134
- float: right;
135
- display: none;
136
- text-decoration: none;
137
- color: #666666;
138
- padding: 5px 6px;
139
- -webkit-border-radius: 2px;
140
- -moz-border-radius: 2px;
141
- border-radius: 2px;
142
- border: 1px solid transparent;
143
- font-size: 11px;
144
- }
145
- .siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard:hover {
146
- background: #fafafa;
147
- border: 1px solid #999999;
148
- color: #444444;
149
- }
150
- .siteorigin-panels-builder .so-rows-container {
151
- padding: 20px 15px 0 15px;
152
- }
153
- .siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color {
154
- background-color: #CDE2EC;
155
- border: 1px solid #a4cadd;
156
- }
157
- .siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color.so-row-color-selected:before {
158
- background: #a8cdde;
159
- }
160
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .cell-wrapper {
161
- background-color: #CDE2EC;
162
- }
163
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell.cell-selected .cell-wrapper {
164
- background-color: #99c4d8;
165
- }
166
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle {
167
- background-color: #e7f1f6;
168
- }
169
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle:hover {
170
- background-color: #dcebf2;
171
- }
172
- .siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color {
173
- background-color: #F2C2BE;
174
- border: 1px solid #e9968f;
175
- }
176
- .siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color.so-row-color-selected:before {
177
- background: #ea9a93;
178
- }
179
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .cell-wrapper {
180
- background-color: #F2C2BE;
181
- }
182
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell.cell-selected .cell-wrapper {
183
- background-color: #e68a83;
184
- }
185
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle {
186
- background-color: #f8dedc;
187
- }
188
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle:hover {
189
- background-color: #f5d2cf;
190
- }
191
- .siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color {
192
- background-color: #D5CCDF;
193
- border: 1px solid #b9aac9;
194
- }
195
- .siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color.so-row-color-selected:before {
196
- background: #bbadcb;
197
- }
198
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .cell-wrapper {
199
- background-color: #D5CCDF;
200
- }
201
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell.cell-selected .cell-wrapper {
202
- background-color: #b1a0c3;
203
- }
204
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle {
205
- background-color: #e7e2ed;
206
- }
207
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle:hover {
208
- background-color: #dfd9e7;
209
- }
210
- .siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color {
211
- background-color: #CAE7CD;
212
- border: 1px solid #a3d6a9;
213
- }
214
- .siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color.so-row-color-selected:before {
215
- background: #a7d7ac;
216
- }
217
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .cell-wrapper {
218
- background-color: #CAE7CD;
219
- }
220
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell.cell-selected .cell-wrapper {
221
- background-color: #99d19f;
222
- }
223
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle {
224
- background-color: #e3f2e4;
225
- }
226
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle:hover {
227
- background-color: #d8edda;
228
- }
229
- .siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color {
230
- background-color: #E2DCB1;
231
- border: 1px solid #d3ca88;
232
- }
233
- .siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color.so-row-color-selected:before {
234
- background: #d4cb8c;
235
- }
236
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .cell-wrapper {
237
- background-color: #E2DCB1;
238
- }
239
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell.cell-selected .cell-wrapper {
240
- background-color: #cfc57d;
241
- }
242
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle {
243
- background-color: #ece8cb;
244
- }
245
- .siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle:hover {
246
- background-color: #e8e3c0;
247
- }
248
- .siteorigin-panels-builder .so-rows-container h3.so-row-label {
249
- display: inline-block;
250
- font-size: 1em;
251
- font-weight: 500;
252
- color: #474747;
253
- margin: 0 0 0 4px;
254
- line-height: 22px;
255
- float: left;
256
- }
257
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar {
258
- zoom: 1;
259
- margin-bottom: 4px;
260
- }
261
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar:before {
262
- content: '';
263
- display: block;
264
- }
265
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar:after {
266
- content: '';
267
- display: table;
268
- clear: both;
269
- }
270
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button {
271
- -ms-box-sizing: border-box;
272
- -moz-box-sizing: border-box;
273
- -webkit-box-sizing: border-box;
274
- box-sizing: border-box;
275
- padding: 4px;
276
- float: right;
277
- }
278
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon {
279
- color: #777;
280
- font-size: 11px;
281
- width: 11px;
282
- height: 11px;
283
- display: block;
284
- }
285
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button:hover .so-panels-icon {
286
- color: #555;
287
- }
288
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button.so-row-move {
289
- cursor: move;
290
- }
291
- @media (max-width: 782px) {
292
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar {
293
- margin-bottom: 8px;
294
- }
295
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon {
296
- font-size: 21px;
297
- width: 21px;
298
- height: 21px;
299
- }
300
- }
301
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper {
302
- visibility: hidden;
303
- opacity: 0;
304
- transition: 0s visibility linear 0.075s, opacity 0.075s linear;
305
- z-index: 101;
306
- right: -10px;
307
- top: 100%;
308
- width: 125px;
309
- }
310
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete {
311
- color: #a00;
312
- }
313
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete:hover {
314
- color: #FFF;
315
- background: #a00;
316
- }
317
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container {
318
- display: flex;
319
- justify-content: space-around;
320
- padding: 5px;
321
- }
322
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color {
323
- display: inline-block;
324
- cursor: pointer;
325
- position: relative;
326
- text-align: center;
327
- width: 14px;
328
- height: 14px;
329
- }
330
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color.so-row-color-selected:before {
331
- content: "";
332
- display: block;
333
- position: absolute;
334
- top: 2px;
335
- bottom: 2px;
336
- left: 2px;
337
- right: 2px;
338
- }
339
- .siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper:hover .so-dropdown-links-wrapper {
340
- visibility: visible;
341
- opacity: 1;
342
- transition-delay: 0s;
343
- }
344
- .siteorigin-panels-builder .so-rows-container .ui-sortable-placeholder {
345
- visibility: visible !important;
346
- background: #F7F7F7;
347
- -ms-box-sizing: border-box;
348
- -moz-box-sizing: border-box;
349
- -webkit-box-sizing: border-box;
350
- box-sizing: border-box;
351
- }
352
- .siteorigin-panels-builder .so-rows-container .so-row-container {
353
- margin-bottom: 15px;
354
- -webkit-user-select: none;
355
- -moz-user-select: none;
356
- -ms-user-select: none;
357
- user-select: none;
358
- }
359
- .siteorigin-panels-builder .so-rows-container .so-row-container.ui-sortable-helper {
360
- opacity: 0.9;
361
- }
362
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells {
363
- zoom: 1;
364
- margin: 0 -5px;
365
- position: relative;
366
- display: flex;
367
- }
368
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:before {
369
- content: '';
370
- display: block;
371
- }
372
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:after {
373
- content: '';
374
- display: table;
375
- clear: both;
376
- }
377
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w {
378
- width: 10px;
379
- left: -11px;
380
- cursor: col-resize;
381
- background: rgba(0, 150, 211, 0.25);
382
- -webkit-transition: background 0.25s ease-in-out;
383
- -moz-transition: background 0.25s ease-in-out;
384
- -o-transition: background 0.25s ease-in-out;
385
- transition: background 0.25s ease-in-out;
386
- }
387
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w:hover {
388
- background: rgba(0, 150, 211, 0.1);
389
- }
390
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell {
391
- -ms-box-sizing: border-box;
392
- -moz-box-sizing: border-box;
393
- -webkit-box-sizing: border-box;
394
- box-sizing: border-box;
395
- position: relative;
396
- padding: 0 5px;
397
- }
398
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-first {
399
- margin-left: 0;
400
- }
401
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-last {
402
- margin-right: 0;
403
- }
404
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper {
405
- background: #e4eff4;
406
- padding: 7px 7px 0px 7px;
407
- height: 100%;
408
- min-height: 63px;
409
- -webkit-transition: background 0.25s ease-in-out 0s;
410
- -moz-transition: background 0.25s ease-in-out 0s;
411
- -o-transition: background 0.25s ease-in-out 0s;
412
- transition: background 0.25s ease-in-out 0s;
413
- }
414
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
415
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.cell-selected .cell-wrapper {
416
- background-size: 3px 3px;
417
- }
418
- }
419
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell,
420
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper {
421
- -ms-box-sizing: border-box;
422
- -moz-box-sizing: border-box;
423
- -webkit-box-sizing: border-box;
424
- box-sizing: border-box;
425
- }
426
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget {
427
- cursor: move;
428
- margin-bottom: 7px;
429
- background: #f9f9fb;
430
- border: 1px solid rgba(255, 255, 255, 0.75);
431
- max-height: 49px;
432
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
433
- -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
434
- box-shadow: 0 1px 1px rgba(0,0,0,0.075);
435
- -ms-box-sizing: border-box;
436
- -moz-box-sizing: border-box;
437
- -webkit-box-sizing: border-box;
438
- box-sizing: border-box;
439
- }
440
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-move {
441
- cursor: auto;
442
- }
443
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover {
444
- border: 1px solid rgba(255, 255, 255, 0.55);
445
- background: #fff;
446
- -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.1);
447
- -moz-box-shadow: 0 0 2px rgba(0,0,0,0.1);
448
- box-shadow: 0 0 2px rgba(0,0,0,0.1);
449
- }
450
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper {
451
- padding: 7px 8px;
452
- overflow: hidden;
453
- position: relative;
454
- }
455
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4 {
456
- display: block;
457
- cursor: pointer;
458
- margin: 0 15px 3px 0;
459
- font-weight: 600;
460
- line-height: 1.25em;
461
- color: #474747;
462
- text-shadow: 0 1px 0 #FFF;
463
- white-space: nowrap;
464
- }
465
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4 span {
466
- font-weight: normal;
467
- display: inline-block;
468
- color: #999;
469
- text-shadow: 0 1px 0 #FFF;
470
- margin-left: 12px;
471
- margin-right: 5px;
472
- font-style: italic;
473
- }
474
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-edit h4 {
475
- cursor: auto;
476
- }
477
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions {
478
- font-size: 12px;
479
- position: absolute;
480
- top: 5px;
481
- right: 7px;
482
- cursor: pointer;
483
- padding: 2px 2px 2px 15px;
484
- z-index: 10;
485
- }
486
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover {
487
- background: #feffff;
488
- }
489
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover a {
490
- opacity: 1;
491
- }
492
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a {
493
- display: none;
494
- margin-right: 3px;
495
- text-decoration: none;
496
- }
497
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete {
498
- color: #FF0000;
499
- }
500
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete:hover {
501
- color: #ffffff;
502
- background: #FF0000;
503
- }
504
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover .title a {
505
- display: inline-block;
506
- opacity: 0.5;
507
- }
508
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.panel-being-dragged .title .actions {
509
- display: none;
510
- }
511
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget small {
512
- display: block;
513
- height: 16px;
514
- overflow: hidden;
515
- color: #777;
516
- }
517
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form {
518
- display: none;
519
- }
520
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only,
521
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover {
522
- background: #f5f5f5;
523
- border: 1px solid #a6bac1;
524
- -webkit-box-shadow: none;
525
- -moz-box-shadow: none;
526
- box-shadow: none;
527
- }
528
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only h4,
529
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover h4,
530
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only small,
531
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover small {
532
- opacity: 0.5;
533
- }
534
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered {
535
- background: #3a7096;
536
- border: 1px solid #39618c;
537
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
538
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
539
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
540
- }
541
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,
542
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span,
543
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
544
- color: #fff;
545
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
546
- }
547
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
548
- color: #eee;
549
- }
550
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight {
551
- border: 1px solid rgba(0, 0, 0, 0.075);
552
- background: rgba(0, 0, 0, 0.025);
553
- -ms-box-sizing: border-box;
554
- -moz-box-sizing: border-box;
555
- -webkit-box-sizing: border-box;
556
- box-sizing: border-box;
557
- height: 49px;
558
- margin-bottom: 7px;
559
- position: relative;
560
- -webkit-box-shadow: inset 2px 2px 2px rgba(0,0,0,0.01);
561
- -moz-box-shadow: inset 2px 2px 2px rgba(0,0,0,0.01);
562
- box-shadow: inset 2px 2px 2px rgba(0,0,0,0.01);
563
- }
564
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .resize-handle {
565
- z-index: 100;
566
- position: absolute;
567
- top: 0;
568
- width: 10px;
569
- left: -5px;
570
- cursor: col-resize;
571
- background: #f6fafb;
572
- height: 100%;
573
- -webkit-transition: background 0.25s ease-in-out 0s;
574
- -moz-transition: background 0.25s ease-in-out 0s;
575
- -o-transition: background 0.25s ease-in-out 0s;
576
- transition: background 0.25s ease-in-out 0s;
577
- }
578
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell:first-child .resize-handle {
579
- display: none;
580
- }
581
- .siteorigin-panels-builder .so-panels-welcome-message {
582
- text-align: center;
583
- padding: 0px 15px 20px 15px;
584
- color: #555;
585
- line-height: 1.8em;
586
- }
587
- .siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper {
588
- padding: 15px 10px;
589
- background: #F8F8F8;
590
- border: 1px solid #E0E0E0;
591
- }
592
- @media only screen and (max-width: 782px) {
593
- .siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper {
594
- font-size: 14px;
595
- }
596
- }
597
- .siteorigin-panels-builder .so-panels-welcome-message .so-tool-button {
598
- font-size: inherit;
599
- display: inline-block;
600
- float: none;
601
- color: #666;
602
- padding: 5px 10px;
603
- margin: 0 3px;
604
- }
605
- @media only screen and (max-width: 782px) {
606
- .siteorigin-panels-builder .so-panels-welcome-message .so-tool-button {
607
- padding: 9px 10px;
608
- }
609
- }
610
- .siteorigin-panels-builder .so-panels-welcome-message .so-tool-button .so-panels-icon {
611
- color: #777;
612
- font-size: 0.8em;
613
- }
614
- .siteorigin-panels-builder .so-panels-welcome-message .so-tip-wrapper {
615
- margin-top: 15px;
616
- font-size: 0.95em;
617
- }
618
- .siteorigin-panels-builder.so-display-narrow .so-builder-toolbar {
619
- padding: 10px;
620
- }
621
- .siteorigin-panels-builder.so-display-narrow .so-builder-toolbar > .so-tool-button .so-panels-icon {
622
- margin: 3px 0;
623
- }
624
- .siteorigin-panels-builder.so-display-narrow .so-builder-toolbar > .so-tool-button span.so-button-text {
625
- display: none;
626
- }
627
- .siteorigin-panels-builder.so-display-narrow .so-builder-toolbar > .so-tool-button.so-learn {
628
- display: none;
629
- }
630
- .siteorigin-panels-builder.so-display-narrow .so-builder-toolbar .so-switch-to-standard {
631
- display: none !important;
632
- }
633
- /* This is to display a draggable widget */
634
- .so-widget.ui-sortable-helper.widget-being-dragged {
635
- /* Need a high z-index for layout builder widget */
636
- z-index: 500002 !important;
637
- opacity: 0.9;
638
- pointer-events: none;
639
- border: 1px solid rgba(0, 0, 0, 0.35) !important;
640
- cursor: move;
641
- margin-bottom: 7px;
642
- background: #f9f9fb;
643
- border: 1px solid rgba(255, 255, 255, 0.75);
644
- max-height: 49px;
645
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
646
- -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.075);
647
- box-shadow: 0 1px 1px rgba(0,0,0,0.075);
648
- -ms-box-sizing: border-box;
649
- -moz-box-sizing: border-box;
650
- -webkit-box-sizing: border-box;
651
- box-sizing: border-box;
652
- }
653
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-move {
654
- cursor: auto;
655
- }
656
- .so-widget.ui-sortable-helper.widget-being-dragged:hover {
657
- border: 1px solid rgba(255, 255, 255, 0.55);
658
- background: #fff;
659
- -webkit-box-shadow: 0 0 2px rgba(0,0,0,0.1);
660
- -moz-box-shadow: 0 0 2px rgba(0,0,0,0.1);
661
- box-shadow: 0 0 2px rgba(0,0,0,0.1);
662
- }
663
- .so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper {
664
- padding: 7px 8px;
665
- overflow: hidden;
666
- position: relative;
667
- }
668
- .so-widget.ui-sortable-helper.widget-being-dragged h4 {
669
- display: block;
670
- cursor: pointer;
671
- margin: 0 15px 3px 0;
672
- font-weight: 600;
673
- line-height: 1.25em;
674
- color: #474747;
675
- text-shadow: 0 1px 0 #FFF;
676
- white-space: nowrap;
677
- }
678
- .so-widget.ui-sortable-helper.widget-being-dragged h4 span {
679
- font-weight: normal;
680
- display: inline-block;
681
- color: #999;
682
- text-shadow: 0 1px 0 #FFF;
683
- margin-left: 12px;
684
- margin-right: 5px;
685
- font-style: italic;
686
- }
687
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-edit h4 {
688
- cursor: auto;
689
- }
690
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions {
691
- font-size: 12px;
692
- position: absolute;
693
- top: 5px;
694
- right: 7px;
695
- cursor: pointer;
696
- padding: 2px 2px 2px 15px;
697
- z-index: 10;
698
- }
699
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover {
700
- background: #feffff;
701
- }
702
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover a {
703
- opacity: 1;
704
- }
705
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions a {
706
- display: none;
707
- margin-right: 3px;
708
- text-decoration: none;
709
- }
710
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete {
711
- color: #FF0000;
712
- }
713
- .so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete:hover {
714
- color: #ffffff;
715
- background: #FF0000;
716
- }
717
- .so-widget.ui-sortable-helper.widget-being-dragged:hover .title a {
718
- display: inline-block;
719
- opacity: 0.5;
720
- }
721
- .so-widget.ui-sortable-helper.widget-being-dragged.panel-being-dragged .title .actions {
722
- display: none;
723
- }
724
- .so-widget.ui-sortable-helper.widget-being-dragged small {
725
- display: block;
726
- height: 16px;
727
- overflow: hidden;
728
- color: #777;
729
- }
730
- .so-widget.ui-sortable-helper.widget-being-dragged .form {
731
- display: none;
732
- }
733
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only,
734
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover {
735
- background: #f5f5f5;
736
- border: 1px solid #a6bac1;
737
- -webkit-box-shadow: none;
738
- -moz-box-shadow: none;
739
- box-shadow: none;
740
- }
741
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only h4,
742
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover h4,
743
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only small,
744
- .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover small {
745
- opacity: 0.5;
746
- }
747
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered {
748
- background: #3a7096;
749
- border: 1px solid #39618c;
750
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
751
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
752
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
753
- }
754
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,
755
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span,
756
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
757
- color: #fff;
758
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
759
- }
760
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
761
- color: #eee;
762
- }
763
- /* Handles displaying a builder in the WordPress widget interface */
764
- .widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container {
765
- padding-top: 0;
766
- }
767
- .widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-rows-container {
768
- padding: 10px 0 0 0;
769
- }
770
- .widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-toolbar {
771
- padding-left: 15px;
772
- padding-right: 15px;
773
- margin: 0 -15px;
774
- }
775
- .so-panels-dialog,
776
- .block-editor {
777
- /* The add widget dialog */
778
- /* The row edit dialog */
779
- /* For prebuilt layouts */
780
- /* Special case of the builder interface being inside a dialog, or block editor. */
781
- /* Styles for PB in block editor. */
782
- /* PB Icon in block editor */
783
- }
784
- .so-panels-dialog .so-overlay,
785
- .block-editor .so-overlay,
786
- .so-panels-dialog .so-content,
787
- .block-editor .so-content,
788
- .so-panels-dialog .so-title-bar,
789
- .block-editor .so-title-bar,
790
- .so-panels-dialog .so-toolbar,
791
- .block-editor .so-toolbar,
792
- .so-panels-dialog .so-left-sidebar,
793
- .block-editor .so-left-sidebar,
794
- .so-panels-dialog .so-right-sidebar,
795
- .block-editor .so-right-sidebar {
796
- z-index: 100001;
797
- position: fixed;
798
- -ms-box-sizing: border-box;
799
- -moz-box-sizing: border-box;
800
- -webkit-box-sizing: border-box;
801
- box-sizing: border-box;
802
- padding: 15px;
803
- }
804
- .so-panels-dialog .so-content,
805
- .block-editor .so-content,
806
- .so-panels-dialog .so-left-sidebar,
807
- .block-editor .so-left-sidebar,
808
- .so-panels-dialog .so-right-sidebar,
809
- .block-editor .so-right-sidebar {
810
- overflow-y: auto;
811
- }
812
- .so-panels-dialog .so-overlay,
813
- .block-editor .so-overlay {
814
- top: 0;
815
- left: 0;
816
- right: 0;
817
- bottom: 0;
818
- background: rgba(0, 0, 0, 0.5);
819
- }
820
- .so-panels-dialog .so-content,
821
- .block-editor .so-content {
822
- top: 80px;
823
- left: 30px;
824
- right: 30px;
825
- bottom: 88px;
826
- background-color: #fdfdfd;
827
- overflow-x: hidden;
828
- -webkit-box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
829
- -moz-box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
830
- box-shadow: inset 0 2px 2px rgba(0,0,0,0.03);
831
- }
832
- .so-panels-dialog .so-content > *:first-child,
833
- .block-editor .so-content > *:first-child {
834
- margin-top: 0;
835
- }
836
- .so-panels-dialog .so-content > *:last-child,
837
- .block-editor .so-content > *:last-child {
838
- margin-bottom: 0;
839
- }
840
- .so-panels-dialog .so-content .so-content-tabs > *,
841
- .block-editor .so-content .so-content-tabs > * {
842
- display: none;
843
- }
844
- .so-panels-dialog .so-title-bar,
845
- .block-editor .so-title-bar {
846
- left: 30px;
847
- right: 30px;
848
- top: 30px;
849
- height: 50px;
850
- background-color: #fafafa;
851
- border-bottom: 1px solid #D8D8D8;
852
- padding: 0;
853
- /* These are the action buttons in the title bar */
854
- }
855
- .so-panels-dialog .so-title-bar h3.so-title,
856
- .block-editor .so-title-bar h3.so-title {
857
- -ms-box-sizing: border-box;
858
- -moz-box-sizing: border-box;
859
- -webkit-box-sizing: border-box;
860
- box-sizing: border-box;
861
- margin: 0 150px 0 -3px;
862
- padding: 15px;
863
- display: inline-block;
864
- }
865
- .so-panels-dialog .so-title-bar h3.so-title.so-title-editable:hover,
866
- .block-editor .so-title-bar h3.so-title.so-title-editable:hover,
867
- .so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus,
868
- .block-editor .so-title-bar h3.so-title.so-title-editable:focus {
869
- outline: none;
870
- background-color: #F0F0F0;
871
- }
872
- .so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus,
873
- .block-editor .so-title-bar h3.so-title.so-title-editable:focus {
874
- border: 1px solid #E4E4E4;
875
- }
876
- .so-panels-dialog .so-title-bar input[type=text].so-edit-title,
877
- .block-editor .so-title-bar input[type=text].so-edit-title {
878
- margin-top: -3px;
879
- margin-left: -3px;
880
- display: none;
881
- color: #23282d;
882
- font-size: 1.3em;
883
- font-weight: 600;
884
- border: none;
885
- box-shadow: none;
886
- background-color: #F0F0F0;
887
- padding: 4px 5px;
888
- }
889
- .so-panels-dialog .so-title-bar h3.so-parent-link,
890
- .block-editor .so-title-bar h3.so-parent-link {
891
- cursor: pointer;
892
- position: relative;
893
- float: left;
894
- margin: 0 15px 0 0;
895
- padding: 15px 27px 15px 3px;
896
- }
897
- .so-panels-dialog .so-title-bar h3.so-parent-link .so-separator,
898
- .block-editor .so-title-bar h3.so-parent-link .so-separator {
899
- position: absolute;
900
- top: 0;
901
- right: 0;
902
- width: 12px;
903
- height: 50px;
904
- display: block;
905
- background: url(./images/dialog-separator.png) no-repeat;
906
- }
907
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
908
- .so-panels-dialog .so-title-bar h3.so-parent-link .so-separator,
909
- .block-editor .so-title-bar h3.so-parent-link .so-separator {
910
- background: url(./images/dialog-separator@2x.png) no-repeat;
911
- background-size: cover;
912
- }
913
- }
914
- .so-panels-dialog .so-title-bar a,
915
- .block-editor .so-title-bar a {
916
- cursor: pointer;
917
- position: relative;
918
- box-sizing: border-box;
919
- width: 50px;
920
- height: 50px;
921
- display: inline-block;
922
- -webkit-transition: all 0.2s ease 0s;
923
- -moz-transition: all 0.2s ease 0s;
924
- -o-transition: all 0.2s ease 0s;
925
- transition: all 0.2s ease 0s;
926
- background: #fafafa;
927
- border-left: 1px solid #d8d8d8;
928
- border-bottom: 1px solid #d8d8d8;
929
- /* Disabled nav */
930
- }
931
- .so-panels-dialog .so-title-bar a:hover,
932
- .block-editor .so-title-bar a:hover {
933
- background: #e9e9e9;
934
- }
935
- .so-panels-dialog .so-title-bar a:hover .so-dialog-icon,
936
- .block-editor .so-title-bar a:hover .so-dialog-icon {
937
- color: #333333;
938
- }
939
- .so-panels-dialog .so-title-bar a .so-dialog-icon,
940
- .block-editor .so-title-bar a .so-dialog-icon {
941
- position: absolute;
942
- top: 50%;
943
- left: 50%;
944
- text-decoration: none;
945
- width: 20px;
946
- height: 20px;
947
- margin-left: -10px;
948
- margin-top: -10px;
949
- color: #666666;
950
- text-align: center;
951
- }
952
- .so-panels-dialog .so-title-bar a .so-dialog-icon:before,
953
- .block-editor .so-title-bar a .so-dialog-icon:before {
954
- font: 400 20px/1em dashicons;
955
- top: 7px;
956
- left: 13px;
957
- }
958
- .so-panels-dialog .so-title-bar a.so-close,
959
- .block-editor .so-title-bar a.so-close {
960
- right: 0;
961
- }
962
- .so-panels-dialog .so-title-bar a.so-close .so-dialog-icon:before,
963
- .block-editor .so-title-bar a.so-close .so-dialog-icon:before {
964
- content: "\f335";
965
- }
966
- .so-panels-dialog .so-title-bar a.so-show-left-sidebar,
967
- .block-editor .so-title-bar a.so-show-left-sidebar {
968
- float: left;
969
- display: inline;
970
- padding: 16px 25px;
971
- border-right: 1px solid #d8d8d8;
972
- border-bottom: 1px solid #d8d8d8;
973
- }
974
- .so-panels-dialog .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before,
975
- .block-editor .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before {
976
- content: '\f333';
977
- }
978
- .so-panels-dialog .so-title-bar a.so-show-right-sidebar,
979
- .block-editor .so-title-bar a.so-show-right-sidebar {
980
- display: inline-block;
981
- }
982
- .so-panels-dialog .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before,
983
- .block-editor .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before {
984
- content: '\f100';
985
- }
986
- .so-panels-dialog .so-title-bar a.so-next .so-dialog-icon:before,
987
- .block-editor .so-title-bar a.so-next .so-dialog-icon:before {
988
- content: '\f345';
989
- }
990
- .so-panels-dialog .so-title-bar a.so-previous .so-dialog-icon:before,
991
- .block-editor .so-title-bar a.so-previous .so-dialog-icon:before {
992
- content: '\f341';
993
- }
994
- .so-panels-dialog .so-title-bar a.so-nav.so-disabled,
995
- .block-editor .so-title-bar a.so-nav.so-disabled {
996
- cursor: default;
997
- pointer-events: none;
998
- }
999
- .so-panels-dialog .so-title-bar a.so-nav.so-disabled .so-dialog-icon,
1000
- .block-editor .so-title-bar a.so-nav.so-disabled .so-dialog-icon {
1001
- color: #dddddd;
1002
- }
1003
- .so-panels-dialog .so-title-bar .so-title-bar-buttons,
1004
- .block-editor .so-title-bar .so-title-bar-buttons {
1005
- position: absolute;
1006
- right: 0;
1007
- top: 0;
1008
- }
1009
- .so-panels-dialog .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon,
1010
- .block-editor .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon {
1011
- left: 70px;
1012
- }
1013
- .so-panels-dialog .so-title-bar.so-has-icon .so-panels-icon,
1014
- .block-editor .so-title-bar.so-has-icon .so-panels-icon {
1015
- float: left;
1016
- padding: 14px;
1017
- font-size: 22px;
1018
- line-height: 22px;
1019
- display: inline-block;
1020
- width: 22px;
1021
- height: 22px;
1022
- text-align: center;
1023
- color: #666;
1024
- }
1025
- .so-panels-dialog .so-toolbar,
1026
- .block-editor .so-toolbar {
1027
- left: 30px;
1028
- right: 30px;
1029
- bottom: 30px;
1030
- height: 58px;
1031
- background-color: #fafafa;
1032
- border-top: 1px solid #D8D8D8;
1033
- z-index: 100002;
1034
- }
1035
- .so-panels-dialog .so-toolbar .so-status,
1036
- .block-editor .so-toolbar .so-status {
1037
- float: left;
1038
- padding-top: 6px;
1039
- padding-bottom: 6px;
1040
- font-style: italic;
1041
- color: #999999;
1042
- line-height: 1em;
1043
- }
1044
- .so-panels-dialog .so-toolbar .so-status.so-panels-loading,
1045
- .block-editor .so-toolbar .so-status.so-panels-loading {
1046
- padding-left: 26px;
1047
- background-position: left center;
1048
- }
1049
- .so-panels-dialog .so-toolbar .so-status .dashicons-warning,
1050
- .block-editor .so-toolbar .so-status .dashicons-warning {
1051
- color: #aa0000;
1052
- vertical-align: middle;
1053
- margin-right: 7px;
1054
- margin-top: -1px;
1055
- }
1056
- .so-panels-dialog .so-toolbar .so-buttons,
1057
- .block-editor .so-toolbar .so-buttons {
1058
- float: right;
1059
- }
1060
- .so-panels-dialog .so-toolbar .so-buttons .action-buttons,
1061
- .block-editor .so-toolbar .so-buttons .action-buttons {
1062
- position: absolute;
1063
- left: 15px;
1064
- top: 50%;
1065
- margin-top: -0.65em;
1066
- }
1067
- .so-panels-dialog .so-toolbar .so-buttons .action-buttons a,
1068
- .block-editor .so-toolbar .so-buttons .action-buttons a {
1069
- cursor: pointer;
1070
- display: inline;
1071
- padding: 0.2em 0.5em;
1072
- line-height: 1em;
1073
- margin-right: 0.5em;
1074
- text-decoration: none;
1075
- }
1076
- .so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete,
1077
- .block-editor .so-toolbar .so-buttons .action-buttons .so-delete {
1078
- color: #a00;
1079
- }
1080
- .so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover,
1081
- .block-editor .so-toolbar .so-buttons .action-buttons .so-delete:hover {
1082
- background: #a00;
1083
- color: #FFFFFF;
1084
- }
1085
- .so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover,
1086
- .block-editor .so-toolbar .so-buttons .action-buttons .so-duplicate:hover {
1087
- text-decoration: underline;
1088
- }
1089
- .so-panels-dialog .so-left-sidebar,
1090
- .block-editor .so-left-sidebar,
1091
- .so-panels-dialog .so-right-sidebar,
1092
- .block-editor .so-right-sidebar {
1093
- background-color: #f3f3f3;
1094
- }
1095
- .so-panels-dialog .so-left-sidebar,
1096
- .block-editor .so-left-sidebar {
1097
- display: none;
1098
- top: 30px;
1099
- left: 30px;
1100
- bottom: 30px;
1101
- width: 290px;
1102
- border-right: 1px solid #D8D8D8;
1103
- }
1104
- @media only screen and (max-width: 980px) {
1105
- .so-panels-dialog .so-left-sidebar,
1106
- .block-editor .so-left-sidebar {
1107
- top: 80px;
1108
- z-index: 110000;
1109
- bottom: inherit;
1110
- max-height: calc(100% - 80px);
1111
- }
1112
- }
1113
- .so-panels-dialog .so-left-sidebar h4,
1114
- .block-editor .so-left-sidebar h4 {
1115
- margin: 0 0 20px 0;
1116
- font-size: 18px;
1117
- }
1118
- .so-panels-dialog .so-left-sidebar .so-sidebar-search,
1119
- .block-editor .so-left-sidebar .so-sidebar-search {
1120
- width: 100%;
1121
- padding: 6px;
1122
- margin-bottom: 20px;
1123
- }
1124
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs,
1125
- .block-editor .so-left-sidebar .so-sidebar-tabs {
1126
- list-style: none;
1127
- margin: 0 -15px;
1128
- }
1129
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs li,
1130
- .block-editor .so-left-sidebar .so-sidebar-tabs li {
1131
- margin-bottom: 0;
1132
- }
1133
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a,
1134
- .block-editor .so-left-sidebar .so-sidebar-tabs li a {
1135
- padding: 7px 16px;
1136
- display: block;
1137
- font-size: 14px;
1138
- text-decoration: none;
1139
- box-shadow: none !important;
1140
- }
1141
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a:hover,
1142
- .block-editor .so-left-sidebar .so-sidebar-tabs li a:hover {
1143
- background: #FFFFFF;
1144
- }
1145
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a,
1146
- .block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a {
1147
- color: #555;
1148
- font-weight: bold;
1149
- background: #FFFFFF;
1150
- }
1151
- .so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover,
1152
- .block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover {
1153
- background: #FFFFFF;
1154
- }
1155
- .so-panels-dialog .so-right-sidebar,
1156
- .block-editor .so-right-sidebar {
1157
- display: none;
1158
- top: 80px;
1159
- right: 30px;
1160
- bottom: 88px;
1161
- width: 290px;
1162
- border-left: 1px solid #D8D8D8;
1163
- }
1164
- .so-panels-dialog .so-right-sidebar h3,
1165
- .block-editor .so-right-sidebar h3 {
1166
- color: #333;
1167
- }
1168
- .so-panels-dialog .so-right-sidebar h3:first-child,
1169
- .block-editor .so-right-sidebar h3:first-child {
1170
- margin-top: 0;
1171
- }
1172
- @media only screen and (max-width: 980px) {
1173
- .so-panels-dialog .so-right-sidebar,
1174
- .block-editor .so-right-sidebar {
1175
- z-index: 110000;
1176
- bottom: inherit;
1177
- max-height: calc(100% - 80px);
1178
- }
1179
- }
1180
- .so-panels-dialog .so-sidebar .form-field,
1181
- .block-editor .so-sidebar .form-field {
1182
- margin-bottom: 20px;
1183
- }
1184
- .so-panels-dialog .so-sidebar .form-field label,
1185
- .block-editor .so-sidebar .form-field label {
1186
- font-weight: 500;
1187
- font-size: 15px;
1188
- display: block;
1189
- margin-bottom: 10px;
1190
- }
1191
- .so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content,
1192
- .block-editor.so-panels-dialog-has-left-sidebar .so-content,
1193
- .so-panels-dialog.so-panels-dialog-has-left-sidebar .so-toolbar,
1194
- .block-editor.so-panels-dialog-has-left-sidebar .so-toolbar,
1195
- .so-panels-dialog.so-panels-dialog-has-left-sidebar .so-title-bar,
1196
- .block-editor.so-panels-dialog-has-left-sidebar .so-title-bar {
1197
- left: 320px;
1198
- }
1199
- .so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content,
1200
- .block-editor.so-panels-dialog-has-left-sidebar .so-content {
1201
- -webkit-box-shadow: inset 2px 2px 2px rgba(0,0,0,0.03);
1202
- -moz-box-shadow: inset 2px 2px 2px rgba(0,0,0,0.03);
1203
- box-shadow: inset 2px 2px 2px rgba(0,0,0,0.03);
1204
- }
1205
- .so-panels-dialog.so-panels-dialog-has-left-sidebar .so-left-sidebar,
1206
- .block-editor.so-panels-dialog-has-left-sidebar .so-left-sidebar {
1207
- display: block;
1208
- }
1209
- .so-panels-dialog.so-panels-dialog-has-right-sidebar .so-content,
1210
- .block-editor.so-panels-dialog-has-right-sidebar .so-content {
1211
- right: 320px;
1212
- }
1213
- .so-panels-dialog.so-panels-dialog-has-right-sidebar .so-right-sidebar,
1214
- .block-editor.so-panels-dialog-has-right-sidebar .so-right-sidebar {
1215
- display: block;
1216
- }
1217
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget,
1218
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget {
1219
- -webkit-border-radius: 2px;
1220
- -moz-border-radius: 2px;
1221
- border-radius: 2px;
1222
- border: 1px solid #cccccc;
1223
- cursor: pointer;
1224
- padding: 10px;
1225
- background: #f9f9f9;
1226
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.075), inset 0 1px 0 #FFFFFF;
1227
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075), inset 0 1px 0 #FFFFFF;
1228
- box-shadow: 0 1px 2px rgba(0,0,0,0.075), inset 0 1px 0 #FFFFFF;
1229
- margin-bottom: 15px;
1230
- }
1231
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover,
1232
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover {
1233
- border: 1px solid #BBBBBB;
1234
- background: #FFFFFF;
1235
- }
1236
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current,
1237
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current {
1238
- border-color: #0074a2;
1239
- background: #2ea2cc;
1240
- cursor: auto;
1241
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
1242
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
1243
- box-shadow: 0 1px 2px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.2);
1244
- }
1245
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3,
1246
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3 {
1247
- color: #FFFFFF;
1248
- }
1249
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small,
1250
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small {
1251
- color: #eeeeee;
1252
- }
1253
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover,
1254
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover {
1255
- border-color: #0074a2;
1256
- background: #2ea2cc;
1257
- }
1258
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child,
1259
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child {
1260
- margin-bottom: 0;
1261
- }
1262
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3,
1263
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3 {
1264
- margin: 0 0 7px 0;
1265
- padding: 0;
1266
- height: 1.2em;
1267
- color: #222222;
1268
- font-size: 14px;
1269
- }
1270
- .so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small,
1271
- .block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small {
1272
- font-size: 11px;
1273
- line-height: 1.25em;
1274
- display: block;
1275
- overflow: hidden;
1276
- color: #888888;
1277
- }
1278
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list,
1279
- .block-editor.so-panels-dialog-add-widget .widget-type-list {
1280
- zoom: 1;
1281
- margin: 0 -5px -10px -5px;
1282
- min-height: 10px;
1283
- }
1284
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:before,
1285
- .block-editor.so-panels-dialog-add-widget .widget-type-list:before {
1286
- content: '';
1287
- display: block;
1288
- }
1289
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:after,
1290
- .block-editor.so-panels-dialog-add-widget .widget-type-list:after {
1291
- content: '';
1292
- display: table;
1293
- clear: both;
1294
- }
1295
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type,
1296
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type {
1297
- -ms-user-select: none;
1298
- /* IE 10+ */
1299
- -moz-user-select: -moz-none;
1300
- -khtml-user-select: none;
1301
- -webkit-user-select: none;
1302
- user-select: none;
1303
- -ms-box-sizing: border-box;
1304
- -moz-box-sizing: border-box;
1305
- -webkit-box-sizing: border-box;
1306
- box-sizing: border-box;
1307
- width: 25%;
1308
- padding: 0 5px;
1309
- margin-bottom: 10px;
1310
- float: left;
1311
- }
1312
- @media (max-width: 1280px) {
1313
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type,
1314
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type {
1315
- width: 33.333%;
1316
- }
1317
- }
1318
- @media (max-width: 960px) {
1319
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type,
1320
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type {
1321
- width: 50%;
1322
- }
1323
- }
1324
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type h3,
1325
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type h3 {
1326
- margin: 0 0 7px 0;
1327
- padding: 0;
1328
- color: #222222;
1329
- font-size: 14px;
1330
- }
1331
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type small,
1332
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type small {
1333
- font-size: 11px;
1334
- min-height: 2.5em;
1335
- line-height: 1.25em;
1336
- display: block;
1337
- overflow: hidden;
1338
- color: #888888;
1339
- }
1340
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon,
1341
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon {
1342
- font-size: 20px;
1343
- width: 20px;
1344
- height: 20px;
1345
- color: #666;
1346
- float: left;
1347
- margin: -1px 0.5em 0 0;
1348
- }
1349
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper,
1350
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper {
1351
- border: 1px solid #cccccc;
1352
- cursor: pointer;
1353
- padding: 10px;
1354
- background: #F8F8F8;
1355
- -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
1356
- -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
1357
- box-shadow: 0 1px 2px rgba(0,0,0,0.075);
1358
- }
1359
- .so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover,
1360
- .block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover {
1361
- border: 1px solid #BBBBBB;
1362
- background: #FFFFFF;
1363
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
1364
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
1365
- box-shadow: 0 2px 2px rgba(0,0,0,0.075);
1366
- }
1367
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form,
1368
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form {
1369
- zoom: 1;
1370
- padding: 8px;
1371
- border: 1px solid #ccc;
1372
- margin-bottom: 20px;
1373
- background: #F3F3F3;
1374
- }
1375
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:before,
1376
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form:before {
1377
- content: '';
1378
- display: block;
1379
- }
1380
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:after,
1381
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form:after {
1382
- content: '';
1383
- display: table;
1384
- clear: both;
1385
- }
1386
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form input,
1387
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form input,
1388
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form select,
1389
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form select,
1390
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button,
1391
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,
1392
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form strong,
1393
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form strong,
1394
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form span,
1395
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form span {
1396
- display: inline;
1397
- margin: 1px 5px;
1398
- width: auto;
1399
- outline: none;
1400
- box-shadow: none;
1401
- }
1402
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button,
1403
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form button {
1404
- margin-top: 2px;
1405
- }
1406
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form label,
1407
- .block-editor.so-panels-dialog-row-edit .so-content .row-set-form label {
1408
- display: inline;
1409
- }
1410
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview,
1411
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview {
1412
- margin: 0 -6px;
1413
- height: 360px;
1414
- position: relative;
1415
- white-space: nowrap;
1416
- }
1417
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,
1418
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,
1419
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,
1420
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,
1421
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight,
1422
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight {
1423
- -ms-box-sizing: border-box;
1424
- -moz-box-sizing: border-box;
1425
- -webkit-box-sizing: border-box;
1426
- box-sizing: border-box;
1427
- }
1428
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,
1429
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell {
1430
- display: inline-block;
1431
- position: relative;
1432
- padding: 0 6px;
1433
- cursor: pointer;
1434
- }
1435
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in,
1436
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in {
1437
- border: 1px solid #bcccd2;
1438
- min-height: 360px;
1439
- background: #e4eff4;
1440
- position: relative;
1441
- }
1442
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected,
1443
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected {
1444
- background: #cae7f4 url("images/cell-selected.png") repeat;
1445
- border-color: #9abcc7;
1446
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
1447
- }
1448
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,
1449
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,
1450
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,
1451
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input {
1452
- position: absolute;
1453
- font-size: 17px;
1454
- font-weight: bold;
1455
- top: 50%;
1456
- left: 50%;
1457
- width: 80px;
1458
- text-align: center;
1459
- color: #5e6d72;
1460
- margin: -0.95em 0 0 -40px;
1461
- padding: 10px 0;
1462
- border: 1px solid transparent;
1463
- line-height: 1.4em !important;
1464
- overflow: hidden;
1465
- cursor: pointer;
1466
- }
1467
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after,
1468
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after,
1469
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,
1470
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after {
1471
- content: '%';
1472
- }
1473
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover,
1474
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover,
1475
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,
1476
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover {
1477
- background: #F6F6F6;
1478
- border: 1px solid #D0D0D0;
1479
- }
1480
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,
1481
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input {
1482
- background: #F6F6F6;
1483
- border: 1px solid #D0D0D0;
1484
- -webkit-box-shadow: none;
1485
- -moz-box-shadow: none;
1486
- box-shadow: none;
1487
- }
1488
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle,
1489
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle {
1490
- z-index: 100;
1491
- position: absolute;
1492
- top: 0;
1493
- width: 12px;
1494
- left: -6px;
1495
- cursor: col-resize;
1496
- background: #e5f4fb;
1497
- height: 360px;
1498
- -webkit-transition: background 0.15s ease-in-out 0s;
1499
- -moz-transition: background 0.15s ease-in-out 0s;
1500
- -o-transition: background 0.15s ease-in-out 0s;
1501
- transition: background 0.15s ease-in-out 0s;
1502
- }
1503
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover,
1504
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover,
1505
- .so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,
1506
- .block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging {
1507
- background: #b7e0f1;
1508
- }
1509
- .so-panels-dialog.so-panels-dialog-history .so-left-sidebar,
1510
- .block-editor.so-panels-dialog-history .so-left-sidebar {
1511
- padding: 0;
1512
- }
1513
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry,
1514
- .block-editor.so-panels-dialog-history .history-entries .history-entry {
1515
- padding: 10px;
1516
- background: #F8F8F8;
1517
- cursor: pointer;
1518
- border-bottom: 1px solid #ccc;
1519
- }
1520
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry h3,
1521
- .block-editor.so-panels-dialog-history .history-entries .history-entry h3 {
1522
- margin: 0 0 0.6em 0;
1523
- font-size: 12px;
1524
- font-weight: bold;
1525
- color: #444444;
1526
- line-height: 1em;
1527
- }
1528
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .timesince,
1529
- .block-editor.so-panels-dialog-history .history-entries .history-entry .timesince {
1530
- color: #999999;
1531
- font-size: 11px;
1532
- line-height: 1em;
1533
- }
1534
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry:hover,
1535
- .block-editor.so-panels-dialog-history .history-entries .history-entry:hover {
1536
- background: #F0F0F0;
1537
- }
1538
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry.so-selected,
1539
- .block-editor.so-panels-dialog-history .history-entries .history-entry.so-selected {
1540
- background: #EEEEEE;
1541
- }
1542
- .so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .count,
1543
- .block-editor.so-panels-dialog-history .history-entries .history-entry .count {
1544
- color: #999999;
1545
- }
1546
- .so-panels-dialog.so-panels-dialog-history .so-content,
1547
- .block-editor.so-panels-dialog-history .so-content {
1548
- padding: 0;
1549
- overflow-y: hidden;
1550
- }
1551
- .so-panels-dialog.so-panels-dialog-history .so-content form.history-form,
1552
- .block-editor.so-panels-dialog-history .so-content form.history-form {
1553
- display: none;
1554
- }
1555
- .so-panels-dialog.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe,
1556
- .block-editor.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe {
1557
- width: 100%;
1558
- height: 100%;
1559
- }
1560
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content,
1561
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content {
1562
- padding-left: 10px;
1563
- padding-right: 10px;
1564
- }
1565
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-error-message,
1566
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-error-message {
1567
- font-size: 14px;
1568
- border: 1px solid #cccccc;
1569
- background: #F8F8F8;
1570
- padding: 15px 20px;
1571
- }
1572
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui,
1573
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui {
1574
- padding: 5px 15px;
1575
- text-align: right;
1576
- }
1577
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui,
1578
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui {
1579
- padding: 15px;
1580
- }
1581
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message,
1582
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message {
1583
- display: none;
1584
- }
1585
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message,
1586
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message {
1587
- display: block;
1588
- }
1589
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message,
1590
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message {
1591
- font-size: 1em;
1592
- margin-bottom: 0;
1593
- }
1594
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area,
1595
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area {
1596
- display: block;
1597
- -ms-box-sizing: border-box;
1598
- -moz-box-sizing: border-box;
1599
- -webkit-box-sizing: border-box;
1600
- box-sizing: border-box;
1601
- padding: 50px 30px;
1602
- border: 4px dashed #E0E0E0;
1603
- text-align: center;
1604
- -webkit-transition: all 0.25s ease 0s;
1605
- -moz-transition: all 0.25s ease 0s;
1606
- -o-transition: all 0.25s ease 0s;
1607
- transition: all 0.25s ease 0s;
1608
- }
1609
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover,
1610
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover {
1611
- background-color: #f2f9fc;
1612
- border-color: #0074a2;
1613
- }
1614
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar,
1615
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar {
1616
- display: none;
1617
- padding: 2px;
1618
- border: 2px solid #2181b1;
1619
- -webkit-border-radius: 2px;
1620
- -moz-border-radius: 2px;
1621
- border-radius: 2px;
1622
- margin-top: 20px;
1623
- }
1624
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent,
1625
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent {
1626
- height: 14px;
1627
- background-color: #358ebe;
1628
- -webkit-border-radius: 1px;
1629
- -moz-border-radius: 1px;
1630
- border-radius: 1px;
1631
- }
1632
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button,
1633
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button {
1634
- padding: 12px 30px;
1635
- height: auto;
1636
- }
1637
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse,
1638
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse {
1639
- background: #f3f3f3;
1640
- border-bottom: 1px solid #d0d0d0;
1641
- margin: -15px -10px 15px -10px;
1642
- padding: 15px;
1643
- font-weight: bold;
1644
- }
1645
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper,
1646
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper {
1647
- display: flex;
1648
- flex-flow: row wrap;
1649
- }
1650
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results,
1651
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results {
1652
- margin: 20px 0;
1653
- padding: 0 5px;
1654
- }
1655
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,
1656
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item {
1657
- -ms-box-sizing: border-box;
1658
- -moz-box-sizing: border-box;
1659
- -webkit-box-sizing: border-box;
1660
- box-sizing: border-box;
1661
- padding: 6px;
1662
- }
1663
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper,
1664
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper {
1665
- display: flex;
1666
- flex-flow: column nowrap;
1667
- height: 100%;
1668
- box-sizing: border-box;
1669
- padding: 15px 10px;
1670
- background: #F7F7F7;
1671
- border: 1px solid #d0d0d0;
1672
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
1673
- -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.1);
1674
- box-shadow: 0 1px 1px rgba(0,0,0,0.1);
1675
- }
1676
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title,
1677
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title {
1678
- font-size: 15px;
1679
- margin: 0 0 13px 0;
1680
- }
1681
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot,
1682
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot {
1683
- flex: 3 auto;
1684
- margin-bottom: 10px;
1685
- cursor: pointer;
1686
- }
1687
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,
1688
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading {
1689
- background-image: url("images/wpspin_light.gif");
1690
- background-position: center center;
1691
- background-repeat: no-repeat;
1692
- }
1693
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
1694
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,
1695
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading {
1696
- background-image: url(images/wpspin_light-2x.gif);
1697
- background-size: 16px 16px;
1698
- }
1699
- }
1700
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img,
1701
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img {
1702
- display: block;
1703
- width: 100%;
1704
- height: auto;
1705
- }
1706
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper,
1707
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper {
1708
- display: block;
1709
- min-height: 40px;
1710
- background: #808080;
1711
- border: 1px solid #d0d0d0;
1712
- }
1713
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description,
1714
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description {
1715
- flex: 1 auto;
1716
- font-size: 0.9em;
1717
- color: #666;
1718
- margin-bottom: 10px;
1719
- max-height: 60px;
1720
- overflow: hidden;
1721
- }
1722
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom,
1723
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom {
1724
- flex: 1 auto;
1725
- position: relative;
1726
- max-height: 50px;
1727
- margin: 10px -10px -15px -10px;
1728
- background: #fcfcfc;
1729
- border-top: 1px solid #d0d0d0;
1730
- }
1731
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title,
1732
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title {
1733
- margin: 0;
1734
- padding: 16px 10px;
1735
- cursor: pointer;
1736
- overflow: hidden;
1737
- white-space: nowrap;
1738
- }
1739
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons,
1740
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons {
1741
- position: absolute;
1742
- z-index: 2;
1743
- top: 0;
1744
- bottom: 0;
1745
- right: 0;
1746
- height: 100%;
1747
- visibility: hidden;
1748
- -ms-box-sizing: border-box;
1749
- -moz-box-sizing: border-box;
1750
- -webkit-box-sizing: border-box;
1751
- box-sizing: border-box;
1752
- padding: 11px 10px 10px 15px;
1753
- border-left: 1px solid #d0d0d0;
1754
- background: #f6f6f6;
1755
- -webkit-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
1756
- -moz-box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
1757
- box-shadow: -1px 0 1px rgba(0, 0, 0, 0.05);
1758
- }
1759
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons,
1760
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons {
1761
- visibility: visible;
1762
- }
1763
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected,
1764
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected {
1765
- background-color: #e5f4fa;
1766
- }
1767
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper,
1768
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper {
1769
- background: #deeef4;
1770
- border-color: #9abcc7;
1771
- }
1772
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom,
1773
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom {
1774
- background: #f8fdff;
1775
- border-color: #bcccd2;
1776
- }
1777
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title,
1778
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title {
1779
- color: #3e484c;
1780
- }
1781
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons,
1782
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons {
1783
- background: #eaf2f6;
1784
- border-color: #bcccd2;
1785
- }
1786
- @media only screen and (min-width: 1680px) {
1787
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,
1788
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item {
1789
- width: 20%;
1790
- }
1791
- }
1792
- @media only screen and (max-width: 1679px) and (min-width: 1280px) {
1793
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,
1794
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item {
1795
- width: 25%;
1796
- }
1797
- }
1798
- @media only screen and (max-width: 1279px) and (min-width: 1140px) {
1799
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,
1800
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item {
1801
- width: 33.333%;
1802
- }
1803
- }
1804
- @media only screen and (max-width: 1139px) {
1805
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,
1806
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item {
1807
- width: 50%;
1808
- }
1809
- }
1810
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages,
1811
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages {
1812
- margin-top: 15px;
1813
- padding: 0 5px;
1814
- }
1815
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled,
1816
- .block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled {
1817
- pointer-events: none;
1818
- }
1819
- .so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position,
1820
- .block-editor.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position {
1821
- vertical-align: baseline;
1822
- }
1823
- .so-panels-dialog .so-visual-styles,
1824
- .block-editor .so-visual-styles {
1825
- margin: -15px;
1826
- height: auto;
1827
- /* All the field types */
1828
- }
1829
- .so-panels-dialog .so-visual-styles h3,
1830
- .block-editor .so-visual-styles h3 {
1831
- line-height: 1em;
1832
- margin: 0;
1833
- padding: 20px 15px;
1834
- border-bottom: 1px solid #ddd;
1835
- }
1836
- .so-panels-dialog .so-visual-styles .style-section-head,
1837
- .block-editor .so-visual-styles .style-section-head {
1838
- background: #ffffff;
1839
- padding: 15px 10px;
1840
- border-bottom: 1px solid #ddd;
1841
- cursor: pointer;
1842
- -webkit-user-select: none;
1843
- -moz-user-select: none;
1844
- -ms-user-select: none;
1845
- user-select: none;
1846
- }
1847
- .so-panels-dialog .so-visual-styles .style-section-head h4,
1848
- .block-editor .so-visual-styles .style-section-head h4 {
1849
- margin: 0;
1850
- }
1851
- .so-panels-dialog .so-visual-styles .style-section-fields,
1852
- .block-editor .so-visual-styles .style-section-fields {
1853
- padding: 15px;
1854
- border-bottom: 1px solid #ddd;
1855
- background: #F7F7F7;
1856
- }
1857
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper,
1858
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper {
1859
- margin-bottom: 20px;
1860
- }
1861
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper:last-child,
1862
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper:last-child {
1863
- margin-bottom: 0;
1864
- }
1865
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper > label,
1866
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper > label {
1867
- font-weight: bold;
1868
- display: block;
1869
- margin-bottom: 3px;
1870
- }
1871
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field,
1872
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field {
1873
- zoom: 1;
1874
- }
1875
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before,
1876
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before {
1877
- content: '';
1878
- display: block;
1879
- }
1880
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after,
1881
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after {
1882
- content: '';
1883
- display: table;
1884
- clear: both;
1885
- }
1886
- .so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field input,
1887
- .block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field input {
1888
- font-size: 12px;
1889
- }
1890
- .so-panels-dialog .so-visual-styles .style-input-wrapper,
1891
- .block-editor .so-visual-styles .style-input-wrapper {
1892
- zoom: 1;
1893
- }
1894
- .so-panels-dialog .so-visual-styles .style-input-wrapper:before,
1895
- .block-editor .so-visual-styles .style-input-wrapper:before {
1896
- content: '';
1897
- display: block;
1898
- }
1899
- .so-panels-dialog .so-visual-styles .style-input-wrapper:after,
1900
- .block-editor .so-visual-styles .style-input-wrapper:after {
1901
- content: '';
1902
- display: table;
1903
- clear: both;
1904
- }
1905
- .so-panels-dialog .so-visual-styles .style-input-wrapper input,
1906
- .block-editor .so-visual-styles .style-input-wrapper input {
1907
- max-width: 100%;
1908
- }
1909
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-inputs,
1910
- .block-editor .so-visual-styles .style-field-measurement .measurement-inputs {
1911
- overflow: auto;
1912
- margin: 0 -3px 4px -3px;
1913
- }
1914
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper,
1915
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper {
1916
- box-sizing: border-box;
1917
- float: left;
1918
- width: 25%;
1919
- padding: 0 3px;
1920
- }
1921
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value,
1922
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value {
1923
- border-width: 1px;
1924
- display: block;
1925
- max-width: 100%;
1926
- }
1927
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top,
1928
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top {
1929
- box-shadow: inset 0 2px 1px rgba(0, 115, 170, 0.35);
1930
- }
1931
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right,
1932
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right {
1933
- box-shadow: inset -3px 0 2px rgba(0, 115, 170, 0.35);
1934
- }
1935
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom,
1936
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom {
1937
- box-shadow: inset 0 -2px 1px rgba(0, 115, 170, 0.35);
1938
- }
1939
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left,
1940
- .block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left {
1941
- box-shadow: inset 3px 0 2px rgba(0, 115, 170, 0.35);
1942
- }
1943
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-multiple,
1944
- .block-editor .so-visual-styles .style-field-measurement .measurement-unit-multiple {
1945
- width: 100%;
1946
- display: block;
1947
- }
1948
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-single,
1949
- .block-editor .so-visual-styles .style-field-measurement .measurement-unit-single {
1950
- float: right;
1951
- width: 25%;
1952
- }
1953
- .so-panels-dialog .so-visual-styles .style-field-measurement .measurement-value-single,
1954
- .block-editor .so-visual-styles .style-field-measurement .measurement-value-single {
1955
- float: left;
1956
- width: 72%;
1957
- }
1958
- .so-panels-dialog .so-visual-styles .style-field-image .so-image-selector,
1959
- .block-editor .so-visual-styles .style-field-image .so-image-selector {
1960
- display: inline-block;
1961
- background-color: #f7f7f7;
1962
- border: 1px solid #ccc;
1963
- height: 28px;
1964
- float: left;
1965
- -webkit-border-radius: 3px;
1966
- -moz-border-radius: 3px;
1967
- border-radius: 3px;
1968
- cursor: pointer;
1969
- -webkit-box-shadow: inset 0 1px #FFFFFF;
1970
- -moz-box-shadow: inset 0 1px #FFFFFF;
1971
- box-shadow: inset 0 1px #FFFFFF;
1972
- }
1973
- .so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .current-image,
1974
- .block-editor .so-visual-styles .style-field-image .so-image-selector .current-image {
1975
- height: 28px;
1976
- width: 28px;
1977
- float: left;
1978
- background: #ffffff;
1979
- border-right: 1px solid #ccc;
1980
- background-size: cover;
1981
- -webkit-border-top-right-radius: 0;
1982
- -webkit-border-bottom-right-radius: 0;
1983
- -webkit-border-bottom-left-radius: 3px;
1984
- -webkit-border-top-left-radius: 3px;
1985
- -moz-border-radius-topright: 0;
1986
- -moz-border-radius-bottomright: 0;
1987
- -moz-border-radius-bottomleft: 3px;
1988
- -moz-border-radius-topleft: 3px;
1989
- border-top-right-radius: 0;
1990
- border-bottom-right-radius: 0;
1991
- border-bottom-left-radius: 3px;
1992
- border-top-left-radius: 3px;
1993
- -moz-background-clip: padding-box;
1994
- -webkit-background-clip: padding-box;
1995
- background-clip: padding-box;
1996
- }
1997
- .so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .select-image,
1998
- .block-editor .so-visual-styles .style-field-image .so-image-selector .select-image {
1999
- font-size: 12px;
2000
- line-height: 28px;
2001
- float: left;
2002
- padding: 0 8px;
2003
- color: #555;
2004
- }
2005
- .so-panels-dialog .so-visual-styles .style-field-image .remove-image,
2006
- .block-editor .so-visual-styles .style-field-image .remove-image {
2007
- font-size: 12px;
2008
- margin-top: 4px;
2009
- margin-left: 15px;
2010
- display: inline-block;
2011
- float: left;
2012
- color: #666;
2013
- text-decoration: none;
2014
- }
2015
- .so-panels-dialog .so-visual-styles .style-field-image .remove-image.hidden,
2016
- .block-editor .so-visual-styles .style-field-image .remove-image.hidden {
2017
- display: none;
2018
- }
2019
- .so-panels-dialog .so-visual-styles .style-field-image .image-fallback,
2020
- .block-editor .so-visual-styles .style-field-image .image-fallback {
2021
- margin-top: 4px;
2022
- }
2023
- .so-panels-dialog .so-visual-styles .style-field-checkbox label,
2024
- .block-editor .so-visual-styles .style-field-checkbox label {
2025
- -webkit-user-select: none;
2026
- /* Chrome all / Safari all */
2027
- -moz-user-select: none;
2028
- /* Firefox all */
2029
- -ms-user-select: none;
2030
- /* IE 10+ */
2031
- user-select: none;
2032
- }
2033
- .so-panels-dialog .so-visual-styles .style-field-radio label,
2034
- .block-editor .so-visual-styles .style-field-radio label {
2035
- display: block;
2036
- }
2037
- .so-panels-dialog .so-visual-styles .so-field-code,
2038
- .block-editor .so-visual-styles .so-field-code {
2039
- font-size: 12px;
2040
- font-family: "Courier 10 Pitch", Courier, monospace;
2041
- }
2042
- .so-panels-dialog .so-visual-styles .so-description,
2043
- .block-editor .so-visual-styles .so-description {
2044
- color: #999;
2045
- font-size: 12px;
2046
- margin-top: 5px;
2047
- margin-bottom: 0;
2048
- font-style: italic;
2049
- clear: both;
2050
- }
2051
- .so-panels-dialog .so-visual-styles.so-cell-styles,
2052
- .block-editor .so-visual-styles.so-cell-styles {
2053
- margin-top: 15px;
2054
- }
2055
- .so-panels-dialog .so-content .siteorigin-panels-builder .so-builder-toolbar,
2056
- .block-editor .so-content .siteorigin-panels-builder .so-builder-toolbar,
2057
- .so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,
2058
- .block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar {
2059
- border: 1px solid #dedede;
2060
- z-index: 1;
2061
- }
2062
- .so-panels-dialog .so-content .siteorigin-panels-builder .so-rows-container,
2063
- .block-editor .so-content .siteorigin-panels-builder .so-rows-container,
2064
- .so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,
2065
- .block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container {
2066
- padding: 20px 0 0 0;
2067
- }
2068
- .so-panels-dialog .so-content .siteorigin-panels-builder .so-panels-welcome-message,
2069
- .block-editor .so-content .siteorigin-panels-builder .so-panels-welcome-message,
2070
- .so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,
2071
- .block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message {
2072
- padding-left: 0;
2073
- padding-right: 0;
2074
- line-height: 2.5em;
2075
- }
2076
- .so-panels-dialog .siteorigin-panels-layout-block-container,
2077
- .block-editor .siteorigin-panels-layout-block-container {
2078
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
2079
- font-size: 13px;
2080
- line-height: 1.4em;
2081
- }
2082
- .so-panels-dialog .siteorigin-panels-layout-block-container ul,
2083
- .block-editor .siteorigin-panels-layout-block-container ul {
2084
- list-style: none;
2085
- }
2086
- .so-panels-dialog .siteorigin-panels-block-icon,
2087
- .block-editor .siteorigin-panels-block-icon {
2088
- display: inline-block;
2089
- background-size: cover;
2090
- width: 20px;
2091
- height: 20px;
2092
- background-image: url('./images/pb-icon.svg');
2093
- }
2094
- .so-panels-dialog .siteorigin-panels-block-icon.white,
2095
- .block-editor .siteorigin-panels-block-icon.white {
2096
- background-image: url('./images/pb-icon_white.svg');
2097
- }
2098
- .so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container,
2099
- .block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container {
2100
- text-align: center;
2101
- }
2102
- .so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container > span,
2103
- .block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container > span {
2104
- display: inline-block;
2105
- }
2106
- .so-panels-dialog .siteorigin-panels-add-layout-block,
2107
- .block-editor .siteorigin-panels-add-layout-block {
2108
- text-align: center;
2109
- margin-left: auto;
2110
- margin-right: auto;
2111
- }
2112
- .so-panels-dialog .siteorigin-panels-add-layout-block > button,
2113
- .block-editor .siteorigin-panels-add-layout-block > button {
2114
- height: 100%;
2115
- padding: 5px 10px;
2116
- font-size: 16px;
2117
- }
2118
- .so-panels-dialog .siteorigin-panels-add-layout-block > button .siteorigin-panels-block-icon,
2119
- .block-editor .siteorigin-panels-add-layout-block > button .siteorigin-panels-block-icon {
2120
- margin: 3px 10px 0px 0px;
2121
- }
2122
- .so-panels-dialog .so-dropdown-wrapper input[type="button"].button-primary,
2123
- .block-editor .so-dropdown-wrapper input[type="button"].button-primary {
2124
- width: 125px;
2125
- height: 28px;
2126
- }
2127
- .so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper,
2128
- .block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper {
2129
- display: block;
2130
- z-index: 11;
2131
- bottom: 28px;
2132
- width: 125px;
2133
- }
2134
- .so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden,
2135
- .block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden {
2136
- display: none;
2137
- }
2138
- /* Display the dialog with a proper z-index in the customizer */
2139
- .wp-customizer .so-panels-dialog .so-overlay,
2140
- .wp-customizer .so-panels-dialog .so-content,
2141
- .wp-customizer .so-panels-dialog .so-title-bar,
2142
- .wp-customizer .so-panels-dialog .so-toolbar {
2143
- z-index: 500001;
2144
- }
2145
- .wp-customizer .so-panels-dialog .so-toolbar,
2146
- .wp-customizer .so-panels-dialog .so-left-sidebar,
2147
- .wp-customizer .so-panels-dialog .so-right-sidebar {
2148
- z-index: 500002;
2149
- }
2150
- .so-panels-live-editor > div {
2151
- position: fixed;
2152
- z-index: 99999;
2153
- -ms-box-sizing: border-box;
2154
- -moz-box-sizing: border-box;
2155
- -webkit-box-sizing: border-box;
2156
- box-sizing: border-box;
2157
- }
2158
- .so-panels-live-editor .live-editor-form {
2159
- display: none;
2160
- }
2161
- .so-panels-live-editor .live-editor-collapse {
2162
- position: fixed;
2163
- top: 18px;
2164
- left: 10px;
2165
- line-height: 1em;
2166
- cursor: pointer;
2167
- z-index: 100000;
2168
- }
2169
- .so-panels-live-editor .live-editor-collapse .collapse-icon {
2170
- float: left;
2171
- margin: -4px 6px 0 0;
2172
- border-radius: 50%;
2173
- width: 20px;
2174
- height: 20px;
2175
- overflow: hidden;
2176
- -webkit-transition: all 0.25s ease 0s;
2177
- -moz-transition: all 0.25s ease 0s;
2178
- -o-transition: all 0.25s ease 0s;
2179
- transition: all 0.25s ease 0s;
2180
- }
2181
- .so-panels-live-editor .live-editor-collapse .collapse-icon:before {
2182
- display: block;
2183
- content: "\f148";
2184
- background: #eee;
2185
- font: normal 20px/1 dashicons;
2186
- speak: none;
2187
- padding: 0;
2188
- -webkit-font-smoothing: antialiased;
2189
- }
2190
- .so-panels-live-editor .live-editor-collapse:hover {
2191
- color: #0073aa;
2192
- }
2193
- .so-panels-live-editor .live-editor-collapse:hover .collapse-icon {
2194
- box-shadow: 0 0 3px rgba(30, 140, 190, 0.8);
2195
- }
2196
- .so-panels-live-editor .so-sidebar-tools {
2197
- background: #eee;
2198
- border-bottom: 1px solid #ddd;
2199
- border-right: 1px solid #D0D0D0;
2200
- top: 0;
2201
- left: 0;
2202
- height: 46px;
2203
- width: 360px;
2204
- }
2205
- .so-panels-live-editor .so-sidebar-tools .live-editor-close {
2206
- margin: 9px 10px 0 15px;
2207
- float: right;
2208
- }
2209
- .so-panels-live-editor .so-sidebar-tools .live-editor-mode {
2210
- float: right;
2211
- margin: 9px 4px 0 0;
2212
- }
2213
- .so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons {
2214
- font-size: 30px;
2215
- width: 30px;
2216
- height: 30px;
2217
- cursor: pointer;
2218
- color: #999;
2219
- }
2220
- .so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons:hover {
2221
- color: #666;
2222
- }
2223
- .so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons {
2224
- color: #0073aa;
2225
- }
2226
- .so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons:hover {
2227
- color: #0073aa;
2228
- }
2229
- .so-panels-live-editor .so-sidebar {
2230
- top: 46px;
2231
- left: 0;
2232
- bottom: 0;
2233
- width: 360px;
2234
- overflow-y: auto;
2235
- background: #f7f7f7;
2236
- border-right: 1px solid #D0D0D0;
2237
- }
2238
- .so-panels-live-editor .so-sidebar .siteorigin-panels-builder .so-rows-container {
2239
- padding: 10px 10px 0 10px !important;
2240
- }
2241
- .so-panels-live-editor .so-preview {
2242
- top: 0;
2243
- right: 0;
2244
- bottom: 0;
2245
- left: 360px;
2246
- background-color: #191e23;
2247
- }
2248
- .so-panels-live-editor .so-preview form {
2249
- display: none;
2250
- }
2251
- .so-panels-live-editor .so-preview iframe {
2252
- float: left;
2253
- width: 100%;
2254
- height: 100%;
2255
- margin: 0 auto;
2256
- }
2257
- .so-panels-live-editor .so-preview-overlay {
2258
- display: none;
2259
- opacity: 0.975;
2260
- top: 0;
2261
- right: 0;
2262
- bottom: 0;
2263
- left: 360px;
2264
- background-color: #F4F4F4;
2265
- cursor: wait;
2266
- }
2267
- .so-panels-live-editor .so-preview-overlay .so-loading-container {
2268
- opacity: 0.6;
2269
- position: absolute;
2270
- top: 50%;
2271
- width: 200px;
2272
- padding: 2px;
2273
- border-radius: 5px;
2274
- left: 50%;
2275
- margin-left: -104px;
2276
- margin-top: -9px;
2277
- border: 2px solid #aaa;
2278
- }
2279
- .so-panels-live-editor .so-preview-overlay .so-loading-container .so-loading-bar {
2280
- width: 50%;
2281
- border-radius: 3px;
2282
- height: 10px;
2283
- background: #aaa;
2284
- }
2285
- .so-panels-live-editor.so-collapsed .live-editor-collapse .collapse-icon {
2286
- transform: rotate(180deg);
2287
- }
2288
- .so-panels-live-editor.so-collapsed .so-sidebar-tools {
2289
- display: none;
2290
- }
2291
- .so-panels-live-editor.so-collapsed .so-sidebar {
2292
- display: none;
2293
- }
2294
- .so-panels-live-editor.so-collapsed .so-preview,
2295
- .so-panels-live-editor.so-collapsed .so-preview-overlay {
2296
- left: 0;
2297
- }
2298
- .so-panels-live-editor.live-editor-mobile-mode .so-preview iframe {
2299
- max-width: 480px;
2300
- max-height: 640px;
2301
- position: absolute;
2302
- top: 50%;
2303
- left: 50%;
2304
- margin-left: -240px;
2305
- margin-top: -320px;
2306
- }
2307
- @media (max-width: 840px) {
2308
- .so-panels-live-editor.live-editor-mobile-mode .so-preview iframe {
2309
- position: static;
2310
- margin-left: 0;
2311
- margin-top: 0;
2312
- }
2313
- }
2314
- @media (max-height: 640px) {
2315
- .so-panels-live-editor.live-editor-mobile-mode .so-preview iframe {
2316
- position: static;
2317
- margin-left: 0;
2318
- margin-top: 0;
2319
- }
2320
- }
2321
- .so-panels-live-editor.live-editor-tablet-mode .so-preview iframe {
2322
- position: absolute;
2323
- max-width: 768px;
2324
- top: 0;
2325
- left: 50%;
2326
- margin-left: -384px;
2327
- }
2328
- @media (max-width: 1128px) {
2329
- .so-panels-live-editor.live-editor-tablet-mode .so-preview iframe {
2330
- position: static;
2331
- margin-left: 0;
2332
- margin-top: 0;
2333
- }
2334
- }
2335
- .so-panels-loading {
2336
- background-image: url("images/wpspin_light.gif");
2337
- background-position: center center;
2338
- background-repeat: no-repeat;
2339
- }
2340
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
2341
- .so-panels-loading {
2342
- background-image: url(images/wpspin_light-2x.gif);
2343
- background-size: 16px 16px;
2344
- }
2345
- }
2346
- /* For the custom home page interface */
2347
- #panels-home-page {
2348
- /* The Switch - © 2013 Thibaut Courouble - MIT License */
2349
- }
2350
- #panels-home-page .switch {
2351
- margin: 0 10px 0 0;
2352
- float: left;
2353
- position: relative;
2354
- display: inline-block;
2355
- vertical-align: top;
2356
- width: 68px;
2357
- height: 24px;
2358
- padding: 3px;
2359
- background-color: #ffffff;
2360
- border-radius: 24px;
2361
- box-shadow: inset 0 -1px #ffffff, inset 0 1px 1px rgba(0, 0, 0, 0.05);
2362
- cursor: pointer;
2363
- background-image: -webkit-linear-gradient(top, #eeeeee, #ffffff 25px);
2364
- background-image: -moz-linear-gradient(top, #eeeeee, #ffffff 25px);
2365
- background-image: -o-linear-gradient(top, #eeeeee, #ffffff 25px);
2366
- background-image: linear-gradient(to bottom, #eeeeee, #ffffff 25px);
2367
- }
2368
- #panels-home-page .switch .switch-input {
2369
- position: absolute;
2370
- top: 0;
2371
- left: 0;
2372
- opacity: 0;
2373
- }
2374
- #panels-home-page .switch .switch-label {
2375
- position: relative;
2376
- display: block;
2377
- height: inherit;
2378
- font-size: 12px;
2379
- text-transform: uppercase;
2380
- background: #eceeef;
2381
- border-radius: inherit;
2382
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12), inset 0 0 2px rgba(0, 0, 0, 0.15);
2383
- -webkit-transition: 0.15s ease-out;
2384
- -moz-transition: 0.15s ease-out;
2385
- -o-transition: 0.15s ease-out;
2386
- transition: 0.15s ease-out;
2387
- -webkit-transition-property: opacity background;
2388
- -moz-transition-property: opacity background;
2389
- -o-transition-property: opacity background;
2390
- transition-property: opacity background;
2391
- }
2392
- #panels-home-page .switch .switch-label:before,
2393
- #panels-home-page .switch .switch-label:after {
2394
- position: absolute;
2395
- top: 50%;
2396
- margin-top: -0.5em;
2397
- line-height: 1;
2398
- -webkit-transition: inherit;
2399
- -moz-transition: inherit;
2400
- -o-transition: inherit;
2401
- transition: inherit;
2402
- }
2403
- #panels-home-page .switch .switch-label:before {
2404
- content: attr(data-off);
2405
- right: 11px;
2406
- color: #aaa;
2407
- text-shadow: 0 1px rgba(255, 255, 255, 0.5);
2408
- }
2409
- #panels-home-page .switch .switch-label:after {
2410
- content: attr(data-on);
2411
- left: 13px;
2412
- color: #ffffff;
2413
- text-shadow: 0 1px rgba(0, 0, 0, 0.2);
2414
- opacity: 0;
2415
- }
2416
- #panels-home-page .switch .switch-input:checked ~ .switch-label {
2417
- background: #47a8d8;
2418
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), inset 0 0 3px rgba(0, 0, 0, 0.2);
2419
- }
2420
- #panels-home-page .switch .switch-input:checked ~ .switch-label:before {
2421
- opacity: 0;
2422
- }
2423
- #panels-home-page .switch .switch-input:checked ~ .switch-label:after {
2424
- opacity: 1;
2425
- }
2426
- #panels-home-page .switch .switch-handle {
2427
- position: absolute;
2428
- top: 4px;
2429
- left: 4px;
2430
- width: 22px;
2431
- height: 22px;
2432
- background: #ffffff;
2433
- border-radius: 12px;
2434
- box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
2435
- background-image: -webkit-linear-gradient(top, #ffffff 40%, #f0f0f0);
2436
- background-image: -moz-linear-gradient(top, #ffffff 40%, #f0f0f0);
2437
- background-image: -o-linear-gradient(top, #ffffff 40%, #f0f0f0);
2438
- background-image: linear-gradient(to bottom, #ffffff 40%, #f0f0f0);
2439
- -webkit-transition: left 0.15s ease-out;
2440
- -moz-transition: left 0.15s ease-out;
2441
- -o-transition: left 0.15s ease-out;
2442
- transition: left 0.15s ease-out;
2443
- }
2444
- #panels-home-page .switch .switch-handle:before {
2445
- content: '';
2446
- position: absolute;
2447
- top: 50%;
2448
- left: 50%;
2449
- margin: -7px 0 0 -7px;
2450
- width: 14px;
2451
- height: 14px;
2452
- background: #f9f9f9;
2453
- border-radius: 7px;
2454
- box-shadow: inset 0 1px rgba(0, 0, 0, 0.02);
2455
- background-image: -webkit-linear-gradient(top, #eeeeee, #ffffff);
2456
- background-image: -moz-linear-gradient(top, #eeeeee, #ffffff);
2457
- background-image: -o-linear-gradient(top, #eeeeee, #ffffff);
2458
- background-image: linear-gradient(to bottom, #eeeeee, #ffffff);
2459
- }
2460
- #panels-home-page .switch .switch-input:checked ~ .switch-handle {
2461
- left: 48px;
2462
- box-shadow: -1px 1px 5px rgba(0, 0, 0, 0.2);
2463
- }
2464
- #panels-home-page .switch .switch-green > .switch-input:checked ~ .switch-label {
2465
- background: #4fb845;
2466
- }
2467
- #panels-home-page #panels-view-as-page {
2468
- display: inline-block;
2469
- margin-left: 50px;
2470
- }
2471
- .siteorigin-panels-builder-form .siteorigin-panels-builder {
2472
- border: 1px solid #D0D0D0;
2473
- background-color: #ffffff;
2474
- margin: 10px 0;
2475
- }
2476
- .siteorigin-panels-builder-form .siteorigin-panels-builder.so-panels-loading {
2477
- min-height: 150px;
2478
- }
2479
- .siteorigin-page-builder-widget .siteorigin-panels-display-builder {
2480
- display: inline-block !important;
2481
- }
2482
- .siteorigin-page-builder-widget .siteorigin-panels-no-builder {
2483
- display: none !important;
2484
- }
2485
- .so-panels-contextual-menu {
2486
- border: 1px solid #C0C0C0;
2487
- background: #f9f9f9;
2488
- -webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
2489
- -moz-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
2490
- box-shadow: 0 1px 1px rgba(0,0,0,0.04);
2491
- outline: none;
2492
- -webkit-border-radius: 2px;
2493
- -moz-border-radius: 2px;
2494
- border-radius: 2px;
2495
- position: absolute;
2496
- width: 180px;
2497
- top: 20px;
2498
- left: 20px;
2499
- z-index: 999999;
2500
- display: none;
2501
- overflow-y: auto;
2502
- }
2503
- .so-panels-contextual-menu,
2504
- .so-panels-contextual-menu * {
2505
- font-size: 12px;
2506
- }
2507
- .so-panels-contextual-menu .so-section {
2508
- border-bottom: 1px solid #c0c0c0;
2509
- }
2510
- .so-panels-contextual-menu .so-section:last-child {
2511
- border-bottom: none;
2512
- }
2513
- .so-panels-contextual-menu .so-section h5 {
2514
- margin: 0 0 5px 0;
2515
- padding: 8px 10px 5px 10px;
2516
- border-bottom: 1px solid #d0d0d0;
2517
- background: #f6f6f6;
2518
- }
2519
- .so-panels-contextual-menu .so-section .so-search-wrapper {
2520
- margin: -5px 0 5px 0;
2521
- border-bottom: 1px solid #d0d0d0;
2522
- background: #f4f4f4;
2523
- }
2524
- .so-panels-contextual-menu .so-section .so-search-wrapper input[type="text"] {
2525
- box-sizing: border-box;
2526
- display: block;
2527
- width: 100%;
2528
- margin: 0;
2529
- border: none;
2530
- padding: 5px 10px;
2531
- background: #fbfbfb;
2532
- }
2533
- .so-panels-contextual-menu .so-section .so-search-wrapper input[type="text"]:focus,
2534
- .so-panels-contextual-menu .so-section .so-search-wrapper input[type="text"]:active {
2535
- border: none;
2536
- box-shadow: none;
2537
- background: #ffffff;
2538
- }
2539
- .so-panels-contextual-menu .so-section ul {
2540
- margin: 5px 0 0 0;
2541
- padding: 0 0 5px 0;
2542
- }
2543
- .so-panels-contextual-menu .so-section ul li {
2544
- cursor: pointer;
2545
- margin: 0;
2546
- padding: 4px 10px;
2547
- line-height: 1em;
2548
- }
2549
- .so-panels-contextual-menu .so-section ul li:hover,
2550
- .so-panels-contextual-menu .so-section ul li.so-active {
2551
- background: #F0F0F0;
2552
- color: #444;
2553
- }
2554
- .so-panels-contextual-menu .so-section ul li.so-confirm {
2555
- color: #a00;
2556
- }
2557
- .so-panels-contextual-menu .so-section ul li.so-confirm:hover,
2558
- .so-panels-contextual-menu .so-section ul li.so-confirm.so-active {
2559
- background: #a00;
2560
- color: #fff;
2561
- }
2562
- .so-panels-contextual-menu .so-section ul li .dashicons {
2563
- width: 12px;
2564
- height: 12px;
2565
- font-size: 12px;
2566
- margin: 0;
2567
- float: right;
2568
- line-height: 12px;
2569
- }
2570
- .so-panels-contextual-menu .so-section .so-no-results {
2571
- padding: 0px 10px 5px 10px;
2572
- display: none;
2573
- font-style: italic;
2574
- }
2575
- .so-dropdown-wrapper {
2576
- position: relative;
2577
- float: right;
2578
- }
2579
- .so-dropdown-wrapper .so-dropdown-links-wrapper {
2580
- position: absolute;
2581
- padding: 6px 0 0 0;
2582
- }
2583
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul {
2584
- margin: 0;
2585
- border: 1px solid #C0C0C0;
2586
- background: #F9F9F9;
2587
- -webkit-border-radius: 2px;
2588
- -moz-border-radius: 2px;
2589
- border-radius: 2px;
2590
- padding: 4px 0;
2591
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
2592
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
2593
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
2594
- }
2595
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul li {
2596
- margin: 0;
2597
- }
2598
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul li:first-child {
2599
- border-top-width: 1px;
2600
- }
2601
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a {
2602
- display: block;
2603
- padding: 2px 8px;
2604
- text-decoration: none;
2605
- color: #666;
2606
- font-size: 11px;
2607
- cursor: pointer;
2608
- outline: 0 !important;
2609
- -webkit-box-shadow: none;
2610
- -moz-box-shadow: none;
2611
- box-shadow: none;
2612
- }
2613
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a:hover {
2614
- background: #F0F0F0;
2615
- color: #444;
2616
- }
2617
- .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a .dashicons {
2618
- font-size: 16px;
2619
- margin: 0;
2620
- float: right;
2621
- line-height: 16px;
2622
- }
2623
- .so-dropdown-wrapper .so-dropdown-links-wrapper .so-pointer {
2624
- width: 12px;
2625
- height: 6px;
2626
- position: absolute;
2627
- z-index: 12;
2628
- background: url("./images/dropdown-pointer.png");
2629
- background-size: 12px 6px;
2630
- top: 1px;
2631
- right: 18px;
2632
- }
2633
- /* Page Builder icons */
2634
- .so-panels-icon {
2635
- font-family: 'siteorigin-panels-icons';
2636
- speak: none;
2637
- font-style: normal;
2638
- font-weight: normal;
2639
- font-variant: normal;
2640
- text-transform: none;
2641
- line-height: 1;
2642
- /* Better Font Rendering =========== */
2643
- -webkit-font-smoothing: antialiased;
2644
- -moz-osx-font-smoothing: grayscale;
2645
- }
2646
- .so-panels-icon.so-panels-icon-add-row:before {
2647
- content: "\e900";
2648
- }
2649
- .so-panels-icon.so-panels-icon-add-widget:before {
2650
- content: "\e901";
2651
- }
2652
- .so-panels-icon.so-panels-icon-addons:before {
2653
- content: "\e902";
2654
- }
2655
- .so-panels-icon.so-panels-icon-history:before {
2656
- content: "\e903";
2657
- }
2658
- .so-panels-icon.so-panels-icon-layouts:before {
2659
- content: "\e904";
2660
- }
2661
- .so-panels-icon.so-panels-icon-learn:before {
2662
- content: "\e905";
2663
- }
2664
- .so-panels-icon.so-panels-icon-live-editor:before {
2665
- content: "\e906";
2666
- }
2667
- .so-panels-icon.so-panels-icon-move:before {
2668
- content: "\e907";
2669
- }
2670
- .so-panels-icon.so-panels-icon-settings:before {
2671
- content: "\e908";
2672
- }
2673
- #post-status-info.for-siteorigin-panels {
2674
- margin-top: -21px !important;
2675
- }
2676
- /* PB Icon for general use */
2677
- .siteorigin-page-builder-icon {
2678
- display: inline-block;
2679
- background-size: cover;
2680
- width: 20px;
2681
- height: 20px;
2682
- background-image: url('./images/pb-icon.svg');
2683
- }
2684
- .siteorigin-page-builder-icon.white {
2685
- background-image: url('./images/pb-icon_white.svg');
2686
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/admin.min.css DELETED
@@ -1 +0,0 @@
1
- @font-face{font-family:siteorigin-panels-icons;src:url(icons/panels-icons.eot);src:url(icons/panels-icons.eot) format("embedded-opentype"),url(icons/panels-icons.woff) format("woff"),url(icons/panels-icons.ttf) format("truetype"),url(icons/panels-icons.svg) format("svg");font-weight:400;font-style:normal}#so-panels-panels.attached-to-editor{margin-top:20px}#so-panels-panels.attached-to-editor .handlediv,#so-panels-panels.attached-to-editor .hndle{display:none!important}#so-panels-panels.attached-to-editor .inside{margin:0!important;padding:0!important}#so-panels-panels.attached-to-editor .so-toolbar .so-switch-to-standard{display:block}.siteorigin-panels-builder{position:relative}.siteorigin-panels-builder .so-tool-button{padding:6px 7px;text-decoration:none;line-height:1em;float:left;margin-right:2px;display:block;visibility:visible;position:relative;cursor:pointer;border:1px solid #bebebe;background:#eee;background:-o-linear-gradient(#f9f9f9,#eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#f9f9f9",endColorstr="#eeeeee",GradientType=0);box-shadow:0 1px 1px rgba(0,0,0,.04),inset 0 1px 0 hsla(0,0%,100%,.5);outline:none;border-radius:2px}.siteorigin-panels-builder .so-tool-button .so-panels-icon{font-size:12px}.siteorigin-panels-builder .so-tool-button span{display:inline-block;color:#666;text-shadow:0 1px 0 #fff;min-width:10px;text-align:center}.siteorigin-panels-builder .so-tool-button:hover{background:#fff}.siteorigin-panels-builder .so-tool-button:hover span{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-tool-button.so-row-settings{margin-right:8px}}.siteorigin-panels-builder .so-builder-toolbar{-ms-box-sizing:border-box;box-sizing:border-box;border-bottom:1px solid #d0d0d0;background:#f5f5f5;line-height:1em;z-index:101;white-space:nowrap;overflow-x:hidden;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.04);top:0;left:0;width:100%;padding:6px 9px;margin-top:0!important;zoom:1}.siteorigin-panels-builder .so-builder-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-builder-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{display:inline-block;color:#666;padding:2px 10px 2px 8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:3px 0 2px;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{float:left;margin:3px 7px 2px 0;font-size:14px;color:#747474}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover,.siteorigin-panels-builder .so-builder-toolbar .so-tool-button:hover .so-panels-icon{color:#444}@media (max-width:782px){.siteorigin-panels-builder .so-builder-toolbar .so-tool-button{margin-right:8px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-button-text{margin:7px 0 2px 5px;font-size:14px}.siteorigin-panels-builder .so-builder-toolbar .so-tool-button .so-panels-icon{margin:3px 0;font-size:21px}}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard{cursor:pointer;float:right;display:none;text-decoration:none;color:#666;padding:5px 6px;border-radius:2px;border:1px solid transparent;font-size:11px}.siteorigin-panels-builder .so-builder-toolbar .so-switch-to-standard:hover{background:#fafafa;border:1px solid #999;color:#444}.siteorigin-panels-builder .so-rows-container{padding:20px 15px 0}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color{background-color:#cde2ec;border:1px solid #a4cadd}.siteorigin-panels-builder .so-rows-container .so-row-color-1.so-row-color.so-row-color-selected:before{background:#a8cdde}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .cell-wrapper{background-color:#cde2ec}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99c4d8}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle{background-color:#e7f1f6}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-1 .so-cells .cell .resize-handle:hover{background-color:#dcebf2}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color{background-color:#f2c2be;border:1px solid #e9968f}.siteorigin-panels-builder .so-rows-container .so-row-color-2.so-row-color.so-row-color-selected:before{background:#ea9a93}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .cell-wrapper{background-color:#f2c2be}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell.cell-selected .cell-wrapper{background-color:#e68a83}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle{background-color:#f8dedc}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-2 .so-cells .cell .resize-handle:hover{background-color:#f5d2cf}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color{background-color:#d5ccdf;border:1px solid #b9aac9}.siteorigin-panels-builder .so-rows-container .so-row-color-3.so-row-color.so-row-color-selected:before{background:#bbadcb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .cell-wrapper{background-color:#d5ccdf}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell.cell-selected .cell-wrapper{background-color:#b1a0c3}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle{background-color:#e7e2ed}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-3 .so-cells .cell .resize-handle:hover{background-color:#dfd9e7}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color{background-color:#cae7cd;border:1px solid #a3d6a9}.siteorigin-panels-builder .so-rows-container .so-row-color-4.so-row-color.so-row-color-selected:before{background:#a7d7ac}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .cell-wrapper{background-color:#cae7cd}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell.cell-selected .cell-wrapper{background-color:#99d19f}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle{background-color:#e3f2e4}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-4 .so-cells .cell .resize-handle:hover{background-color:#d8edda}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color{background-color:#e2dcb1;border:1px solid #d3ca88}.siteorigin-panels-builder .so-rows-container .so-row-color-5.so-row-color.so-row-color-selected:before{background:#d4cb8c}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .cell-wrapper{background-color:#e2dcb1}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell.cell-selected .cell-wrapper{background-color:#cfc57d}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle{background-color:#ece8cb}.siteorigin-panels-builder .so-rows-container .so-row-container.so-row-color-5 .so-cells .cell .resize-handle:hover{background-color:#e8e3c0}.siteorigin-panels-builder .so-rows-container h3.so-row-label{display:inline-block;font-size:1em;font-weight:500;color:#474747;margin:0 0 0 4px;line-height:22px;float:left}.siteorigin-panels-builder .so-rows-container .so-row-toolbar{zoom:1;margin-bottom:4px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button{-ms-box-sizing:border-box;box-sizing:border-box;padding:4px;float:right}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{color:#777;font-size:11px;width:11px;height:11px;display:block}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button:hover .so-panels-icon{color:#555}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button.so-row-move{cursor:move}@media (max-width:782px){.siteorigin-panels-builder .so-rows-container .so-row-toolbar{margin-bottom:8px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-tool-button .so-panels-icon{font-size:21px;width:21px;height:21px}}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper{visibility:hidden;opacity:0;transition:visibility 0s linear 75ms,opacity 75ms linear;z-index:101;right:-10px;top:100%;width:125px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete{color:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li a.so-row-delete:hover{color:#fff;background:#a00}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container{display:flex;justify-content:space-around;padding:5px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color{display:inline-block;cursor:pointer;position:relative;text-align:center;width:14px;height:14px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper .so-dropdown-links-wrapper ul li.so-row-colors-container .so-row-color.so-row-color-selected:before{content:"";display:block;position:absolute;top:2px;bottom:2px;left:2px;right:2px}.siteorigin-panels-builder .so-rows-container .so-row-toolbar .so-dropdown-wrapper:hover .so-dropdown-links-wrapper{visibility:visible;opacity:1;transition-delay:0s}.siteorigin-panels-builder .so-rows-container .ui-sortable-placeholder{visibility:visible!important;background:#f7f7f7;-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container{margin-bottom:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.siteorigin-panels-builder .so-rows-container .so-row-container.ui-sortable-helper{opacity:.9}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells{zoom:1;margin:0 -5px;position:relative;display:flex}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:before{content:"";display:block}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells:after{content:"";display:table;clear:both}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w{width:10px;left:-11px;cursor:col-resize;background:rgba(0,150,211,.25);transition:background .25s ease-in-out}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .ui-resizable-handle.ui-resizable-w:hover{background:rgba(0,150,211,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell{-ms-box-sizing:border-box;box-sizing:border-box;position:relative;padding:0 5px}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-first{margin-left:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.so-last{margin-right:0}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{background:#e4eff4;padding:7px 7px 0;height:100%;min-height:63px;transition:background .25s ease-in-out 0s}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell.cell-selected .cell-wrapper{background-size:3px 3px}}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .cell-wrapper{-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget{cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-move{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-edit h4{cursor:auto}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover{background:#feffff}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions:hover a{opacity:1}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a{display:none;margin-right:3px;text-decoration:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete{color:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions a.widget-delete:hover{color:#fff;background:red}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover .title a{display:inline-block;opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.panel-being-dragged .title .actions{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget small{display:block;height:16px;overflow:hidden;color:#777}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form{display:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only small{opacity:.5}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small,.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small{color:#eee}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight{border:1px solid rgba(0,0,0,.075);background:rgba(0,0,0,.025);-ms-box-sizing:border-box;box-sizing:border-box;height:49px;margin-bottom:7px;position:relative;box-shadow:inset 2px 2px 2px rgba(0,0,0,.01)}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .resize-handle{z-index:100;position:absolute;top:0;width:10px;left:-5px;cursor:col-resize;background:#f6fafb;height:100%;transition:background .25s ease-in-out 0s}.siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell:first-child .resize-handle{display:none}.siteorigin-panels-builder .so-panels-welcome-message{text-align:center;padding:0 15px 20px;color:#555;line-height:1.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{padding:15px 10px;background:#f8f8f8;border:1px solid #e0e0e0}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-message-wrapper{font-size:14px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{font-size:inherit;display:inline-block;float:none;color:#666;padding:5px 10px;margin:0 3px}@media only screen and (max-width:782px){.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button{padding:9px 10px}}.siteorigin-panels-builder .so-panels-welcome-message .so-tool-button .so-panels-icon{color:#777;font-size:.8em}.siteorigin-panels-builder .so-panels-welcome-message .so-tip-wrapper{margin-top:15px;font-size:.95em}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar{padding:10px}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button .so-panels-icon{margin:3px 0}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button.so-learn,.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar>.so-tool-button span.so-button-text{display:none}.siteorigin-panels-builder.so-display-narrow .so-builder-toolbar .so-switch-to-standard{display:none!important}.so-widget.ui-sortable-helper.widget-being-dragged{z-index:500002!important;opacity:.9;pointer-events:none;border:1px solid rgba(0,0,0,.35)!important;cursor:move;margin-bottom:7px;background:#f9f9fb;border:1px solid hsla(0,0%,100%,.75);max-height:49px;box-shadow:0 1px 1px rgba(0,0,0,.075);-ms-box-sizing:border-box;box-sizing:border-box}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-move{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged:hover{border:1px solid hsla(0,0%,100%,.55);background:#fff;box-shadow:0 0 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper{padding:7px 8px;overflow:hidden;position:relative}.so-widget.ui-sortable-helper.widget-being-dragged h4{display:block;cursor:pointer;margin:0 15px 3px 0;font-weight:600;line-height:1.25em;color:#474747;text-shadow:0 1px 0 #fff;white-space:nowrap}.so-widget.ui-sortable-helper.widget-being-dragged h4 span{font-weight:400;display:inline-block;color:#999;text-shadow:0 1px 0 #fff;margin-left:12px;margin-right:5px;font-style:italic}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-edit h4{cursor:auto}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions{font-size:12px;position:absolute;top:5px;right:7px;cursor:pointer;padding:2px 2px 2px 15px;z-index:10}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover{background:#feffff}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions:hover a{opacity:1}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a{display:none;margin-right:3px;text-decoration:none}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete{color:red}.so-widget.ui-sortable-helper.widget-being-dragged .title .actions a.widget-delete:hover{color:#fff;background:red}.so-widget.ui-sortable-helper.widget-being-dragged:hover .title a{display:inline-block;opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.panel-being-dragged .title .actions{display:none}.so-widget.ui-sortable-helper.widget-being-dragged small{display:block;height:16px;overflow:hidden;color:#777}.so-widget.ui-sortable-helper.widget-being-dragged .form{display:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover{background:#f5f5f5;border:1px solid #a6bac1;box-shadow:none}.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover small,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only small{opacity:.5}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered{background:#3a7096;border:1px solid #39618c;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small,.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.85)}.so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small{color:#eee}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container{padding-top:0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-rows-container{padding:10px 0 0}.widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-toolbar{padding-left:15px;padding-right:15px;margin:0 -15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-overlay,.block-editor .so-right-sidebar,.block-editor .so-title-bar,.block-editor .so-toolbar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-overlay,.so-panels-dialog .so-right-sidebar,.so-panels-dialog .so-title-bar,.so-panels-dialog .so-toolbar{z-index:100001;position:fixed;-ms-box-sizing:border-box;box-sizing:border-box;padding:15px}.block-editor .so-content,.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-content,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{overflow-y:auto}.block-editor .so-overlay,.so-panels-dialog .so-overlay{top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}.block-editor .so-content,.so-panels-dialog .so-content{top:80px;left:30px;right:30px;bottom:88px;background-color:#fdfdfd;overflow-x:hidden;box-shadow:inset 0 2px 2px rgba(0,0,0,.03)}.block-editor .so-content>:first-child,.so-panels-dialog .so-content>:first-child{margin-top:0}.block-editor .so-content>:last-child,.so-panels-dialog .so-content>:last-child{margin-bottom:0}.block-editor .so-content .so-content-tabs>*,.so-panels-dialog .so-content .so-content-tabs>*{display:none}.block-editor .so-title-bar,.so-panels-dialog .so-title-bar{left:30px;right:30px;top:30px;height:50px;background-color:#fafafa;border-bottom:1px solid #d8d8d8;padding:0}.block-editor .so-title-bar h3.so-title,.so-panels-dialog .so-title-bar h3.so-title{-ms-box-sizing:border-box;box-sizing:border-box;margin:0 150px 0 -3px;padding:15px;display:inline-block}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.block-editor .so-title-bar h3.so-title.so-title-editable:hover,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:hover{outline:none;background-color:#f0f0f0}.block-editor .so-title-bar h3.so-title.so-title-editable:focus,.so-panels-dialog .so-title-bar h3.so-title.so-title-editable:focus{border:1px solid #e4e4e4}.block-editor .so-title-bar input[type=text].so-edit-title,.so-panels-dialog .so-title-bar input[type=text].so-edit-title{margin-top:-3px;margin-left:-3px;display:none;color:#23282d;font-size:1.3em;font-weight:600;border:none;box-shadow:none;background-color:#f0f0f0;padding:4px 5px}.block-editor .so-title-bar h3.so-parent-link,.so-panels-dialog .so-title-bar h3.so-parent-link{cursor:pointer;position:relative;float:left;margin:0 15px 0 0;padding:15px 27px 15px 3px}.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{position:absolute;top:0;right:0;width:12px;height:50px;display:block;background:url(images/dialog-separator.png) no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor .so-title-bar h3.so-parent-link .so-separator,.so-panels-dialog .so-title-bar h3.so-parent-link .so-separator{background:url(images/dialog-separator@2x.png) no-repeat;background-size:cover}}.block-editor .so-title-bar a,.so-panels-dialog .so-title-bar a{cursor:pointer;position:relative;box-sizing:border-box;width:50px;height:50px;display:inline-block;transition:all .2s ease 0s;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a:hover,.so-panels-dialog .so-title-bar a:hover{background:#e9e9e9}.block-editor .so-title-bar a:hover .so-dialog-icon,.so-panels-dialog .so-title-bar a:hover .so-dialog-icon{color:#333}.block-editor .so-title-bar a .so-dialog-icon,.so-panels-dialog .so-title-bar a .so-dialog-icon{position:absolute;top:50%;left:50%;text-decoration:none;width:20px;height:20px;margin-left:-10px;margin-top:-10px;color:#666;text-align:center}.block-editor .so-title-bar a .so-dialog-icon:before,.so-panels-dialog .so-title-bar a .so-dialog-icon:before{font:400 20px/1em dashicons;top:7px;left:13px}.block-editor .so-title-bar a.so-close,.so-panels-dialog .so-title-bar a.so-close{right:0}.block-editor .so-title-bar a.so-close .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-close .so-dialog-icon:before{content:"\f335"}.block-editor .so-title-bar a.so-show-left-sidebar,.so-panels-dialog .so-title-bar a.so-show-left-sidebar{float:left;display:inline;padding:16px 25px;border-right:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.block-editor .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-left-sidebar .so-dialog-icon:before{content:"\f333"}.block-editor .so-title-bar a.so-show-right-sidebar,.so-panels-dialog .so-title-bar a.so-show-right-sidebar{display:inline-block}.block-editor .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-show-right-sidebar .so-dialog-icon:before{content:"\f100"}.block-editor .so-title-bar a.so-next .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-next .so-dialog-icon:before{content:"\f345"}.block-editor .so-title-bar a.so-previous .so-dialog-icon:before,.so-panels-dialog .so-title-bar a.so-previous .so-dialog-icon:before{content:"\f341"}.block-editor .so-title-bar a.so-nav.so-disabled,.so-panels-dialog .so-title-bar a.so-nav.so-disabled{cursor:default;pointer-events:none}.block-editor .so-title-bar a.so-nav.so-disabled .so-dialog-icon,.so-panels-dialog .so-title-bar a.so-nav.so-disabled .so-dialog-icon{color:#ddd}.block-editor .so-title-bar .so-title-bar-buttons,.so-panels-dialog .so-title-bar .so-title-bar-buttons{position:absolute;right:0;top:0}.block-editor .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-left-button.so-has-icon .so-panels-icon{left:70px}.block-editor .so-title-bar.so-has-icon .so-panels-icon,.so-panels-dialog .so-title-bar.so-has-icon .so-panels-icon{float:left;padding:14px;font-size:22px;line-height:22px;display:inline-block;width:22px;height:22px;text-align:center;color:#666}.block-editor .so-toolbar,.so-panels-dialog .so-toolbar{left:30px;right:30px;bottom:30px;height:58px;background-color:#fafafa;border-top:1px solid #d8d8d8;z-index:100002}.block-editor .so-toolbar .so-status,.so-panels-dialog .so-toolbar .so-status{float:left;padding-top:6px;padding-bottom:6px;font-style:italic;color:#999;line-height:1em}.block-editor .so-toolbar .so-status.so-panels-loading,.so-panels-dialog .so-toolbar .so-status.so-panels-loading{padding-left:26px;background-position:0}.block-editor .so-toolbar .so-status .dashicons-warning,.so-panels-dialog .so-toolbar .so-status .dashicons-warning{color:#a00;vertical-align:middle;margin-right:7px;margin-top:-1px}.block-editor .so-toolbar .so-buttons,.so-panels-dialog .so-toolbar .so-buttons{float:right}.block-editor .so-toolbar .so-buttons .action-buttons,.so-panels-dialog .so-toolbar .so-buttons .action-buttons{position:absolute;left:15px;top:50%;margin-top:-.65em}.block-editor .so-toolbar .so-buttons .action-buttons a,.so-panels-dialog .so-toolbar .so-buttons .action-buttons a{cursor:pointer;display:inline;padding:.2em .5em;line-height:1em;margin-right:.5em;text-decoration:none}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete{color:#a00}.block-editor .so-toolbar .so-buttons .action-buttons .so-delete:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-delete:hover{background:#a00;color:#fff}.block-editor .so-toolbar .so-buttons .action-buttons .so-duplicate:hover,.so-panels-dialog .so-toolbar .so-buttons .action-buttons .so-duplicate:hover{text-decoration:underline}.block-editor .so-left-sidebar,.block-editor .so-right-sidebar,.so-panels-dialog .so-left-sidebar,.so-panels-dialog .so-right-sidebar{background-color:#f3f3f3}.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{display:none;top:30px;left:30px;bottom:30px;width:290px;border-right:1px solid #d8d8d8}@media only screen and (max-width:980px){.block-editor .so-left-sidebar,.so-panels-dialog .so-left-sidebar{top:80px;z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-left-sidebar h4,.so-panels-dialog .so-left-sidebar h4{margin:0 0 20px;font-size:18px}.block-editor .so-left-sidebar .so-sidebar-search,.so-panels-dialog .so-left-sidebar .so-sidebar-search{width:100%;padding:6px;margin-bottom:20px}.block-editor .so-left-sidebar .so-sidebar-tabs,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs{list-style:none;margin:0 -15px}.block-editor .so-left-sidebar .so-sidebar-tabs li,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li{margin-bottom:0}.block-editor .so-left-sidebar .so-sidebar-tabs li a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a{padding:7px 16px;display:block;font-size:14px;text-decoration:none;box-shadow:none!important}.block-editor .so-left-sidebar .so-sidebar-tabs li a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li a:hover{background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a{color:#555;font-weight:700;background:#fff}.block-editor .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover,.so-panels-dialog .so-left-sidebar .so-sidebar-tabs li.tab-active a:hover{background:#fff}.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{display:none;top:80px;right:30px;bottom:88px;width:290px;border-left:1px solid #d8d8d8}.block-editor .so-right-sidebar h3,.so-panels-dialog .so-right-sidebar h3{color:#333}.block-editor .so-right-sidebar h3:first-child,.so-panels-dialog .so-right-sidebar h3:first-child{margin-top:0}@media only screen and (max-width:980px){.block-editor .so-right-sidebar,.so-panels-dialog .so-right-sidebar{z-index:110000;bottom:inherit;max-height:calc(100% - 80px)}}.block-editor .so-sidebar .form-field,.so-panels-dialog .so-sidebar .form-field{margin-bottom:20px}.block-editor .so-sidebar .form-field label,.so-panels-dialog .so-sidebar .form-field label{font-weight:500;font-size:15px;display:block;margin-bottom:10px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.block-editor.so-panels-dialog-has-left-sidebar .so-title-bar,.block-editor.so-panels-dialog-has-left-sidebar .so-toolbar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-title-bar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-toolbar{left:320px}.block-editor.so-panels-dialog-has-left-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-content{box-shadow:inset 2px 2px 2px rgba(0,0,0,.03)}.block-editor.so-panels-dialog-has-left-sidebar .so-left-sidebar,.so-panels-dialog.so-panels-dialog-has-left-sidebar .so-left-sidebar{display:block}.block-editor.so-panels-dialog-has-right-sidebar .so-content,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-content{right:320px}.block-editor.so-panels-dialog-has-right-sidebar .so-right-sidebar,.so-panels-dialog.so-panels-dialog-has-right-sidebar .so-right-sidebar{display:block}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget{border-radius:2px;border:1px solid #ccc;cursor:pointer;padding:10px;background:#f9f9f9;box-shadow:0 1px 2px rgba(0,0,0,.075),inset 0 1px 0 #fff;margin-bottom:15px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:hover{border:1px solid #bbb;background:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current{border-color:#0074a2;background:#2ea2cc;cursor:auto;box-shadow:0 1px 2px rgba(0,0,0,.15),inset 0 1px 0 hsla(0,0%,100%,.2)}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current h3{color:#fff}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current small{color:#eee}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget.so-current:hover{border-color:#0074a2;background:#2ea2cc}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget:last-child{margin-bottom:0}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget h3{margin:0 0 7px;padding:0;height:1.2em;color:#222;font-size:14px}.block-editor.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small,.so-panels-dialog.so-panels-dialog-edit-widget .so-left-sidebar .so-widgets .so-widget small{font-size:11px;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list{zoom:1;margin:0 -5px -10px;min-height:10px}.block-editor.so-panels-dialog-add-widget .widget-type-list:before,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:before{content:"";display:block}.block-editor.so-panels-dialog-add-widget .widget-type-list:after,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{-ms-user-select:none;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;-ms-box-sizing:border-box;box-sizing:border-box;width:25%;padding:0 5px;margin-bottom:10px;float:left}@media (max-width:1280px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:33.333%}}@media (max-width:960px){.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type{width:50%}}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type h3,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type h3{margin:0 0 7px;padding:0;color:#222;font-size:14px}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type small,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type small{font-size:11px;min-height:2.5em;line-height:1.25em;display:block;overflow:hidden;color:#888}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type .widget-icon{font-size:20px;width:20px;height:20px;color:#666;float:left;margin:-1px .5em 0 0}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper{border:1px solid #ccc;cursor:pointer;padding:10px;background:#f8f8f8;box-shadow:0 1px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover,.so-panels-dialog.so-panels-dialog-add-widget .widget-type-list .widget-type-wrapper:hover{border:1px solid #bbb;background:#fff;box-shadow:0 2px 2px rgba(0,0,0,.075)}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form{zoom:1;padding:8px;border:1px solid #ccc;margin-bottom:20px;background:#f3f3f3}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:before,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:before{content:"";display:block}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form:after{content:"";display:table;clear:both}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form input,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form select,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form span,.block-editor.so-panels-dialog-row-edit .so-content .row-set-form strong,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form select,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form span,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form strong{display:inline;margin:1px 5px;width:auto;outline:none;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form button,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form button{margin-top:2px}.block-editor.so-panels-dialog-row-edit .so-content .row-set-form label,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-set-form label{display:inline}.block-editor.so-panels-dialog-row-edit .so-content .row-preview,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview{margin:0 -6px;height:360px;position:relative;white-space:nowrap}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell-weight{-ms-box-sizing:border-box;box-sizing:border-box}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell{display:inline-block;position:relative;padding:0 6px;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in{border:1px solid #bcccd2;min-height:360px;background:#e4eff4;position:relative}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in.cell-selected{background:#cae7f4 url(images/cell-selected.png) repeat;border-color:#9abcc7;box-shadow:0 0 5px rgba(0,0,0,.2)}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{position:absolute;font-size:17px;font-weight:700;top:50%;left:50%;width:80px;text-align:center;color:#5e6d72;margin:-.95em 0 0 -40px;padding:10px 0;border:1px solid transparent;line-height:1.4em!important;overflow:hidden;cursor:pointer}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:after,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:after{content:"%"}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight:hover{background:#f6f6f6;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .preview-cell-in .preview-cell-weight-input{background:#f6f6f6;border:1px solid #d0d0d0;box-shadow:none}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle{z-index:100;position:absolute;top:0;width:12px;left:-6px;cursor:col-resize;background:#e5f4fb;height:360px;transition:background .15s ease-in-out 0s}.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.block-editor.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle.ui-draggable-dragging,.so-panels-dialog.so-panels-dialog-row-edit .so-content .row-preview .preview-cell .resize-handle:hover{background:#b7e0f1}.block-editor.so-panels-dialog-history .so-left-sidebar,.so-panels-dialog.so-panels-dialog-history .so-left-sidebar{padding:0}.block-editor.so-panels-dialog-history .history-entries .history-entry,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry{padding:10px;background:#f8f8f8;cursor:pointer;border-bottom:1px solid #ccc}.block-editor.so-panels-dialog-history .history-entries .history-entry h3,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry h3{margin:0 0 .6em;font-size:12px;font-weight:700;color:#444;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry .timesince,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .timesince{color:#999;font-size:11px;line-height:1em}.block-editor.so-panels-dialog-history .history-entries .history-entry:hover,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry:hover{background:#f0f0f0}.block-editor.so-panels-dialog-history .history-entries .history-entry.so-selected,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry.so-selected{background:#eee}.block-editor.so-panels-dialog-history .history-entries .history-entry .count,.so-panels-dialog.so-panels-dialog-history .history-entries .history-entry .count{color:#999}.block-editor.so-panels-dialog-history .so-content,.so-panels-dialog.so-panels-dialog-history .so-content{padding:0;overflow-y:hidden}.block-editor.so-panels-dialog-history .so-content form.history-form,.so-panels-dialog.so-panels-dialog-history .so-content form.history-form{display:none}.block-editor.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe,.so-panels-dialog.so-panels-dialog-history .so-content iframe.siteorigin-panels-history-iframe{width:100%;height:100%}.block-editor.so-panels-dialog-prebuilt-layouts .so-content,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content{padding-left:10px;padding-right:10px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-error-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-error-message{font-size:14px;border:1px solid #ccc;background:#f8f8f8;padding:15px 20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .export-file-ui{padding:5px 15px;text-align:right}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui{padding:15px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-drop-message{display:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui.has-drag-drop .drag-drop-message{display:block}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui p.drag-drop-message{font-size:1em;margin-bottom:0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area{display:block;-ms-box-sizing:border-box;box-sizing:border-box;padding:50px 30px;border:4px dashed #e0e0e0;text-align:center;transition:all .25s ease 0s}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .drag-upload-area.file-dragover{background-color:#f2f9fc;border-color:#0074a2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar{display:none;padding:2px;border:2px solid #2181b1;border-radius:2px;margin-top:20px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .progress-bar .progress-percent{height:14px;background-color:#358ebe;border-radius:1px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .import-upload-ui .file-browse-button{padding:12px 30px;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-browse{background:#f3f3f3;border-bottom:1px solid #d0d0d0;margin:-15px -10px 15px;padding:15px;font-weight:700}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items-wrapper{display:flex;flex-flow:row wrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-no-results{margin:20px 0;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{-ms-box-sizing:border-box;box-sizing:border-box;padding:6px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-directory-item-wrapper{display:flex;flex-flow:column nowrap;height:100%;box-sizing:border-box;padding:15px 10px;background:#f7f7f7;border:1px solid #d0d0d0;box-shadow:0 1px 1px rgba(0,0,0,.1)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-title{font-size:15px;margin:0 0 13px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot{flex:3 auto;margin-bottom:10px;cursor:pointer}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot.so-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot img{display:block;width:100%;height:auto}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-screenshot .so-screenshot-wrapper{display:block;min-height:40px;background:gray;border:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-description{flex:1 auto;font-size:.9em;color:#666;margin-bottom:10px;max-height:60px;overflow:hidden}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom{flex:1 auto;position:relative;max-height:50px;margin:10px -10px -15px;background:#fcfcfc;border-top:1px solid #d0d0d0}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-title{margin:0;padding:16px 10px;cursor:pointer;overflow:hidden;white-space:nowrap}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item .so-bottom .so-buttons{position:absolute;z-index:2;top:0;bottom:0;right:0;height:100%;visibility:hidden;-ms-box-sizing:border-box;box-sizing:border-box;padding:11px 10px 10px 15px;border-left:1px solid #d0d0d0;background:#f6f6f6;box-shadow:-1px 0 1px rgba(0,0,0,.05)}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item:hover .so-buttons{visibility:visible}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected{background-color:#e5f4fa}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-directory-item-wrapper{background:#deeef4;border-color:#9abcc7}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom{background:#f8fdff;border-color:#bcccd2}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-title{color:#3e484c}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item.selected .so-bottom .so-buttons{background:#eaf2f6;border-color:#bcccd2}@media only screen and (min-width:1680px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:20%}}@media only screen and (max-width:1679px) and (min-width:1280px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:25%}}@media only screen and (max-width:1279px) and (min-width:1140px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:33.333%}}@media only screen and (max-width:1139px){.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-items .so-directory-item{width:50%}}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages{margin-top:15px;padding:0 5px}.block-editor.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-content .so-directory-pages .button-disabled{pointer-events:none}.block-editor.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position,.so-panels-dialog.so-panels-dialog-prebuilt-layouts .so-toolbar .so-buttons select.so-layout-position{vertical-align:baseline}.block-editor .so-visual-styles,.so-panels-dialog .so-visual-styles{margin:-15px;height:auto}.block-editor .so-visual-styles h3,.so-panels-dialog .so-visual-styles h3{line-height:1em;margin:0;padding:20px 15px;border-bottom:1px solid #ddd}.block-editor .so-visual-styles .style-section-head,.so-panels-dialog .so-visual-styles .style-section-head{background:#fff;padding:15px 10px;border-bottom:1px solid #ddd;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-section-head h4,.so-panels-dialog .so-visual-styles .style-section-head h4{margin:0}.block-editor .so-visual-styles .style-section-fields,.so-panels-dialog .so-visual-styles .style-section-fields{padding:15px;border-bottom:1px solid #ddd;background:#f7f7f7}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper{margin-bottom:20px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper:last-child,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper:last-child{margin-bottom:0}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper>label,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper>label{font-weight:700;display:block;margin-bottom:3px}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field{zoom:1}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:before{content:"";display:block}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-section-fields .style-field-wrapper .style-field input,.so-panels-dialog .so-visual-styles .style-section-fields .style-field-wrapper .style-field input{font-size:12px}.block-editor .so-visual-styles .style-input-wrapper,.so-panels-dialog .so-visual-styles .style-input-wrapper{zoom:1}.block-editor .so-visual-styles .style-input-wrapper:before,.so-panels-dialog .so-visual-styles .style-input-wrapper:before{content:"";display:block}.block-editor .so-visual-styles .style-input-wrapper:after,.so-panels-dialog .so-visual-styles .style-input-wrapper:after{content:"";display:table;clear:both}.block-editor .so-visual-styles .style-input-wrapper input,.so-panels-dialog .so-visual-styles .style-input-wrapper input{max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-inputs,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-inputs{overflow:auto;margin:0 -3px 4px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper{box-sizing:border-box;float:left;width:25%;padding:0 3px}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value{border-width:1px;display:block;max-width:100%}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-top{box-shadow:inset 0 2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-right{box-shadow:inset -3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-bottom{box-shadow:inset 0 -2px 1px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-wrapper .measurement-value.measurement-left{box-shadow:inset 3px 0 2px rgba(0,115,170,.35)}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-multiple,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-multiple{width:100%;display:block}.block-editor .so-visual-styles .style-field-measurement .measurement-unit-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-unit-single{float:right;width:25%}.block-editor .so-visual-styles .style-field-measurement .measurement-value-single,.so-panels-dialog .so-visual-styles .style-field-measurement .measurement-value-single{float:left;width:72%}.block-editor .so-visual-styles .style-field-image .so-image-selector,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector{display:inline-block;background-color:#f7f7f7;border:1px solid #ccc;height:28px;float:left;border-radius:3px;cursor:pointer;box-shadow:inset 0 1px #fff}.block-editor .so-visual-styles .style-field-image .so-image-selector .current-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .current-image{height:28px;width:28px;float:left;background:#fff;border-right:1px solid #ccc;background-size:cover;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px;background-clip:padding-box}.block-editor .so-visual-styles .style-field-image .so-image-selector .select-image,.so-panels-dialog .so-visual-styles .style-field-image .so-image-selector .select-image{font-size:12px;line-height:28px;float:left;padding:0 8px;color:#555}.block-editor .so-visual-styles .style-field-image .remove-image,.so-panels-dialog .so-visual-styles .style-field-image .remove-image{font-size:12px;margin-top:4px;margin-left:15px;display:inline-block;float:left;color:#666;text-decoration:none}.block-editor .so-visual-styles .style-field-image .remove-image.hidden,.so-panels-dialog .so-visual-styles .style-field-image .remove-image.hidden{display:none}.block-editor .so-visual-styles .style-field-image .image-fallback,.so-panels-dialog .so-visual-styles .style-field-image .image-fallback{margin-top:4px}.block-editor .so-visual-styles .style-field-checkbox label,.so-panels-dialog .so-visual-styles .style-field-checkbox label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.block-editor .so-visual-styles .style-field-radio label,.so-panels-dialog .so-visual-styles .style-field-radio label{display:block}.block-editor .so-visual-styles .so-field-code,.so-panels-dialog .so-visual-styles .so-field-code{font-size:12px;font-family:Courier\ 10 Pitch,Courier,monospace}.block-editor .so-visual-styles .so-description,.so-panels-dialog .so-visual-styles .so-description{color:#999;font-size:12px;margin-top:5px;margin-bottom:0;font-style:italic;clear:both}.block-editor .so-visual-styles.so-cell-styles,.so-panels-dialog .so-visual-styles.so-cell-styles{margin-top:15px}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.block-editor .so-content .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-builder-toolbar,.so-panels-dialog .so-content .siteorigin-panels-builder .so-builder-toolbar{border:1px solid #dedede;z-index:1}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.block-editor .so-content .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-rows-container,.so-panels-dialog .so-content .siteorigin-panels-builder .so-rows-container{padding:20px 0 0}.block-editor .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.block-editor .so-content .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .siteorigin-panels-layout-block-container .siteorigin-panels-builder .so-panels-welcome-message,.so-panels-dialog .so-content .siteorigin-panels-builder .so-panels-welcome-message{padding-left:0;padding-right:0;line-height:2.5em}.block-editor .siteorigin-panels-layout-block-container,.so-panels-dialog .siteorigin-panels-layout-block-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.4em}.block-editor .siteorigin-panels-layout-block-container ul,.so-panels-dialog .siteorigin-panels-layout-block-container ul{list-style:none}.block-editor .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-block-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.block-editor .siteorigin-panels-block-icon.white,.so-panels-dialog .siteorigin-panels-block-icon.white{background-image:url(images/pb-icon_white.svg)}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container{text-align:center}.block-editor .so-panels-block-layout-preview-container .so-panels-spinner-container>span,.so-panels-dialog .so-panels-block-layout-preview-container .so-panels-spinner-container>span{display:inline-block}.block-editor .siteorigin-panels-add-layout-block,.so-panels-dialog .siteorigin-panels-add-layout-block{text-align:center;margin-left:auto;margin-right:auto}.block-editor .siteorigin-panels-add-layout-block>button,.so-panels-dialog .siteorigin-panels-add-layout-block>button{height:100%;padding:5px 10px;font-size:16px}.block-editor .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon,.so-panels-dialog .siteorigin-panels-add-layout-block>button .siteorigin-panels-block-icon{margin:3px 10px 0 0}.block-editor .so-dropdown-wrapper input[type=button].button-primary,.so-panels-dialog .so-dropdown-wrapper input[type=button].button-primary{width:125px;height:28px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper{display:block;z-index:11;bottom:28px;width:125px}.block-editor .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden,.so-panels-dialog .so-dropdown-wrapper .so-dropdown-links-wrapper.hidden{display:none}.wp-customizer .so-panels-dialog .so-content,.wp-customizer .so-panels-dialog .so-overlay,.wp-customizer .so-panels-dialog .so-title-bar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500001}.wp-customizer .so-panels-dialog .so-left-sidebar,.wp-customizer .so-panels-dialog .so-right-sidebar,.wp-customizer .so-panels-dialog .so-toolbar{z-index:500002}.so-panels-live-editor>div{position:fixed;z-index:99999;-ms-box-sizing:border-box;box-sizing:border-box}.so-panels-live-editor .live-editor-form{display:none}.so-panels-live-editor .live-editor-collapse{position:fixed;top:18px;left:10px;line-height:1em;cursor:pointer;z-index:100000}.so-panels-live-editor .live-editor-collapse .collapse-icon{float:left;margin:-4px 6px 0 0;border-radius:50%;width:20px;height:20px;overflow:hidden;transition:all .25s ease 0s}.so-panels-live-editor .live-editor-collapse .collapse-icon:before{display:block;content:"\f148";background:#eee;font:normal 20px/1 dashicons;speak:none;padding:0;-webkit-font-smoothing:antialiased}.so-panels-live-editor .live-editor-collapse:hover{color:#0073aa}.so-panels-live-editor .live-editor-collapse:hover .collapse-icon{box-shadow:0 0 3px rgba(30,140,190,.8)}.so-panels-live-editor .so-sidebar-tools{background:#eee;border-bottom:1px solid #ddd;border-right:1px solid #d0d0d0;top:0;left:0;height:46px;width:360px}.so-panels-live-editor .so-sidebar-tools .live-editor-close{margin:9px 10px 0 15px;float:right}.so-panels-live-editor .so-sidebar-tools .live-editor-mode{float:right;margin:9px 4px 0 0}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons{font-size:30px;width:30px;height:30px;cursor:pointer;color:#999}.so-panels-live-editor .so-sidebar-tools .live-editor-mode .dashicons:hover{color:#666}.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons,.so-panels-live-editor .so-sidebar-tools .live-editor-mode.so-active .dashicons:hover{color:#0073aa}.so-panels-live-editor .so-sidebar{top:46px;left:0;bottom:0;width:360px;overflow-y:auto;background:#f7f7f7;border-right:1px solid #d0d0d0}.so-panels-live-editor .so-sidebar .siteorigin-panels-builder .so-rows-container{padding:10px 10px 0!important}.so-panels-live-editor .so-preview{top:0;right:0;bottom:0;left:360px;background-color:#191e23}.so-panels-live-editor .so-preview form{display:none}.so-panels-live-editor .so-preview iframe{float:left;width:100%;height:100%;margin:0 auto}.so-panels-live-editor .so-preview-overlay{display:none;opacity:.975;top:0;right:0;bottom:0;left:360px;background-color:#f4f4f4;cursor:wait}.so-panels-live-editor .so-preview-overlay .so-loading-container{opacity:.6;position:absolute;top:50%;width:200px;padding:2px;border-radius:5px;left:50%;margin-left:-104px;margin-top:-9px;border:2px solid #aaa}.so-panels-live-editor .so-preview-overlay .so-loading-container .so-loading-bar{width:50%;border-radius:3px;height:10px;background:#aaa}.so-panels-live-editor.so-collapsed .live-editor-collapse .collapse-icon{transform:rotate(180deg)}.so-panels-live-editor.so-collapsed .so-sidebar,.so-panels-live-editor.so-collapsed .so-sidebar-tools{display:none}.so-panels-live-editor.so-collapsed .so-preview,.so-panels-live-editor.so-collapsed .so-preview-overlay{left:0}.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{max-width:480px;max-height:640px;position:absolute;top:50%;left:50%;margin-left:-240px;margin-top:-320px}@media (max-width:840px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}@media (max-height:640px){.so-panels-live-editor.live-editor-mobile-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:absolute;max-width:768px;top:0;left:50%;margin-left:-384px}@media (max-width:1128px){.so-panels-live-editor.live-editor-tablet-mode .so-preview iframe{position:static;margin-left:0;margin-top:0}}.so-panels-loading{background-image:url(images/wpspin_light.gif);background-position:50%;background-repeat:no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-panels-loading{background-image:url(images/wpspin_light-2x.gif);background-size:16px 16px}}#panels-home-page .switch{margin:0 10px 0 0;float:left;position:relative;display:inline-block;vertical-align:top;width:68px;height:24px;padding:3px;background-color:#fff;border-radius:24px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px rgba(0,0,0,.05);cursor:pointer;background-image:linear-gradient(180deg,#eee,#fff 25px)}#panels-home-page .switch .switch-input{position:absolute;top:0;left:0;opacity:0}#panels-home-page .switch .switch-label{position:relative;display:block;height:inherit;font-size:12px;text-transform:uppercase;background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px rgba(0,0,0,.12),inset 0 0 2px rgba(0,0,0,.15);transition:.15s ease-out;transition-property:opacity background}#panels-home-page .switch .switch-label:after,#panels-home-page .switch .switch-label:before{position:absolute;top:50%;margin-top:-.5em;line-height:1;transition:inherit}#panels-home-page .switch .switch-label:before{content:attr(data-off);right:11px;color:#aaa;text-shadow:0 1px hsla(0,0%,100%,.5)}#panels-home-page .switch .switch-label:after{content:attr(data-on);left:13px;color:#fff;text-shadow:0 1px rgba(0,0,0,.2);opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label{background:#47a8d8;box-shadow:inset 0 1px 2px rgba(0,0,0,.15),inset 0 0 3px rgba(0,0,0,.2)}#panels-home-page .switch .switch-input:checked~.switch-label:before{opacity:0}#panels-home-page .switch .switch-input:checked~.switch-label:after{opacity:1}#panels-home-page .switch .switch-handle{position:absolute;top:4px;left:4px;width:22px;height:22px;background:#fff;border-radius:12px;box-shadow:1px 1px 5px rgba(0,0,0,.2);background-image:linear-gradient(180deg,#fff 40%,#f0f0f0);transition:left .15s ease-out}#panels-home-page .switch .switch-handle:before{content:"";position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px;width:14px;height:14px;background:#f9f9f9;border-radius:7px;box-shadow:inset 0 1px rgba(0,0,0,.02);background-image:linear-gradient(180deg,#eee,#fff)}#panels-home-page .switch .switch-input:checked~.switch-handle{left:48px;box-shadow:-1px 1px 5px rgba(0,0,0,.2)}#panels-home-page .switch .switch-green>.switch-input:checked~.switch-label{background:#4fb845}#panels-home-page #panels-view-as-page{display:inline-block;margin-left:50px}.siteorigin-panels-builder-form .siteorigin-panels-builder{border:1px solid #d0d0d0;background-color:#fff;margin:10px 0}.siteorigin-panels-builder-form .siteorigin-panels-builder.so-panels-loading{min-height:150px}.siteorigin-page-builder-widget .siteorigin-panels-display-builder{display:inline-block!important}.siteorigin-page-builder-widget .siteorigin-panels-no-builder{display:none!important}.so-panels-contextual-menu{border:1px solid silver;background:#f9f9f9;box-shadow:0 1px 1px rgba(0,0,0,.04);outline:none;border-radius:2px;position:absolute;width:180px;top:20px;left:20px;z-index:999999;display:none;overflow-y:auto}.so-panels-contextual-menu,.so-panels-contextual-menu *{font-size:12px}.so-panels-contextual-menu .so-section{border-bottom:1px solid silver}.so-panels-contextual-menu .so-section:last-child{border-bottom:none}.so-panels-contextual-menu .so-section h5{margin:0 0 5px;padding:8px 10px 5px;border-bottom:1px solid #d0d0d0;background:#f6f6f6}.so-panels-contextual-menu .so-section .so-search-wrapper{margin:-5px 0 5px;border-bottom:1px solid #d0d0d0;background:#f4f4f4}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]{box-sizing:border-box;display:block;width:100%;margin:0;border:none;padding:5px 10px;background:#fbfbfb}.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:active,.so-panels-contextual-menu .so-section .so-search-wrapper input[type=text]:focus{border:none;box-shadow:none;background:#fff}.so-panels-contextual-menu .so-section ul{margin:5px 0 0;padding:0 0 5px}.so-panels-contextual-menu .so-section ul li{cursor:pointer;margin:0;padding:4px 10px;line-height:1em}.so-panels-contextual-menu .so-section ul li.so-active,.so-panels-contextual-menu .so-section ul li:hover{background:#f0f0f0;color:#444}.so-panels-contextual-menu .so-section ul li.so-confirm{color:#a00}.so-panels-contextual-menu .so-section ul li.so-confirm.so-active,.so-panels-contextual-menu .so-section ul li.so-confirm:hover{background:#a00;color:#fff}.so-panels-contextual-menu .so-section ul li .dashicons{width:12px;height:12px;font-size:12px;margin:0;float:right;line-height:12px}.so-panels-contextual-menu .so-section .so-no-results{padding:0 10px 5px;display:none;font-style:italic}.so-dropdown-wrapper{position:relative;float:right}.so-dropdown-wrapper .so-dropdown-links-wrapper{position:absolute;padding:6px 0 0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul{margin:0;border:1px solid silver;background:#f9f9f9;border-radius:2px;padding:4px 0;box-shadow:0 2px 2px rgba(0,0,0,.1)}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li{margin:0}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li:first-child{border-top-width:1px}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a{display:block;padding:2px 8px;text-decoration:none;color:#666;font-size:11px;cursor:pointer;outline:0!important;box-shadow:none}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a:hover{background:#f0f0f0;color:#444}.so-dropdown-wrapper .so-dropdown-links-wrapper ul li a .dashicons{font-size:16px;margin:0;float:right;line-height:16px}.so-dropdown-wrapper .so-dropdown-links-wrapper .so-pointer{width:12px;height:6px;position:absolute;z-index:12;background:url(images/dropdown-pointer.png);background-size:12px 6px;top:1px;right:18px}.so-panels-icon{font-family:siteorigin-panels-icons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.so-panels-icon.so-panels-icon-add-row:before{content:"\e900"}.so-panels-icon.so-panels-icon-add-widget:before{content:"\e901"}.so-panels-icon.so-panels-icon-addons:before{content:"\e902"}.so-panels-icon.so-panels-icon-history:before{content:"\e903"}.so-panels-icon.so-panels-icon-layouts:before{content:"\e904"}.so-panels-icon.so-panels-icon-learn:before{content:"\e905"}.so-panels-icon.so-panels-icon-live-editor:before{content:"\e906"}.so-panels-icon.so-panels-icon-move:before{content:"\e907"}.so-panels-icon.so-panels-icon-settings:before{content:"\e908"}#post-status-info.for-siteorigin-panels{margin-top:-21px!important}.siteorigin-page-builder-icon{display:inline-block;background-size:cover;width:20px;height:20px;background-image:url(images/pb-icon.svg)}.siteorigin-page-builder-icon.white{background-image:url(images/pb-icon_white.svg)}
 
trunk/css/dashboard.css DELETED
@@ -1,9 +0,0 @@
1
- #so-dashboard-news .inside {
2
- padding: 2px 0 0 0;
3
- }
4
- #so-dashboard-news .rss-widget {
5
- padding: 0 12px 15px 12px;
6
- }
7
- #so-dashboard-news .community-events-footer {
8
- padding: 12px;
9
- }
 
 
 
 
 
 
 
 
 
trunk/css/dashboard.min.css DELETED
@@ -1 +0,0 @@
1
- #so-dashboard-news .inside{padding:2px 0 0}#so-dashboard-news .rss-widget{padding:0 12px 15px}#so-dashboard-news .community-events-footer{padding:12px}
 
trunk/css/front-flex.css DELETED
@@ -1,53 +0,0 @@
1
- .panel-grid.panel-no-style,
2
- .panel-grid.panel-has-style > .panel-row-style {
3
- display: -webkit-flex;
4
- display: flex;
5
- -ms-flex-wrap: wrap;
6
- -webkit-flex-wrap: wrap;
7
- flex-wrap: nowrap;
8
- -ms-justify-content: space-between;
9
- -webkit-justify-content: space-between;
10
- justify-content: space-between;
11
- }
12
- .panel-layout.panel-is-rtl .panel-grid.panel-no-style,
13
- .panel-layout.panel-is-rtl .panel-grid.panel-has-style > .panel-row-style {
14
- -ms-flex-direction: row-reverse;
15
- -webkit-flex-direction: row-reverse;
16
- flex-direction: row-reverse;
17
- }
18
- .panel-grid-cell {
19
- -ms-box-sizing: border-box;
20
- -moz-box-sizing: border-box;
21
- -webkit-box-sizing: border-box;
22
- box-sizing: border-box;
23
- }
24
- .panel-grid-cell .panel-cell-style {
25
- height: 100%;
26
- }
27
- .panel-grid-cell .so-panel {
28
- zoom: 1;
29
- }
30
- .panel-grid-cell .so-panel:before {
31
- content: '';
32
- display: block;
33
- }
34
- .panel-grid-cell .so-panel:after {
35
- content: '';
36
- display: table;
37
- clear: both;
38
- }
39
- .panel-grid-cell .panel-last-child {
40
- margin-bottom: 0;
41
- }
42
- .panel-grid-cell .widget-title {
43
- margin-top: 0;
44
- }
45
- body.siteorigin-panels-before-js {
46
- overflow-x: hidden;
47
- }
48
- body.siteorigin-panels-before-js .siteorigin-panels-stretch {
49
- margin-right: -1000px !important;
50
- margin-left: -1000px !important;
51
- padding-right: 1000px !important;
52
- padding-left: 1000px !important;
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/front-flex.min.css DELETED
@@ -1 +0,0 @@
1
- .panel-grid.panel-has-style>.panel-row-style,.panel-grid.panel-no-style{display:flex;-ms-flex-wrap:wrap;flex-wrap:nowrap;-ms-justify-content:space-between;justify-content:space-between}.panel-layout.panel-is-rtl .panel-grid.panel-has-style>.panel-row-style,.panel-layout.panel-is-rtl .panel-grid.panel-no-style{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.panel-grid-cell{-ms-box-sizing:border-box;box-sizing:border-box}.panel-grid-cell .panel-cell-style{height:100%}.panel-grid-cell .so-panel{zoom:1}.panel-grid-cell .so-panel:before{content:"";display:block}.panel-grid-cell .so-panel:after{content:"";display:table;clear:both}.panel-grid-cell .panel-last-child{margin-bottom:0}.panel-grid-cell .widget-title{margin-top:0}body.siteorigin-panels-before-js{overflow-x:hidden}body.siteorigin-panels-before-js .siteorigin-panels-stretch{margin-right:-1000px!important;margin-left:-1000px!important;padding-right:1000px!important;padding-left:1000px!important}
 
trunk/css/front-legacy.css DELETED
@@ -1,50 +0,0 @@
1
- .panel-grid {
2
- zoom: 1;
3
- }
4
- .panel-grid:before {
5
- content: '';
6
- display: block;
7
- }
8
- .panel-grid:after {
9
- content: '';
10
- display: table;
11
- clear: both;
12
- }
13
- .panel-grid-cell {
14
- -ms-box-sizing: border-box;
15
- -moz-box-sizing: border-box;
16
- -webkit-box-sizing: border-box;
17
- box-sizing: border-box;
18
- min-height: 1em;
19
- float: left;
20
- }
21
- .panel-grid-cell .so-panel {
22
- zoom: 1;
23
- }
24
- .panel-grid-cell .so-panel:before {
25
- content: '';
26
- display: block;
27
- }
28
- .panel-grid-cell .so-panel:after {
29
- content: '';
30
- display: table;
31
- clear: both;
32
- }
33
- .panel-grid-cell .panel-last-child {
34
- margin-bottom: 0;
35
- }
36
- .panel-grid-cell .widget-title {
37
- margin-top: 0;
38
- }
39
- .panel-row-style {
40
- zoom: 1;
41
- }
42
- .panel-row-style:before {
43
- content: '';
44
- display: block;
45
- }
46
- .panel-row-style:after {
47
- content: '';
48
- display: table;
49
- clear: both;
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/front-legacy.min.css DELETED
@@ -1 +0,0 @@
1
- .panel-grid{zoom:1}.panel-grid:before{content:"";display:block}.panel-grid:after{content:"";display:table;clear:both}.panel-grid-cell{-ms-box-sizing:border-box;box-sizing:border-box;min-height:1em;float:left}.panel-grid-cell .so-panel{zoom:1}.panel-grid-cell .so-panel:before{content:"";display:block}.panel-grid-cell .so-panel:after{content:"";display:table;clear:both}.panel-grid-cell .panel-last-child{margin-bottom:0}.panel-grid-cell .widget-title{margin-top:0}.panel-row-style{zoom:1}.panel-row-style:before{content:"";display:block}.panel-row-style:after{content:"";display:table;clear:both}
 
trunk/css/front.css DELETED
@@ -1,47 +0,0 @@
1
- .panel-grid.panel-no-style,
2
- .panel-grid.panel-has-style > .panel-row-style {
3
- display: -webkit-flex;
4
- display: flex;
5
- -ms-flex-wrap: wrap;
6
- -webkit-flex-wrap: wrap;
7
- flex-wrap: nowrap;
8
- -ms-justify-content: space-between;
9
- -webkit-justify-content: space-between;
10
- justify-content: space-between;
11
- }
12
- .panel-grid-cell {
13
- -ms-box-sizing: border-box;
14
- -moz-box-sizing: border-box;
15
- -webkit-box-sizing: border-box;
16
- box-sizing: border-box;
17
- }
18
- .panel-grid-cell .panel-cell-style {
19
- height: 100%;
20
- }
21
- .panel-grid-cell .so-panel {
22
- zoom: 1;
23
- }
24
- .panel-grid-cell .so-panel:before {
25
- content: '';
26
- display: block;
27
- }
28
- .panel-grid-cell .so-panel:after {
29
- content: '';
30
- display: table;
31
- clear: both;
32
- }
33
- .panel-grid-cell .panel-last-child {
34
- margin-bottom: 0;
35
- }
36
- .panel-grid-cell .widget-title {
37
- margin-top: 0;
38
- }
39
- body.siteorigin-panels-before-js {
40
- overflow-x: hidden;
41
- }
42
- body.siteorigin-panels-before-js .siteorigin-panels-stretch {
43
- margin-right: -1000px !important;
44
- margin-left: -1000px !important;
45
- padding-right: 1000px !important;
46
- padding-left: 1000px !important;
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/front.min.css DELETED
@@ -1 +0,0 @@
1
- .panel-grid.panel-has-style>.panel-row-style,.panel-grid.panel-no-style{display:flex;-ms-flex-wrap:wrap;flex-wrap:nowrap;-ms-justify-content:space-between;justify-content:space-between}.panel-grid-cell{-ms-box-sizing:border-box;box-sizing:border-box}.panel-grid-cell .panel-cell-style{height:100%}.panel-grid-cell .so-panel{zoom:1}.panel-grid-cell .so-panel:before{content:"";display:block}.panel-grid-cell .so-panel:after{content:"";display:table;clear:both}.panel-grid-cell .panel-last-child{margin-bottom:0}.panel-grid-cell .widget-title{margin-top:0}body.siteorigin-panels-before-js{overflow-x:hidden}body.siteorigin-panels-before-js .siteorigin-panels-stretch{margin-right:-1000px!important;margin-left:-1000px!important;padding-right:1000px!important;padding-left:1000px!important}
 
trunk/css/icons/panels-icons.eot DELETED
Binary file
trunk/css/icons/panels-icons.svg DELETED
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
- <svg xmlns="http://www.w3.org/2000/svg">
4
- <metadata>Generated by IcoMoon</metadata>
5
- <defs>
6
- <font id="icomoon" horiz-adv-x="1024">
7
- <font-face units-per-em="1024" ascent="960" descent="-64" />
8
- <missing-glyph horiz-adv-x="1024" />
9
- <glyph unicode="&#x20;" horiz-adv-x="512" d="" />
10
- <glyph unicode="&#xe900;" glyph-name="add-row" d="M73.143 813.714h877.714v-146.286h-877.714v146.286zM73.143 521.143h877.714v-146.286h-877.714v146.286zM73.143 228.571h877.714v-146.286h-877.714v146.286z" />
11
- <glyph unicode="&#xe901;" glyph-name="add-widget" d="M128.22 448v0h-128.219v126.838c-0.039 17.044 6.714 33.401 18.766 45.453s28.409 18.805 45.453 18.766h117.029l-56.027 97.938c-17.574 30.423-7.201 69.331 23.186 86.967l219.429 127.415c14.615 8.522 32.031 10.843 48.368 6.446s30.235-15.146 38.599-29.852l57.198-99.401v-92.819c-29.048 0.066-57.934-4.325-85.65-13.019l-49.737 86.382-109.714-63.634 49.883-86.894c-42.724-39.544-72.459-91.109-85.285-147.895h-103.278v-62.691zM128.22 448v-62.691h103.278c12.825-56.786 42.56-108.351 85.285-147.895l-49.883-86.894 109.714-63.634 49.737 86.382c27.716-8.694 56.602-13.085 85.65-13.019v-92.819l-57.198-99.401c-8.363-14.706-22.262-25.455-38.599-29.852s-33.753-2.075-48.368 6.446l-219.429 127.415c-30.387 17.636-40.761 56.544-23.186 86.967l56.027 97.938h-117.029c-17.044-0.039-33.401 6.714-45.453 18.766s-18.805 28.409-18.766 45.453v126.838h128.219zM895.78 448v62.691h-103.278c-12.825 56.786-42.56 108.351-85.285 147.895l49.883 86.894-109.714 63.634-49.737-86.382c-27.716 8.694-56.602 13.085-85.65 13.019v92.819l57.198 99.401c8.363 14.706 22.262 25.455 38.599 29.852s33.753 2.075 48.368-6.446l219.429-127.415c30.387-17.636 40.761-56.544 23.186-86.967l-56.027-97.938h117.029c17.044 0.039 33.401-6.714 45.453-18.766s18.805-28.409 18.766-45.453v-126.838h-128.219zM895.78 448v0h128.219v-126.838c0.039-17.044-6.714-33.401-18.766-45.453s-28.409-18.805-45.453-18.766h-117.029l56.027-97.938c17.574-30.423 7.201-69.331-23.186-86.967l-219.429-127.415c-14.615-8.522-32.031-10.843-48.368-6.446s-30.235 15.146-38.599 29.852l-57.198 99.401v92.819c29.048-0.066 57.934 4.325 85.65 13.019l49.737-86.382 109.714 63.634-49.883 86.894c42.724 39.544 72.459 91.109 85.285 147.895h103.278v62.691zM658.286 448c0-80.791-65.494-146.286-146.286-146.286s-146.286 65.494-146.286 146.286c0 80.791 65.494 146.286 146.286 146.286s146.286-65.494 146.286-146.286z" />
12
- <glyph unicode="&#xe902;" glyph-name="addons" d="M820.809 350.501c-39.944-31.404-85.922-57.731-135.495-76.817l97.753-129.007-271.067-208.677-146.286 219.429-7.314 7.314-65.829-80.457-146.286 146.286 80.457 65.829-7.314 7.314-219.429 146.286 208.384 271.067 128.073-101.522c20.393 53.136 46.736 99.059 78.987 140.121 173.575 173.735 472.73 256.898 567.962 161.666s11.995-394.313-162.597-568.832zM785.189 722.286c-22.211 22.212-52.895 35.95-86.788 35.95-67.784 0-122.734-54.95-122.734-122.734s54.95-122.734 122.734-122.734c33.893 0 64.577 13.738 86.788 35.95 22.209 22.21 35.946 52.893 35.946 86.784s-13.737 64.574-35.946 86.784zM150.382 74.021l69.047-138.021h-219.429v219.429z" />
13
- <glyph unicode="&#xe903;" glyph-name="history" d="M1021.733 448c0.526-241.821-195.062-438.292-436.882-438.857-80.969 0-85.87 146.286 0 146.286 77.42 0.174 151.6 31.097 206.221 85.965s85.208 129.187 85.034 206.607v0c0 104.068-55.52 200.232-145.646 252.266s-201.166 52.034-291.291 0c-90.126-52.034-145.646-148.197-145.646-252.266h-145.627c0 241.304 195.615 436.919 436.919 436.919s436.919-195.615 436.919-436.919v0 0zM656.018 521.143v146.286h-146.286v-292.571h292.571v146.286h-146.286zM421.522 355.84l-162.231-182.857c-10.062-11.985-24.909-18.906-40.558-18.906s-30.496 6.921-40.558 18.906l-162.304 182.857c-22.406 26.358-22.406 65.070 0 91.429h405.65c22.406-26.358 22.406-65.070 0-91.429z" />
14
- <glyph unicode="&#xe904;" glyph-name="layouts" d="M950.857-64h-950.857v1024h1024v-1024h-73.143zM950.857 886.857h-877.714v-877.714h877.714v877.714zM877.714 667.429h-731.429v146.286h731.429v-146.286zM365.714 82.286h-219.429v512h219.429v-512zM877.714 82.286h-438.857v512h438.857v-512z" />
15
- <glyph unicode="&#xe905;" glyph-name="learn" d="M950.857 229.933h-261.778l105.618-182.517c14.025-22.628 14.606-51.080 1.516-74.259s-37.777-37.415-64.434-37.154c-26.656 0.261-51.060 14.976-63.692 38.407l-147.895 255.523h-16.384l-147.895-255.523c-12.973-22.774-37.177-36.865-63.424-36.923s-50.513 13.927-63.586 36.644c-13.073 22.717-12.949 50.685 0.326 73.285l105.618 182.517h-261.705c-40.396 0-73.143 32.686-73.143 73.007v584.053c0 40.32 32.747 73.007 73.143 73.007h877.714c40.396 0 73.143-32.686 73.143-73.007v-584.053c0-40.32-32.747-73.007-73.143-73.007zM146.286 813.987v-438.040h731.429v438.040h-731.429zM731.429 594.286l-365.714-219.429v438.857z" />
16
- <glyph unicode="&#xe906;" glyph-name="live-editor" d="M1017.417 420.864c-5.851-16.75-148.041-411.721-506.88-411.721s-501.102 394.971-506.953 411.721c-2.877 8.089-4.539 17.418-4.539 27.136s1.662 19.048 4.718 27.72c5.672 16.166 147.935 411.137 506.774 411.137s501.029-394.971 506.88-411.721c2.877-8.089 4.539-17.418 4.539-27.136s-1.662-19.048-4.718-27.72zM510.537 740.571c-225.28 0-342.309-215.625-377.125-292.571 34.816-78.043 150.162-292.571 377.125-292.571 225.499 0 342.455 215.625 377.051 292.571-34.523 77.97-150.162 292.571-377.051 292.571zM510.537 301.714c-78.92 3.787-141.849 67.225-144.815 146.007 3.796 79.493 67.063 142.76 145.927 146.551 79.565-3.791 142.832-67.058 146.623-145.922-4.335-79.837-68.104-143.098-147.406-146.625z" />
17
- <glyph unicode="&#xe907;" glyph-name="move" d="M585.143 521.143h-146.286v201.143l-219.429-54.857 292.571 292.571 331.41-292.571-258.267 56.978v-203.264zM438.857 374.857h146.286v-203.264l258.267 56.978-331.41-292.571-292.571 292.571 219.429-54.857v201.143z" />
18
- <glyph unicode="&#xe908;" glyph-name="settings" d="M731.429 883.054c-27.486-27.395-44.492-65.288-44.492-107.154 0-83.55 67.731-151.281 151.281-151.281 41.684 0 79.431 16.859 106.793 44.131l69.847 70.067c5.514-21.339 8.83-45.902 9.141-71.189 0.249-4.585 0.39-9.717 0.39-14.883 0-153.504-124.439-277.943-277.943-277.943-1.963 0-3.921 0.020-5.873 0.061-29.749 0.452-58.496 5.286-85.565 13.885 0.719-2.114 0.28-4.089-1.183-5.552l-444.050-444.123h-206.921v206.921l444.050 444.050c1.536 1.536 3.657 2.048 5.266 3.511-8.042 25.164-12.878 54.142-13.309 84.185-0.033 1.763-0.051 3.58-0.051 5.401 0 153.14 124.145 277.285 277.285 277.285 5.395 0 10.753-0.154 16.072-0.458 23.744-0.165 47.43-3.14 70.153-8.591zM109.714 82.286c-20.198 0-36.571-16.374-36.571-36.571s16.374-36.571 36.571-36.571c20.198 0 36.571 16.374 36.571 36.571s-16.374 36.571-36.571 36.571z" />
19
- </font></defs></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/icons/panels-icons.ttf DELETED
Binary file
trunk/css/icons/panels-icons.woff DELETED
Binary file
trunk/css/icons/readme.txt DELETED
@@ -1,5 +0,0 @@
1
- Icons are a subset of FontAwesome
2
- Font Awesome by Dave Gandy - http://fontawesome.io
3
-
4
- License: SIL OFL 1.1
5
- URL: http://scripts.sil.org/OFL
 
 
 
 
 
trunk/css/images/cell-selected.png DELETED
Binary file
trunk/css/images/cell-width.png DELETED
Binary file
trunk/css/images/dialog-separator.png DELETED
Binary file
trunk/css/images/dialog-separator@2x.png DELETED
Binary file
trunk/css/images/dropdown-pointer.png DELETED
Binary file
trunk/css/images/pb-icon.svg DELETED
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 703.29 745.09"><defs><style>.cls-1{opacity:0.5;}.cls-2{opacity:0.2;}</style></defs><title>pb-icon</title><path d="M731.52,232.52,397,430.73a17.11,17.11,0,0,1-17.45,0L45,232.52a17.12,17.12,0,0,1,0-29.46L379.54,4.85a17.11,17.11,0,0,1,17.45,0L731.52,203.06A17.12,17.12,0,0,1,731.52,232.52Z" transform="translate(-36.62 -2.46)"/><path class="cls-1" d="M731.52,399.94,397,598.15a17.11,17.11,0,0,1-17.45,0L45,399.94a17.12,17.12,0,0,1,0-29.46L379.54,172.27a17.11,17.11,0,0,1,17.45,0L731.52,370.48A17.12,17.12,0,0,1,731.52,399.94Z" transform="translate(-36.62 -2.46)"/><path class="cls-2" d="M731.52,546.94,397,745.15a17.11,17.11,0,0,1-17.45,0L45,546.94a17.12,17.12,0,0,1,0-29.46L379.54,319.27a17.11,17.11,0,0,1,17.45,0L731.52,517.48A17.12,17.12,0,0,1,731.52,546.94Z" transform="translate(-36.62 -2.46)"/></svg>
 
trunk/css/images/pb-icon_white.svg DELETED
@@ -1 +0,0 @@
1
- <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 703.29 745.09"><defs><style>.cls-1{opacity:0.5;}.cls-2{opacity:0.2;}</style></defs><title>pb-icon</title><path fill="white" d="M731.52,232.52,397,430.73a17.11,17.11,0,0,1-17.45,0L45,232.52a17.12,17.12,0,0,1,0-29.46L379.54,4.85a17.11,17.11,0,0,1,17.45,0L731.52,203.06A17.12,17.12,0,0,1,731.52,232.52Z" transform="translate(-36.62 -2.46)"/><path class="cls-1" fill="white" d="M731.52,399.94,397,598.15a17.11,17.11,0,0,1-17.45,0L45,399.94a17.12,17.12,0,0,1,0-29.46L379.54,172.27a17.11,17.11,0,0,1,17.45,0L731.52,370.48A17.12,17.12,0,0,1,731.52,399.94Z" transform="translate(-36.62 -2.46)"/><path fill="white" class="cls-2" d="M731.52,546.94,397,745.15a17.11,17.11,0,0,1-17.45,0L45,546.94a17.12,17.12,0,0,1,0-29.46L379.54,319.27a17.11,17.11,0,0,1,17.45,0L731.52,517.48A17.12,17.12,0,0,1,731.52,546.94Z" transform="translate(-36.62 -2.46)"/></svg>
 
trunk/css/images/prebuilt-default.png DELETED
Binary file
trunk/css/images/tooltip-pointer.png DELETED
Binary file
trunk/css/images/wpspin_light-2x.gif DELETED
Binary file
trunk/css/images/wpspin_light.gif DELETED
Binary file
trunk/css/live-editor-front.css DELETED
@@ -1,10 +0,0 @@
1
- .so-panel {
2
- -webkit-transition-duration: 0.6s !important;
3
- transition-duration: 0.6s !important;
4
- }
5
- .so-panel.so-panels-highlighted {
6
- opacity: 1 !important;
7
- }
8
- .so-panel.so-panels-faded {
9
- opacity: 0.275 !important;
10
- }
 
 
 
 
 
 
 
 
 
 
trunk/css/live-editor-front.min.css DELETED
@@ -1 +0,0 @@
1
- .so-panel{transition-duration:.6s!important}.so-panel.so-panels-highlighted{opacity:1!important}.so-panel.so-panels-faded{opacity:.275!important}
 
trunk/css/live-editor-preview.css DELETED
@@ -1,744 +0,0 @@
1
- /*
2
- Theme Name: layout-viewer
3
-
4
- This theme, like WordPress, is licensed under the GPL.
5
- Use it to make something cool, have fun, and share what you've learned with others.
6
-
7
- layout-viewer is based on Underscores http://underscores.me/, (C) 2012-2015 Automattic, Inc.
8
- Underscores is distributed under the terms of the GNU GPL v2 or later.
9
-
10
- Normalizing styles have been helped along thanks to the fine work of
11
- Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
12
- */
13
- /*--------------------------------------------------------------
14
- >>> TABLE OF CONTENTS:
15
- ----------------------------------------------------------------
16
- # Normalize
17
- # Typography
18
- # Elements
19
- # Forms
20
- # Navigation
21
- ## Links
22
- ## Menus
23
- # Accessibility
24
- # Alignments
25
- # Clearings
26
- # Widgets
27
- # Content
28
- ## Posts and pages
29
- ## Asides
30
- ## Comments
31
- # Infinite scroll
32
- # Media
33
- ## Captions
34
- ## Galleries
35
- --------------------------------------------------------------*/
36
- /*--------------------------------------------------------------
37
- # Normalize
38
- --------------------------------------------------------------*/
39
- html {
40
- font-family: sans-serif;
41
- -webkit-text-size-adjust: 100%;
42
- -ms-text-size-adjust: 100%;
43
- }
44
- body {
45
- margin: 0;
46
- }
47
- article,
48
- aside,
49
- details,
50
- figcaption,
51
- figure,
52
- footer,
53
- header,
54
- main,
55
- menu,
56
- nav,
57
- section,
58
- summary {
59
- display: block;
60
- }
61
- audio,
62
- canvas,
63
- progress,
64
- video {
65
- display: inline-block;
66
- vertical-align: baseline;
67
- }
68
- audio:not([controls]) {
69
- display: none;
70
- height: 0;
71
- }
72
- [hidden],
73
- template {
74
- display: none;
75
- }
76
- a {
77
- background-color: transparent;
78
- }
79
- a:active,
80
- a:hover {
81
- outline: 0;
82
- }
83
- abbr[title] {
84
- border-bottom: 1px dotted;
85
- }
86
- b,
87
- strong {
88
- font-weight: bold;
89
- }
90
- dfn {
91
- font-style: italic;
92
- }
93
- h1 {
94
- font-size: 2em;
95
- margin: 0.67em 0;
96
- }
97
- mark {
98
- background: #ff0;
99
- color: #000;
100
- }
101
- small {
102
- font-size: 80%;
103
- }
104
- sub,
105
- sup {
106
- font-size: 75%;
107
- line-height: 0;
108
- position: relative;
109
- vertical-align: baseline;
110
- }
111
- sup {
112
- top: -0.5em;
113
- }
114
- sub {
115
- bottom: -0.25em;
116
- }
117
- img {
118
- border: 0;
119
- }
120
- svg:not(:root) {
121
- overflow: hidden;
122
- }
123
- figure {
124
- margin: 1em 40px;
125
- }
126
- hr {
127
- box-sizing: content-box;
128
- height: 0;
129
- }
130
- pre {
131
- overflow: auto;
132
- }
133
- code,
134
- kbd,
135
- pre,
136
- samp {
137
- font-family: monospace, monospace;
138
- font-size: 1em;
139
- }
140
- button,
141
- input,
142
- optgroup,
143
- select,
144
- textarea {
145
- color: inherit;
146
- font: inherit;
147
- margin: 0;
148
- }
149
- button {
150
- overflow: visible;
151
- }
152
- button,
153
- select {
154
- text-transform: none;
155
- }
156
- button,
157
- html input[type="button"],
158
- input[type="reset"],
159
- input[type="submit"] {
160
- -webkit-appearance: button;
161
- cursor: pointer;
162
- }
163
- button[disabled],
164
- html input[disabled] {
165
- cursor: default;
166
- }
167
- button::-moz-focus-inner,
168
- input::-moz-focus-inner {
169
- border: 0;
170
- padding: 0;
171
- }
172
- input {
173
- line-height: normal;
174
- }
175
- input[type="checkbox"],
176
- input[type="radio"] {
177
- box-sizing: border-box;
178
- padding: 0;
179
- }
180
- input[type="number"]::-webkit-inner-spin-button,
181
- input[type="number"]::-webkit-outer-spin-button {
182
- height: auto;
183
- }
184
- input[type="search"] {
185
- -webkit-appearance: textfield;
186
- box-sizing: content-box;
187
- }
188
- input[type="search"]::-webkit-search-cancel-button,
189
- input[type="search"]::-webkit-search-decoration {
190
- -webkit-appearance: none;
191
- }
192
- fieldset {
193
- border: 1px solid #c0c0c0;
194
- margin: 0 2px;
195
- padding: 0.35em 0.625em 0.75em;
196
- }
197
- legend {
198
- border: 0;
199
- padding: 0;
200
- }
201
- textarea {
202
- overflow: auto;
203
- }
204
- optgroup {
205
- font-weight: bold;
206
- }
207
- table {
208
- border-collapse: collapse;
209
- border-spacing: 0;
210
- }
211
- td,
212
- th {
213
- padding: 0;
214
- }
215
- /*--------------------------------------------------------------
216
- # Typography
217
- --------------------------------------------------------------*/
218
- body,
219
- button,
220
- input,
221
- select,
222
- textarea {
223
- color: #404040;
224
- font-size: 14px;
225
- line-height: 1.5;
226
- }
227
- h1,
228
- h2,
229
- h3,
230
- h4,
231
- h5,
232
- h6 {
233
- clear: both;
234
- }
235
- p {
236
- margin-bottom: 1.5em;
237
- }
238
- dfn,
239
- cite,
240
- em,
241
- i {
242
- font-style: italic;
243
- }
244
- blockquote {
245
- margin: 0 1.5em;
246
- }
247
- address {
248
- margin: 0 0 1.5em;
249
- }
250
- pre {
251
- background: #eee;
252
- font-family: "Courier 10 Pitch", Courier, monospace;
253
- font-size: 15px;
254
- font-size: 0.9375rem;
255
- line-height: 1.6;
256
- margin-bottom: 1.6em;
257
- max-width: 100%;
258
- overflow: auto;
259
- padding: 1.6em;
260
- }
261
- code,
262
- kbd,
263
- tt,
264
- var {
265
- font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
266
- font-size: 15px;
267
- font-size: 0.9375rem;
268
- }
269
- abbr,
270
- acronym {
271
- border-bottom: 1px dotted #666;
272
- cursor: help;
273
- }
274
- mark,
275
- ins {
276
- background: #fff9c0;
277
- text-decoration: none;
278
- }
279
- big {
280
- font-size: 125%;
281
- }
282
- /*--------------------------------------------------------------
283
- # Elements
284
- --------------------------------------------------------------*/
285
- html {
286
- box-sizing: border-box;
287
- }
288
- *,
289
- *:before,
290
- *:after {
291
- /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */
292
- box-sizing: inherit;
293
- }
294
- body {
295
- background: #fff;
296
- /* Fallback for when there is no custom background color defined. */
297
- }
298
- blockquote:before,
299
- blockquote:after,
300
- q:before,
301
- q:after {
302
- content: "";
303
- }
304
- blockquote,
305
- q {
306
- quotes: "" "";
307
- }
308
- hr {
309
- background-color: #ccc;
310
- border: 0;
311
- height: 1px;
312
- margin-bottom: 1.5em;
313
- }
314
- ul,
315
- ol {
316
- margin: 0 0 1.5em 3em;
317
- }
318
- ul {
319
- list-style: disc;
320
- }
321
- ol {
322
- list-style: decimal;
323
- }
324
- li > ul,
325
- li > ol {
326
- margin-bottom: 0;
327
- margin-left: 1.5em;
328
- }
329
- dt {
330
- font-weight: bold;
331
- }
332
- dd {
333
- margin: 0 1.5em 1.5em;
334
- }
335
- img {
336
- height: auto;
337
- /* Make sure images are scaled correctly. */
338
- max-width: 100%;
339
- /* Adhere to container width. */
340
- }
341
- table {
342
- margin: 0 0 1.5em;
343
- width: 100%;
344
- }
345
- /*--------------------------------------------------------------
346
- # Forms
347
- --------------------------------------------------------------*/
348
- button,
349
- input[type="button"],
350
- input[type="reset"],
351
- input[type="submit"] {
352
- border: 1px solid;
353
- border-color: #ccc #ccc #bbb;
354
- border-radius: 3px;
355
- background: #e6e6e6;
356
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 15px 17px rgba(255, 255, 255, 0.5), inset 0 -5px 12px rgba(0, 0, 0, 0.05);
357
- color: rgba(0, 0, 0, 0.8);
358
- font-size: 12px;
359
- font-size: 0.75rem;
360
- line-height: 1;
361
- padding: 0.6em 1em 0.4em;
362
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
363
- }
364
- button:hover,
365
- input[type="button"]:hover,
366
- input[type="reset"]:hover,
367
- input[type="submit"]:hover {
368
- border-color: #ccc #bbb #aaa;
369
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 15px 17px rgba(255, 255, 255, 0.8), inset 0 -5px 12px rgba(0, 0, 0, 0.02);
370
- }
371
- button:focus,
372
- input[type="button"]:focus,
373
- input[type="reset"]:focus,
374
- input[type="submit"]:focus,
375
- button:active,
376
- input[type="button"]:active,
377
- input[type="reset"]:active,
378
- input[type="submit"]:active {
379
- border-color: #aaa #bbb #bbb;
380
- box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5), inset 0 2px 5px rgba(0, 0, 0, 0.15);
381
- }
382
- input[type="text"],
383
- input[type="email"],
384
- input[type="url"],
385
- input[type="password"],
386
- input[type="search"],
387
- textarea {
388
- color: #666;
389
- border: 1px solid #ccc;
390
- border-radius: 3px;
391
- }
392
- input[type="text"]:focus,
393
- input[type="email"]:focus,
394
- input[type="url"]:focus,
395
- input[type="password"]:focus,
396
- input[type="search"]:focus,
397
- textarea:focus {
398
- color: #111;
399
- }
400
- input[type="text"],
401
- input[type="email"],
402
- input[type="url"],
403
- input[type="password"],
404
- input[type="search"] {
405
- padding: 3px;
406
- }
407
- textarea {
408
- padding-left: 3px;
409
- width: 100%;
410
- }
411
- /*--------------------------------------------------------------
412
- # Navigation
413
- --------------------------------------------------------------*/
414
- /*--------------------------------------------------------------
415
- ## Links
416
- --------------------------------------------------------------*/
417
- a {
418
- color: royalblue;
419
- }
420
- a:visited {
421
- color: purple;
422
- }
423
- a:hover,
424
- a:focus,
425
- a:active {
426
- color: midnightblue;
427
- }
428
- a:focus {
429
- outline: thin dotted;
430
- }
431
- a:hover,
432
- a:active {
433
- outline: 0;
434
- }
435
- /*--------------------------------------------------------------
436
- ## Menus
437
- --------------------------------------------------------------*/
438
- .main-navigation {
439
- clear: both;
440
- display: block;
441
- float: left;
442
- width: 100%;
443
- }
444
- .main-navigation ul {
445
- display: none;
446
- list-style: none;
447
- margin: 0;
448
- padding-left: 0;
449
- }
450
- .main-navigation li {
451
- float: left;
452
- position: relative;
453
- }
454
- .main-navigation a {
455
- display: block;
456
- text-decoration: none;
457
- }
458
- .main-navigation ul ul {
459
- box-shadow: 0 3px 3px rgba(0, 0, 0, 0.2);
460
- float: left;
461
- position: absolute;
462
- top: 1.5em;
463
- left: -999em;
464
- z-index: 99999;
465
- }
466
- .main-navigation ul ul ul {
467
- left: -999em;
468
- top: 0;
469
- }
470
- .main-navigation ul ul a {
471
- width: 200px;
472
- }
473
- .main-navigation ul li:hover > ul,
474
- .main-navigation ul li.focus > ul {
475
- left: auto;
476
- }
477
- .main-navigation ul ul li:hover > ul,
478
- .main-navigation ul ul li.focus > ul {
479
- left: 100%;
480
- }
481
- /* Small menu. */
482
- .menu-toggle,
483
- .main-navigation.toggled ul {
484
- display: block;
485
- }
486
- @media screen and (min-width: 37.5em) {
487
- .menu-toggle {
488
- display: none;
489
- }
490
- .main-navigation ul {
491
- display: block;
492
- }
493
- }
494
- .site-main .comment-navigation,
495
- .site-main .posts-navigation,
496
- .site-main .post-navigation {
497
- margin: 0 0 1.5em;
498
- overflow: hidden;
499
- }
500
- .comment-navigation .nav-previous,
501
- .posts-navigation .nav-previous,
502
- .post-navigation .nav-previous {
503
- float: left;
504
- width: 50%;
505
- }
506
- .comment-navigation .nav-next,
507
- .posts-navigation .nav-next,
508
- .post-navigation .nav-next {
509
- float: right;
510
- text-align: right;
511
- width: 50%;
512
- }
513
- /*--------------------------------------------------------------
514
- # Accessibility
515
- --------------------------------------------------------------*/
516
- /* Text meant only for screen readers. */
517
- .screen-reader-text {
518
- clip: rect(1px, 1px, 1px, 1px);
519
- position: absolute !important;
520
- height: 1px;
521
- width: 1px;
522
- overflow: hidden;
523
- }
524
- .screen-reader-text:focus {
525
- background-color: #f1f1f1;
526
- border-radius: 3px;
527
- box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
528
- clip: auto !important;
529
- color: #21759b;
530
- display: block;
531
- font-size: 14px;
532
- font-size: 0.875rem;
533
- font-weight: bold;
534
- height: auto;
535
- left: 5px;
536
- line-height: normal;
537
- padding: 15px 23px 14px;
538
- text-decoration: none;
539
- top: 5px;
540
- width: auto;
541
- z-index: 100000;
542
- /* Above WP toolbar. */
543
- }
544
- /*--------------------------------------------------------------
545
- # Alignments
546
- --------------------------------------------------------------*/
547
- .alignleft {
548
- display: inline;
549
- float: left;
550
- margin-right: 1.5em;
551
- }
552
- .alignright {
553
- display: inline;
554
- float: right;
555
- margin-left: 1.5em;
556
- }
557
- .aligncenter {
558
- clear: both;
559
- display: block;
560
- margin-left: auto;
561
- margin-right: auto;
562
- }
563
- /*--------------------------------------------------------------
564
- # Clearings
565
- --------------------------------------------------------------*/
566
- .clear:before,
567
- .clear:after,
568
- .entry-content:before,
569
- .entry-content:after,
570
- .comment-content:before,
571
- .comment-content:after,
572
- .site-header:before,
573
- .site-header:after,
574
- .site-content:before,
575
- .site-content:after,
576
- .site-footer:before,
577
- .site-footer:after {
578
- content: "";
579
- display: table;
580
- }
581
- .clear:after,
582
- .entry-content:after,
583
- .comment-content:after,
584
- .site-header:after,
585
- .site-content:after,
586
- .site-footer:after {
587
- clear: both;
588
- }
589
- /*--------------------------------------------------------------
590
- # Widgets
591
- --------------------------------------------------------------*/
592
- .widget {
593
- margin: 0 0 1.5em;
594
- }
595
- /* Make sure select elements fit in widgets. */
596
- .widget select {
597
- max-width: 100%;
598
- }
599
- /* Search widget. */
600
- .widget_search .search-submit {
601
- display: none;
602
- }
603
- /*--------------------------------------------------------------
604
- # Content
605
- --------------------------------------------------------------*/
606
- /*--------------------------------------------------------------
607
- ## Posts and pages
608
- --------------------------------------------------------------*/
609
- .sticky {
610
- display: block;
611
- }
612
- .hentry {
613
- margin: 0 0 1.5em;
614
- }
615
- .byline,
616
- .updated:not(.published) {
617
- display: none;
618
- }
619
- .single .byline,
620
- .group-blog .byline {
621
- display: inline;
622
- }
623
- .page-content,
624
- .entry-content,
625
- .entry-summary {
626
- margin: 1.5em 0 0;
627
- }
628
- .page-links {
629
- clear: both;
630
- margin: 0 0 1.5em;
631
- }
632
- /*--------------------------------------------------------------
633
- ## Asides
634
- --------------------------------------------------------------*/
635
- .blog .format-aside .entry-title,
636
- .archive .format-aside .entry-title {
637
- display: none;
638
- }
639
- /*--------------------------------------------------------------
640
- ## Comments
641
- --------------------------------------------------------------*/
642
- .comment-content a {
643
- word-wrap: break-word;
644
- }
645
- .bypostauthor {
646
- display: block;
647
- }
648
- /*--------------------------------------------------------------
649
- # Infinite scroll
650
- --------------------------------------------------------------*/
651
- /* Globally hidden elements when Infinite Scroll is supported and in use. */
652
- .infinite-scroll .posts-navigation,
653
- .infinite-scroll.neverending .site-footer {
654
- /* Theme Footer (when set to scrolling) */
655
- display: none;
656
- }
657
- /* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before. */
658
- .infinity-end.neverending .site-footer {
659
- display: block;
660
- }
661
- /*--------------------------------------------------------------
662
- # Media
663
- --------------------------------------------------------------*/
664
- .page-content .wp-smiley,
665
- .entry-content .wp-smiley,
666
- .comment-content .wp-smiley {
667
- border: none;
668
- margin-bottom: 0;
669
- margin-top: 0;
670
- padding: 0;
671
- }
672
- /* Make sure embeds and iframes fit their containers. */
673
- embed,
674
- iframe,
675
- object {
676
- max-width: 100%;
677
- }
678
- /*--------------------------------------------------------------
679
- ## Captions
680
- --------------------------------------------------------------*/
681
- .wp-caption {
682
- margin-bottom: 1.5em;
683
- max-width: 100%;
684
- }
685
- .wp-caption img[class*="wp-image-"] {
686
- display: block;
687
- margin: 0 auto;
688
- }
689
- .wp-caption-text {
690
- text-align: center;
691
- }
692
- .wp-caption .wp-caption-text {
693
- margin: 0.8075em 0;
694
- }
695
- /*--------------------------------------------------------------
696
- ## Galleries
697
- --------------------------------------------------------------*/
698
- .gallery {
699
- margin-bottom: 1.5em;
700
- }
701
- .gallery-item {
702
- display: inline-block;
703
- text-align: center;
704
- vertical-align: top;
705
- width: 100%;
706
- }
707
- .gallery-columns-2 .gallery-item {
708
- max-width: 50%;
709
- }
710
- .gallery-columns-3 .gallery-item {
711
- max-width: 33.33%;
712
- }
713
- .gallery-columns-4 .gallery-item {
714
- max-width: 25%;
715
- }
716
- .gallery-columns-5 .gallery-item {
717
- max-width: 20%;
718
- }
719
- .gallery-columns-6 .gallery-item {
720
- max-width: 16.66%;
721
- }
722
- .gallery-columns-7 .gallery-item {
723
- max-width: 14.28%;
724
- }
725
- .gallery-columns-8 .gallery-item {
726
- max-width: 12.5%;
727
- }
728
- .gallery-columns-9 .gallery-item {
729
- max-width: 11.11%;
730
- }
731
- .gallery-caption {
732
- display: block;
733
- }
734
- /*--------------------------------------------------------------
735
- ## Custom
736
- --------------------------------------------------------------*/
737
- #content {
738
- -moz-box-sizing: border-box;
739
- -webkit-box-sizing: border-box;
740
- box-sizing: border-box;
741
- max-width: 1280px;
742
- margin: 0 auto;
743
- padding: 20px 40px;
744
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/css/live-editor-preview.min.css DELETED
@@ -1 +0,0 @@
1
- html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}body,button,input,select,textarea{color:#404040;font-size:14px;line-height:1.5}h1,h2,h3,h4,h5,h6{clear:both}p{margin-bottom:1.5em}cite,dfn,em,i{font-style:italic}blockquote{margin:0 1.5em}address{margin:0 0 1.5em}pre{background:#eee;font-family:Courier\ 10 Pitch,Courier,monospace;line-height:1.6;margin-bottom:1.6em;max-width:100%;overflow:auto;padding:1.6em}code,kbd,pre,tt,var{font-size:15px;font-size:.9375rem}code,kbd,tt,var{font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{background:#fff9c0;text-decoration:none}big{font-size:125%}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}body{background:#fff}blockquote:after,blockquote:before,q:after,q:before{content:""}blockquote,q{quotes:"" ""}hr{background-color:#ccc;border:0;height:1px;margin-bottom:1.5em}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}img{height:auto;max-width:100%}table{margin:0 0 1.5em;width:100%}button,input[type=button],input[type=reset],input[type=submit]{border:1px solid;border-color:#ccc #ccc #bbb;border-radius:3px;background:#e6e6e6;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.5),inset 0 15px 17px hsla(0,0%,100%,.5),inset 0 -5px 12px rgba(0,0,0,.05);color:rgba(0,0,0,.8);font-size:12px;font-size:.75rem;line-height:1;padding:.6em 1em .4em;text-shadow:0 1px 0 hsla(0,0%,100%,.8)}button:hover,input[type=button]:hover,input[type=reset]:hover,input[type=submit]:hover{border-color:#ccc #bbb #aaa;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.8),inset 0 15px 17px hsla(0,0%,100%,.8),inset 0 -5px 12px rgba(0,0,0,.02)}button:active,button:focus,input[type=button]:active,input[type=button]:focus,input[type=reset]:active,input[type=reset]:focus,input[type=submit]:active,input[type=submit]:focus{border-color:#aaa #bbb #bbb;box-shadow:inset 0 -1px 0 hsla(0,0%,100%,.5),inset 0 2px 5px rgba(0,0,0,.15)}input[type=email],input[type=password],input[type=search],input[type=text],input[type=url],textarea{color:#666;border:1px solid #ccc;border-radius:3px}input[type=email]:focus,input[type=password]:focus,input[type=search]:focus,input[type=text]:focus,input[type=url]:focus,textarea:focus{color:#111}input[type=email],input[type=password],input[type=search],input[type=text],input[type=url]{padding:3px}textarea{padding-left:3px;width:100%}a{color:#4169e1}a:visited{color:purple}a:active,a:focus,a:hover{color:#191970}a:focus{outline:thin dotted}a:active,a:hover{outline:0}.main-navigation{clear:both;display:block;float:left;width:100%}.main-navigation ul{display:none;list-style:none;margin:0;padding-left:0}.main-navigation li{float:left;position:relative}.main-navigation a{display:block;text-decoration:none}.main-navigation ul ul{box-shadow:0 3px 3px rgba(0,0,0,.2);float:left;position:absolute;top:1.5em;left:-999em;z-index:99999}.main-navigation ul ul ul{left:-999em;top:0}.main-navigation ul ul a{width:200px}.main-navigation ul li.focus>ul,.main-navigation ul li:hover>ul{left:auto}.main-navigation ul ul li.focus>ul,.main-navigation ul ul li:hover>ul{left:100%}.main-navigation.toggled ul,.menu-toggle{display:block}@media screen and (min-width:37.5em){.menu-toggle{display:none}.main-navigation ul{display:block}}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 1.5em;overflow:hidden}.comment-navigation .nav-previous,.post-navigation .nav-previous,.posts-navigation .nav-previous{float:left;width:50%}.comment-navigation .nav-next,.post-navigation .nav-next,.posts-navigation .nav-next{float:right;text-align:right;width:50%}.screen-reader-text{clip:rect(1px,1px,1px,1px);position:absolute!important;height:1px;width:1px;overflow:hidden}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;color:#21759b;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.alignleft{display:inline;float:left;margin-right:1.5em}.alignright{display:inline;float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin-left:auto;margin-right:auto}.clear:after,.clear:before,.comment-content:after,.comment-content:before,.entry-content:after,.entry-content:before,.site-content:after,.site-content:before,.site-footer:after,.site-footer:before,.site-header:after,.site-header:before{content:"";display:table}.clear:after,.comment-content:after,.entry-content:after,.site-content:after,.site-footer:after,.site-header:after{clear:both}.widget{margin:0 0 1.5em}.widget select{max-width:100%}.widget_search .search-submit{display:none}.sticky{display:block}.hentry{margin:0 0 1.5em}.byline,.updated:not(.published){display:none}.group-blog .byline,.single .byline{display:inline}.entry-content,.entry-summary,.page-content{margin:1.5em 0 0}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-title,.blog .format-aside .entry-title{display:none}.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.infinite-scroll.neverending .site-footer,.infinite-scroll .posts-navigation{display:none}.infinity-end.neverending .site-footer{display:block}.comment-content .wp-smiley,.entry-content .wp-smiley,.page-content .wp-smiley{border:none;margin-bottom:0;margin-top:0;padding:0}.wp-caption,embed,iframe,object{max-width:100%}.wp-caption{margin-bottom:1.5em}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto}.wp-caption-text{text-align:center}.wp-caption .wp-caption-text{margin:.8075em 0}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.gallery-columns-2 .gallery-item{max-width:50%}.gallery-columns-3 .gallery-item{max-width:33.33%}.gallery-columns-4 .gallery-item{max-width:25%}.gallery-columns-5 .gallery-item{max-width:20%}.gallery-columns-6 .gallery-item{max-width:16.66%}.gallery-columns-7 .gallery-item{max-width:14.28%}.gallery-columns-8 .gallery-item{max-width:12.5%}.gallery-columns-9 .gallery-item{max-width:11.11%}.gallery-caption{display:block}#content{box-sizing:border-box;max-width:1280px;margin:0 auto;padding:20px 40px}
 
trunk/css/mixins.less DELETED
@@ -1,173 +0,0 @@
1
- .gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
2
- background: @color;
3
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, @start), color-stop(1, @stop));
4
- background: -ms-linear-gradient(bottom,@start,@stop);
5
- background: -moz-linear-gradient(center bottom,@start 0%,@stop 100%);
6
- background: -o-linear-gradient(@stop,@start);
7
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", @stop, @start));
8
- }
9
-
10
- .bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) {
11
- background: @color;
12
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, rgb(@start,@start,@start)), color-stop(1, rgb(@stop,@stop,@stop)));
13
- background: -ms-linear-gradient(bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
14
- background: -moz-linear-gradient(center bottom, rgb(@start,@start,@start) 0%, rgb(@stop,@stop,@stop) 100%);
15
- background: -o-linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
16
- background: linear-gradient(rgb(@stop,@stop,@stop), rgb(@start,@start,@start));
17
-
18
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",rgb(@stop,@stop,@stop), rgb(@start,@start,@start)));
19
- }
20
-
21
- .linear-gradient(@color, @gradient) {
22
- background: @color;
23
- background: -moz-linear-gradient(@gradient);
24
- background: -webkit-linear-gradient(@gradient);
25
- background: -o-linear-gradient(@gradient);
26
- background: -ms-linear-gradient(@gradient);
27
- background: linear-gradient(@gradient);
28
- }
29
-
30
- .bordered(@top-color: #EEE, @right-color: #EEE, @bottom-color: #EEE, @left-color: #EEE) {
31
- border-top: solid 1px @top-color;
32
- border-left: solid 1px @left-color;
33
- border-right: solid 1px @right-color;
34
- border-bottom: solid 1px @bottom-color;
35
- }
36
-
37
- .drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1) {
38
- -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
39
- -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
40
- box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha);
41
- }
42
-
43
- .box-shadow(@shadow) {
44
- -webkit-box-shadow: @shadow;
45
- -moz-box-shadow: @shadow;
46
- box-shadow: @shadow;
47
- }
48
-
49
- .rounded(@radius: 2px) {
50
- -webkit-border-radius: @radius;
51
- -moz-border-radius: @radius;
52
- border-radius: @radius;
53
- }
54
-
55
- .border-radius(@topright: 0, @bottomright: 0, @bottomleft: 0, @topleft: 0) {
56
- -webkit-border-top-right-radius: @topright;
57
- -webkit-border-bottom-right-radius: @bottomright;
58
- -webkit-border-bottom-left-radius: @bottomleft;
59
- -webkit-border-top-left-radius: @topleft;
60
- -moz-border-radius-topright: @topright;
61
- -moz-border-radius-bottomright: @bottomright;
62
- -moz-border-radius-bottomleft: @bottomleft;
63
- -moz-border-radius-topleft: @topleft;
64
- border-top-right-radius: @topright;
65
- border-bottom-right-radius: @bottomright;
66
- border-bottom-left-radius: @bottomleft;
67
- border-top-left-radius: @topleft;
68
- .background-clip(padding-box);
69
- }
70
-
71
- .opacity(@opacity: 0.5) {
72
- -moz-opacity: @opacity;
73
- -khtml-opacity: @opacity;
74
- -webkit-opacity: @opacity;
75
- opacity: @opacity;
76
- @opperc: @opacity * 100;
77
- -ms-filter: ~"progid:DXImageTransform.Microsoft.Alpha(opacity=@{opperc})";
78
- filter: ~"alpha(opacity=@{opperc})";
79
- }
80
-
81
- .transition-duration(@duration: 0.2s) {
82
- -moz-transition-duration: @duration;
83
- -webkit-transition-duration: @duration;
84
- -o-transition-duration: @duration;
85
- transition-duration: @duration;
86
- }
87
-
88
- .transform(...) {
89
- -webkit-transform: @arguments;
90
- -moz-transform: @arguments;
91
- -o-transform: @arguments;
92
- -ms-transform: @arguments;
93
- transform: @arguments;
94
- }
95
-
96
- .rotation(@deg:5deg) {
97
- .transform(rotate(@deg));
98
- }
99
-
100
- .scale(@ratio:1.5) {
101
- .transform(scale(@ratio));
102
- }
103
-
104
- .transition(@duration:0.2s, @on: all, @ease:ease) {
105
- -webkit-transition: @on @duration @ease;
106
- -moz-transition: @on @duration @ease;
107
- -o-transition: @on @duration @ease;
108
- transition: @on @duration @ease;
109
- }
110
-
111
- .inner-shadow(@horizontal:0, @vertical:1px, @blur:2px, @alpha: 0.4) {
112
- -webkit-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
113
- -moz-box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
114
- box-shadow: inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha);
115
- }
116
-
117
- .box-sizing(@sizing: border-box) {
118
- -ms-box-sizing: @sizing;
119
- -moz-box-sizing: @sizing;
120
- -webkit-box-sizing: @sizing;
121
- box-sizing: @sizing;
122
- }
123
-
124
- .user-select(@argument: none) {
125
- -webkit-user-select: @argument;
126
- -moz-user-select: @argument;
127
- -ms-user-select: @argument;
128
- user-select: @argument;
129
- }
130
-
131
- .columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) {
132
- -moz-column-width: @colwidth;
133
- -moz-column-count: @colcount;
134
- -moz-column-gap: @colgap;
135
- -moz-column-rule-color: @columnRuleColor;
136
- -moz-column-rule-style: @columnRuleStyle;
137
- -moz-column-rule-width: @columnRuleWidth;
138
- -webkit-column-width: @colwidth;
139
- -webkit-column-count: @colcount;
140
- -webkit-column-gap: @colgap;
141
- -webkit-column-rule-color: @columnRuleColor;
142
- -webkit-column-rule-style: @columnRuleStyle;
143
- -webkit-column-rule-width: @columnRuleWidth;
144
- column-width: @colwidth;
145
- column-count: @colcount;
146
- column-gap: @colgap;
147
- column-rule-color: @columnRuleColor;
148
- column-rule-style: @columnRuleStyle;
149
- column-rule-width: @columnRuleWidth;
150
- }
151
-
152
- .translate(@x:0, @y:0) {
153
- .transform(translate(@x, @y));
154
- }
155
-
156
- .background-clip(@argument: padding-box) {
157
- -moz-background-clip: @argument;
158
- -webkit-background-clip: @argument;
159
- background-clip: @argument;
160
- }
161
-
162
- .clearfix() {
163
- zoom: 1;
164
- &:before {
165
- content: '';
166
- display: block;
167
- }
168
- &:after {
169
- content: '';
170
- display: table;
171
- clear: both;
172
- }
173
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin-dashboard.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Admin_Dashboard {
4
-
5
- function __construct() {
6
- add_action( 'wp_dashboard_setup', array( $this, 'register_dashboard_widgets' ), 15 );
7
- add_action( 'admin_print_styles', array( $this, 'enqueue_admin_styles' ) );
8
- }
9
-
10
- /**
11
- * @return SiteOrigin_Panels_Admin_Dashboard
12
- */
13
- public static function single() {
14
- static $single;
15
- return empty( $single ) ? $single = new self() : $single;
16
- }
17
-
18
- /**
19
- * Register the dashboard widget
20
- */
21
- public function register_dashboard_widgets(){
22
- if( function_exists( 'wp_dashboard_primary_output' ) ) {
23
- wp_add_dashboard_widget( 'so-dashboard-news', __( 'SiteOrigin Page Builder News', 'siteorigin-panels' ), array(
24
- $this,
25
- 'dashboard_overview_widget'
26
- ) );
27
-
28
- // Move Page Builder widget to the top
29
- global $wp_meta_boxes;
30
-
31
- $dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
32
- $ours = array( 'so-dashboard-news' => $dashboard['so-dashboard-news'] );
33
-
34
- $wp_meta_boxes['dashboard']['normal']['core'] = array_merge( $ours, $dashboard ); // WPCS: override ok.
35
- }
36
- }
37
-
38
- /**
39
- * Enqueue the dashboard styles
40
- */
41
- public function enqueue_admin_styles( $page ){
42
- $screen = get_current_screen();
43
- if( ! empty( $screen ) && $screen->id == 'dashboard' ) {
44
- wp_enqueue_style(
45
- 'so-panels-dashboard',
46
- siteorigin_panels_url( 'css/dashboard.css' ),
47
- array( 'wp-color-picker' ),
48
- SITEORIGIN_PANELS_VERSION
49
- );
50
- }
51
- }
52
-
53
- /**
54
- * Display the actual widget
55
- */
56
- public function dashboard_overview_widget(){
57
- $feeds = array(
58
- array(
59
- 'url' => 'https://siteorigin.com/feed/',
60
- 'items' => 4,
61
- 'show_summary' => 0,
62
- 'show_author' => 0,
63
- 'show_date' => 1,
64
- ),
65
- );
66
-
67
- wp_dashboard_primary_output( 'so_dashboard_widget_news', $feeds );
68
-
69
- if( function_exists( 'wp_print_community_events_markup' ) ) {
70
- ?>
71
- <p class="community-events-footer">
72
- <?php
73
- printf(
74
- '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
75
- esc_url( 'https://siteorigin.com/blog/' ),
76
- __( 'Blog', 'siteorigin-panels' ),
77
- /* translators: accessibility text */
78
- __( '(opens in a new window)', 'siteorigin-panels' )
79
- );
80
- echo ' | ';
81
-
82
- if( class_exists( 'SiteOrigin_Premium' ) ) {
83
- printf(
84
- '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-email-alt"></span></a>',
85
- esc_url( 'mailto:support@siteorigin.com' ),
86
- __( 'Email Support', 'siteorigin-panels' ),
87
- /* translators: accessibility text */
88
- __( '(email SiteOrigin support)', 'siteorigin-panels' )
89
- );
90
- }
91
- else {
92
- printf(
93
- '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
94
- esc_url( 'https://siteorigin.com/thread/' ),
95
- __( 'Support Forum', 'siteorigin-panels' ),
96
- /* translators: accessibility text */
97
- __( '(opens in a new window)', 'siteorigin-panels' )
98
- );
99
- }
100
-
101
- if ( SiteOrigin_Panels::display_premium_teaser() ) {
102
- echo ' | ';
103
- printf(
104
- '<a href="%1$s" target="_blank" rel="noopener noreferrer" style="color: #2ebd59">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
105
- /* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
106
- esc_url( 'https://siteorigin.com/downloads/premium/' ),
107
- __( 'Get Premium', 'siteorigin-panels' ),
108
- /* translators: accessibility text */
109
- __( '(opens in a new window)', 'siteorigin-panels' )
110
- );
111
- }
112
- ?>
113
- </p>
114
- <?php
115
- }
116
- }
117
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin-layouts.php DELETED
@@ -1,494 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SiteOrigin_Panels_Admin
5
- *
6
- * Handles all the admin and database interactions.
7
- */
8
- class SiteOrigin_Panels_Admin_Layouts {
9
-
10
- const LAYOUT_URL = 'https://layouts.siteorigin.com/';
11
-
12
- function __construct() {
13
- // Filter all the available external layout directories.
14
- add_filter( 'siteorigin_panels_external_layout_directories', array( $this, 'filter_directories' ), 8 );
15
- // Filter all the available local layout folders.
16
- add_filter( 'siteorigin_panels_prebuilt_layouts', array( $this, 'get_local_layouts' ), 8 );
17
-
18
- add_action( 'wp_ajax_so_panels_layouts_query', array( $this, 'action_get_prebuilt_layouts' ) );
19
- add_action( 'wp_ajax_so_panels_get_layout', array( $this, 'action_get_prebuilt_layout' ) );
20
- add_action( 'wp_ajax_so_panels_import_layout', array( $this, 'action_import_layout' ) );
21
- add_action( 'wp_ajax_so_panels_export_layout', array( $this, 'action_export_layout' ) );
22
- add_action( 'wp_ajax_so_panels_directory_enable', array( $this, 'action_directory_enable' ) );
23
- }
24
-
25
- /**
26
- * @return SiteOrigin_Panels_Admin_Layouts
27
- */
28
- public static function single() {
29
- static $single;
30
- return empty( $single ) ? $single = new self() : $single;
31
- }
32
-
33
- /**
34
- * Add the main SiteOrigin layout directory
35
- */
36
- public function filter_directories( $directories ){
37
- if ( apply_filters( 'siteorigin_panels_layouts_directory_enabled', true ) ) {
38
- $directories['siteorigin'] = array(
39
- // The title of the layouts directory in the sidebar.
40
- 'title' => __( 'Layouts Directory', 'siteorigin-panels' ),
41
- // The URL of the directory.
42
- 'url' => self::LAYOUT_URL,
43
- // Any additional arguments to pass to the layouts server
44
- 'args' => array()
45
- );
46
- }
47
-
48
- return $directories;
49
- }
50
-
51
- /**
52
- * Get all the layout directories.
53
- *
54
- * @return array
55
- */
56
- public function get_directories(){
57
- $directories = apply_filters( 'siteorigin_panels_external_layout_directories', array() );
58
- if( empty( $directories ) || ! is_array( $directories ) ) {
59
- $directories = array();
60
- }
61
-
62
- return $directories;
63
- }
64
-
65
-
66
- /**
67
- * Looks through local folders in the active theme and any others filtered in by theme and plugins, to find JSON
68
- * prebuilt layouts.
69
- *
70
- */
71
- public function get_local_layouts() {
72
-
73
- // By default we'll look for layouts in a directory in the active theme
74
- $layout_folders = array( get_template_directory() . '/siteorigin-page-builder-layouts' );
75
-
76
- // And the child theme if there is one.
77
- if ( is_child_theme() ) {
78
- $layout_folders[] = get_stylesheet_directory() . '/siteorigin-page-builder-layouts';
79
- }
80
-
81
- // This allows themes and plugins to customize where we look for layouts.
82
- $layout_folders = apply_filters( 'siteorigin_panels_local_layouts_directories', $layout_folders );
83
-
84
- $layouts = array();
85
- foreach ( $layout_folders as $folder ) {
86
- $folder = realpath($folder);
87
- if ( file_exists( $folder ) && is_dir( $folder ) ) {
88
- $files = list_files( $folder, 1 );
89
- if ( empty( $files ) ) {
90
- continue;
91
- }
92
-
93
- foreach ( $files as $file ) {
94
-
95
- if ( function_exists( 'mime_content_type' ) ) {
96
- // get file mime type
97
- $mime_type = mime_content_type( $file );
98
-
99
- // Valid if text files.
100
- $valid_file_type = strpos( $mime_type, 'text/' ) === 0;
101
- } else {
102
- // If `mime_content_type` isn't available, just check file extension.
103
- $ext = pathinfo( $file, PATHINFO_EXTENSION );
104
-
105
- // skip files which don't have a `.json` extension.
106
- $valid_file_type = ! empty( $ext ) && $ext === 'json';
107
- }
108
-
109
- if ( ! $valid_file_type ) {
110
- continue;
111
- }
112
-
113
- // get file contents
114
- $file_contents = file_get_contents( $file );
115
-
116
- // skip if file_get_contents fails
117
- if ( $file_contents === false ) {
118
- continue;
119
- }
120
-
121
- // json decode
122
- $panels_data = json_decode( $file_contents, true );
123
-
124
- if ( ! empty( $panels_data ) ) {
125
- // get file name by stripping out folder path and .json extension
126
- $file_name = str_replace( array( $folder . '/', '.json' ), '', $file );
127
-
128
- // get name: check for id or name else use filename
129
- $panels_data['id'] = sanitize_title_with_dashes( $this->get_layout_id( $panels_data, $file_name ) );
130
-
131
- if ( empty( $panels_data['name'] ) ) {
132
- $panels_data['name'] = $file_name;
133
- }
134
-
135
- $panels_data['name'] = sanitize_text_field( $panels_data['name'] );
136
-
137
- // get screenshot: check for screenshot prop else try use image file with same filename.
138
- $panels_data['screenshot'] = $this->get_layout_file_screenshot( $panels_data, $folder, $file_name );
139
-
140
- // set item on layouts array
141
- $layouts[ $panels_data['id'] ] = $panels_data;
142
- }
143
- }
144
- }
145
- }
146
-
147
- return $layouts;
148
- }
149
-
150
- private function get_layout_id( $layout_data, $fallback ) {
151
- if ( ! empty( $layout_data['id'] ) ) {
152
- return $layout_data['id'];
153
- } else if ( ! empty( $layout_data['name'] ) ) {
154
- return $layout_data['name'];
155
- } else {
156
- return $fallback;
157
- }
158
- }
159
-
160
- private function get_layout_file_screenshot( $panels_data, $folder_path, $file_name ) {
161
- if ( ! empty( $panels_data['screenshot'] ) ) {
162
- return $panels_data['screenshot'];
163
- } else {
164
- $paths = glob( $folder_path . "/$file_name.{jpg,jpeg,gif,png}", GLOB_BRACE );
165
- // Highlander Condition. There can be only one.
166
- $screenshot_path = empty( $paths ) ? '' : wp_normalize_path( $paths[0] );
167
- $wp_content_dir = wp_normalize_path( WP_CONTENT_DIR );
168
- $screenshot_url = '';
169
- if ( file_exists( $screenshot_path ) &&
170
- strrpos( $screenshot_path, $wp_content_dir ) === 0 ) {
171
-
172
- $screenshot_url = str_replace( $wp_content_dir, content_url(), $screenshot_path );
173
- }
174
-
175
- return $screenshot_url;
176
- }
177
- }
178
-
179
- /**
180
- * Gets all the prebuilt layouts.
181
- */
182
- function action_get_prebuilt_layouts() {
183
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
184
- wp_die( __( 'Invalid request.', 'siteorigin-panels' ), 403 );
185
- }
186
-
187
- // Get any layouts that the current user could edit.
188
- header( 'content-type: application/json' );
189
-
190
- $type = ! empty( $_REQUEST['type'] ) ? $_REQUEST['type'] : 'directory-siteorigin';
191
- $search = ! empty( $_REQUEST['search'] ) ? trim( strtolower( $_REQUEST['search'] ) ) : '';
192
- $page_num = ! empty( $_REQUEST['page'] ) ? intval( $_REQUEST['page'] ) : 1;
193
-
194
- $return = array(
195
- 'title' => '',
196
- 'items' => array()
197
- );
198
- if ( $type == 'prebuilt' ) {
199
- $return['title'] = __( 'Theme Defined Layouts', 'siteorigin-panels' );
200
-
201
- // This is for theme bundled prebuilt directories
202
- $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
203
-
204
- foreach ( $layouts as $id => $vals ) {
205
- if ( ! empty( $search ) && strpos( strtolower( $vals['name'] ), $search ) === false ) {
206
- continue;
207
- }
208
-
209
- $return['items'][] = array(
210
- 'title' => $vals['name'],
211
- 'id' => $id,
212
- 'type' => 'prebuilt',
213
- 'description' => isset( $vals['description'] ) ? $vals['description'] : '',
214
- 'screenshot' => ! empty( $vals['screenshot'] ) ? $vals['screenshot'] : ''
215
- );
216
- }
217
-
218
- $return['max_num_pages'] = 1;
219
- } elseif ( substr( $type, 0, 10 ) == 'directory-' ) {
220
- $return['title'] = __( 'Layouts Directory', 'siteorigin-panels' );
221
-
222
- // This is a query of the prebuilt layout directory
223
- $query = array();
224
- if ( ! empty( $search ) ) {
225
- $query['search'] = $search;
226
- }
227
- $query['page'] = $page_num;
228
-
229
- $directory_id = str_replace( 'directory-', '', $type );
230
- $directories = $this->get_directories();
231
- $directory = ! empty( $directories[ $directory_id ] ) ? $directories[ $directory_id ] : false;
232
-
233
- if( empty( $directory ) ) {
234
- return false;
235
- }
236
-
237
- $url = add_query_arg( $query, $directory[ 'url' ] . 'wp-admin/admin-ajax.php?action=query_layouts' );
238
- if( ! empty( $directory[ 'args' ] ) && is_array( $directory[ 'args' ] ) ) {
239
- $url = add_query_arg( $directory[ 'args' ], $url );
240
- }
241
-
242
- $url = apply_filters( 'siteorigin_panels_layouts_directory_url', $url );
243
- $response = wp_remote_get( $url );
244
-
245
- if ( is_array( $response ) && $response['response']['code'] == 200 ) {
246
- $results = json_decode( $response['body'], true );
247
- if ( ! empty( $results ) && ! empty( $results['items'] ) ) {
248
- foreach ( $results['items'] as $item ) {
249
- $item['id'] = $item['slug'];
250
- $item['type'] = $type;
251
-
252
- if( empty( $item['screenshot'] ) && ! empty( $item['preview'] ) ) {
253
- $preview_url = add_query_arg( 'screenshot', 'true', $item[ 'preview' ] );
254
- $item['screenshot'] = 'https://s.wordpress.com/mshots/v1/' . urlencode( $preview_url ) . '?w=700';
255
- }
256
-
257
- $return['items'][] = $item;
258
- }
259
- }
260
-
261
- $return['max_num_pages'] = $results['max_num_pages'];
262
- }
263
- } elseif ( strpos( $type, 'clone_' ) !== false ) {
264
- // Check that the user can view the given page types
265
- $post_type = get_post_type_object( str_replace( 'clone_', '', $type ) );
266
- if( empty( $post_type ) ) {
267
- return;
268
- }
269
-
270
- $return['title'] = sprintf( __( 'Clone %s', 'siteorigin-panels' ), esc_html( $post_type->labels->singular_name ) );
271
-
272
- global $wpdb;
273
- $user_can_read_private = ( $post_type->name == 'post' && current_user_can( 'read_private_posts' ) || ( $post_type->name == 'page' && current_user_can( 'read_private_pages' ) ) );
274
- $include_private = $user_can_read_private ? "OR posts.post_status = 'private' " : "";
275
-
276
- // Select only the posts with the given post type that also have panels_data
277
- $results = $wpdb->get_results( "
278
- SELECT SQL_CALC_FOUND_ROWS DISTINCT ID, post_title, meta.meta_value
279
- FROM {$wpdb->posts} AS posts
280
- JOIN {$wpdb->postmeta} AS meta ON posts.ID = meta.post_id
281
- WHERE
282
- posts.post_type = '" . esc_sql( $post_type->name ) . "'
283
- AND meta.meta_key = 'panels_data'
284
- " . ( ! empty( $search ) ? 'AND posts.post_title LIKE "%' . esc_sql( $search ) . '%"' : '' ) . "
285
- AND ( posts.post_status = 'publish' OR posts.post_status = 'draft' " . $include_private . ")
286
- ORDER BY post_date DESC
287
- LIMIT 16 OFFSET " . intval( ( $page_num - 1 ) * 16 ) );
288
- $total_posts = $wpdb->get_var( "SELECT FOUND_ROWS();" );
289
-
290
- foreach ( $results as $result ) {
291
- $thumbnail = get_the_post_thumbnail_url( $result->ID, array( 400, 300 ) );
292
- $return['items'][] = array(
293
- 'id' => $result->ID,
294
- 'title' => $result->post_title,
295
- 'type' => $type,
296
- 'screenshot' => ! empty( $thumbnail ) ? $thumbnail : ''
297
- );
298
- }
299
-
300
- $return['max_num_pages'] = ceil( $total_posts / 16 );
301
-
302
- } else {
303
- // An invalid type. Display an error message.
304
- }
305
-
306
- // Add the search part to the title
307
- if ( ! empty( $search ) ) {
308
- $return['title'] .= __( ' - Results For:', 'siteorigin-panels' ) . ' <em>' . esc_html( $search ) . '</em>';
309
- }
310
-
311
- echo json_encode( $return );
312
-
313
- wp_die();
314
- }
315
-
316
- /**
317
- * Ajax handler to get an individual prebuilt layout
318
- */
319
- function action_get_prebuilt_layout() {
320
- if ( empty( $_REQUEST['type'] ) ) {
321
- wp_die();
322
- }
323
- if ( empty( $_REQUEST['lid'] ) ) {
324
- wp_die();
325
- }
326
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
327
- wp_die();
328
- }
329
-
330
- header( 'content-type: application/json' );
331
- $panels_data = array();
332
- $raw_panels_data = false;
333
-
334
- if ( $_REQUEST['type'] == 'prebuilt' ) {
335
- $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
336
- $lid = ! empty( $_REQUEST['lid'] ) ? $_REQUEST['lid'] : false;
337
-
338
- if ( empty( $lid ) || empty( $layouts[ $lid ] ) ) {
339
- wp_send_json_error( array(
340
- 'error' => true,
341
- 'message' => __( 'Missing layout ID or no such layout exists', 'siteorigin-panels' ),
342
- ) );
343
- }
344
-
345
- $layout = $layouts[ $_REQUEST['lid'] ];
346
-
347
- // Fix the format of this layout
348
- if( !empty( $layout[ 'filename' ] ) ) {
349
- $filename = $layout[ 'filename' ];
350
- // Only accept filenames that end with .json
351
- if( substr( $filename, -5, 5 ) === '.json' && file_exists( $filename ) ) {
352
- $panels_data = json_decode( file_get_contents( $filename ), true );
353
- $layout[ 'widgets' ] = ! empty( $panels_data[ 'widgets' ] ) ? $panels_data[ 'widgets' ] : array();
354
- $layout[ 'grids' ] = ! empty( $panels_data[ 'grids' ] ) ? $panels_data[ 'grids' ] : array();
355
- $layout[ 'grid_cells' ] = ! empty( $panels_data[ 'grid_cells' ] ) ? $panels_data[ 'grid_cells' ] : array();
356
- }
357
- }
358
-
359
- // A theme or plugin could use this to change the data in the layout
360
- $panels_data = apply_filters( 'siteorigin_panels_prebuilt_layout', $layout, $lid );
361
-
362
- // Remove all the layout specific attributes
363
- if ( isset( $panels_data['name'] ) ) unset( $panels_data['name'] );
364
- if ( isset( $panels_data['screenshot'] ) ) unset( $panels_data['screenshot'] );
365
- if ( isset( $panels_data['filename'] ) ) unset( $panels_data['filename'] );
366
-
367
- $raw_panels_data = true;
368
-
369
- } elseif ( substr( $_REQUEST['type'], 0, 10 ) == 'directory-' ) {
370
- $directory_id = str_replace( 'directory-', '', $_REQUEST['type'] );
371
- $directories = $this->get_directories();
372
- $directory = ! empty( $directories[ $directory_id ] ) ? $directories[ $directory_id ] : false;
373
-
374
- if( ! empty( $directory ) ) {
375
- $url = $directory[ 'url' ] . 'layout/' . urlencode( $_REQUEST[ 'lid' ] ) . '/?action=download';
376
- if( ! empty( $directory[ 'args' ] ) && is_array( $directory[ 'args' ] ) ) {
377
- $url = add_query_arg( $directory[ 'args' ], $url );
378
- }
379
-
380
- $response = wp_remote_get( $url );
381
- if ( $response['response']['code'] == 200 ) {
382
- // For now, we'll just pretend to load this
383
- $panels_data = json_decode( $response['body'], true );
384
- } else {
385
- wp_send_json_error( array(
386
- 'error' => true,
387
- 'message' => __( 'There was a problem fetching the layout. Please try again later.', 'siteorigin-panels' ),
388
- ) );
389
- }
390
- }
391
- $raw_panels_data = true;
392
-
393
- } elseif ( current_user_can( 'edit_post', $_REQUEST['lid'] ) ) {
394
- $panels_data = get_post_meta( $_REQUEST['lid'], 'panels_data', true );
395
-
396
- // Clear id and timestamp for SO widgets to prevent 'newer content version' notification in widget forms.
397
- foreach ( $panels_data['widgets'] as &$widget ) {
398
- unset( $widget['_sow_form_id'] );
399
- unset( $widget['_sow_form_timestamp'] );
400
- }
401
- }
402
-
403
- if( $raw_panels_data ) {
404
- // This panels_data is flagged as raw, so it needs to be processed.
405
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, false );
406
- $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], array(), true, true );
407
- }
408
-
409
- wp_send_json_success( $panels_data );
410
- }
411
-
412
- /**
413
- * Ajax handler to import a layout
414
- */
415
- function action_import_layout() {
416
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
417
- wp_die();
418
- }
419
-
420
- if ( ! empty( $_FILES['panels_import_data']['tmp_name'] ) ) {
421
- header( 'content-type:application/json' );
422
- $json = file_get_contents( $_FILES['panels_import_data']['tmp_name'] );
423
- $panels_data = json_decode( $json, true );
424
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, false );
425
- $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], array(), true, true );
426
- $json = json_encode( $panels_data );
427
- @unlink( $_FILES['panels_import_data']['tmp_name'] );
428
- echo $json;
429
- }
430
- wp_die();
431
- }
432
-
433
- /**
434
- * Export a given layout as a JSON file.
435
- */
436
- function action_export_layout() {
437
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
438
- wp_die();
439
- }
440
-
441
- $export_data = wp_unslash( $_POST['panels_export_data'] );
442
-
443
- $decoded_export_data = json_decode( $export_data, true );
444
-
445
- if ( ! empty( $decoded_export_data['name'] ) ) {
446
- $decoded_export_data['id'] = sanitize_title_with_dashes( $decoded_export_data['name'] );
447
- $filename = $decoded_export_data['id'];
448
- } else {
449
- $filename = 'layout-' . date( 'dmY' );
450
- }
451
-
452
-
453
- header( 'content-type: application/json' );
454
- header( "Content-Disposition: attachment; filename=$filename.json" );
455
-
456
- echo $export_data;
457
-
458
- wp_die();
459
- }
460
-
461
- /**
462
- * Enable the directory.
463
- */
464
- function action_directory_enable() {
465
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
466
- wp_die();
467
- }
468
- $user = get_current_user_id();
469
- update_user_meta( $user, 'so_panels_directory_enabled', true );
470
- wp_die();
471
- }
472
-
473
- /**
474
- * Load a layout from a json file
475
- *
476
- * @param $id
477
- * @param $name
478
- * @param $json_file
479
- * @param bool $screenshot
480
- *
481
- * @return array The data for the layout
482
- */
483
- public static function load_layout($id, $name, $json_file, $screenshot = false) {
484
- $layout_data = json_decode(file_get_contents($json_file), true);
485
- $layout_data = apply_filters('siteorigin_panels_load_layout_' . $id, $layout_data);
486
-
487
- $layout_data = array_merge(array(
488
- 'name' => $name,
489
- 'screenshot' => $screenshot,
490
- ), $layout_data);
491
-
492
- return $layout_data;
493
- }
494
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin-tutorials.php DELETED
@@ -1,50 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Admin_Tutorials {
4
-
5
- function __construct() {
6
- add_action( 'wp_ajax_so_panels_get_tutorials', array( $this, 'action_get_tutorials' ) );
7
- }
8
-
9
- /**
10
- * @return SiteOrigin_Panels_Admin_Tutorials
11
- */
12
- public static function single() {
13
- static $single;
14
- return empty( $single ) ? $single = new self() : $single;
15
- }
16
-
17
- /**
18
- * Get the latest tutorials from SiteOrigin
19
- */
20
- public function action_get_tutorials(){
21
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
22
- wp_die();
23
- }
24
-
25
- $user = get_current_user_id();
26
- update_user_meta( $user, 'so_panels_tutorials_enabled', true );
27
-
28
- header( 'content-type:application/json' );
29
-
30
- $tutorials = get_transient( 'siteorigin_panels_tutorials' );
31
-
32
- if( empty( $tutorials ) ) {
33
- $response = wp_remote_get('https://siteorigin.com/wp-json/siteorigin/v1/tutorials/page-builder/');
34
- if ( is_array( $response ) && $response['response']['code'] == 200 ) {
35
- $tutorials = json_decode( $response['body'] );
36
- set_transient( 'siteorigin_panels_tutorials', $tutorials, 86400 );
37
- }
38
- else {
39
- $tutorials = array(
40
- 'error' => __( 'Error loading latest tutorials. Please try again after a few minutes.', 'siteorigin-panels' ),
41
- );
42
- }
43
- }
44
-
45
- echo json_encode( $tutorials );
46
-
47
- wp_die();
48
- }
49
-
50
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin-widget-dialog.php DELETED
@@ -1,193 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Admin_Widget_Dialog {
4
-
5
- function __construct() {
6
- add_filter( 'siteorigin_panels_widgets', array( $this, 'add_recommended_widgets' ) );
7
- add_filter( 'siteorigin_panels_widget_dialog_tabs', array( $this, 'add_widgets_dialog_tabs' ), 20 );
8
- }
9
-
10
- /**
11
- * @return SiteOrigin_Panels_Admin_Widget_Dialog
12
- */
13
- public static function single() {
14
- static $single;
15
- return empty( $single ) ? $single = new self() : $single;
16
- }
17
-
18
- /**
19
- * Add some default recommended widgets.
20
- *
21
- * @param $widgets
22
- *
23
- * @return array
24
- */
25
- function add_recommended_widgets( $widgets ) {
26
-
27
- if ( ! empty( $widgets['WP_Widget_Black_Studio_TinyMCE'] ) ) {
28
- $widgets['WP_Widget_Black_Studio_TinyMCE']['groups'] = array( 'recommended' );
29
- $widgets['WP_Widget_Black_Studio_TinyMCE']['icon'] = 'dashicons dashicons-edit';
30
- }
31
-
32
- if ( siteorigin_panels_setting( 'recommended-widgets' ) ) {
33
- // Add in all the widgets bundle widgets
34
- $widgets = wp_parse_args(
35
- $widgets,
36
- include plugin_dir_path( __FILE__ ) . 'data/widgets-bundle.php'
37
- );
38
- }
39
-
40
- foreach ( $widgets as $class => $data ) {
41
- if ( strpos( $class, 'SiteOrigin_Panels_Widgets_' ) === 0 || strpos( $class, 'SiteOrigin_Panels_Widget_' ) === 0 ) {
42
- $widgets[ $class ]['groups'] = array( 'panels' );
43
- }
44
- }
45
-
46
- if ( ! empty( $widgets['SiteOrigin_Panels_Widgets_Layout'] ) ) {
47
- $widgets['SiteOrigin_Panels_Widgets_Layout']['icon'] = 'dashicons dashicons-analytics';
48
- }
49
-
50
- $wordpress_widgets = array(
51
- 'WP_Widget_Pages',
52
- 'WP_Widget_Links',
53
- 'WP_Widget_Search',
54
- 'WP_Widget_Archives',
55
- 'WP_Widget_Meta',
56
- 'WP_Widget_Calendar',
57
- 'WP_Widget_Text',
58
- 'WP_Widget_Categories',
59
- 'WP_Widget_Recent_Posts',
60
- 'WP_Widget_Recent_Comments',
61
- 'WP_Widget_RSS',
62
- 'WP_Widget_Tag_Cloud',
63
- 'WP_Nav_Menu_Widget',
64
- );
65
-
66
- foreach ( $wordpress_widgets as $wordpress_widget ) {
67
- if ( isset( $widgets[ $wordpress_widget ] ) ) {
68
- $widgets[ $wordpress_widget ]['groups'] = array( 'wordpress' );
69
- $widgets[ $wordpress_widget ]['icon'] = 'dashicons dashicons-wordpress';
70
- }
71
- }
72
-
73
- // Third-party plugins dettection.
74
- foreach ( $widgets as $widget_id => &$widget ) {
75
- if ( strpos( $widget_id, 'WC_' ) === 0 || strpos( $widget_id, 'WooCommerce' ) !== false ) {
76
- $widget['groups'][] = 'woocommerce';
77
- }
78
- if ( strpos( $widget_id, 'BBP_' ) === 0 || strpos( $widget_id, 'BBPress' ) !== false ) {
79
- $widget['groups'][] = 'bbpress';
80
- }
81
- if ( strpos( $widget_id, 'Jetpack' ) !== false || strpos( $widget['title'], 'Jetpack' ) !== false ) {
82
- $widget['groups'][] = 'jetpack';
83
- }
84
- }
85
-
86
- return $widgets;
87
- }
88
-
89
- /**
90
- * Add tabs to the widget dialog
91
- *
92
- * @param $tabs
93
- *
94
- * @return array
95
- */
96
- function add_widgets_dialog_tabs( $tabs ) {
97
-
98
- $tabs['widgets_bundle'] = array(
99
- 'title' => __( 'Widgets Bundle', 'siteorigin-panels' ),
100
- 'filter' => array(
101
- 'groups' => array( 'so-widgets-bundle' )
102
- )
103
- );
104
-
105
- if ( class_exists( 'SiteOrigin_Widgets_Bundle' ) ) {
106
- // Add a message about enabling more widgets
107
- $tabs['widgets_bundle']['message'] = preg_replace(
108
- array(
109
- '/1\{ *(.*?) *\}/'
110
- ),
111
- array(
112
- '<a href="' . admin_url( 'plugins.php?page=so-widgets-plugins' ) . '">$1</a>'
113
- ),
114
- __( 'Enable more widgets in the 1{Widgets Bundle settings}.', 'siteorigin-panels' )
115
- );
116
- } else {
117
- // Add a message about installing the widgets bundle
118
- $tabs['widgets_bundle']['message'] = preg_replace(
119
- '/1\{ *(.*?) *\}/',
120
- '<a href="' . siteorigin_panels_plugin_activation_install_url( 'so-widgets-bundle', __( 'SiteOrigin Widgets Bundle', 'siteorigin-panels' ) ) . '">$1</a>',
121
- __( 'Install the 1{Widgets Bundle} to get extra widgets.', 'siteorigin-panels' )
122
- );
123
- }
124
-
125
- // Add the Widgets Bundle message to the main widgets tab
126
- $tabs[0]['message'] = $tabs['widgets_bundle']['message'];
127
-
128
- $tabs['page_builder'] = array(
129
- 'title' => __( 'Page Builder Widgets', 'siteorigin-panels' ),
130
- 'message' => preg_replace(
131
- array(
132
- '/1\{ *(.*?) *\}/'
133
- ),
134
- array(
135
- '<a href="' . admin_url( 'options-general.php?page=siteorigin_panels' ) . '">$1</a>'
136
- ),
137
- __( 'You can enable the legacy (PB) widgets in the 1{Page Builder settings}.', 'siteorigin-panels' )
138
- ),
139
- 'filter' => array(
140
- 'groups' => array( 'panels' )
141
- )
142
- );
143
-
144
- $tabs['wordpress'] = array(
145
- 'title' => __( 'WordPress Widgets', 'siteorigin-panels' ),
146
- 'filter' => array(
147
- 'groups' => array( 'wordpress' )
148
- )
149
- );
150
-
151
- // Check for woocommerce plugin.
152
- if ( defined( 'WOOCOMMERCE_VERSION' ) ) {
153
- $tabs['woocommerce'] = array(
154
- // TRANSLATORS: The name of WordPress plugin
155
- 'title' => __( 'WooCommerce', 'woocommerce' ),
156
- 'filter' => array(
157
- 'groups' => array( 'woocommerce' )
158
- )
159
- );
160
- }
161
-
162
- // Check for jetpack plugin.
163
- if ( defined( 'JETPACK__VERSION' ) ) {
164
- $tabs['jetpack'] = array(
165
- // TRANSLATORS: The name of WordPress plugin
166
- 'title' => __( 'Jetpack', 'jetpack' ),
167
- 'filter' => array(
168
- 'groups' => array( 'jetpack' )
169
- ),
170
- );
171
- }
172
-
173
- // Check for bbpress plugin.
174
- if ( function_exists( 'bbpress' ) ) {
175
- $tabs['bbpress'] = array(
176
- // TRANSLATORS: The name of WordPress plugin
177
- 'title' => __( 'BBPress', 'bbpress' ),
178
- 'filter' => array(
179
- 'groups' => array( 'bbpress' )
180
- ),
181
- );
182
- }
183
-
184
- $tabs['recommended'] = array(
185
- 'title' => __( 'Recommended Widgets', 'siteorigin-panels' ),
186
- 'filter' => array(
187
- 'groups' => array( 'recommended' )
188
- )
189
- );
190
-
191
- return $tabs;
192
- }
193
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin-widgets-bundle.php DELETED
@@ -1,143 +0,0 @@
1
- <?php
2
-
3
-
4
- class SiteOrigin_Panels_Admin_Widgets_Bundle {
5
-
6
- function __construct() {
7
- if ( isset( $_GET['siteorigin-pa-install'] ) ) {
8
- add_action( 'admin_menu', array( $this, 'activation_page' ) );
9
- }
10
- }
11
-
12
- public static function single() {
13
- static $single;
14
- return empty( $single ) ? $single = new self() : $single;
15
- }
16
-
17
- function activation_page() {
18
- add_plugins_page(
19
- __( 'Install Page Builder Plugin', 'siteorigin-panels' ),
20
- __( 'Install Page Builder Plugin', 'siteorigin-panels' ),
21
- 'install_plugins',
22
- 'siteorigin_panels_plugin_activation',
23
- array( $this, 'render_page' )
24
- );
25
- }
26
-
27
- function render_page() {
28
- ?>
29
- <div class="wrap">
30
- <?php
31
- /** All plugin information will be stored in an array for processing */
32
- $plugin = array();
33
-
34
- /** Checks for actions from hover links to process the installation */
35
- if ( isset( $_GET[ sanitize_key( 'plugin' ) ] ) && ( isset( $_GET[ sanitize_key( 'siteorigin-pa-install' ) ] ) && 'install-plugin' == $_GET[ sanitize_key( 'siteorigin-pa-install' ) ] ) && current_user_can( 'install_plugins' ) ) {
36
- check_admin_referer( 'siteorigin-pa-install' );
37
-
38
- $plugin['name'] = $_GET['plugin_name']; // Plugin name
39
- $plugin['slug'] = $_GET['plugin']; // Plugin slug
40
-
41
- if ( ! empty( $_GET['plugin_source'] ) ) {
42
- $plugin['source'] = $_GET['plugin_source'];
43
- } else {
44
- $plugin['source'] = false;
45
- }
46
-
47
- /** Pass all necessary information via URL if WP_Filesystem is needed */
48
- $url = wp_nonce_url(
49
- add_query_arg(
50
- array(
51
- 'page' => 'siteorigin_panels_plugin_activation',
52
- 'plugin' => urlencode( $plugin['slug'] ),
53
- 'plugin_name' => urlencode( $plugin['name'] ),
54
- 'plugin_source' => urlencode( $plugin['source'] ),
55
- 'siteorigin-pa-install' => 'install-plugin',
56
- ),
57
- admin_url( 'themes.php' )
58
- ),
59
- 'siteorigin-pa-install'
60
- );
61
- $method = ''; // Leave blank so WP_Filesystem can populate it as necessary
62
- $fields = array( sanitize_key( 'siteorigin-pa-install' ) ); // Extra fields to pass to WP_Filesystem
63
-
64
- if ( false === ( $creds = request_filesystem_credentials( $url, $method, false, false, $fields ) ) ) {
65
- return true;
66
- }
67
-
68
- if ( ! WP_Filesystem( $creds ) ) {
69
- request_filesystem_credentials( $url, $method, true, false, $fields ); // Setup WP_Filesystem
70
- return true;
71
- }
72
-
73
- require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // Need for plugins_api
74
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; // Need for upgrade classes
75
-
76
- /** Prep variables for Plugin_Installer_Skin class */
77
- $title = sprintf( __( 'Installing %s', 'siteorigin-panels' ), $plugin['name'] );
78
- $url = add_query_arg( array(
79
- 'action' => 'install-plugin',
80
- 'plugin' => urlencode( $plugin['slug'] )
81
- ), 'update.php' );
82
- if ( isset( $_GET['from'] ) ) {
83
- $url .= add_query_arg( 'from', urlencode( stripslashes( $_GET['from'] ) ), $url );
84
- }
85
-
86
- $nonce = 'install-plugin_' . $plugin['slug'];
87
-
88
- // Find the source of the plugin
89
- $source = ! empty( $plugin['source'] ) ? $plugin['source'] : 'http://downloads.wordpress.org/plugin/' . urlencode( $plugin['slug'] ) . '.zip';
90
-
91
- /** Create a new instance of Plugin_Upgrader */
92
- $upgrader = new Plugin_Upgrader( $skin = new Plugin_Installer_Skin( compact( 'type', 'title', 'url', 'nonce', 'plugin', 'api' ) ) );
93
-
94
- /** Perform the action and install the plugin from the $source urldecode() */
95
- $upgrader->install( $source );
96
-
97
- /** Flush plugins cache so we can make sure that the installed plugins list is always up to date */
98
- wp_cache_flush();
99
- }
100
- ?>
101
- </div>
102
- <?php
103
- }
104
-
105
- static function install_url( $plugin, $plugin_name, $source = false ) {
106
- // This is to prevent the issue where this URL is called from outside the admin
107
- if ( ! is_admin() || ! function_exists( 'get_plugins' ) ) {
108
- return false;
109
- }
110
-
111
- $plugins = get_plugins();
112
- $plugins = array_keys( $plugins );
113
-
114
- $installed = false;
115
- foreach ( $plugins as $plugin_path ) {
116
- if ( strpos( $plugin_path, $plugin . '/' ) === 0 ) {
117
- $installed = true;
118
- break;
119
- }
120
- }
121
-
122
- if ( $installed && ! is_plugin_active( $plugin ) ) {
123
- return wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=' . $plugin_path ), 'activate-plugin_' . $plugin_path );
124
- } elseif ( $installed && is_plugin_active( $plugin ) ) {
125
- return '#';
126
- } else {
127
- return wp_nonce_url(
128
- add_query_arg(
129
- array(
130
- 'page' => 'siteorigin_panels_plugin_activation',
131
- 'plugin' => $plugin,
132
- 'plugin_name' => $plugin_name,
133
- 'plugin_source' => ! empty( $source ) ? urlencode( $source ) : false,
134
- 'siteorigin-pa-install' => 'install-plugin',
135
- ),
136
- admin_url( 'plugins.php' )
137
- ),
138
- 'siteorigin-pa-install'
139
- );
140
- }
141
- }
142
-
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/admin.php DELETED
@@ -1,1469 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SiteOrigin_Panels_Admin
5
- *
6
- * Handles all the admin and database interactions.
7
- */
8
- class SiteOrigin_Panels_Admin {
9
-
10
- /**
11
- * @var bool Store that we're in the save post action, to prevent infinite loops
12
- */
13
- private $in_save_post;
14
-
15
- function __construct() {
16
-
17
- add_action( 'plugin_action_links_siteorigin-panels/siteorigin-panels.php', array(
18
- $this,
19
- 'plugin_action_links'
20
- ) );
21
-
22
- add_action( 'current_screen', array( $this, 'admin_init' ) );
23
-
24
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
25
- add_action( 'admin_init', array( $this, 'save_home_page' ) );
26
- add_action( 'save_post', array( $this, 'save_post' ) );
27
-
28
- add_action( 'after_switch_theme', array( $this, 'update_home_on_theme_change' ) );
29
-
30
- // Enqueuing admin scripts
31
- add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_admin_scripts' ) );
32
- add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_admin_scripts' ) );
33
- add_action( 'admin_print_scripts-appearance_page_so_panels_home_page', array(
34
- $this,
35
- 'enqueue_admin_scripts'
36
- ) );
37
- add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) );
38
- add_action( 'admin_print_scripts-edit.php', array( $this, 'footer_column_css' ) );
39
-
40
- // Enqueue the admin styles
41
- add_action( 'admin_print_styles-post-new.php', array( $this, 'enqueue_admin_styles' ) );
42
- add_action( 'admin_print_styles-post.php', array( $this, 'enqueue_admin_styles' ) );
43
- add_action( 'admin_print_styles-appearance_page_so_panels_home_page', array( $this, 'enqueue_admin_styles' ) );
44
- add_action( 'admin_print_styles-widgets.php', array( $this, 'enqueue_admin_styles' ) );
45
-
46
- // The help tab
47
- add_action( 'load-page.php', array( $this, 'add_help_tab' ), 12 );
48
- add_action( 'load-post-new.php', array( $this, 'add_help_tab' ), 12 );
49
- add_action( 'load-appearance_page_so_panels_home_page', array( $this, 'add_help_tab' ), 12 );
50
-
51
- add_action( 'customize_controls_print_footer_scripts', array( $this, 'js_templates' ) );
52
-
53
- // Register all the admin actions
54
- add_action( 'wp_ajax_so_panels_builder_content', array( $this, 'action_builder_content' ) );
55
- add_action( 'wp_ajax_so_panels_widget_form', array( $this, 'action_widget_form' ) );
56
- add_action( 'wp_ajax_so_panels_live_editor_preview', array( $this, 'action_live_editor_preview' ) );
57
- add_action( 'wp_ajax_so_panels_block_editor_preview', array( $this, 'block_editor_preview' ) );
58
-
59
- // Initialize the additional admin classes.
60
- SiteOrigin_Panels_Admin_Widget_Dialog::single();
61
- SiteOrigin_Panels_Admin_Widgets_Bundle::single();
62
- SiteOrigin_Panels_Admin_Layouts::single();
63
-
64
- // Check to make sure we have all the correct markup
65
- SiteOrigin_Panels_Admin_Dashboard::single();
66
-
67
- $this->in_save_post = false;
68
-
69
-
70
- // Enqueue Yoast compatibility
71
- add_action( 'admin_print_scripts-post-new.php', array( $this, 'enqueue_yoast_compat' ), 100 );
72
- add_action( 'admin_print_scripts-post.php', array( $this, 'enqueue_yoast_compat' ), 100 );
73
-
74
- // Block editor specific actions
75
- if ( function_exists( 'register_block_type' ) ) {
76
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
77
- add_filter( 'gutenberg_can_edit_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
78
- add_filter( 'use_block_editor_for_post_type', array( $this, 'show_classic_editor_for_panels' ), 10, 2 );
79
- add_action( 'admin_print_scripts-edit.php', array( $this, 'add_panels_add_new_button' ) );
80
- add_filter( 'display_post_states', array( $this, 'add_panels_post_state' ), 10, 2 );
81
- }
82
- }
83
-
84
- /**
85
- * @return SiteOrigin_Panels_Admin
86
- */
87
- public static function single() {
88
- static $single;
89
- return empty( $single ) ? $single = new self() : $single;
90
- }
91
-
92
- /**
93
- * Do some general admin initialization
94
- */
95
- public function admin_init(){
96
- if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
97
-
98
- // Add the custom columns
99
- $post_types = siteorigin_panels_setting( 'post-types' );
100
- if( ! empty( $post_types ) ) {
101
- foreach( $post_types as $post_type ) {
102
- add_filter( 'manage_' . $post_type . 's_columns' , array( $this, 'add_custom_column' ) );
103
- add_action( 'manage_' . $post_type . 's_custom_column' , array( $this, 'display_custom_column' ), 10, 2 );
104
- }
105
- }
106
- }
107
- }
108
-
109
- /**
110
- * Check if this is an admin page.
111
- *
112
- * @return mixed|void
113
- */
114
- static function is_admin() {
115
- $screen = get_current_screen();
116
- $is_panels_page = ( $screen->base == 'post' && in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) ) ||
117
- in_array( $screen->base, array( 'appearance_page_so_panels_home_page', 'widgets', 'customize' ) ) ||
118
- self::is_block_editor();
119
-
120
- return apply_filters( 'siteorigin_panels_is_admin_page', $is_panels_page );
121
- }
122
-
123
- /**
124
- * Check if the current page is Gutenberg or the Block Ediotr
125
- *
126
- * @return bool
127
- */
128
- static function is_block_editor() {
129
- // This is for the Gutenberg plugin.
130
- $is_gutenberg_page = function_exists( 'is_gutenberg_page' ) && is_gutenberg_page();
131
- // This is for WP 5 with the integrated block editor.
132
- $is_block_editor = false;
133
-
134
- if ( function_exists( 'get_current_screen' ) ) {
135
- $current_screen = get_current_screen();
136
- if ( $current_screen && method_exists( $current_screen, 'is_block_editor' ) ) {
137
- $is_block_editor = $current_screen->is_block_editor();
138
- }
139
- }
140
-
141
- return $is_gutenberg_page || $is_block_editor;
142
- }
143
-
144
-
145
- /**
146
- * Add action links to the plugin list for Page Builder.
147
- *
148
- * @param $links
149
- *
150
- * @return array
151
- */
152
- function plugin_action_links( $links ) {
153
- if( ! is_array( $links ) ) {
154
- return $links;
155
- }
156
-
157
- unset( $links['edit'] );
158
- $links[] = '<a href="http://siteorigin.com/threads/plugin-page-builder/">' . __( 'Support Forum', 'siteorigin-panels' ) . '</a>';
159
-
160
- if( SiteOrigin_Panels::display_premium_teaser() ) {
161
- $links[] = '<a href="' . esc_url( SiteOrigin_Panels::premium_url() ) . '" style="color: #3db634" target="_blank" rel="noopener noreferrer">' . __('Addons', 'siteorigin-panels') . '</a>';
162
- }
163
-
164
- return $links;
165
- }
166
-
167
- /**
168
- * Callback to register the Page Builder Metaboxes
169
- */
170
- function add_meta_boxes() {
171
-
172
- foreach ( siteorigin_panels_setting( 'post-types' ) as $type ) {
173
- add_meta_box(
174
- 'so-panels-panels',
175
- __( 'Page Builder', 'siteorigin-panels' ),
176
- array( $this, 'render_meta_boxes' ),
177
- ( string ) $type,
178
- 'advanced',
179
- 'high',
180
- array(
181
- // Ideally when we have panels data for a page we would set this to false and it would cause the
182
- // editor to fall back to classic editor, but that's not the case so we just declare it as a `__back_compat_meta_box`.
183
- '__back_compat_meta_box' => true,
184
- '__block_editor_compatible_meta_box' => false,
185
- )
186
- );
187
- }
188
- }
189
-
190
- /**
191
- * Render a panel metabox.
192
- *
193
- * @param $post
194
- */
195
- function render_meta_boxes( $post ) {
196
- $panels_data = $this->get_current_admin_panels_data();
197
- include plugin_dir_path( __FILE__ ) . '../tpl/metabox-panels.php';
198
- }
199
-
200
- /**
201
- * Save the panels data
202
- *
203
- * @param $post_id
204
- *
205
- * @action save_post
206
- */
207
- function save_post( $post_id ) {
208
- // Check that everything is valid with this save.
209
- if(
210
- $this->in_save_post ||
211
- ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ||
212
- empty( $_POST['_sopanels_nonce'] ) ||
213
- ! wp_verify_nonce( $_POST['_sopanels_nonce'], 'save' ) ||
214
- ! current_user_can( 'edit_post', $post_id ) ||
215
- ! isset( $_POST['panels_data'] )
216
- ) {
217
- return;
218
- }
219
- $this->in_save_post = true;
220
- // Get post from db as it might have been changed and saved by other plugins.
221
- $post = get_post( $post_id );
222
- $old_panels_data = get_post_meta( $post_id, 'panels_data', true );
223
- $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
224
-
225
- $panels_data['widgets'] = $this->process_raw_widgets(
226
- $panels_data['widgets'],
227
- ! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
228
- false
229
- );
230
-
231
- if ( siteorigin_panels_setting( 'sidebars-emulator' ) ) {
232
- $sidebars_emulator = SiteOrigin_Panels_Sidebars_Emulator::single();
233
- $panels_data['widgets'] = $sidebars_emulator->generate_sidebar_widget_ids( $panels_data['widgets'], $post_id );
234
- }
235
-
236
- $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
237
- $panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $post, $post_id );
238
-
239
- if ( ! empty( $panels_data['widgets'] ) || ! empty( $panels_data['grids'] ) ) {
240
- // Use `update_metadata` instead of `update_post_meta` to prevent saving to parent post when it's a revision, e.g. preview.
241
- update_metadata( 'post', $post_id, 'panels_data', map_deep( $panels_data, array( 'SiteOrigin_Panels_Admin', 'double_slash_string' ) ) );
242
-
243
- if( siteorigin_panels_setting( 'copy-content' ) ) {
244
- // Store a version of the HTML in post_content
245
- $post_parent_id = wp_is_post_revision( $post_id );
246
- $layout_id = ( ! empty( $post_parent_id ) ) ? $post_parent_id : $post_id;
247
-
248
- SiteOrigin_Panels_Post_Content_Filters::add_filters();
249
- $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
250
- $post_content = SiteOrigin_Panels::renderer()->render( $layout_id, false, $panels_data );
251
- $post_css = SiteOrigin_Panels::renderer()->generate_css( $layout_id, $panels_data );
252
- SiteOrigin_Panels_Post_Content_Filters::remove_filters();
253
- unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
254
-
255
- // Update the post_content
256
- $post->post_content = $post_content;
257
- if( siteorigin_panels_setting( 'copy-styles' ) ) {
258
- $post->post_content .= "\n\n";
259
- $post->post_content .= '<style type="text/css" class="panels-style" data-panels-style-for-post="' . intval( $layout_id ) . '">';
260
- $post->post_content .= '@import url(' . SiteOrigin_Panels::front_css_url() . '); ';
261
- $post->post_content .= $post_css;
262
- $post->post_content .= '</style>';
263
- }
264
- wp_update_post( $post );
265
- }
266
-
267
- } else {
268
- // There are no widgets or rows, so delete the panels data
269
- delete_post_meta( $post_id, 'panels_data' );
270
- }
271
-
272
- $this->in_save_post = false;
273
- }
274
-
275
- /**
276
- * Enqueue the panels admin scripts
277
- *
278
- * @param string $prefix
279
- * @param bool $force Should we force the enqueues
280
- *
281
- * @action admin_print_scripts-post-new.php
282
- * @action admin_print_scripts-post.php
283
- * @action admin_print_scripts-appearance_page_so_panels_home_page
284
- */
285
- function enqueue_admin_scripts( $prefix = '', $force = false ) {
286
- $screen = get_current_screen();
287
- if ( $force || self::is_admin() ) {
288
- // Media is required for row styles
289
- wp_enqueue_media();
290
- wp_enqueue_script(
291
- 'so-panels-admin',
292
- siteorigin_panels_url( 'js/siteorigin-panels' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
293
- array(
294
- 'jquery',
295
- 'jquery-ui-resizable',
296
- 'jquery-ui-sortable',
297
- 'jquery-ui-draggable',
298
- 'underscore',
299
- 'backbone',
300
- 'plupload',
301
- 'plupload-all'
302
- ),
303
- SITEORIGIN_PANELS_VERSION,
304
- true
305
- );
306
- add_action( 'admin_footer', array( $this, 'js_templates' ) );
307
-
308
- $widgets = $this->get_widgets();
309
- $directory_enabled = get_user_meta( get_current_user_id(), 'so_panels_directory_enabled', true );
310
-
311
- // This is the widget we'll use for default text
312
- if( ! empty( $widgets[ 'SiteOrigin_Widget_Editor_Widget' ] ) ) $text_widget = 'SiteOrigin_Widget_Editor_Widget';
313
- else if( ! empty( $widgets[ 'WP_Widget_Text' ] ) ) $text_widget = 'WP_Widget_Text';
314
- else $text_widget = false;
315
- $text_widget = apply_filters( 'siteorigin_panels_text_widget_class', $text_widget );
316
-
317
- $user = wp_get_current_user();
318
-
319
- $load_on_attach = siteorigin_panels_setting( 'load-on-attach' ) || isset( $_GET['siteorigin-page-builder'] );
320
- wp_localize_script( 'so-panels-admin', 'panelsOptions', array(
321
- 'user' => ! empty( $user ) ? $user->ID : 0,
322
- 'ajaxurl' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'panels_action', '_panelsnonce' ),
323
- 'widgets' => $widgets,
324
- 'text_widget' => $text_widget,
325
- 'widget_dialog_tabs' => apply_filters( 'siteorigin_panels_widget_dialog_tabs', array(
326
- 0 => array(
327
- 'title' => __( 'All Widgets', 'siteorigin-panels' ),
328
- 'filter' => array(
329
- 'installed' => true,
330
- 'groups' => ''
331
- )
332
- )
333
- ) ),
334
- 'row_layouts' => apply_filters( 'siteorigin_panels_row_layouts', array() ),
335
- 'directory_enabled' => ! empty( $directory_enabled ),
336
- 'copy_content' => siteorigin_panels_setting( 'copy-content' ),
337
- 'cache' => array(),
338
- 'instant_open' => siteorigin_panels_setting( 'instant-open-widgets' ),
339
-
340
- // Settings for the contextual menu
341
- 'contextual' => array(
342
- // Developers can change which widgets are displayed by default using this filter
343
- 'default_widgets' => apply_filters( 'siteorigin_panels_contextual_default_widgets', array(
344
- 'SiteOrigin_Widget_Editor_Widget',
345
- 'SiteOrigin_Widget_Button_Widget',
346
- 'SiteOrigin_Widget_Image_Widget',
347
- 'SiteOrigin_Panels_Widgets_Layout',
348
- ) )
349
- ),
350
-
351
- // General localization messages
352
- 'loc' => array(
353
- 'missing_widget' => array(
354
- 'title' => __( 'Missing Widget', 'siteorigin-panels' ),
355
- 'description' => __( "Page Builder doesn't know about this widget.", 'siteorigin-panels' ),
356
- ),
357
- 'time' => array(
358
- // TRANSLATORS: Number of seconds since
359
- 'seconds' => __( '%d seconds', 'siteorigin-panels' ),
360
- // TRANSLATORS: Number of minutes since
361
- 'minutes' => __( '%d minutes', 'siteorigin-panels' ),
362
- // TRANSLATORS: Number of hours since
363
- 'hours' => __( '%d hours', 'siteorigin-panels' ),
364
-
365
- // TRANSLATORS: A single second since
366
- 'second' => __( '%d second', 'siteorigin-panels' ),
367
- // TRANSLATORS: A single minute since
368
- 'minute' => __( '%d minute', 'siteorigin-panels' ),
369
- // TRANSLATORS: A single hour since
370
- 'hour' => __( '%d hour', 'siteorigin-panels' ),
371
-
372
- // TRANSLATORS: Time ago - eg. "1 minute before".
373
- 'ago' => __( '%s before', 'siteorigin-panels' ),
374
- 'now' => __( 'Now', 'siteorigin-panels' ),
375
- ),
376
- 'history' => array(
377
- // History messages
378
- 'current' => __( 'Current', 'siteorigin-panels' ),
379
- 'revert' => __( 'Original', 'siteorigin-panels' ),
380
- 'restore' => __( 'Version restored', 'siteorigin-panels' ),
381
- 'back_to_editor' => __( 'Converted to editor', 'siteorigin-panels' ),
382
-
383
- // Widgets
384
- // TRANSLATORS: Message displayed in the history when a widget is deleted
385
- 'widget_deleted' => __( 'Widget deleted', 'siteorigin-panels' ),
386
- // TRANSLATORS: Message displayed in the history when a widget is added
387
- 'widget_added' => __( 'Widget added', 'siteorigin-panels' ),
388
- // TRANSLATORS: Message displayed in the history when a widget is edited
389
- 'widget_edited' => __( 'Widget edited', 'siteorigin-panels' ),
390
- // TRANSLATORS: Message displayed in the history when a widget is duplicated
391
- 'widget_duplicated' => __( 'Widget duplicated', 'siteorigin-panels' ),
392
- // TRANSLATORS: Message displayed in the history when a widget position is changed
393
- 'widget_moved' => __( 'Widget moved', 'siteorigin-panels' ),
394
-
395
- // Rows
396
- // TRANSLATORS: Message displayed in the history when a row is deleted
397
- 'row_deleted' => __( 'Row deleted', 'siteorigin-panels' ),
398
- // TRANSLATORS: Message displayed in the history when a row is added
399
- 'row_added' => __( 'Row added', 'siteorigin-panels' ),
400
- // TRANSLATORS: Message displayed in the history when a row is edited
401
- 'row_edited' => __( 'Row edited', 'siteorigin-panels' ),
402
- // TRANSLATORS: Message displayed in the history when a row position is changed
403
- 'row_moved' => __( 'Row moved', 'siteorigin-panels' ),
404
- // TRANSLATORS: Message displayed in the history when a row is duplicated
405
- 'row_duplicated' => __( 'Row duplicated', 'siteorigin-panels' ),
406
- // TRANSLATORS: Message displayed in the history when a row is pasted
407
- 'row_pasted' => __( 'Row pasted', 'siteorigin-panels' ),
408
-
409
- // Cells
410
- 'cell_resized' => __( 'Cell resized', 'siteorigin-panels' ),
411
-
412
- // Prebuilt
413
- 'prebuilt_loaded' => __( 'Prebuilt layout loaded', 'siteorigin-panels' ),
414
- ),
415
-
416
- // general localization
417
- 'prebuilt_loading' => __( 'Loading prebuilt layout', 'siteorigin-panels' ),
418
- 'confirm_use_builder' => __( "Would you like to copy this editor's existing content to Page Builder?", 'siteorigin-panels' ),
419
- 'confirm_stop_builder' => __( "Would you like to clear your Page Builder content and revert to using the standard visual editor?", 'siteorigin-panels' ),
420
- // TRANSLATORS: This is the title for a widget called "Layout Builder"
421
- 'layout_widget' => __( 'Layout Builder Widget', 'siteorigin-panels' ),
422
- // TRANSLATORS: A standard confirmation message
423
- 'dropdown_confirm' => __( 'Are you sure?', 'siteorigin-panels' ),
424
- // TRANSLATORS: When a layout file is ready to be inserted. %s is the filename.
425
- 'ready_to_insert' => __( '%s is ready to insert.', 'siteorigin-panels' ),
426
-
427
- // Everything for the contextual menu
428
- 'contextual' => array(
429
- 'add_widget_below' => __( 'Add Widget Below', 'siteorigin-panels' ),
430
- 'add_widget_cell' => __( 'Add Widget to Cell', 'siteorigin-panels' ),
431
- 'search_widgets' => __( 'Search Widgets', 'siteorigin-panels' ),
432
-
433
- 'add_row' => __( 'Add Row', 'siteorigin-panels' ),
434
- 'column' => __( 'Column', 'siteorigin-panels' ),
435
-
436
- 'cell_actions' => __( 'Cell Actions', 'siteorigin-panels' ),
437
- 'cell_paste_widget' => __( 'Paste Widget', 'siteorigin-panels' ),
438
-
439
- 'widget_actions' => __( 'Widget Actions', 'siteorigin-panels' ),
440
- 'widget_edit' => __( 'Edit Widget', 'siteorigin-panels' ),
441
- 'widget_duplicate' => __( 'Duplicate Widget', 'siteorigin-panels' ),
442
- 'widget_delete' => __( 'Delete Widget', 'siteorigin-panels' ),
443
- 'widget_copy' => __( 'Copy Widget', 'siteorigin-panels' ),
444
- 'widget_paste' => __( 'Paste Widget Below', 'siteorigin-panels' ),
445
-
446
- 'row_actions' => __( 'Row Actions', 'siteorigin-panels' ),
447
- 'row_edit' => __( 'Edit Row', 'siteorigin-panels' ),
448
- 'row_duplicate' => __( 'Duplicate Row', 'siteorigin-panels' ),
449
- 'row_delete' => __( 'Delete Row', 'siteorigin-panels' ),
450
- 'row_copy' => __( 'Copy Row', 'siteorigin-panels' ),
451
- 'row_paste' => __( 'Paste Row', 'siteorigin-panels' ),
452
- ),
453
- 'draft' => __( 'Draft', 'siteorigin-panels' ),
454
- 'untitled' => __( 'Untitled', 'siteorigin-panels' ),
455
- 'row' => array(
456
- 'add' => __( 'New Row', 'siteorigin-panels' ),
457
- 'edit' => __( 'Row', 'siteorigin-panels' ),
458
- ),
459
- 'welcomeMessage' => array(
460
- 'addingDisabled' => __( 'Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements.', 'siteorigin-panels' ),
461
- 'oneEnabled' => __( 'Add a {{%= items[0] %}} to get started.', 'siteorigin-panels' ),
462
- 'twoEnabled' => __( 'Add a {{%= items[0] %}} or {{%= items[1] %}} to get started.', 'siteorigin-panels' ),
463
- 'threeEnabled' => __( 'Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started.', 'siteorigin-panels' ),
464
- 'addWidgetButton' => "<a href='#' class='so-tool-button so-widget-add'>" . __( 'Widget', 'siteorigin-panels' ) . "</a>",
465
- 'addRowButton' => "<a href='#' class='so-tool-button so-row-add'>" . __( 'Row', 'siteorigin-panels' ) . "</a>",
466
- 'addPrebuiltButton' => "<a href='#' class='so-tool-button so-prebuilt-add'>" . __( 'Prebuilt Layout', 'siteorigin-panels' ) . "</a>",
467
- 'docsMessage' => sprintf(
468
- __( 'Read our %s if you need help.', 'siteorigin-panels' ),
469
- "<a href='https://siteorigin.com/page-builder/documentation/' target='_blank' rel='noopener noreferrer'>" . __( 'documentation', 'siteorigin-panels' ) . "</a>"
470
- ),
471
- ),
472
- ),
473
- 'plupload' => array(
474
- 'max_file_size' => wp_max_upload_size() . 'b',
475
- 'url' => wp_nonce_url( admin_url( 'admin-ajax.php' ), 'panels_action', '_panelsnonce' ),
476
- 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
477
- 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
478
- 'filter_title' => __( 'Page Builder layouts', 'siteorigin-panels' ),
479
- 'error_message' => __( 'Error uploading or importing file.', 'siteorigin-panels' ),
480
- ),
481
- 'wpColorPickerOptions' => apply_filters( 'siteorigin_panels_wpcolorpicker_options', array() ),
482
- 'prebuiltDefaultScreenshot' => siteorigin_panels_url( 'css/images/prebuilt-default.png' ),
483
- 'loadOnAttach' => $load_on_attach ,
484
- 'siteoriginWidgetRegex' => str_replace( '*+', '*', get_shortcode_regex( array( 'siteorigin_widget' ) ) ),
485
- 'forms' => array(
486
- 'loadingFailed' => __( 'Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later.', 'siteorigin-panels' ),
487
- )
488
- ) );
489
-
490
- $js_widgets = array();
491
- if ( $screen->base != 'widgets' ) {
492
- // Render all the widget forms. A lot of widgets use this as a chance to enqueue their scripts
493
- $original_post = isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null; // Make sure widgets don't change the global post.
494
- global $wp_widget_factory;
495
- foreach ( $wp_widget_factory->widgets as $widget_obj ) {
496
- ob_start();
497
- $return = $widget_obj->form( array() );
498
- // These are the new widgets in WP 4.8 which are largely JS based. They only enqueue their own
499
- // scripts on the 'widgets' screen.
500
- if ( $this->is_core_js_widget( $widget_obj ) && method_exists( $widget_obj, 'enqueue_admin_scripts' ) ) {
501
- $widget_obj->enqueue_admin_scripts();
502
- }
503
- do_action_ref_array( 'in_widget_form', array( &$widget_obj, &$return, array() ) );
504
- ob_end_clean();
505
-
506
- // Need to render templates for new WP 4.8 widgets when not on the 'widgets' screen or in the customizer.
507
- if ( $this->is_core_js_widget( $widget_obj ) ) {
508
- $js_widgets[] = $widget_obj;
509
- }
510
- }
511
- $GLOBALS['post'] = $original_post;
512
- }
513
-
514
- // This gives panels a chance to enqueue scripts too, without having to check the screen ID.
515
- if ( $screen->base != 'widgets' && $screen->base != 'customize' ) {
516
- foreach ( $js_widgets as $js_widget ) {
517
- $js_widget->render_control_template_scripts();
518
- }
519
- do_action( 'siteorigin_panel_enqueue_admin_scripts' );
520
- do_action( 'sidebar_admin_setup' );
521
- }
522
- }
523
- }
524
-
525
- public function enqueue_yoast_compat(){
526
- if( self::is_admin() && defined( 'WPSEO_FILE' ) && wp_script_is( 'yoast-seo-metabox' ) ) {
527
- wp_enqueue_script(
528
- 'so-panels-yoast-compat',
529
- siteorigin_panels_url( 'js/yoast-compat' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
530
- array('jquery', 'yoast-seo-metabox' ),
531
- SITEORIGIN_PANELS_VERSION,
532
- true
533
- );
534
- }
535
- }
536
-
537
- /**
538
- * Enqueue the admin panel styles
539
- *
540
- * @param string $prefix
541
- * @param bool $force Should we force the enqueue
542
- *
543
- * @action admin_print_styles-post-new.php
544
- * @action admin_print_styles-post.php
545
- */
546
- function enqueue_admin_styles( $prefix = '', $force = false ) {
547
- if ( $force || self::is_admin() ) {
548
- wp_enqueue_style(
549
- 'so-panels-admin',
550
- siteorigin_panels_url( 'css/admin' . SITEORIGIN_PANELS_CSS_SUFFIX . '.css' ),
551
- array( 'wp-color-picker' ),
552
- SITEORIGIN_PANELS_VERSION
553
- );
554
- do_action( 'siteorigin_panel_enqueue_admin_styles' );
555
- }
556
- }
557
-
558
- /**
559
- * Add a help tab to pages that include a Page Builder interface.
560
- *
561
- * @param $prefix
562
- */
563
- function add_help_tab( $prefix ) {
564
- $screen = get_current_screen();
565
- if (
566
- ( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '' ) )
567
- || ( $screen->id == 'appearance_page_so_panels_home_page' )
568
- ) {
569
- $screen->add_help_tab( array(
570
- 'id' => 'panels-help-tab', //unique id for the tab
571
- 'title' => __( 'Page Builder', 'siteorigin-panels' ), //unique visible title for the tab
572
- 'callback' => array( $this, 'help_tab_content' )
573
- ) );
574
- }
575
- }
576
-
577
- /**
578
- * Display the content for the help tab.
579
- */
580
- function help_tab_content() {
581
- include plugin_dir_path( __FILE__ ) . '../tpl/help.php';
582
- }
583
-
584
- /**
585
- * Get the Page Builder data for the current admin page.
586
- *
587
- * @return array
588
- */
589
- function get_current_admin_panels_data() {
590
- $screen = get_current_screen();
591
-
592
- // Localize the panels with the panels data
593
- if ( $screen->base == 'appearance_page_so_panels_home_page' ) {
594
- $home_page_id = get_option( 'page_on_front' );
595
- if ( empty( $home_page_id ) ) {
596
- $home_page_id = get_option( 'siteorigin_panels_home_page_id' );
597
- }
598
-
599
- $panels_data = ! empty( $home_page_id ) ? get_post_meta( $home_page_id, 'panels_data', true ) : null;
600
-
601
- if ( is_null( $panels_data ) ) {
602
- // Load the default layout
603
- $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
604
-
605
- $home_name = siteorigin_panels_setting( 'home-page-default' ) ? siteorigin_panels_setting( 'home-page-default' ) : 'home';
606
- $panels_data = ! empty( $layouts[ $home_name ] ) ? $layouts[ $home_name ] : current( $layouts );
607
- } elseif ( empty( $panels_data ) ) {
608
- // The current page_on_front isn't using page builder
609
- return false;
610
- }
611
-
612
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, 'home' );
613
- } else {
614
- global $post;
615
- if ( ! empty( $post ) ) {
616
- $panels_data = get_post_meta( $post->ID, 'panels_data', true );
617
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post->ID );
618
- }
619
- }
620
-
621
- if ( empty( $panels_data ) ) {
622
- $panels_data = array();
623
- }
624
-
625
- return $panels_data;
626
- }
627
-
628
- /**
629
- * Save home page
630
- */
631
- function save_home_page() {
632
- if ( ! isset( $_POST['_sopanels_home_nonce'] ) || ! wp_verify_nonce( $_POST['_sopanels_home_nonce'], 'save' ) ) {
633
- return;
634
- }
635
- if ( ! current_user_can( 'edit_theme_options' ) ) {
636
- return;
637
- }
638
- if ( ! isset( $_POST['panels_data'] ) ) {
639
- return;
640
- }
641
-
642
- // Check that the home page ID is set and the home page exists
643
- $page_id = get_option( 'page_on_front' );
644
- if ( empty( $page_id ) ) {
645
- $page_id = get_option( 'siteorigin_panels_home_page_id' );
646
- }
647
-
648
- $post_content = wp_unslash( $_POST['post_content'] );
649
-
650
- if ( ! $page_id || get_post_meta( $page_id, 'panels_data', true ) == '' ) {
651
- // Lets create a new page
652
- $page_id = wp_insert_post( array(
653
- // TRANSLATORS: This is the default name given to a user's home page
654
- 'post_title' => __( 'Home Page', 'siteorigin-panels' ),
655
- 'post_status' => ! empty( $_POST['siteorigin_panels_home_enabled'] ) ? 'publish' : 'draft',
656
- 'post_type' => 'page',
657
- 'post_content' => $post_content,
658
- 'comment_status' => 'closed',
659
- ) );
660
- update_option( 'page_on_front', $page_id );
661
- update_option( 'siteorigin_panels_home_page_id', $page_id );
662
-
663
- // Action triggered when creating a new home page through the custom home page interface
664
- do_action( 'siteorigin_panels_create_home_page', $page_id );
665
- } else {
666
- // `wp_insert_post` does it's own sanitization, but it seems `wp_update_post` doesn't.
667
- $post_content = sanitize_post_field( 'post_content', $post_content, $page_id, 'db' );
668
-
669
- // Update the post with changed content to save revision if necessary.
670
- wp_update_post( array( 'ID' => $page_id, 'post_content' => $post_content ) );
671
- }
672
-
673
- $page = get_post( $page_id );
674
-
675
- // Save the updated page data
676
- $old_panels_data = get_post_meta( $page_id, 'panels_data', true );
677
- $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
678
- $panels_data['widgets'] = $this->process_raw_widgets(
679
- $panels_data['widgets'],
680
- ! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
681
- false
682
- );
683
-
684
- if ( siteorigin_panels_setting( 'sidebars-emulator' ) ) {
685
- $sidebars_emulator = SiteOrigin_Panels_Sidebars_Emulator::single();
686
- $panels_data['widgets'] = $sidebars_emulator->generate_sidebar_widget_ids( $panels_data['widgets'], $page_id );
687
- }
688
-
689
- $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
690
- $panels_data = apply_filters( 'siteorigin_panels_data_pre_save', $panels_data, $page, $page_id );
691
-
692
- update_post_meta( $page_id, 'panels_data', map_deep( $panels_data, array( 'SiteOrigin_Panels_Admin', 'double_slash_string' ) ) );
693
-
694
- $template = get_post_meta( $page_id, '_wp_page_template', true );
695
- $home_template = siteorigin_panels_setting( 'home-template' );
696
- if ( ( $template == '' || $template == 'default' ) && ! empty( $home_template ) ) {
697
- // Set the home page template
698
- update_post_meta( $page_id, '_wp_page_template', $home_template );
699
- }
700
-
701
- if ( ! empty( $_POST['siteorigin_panels_home_enabled'] ) ) {
702
- update_option( 'show_on_front', 'page' );
703
- update_option( 'page_on_front', $page_id );
704
- update_option( 'siteorigin_panels_home_page_id', $page_id );
705
- wp_publish_post( $page_id );
706
- } else {
707
- // We're disabling this home page
708
- update_option( 'show_on_front', 'posts' );
709
-
710
- // Change the post status to draft
711
- $post = get_post( $page_id );
712
- if ( $post->post_status != 'draft' ) {
713
- global $wpdb;
714
-
715
- $wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post->ID ) );
716
- clean_post_cache( $post->ID );
717
-
718
- $old_status = $post->post_status;
719
- $post->post_status = 'draft';
720
- wp_transition_post_status( 'draft', $old_status, $post );
721
-
722
- do_action( 'edit_post', $post->ID, $post );
723
- do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
724
- do_action( 'save_post', $post->ID, $post, true );
725
- do_action( 'wp_insert_post', $post->ID, $post, true );
726
- }
727
- }
728
- }
729
-
730
- /**
731
- * After the theme is switched, change the template on the home page if the theme supports home page functionality.
732
- */
733
- function update_home_on_theme_change() {
734
- $page_id = get_option( 'page_on_front' );
735
- if ( empty( $page_id ) ) {
736
- $page_id = get_option( 'siteorigin_panels_home_page_id' );
737
- }
738
-
739
- if ( siteorigin_panels_setting( 'home-page' ) && siteorigin_panels_setting( 'home-template' ) && $page_id && get_post_meta( $page_id, 'panels_data', true ) !== '' ) {
740
- // Lets update the home page to use the home template that this theme supports
741
- update_post_meta( $page_id, '_wp_page_template', siteorigin_panels_setting( 'home-template' ) );
742
- }
743
- }
744
-
745
- /**
746
- * @return array|mixed|void
747
- */
748
- function get_widgets() {
749
- global $wp_widget_factory;
750
- $widgets = array();
751
- foreach ( $wp_widget_factory->widgets as $widget_obj ) {
752
- $class = get_class( $widget_obj );
753
- $widgets[ $class ] = array(
754
- 'class' => $class,
755
- 'title' => ! empty( $widget_obj->name ) ? $widget_obj->name : __( 'Untitled Widget', 'siteorigin-panels' ),
756
- 'description' => ! empty( $widget_obj->widget_options['description'] ) ? $widget_obj->widget_options['description'] : '',
757
- 'installed' => true,
758
- 'groups' => array(),
759
- );
760
-
761
- // Get Page Builder specific widget options
762
- if ( isset( $widget_obj->widget_options['panels_title'] ) ) {
763
- $widgets[ $class ]['panels_title'] = $widget_obj->widget_options['panels_title'];
764
- }
765
- if ( isset( $widget_obj->widget_options['panels_groups'] ) ) {
766
- $widgets[ $class ]['groups'] = $widget_obj->widget_options['panels_groups'];
767
- }
768
- if ( isset( $widget_obj->widget_options['panels_icon'] ) ) {
769
- $widgets[ $class ]['icon'] = $widget_obj->widget_options['panels_icon'];
770
- }
771
-
772
- }
773
-
774
- // Other plugins can manipulate the list of widgets. Possibly to add recommended widgets
775
- $widgets = apply_filters( 'siteorigin_panels_widgets', $widgets );
776
-
777
- // Exclude these temporarily, as they won't work until we have a reliable way to enqueue their admin form scripts.
778
- $to_exclude = array(
779
- 'Jetpack_Gallery_Widget',
780
- 'WPCOM_Widget_GooglePlus_Badge',
781
- 'Jetpack_Widget_Social_Icons',
782
- 'Jetpack_Twitter_Timeline_Widget'
783
- );
784
-
785
- foreach ( $to_exclude as $widget_class ) {
786
- if ( in_array( $widget_class, $widgets ) ) {
787
- unset( $widgets[ $widget_class ] );
788
- }
789
- }
790
-
791
- // Sort the widgets alphabetically
792
- uasort( $widgets, array( $this, 'widgets_sorter' ) );
793
-
794
- return $widgets;
795
- }
796
-
797
- /**
798
- * Sorts widgets for get_widgets function by title
799
- *
800
- * @param $a
801
- * @param $b
802
- *
803
- * @return int
804
- */
805
- function widgets_sorter( $a, $b ) {
806
- if ( empty( $a['title'] ) ) {
807
- return - 1;
808
- }
809
- if ( empty( $b['title'] ) ) {
810
- return 1;
811
- }
812
-
813
- return $a['title'] > $b['title'] ? 1 : - 1;
814
- }
815
-
816
- /**
817
- * Process raw widgets that have come from the Page Builder front end.
818
- *
819
- * @param array $widgets An array of widgets from panels_data.
820
- * @param array $old_widgets
821
- * @param bool $escape_classes Should the class names be escaped.
822
- * @param bool $force
823
- *
824
- * @return array
825
- */
826
- function process_raw_widgets( $widgets, $old_widgets = array(), $escape_classes = false, $force = false ) {
827
- if ( empty( $widgets ) || ! is_array( $widgets ) ) {
828
- return array();
829
- }
830
-
831
- $old_widgets_by_id = array();
832
- if( ! empty( $old_widgets ) ) {
833
- foreach( $old_widgets as $widget ) {
834
- if( ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) ) {
835
- $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] = $widget;
836
- unset( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ][ 'panels_info' ] );
837
- }
838
- }
839
- }
840
-
841
- foreach( $widgets as $i => & $widget ) {
842
- if ( ! is_array( $widget ) ) {
843
- continue;
844
- }
845
-
846
- if ( is_array( $widget ) ) {
847
- $info = (array) ( is_array( $widget['panels_info'] ) ? $widget['panels_info'] : $widget['info'] );
848
- } else {
849
- $info = array();
850
- }
851
- unset( $widget['info'] );
852
-
853
- $info[ 'class' ] = apply_filters( 'siteorigin_panels_widget_class', $info[ 'class' ] );
854
-
855
- if ( ! empty( $info['raw'] ) || $force ) {
856
- $the_widget = SiteOrigin_Panels::get_widget_instance( $info['class'] );
857
- if ( ! empty( $the_widget ) &&
858
- method_exists( $the_widget, 'update' ) ) {
859
-
860
- if(
861
- ! empty( $old_widgets_by_id ) &&
862
- ! empty( $widget[ 'panels_info' ][ 'widget_id' ] ) &&
863
- ! empty( $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ] )
864
- ){
865
- $old_widget = $old_widgets_by_id[ $widget[ 'panels_info' ][ 'widget_id' ] ];
866
- }
867
- else {
868
- $old_widget = $widget;
869
- }
870
-
871
- /** @var WP_Widget $the_widget */
872
- $the_widget = SiteOrigin_Panels::get_widget_instance( $info['class'] );
873
- $instance = $the_widget->update( $widget, $old_widget );
874
- $instance = apply_filters( 'widget_update_callback', $instance, $widget, $old_widget, $the_widget );
875
-
876
- $widget = $instance;
877
-
878
- unset( $info['raw'] );
879
- }
880
- }
881
-
882
- if( $escape_classes ) {
883
- // Escaping for namespaced widgets
884
- $info[ 'class' ] = preg_replace( '/\\\\+/', '\\\\\\\\', $info['class'] );
885
- }
886
-
887
- $widget['panels_info'] = $info;
888
- }
889
-
890
- return $widgets;
891
- }
892
-
893
- /**
894
- * Add all the footer JS templates.
895
- */
896
- function js_templates() {
897
- include plugin_dir_path( __FILE__ ) . '../tpl/js-templates.php';
898
- }
899
-
900
- /**
901
- * Render a widget form with all the Page Builder specific fields
902
- *
903
- * @param string $widget_class The class of the widget
904
- * @param array $instance Widget values
905
- * @param bool $raw
906
- * @param string $widget_number
907
- *
908
- * @return mixed|string The form
909
- */
910
- function render_form( $widget_class, $instance = array(), $raw = false, $widget_number = '{$id}' ) {
911
-
912
- $the_widget = SiteOrigin_Panels::get_widget_instance( $widget_class );
913
- // This is a chance for plugins to replace missing widgets
914
- $the_widget = apply_filters( 'siteorigin_panels_widget_object', $the_widget, $widget_class );
915
-
916
- if ( empty( $the_widget ) || ! is_a( $the_widget, 'WP_Widget' ) ) {
917
- $widgets = $this->get_widgets();
918
-
919
- if ( ! empty( $widgets[ $widget_class ] ) && ! empty( $widgets[ $widget_class ]['plugin'] ) ) {
920
- // We know about this widget, show a form about installing it.
921
- $install_url = siteorigin_panels_plugin_activation_install_url( $widgets[ $widget_class ]['plugin']['slug'], $widgets[ $widget_class ]['plugin']['name'] );
922
- $form =
923
- '<div class="panels-missing-widget-form">' .
924
- '<p>' .
925
- preg_replace(
926
- array(
927
- '/1\{ *(.*?) *\}/',
928
- '/2\{ *(.*?) *\}/',
929
- ),
930
- array(
931
- '<a href="' . $install_url . '" target="_blank" rel="noopener noreferrer">$1</a>',
932
- '<strong>$1</strong>'
933
- ),
934
- sprintf(
935
- __( 'You need to install 1{%1$s} to use the widget 2{%2$s}.', 'siteorigin-panels' ),
936
- $widgets[ $widget_class ]['plugin']['name'],
937
- $widget_class
938
- )
939
- ) .
940
- '</p>' .
941
- '<p>' . __( "Save and reload this page to start using the widget after you've installed it.", 'siteorigin-panels' ) . '</p>' .
942
- '</div>';
943
- } else {
944
- // This widget is missing, so show a missing widgets form.
945
- $form =
946
- '<div class="panels-missing-widget-form"><p>' .
947
- preg_replace(
948
- array(
949
- '/1\{ *(.*?) *\}/',
950
- '/2\{ *(.*?) *\}/',
951
- ),
952
- array(
953
- '<strong>$1</strong>',
954
- '<a href="https://siteorigin.com/thread/" target="_blank" rel="noopener noreferrer">$1</a>'
955
- ),
956
- sprintf(
957
- __( 'The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help.', 'siteorigin-panels' ),
958
- esc_html( $widget_class )
959
- )
960
- ) .
961
- '</p></div>';
962
- }
963
-
964
- // Allow other themes and plugins to change the missing widget form
965
- return apply_filters( 'siteorigin_panels_missing_widget_form', $form, $widget_class, $instance );
966
- }
967
-
968
- if ( $raw ) {
969
- $instance = $the_widget->update( $instance, $instance );
970
- }
971
-
972
- $the_widget->id = 'temp';
973
- $the_widget->number = $widget_number;
974
-
975
- ob_start();
976
- if ( $this->is_core_js_widget( $the_widget ) ) {
977
- ?><div class="widget-content"><?php
978
- }
979
- $return = $the_widget->form( $instance );
980
- do_action_ref_array( 'in_widget_form', array( &$the_widget, &$return, $instance ) );
981
- if ( $this->is_core_js_widget( $the_widget ) ) {
982
- ?>
983
- </div>
984
- <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $the_widget->id_base ); ?>" />
985
- <?php
986
- }
987
- $form = ob_get_clean();
988
-
989
- // Convert the widget field naming into ones that Page Builder uses
990
- $exp = preg_quote( $the_widget->get_field_name( '____' ) );
991
- $exp = str_replace( '____', '(.*?)', $exp );
992
- $form = preg_replace( '/' . $exp . '/', 'widgets[' . preg_replace( '/\$(\d)/', '\\\$$1', $widget_number ) . '][$1]', $form );
993
-
994
- $form = apply_filters( 'siteorigin_panels_widget_form', $form, $widget_class, $instance );
995
-
996
- // Add all the information fields
997
- return $form;
998
- }
999
-
1000
- /**
1001
- * Checks whether a widget is considered to be a JS widget. I.e. it needs to have scripts and/or styles enqueued for
1002
- * it's admin form to work.
1003
- *
1004
- * Can remove the whitelist of core widgets when all widgets are following a similar pattern.
1005
- *
1006
- * @param $widget The widget to be tested.
1007
- *
1008
- * @return bool Whether or not the widget is considered a JS widget.
1009
- */
1010
- function is_core_js_widget( $widget ) {
1011
- $js_widgets = array(
1012
- 'WP_Widget_Custom_HTML',
1013
- 'WP_Widget_Media_Audio',
1014
- 'WP_Widget_Media_Gallery',
1015
- 'WP_Widget_Media_Image',
1016
- 'WP_Widget_Media_Video',
1017
- 'WP_Widget_Text',
1018
- );
1019
-
1020
- $is_js_widget = in_array( get_class( $widget ), $js_widgets ) &&
1021
- // Need to check this for `WP_Widget_Text` which was not a JS widget before 4.8
1022
- method_exists( $widget, 'render_control_template_scripts' );
1023
-
1024
- return $is_js_widget;
1025
- }
1026
-
1027
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1028
- // ADMIN AJAX ACTIONS
1029
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1030
-
1031
- /**
1032
- * Get builder content based on the submitted panels_data.
1033
- */
1034
- function action_builder_content() {
1035
- header( 'content-type: text/html' );
1036
-
1037
- if ( ! current_user_can( 'edit_post', $_POST['post_id'] ) ) {
1038
- wp_die();
1039
- }
1040
-
1041
- if ( empty( $_POST['post_id'] ) || empty( $_POST['panels_data'] ) ) {
1042
- echo '';
1043
- wp_die();
1044
- }
1045
-
1046
- // echo the content
1047
- $old_panels_data = get_post_meta( $_POST['post_id'], 'panels_data', true );
1048
- $panels_data = json_decode( wp_unslash( $_POST['panels_data'] ), true );
1049
- $panels_data['widgets'] = $this->process_raw_widgets(
1050
- $panels_data['widgets'],
1051
- ! empty( $old_panels_data['widgets'] ) ? $old_panels_data['widgets'] : false,
1052
- false
1053
- );
1054
- $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1055
-
1056
- // Create a version of the builder data for post content
1057
- SiteOrigin_Panels_Post_Content_Filters::add_filters();
1058
- $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] = true;
1059
- echo SiteOrigin_Panels::renderer()->render( intval( $_POST['post_id'] ), false, $panels_data );
1060
- SiteOrigin_Panels_Post_Content_Filters::remove_filters();
1061
- unset( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] );
1062
-
1063
- wp_die();
1064
- }
1065
-
1066
- /**
1067
- * Display a widget form with the provided data
1068
- */
1069
- function action_widget_form() {
1070
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
1071
- wp_die(
1072
- __( 'The supplied nonce is invalid.', 'siteorigin-panels' ),
1073
- __( 'Invalid nonce.', 'siteorigin-panels' ),
1074
- 403
1075
- );
1076
- }
1077
- if ( empty( $_REQUEST['widget'] ) ) {
1078
- wp_die(
1079
- __( 'Please specify the type of widget form to be rendered.', 'siteorigin-panels' ),
1080
- __( 'Missing widget type.', 'siteorigin-panels' ),
1081
- 400
1082
- );
1083
- }
1084
-
1085
- $request = array_map( 'stripslashes_deep', $_REQUEST );
1086
-
1087
- $widget_class = $request['widget'];
1088
- $widget_class = apply_filters( 'siteorigin_panels_widget_class', $widget_class );
1089
- $instance = ! empty( $request['instance'] ) ? json_decode( $request['instance'], true ) : array();
1090
-
1091
- $form = $this->render_form( $widget_class, $instance, $_REQUEST['raw'] == 'true' );
1092
- $form = apply_filters( 'siteorigin_panels_ajax_widget_form', $form, $widget_class, $instance );
1093
-
1094
- echo $form;
1095
- wp_die();
1096
- }
1097
-
1098
- /**
1099
- * Preview in the live editor when there is no public view of the item
1100
- */
1101
- function action_live_editor_preview() {
1102
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'live-editor-preview' ) ) {
1103
- wp_die();
1104
- }
1105
-
1106
- include plugin_dir_path( __FILE__ ) . '../tpl/live-editor-preview.php';
1107
-
1108
- exit();
1109
- }
1110
-
1111
- /**
1112
- * Preview in the block editor.
1113
- */
1114
- public function block_editor_preview() {
1115
-
1116
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'block-editor-preview' ) ) {
1117
- wp_die();
1118
- }
1119
-
1120
- $panels_data = json_decode( wp_unslash( $_POST['panelsData'] ), true );
1121
- $builder_id = 'gbp' . uniqid();
1122
- $panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], false, true, true );
1123
- $panels_data = SiteOrigin_Panels_Styles_Admin::single()->sanitize_all( $panels_data );
1124
- $sowb_active = class_exists( 'SiteOrigin_Widgets_Bundle' );
1125
- if ( $sowb_active ) {
1126
- // We need this to get our widgets bundle to add it's styles inline for previews.
1127
- add_filter( 'siteorigin_widgets_is_preview', '__return_true' );
1128
- }
1129
- $rendered_layout = SiteOrigin_Panels::renderer()->render( $builder_id, true, $panels_data, $layout_data, true );
1130
-
1131
- // Need to explicitly call `siteorigin_widget_print_styles` because Gutenberg previews don't render a full version of the front end,
1132
- // so neither the `wp_head` nor the `wp_footer` actions are called, which usually trigger `siteorigin_widget_print_styles`.
1133
- if ( $sowb_active ) {
1134
- ob_start();
1135
- siteorigin_widget_print_styles();
1136
- $rendered_layout .= ob_get_clean();
1137
- }
1138
-
1139
- echo $rendered_layout;
1140
- wp_die();
1141
- }
1142
-
1143
- /**
1144
- * Add a column that indicates if a column is powered by Page Builder
1145
- *
1146
- * @param $columns
1147
- *
1148
- * @return array
1149
- */
1150
- function add_custom_column( $columns ){
1151
- $index = array_search( 'comments', array_keys( $columns ) );
1152
-
1153
- if( empty( $index ) ) {
1154
- $columns = array_merge(
1155
- $columns,
1156
- array( 'panels' => __( 'Page Builder', 'siteorigin-panels' ) )
1157
- );
1158
- }
1159
- else {
1160
- $columns = array_slice( $columns, 0, $index, true ) +
1161
- array( 'panels' => __( 'Page Builder', 'siteorigin-panels' ) ) +
1162
- array_slice( $columns, $index, count( $columns ) - 1, true );
1163
- }
1164
-
1165
- return $columns;
1166
- }
1167
-
1168
- function display_custom_column( $column, $post_id ){
1169
- if( $column != 'panels' ) return;
1170
-
1171
- $panels_data = get_post_meta( $post_id, 'panels_data', true );
1172
- if( ! empty( $panels_data['widgets'] ) ) {
1173
- $widgets_count = count( $panels_data['widgets'] );
1174
- printf( _n( '%s Widget', '%s Widgets', $widgets_count, 'siteorigin-panels' ), $widgets_count );
1175
- }
1176
- else {
1177
- echo '—';
1178
- }
1179
- }
1180
-
1181
- public function footer_column_css(){
1182
- if( siteorigin_panels_setting( 'admin-widget-count' ) ) {
1183
- $screen = get_current_screen();
1184
- $post_types = siteorigin_panels_setting( 'post-types' );
1185
-
1186
- if(
1187
- $screen->base == 'edit' &&
1188
- is_array( $post_types ) &&
1189
- in_array( $screen->post_type, $post_types )
1190
- ){
1191
- ?><style type="text/css">.column-panels{ width: 10% }</style><?php
1192
- }
1193
- }
1194
- }
1195
-
1196
- /**
1197
- * Add double slashes to strings
1198
- *
1199
- * @param $value
1200
- *
1201
- * @return string
1202
- */
1203
- public static function double_slash_string( $value ){
1204
- return is_string( $value ) ? addcslashes( $value, '\\' ) : $value;
1205
- }
1206
-
1207
- public function get_layout_directories(){
1208
-
1209
- }
1210
-
1211
- /**
1212
- * Display links for various SiteOrigin addons
1213
- */
1214
- public static function display_footer_premium_link(){
1215
- $links = array(
1216
- array(
1217
- 'text' => __('Get a lightbox addon for SiteOrigin widgets', 'siteorigin-panels'),
1218
- 'url' => SiteOrigin_Panels::premium_url('plugin/lightbox')
1219
- ),
1220
- array(
1221
- 'text' => __('Get the row, cell and widget animations addon', 'siteorigin-panels'),
1222
- 'url' => SiteOrigin_Panels::premium_url('plugin/lightbox')
1223
- ),
1224
- array(
1225
- 'text' => __('Get premium email support for SiteOrigin Page Builder', 'siteorigin-panels'),
1226
- 'url' => SiteOrigin_Panels::premium_url()
1227
- ),
1228
- );
1229
- $link = $links[array_rand($links)];
1230
-
1231
- ?>
1232
- <a href="<?php echo esc_url( $link['url'] ) ?>" target="_blank" rel='noopener noreferrer'>
1233
- <?php echo esc_html( $link['text'] ) ?>.
1234
- </a>
1235
- <?php
1236
- }
1237
-
1238
- public function admin_notices() {
1239
- global $typenow, $pagenow;
1240
- $is_new = $pagenow == 'post-new.php';
1241
- $post_types = siteorigin_panels_setting( 'post-types' );
1242
- $is_panels_type = in_array( $typenow, $post_types );
1243
- $use_classic = siteorigin_panels_setting( 'use-classic' );
1244
-
1245
- if ( $is_new && $is_panels_type && $use_classic ) {
1246
- $settings_url = self_admin_url( 'options-general.php?page=siteorigin_panels' );
1247
- $notice = sprintf(
1248
- __( 'This post type is set to use the Classic Editor by default for new posts. If you’d like to change this to the block editor, please go to <a href="%s" class="components-notice__action is-link">Page Builder Settings</a> and uncheck <strong>Use Classic Editor for new posts</strong>' ),
1249
- $settings_url
1250
- );
1251
- ?>
1252
- <div id="siteorigin-panels-use-classic-notice" class="notice notice-info"><p id="use-classic-notice"><?php echo $notice ?></p></div>
1253
- <?php
1254
- }
1255
- }
1256
-
1257
- /**
1258
- * Show Classic Editor for existing PB posts.
1259
- *
1260
- * @param $use_block_editor
1261
- * @param $post_type
1262
- *
1263
- * @return bool
1264
- */
1265
- public function show_classic_editor_for_panels( $use_block_editor, $post_type ) {
1266
-
1267
- // For new pages.
1268
- if ( isset( $_GET['block-editor'] ) ) {
1269
- return $use_block_editor;
1270
- } else if ( isset( $_GET['siteorigin-page-builder'] ) ) {
1271
- return false;
1272
- }
1273
-
1274
- // If the `$post_type` is set to be used by Page Builder.
1275
- $post_types = siteorigin_panels_setting( 'post-types' );
1276
- $is_panels_type = in_array( $post_type, $post_types );
1277
- $use_classic = siteorigin_panels_setting( 'use-classic' );
1278
- // For existing posts.
1279
- global $post;
1280
- if ( ! empty( $post ) ) {
1281
- // If the post has blocks just allow `$use_block_editor` to decide.
1282
- if ( ! has_blocks( $post ) ) {
1283
- $panels_data = get_post_meta( $post->ID, 'panels_data', true );
1284
- global $pagenow;
1285
- $is_new = $pagenow == 'post-new.php';
1286
- if ( ! empty( $panels_data ) || ( $use_classic && $is_new && $is_panels_type ) ) {
1287
- $use_block_editor = false;
1288
- }
1289
- }
1290
- } else if ( $is_panels_type ) {
1291
- $use_block_editor = false;
1292
- }
1293
-
1294
- return $use_block_editor;
1295
- }
1296
-
1297
- /**
1298
- * This was copied from Gutenberg and slightly modified as a quick way to allow users to create new Page Builder pages
1299
- * in the classic editor without requiring the classic editor plugin be installed.
1300
- */
1301
- function add_panels_add_new_button() {
1302
- global $typenow;
1303
-
1304
- if ( 'wp_block' === $typenow ) {
1305
- ?>
1306
- <style type="text/css">
1307
- .page-title-action {
1308
- display: none;
1309
- }
1310
- </style>
1311
- <?php
1312
- }
1313
-
1314
- if ( ! $this->show_add_new_dropdown_for_type( $typenow ) ) {
1315
- return;
1316
- }
1317
-
1318
- ?>
1319
- <style type="text/css">
1320
- .split-page-title-action {
1321
- display: inline-block;
1322
- }
1323
-
1324
- .split-page-title-action a,
1325
- .split-page-title-action a:active,
1326
- .split-page-title-action .expander:after {
1327
- padding: 6px 10px;
1328
- position: relative;
1329
- top: -3px;
1330
- text-decoration: none;
1331
- border: 1px solid #ccc;
1332
- border-radius: 2px 0px 0px 2px;
1333
- background: #f7f7f7;
1334
- text-shadow: none;
1335
- font-weight: 600;
1336
- font-size: 13px;
1337
- line-height: normal; /* IE8-IE11 need this for buttons */
1338
- color: #0073aa; /* some of these controls are button elements and don't inherit from links */
1339
- cursor: pointer;
1340
- outline: 0;
1341
- }
1342
-
1343
- .split-page-title-action a:hover,
1344
- .split-page-title-action .expander:hover:after {
1345
- border-color: #008EC2;
1346
- background: #00a0d2;
1347
- color: #fff;
1348
- }
1349
-
1350
- .split-page-title-action a:focus,
1351
- .split-page-title-action .expander:focus:after {
1352
- border-color: #5b9dd9;
1353
- box-shadow: 0 0 2px rgba( 30, 140, 190, 0.8 );
1354
- }
1355
-
1356
- .split-page-title-action .expander:after {
1357
- content: "\f140";
1358
- font: 400 20px/.5 dashicons;
1359
- speak: none;
1360
- top: 0px;
1361
- <?php if ( is_rtl() ) : ?>
1362
- right: -1px;
1363
- <?php else : ?>
1364
- left: -1px;
1365
- <?php endif; ?>
1366
- position: relative;
1367
- vertical-align: top;
1368
- text-decoration: none !important;
1369
- padding: 4px 5px 5px 4px;
1370
- border-radius: 0px 2px 2px 0px;
1371
- }
1372
-
1373
- .split-page-title-action .dropdown {
1374
- display: none;
1375
- }
1376
-
1377
- .split-page-title-action .dropdown.visible {
1378
- display: block;
1379
- position: absolute;
1380
- margin-top: 3px;
1381
- z-index: 1;
1382
- }
1383
-
1384
- .split-page-title-action .dropdown.visible a {
1385
- display: block;
1386
- top: 0;
1387
- margin: -1px 0;
1388
- <?php if ( is_rtl() ) : ?>
1389
- padding-left: 9px;
1390
- <?php else : ?>
1391
- padding-right: 9px;
1392
- <?php endif; ?>
1393
- }
1394
-
1395
- .split-page-title-action .expander {
1396
- outline: none;
1397
- }
1398
-
1399
- </style>
1400
- <script type="text/javascript">
1401
- document.addEventListener( 'DOMContentLoaded', function() {
1402
- var buttons = document.getElementsByClassName( 'page-title-action' ),
1403
- button = buttons.item( 0 );
1404
-
1405
- if ( ! button ) {
1406
- return;
1407
- }
1408
-
1409
- var url = button.href;
1410
- var urlHasParams = ( -1 !== url.indexOf( '?' ) );
1411
- var panelsUrl = url + ( urlHasParams ? '&' : '?' ) + 'siteorigin-page-builder';
1412
- var blockEditorUrl = url + ( urlHasParams ? '&' : '?' ) + 'block-editor';
1413
-
1414
- var newbutton = '<span id="split-page-title-action" class="split-page-title-action">';
1415
- newbutton += '<a href="' + url + '">' + button.innerText + '</a>';
1416
- newbutton += '<span class="expander" tabindex="0" role="button" aria-haspopup="true" aria-label="<?php echo esc_attr( __( 'Toggle editor selection menu', 'siteorigin-panels' ) ); ?>"></span>';
1417
- newbutton += '<span class="dropdown"><a href="' + panelsUrl + '"><?php echo esc_html( __( 'SiteOrigin Page Builder', 'siteorigin-panels' ) ); ?></a>';
1418
- newbutton += '<a href="' + blockEditorUrl + '"><?php echo esc_html( __( 'Block Editor', 'siteorigin-panels' ) ); ?></a></span></span><span class="page-title-action" style="display:none;"></span>';
1419
-
1420
- button.insertAdjacentHTML( 'afterend', newbutton );
1421
- button.parentNode.removeChild( button );
1422
-
1423
- var expander = document.getElementById( 'split-page-title-action' ).getElementsByClassName( 'expander' ).item( 0 );
1424
- var dropdown = expander.parentNode.querySelector( '.dropdown' );
1425
- function toggleDropdown() {
1426
- dropdown.classList.toggle( 'visible' );
1427
- }
1428
- expander.addEventListener( 'click', function( e ) {
1429
- e.preventDefault();
1430
- toggleDropdown();
1431
- } );
1432
- expander.addEventListener( 'keydown', function( e ) {
1433
- if ( 13 === e.which || 32 === e.which ) {
1434
- e.preventDefault();
1435
- toggleDropdown();
1436
- }
1437
- } );
1438
- } );
1439
- </script>
1440
- <?php
1441
- }
1442
-
1443
- private function show_add_new_dropdown_for_type( $post_type ) {
1444
-
1445
- $show = in_array( $post_type, siteorigin_panels_setting( 'post-types' ) );
1446
-
1447
- // WooCommerce product type doesn't support block editor...
1448
- $show = $show && ! ( class_exists( 'WooCommerce' ) && $post_type == 'product' );
1449
-
1450
- if ( class_exists( 'SiteOrigin_Premium_Plugin_Cpt_Builder' ) ) {
1451
- $show = $show && $post_type != SiteOrigin_Premium_Plugin_Cpt_Builder::POST_TYPE;
1452
- $cpt_builder = SiteOrigin_Premium_Plugin_Cpt_Builder::single();
1453
- $so_custom_types = $cpt_builder->get_post_types();
1454
- $show = $show && ! isset( $so_custom_types[ $post_type ] );
1455
- }
1456
-
1457
- return $show;
1458
- }
1459
-
1460
- public function add_panels_post_state( $post_states, $post ) {
1461
- $panels_data = get_post_meta( $post->ID, 'panels_data', true );
1462
-
1463
- if ( ! empty( $panels_data ) ) {
1464
- $post_states[] = __( 'SiteOrigin Page Builder', 'siteorigin-panels' );
1465
- }
1466
-
1467
- return $post_states;
1468
- }
1469
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/cache-renderer.php DELETED
@@ -1,37 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Cache_Renderer {
4
-
5
- function __construct() {
6
- // Clear cache when the Page Builder version changes
7
- add_action( 'siteorigin_panels_version_changed', array( $this, 'clear_cache' ), 10, 0 );
8
-
9
- // When we activate/deactivate a plugin or switch themes that might change rendering
10
- add_action( 'activated_plugin', array( $this, 'clear_cache' ), 10, 0 );
11
- add_action( 'deactivated_plugin', array( $this, 'clear_cache' ), 10, 0 );
12
- add_action( 'switch_theme', array( $this, 'clear_cache' ), 10, 0 );
13
-
14
- // When settings are saved, this is also a good way to force a cache refresh
15
- add_action( 'siteorigin_panels_save_settings', array( $this, 'clear_cache' ), 10, 0 );
16
-
17
- // When a single post is saved
18
- add_action( 'save_post', array( $this, 'clear_cache' ), 10, 2 );
19
- }
20
-
21
- /**
22
- * @return SiteOrigin_Panels_Cache_Renderer
23
- */
24
- static function single() {
25
- static $single;
26
- return empty( $single ) ? $single = new self() : $single;
27
- }
28
-
29
- /**
30
- * Clear post meta cache.
31
- *
32
- * Keep this around for a bit in attempt to delete any existing caches.
33
- */
34
- public function clear_cache(){
35
- delete_post_meta_by_key( 'siteorigin_panels_cache' );
36
- }
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/css-builder.php DELETED
@@ -1,242 +0,0 @@
1
- <?php
2
-
3
-
4
- /**
5
- * Class SiteOrigin_Panels_Css_Builder
6
- *
7
- * Use for building CSS for a page.
8
- */
9
- class SiteOrigin_Panels_Css_Builder {
10
-
11
- private $css;
12
-
13
- function __construct() {
14
- $this->css = array();
15
- }
16
-
17
- /**
18
- * Add some general CSS.
19
- *
20
- * @param string $selector
21
- * @param array $attributes
22
- * @param int $resolution The pixel resolution that this applies to
23
- */
24
- public function add_css( $selector, $attributes, $resolution = 1920 ) {
25
- $attribute_string = array();
26
- foreach ( $attributes as $k => $v ) {
27
-
28
- if( is_array( $v ) ) {
29
- for( $i = 0; $i < count( $v ); $i++ ) {
30
- if ( ! strlen( (string) $v[ $i ] ) ) continue;
31
- $attribute_string[] = esc_html( $k ) . ':' . esc_html( $v[ $i ] );
32
- }
33
- }
34
- else {
35
- if ( ! strlen( (string) $v ) ) continue;
36
- $attribute_string[] = esc_html( $k ) . ':' . esc_html( $v );
37
- }
38
- }
39
- $attribute_string = implode( ';', $attribute_string );
40
-
41
- // Add everything we need to the CSS selector
42
- if ( empty( $this->css[ $resolution ] ) ) {
43
- $this->css[ $resolution ] = array();
44
- }
45
- if ( empty( $this->css[ $resolution ][ $attribute_string ] ) ) {
46
- $this->css[ $resolution ][ $attribute_string ] = array();
47
- }
48
- $this->css[ $resolution ][ $attribute_string ][] = $selector;
49
- }
50
-
51
- /**
52
- * Add CSS that applies to a row or group of rows.
53
- *
54
- * @param int $li The layout ID. If false, then the CSS applies to all layouts.
55
- * @param int|bool|string $ri The row index. If false, then the CSS applies to all rows.
56
- * @param string $sub_selector A sub selector if we need one.
57
- * @param array $attributes An array of attributes.
58
- * @param int $resolution The pixel resolution that this applies to
59
- * @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
60
- */
61
- public function add_row_css( $li, $ri = false, $sub_selector = '', $attributes = array(), $resolution = 1920, $specify_layout = false ) {
62
- $selector = array();
63
-
64
- // Special case of `> .panel-row-style` sub_selector
65
- if ( $ri === false ) {
66
- // This applies to all rows
67
- $selector[] = '#pl-' . $li;
68
- $selector[] = '.panel-grid';
69
- } else {
70
- // This applies to a specific row
71
- if ( $specify_layout ) {
72
- $selector[] = '#pl-' . $li;
73
- }
74
- if ( is_string( $ri ) ) {
75
- $selector[] = '#' . $ri;
76
- } else {
77
- $selector[] = '#pg-' . $li . '-' . $ri;
78
- }
79
- }
80
-
81
- $selector = implode( ' ', $selector );
82
- $selector = $this->add_sub_selector( $selector, $sub_selector );
83
-
84
- // Add this to the CSS array
85
- $this->add_css( $selector, $attributes, $resolution );
86
- }
87
-
88
- /**
89
- * Add cell specific CSS
90
- *
91
- * @param int $li The layout ID. If false, then the CSS applies to all layouts.
92
- * @param int|bool $ri The row index. If false, then the CSS applies to all rows.
93
- * @param int|bool $ci The cell index. If false, then the CSS applies to all rows.
94
- * @param string $sub_selector A sub selector if we need one.
95
- * @param array $attributes An array of attributes.
96
- * @param int $resolution The pixel resolution that this applies to
97
- * @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
98
- */
99
- public function add_cell_css( $li, $ri = false, $ci = false, $sub_selector = '', $attributes = array(), $resolution = 1920, $specify_layout = false ) {
100
- $selector = array();
101
-
102
- if ( $ri === false && $ci === false ) {
103
- // This applies to all cells in the layout
104
- $selector[] = '#pl-' . $li;
105
- $selector[] = '.panel-grid-cell';
106
- } elseif ( $ri !== false && $ci === false ) {
107
- // This applies to all cells in a row
108
- if ( $specify_layout ) {
109
- $selector[] = '#pl-' . $li;
110
- }
111
- $selector[] = is_string( $ri ) ? ( '#' . $ri ) : '#pg-' . $li . '-' . $ri;
112
- $selector[] = '.panel-grid-cell';
113
- } elseif ( $ri !== false && $ci !== false ) {
114
- // This applies to a specific cell
115
- if ( $specify_layout ) {
116
- $selector[] = '#pl-' . $li;
117
- }
118
- $selector[] = '#pgc-' . $li . '-' . $ri . '-' . $ci;
119
- }
120
-
121
- $selector = implode( ' ', $selector );
122
- $selector = $this->add_sub_selector( $selector, $sub_selector );
123
-
124
- // Add this to the CSS array
125
- $this->add_css( $selector, $attributes, $resolution );
126
- }
127
-
128
- /**
129
- * Add widget specific CSS
130
- *
131
- * @param int $li The layout ID. If false, then the CSS applies to all layouts.
132
- * @param int|bool $ri The row index. If false, then the CSS applies to all rows.
133
- * @param int|bool $ci The cell index. If false, then the CSS applies to all rows.
134
- * @param int|bool $wi The widget index. If false, then CSS applies to all widgets.
135
- * @param string $sub_selector A sub selector if we need one.
136
- * @param array $attributes An array of attributes.
137
- * @param int $resolution The pixel resolution that this applies to
138
- * @param bool $specify_layout Sometimes for CSS specificity, we need to include the layout ID.
139
- */
140
- public function add_widget_css( $li, $ri = false, $ci = false, $wi = false, $sub_selector, $attributes = array(), $resolution = 1920, $specify_layout = false ) {
141
- $selector = array();
142
-
143
- if ( $ri === false && $ci === false && $wi === false ) {
144
- // This applies to all widgets in the layout
145
- $selector[] = '#pl-' . $li;
146
- $selector[] = '.so-panel';
147
- } else if ( $ri !== false && $ci === false && $wi === false ) {
148
- // This applies to all widgets in a row
149
- if ( $specify_layout ) {
150
- $selector[] = '#pl-' . $li;
151
- }
152
- $selector[] = is_string( $ri ) ? ( '#' . $ri ) : '#pg-' . $li . '-' . $ri;
153
- $selector[] = '.so-panel';
154
- } else if ( $ri !== false && $ci !== false && $wi === false ) {
155
- if ( $specify_layout ) {
156
- $selector[] = '#pl-' . $li;
157
- }
158
- $selector[] = '#pgc-' . $li . '-' . $ri . '-' . $ci;
159
- $selector[] = '.so-panel';
160
- } else {
161
- // This applies to a specific widget
162
- if ( $specify_layout ) {
163
- $selector[] = '#pl-' . $li;
164
- }
165
- $selector[] = '#panel-' . $li . '-' . $ri . '-' . $ci . '-' . $wi;
166
- }
167
-
168
- $selector = implode( ' ', $selector );
169
- $selector = $this->add_sub_selector( $selector, $sub_selector );
170
-
171
- // Add this to the CSS array
172
- $this->add_css( $selector, $attributes, $resolution );
173
- }
174
-
175
- /**
176
- * Add a sub selector to the main selector
177
- *
178
- * @param string $selector
179
- * @param string|array $sub_selector
180
- *
181
- * @return string
182
- */
183
- private function add_sub_selector( $selector, $sub_selector ){
184
- $return = array();
185
-
186
- if( ! empty( $sub_selector ) ) {
187
- if( ! is_array( $sub_selector ) ) $sub_selector = array( $sub_selector );
188
-
189
- foreach( $sub_selector as $sub ) {
190
- $return[] = $selector . $sub;
191
- }
192
- }
193
- else {
194
- $return = array( $selector );
195
- }
196
-
197
- return implode( ', ', $return );
198
- }
199
-
200
- /**
201
- * Gets the CSS for this particular layout.
202
- */
203
- public function get_css() {
204
- // Build actual CSS from the array
205
- $css_text = '';
206
- krsort( $this->css );
207
- foreach ( $this->css as $res => $def ) {
208
- if( strpos( $res, ':' ) !== false ) {
209
- list( $max_res, $min_res ) = explode( ':', $res, 2 );
210
- }
211
- else {
212
- $min_res = false;
213
- $max_res = $res;
214
- }
215
-
216
- if ( empty( $def ) ) {
217
- continue;
218
- }
219
-
220
- if ( $max_res === '' && $min_res > 0 ) {
221
- $css_text .= '@media (min-width:' . intval( $min_res ) . 'px) {';
222
- } elseif ( $max_res < 1920 ) {
223
- $css_text .= '@media (max-width:' . intval( $max_res ) . 'px)';
224
- if ( ! empty( $min_res ) ) {
225
- $css_text .= ' and (min-width:' . intval( $min_res ) . 'px) ';
226
- }
227
- $css_text .= '{ ';
228
- }
229
-
230
- foreach ( $def as $property => $selector ) {
231
- $selector = array_unique( $selector );
232
- $css_text .= implode( ' , ', $selector ) . ' { ' . $property . ' } ';
233
- }
234
-
235
- if ( ( $max_res === '' && $min_res > 0 ) || $max_res < 1920 ) {
236
- $css_text .= ' } ';
237
- }
238
- }
239
-
240
- return $css_text;
241
- }
242
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/data/widgets-bundle.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
-
3
- // An array with all the SiteOrigin Widget Bundle widgets
4
- return array(
5
- 'SiteOrigin_Widget_Editor_Widget' => array(
6
- 'class' => 'SiteOrigin_Widget_Editor_Widget',
7
- 'title' => __('SiteOrigin Editor', 'siteorigin-panels'),
8
- 'description' => __('A rich text editor', 'siteorigin-panels'),
9
- 'installed' => false,
10
- 'plugin' => array(
11
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
12
- 'slug' => 'so-widgets-bundle'
13
- ),
14
- 'groups' => array('so-widgets-bundle'),
15
- ),
16
-
17
- 'SiteOrigin_Widget_Button_Widget' => array(
18
- 'class' => 'SiteOrigin_Widget_Button_Widget',
19
- 'title' => __('SiteOrigin Button', 'siteorigin-panels'),
20
- 'description' => __('A simple button', 'siteorigin-panels'),
21
- 'installed' => false,
22
- 'plugin' => array(
23
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
24
- 'slug' => 'so-widgets-bundle'
25
- ),
26
- 'groups' => array('so-widgets-bundle'),
27
- ),
28
-
29
- 'SiteOrigin_Widget_Image_Widget' => array(
30
- 'class' => 'SiteOrigin_Widget_Image_Widget',
31
- 'title' => __('SiteOrigin Image', 'siteorigin-panels'),
32
- 'description' => __('Choose images from your media library.', 'siteorigin-panels'),
33
- 'installed' => false,
34
- 'plugin' => array(
35
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
36
- 'slug' => 'so-widgets-bundle'
37
- ),
38
- 'groups' => array('so-widgets-bundle'),
39
- ),
40
-
41
- 'SiteOrigin_Widget_Slider_Widget' => array(
42
- 'class' => 'SiteOrigin_Widget_Slider_Widget',
43
- 'title' => __('SiteOrigin Slider', 'siteorigin-panels'),
44
- 'description' => __('A basic slider widget.', 'siteorigin-panels'),
45
- 'installed' => false,
46
- 'plugin' => array(
47
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
48
- 'slug' => 'so-widgets-bundle'
49
- ),
50
- 'groups' => array('so-widgets-bundle'),
51
- ),
52
-
53
- 'SiteOrigin_Widget_Features_Widget' => array(
54
- 'class' => 'SiteOrigin_Widget_Features_Widget',
55
- 'title' => __('SiteOrigin Features', 'siteorigin-panels'),
56
- 'description' => __('Display site features as a collection of icons.', 'siteorigin-panels'),
57
- 'installed' => false,
58
- 'plugin' => array(
59
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
60
- 'slug' => 'so-widgets-bundle'
61
- ),
62
- 'groups' => array('so-widgets-bundle'),
63
- ),
64
-
65
- 'SiteOrigin_Widget_PostCarousel_Widget' => array(
66
- 'class' => 'SiteOrigin_Widget_PostCarousel_Widget',
67
- 'title' => __('SiteOrigin Post Carousel', 'siteorigin-panels'),
68
- 'description' => __('Display your posts as a carousel.', 'siteorigin-panels'),
69
- 'installed' => false,
70
- 'plugin' => array(
71
- 'name' => __('SiteOrigin Widgets Bundle', 'siteorigin-panels'),
72
- 'slug' => 'so-widgets-bundle'
73
- ),
74
- 'groups' => array('so-widgets-bundle'),
75
- ),
76
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/functions.php DELETED
@@ -1,106 +0,0 @@
1
- <?php
2
- /**
3
- * Contains several legacy and shorthand functions
4
- *
5
- * @since 3.0
6
- */
7
-
8
- /**
9
- * @return mixed|void Are we currently viewing the home page
10
- */
11
- function siteorigin_panels_is_home() {
12
- return SiteOrigin_Panels::is_home();
13
- }
14
-
15
- /**
16
- * Check if we're currently viewing a page builder page.
17
- *
18
- * @param bool $can_edit Also check if the user can edit this page
19
- *
20
- * @return bool
21
- */
22
- function siteorigin_panels_is_panel( $can_edit = false ) {
23
- return SiteOrigin_Panels::is_panel( $can_edit );
24
- }
25
-
26
-
27
- function siteorigin_panels_get_home_page_data() {
28
- return SiteOrigin_Panels::single()->get_home_page_data();
29
- }
30
-
31
- /**
32
- * Render Page Builder content
33
- *
34
- * @param bool $post_id
35
- * @param bool $enqueue_css
36
- * @param bool $panels_data
37
- *
38
- * @return string The HTML content.
39
- */
40
- function siteorigin_panels_render( $post_id = false, $enqueue_css = true, $panels_data = false ) {
41
- return SiteOrigin_Panels::renderer()->render( $post_id, $enqueue_css, $panels_data );
42
- }
43
-
44
- /**
45
- * Generate the CSS for the page layout.
46
- *
47
- * @param $post_id
48
- * @param $panels_data
49
- * @return string
50
- */
51
- function siteorigin_panels_generate_css($post_id, $panels_data = false){
52
- return SiteOrigin_Panels::renderer()->generate_css( $post_id, $panels_data );
53
- }
54
-
55
- /**
56
- * Legacy function to process raw widgets.
57
- *
58
- * @param $widgets
59
- * @param $old_widgets
60
- * @param $escape_classes
61
- *
62
- * @return array
63
- */
64
- function siteorigin_panels_process_raw_widgets( $widgets, $old_widgets = false, $escape_classes = false ) {
65
- return SiteOrigin_Panels_Admin::single()->process_raw_widgets( $widgets, $old_widgets, $escape_classes );
66
- }
67
-
68
- function siteorigin_panels_the_widget( $widget_info, $instance, $grid, $cell, $panel, $is_first, $is_last, $post_id = false, $style_wrapper = '' ) {
69
- SiteOrigin_Panels::renderer()->the_widget( $widget_info, $instance, $grid, $cell, $panel, $is_first, $is_last, $post_id, $style_wrapper );
70
- }
71
-
72
- /**
73
- * Get a setting with the given key.
74
- *
75
- * @param string $key
76
- *
77
- * @return array|bool|mixed|null
78
- */
79
- function siteorigin_panels_setting( $key = '' ) {
80
- return SiteOrigin_Panels_Settings::single()->get( $key );
81
- }
82
-
83
- function siteorigin_panels_plugin_activation_install_url( $plugin, $plugin_name, $source = false ) {
84
- return SiteOrigin_Panels_Admin_Widgets_Bundle::install_url( $plugin, $plugin_name, $source );
85
- }
86
-
87
- /**
88
- * A null function for compatibility with aTheme themes.
89
- *
90
- * @return bool
91
- */
92
- function siteorigin_panels_activate(){
93
- return false;
94
- }
95
-
96
-
97
- /**
98
- * Returns the base URL of our widget with `$path` appended.
99
- *
100
- * @param string $path Extra path to append to the end of the URL.
101
- *
102
- * @return string Base URL of the widget, with $path appended.
103
- */
104
- function siteorigin_panels_url( $path = '' ) {
105
- return plugins_url( 'siteorigin-panels/' . $path );
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/home.php DELETED
@@ -1,54 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Home {
4
-
5
- function __construct() {
6
- add_action( 'admin_menu', array( $this, 'admin_menu' ) );
7
- }
8
-
9
- public static function single() {
10
- static $single;
11
- return empty( $single ) ? $single = new self() : $single;
12
- }
13
-
14
- /**
15
- * Add items to the admin menu
16
- *
17
- * @action admin_menu
18
- */
19
- public function admin_menu() {
20
- if ( ! siteorigin_panels_setting( 'home-page' ) ) {
21
- return;
22
- }
23
-
24
- add_theme_page(
25
- __( 'Custom Home Page Builder', 'siteorigin-panels' ),
26
- __( 'Home Page', 'siteorigin-panels' ),
27
- 'edit_theme_options',
28
- 'so_panels_home_page',
29
- array( $this, 'render_home' )
30
- );
31
- }
32
-
33
- /**
34
- * Render the home page interface.
35
- */
36
- public function render_home() {
37
- // We need a global post for some features in Page Builder (eg history)
38
- global $post;
39
-
40
- $home_page_id = get_option( 'page_on_front' );
41
- if ( empty( $home_page_id ) ) {
42
- $home_page_id = get_option( 'siteorigin_panels_home_page_id' );
43
- }
44
-
45
- $home_page = get_post( $home_page_id );
46
- if ( ! empty( $home_page ) && get_post_meta( $home_page->ID, 'panels_data', true ) != '' ) {
47
- $post = $home_page;
48
- }
49
-
50
- $panels_data = SiteOrigin_Panels_Admin::single()->get_current_admin_panels_data();
51
- include plugin_dir_path( __FILE__ ) . '../tpl/admin-home-page.php';
52
- }
53
-
54
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/live-editor.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * The live editor class. Only loaded when in live editor mode.
5
- *
6
- * Class SiteOrigin_Panels_Live_Editor
7
- */
8
- class SiteOrigin_Panels_Live_Editor {
9
-
10
- function __construct() {
11
- add_action( 'template_redirect', array( $this, 'xss_headers' ) );
12
- add_action( 'get_post_metadata', array( $this, 'post_metadata' ), 10, 3 );
13
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_scripts' ) );
14
-
15
- // Don't display the admin bar when in live editor mode
16
- add_filter( 'show_admin_bar', '__return_false' );
17
- }
18
-
19
- public static function single() {
20
- static $single;
21
- return empty( $single ) ? $single = new self() : $single;
22
- }
23
-
24
- public function xss_headers(){
25
- global $post;
26
- if(
27
- ! empty( $_POST['live_editor_panels_data'] ) &&
28
- ! empty( $post->ID ) &&
29
- current_user_can( 'edit_post', $post->ID )
30
- ) {
31
- // Disable XSS protection when in the Live Editor
32
- header( 'X-XSS-Protection: 0' );
33
- }
34
- }
35
-
36
- /**
37
- * Edit the page builder data when we're viewing the live editor version
38
- *
39
- * @param $value
40
- * @param $post_id
41
- * @param $meta_key
42
- *
43
- * @return array
44
- */
45
- function post_metadata( $value, $post_id, $meta_key ) {
46
- if (
47
- $meta_key == 'panels_data' &&
48
- current_user_can( 'edit_post', $post_id ) &&
49
- ! empty( $_POST['live_editor_panels_data'] ) &&
50
- $_POST['live_editor_post_ID'] == $post_id
51
- ) {
52
- $data = json_decode( wp_unslash( $_POST['live_editor_panels_data'] ), true );
53
-
54
- if (
55
- ! empty( $data['widgets'] ) && (
56
- ! class_exists( 'SiteOrigin_Widget_Field_Class_Loader' ) ||
57
- method_exists( 'SiteOrigin_Widget_Field_Class_Loader', 'extend' )
58
- )
59
- ) {
60
- $data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $data['widgets'], false, false );
61
- }
62
-
63
- $value = array( $data );
64
- }
65
-
66
- return $value;
67
- }
68
-
69
-
70
- /**
71
- * Load the frontend scripts for the live editor
72
- */
73
- function frontend_scripts() {
74
- wp_enqueue_script(
75
- 'live-editor-front',
76
- siteorigin_panels_url( 'js/live-editor/live-editor-front' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
77
- array( 'jquery' ),
78
- SITEORIGIN_PANELS_VERSION
79
- );
80
-
81
- wp_enqueue_script(
82
- 'live-editor-scrollto',
83
- siteorigin_panels_url( 'js/live-editor/jquery.scrollTo' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
84
- array( 'jquery' ),
85
- SITEORIGIN_PANELS_VERSION
86
- );
87
-
88
- wp_enqueue_style(
89
- 'live-editor-front',
90
- siteorigin_panels_url( 'css/live-editor-front' . SITEORIGIN_PANELS_CSS_SUFFIX . '.css' ),
91
- array(),
92
- SITEORIGIN_PANELS_VERSION
93
- );
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/post-content-filters.php DELETED
@@ -1,89 +0,0 @@
1
- <?php
2
-
3
-
4
- /**
5
- * A class that handles generating the post content version of Page Builder content.
6
- *
7
- * Class SiteOrigin_Panels_Post_Content
8
- */
9
- class SiteOrigin_Panels_Post_Content_Filters {
10
-
11
- /**
12
- * Add filters that include data-* attributes on Page Builder divs
13
- */
14
- public static function add_filters(){
15
- add_filter( 'siteorigin_panels_row_attributes', 'SiteOrigin_Panels_Post_Content_Filters::row_attributes', 99, 2 );
16
- add_filter( 'siteorigin_panels_cell_attributes','SiteOrigin_Panels_Post_Content_Filters::cell_attributes', 99, 2 );
17
- add_filter( 'siteorigin_panels_widget_attributes', 'SiteOrigin_Panels_Post_Content_Filters::widget_attributes', 99, 2 );
18
- SiteOrigin_Panels_Widget_Shortcode::add_filters();
19
- }
20
-
21
- public static function remove_filters(){
22
- remove_filter( 'siteorigin_panels_row_attributes', 'SiteOrigin_Panels_Post_Content_Filters::row_attributes', 99, 2 );
23
- remove_filter( 'siteorigin_panels_cell_attributes','SiteOrigin_Panels_Post_Content_Filters::cell_attributes', 99, 2 );
24
- remove_filter( 'siteorigin_panels_widget_attributes', 'SiteOrigin_Panels_Post_Content_Filters::widget_attributes', 99, 2 );
25
- SiteOrigin_Panels_Widget_Shortcode::remove_filters();
26
- }
27
-
28
- /**
29
- * Add the row data attributes
30
- *
31
- * @param $attributes
32
- * @param $row
33
- *
34
- * @return mixed
35
- */
36
- public static function row_attributes( $attributes, $row ){
37
- if( ! empty( $row['style'] ) ) {
38
- $attributes[ 'data-style' ] = json_encode( $row['style'] );
39
- }
40
- if( ! empty( $row['ratio'] ) ) {
41
- $attributes[ 'data-ratio' ] = floatval( $row['ratio'] );
42
- }
43
- if( ! empty( $row['ratio_direction'] ) ) {
44
- $attributes[ 'data-ratio-direction' ] = $row['ratio_direction'];
45
- }
46
- if( ! empty( $row['color_label'] ) ) {
47
- $attributes[ 'data-color-label' ] = intval( $row['color_label'] );
48
- }
49
- if( ! empty( $row['label'] ) ) {
50
- $attributes[ 'data-label' ] = $row['label'];
51
- }
52
-
53
- return $attributes;
54
- }
55
-
56
- /**
57
- * @param $attributes
58
- * @param $cell
59
- *
60
- * @return mixed
61
- */
62
- public static function cell_attributes( $attributes, $cell ){
63
- if( ! empty( $cell['style'] ) ) {
64
- $attributes[ 'data-style' ] = json_encode( $cell['style'] );
65
- }
66
-
67
- $attributes[ 'data-weight' ] = $cell['weight'];
68
-
69
- return $attributes;
70
- }
71
-
72
- /**
73
- * @param $attributes
74
- * @param $widget
75
- *
76
- * @return mixed
77
- */
78
- public static function widget_attributes( $attributes, $widget ){
79
- if( ! empty( $widget['style'] ) ) {
80
- $attributes[ 'data-style' ] = json_encode( $widget['style'] );
81
- }
82
- if( ! empty( $widget['label'] ) ) {
83
- $attributes[ 'data-label' ] = $widget['label'];
84
- }
85
-
86
- return $attributes;
87
- }
88
-
89
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/renderer-legacy.php DELETED
@@ -1,168 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Renderer_Legacy extends SiteOrigin_Panels_Renderer {
4
-
5
- public static function single() {
6
- static $single;
7
- return empty( $single ) ? $single = new self() : $single;
8
- }
9
-
10
- /**
11
- * Generate the CSS for the page layout.
12
- *
13
- * @param $post_id
14
- * @param $panels_data
15
- * @param $layout_data
16
- *
17
- * @return string
18
- */
19
- public function generate_css( $post_id, $panels_data = false, $layout_data = false) {
20
- // Exit if we don't have panels data
21
- if ( empty( $panels_data ) ) {
22
- $panels_data = get_post_meta( $post_id, 'panels_data', true );
23
- if( empty( $panels_data ) ) {
24
- return '';
25
- }
26
- }
27
- if ( empty( $layout_data ) ) {
28
- $layout_data = $this->get_panels_layout_data( $panels_data );
29
- $layout_data = apply_filters( 'siteorigin_panels_layout_data', $layout_data, $post_id );
30
- }
31
-
32
- // Get some of the default settings
33
- $settings = siteorigin_panels_setting();
34
- $panels_tablet_width = $settings['tablet-width'];
35
- $panels_mobile_width = $settings['mobile-width'];
36
- $panels_margin_bottom = $settings['margin-bottom'];
37
- $panels_margin_bottom_last_row = $settings['margin-bottom-last-row'];
38
-
39
- $css = new SiteOrigin_Panels_Css_Builder();
40
-
41
- $ci = 0;
42
- foreach ( $layout_data as $ri => $row ) {
43
- if( empty( $row['cells'] ) ) continue;
44
-
45
- // Let other themes and plugins change the gutter.
46
- $gutter = apply_filters( 'siteorigin_panels_css_row_gutter', $settings['margin-sides'] . 'px', $row, $ri, $panels_data );
47
- preg_match( '/([0-9\.,]+)(.*)/', $gutter, $gutter_parts );
48
-
49
- $cell_count = count( $row['cells'] );
50
-
51
- // Add the cell sizing
52
- foreach( $row['cells'] as $ci => $cell ) {
53
- $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
54
-
55
- // Add the width and ensure we have correct formatting for CSS.
56
- $css->add_cell_css( $post_id, $ri, $ci, '', array(
57
- 'width' => round( $weight * 100, 4 ) . '%',
58
- ) );
59
- }
60
-
61
- if( ! empty( $row['style']['collapse_order'] ) && $row['style']['collapse_order'] == 'right-top') {
62
- $css->add_cell_css( $post_id, $ri, false, '', array(
63
- 'float' => 'right'
64
- ) );
65
- }
66
-
67
- if(
68
- $ri != count( $layout_data ) - 1 ||
69
- ! empty( $row[ 'style' ][ 'bottom_margin' ] ) ||
70
- ! empty( $panels_margin_bottom_last_row )
71
- ) {
72
- // Filter the bottom margin for this row with the arguments
73
- $css->add_row_css( $post_id, $ri, '', array(
74
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_row_margin_bottom', $panels_margin_bottom . 'px', $row, $ri, $panels_data, $post_id )
75
- ) );
76
- }
77
-
78
- $margin_half = ( floatval( $gutter_parts[1] ) / 2 ) . $gutter_parts[2];
79
- $css->add_row_css($post_id, $ri, '', array(
80
- 'margin-left' => '-' . $margin_half,
81
- 'margin-right' => '-' . $margin_half,
82
- ) );
83
- $css->add_cell_css($post_id, $ri, false, '', array(
84
- 'padding-left' => $margin_half,
85
- 'padding-right' => $margin_half,
86
- ) );
87
- }
88
-
89
- // Add the bottom margins
90
- $css->add_widget_css( $post_id, false, false, false, '', array(
91
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_cell_margin_bottom', $panels_margin_bottom . 'px', false, false, $panels_data, $post_id )
92
- ) );
93
- $css->add_widget_css( $post_id, false, false, false, ':last-child', array(
94
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_cell_last_margin_bottom', '0px', false, false, $panels_data, $post_id )
95
- ) );
96
-
97
- if ( $settings['responsive'] ) {
98
-
99
- $css->add_cell_css($post_id, false, false, '', array(
100
- 'float' => 'none',
101
- 'width' => 'auto'
102
- ), $panels_mobile_width);
103
-
104
- $css->add_row_css($post_id, false, '', array(
105
- 'margin-left' => 0,
106
- 'margin-right' => 0,
107
- ), $panels_mobile_width);
108
-
109
- $css->add_cell_css( $post_id, false, false, '', array(
110
- 'padding' => 0,
111
- ), $panels_mobile_width );
112
-
113
- // Hide empty cells on mobile
114
- $css->add_row_css( $post_id, false, ' .panel-grid-cell-empty', array(
115
- 'display' => 'none',
116
- ), $panels_mobile_width );
117
-
118
- // Hide empty cells on mobile
119
- $css->add_row_css( $post_id, false, ' .panel-grid-cell-mobile-last', array(
120
- 'margin-bottom' => '0px',
121
- ), $panels_mobile_width );
122
-
123
- foreach ( $layout_data as $ri => $row ) {
124
- $css->add_cell_css( $post_id, $ri, false, '', array(
125
- 'margin-bottom' => $panels_margin_bottom . 'px',
126
- ), $panels_mobile_width );
127
-
128
- $css->add_cell_css( $post_id, $ri, false, ':last-child', array(
129
- 'margin-bottom' => '0px',
130
- ), $panels_mobile_width );
131
- }
132
- }
133
-
134
- foreach ( $panels_data['widgets'] as $widget_id => $widget ) {
135
- if ( ! empty( $widget['panels_info']['style']['link_color'] ) ) {
136
- $css->add_widget_css( $post_id, $widget['panels_info']['grid'], $widget['panels_info']['cell'], $widget['panels_info']['cell_index'], ' a', array(
137
- 'color' => $widget['panels_info']['style']['link_color']
138
- ) );
139
- }
140
- }
141
-
142
- // Let other plugins and components filter the CSS object.
143
- $css = apply_filters( 'siteorigin_panels_css_object', $css, $panels_data, $post_id, $layout_data );
144
-
145
- return $css->get_css();
146
- }
147
-
148
- /**
149
- * This overwrites the parent function to get the cells in reverse order when using right_on_top collapse mode.
150
- *
151
- * @param $cells The cells to modify
152
- * @param $row The row the cells belong to
153
- *
154
- * @return mixed
155
- */
156
- protected function modify_row_cells( $cells, $row ){
157
- if( ! empty( $row['style']['collapse_order'] ) && $row['style']['collapse_order'] == 'right-top') {
158
- $cells = array_reverse( $cells, true );
159
- }
160
-
161
- return $cells;
162
-
163
- }
164
-
165
- public function front_css_url(){
166
- return siteorigin_panels_url( 'css/front' . ( siteorigin_panels_setting( 'legacy-layout' ) ? '-legacy' : '' ) . '.css' );
167
- }
168
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/renderer.php DELETED
@@ -1,853 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Renderer {
4
-
5
- private $inline_css;
6
-
7
- function __construct() {
8
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 1 );
9
- $this->inline_css = null;
10
- }
11
-
12
- public static function single() {
13
- static $single;
14
-
15
- return empty( $single ) ? $single = new self() : $single;
16
- }
17
-
18
- /**
19
- * Add CSS that needs to go inline.
20
- *
21
- * @param $post_id
22
- * @param $css
23
- */
24
- public function add_inline_css( $post_id, $css ) {
25
- if ( is_null( $this->inline_css ) ) {
26
- // Initialize the inline CSS array and add actions to handle printing.
27
- $this->inline_css = array();
28
- add_action( 'wp_head', array( $this, 'print_inline_css' ), 12 );
29
- add_action( 'wp_footer', array( $this, 'print_inline_css' ) );
30
- }
31
-
32
- $this->inline_css[ $post_id ] = $css;
33
-
34
- // Enqueue the front styles, if they haven't already been enqueued
35
- if ( ! wp_style_is( 'siteorigin-panels-front', 'enqueued' ) ) {
36
- wp_enqueue_style( 'siteorigin-panels-front' );
37
- }
38
- }
39
-
40
- /**
41
- * Generate the CSS for the page layout.
42
- *
43
- * @param $post_id
44
- * @param $panels_data
45
- * @param $layout_data
46
- *
47
- * @return string
48
- */
49
- public function generate_css( $post_id, $panels_data = false, $layout_data = false ) {
50
- // Exit if we don't have panels data
51
- if ( empty( $panels_data ) ) {
52
- $panels_data = get_post_meta( $post_id, 'panels_data', true );
53
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post_id );
54
- if ( empty( $panels_data ) ) {
55
- return '';
56
- }
57
- }
58
- if ( empty( $layout_data ) ) {
59
- $layout_data = $this->get_panels_layout_data( $panels_data );
60
- $layout_data = apply_filters( 'siteorigin_panels_layout_data', $layout_data, $post_id );
61
- }
62
-
63
- // Get some of the default settings
64
- $settings = siteorigin_panels_setting();
65
- $panels_tablet_width = $settings['tablet-width'];
66
- $panels_mobile_width = $settings['mobile-width'];
67
- $panels_margin_bottom = $settings['margin-bottom'];
68
- $panels_margin_bottom_last_row = $settings['margin-bottom-last-row'];
69
-
70
- $css = new SiteOrigin_Panels_Css_Builder();
71
-
72
- $ci = 0;
73
- foreach ( $layout_data as $ri => $row ) {
74
- if ( empty( $row['cells'] ) ) {
75
- continue;
76
- }
77
-
78
- // Let other themes and plugins change the gutter.
79
- $gutter = apply_filters( 'siteorigin_panels_css_row_gutter', $settings['margin-sides'] . 'px', $row, $ri, $panels_data );
80
- preg_match( '/([0-9\.,]+)(.*)/', $gutter, $gutter_parts );
81
-
82
- $cell_count = count( $row['cells'] );
83
-
84
- // Add the cell sizing
85
- foreach ( $row['cells'] as $ci => $cell ) {
86
- $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
87
- $rounded_width = round( $weight * 100, 4 ) . '%';
88
- $calc_width = 'calc(' . $rounded_width . ' - ( ' . ( 1 - $weight ) . ' * ' . $gutter . ' ) )';
89
- // Add the width and ensure we have correct formatting for CSS.
90
- $css->add_cell_css( $post_id, $ri, $ci, '', array(
91
- 'width' => array(
92
- // For some locales PHP uses ',' for decimal separation.
93
- // This seems to happen when a plugin calls `setlocale(LC_ALL, 'de_DE');` or `setlocale(LC_NUMERIC, 'de_DE');`
94
- // This should prevent issues with column sizes in these cases.
95
- str_replace( ',', '.', $rounded_width ),
96
- str_replace( ',', '.', $calc_width ),
97
- )
98
- ) );
99
-
100
- // Add in any widget specific CSS
101
- foreach ( $cell['widgets'] as $wi => $widget ) {
102
- $widget_style_data = ! empty( $widget['panels_info']['style'] ) ? $widget['panels_info']['style'] : array();
103
- $widget_css = apply_filters(
104
- 'siteorigin_panels_css_widget_css',
105
- array(),
106
- $widget_style_data,
107
- $row,
108
- $ri,
109
- $cell,
110
- $ci - 1,
111
- $widget,
112
- $wi,
113
- $panels_data,
114
- $post_id
115
- );
116
-
117
- $css->add_widget_css(
118
- $post_id,
119
- $ri,
120
- $ci,
121
- $wi,
122
- '',
123
- $widget_css,
124
- 1920,
125
- true
126
- );
127
- }
128
- }
129
-
130
- if (
131
- $ri != count( $layout_data ) - 1 ||
132
- ! empty( $row['style']['bottom_margin'] ) ||
133
- ! empty( $panels_margin_bottom_last_row )
134
- ) {
135
- // Filter the bottom margin for this row with the arguments
136
- $css->add_row_css( $post_id, $ri, '', array(
137
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_row_margin_bottom', $panels_margin_bottom . 'px', $row, $ri, $panels_data, $post_id )
138
- ) );
139
- }
140
-
141
- $collapse_order = ! empty( $row['style']['collapse_order'] ) ? $row['style']['collapse_order'] : ( ! is_rtl() ? 'left-top' : 'right-top' );
142
-
143
- if ( $settings['responsive'] ) {
144
-
145
- // The default collapse behaviour
146
- if ( empty( $row['style']['collapse_behaviour'] ) ) {
147
-
148
- if (
149
- $settings['tablet-layout'] &&
150
- $cell_count >= 3 &&
151
- $panels_tablet_width > $panels_mobile_width
152
- ) {
153
- // Tablet responsive css for the row
154
-
155
- $css->add_row_css( $post_id, $ri, array(
156
- '.panel-no-style',
157
- '.panel-has-style > .panel-row-style'
158
- ), array(
159
- '-ms-flex-wrap' => $collapse_order == 'left-top' ? 'wrap' : 'wrap-reverse',
160
- '-webkit-flex-wrap' => $collapse_order == 'left-top' ? 'wrap' : 'wrap-reverse',
161
- 'flex-wrap' => $collapse_order == 'left-top' ? 'wrap' : 'wrap-reverse',
162
- ), $panels_tablet_width . ':' . ( $panels_mobile_width + 1 ) );
163
-
164
- $css->add_cell_css( $post_id, $ri, false, '', array(
165
- '-ms-flex' => '0 1 50%',
166
- '-webkit-flex' => '0 1 50%',
167
- 'flex' => '0 1 50%',
168
- 'margin-right' => '0',
169
- 'margin-bottom' => $panels_margin_bottom . 'px',
170
- ), $panels_tablet_width . ':' . ( $panels_mobile_width + 1 ) );
171
-
172
-
173
- $remove_bottom_margin = ':nth-';
174
- if ( $collapse_order == 'left-top' ) {
175
- $remove_bottom_margin .= 'last-child(' . ( count( $row['cells'] ) % 2 == 0 ? '-n+2' : '1' ) . ')';
176
- } else {
177
- $remove_bottom_margin .= 'child(-n+2)';
178
- }
179
-
180
- $css->add_cell_css( $post_id, $ri, false, $remove_bottom_margin, array(
181
- 'margin-bottom' => 0,
182
- ), $panels_tablet_width . ':' . ( $panels_mobile_width + 1 )
183
- );
184
-
185
- if ( ! empty( $gutter_parts[1] ) ) {
186
- // Tablet responsive css for cells
187
-
188
- $css->add_cell_css( $post_id, $ri, false, ':nth-child(even)', array(
189
- 'padding-left' => ( floatval( $gutter_parts[1] / 2 ) . $gutter_parts[2] ),
190
- ), $panels_tablet_width . ':' . ( $panels_mobile_width + 1 ) );
191
-
192
- $css->add_cell_css( $post_id, $ri, false, ':nth-child(odd)', array(
193
- 'padding-right' => ( floatval( $gutter_parts[1] / 2 ) . $gutter_parts[2] ),
194
- ), $panels_tablet_width . ':' . ( $panels_mobile_width + 1 ) );
195
- }
196
-
197
- }
198
-
199
- // Mobile Responsive
200
- $css->add_row_css( $post_id, $ri, array(
201
- '.panel-no-style',
202
- '.panel-has-style > .panel-row-style'
203
- ), array(
204
- '-webkit-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
205
- '-ms-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
206
- 'flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
207
- ), $panels_mobile_width );
208
-
209
- $css->add_cell_css( $post_id, $ri, false, '', array(
210
- 'margin-right' => 0,
211
- ), $panels_mobile_width );
212
- }
213
-
214
- $css->add_cell_css( $post_id, $ri, false, '', array(
215
- 'width' => '100%',
216
- ), $panels_mobile_width );
217
-
218
- foreach ( $row['cells'] as $ci => $cell ) {
219
- if ( ( $collapse_order == 'left-top' && $ci != $cell_count - 1 ) || ( $collapse_order == 'right-top' && $ci !== 0 ) ) {
220
- $css->add_cell_css( $post_id, $ri, $ci, '', array(
221
- 'margin-bottom' => $panels_margin_bottom . 'px',
222
- ), $panels_mobile_width );
223
- }
224
- }
225
- }
226
-
227
- }
228
-
229
- // Add the bottom margins
230
- $css->add_widget_css( $post_id, false, false, false, '', array(
231
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_cell_margin_bottom', $panels_margin_bottom . 'px', false, false, $panels_data, $post_id )
232
- ) );
233
- $css->add_widget_css( $post_id, false, false, false, ':last-child', array(
234
- 'margin-bottom' => apply_filters( 'siteorigin_panels_css_cell_last_margin_bottom', '0px', false, false, $panels_data, $post_id )
235
- ) );
236
-
237
- if ( $settings['responsive'] ) {
238
- $css->add_cell_css( $post_id, false, false, '', array(
239
- 'padding' => 0,
240
- ), $panels_mobile_width );
241
-
242
- // Hide empty cells on mobile
243
- $css->add_row_css( $post_id, false, ' .panel-grid-cell-empty', array(
244
- 'display' => 'none',
245
- ), $panels_mobile_width );
246
-
247
- // Hide empty cells on mobile
248
- $css->add_row_css( $post_id, false, ' .panel-grid-cell-mobile-last', array(
249
- 'margin-bottom' => '0px',
250
- ), $panels_mobile_width );
251
- }
252
-
253
- // Let other plugins and components filter the CSS object.
254
- $css = apply_filters( 'siteorigin_panels_css_object', $css, $panels_data, $post_id, $layout_data );
255
-
256
- return $css->get_css();
257
- }
258
-
259
- /**
260
- * Render the panels.
261
- *
262
- * @param int|string|bool $post_id The Post ID or 'home'.
263
- * @param bool $enqueue_css Should we also enqueue the layout CSS.
264
- * @param array|bool $panels_data Existing panels data. By default load from settings or post meta.
265
- * @param array $layout_data Reformatted panels_data that includes data about the render.
266
- *
267
- * @return string
268
- */
269
- function render( $post_id = false, $enqueue_css = true, $panels_data = false, & $layout_data = array(), $is_preview = false ) {
270
-
271
- if ( empty( $post_id ) ) {
272
- $post_id = get_the_ID();
273
-
274
- if ( class_exists( 'WooCommerce' ) && is_shop() ) {
275
- $post_id = wc_get_page_id( 'shop' );
276
- }
277
- }
278
-
279
- global $siteorigin_panels_current_post;
280
- $old_current_post = $siteorigin_panels_current_post;
281
- $siteorigin_panels_current_post = $post_id;
282
-
283
- // Try get the cached panel from in memory cache.
284
- global $siteorigin_panels_cache;
285
- if ( ! empty( $siteorigin_panels_cache ) && ! empty( $siteorigin_panels_cache[ $post_id ] ) ) {
286
- return $siteorigin_panels_cache[ $post_id ];
287
- }
288
-
289
- if ( empty( $panels_data ) ) {
290
- $panels_data = $this->get_panels_data_for_post( $post_id );
291
- if ( $panels_data === false ) {
292
- return false;
293
- }
294
- }
295
-
296
- $panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, $post_id );
297
- if ( empty( $panels_data ) || empty( $panels_data['grids'] ) ) {
298
- return '';
299
- }
300
-
301
- if ( $is_preview ) {
302
- $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] = true;
303
- }
304
-
305
- $layout_data = $this->get_panels_layout_data( $panels_data );
306
- $layout_data = apply_filters( 'siteorigin_panels_layout_data', $layout_data, $post_id );
307
-
308
- ob_start();
309
-
310
- // Add the panel layout wrapper
311
- $layout_classes = apply_filters( 'siteorigin_panels_layout_classes', array( 'panel-layout' ), $post_id, $panels_data );
312
- if ( is_rtl() ) {
313
- $layout_classes[] = 'panel-is-rtl';
314
- }
315
- $layout_attributes = apply_filters( 'siteorigin_panels_layout_attributes', array(
316
- 'id' => 'pl-' . $post_id,
317
- 'class' => implode( ' ', $layout_classes ),
318
- ), $post_id, $panels_data );
319
-
320
- $this->render_element( 'div', $layout_attributes );
321
-
322
- echo apply_filters( 'siteorigin_panels_before_content', '', $panels_data, $post_id );
323
-
324
- foreach ( $layout_data as $ri => & $row ) {
325
- $this->render_row( $post_id, $ri, $row, $panels_data );
326
- }
327
-
328
- echo apply_filters( 'siteorigin_panels_after_content', '', $panels_data, $post_id );
329
-
330
- echo '</div>';
331
-
332
- do_action( 'siteorigin_panels_after_render', $panels_data, $post_id );
333
-
334
- $html = ob_get_clean();
335
-
336
- if ( $enqueue_css && ! isset( $this->inline_css[ $post_id ] ) ) {
337
- wp_enqueue_style( 'siteorigin-panels-front' );
338
- $this->add_inline_css( $post_id, $this->generate_css( $post_id, $panels_data, $layout_data ) );
339
- }
340
-
341
- // Reset the current post
342
- $siteorigin_panels_current_post = $old_current_post;
343
-
344
- $rendered_layout = apply_filters( 'siteorigin_panels_render', $html, $post_id, ! empty( $post ) ? $post : null );
345
-
346
- if ( $is_preview ) {
347
- $widget_css = '@import url(' . SiteOrigin_Panels::front_css_url() . '); ';
348
- $widget_css .= SiteOrigin_Panels::renderer()->generate_css( $post_id, $panels_data, $layout_data );
349
- $widget_css = preg_replace( '/\s+/', ' ', $widget_css );
350
- $rendered_layout .= "\n\n" .
351
- '<style type="text/css" class="panels-style" data-panels-style-for-post="' . esc_attr( $post_id ) . '">' .
352
- $widget_css .
353
- '</style>';
354
- }
355
-
356
- unset( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] );
357
-
358
- return $rendered_layout;
359
- }
360
-
361
- /**
362
- * Echo the style wrapper and return if there was a wrapper
363
- *
364
- * @param string $name The name of the style wrapper
365
- * @param array $style The style wrapper args. Used as an argument for siteorigin_panels_{$name}_style_attributes
366
- * @param string|bool $for An identifier of what this style wrapper is for
367
- *
368
- * @return bool Is there a style wrapper
369
- */
370
- private function start_style_wrapper( $name, $style = array(), $for = false ) {
371
- $attributes = array();
372
-
373
- if ( empty( $attributes['class'] ) ) {
374
- $attributes['class'] = array();
375
- }
376
- if ( empty( $attributes['style'] ) ) {
377
- $attributes['style'] = '';
378
- }
379
-
380
- // Get everything related to the style wrapper
381
- $attributes = apply_filters( 'siteorigin_panels_' . $name . '_style_attributes', $attributes, $style );
382
- $attributes = apply_filters( 'siteorigin_panels_general_style_attributes', $attributes, $style );
383
-
384
- $standard_css = array();
385
- $standard_css = apply_filters( 'siteorigin_panels_' . $name . '_style_css', $standard_css, $style );
386
- $standard_css = apply_filters( 'siteorigin_panels_general_style_css', $standard_css, $style );
387
-
388
- $mobile_css = array();
389
- $mobile_css = apply_filters( 'siteorigin_panels_' . $name . '_style_mobile_css', $mobile_css, $style );
390
- $mobile_css = apply_filters( 'siteorigin_panels_general_style_mobile_css', $mobile_css, $style );
391
-
392
- // Remove anything we didn't actually use
393
- if ( empty( $attributes['class'] ) ) {
394
- unset( $attributes['class'] );
395
- }
396
- if ( empty( $attributes['style'] ) ) {
397
- unset( $attributes['style'] );
398
- }
399
-
400
- $style_wrapper = '';
401
- if ( ! empty( $attributes ) || ! empty( $standard_css ) || ! empty( $mobile_css ) ) {
402
- if ( empty( $attributes['class'] ) ) {
403
- $attributes['class'] = array();
404
- }
405
- $attributes['class'][] = 'panel-' . $name . '-style';
406
- if ( ! empty( $for ) ) {
407
- $attributes['class'][] = 'panel-' . $name . '-style-for-' . sanitize_html_class( $for );
408
- }
409
- $attributes['class'] = array_unique( $attributes['class'] );
410
-
411
- // Filter and sanitize the classes
412
- $attributes['class'] = apply_filters( 'siteorigin_panels_' . $name . '_style_classes', $attributes['class'], $attributes, $style );
413
- $attributes['class'] = array_map( 'sanitize_html_class', $attributes['class'] );
414
-
415
- $style_wrapper = '<div ';
416
- foreach ( $attributes as $name => $value ) {
417
- // Attributes start with _ are used for internal communication between filters, so are not added to the HTML
418
- // We don't make use of this in our styling, so its left as a mechanism for other plugins.
419
- if ( substr( $name, 0, 1 ) === '_' ) {
420
- continue;
421
- }
422
-
423
- if ( is_array( $value ) ) {
424
- $style_wrapper .= $name . '="' . esc_attr( implode( " ", array_unique( $value ) ) ) . '" ';
425
- } else {
426
- $style_wrapper .= $name . '="' . esc_attr( $value ) . '" ';
427
- }
428
- }
429
- $style_wrapper .= '>';
430
-
431
- return $style_wrapper;
432
- }
433
-
434
- return $style_wrapper;
435
- }
436
-
437
- /**
438
- * Render the widget.
439
- *
440
- * @param array $widget_info The widget info.
441
- * @param array $instance The widget instance
442
- * @param int $grid_index The grid index.
443
- * @param int $cell_index The cell index.
444
- * @param int $widget_index The index of this widget.
445
- * @param bool $is_first Is this the first widget in the cell.
446
- * @param bool $is_last Is this the last widget in the cell.
447
- * @param bool $post_id
448
- * @param string $style_wrapper The start of the style wrapper
449
- */
450
- function the_widget( $widget_info, $instance, $grid_index, $cell_index, $widget_index, $is_first, $is_last, $post_id = false, $style_wrapper = '' ) {
451
-
452
- // Set widget class to $widget
453
- $widget_class = $widget_info['class'];
454
- $widget_class = apply_filters( 'siteorigin_panels_widget_class', $widget_class );
455
-
456
- // Load the widget from the widget factory and give themes and plugins a chance to provide their own
457
- $the_widget = SiteOrigin_Panels::get_widget_instance( $widget_class );
458
- $the_widget = apply_filters( 'siteorigin_panels_widget_object', $the_widget, $widget_class, $instance );
459
-
460
- if ( empty( $post_id ) ) {
461
- $post_id = get_the_ID();
462
-
463
- if ( class_exists( 'WooCommerce' ) && is_shop() ) {
464
- $post_id = wc_get_page_id( 'shop' );
465
- }
466
- }
467
-
468
- $classes = array( 'so-panel' );
469
- if ( siteorigin_panels_setting( 'add-widget-class' ) ) {
470
- $classes[] = 'widget';
471
- }
472
- if ( ! empty( $the_widget ) && ! empty( $the_widget->id_base ) ) {
473
- $classes[] = 'widget_' . $the_widget->id_base;
474
- }
475
- if ( ! empty( $the_widget ) && is_array( $the_widget->widget_options ) && ! empty( $the_widget->widget_options['classname'] ) ) {
476
- $classes[] = $the_widget->widget_options['classname'];
477
- }
478
- if ( $is_first ) {
479
- $classes[] = 'panel-first-child';
480
- }
481
- if ( $is_last ) {
482
- $classes[] = 'panel-last-child';
483
- }
484
- $id = 'panel-' . $post_id . '-' . $grid_index . '-' . $cell_index . '-' . $widget_index;
485
-
486
- // Filter and sanitize the classes
487
- $classes = apply_filters( 'siteorigin_panels_widget_classes', $classes, $widget_class, $instance, $widget_info );
488
- $classes = explode( ' ', implode( ' ', $classes ) );
489
- $classes = array_filter( $classes );
490
- $classes = array_unique( $classes );
491
- $classes = array_map( 'sanitize_html_class', $classes );
492
-
493
- $title_html = siteorigin_panels_setting( 'title-html' );
494
- if ( strpos( $title_html, '{{title}}' ) !== false ) {
495
- list( $before_title, $after_title ) = explode( '{{title}}', $title_html, 2 );
496
- } else {
497
- $before_title = '<h3 class="widget-title">';
498
- $after_title = '</h3>';
499
- }
500
-
501
- // Attributes of the widget wrapper
502
- $attributes = apply_filters( 'siteorigin_panels_widget_attributes', array(
503
- 'id' => $id,
504
- 'class' => implode( ' ', $classes ),
505
- 'data-index' => $widget_info['widget_index'],
506
- ), $widget_info );
507
-
508
- $before_widget = '<div ';
509
- foreach ( $attributes as $k => $v ) {
510
- $before_widget .= esc_attr( $k ) . '="' . esc_attr( $v ) . '" ';
511
- }
512
- $before_widget .= '>';
513
-
514
- $args = array(
515
- 'before_widget' => $before_widget,
516
- 'after_widget' => '</div>',
517
- 'before_title' => $before_title,
518
- 'after_title' => $after_title,
519
- 'widget_id' => 'widget-' . $grid_index . '-' . $cell_index . '-' . $widget_index
520
- );
521
-
522
- // Let other themes and plugins change the arguments that go to the widget class.
523
- $args = apply_filters( 'siteorigin_panels_widget_args', $args );
524
-
525
- // If there is a style wrapper, add it.
526
- if ( ! empty( $style_wrapper ) ) {
527
- $args['before_widget'] = $args['before_widget'] . $style_wrapper;
528
- $args['after_widget'] = '</div>' . $args['after_widget'];
529
- }
530
-
531
- // This gives other plugins the chance to take over rendering of widgets
532
- $widget_html = apply_filters( 'siteorigin_panels_the_widget_html', '', $the_widget, $args, $instance );
533
-
534
- if ( ! empty( $widget_html ) ) {
535
- echo $args['before_widget'];
536
- echo $widget_html;
537
- echo $args['after_widget'];
538
- } else if ( ! empty( $the_widget ) && is_a( $the_widget, 'WP_Widget' ) ) {
539
- $the_widget->widget( $args, $instance );
540
- } else {
541
- // This gives themes a chance to display some sort of placeholder for missing widgets
542
- echo apply_filters( 'siteorigin_panels_missing_widget', $args['before_widget'] . $args['after_widget'], $widget_class, $args, $instance );
543
- }
544
- }
545
-
546
- /**
547
- * Print inline CSS in the header and footer.
548
- */
549
- function print_inline_css() {
550
- if ( ! empty( $this->inline_css ) ) {
551
- $the_css = '';
552
- foreach ( $this->inline_css as $post_id => $css ) {
553
- if ( empty( $css ) ) {
554
- continue;
555
- }
556
- $the_css .= '/* Layout ' . esc_attr( $post_id ) . ' */ ';
557
- $the_css .= $css;
558
- }
559
-
560
- // Reset the inline CSS
561
- $this->inline_css = null;
562
-
563
- switch ( current_filter() ) {
564
- case 'wp_head' :
565
- $css_id = 'head';
566
- break;
567
-
568
- case 'wp_footer' :
569
- $css_id = 'footer';
570
- break;
571
-
572
- default :
573
- $css_id = sanitize_html_class( current_filter() );
574
- break;
575
- }
576
-
577
- // Allow third party developers to change the inline styles or remove them completely.
578
- $the_css = apply_filters( 'siteorigin_panels_inline_styles', $the_css );
579
-
580
- if ( ! empty( $the_css ) ) {
581
- ?>
582
- <style type="text/css" media="all"
583
- id="siteorigin-panels-layouts-<?php echo esc_attr( $css_id ) ?>"><?php echo $the_css ?></style><?php
584
- }
585
- }
586
- }
587
-
588
- /**
589
- * Enqueue the required styles
590
- */
591
- function enqueue_styles() {
592
- // Register the style to support possible lazy loading
593
- wp_register_style( 'siteorigin-panels-front', SiteOrigin_Panels::front_css_url(), array(), SITEORIGIN_PANELS_VERSION );
594
- }
595
-
596
- /**
597
- * Retrieve panels data for a post or a prebuilt layout or the home page layout.
598
- *
599
- * @param string $post_id
600
- *
601
- * @return array
602
- */
603
- private function get_panels_data_for_post( $post_id ) {
604
- if ( strpos( $post_id, 'prebuilt:' ) === 0 ) {
605
- list( $null, $prebuilt_id ) = explode( ':', $post_id, 2 );
606
- $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
607
- $panels_data = ! empty( $layouts[ $prebuilt_id ] ) ? $layouts[ $prebuilt_id ] : array();
608
- } else if ( $post_id == 'home' ) {
609
- $page_id = get_option( 'page_on_front' );
610
- if ( empty( $page_id ) ) {
611
- $page_id = get_option( 'siteorigin_panels_home_page_id' );
612
- }
613
-
614
- $panels_data = ! empty( $page_id ) ? get_post_meta( $page_id, 'panels_data', true ) : null;
615
-
616
- if ( is_null( $panels_data ) ) {
617
- // Load the default layout
618
- $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
619
- $prebuilt_id = siteorigin_panels_setting( 'home-page-default' ) ? siteorigin_panels_setting( 'home-page-default' ) : 'home';
620
-
621
- $panels_data = ! empty( $layouts[ $prebuilt_id ] ) ? $layouts[ $prebuilt_id ] : current( $layouts );
622
- }
623
- } else {
624
- if ( post_password_required( $post_id ) ) {
625
- return false;
626
- }
627
- $panels_data = get_post_meta( $post_id, 'panels_data', true );
628
- }
629
-
630
- return $panels_data;
631
- }
632
-
633
- /**
634
- * Transform flat panels data into a hierarchical structure.
635
- *
636
- * @param array $panels_data Flat panels data containing `grids`, `grid_cells`, and `widgets`.
637
- *
638
- * @return array Hierarchical structure of rows => cells => widgets.
639
- */
640
- public function get_panels_layout_data( $panels_data ) {
641
- $layout_data = array();
642
-
643
- foreach ( $panels_data['grids'] as $grid ) {
644
- $layout_data[] = array(
645
- 'style' => ! empty( $grid['style'] ) ? $grid['style'] : array(),
646
- 'ratio' => ! empty( $grid['ratio'] ) ? $grid['ratio'] : '',
647
- 'ratio_direction' => ! empty( $grid['ratio_direction'] ) ? $grid['ratio_direction'] : '',
648
- 'color_label' => ! empty( $grid['color_label'] ) ? $grid['color_label'] : '',
649
- 'label' => ! empty( $grid['label'] ) ? $grid['label'] : '',
650
- 'cells' => array()
651
- );
652
- }
653
-
654
- foreach ( $panels_data['grid_cells'] as $cell ) {
655
- $layout_data[ $cell['grid'] ]['cells'][] = array(
656
- 'widgets' => array(),
657
- 'style' => ! empty( $cell['style'] ) ? $cell['style'] : array(),
658
- 'weight' => floatval( $cell['weight'] ),
659
- );
660
- }
661
-
662
- foreach ( $panels_data['widgets'] as $i => $widget ) {
663
- $widget['panels_info']['widget_index'] = $i;
664
- $row_index = intval( $widget['panels_info']['grid'] );
665
- $cell_index = intval( $widget['panels_info']['cell'] );
666
- $layout_data[ $row_index ]['cells'][ $cell_index ]['widgets'][] = $widget;
667
- }
668
-
669
- return $layout_data;
670
- }
671
-
672
- /**
673
- * Outputs the given HTML tag with the given attributes.
674
- *
675
- * @param string $tag The HTML element to render.
676
- * @param array $attributes The attributes for the HTML element.
677
- *
678
- */
679
- private function render_element( $tag, $attributes ) {
680
-
681
- echo '<' . $tag;
682
- foreach ( $attributes as $name => $value ) {
683
- if ( $value ) {
684
- echo ' ' . $name . '="' . esc_attr( $value ) . '" ';
685
- }
686
- }
687
- echo '>';
688
-
689
- }
690
-
691
- /**
692
- * Render everything for the given row, including:
693
- * - filters before and after row,
694
- * - row style wrapper,
695
- * - row element wrapper with attributes,
696
- * - child cells
697
- *
698
- * @param string $post_id The ID of the post containing this layout.
699
- * @param int $ri The index of this row.
700
- * @param array $row The model containing this row's data and child cells.
701
- * @param array $panels_data A copy of panels_data for filters.
702
- *
703
- */
704
- private function render_row( $post_id, $ri, & $row, & $panels_data ) {
705
- $row_style_wrapper = $this->start_style_wrapper( 'row', ! empty( $row['style'] ) ? $row['style'] : array(), $post_id . '-' . $ri );
706
-
707
- $row_classes = array( 'panel-grid' );
708
- $row_classes[] = ! empty( $row_style_wrapper ) ? 'panel-has-style' : 'panel-no-style';
709
- $row_classes = apply_filters( 'siteorigin_panels_row_classes', $row_classes, $row );
710
-
711
- $row_attributes = apply_filters( 'siteorigin_panels_row_attributes', array(
712
- 'id' => 'pg-' . $post_id . '-' . $ri,
713
- 'class' => implode( ' ', $row_classes ),
714
- ), $row );
715
-
716
- // This allows other themes and plugins to add html before the row
717
- echo apply_filters( 'siteorigin_panels_before_row', '', $row, $row_attributes );
718
-
719
- $this->render_element( 'div', $row_attributes );
720
-
721
- if ( ! empty( $row_style_wrapper ) ) {
722
- echo $row_style_wrapper;
723
- }
724
-
725
- if( method_exists( $this, 'modify_row_cells' ) ) {
726
- // This gives other renderers a chance to change the cell order
727
- $row['cells'] = $cells = $this->modify_row_cells( $row['cells'], $row );
728
- }
729
-
730
- foreach ( $row['cells'] as $ci => & $cell ) {
731
- $this->render_cell( $post_id, $ri, $ci, $cell, $row['cells'], $panels_data );
732
- }
733
-
734
- // Close the style wrapper
735
- if ( ! empty( $row_style_wrapper ) ) {
736
- echo '</div>';
737
- }
738
-
739
- echo '</div>';
740
-
741
- // This allows other themes and plugins to add html after the row
742
- echo apply_filters( 'siteorigin_panels_after_row', '', $row, $row_attributes );
743
-
744
- }
745
-
746
- /**
747
- *
748
- * Render everything for the given cell, including:
749
- * - filters before and after cell,
750
- * - cell element wrapper with attributes,
751
- * - style wrapper,
752
- * - child widgets
753
- *
754
- * @param string $post_id The ID of the post containing this layout.
755
- * @param int $ri The index of this cell's parent row.
756
- * @param int $ci The index of this cell.
757
- * @param array $cell The model containing this cell's data and child widgets.
758
- * @param array $cells The array of cells containing this cell.
759
- * @param array $panels_data A copy of panels_data for filters
760
- */
761
- private function render_cell( $post_id, $ri, $ci, & $cell, $cells, & $panels_data ) {
762
-
763
- $cell_classes = array( 'panel-grid-cell' );
764
-
765
- if ( empty( $cell['widgets'] ) ) {
766
- $cell_classes[] = 'panel-grid-cell-empty';
767
- }
768
-
769
- if ( $ci == count( $cells ) - 2 && count( $cells[ $ci + 1 ]['widgets'] ) == 0 ) {
770
- $cell_classes[] = 'panel-grid-cell-mobile-last';
771
- }
772
-
773
- // Themes can add their own styles to cells
774
- $cell_classes = apply_filters( 'siteorigin_panels_cell_classes', $cell_classes, $cell );
775
-
776
- // Legacy filter, use `siteorigin_panels_cell_classes` instead
777
- $cell_classes = apply_filters( 'siteorigin_panels_row_cell_classes', $cell_classes, $panels_data, $cell );
778
-
779
- $cell_attributes = apply_filters( 'siteorigin_panels_cell_attributes', array(
780
- 'id' => 'pgc-' . $post_id . '-' . $ri . '-' . $ci,
781
- 'class' => implode( ' ', $cell_classes ),
782
- ), $cell );
783
-
784
- // Legacy filter, use `siteorigin_panels_cell_attributes` instead
785
- $cell_attributes = apply_filters( 'siteorigin_panels_row_cell_attributes', $cell_attributes, $panels_data, $cell );
786
-
787
- echo apply_filters( 'siteorigin_panels_before_cell', '', $cell, $cell_attributes );
788
-
789
- $this->render_element( 'div', $cell_attributes );
790
-
791
- $grid = $panels_data['grids'][ $ri ];
792
-
793
- if ( empty( $cell['style']['class'] ) && ! empty( $grid['style']['cell_class'] ) ) {
794
- $cell['style']['class'] = $grid['style']['cell_class'];
795
- }
796
-
797
- $cell_style = ! empty( $cell['style'] ) ? $cell['style'] : array();
798
- $cell_style_wrapper = $this->start_style_wrapper( 'cell', $cell_style, $post_id . '-' . $ri . '-' . $ci );
799
- if ( ! empty( $cell_style_wrapper ) ) {
800
- echo $cell_style_wrapper;
801
- }
802
-
803
- foreach ( $cell['widgets'] as $wi => & $widget ) {
804
- $is_last = ( $wi == count( $cell['widgets'] ) - 1 );
805
- $this->render_widget( $post_id, $ri, $ci, $wi, $widget, $is_last );
806
- }
807
-
808
- if ( ! empty( $cell_style_wrapper ) ) {
809
- echo '</div>';
810
- }
811
- echo '</div>';
812
-
813
- echo apply_filters( 'siteorigin_panels_after_cell', '', $cell, $cell_attributes );
814
- }
815
-
816
- /**
817
- *
818
- * Gets the style wrapper for this widget and passes it through to `the_widget` along with other required parameters.
819
- *
820
- * @param string $post_id The ID of the post containing this layout.
821
- * @param int $ri The index of this widget's ancestor row.
822
- * @param int $ci The index of this widget's parent cell.
823
- * @param int $wi The index of this widget.
824
- * @param array $widget The model containing this widget's data.
825
- * @param bool $is_last Whether this is the last widget in the parent cell.
826
- *
827
- */
828
- private function render_widget( $post_id, $ri, $ci, $wi, & $widget, $is_last ) {
829
-
830
- $widget_style_wrapper = $this->start_style_wrapper(
831
- 'widget',
832
- ! empty( $widget['panels_info']['style'] ) ? $widget['panels_info']['style'] : array(),
833
- $post_id . '-' . $ri . '-' . $ci . '-' . $wi
834
- );
835
-
836
- $this->the_widget(
837
- $widget['panels_info'],
838
- $widget,
839
- $ri,
840
- $ci,
841
- $wi,
842
- $wi == 0,
843
- $is_last,
844
- $post_id,
845
- $widget_style_wrapper
846
- );
847
-
848
- }
849
-
850
- public function front_css_url() {
851
- return siteorigin_panels_url( 'css/front-flex' . SITEORIGIN_PANELS_CSS_SUFFIX . '.css' );
852
- }
853
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/revisions.php DELETED
@@ -1,107 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class SiteOrigin_Panels_Revisions
5
- *
6
- * Handles Page Builder revisions.
7
- */
8
- class SiteOrigin_Panels_Revisions {
9
-
10
- function __construct() {
11
- add_action( 'save_post', array( $this, 'save_post' ), 11, 2 );
12
- add_action( 'wp_restore_post_revision', array( $this, 'revisions_restore' ), 10, 2 );
13
-
14
- add_filter( '_wp_post_revision_fields', array( $this, 'revisions_fields' ) );
15
- add_filter( '_wp_post_revision_field_panels_data_field', array( $this, 'revisions_field' ), 10, 3 );
16
- }
17
-
18
- /**
19
- * @return SiteOrigin_Panels_Admin
20
- */
21
- public static function single() {
22
- static $single;
23
- return empty( $single ) ? $single = new self() : $single;
24
- }
25
-
26
- /**
27
- * Store the Page Builder meta in the revision.
28
- *
29
- * @param $post_id
30
- * @param $post
31
- */
32
- function save_post( $post_id, $post ) {
33
- if( is_preview() ) return;
34
-
35
- $parent_id = wp_is_post_revision( $post_id );
36
- if ( $parent_id ) {
37
- // Check whether the panels data needs to be copied to the revision.
38
- $panels_data = get_metadata( 'post', $post_id, 'panels_data', true );
39
- if ( empty( $panels_data ) ) {
40
- // If the panels data meta exists for the post parent, copy it into the revision.
41
- $panels_data = get_post_meta( $parent_id, 'panels_data', true );
42
- if ( ! empty( $panels_data ) ) {
43
- add_metadata( 'post', $post_id, 'panels_data', $panels_data );
44
- }
45
- }
46
- }
47
- }
48
-
49
- /**
50
- * Restore a revision.
51
- *
52
- * @param $post_id
53
- * @param $revision_id
54
- */
55
- function revisions_restore( $post_id, $revision_id ) {
56
- $panels_data = get_metadata( 'post', $revision_id, 'panels_data', true );
57
- if ( ! empty( $panels_data ) ) {
58
- update_post_meta( $post_id, 'panels_data', map_deep( $panels_data, array( 'SiteOrigin_Panels_Admin', 'double_slash_string' ) ) );
59
- } else {
60
- delete_post_meta( $post_id, 'panels_data' );
61
- }
62
- }
63
-
64
- /**
65
- * Add the Page Builder content revision field.
66
- *
67
- * @param $fields
68
- *
69
- * @return mixed
70
- */
71
- function revisions_fields( $fields ) {
72
- // Prevent the autosave message.
73
- // TODO figure out how to include Page Builder data into the autosave.
74
- if ( ! function_exists( 'get_current_screen' ) ) {
75
- return $fields;
76
- }
77
-
78
- $screen = get_current_screen();
79
- if ( ! empty( $screen ) && $screen->base == 'post' ) {
80
- return $fields;
81
- }
82
-
83
- $fields['panels_data_field'] = __( 'Page Builder Content', 'siteorigin-panels' );
84
-
85
- return $fields;
86
- }
87
-
88
- /**
89
- * Display the Page Builder content for the revision.
90
- *
91
- * @param $value
92
- * @param $field
93
- * @param $revision
94
- *
95
- * @return string
96
- */
97
- function revisions_field( $value, $field, $revision ) {
98
- $parent_id = wp_is_post_revision( $revision->ID );
99
- $panels_data = get_metadata( 'post', $revision->ID, 'panels_data', true );
100
-
101
- if ( empty( $panels_data ) ) {
102
- return '';
103
- }
104
-
105
- return siteorigin_panels_render( $parent_id, false, $panels_data );
106
- }
107
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/settings.php DELETED
@@ -1,651 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class to handle Page Builder settings.
5
- *
6
- * Class SiteOrigin_Panels_Settings
7
- */
8
- class SiteOrigin_Panels_Settings {
9
-
10
- private $settings;
11
- private $fields;
12
- private $settings_saved;
13
-
14
- function __construct() {
15
- $this->settings = array();
16
- $this->fields = array();
17
- $this->settings_saved = false;
18
-
19
- // Admin actions
20
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
21
- add_action( 'admin_menu', array( $this, 'add_settings_page' ) );
22
- add_action( 'after_setup_theme', array( $this, 'clear_cache' ), 100 );
23
-
24
- // Default filters for fields and defaults
25
- add_filter( 'siteorigin_panels_settings_defaults', array( $this, 'settings_defaults' ) );
26
- add_filter( 'siteorigin_panels_default_add_widget_class', array( $this, 'add_widget_class' ) );
27
- add_filter( 'siteorigin_panels_settings_fields', array( $this, 'settings_fields' ) );
28
- }
29
-
30
- /**
31
- * @return SiteOrigin_Panels_Settings
32
- */
33
- static function single() {
34
- static $single;
35
- return empty( $single ) ? $single = new self() : $single;
36
- }
37
-
38
- function clear_cache() {
39
- $this->settings = array();
40
- }
41
-
42
- /**
43
- * Get a settings value
44
- *
45
- * @param string $key
46
- *
47
- * @return array|bool|mixed|null|void
48
- */
49
- function get( $key = '' ) {
50
-
51
- if ( empty( $this->settings ) ) {
52
-
53
- // Get the settings, attempt to fetch new settings first.
54
- $current_settings = get_option( 'siteorigin_panels_settings', false );
55
-
56
- if ( $current_settings === false ) {
57
- // We can't find the settings, so try access old settings
58
- $current_settings = get_option( 'siteorigin_panels_display', array() );
59
- $post_types = get_option( 'siteorigin_panels_post_types' );
60
- if ( ! empty( $post_types ) ) {
61
- $current_settings['post-types'] = $post_types;
62
- }
63
-
64
- // Store the old settings in the new field
65
- update_option( 'siteorigin_panels_settings', $current_settings );
66
- }
67
-
68
- // Get the settings provided by the theme
69
- $theme_settings = get_theme_support( 'siteorigin-panels' );
70
- if ( ! empty( $theme_settings ) ) {
71
- $theme_settings = $theme_settings[0];
72
- } else {
73
- $theme_settings = array();
74
- }
75
-
76
- $this->settings = wp_parse_args( $theme_settings, apply_filters( 'siteorigin_panels_settings_defaults', array() ) );
77
- $this->settings = wp_parse_args( $current_settings, $this->settings );
78
-
79
- // Filter these settings
80
- $this->settings = apply_filters( 'siteorigin_panels_settings', $this->settings );
81
- }
82
-
83
- if ( ! empty( $key ) ) {
84
- return isset( $this->settings[ $key ] ) ? $this->settings[ $key ] : null;
85
- }
86
-
87
- return $this->settings;
88
- }
89
-
90
- /**
91
- * Set a settings value
92
- *
93
- * @param $key
94
- * @param $value
95
- */
96
- function set( $key, $value ) {
97
- $current_settings = get_option( 'siteorigin_panels_settings', array() );
98
- $current_settings[ $key ] = $value;
99
- update_option( 'siteorigin_panels_settings', $current_settings );
100
- }
101
-
102
- /**
103
- * Add default settings for the Page Builder settings.
104
- *
105
- * @param $defaults
106
- *
107
- * @return mixed
108
- */
109
- function settings_defaults( $defaults ) {
110
- $defaults['home-page'] = false;
111
- $defaults['home-page-default'] = false;
112
- $defaults['home-template'] = 'home-panels.php';
113
- $defaults['affiliate-id'] = apply_filters( 'siteorigin_panels_affiliate_id', false );
114
- $defaults['display-teaser'] = true;
115
- $defaults['display-learn'] = true;
116
- $defaults['load-on-attach'] = false;
117
- $defaults['use-classic'] = true;
118
-
119
- // The general fields
120
- $defaults['post-types'] = array( 'page', 'post' );
121
- $defaults['live-editor-quick-link'] = true;
122
- $defaults['admin-widget-count'] = false;
123
- $defaults['parallax-motion'] = '';
124
- $defaults['sidebars-emulator'] = true;
125
- $defaults['layout-block-default-mode'] = 'preview';
126
-
127
- // Widgets fields
128
- $defaults['title-html'] = '<h3 class="widget-title">{{title}}</h3>';
129
- $defaults['add-widget-class'] = apply_filters( 'siteorigin_panels_default_add_widget_class', true );
130
- $defaults['bundled-widgets'] = get_option( 'siteorigin_panels_is_using_bundled', false );
131
- $defaults['recommended-widgets'] = true;
132
- $defaults['instant-open-widgets'] = false;
133
-
134
- // The layout fields
135
- $defaults['responsive'] = true;
136
- $defaults['tablet-layout'] = false;
137
- $defaults['legacy-layout'] = 'auto';
138
- $defaults['tablet-width'] = 1024;
139
- $defaults['mobile-width'] = 780;
140
- $defaults['margin-bottom'] = 30;
141
- $defaults['margin-bottom-last-row'] = false;
142
- $defaults['margin-sides'] = 30;
143
- $defaults['full-width-container'] = 'body';
144
-
145
- // Content fields
146
- $defaults['copy-content'] = true;
147
- $defaults['copy-styles'] = false;
148
-
149
- return $defaults;
150
- }
151
-
152
- /**
153
- * Set the option on whether to add widget classes for known themes
154
- *
155
- * @param $add_class
156
- *
157
- * @return bool
158
- */
159
- function add_widget_class( $add_class ) {
160
-
161
- switch ( get_option( 'stylesheet' ) ) {
162
- case 'twentysixteen';
163
- $add_class = false;
164
- break;
165
- }
166
-
167
-
168
- return $add_class;
169
- }
170
-
171
- /**
172
- * Enqueue admin scripts
173
- *
174
- * @param $prefix
175
- */
176
- function admin_scripts( $prefix ) {
177
- if ( $prefix != 'settings_page_siteorigin_panels' ) {
178
- return;
179
- }
180
- wp_enqueue_style(
181
- 'siteorigin-panels-settings',
182
- siteorigin_panels_url( 'settings/admin-settings.css' ),
183
- array(),
184
- SITEORIGIN_PANELS_VERSION
185
- );
186
- wp_enqueue_script(
187
- 'siteorigin-panels-settings',
188
- siteorigin_panels_url( 'settings/admin-settings' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
189
- array(),
190
- SITEORIGIN_PANELS_VERSION
191
- );
192
- }
193
-
194
- /**
195
- * Add the Page Builder settings page
196
- */
197
- function add_settings_page() {
198
- $page = add_options_page( __( 'SiteOrigin Page Builder', 'siteorigin-panels' ), __( 'Page Builder', 'siteorigin-panels' ), 'manage_options', 'siteorigin_panels', array(
199
- $this,
200
- 'display_settings_page'
201
- ) );
202
- add_action( 'load-' . $page, array( $this, 'add_help_tab' ) );
203
- add_action( 'load-' . $page, array( $this, 'save_settings' ) );
204
- }
205
-
206
- /**
207
- * Display the Page Builder settings page
208
- */
209
- function display_settings_page() {
210
- $settings_fields = $this->fields = apply_filters( 'siteorigin_panels_settings_fields', array() );
211
- include plugin_dir_path( __FILE__ ) . '../settings/tpl/settings.php';
212
- }
213
-
214
- /**
215
- * Add a settings help tab
216
- */
217
- function add_help_tab() {
218
- $screen = get_current_screen();
219
- ob_start();
220
- include plugin_dir_path( __FILE__ ) . '../settings/tpl/help.php';
221
- $content = ob_get_clean();
222
-
223
- $screen->add_help_tab( array(
224
- 'id' => 'panels-help-tab',
225
- 'title' => __( 'Page Builder Settings', 'siteorigin-panels' ),
226
- 'content' => $content
227
- ) );
228
- }
229
-
230
- /**
231
- * Add the default Page Builder settings.
232
- *
233
- * @param $fields
234
- *
235
- * @return mixed
236
- */
237
- function settings_fields( $fields ) {
238
- // The post types fields
239
-
240
- $fields['general'] = array(
241
- 'title' => __( 'General', 'siteorigin-panels' ),
242
- 'fields' => array(),
243
- );
244
-
245
- $fields['general']['fields']['post-types'] = array(
246
- 'type' => 'select_multi',
247
- 'label' => __( 'Post Types', 'siteorigin-panels' ),
248
- 'options' => $this->get_post_types(),
249
- 'description' => __( 'The post types on which to use Page Builder.', 'siteorigin-panels' ),
250
- );
251
-
252
- $fields['general']['fields']['use-classic'] = array(
253
- 'type' => 'checkbox',
254
- 'label' => __( 'Use Classic Editor for new posts', 'siteorigin-panels' ),
255
- 'description' => __( 'New posts of the above Post Types will be created using the Classic Editor.', 'siteorigin-panels' )
256
- );
257
-
258
- $fields['general']['fields']['live-editor-quick-link'] = array(
259
- 'type' => 'checkbox',
260
- 'label' => __( 'Live Editor Quick Link', 'siteorigin-panels' ),
261
- 'description' => __( 'Display a Live Editor button in the admin bar.', 'siteorigin-panels' ),
262
- );
263
-
264
- $fields['general']['fields']['admin-widget-count'] = array(
265
- 'type' => 'checkbox',
266
- 'label' => __( 'Display Widget Count', 'siteorigin-panels' ),
267
- 'description' => __( "Display a widget count in the admin lists of posts/pages where you're using Page Builder.", 'siteorigin-panels' ),
268
- );
269
-
270
- $fields['general']['fields']['parallax-motion'] = array(
271
- 'type' => 'float',
272
- 'label' => __( 'Limit Parallax Motion', 'siteorigin-panels' ),
273
- 'description' => __( 'How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect.', 'siteorigin-panels' ),
274
- );
275
-
276
- $fields['general']['fields']['sidebars-emulator'] = array(
277
- 'type' => 'checkbox',
278
- 'label' => __( 'Sidebars Emulator', 'siteorigin-panels' ),
279
- 'description' => __( 'Page Builder will create an emulated sidebar, that contains all widgets in the page.', 'siteorigin-panels' ),
280
- );
281
-
282
- $fields['general']['fields']['display-teaser'] = array(
283
- 'type' => 'checkbox',
284
- 'label' => __('Upgrade Teaser', 'siteorigin-panels'),
285
- 'description' => sprintf(
286
- __('Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar.', 'siteorigin-panels'),
287
- '<a href="siteorigin.com/downloads/premium/" target="_blank" rel="noopener noreferrer">',
288
- '</a>'
289
- )
290
- );
291
-
292
- $fields['general']['fields']['load-on-attach'] = array(
293
- 'type' => 'checkbox',
294
- 'label' => __( 'Default To Page Builder Interface', 'siteorigin-panels' ),
295
- 'description' => sprintf(
296
- __( 'New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s"Use Classic Editor for new posts"%s setting must be enabled.', 'siteorigin-panels' ),
297
- '<strong>',
298
- '</strong>'
299
- )
300
- );
301
-
302
- $fields['general']['fields']['layout-block-default-mode'] = array(
303
- 'label' => __( 'Layout Block Default Mode', 'siteorigin-panels' ),
304
- 'type' => 'select',
305
- 'options' => array(
306
- 'edit' => __( 'Edit', 'siteorigin-panels' ),
307
- 'preview' => __( 'Preview', 'siteorigin-panels' ),
308
- ),
309
- 'description' => __( 'Whether to display layout blocks in edit mode or preview mode in the block editor.', 'siteorigin-panels' ),
310
- );
311
-
312
- // The widgets fields
313
-
314
- $fields['widgets'] = array(
315
- 'title' => __( 'Widgets', 'siteorigin-panels' ),
316
- 'fields' => array(),
317
- );
318
-
319
- $fields['widgets']['fields']['title-html'] = array(
320
- 'type' => 'html',
321
- 'label' => __( 'Widget Title HTML', 'siteorigin-panels' ),
322
- 'description' => __( 'The HTML used for widget titles. {{title}} is replaced with the widget title.', 'siteorigin-panels' ),
323
- );
324
-
325
- $fields['widgets']['fields']['add-widget-class'] = array(
326
- 'type' => 'checkbox',
327
- 'label' => __( 'Add Widget Class', 'siteorigin-panels' ),
328
- 'description' => __( "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts.", 'siteorigin-panels' ),
329
- );
330
-
331
- $fields['widgets']['fields']['bundled-widgets'] = array(
332
- 'type' => 'checkbox',
333
- 'label' => __( 'Legacy Bundled Widgets', 'siteorigin-panels' ),
334
- 'description' => __( 'Load legacy widgets from Page Builder 1.', 'siteorigin-panels' ),
335
- );
336
-
337
- $fields['widgets']['fields']['recommended-widgets'] = array(
338
- 'type' => 'checkbox',
339
- 'label' => __( 'Recommended Widgets', 'siteorigin-panels' ),
340
- 'description' => __( 'Display recommend widgets in Page Builder add widget dialog.', 'siteorigin-panels' ),
341
- );
342
-
343
- $fields['widgets']['fields']['instant-open-widgets'] = array(
344
- 'type' => 'checkbox',
345
- 'label' => __( 'Instant Open Widgets', 'siteorigin-panels' ),
346
- 'description' => __( 'Open a widget form as soon as its added to a page.', 'siteorigin-panels' ),
347
- );
348
-
349
- // The layout fields
350
-
351
- $fields['layout'] = array(
352
- 'title' => __( 'Layout', 'siteorigin-panels' ),
353
- 'fields' => array(),
354
- );
355
-
356
- // The layout fields
357
-
358
- $fields['layout']['fields']['responsive'] = array(
359
- 'type' => 'checkbox',
360
- 'label' => __( 'Responsive Layout', 'siteorigin-panels' ),
361
- 'description' => __( 'Collapse widgets, rows and columns on mobile devices.', 'siteorigin-panels' ),
362
- );
363
-
364
- $fields['layout']['fields']['tablet-layout'] = array(
365
- 'type' => 'checkbox',
366
- 'label' => __( 'Use Tablet Layout', 'siteorigin-panels' ),
367
- 'description' => __( 'Collapses columns differently on tablet devices.', 'siteorigin-panels' ),
368
- );
369
-
370
- $fields['layout']['fields']['legacy-layout'] = array(
371
- 'type' => 'select',
372
- 'options' => array(
373
- 'auto' => __( 'Detect older browsers', 'siteorigin-panels' ),
374
- 'never' => __( 'Never', 'siteorigin-panels' ),
375
- 'always' => __( 'Always', 'siteorigin-panels' ),
376
- ),
377
- 'label' => __( 'Use Legacy Layout Engine', 'siteorigin-panels' ),
378
- 'description' => __( 'The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers.', 'siteorigin-panels' ),
379
- );
380
-
381
- $fields['layout']['fields']['tablet-width'] = array(
382
- 'type' => 'number',
383
- 'unit' => 'px',
384
- 'label' => __( 'Tablet Width', 'siteorigin-panels' ),
385
- 'description' => __( 'Device width, in pixels, to collapse into a tablet view .', 'siteorigin-panels' ),
386
- );
387
-
388
- $fields['layout']['fields']['mobile-width'] = array(
389
- 'type' => 'number',
390
- 'unit' => 'px',
391
- 'label' => __( 'Mobile Width', 'siteorigin-panels' ),
392
- 'description' => __( 'Device width, in pixels, to collapse into a mobile view .', 'siteorigin-panels' ),
393
- );
394
-
395
- $fields['layout']['fields']['margin-bottom'] = array(
396
- 'type' => 'number',
397
- 'unit' => 'px',
398
- 'label' => __( 'Row/Widget Bottom Margin', 'siteorigin-panels' ),
399
- 'description' => __( 'Default margin below rows and widgets.', 'siteorigin-panels' ),
400
- );
401
-
402
- $fields['layout']['fields']['margin-bottom-last-row'] = array(
403
- 'type' => 'checkbox',
404
- 'label' => __( 'Last Row With Margin', 'siteorigin-panels' ),
405
- 'description' => __( 'Allow margin in last row.', 'siteorigin-panels' ),
406
- );
407
-
408
- $fields['layout']['fields']['margin-sides'] = array(
409
- 'type' => 'number',
410
- 'unit' => 'px',
411
- 'label' => __( 'Row Gutter', 'siteorigin-panels' ),
412
- 'description' => __( 'Default spacing between columns in each row.', 'siteorigin-panels' ),
413
- 'keywords' => 'margin',
414
- );
415
-
416
- $fields['layout']['fields']['full-width-container'] = array(
417
- 'type' => 'text',
418
- 'label' => __( 'Full Width Container', 'siteorigin-panels' ),
419
- 'description' => __( 'The container used for the full width layout.', 'siteorigin-panels' ),
420
- 'keywords' => 'full width, container, stretch',
421
- );
422
-
423
- // The content fields
424
-
425
- $fields['content'] = array(
426
- 'title' => __( 'Content', 'siteorigin-panels' ),
427
- 'fields' => array(),
428
- );
429
-
430
- $fields['content']['fields']['copy-content'] = array(
431
- 'type' => 'checkbox',
432
- 'label' => __( 'Copy Content', 'siteorigin-panels' ),
433
- 'description' => __( 'Copy content from Page Builder to post content.', 'siteorigin-panels' ),
434
- );
435
-
436
- $fields['content']['fields']['copy-styles'] = array(
437
- 'type' => 'checkbox',
438
- 'label' => __( 'Copy Styles', 'siteorigin-panels' ),
439
- 'description' => __( 'Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated.', 'siteorigin-panels' ),
440
- );
441
-
442
- return $fields;
443
- }
444
-
445
- /**
446
- * Display a settings field
447
- *
448
- * @param $field_id
449
- * @param $field
450
- */
451
- function display_field( $field_id, $field ) {
452
- $value = siteorigin_panels_setting( $field_id );
453
-
454
- $field_name = 'panels_setting[' . $field_id . ']';
455
-
456
- switch ( $field['type'] ) {
457
- case 'text':
458
- case 'float':
459
- ?><input name="<?php echo esc_attr( $field_name ) ?>"
460
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>" type="text"
461
- value="<?php echo esc_attr( $value ) ?>" /> <?php
462
- break;
463
-
464
- case 'number':
465
- ?>
466
- <input name="<?php echo esc_attr( $field_name ) ?>" type="number"
467
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?>"
468
- value="<?php echo esc_attr( $value ) ?>"/>
469
- <?php
470
- if ( ! empty( $field['unit'] ) ) {
471
- echo esc_html( $field['unit'] );
472
- }
473
- break;
474
-
475
- case 'html':
476
- ?><textarea name="<?php echo esc_attr( $field_name ) ?>"
477
- class="panels-setting-<?php echo esc_attr( $field['type'] ) ?> widefat"
478
- rows="<?php echo ! empty( $field['rows'] ) ? intval( $field['rows'] ) : 2 ?>"><?php echo esc_textarea( $value ) ?></textarea> <?php
479
- break;
480
-
481
- case 'checkbox':
482
- ?>
483
- <label class="widefat">
484
- <input name="<?php echo esc_attr( $field_name ) ?>"
485
- type="checkbox" <?php checked( ! empty( $value ) ) ?> />
486
- <?php echo ! empty( $field['checkbox_text'] ) ? esc_html( $field['checkbox_text'] ) : __( 'Enabled', 'siteorigin-panels' ) ?>
487
- </label>
488
- <?php
489
- break;
490
-
491
- case 'select':
492
- ?>
493
- <select name="<?php echo esc_attr( $field_name ) ?>">
494
- <?php foreach ( $field['options'] as $option_id => $option ) : ?>
495
- <option
496
- value="<?php echo esc_attr( $option_id ) ?>" <?php selected( $option_id, $value ) ?>><?php echo esc_html( $option ) ?></option>
497
- <?php endforeach; ?>
498
- </select>
499
- <?php
500
- break;
501
-
502
- case 'select_multi':
503
- foreach ( $field['options'] as $option_id => $option ) {
504
- ?>
505
- <label class="widefat">
506
- <input name="<?php echo esc_attr( $field_name ) ?>[<?php echo esc_attr( $option_id ) ?>]"
507
- type="checkbox" <?php checked( in_array( $option_id, $value ) ) ?> />
508
- <?php echo esc_html( $option ) ?>
509
- </label>
510
- <?php
511
- }
512
-
513
- break;
514
- }
515
- }
516
-
517
- /**
518
- * Save the Page Builder settings.
519
- */
520
- function save_settings() {
521
- $screen = get_current_screen();
522
- if ( $screen->base != 'settings_page_siteorigin_panels' ) {
523
- return;
524
- }
525
-
526
- if ( ! current_user_can( 'manage_options' ) ) {
527
- return;
528
- }
529
- if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'panels-settings' ) ) {
530
- return;
531
- }
532
- if ( empty( $_POST['panels_setting'] ) ) {
533
- return;
534
- }
535
-
536
- $values = array();
537
- $post = stripslashes_deep( $_POST['panels_setting'] );
538
- $settings_fields = $this->fields = apply_filters( 'siteorigin_panels_settings_fields', array() );
539
-
540
- if ( empty( $settings_fields ) ) {
541
- return;
542
- }
543
-
544
- foreach ( $settings_fields as $section_id => $section ) {
545
- if ( empty( $section['fields'] ) ) {
546
- continue;
547
- }
548
-
549
- foreach ( $section['fields'] as $field_id => $field ) {
550
- // Sanitize the fields
551
- switch ( $field['type'] ) {
552
- case 'text' :
553
- $values[ $field_id ] = ! empty( $post[ $field_id ] ) ? sanitize_text_field( $post[ $field_id ] ) : '';
554
- break;
555
-
556
- case 'number':
557
- if ( $post[ $field_id ] != '' ) {
558
- $values[ $field_id ] = ! empty( $post[ $field_id ] ) ? intval( $post[ $field_id ] ) : 0;
559
- } else {
560
- $values[ $field_id ] = '';
561
- }
562
- break;
563
-
564
- case 'float':
565
- if ( $post[ $field_id ] != '' ) {
566
- $values[ $field_id ] = ! empty( $post[ $field_id ] ) ? floatval( $post[ $field_id ] ) : 0;
567
- } else {
568
- $values[ $field_id ] = '';
569
- }
570
- break;
571
-
572
- case 'html':
573
- $values[ $field_id ] = ! empty( $post[ $field_id ] ) ? $post[ $field_id ] : '';
574
- $values[ $field_id ] = wp_kses_post( $values[ $field_id ] );
575
- $values[ $field_id ] = force_balance_tags( $values[ $field_id ] );
576
- break;
577
-
578
- case 'checkbox':
579
- $values[ $field_id ] = ! empty( $post[ $field_id ] );
580
- break;
581
-
582
- case 'select':
583
- $values[ $field_id ] = ! empty( $post[ $field_id ] ) ? $post[ $field_id ] : '';
584
- if ( ! in_array( $values[ $field_id ], array_keys( $field['options'] ) ) ) {
585
- unset( $values[ $field_id ] );
586
- }
587
- break;
588
-
589
- case 'select_multi':
590
- $values[ $field_id ] = array();
591
- $multi_values = array();
592
- foreach ( $field['options'] as $option_id => $option ) {
593
- $multi_values[ $option_id ] = ! empty( $post[ $field_id ][ $option_id ] );
594
- }
595
- foreach ( $multi_values as $k => $v ) {
596
- if ( $v ) {
597
- $values[ $field_id ][] = $k;
598
- }
599
- }
600
-
601
- break;
602
- }
603
- }
604
- }
605
-
606
- // Don't let mobile width go below 320
607
- $values[ 'mobile-width' ] = max( $values[ 'mobile-width' ], 320 );
608
-
609
- // Save the values to the database
610
- update_option( 'siteorigin_panels_settings', $values );
611
- do_action( 'siteorigin_panels_save_settings', $values );
612
- $this->settings = wp_parse_args( $values, $this->settings );
613
- $this->settings_saved = true;
614
- }
615
-
616
- /**
617
- * Get a post type array
618
- *
619
- * @return array
620
- */
621
- function get_post_types() {
622
- $post_types = get_post_types( array( '_builtin' => false ) );
623
-
624
- $types = array(
625
- 'page' => 'page',
626
- 'post' => 'post'
627
- );
628
-
629
- // Don't use `array_merge` here as it will break things if a post type has a numeric slug.
630
- foreach ( $post_types as $key => $value ) {
631
- $types[ $key ] = $value;
632
- }
633
-
634
- // These are post types we know we don't want to show Page Builder on
635
- unset( $types['ml-slider'] );
636
-
637
- foreach ( $types as $type_id => $type ) {
638
- $type_object = get_post_type_object( $type_id );
639
-
640
- if ( ! $type_object->show_ui ) {
641
- unset( $types[ $type_id ] );
642
- continue;
643
- }
644
-
645
- $types[ $type_id ] = $type_object->label;
646
- }
647
-
648
- return apply_filters( 'siteorigin_panels_settings_enabled_post_types', $types );
649
- }
650
-
651
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/sidebars-emulator.php DELETED
@@ -1,215 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Sidebars_Emulator {
4
-
5
- private $all_posts_widgets;
6
-
7
- function __construct() {
8
- $this->all_posts_widgets = array();
9
- add_action( 'widgets_init', array( $this, 'register_widgets' ) );
10
- add_filter( 'sidebars_widgets', array( $this, 'add_widgets_to_sidebars' ) );
11
- }
12
-
13
- /**
14
- * Get the single instance.
15
- *
16
- * @return SiteOrigin_Panels_Sidebars_Emulator
17
- */
18
- static function single() {
19
- static $single;
20
- return empty( $single ) ? $single = new self() : $single;
21
- }
22
-
23
- /**
24
- * @param string $name The name of the function
25
- * @param array $args
26
- *
27
- * @return mixed
28
- */
29
- function __call( $name, $args ) {
30
-
31
- // Check if this is a filter option call
32
- preg_match( '/filter_option_widget_(.+)/', $name, $opt_matches );
33
- if ( ! empty( $opt_matches ) && count( $opt_matches ) > 1 ) {
34
- $opt_name = $opt_matches[1];
35
- global $wp_widget_factory;
36
- foreach ( $wp_widget_factory->widgets as $widget ) {
37
- $widget_class = get_class( $widget );
38
- if ( $widget->id_base != $opt_name ) {
39
- continue;
40
- }
41
-
42
- foreach ( $this->all_posts_widgets as $post_widgets ) {
43
- foreach ( $post_widgets as $widget_instance ) {
44
- if ( empty( $widget_instance['panels_info']['class'] ) ) {
45
- continue;
46
- }
47
-
48
- $instance_class = $widget_instance['panels_info']['class'];
49
- $sidebar_id = $this->get_sidebar_id( $widget_instance );
50
- if ( $instance_class == $widget_class && ! empty( $sidebar_id ) ) {
51
- //The option value uses only the widget id number as keys
52
- preg_match( '/-([0-9]+$)/', $sidebar_id, $num_match );
53
- $args[0][ $num_match[1] ] = $widget_instance;
54
- }
55
- }
56
- }
57
- }
58
-
59
- return $args[0];
60
- }
61
-
62
- }
63
-
64
- /**
65
- * Register all the current widgets so we can filter the get_option('widget_...') values to add instances
66
- */
67
- function register_widgets() {
68
- // Get the ID of the current post
69
- $post_id = url_to_postid( add_query_arg( false, false ) );
70
- if ( empty( $post_id ) ) {
71
- // Maybe this is the home page
72
- $current_url_path = parse_url( add_query_arg( false, false ), PHP_URL_PATH );
73
- $home_url_path = parse_url( trailingslashit( home_url() ), PHP_URL_PATH );
74
-
75
- if ( $current_url_path === $home_url_path && get_option( 'page_on_front' ) != 0 ) {
76
- $post_id = absint( get_option( 'page_on_front' ) );
77
- }
78
- }
79
- if ( empty( $post_id ) ) {
80
- return;
81
- }
82
-
83
- $panels_data = get_post_meta( $post_id, 'panels_data', true );
84
- $widget_option_names = $this->get_widget_option_names( $post_id, $panels_data );
85
- $widget_option_names = array_unique( $widget_option_names );
86
-
87
- foreach ( $widget_option_names as $widget_option_name ) {
88
- add_filter( 'option_' . $widget_option_name, array( $this, 'filter_option_' . $widget_option_name ) );
89
- }
90
- }
91
-
92
- /**
93
- * Recursively get all widget option names from $panels_data and store widget instances in $this->all_posts_widgets.
94
- *
95
- * @param int|string $post_id
96
- * @param array $panels_data
97
- *
98
- * @return array A list of widget option names from the post and its Layout Builder widgets.
99
- */
100
- private function get_widget_option_names( $post_id, $panels_data ) {
101
- if( empty( $panels_data ) || empty( $panels_data[ 'widgets' ] ) ) {
102
- return array();
103
- }
104
-
105
- if( empty( $this->all_posts_widgets[ $post_id ] ) ) {
106
- $this->all_posts_widgets[ $post_id ] = array();
107
- }
108
-
109
- $widget_option_names = array();
110
- $widgets = $panels_data['widgets'];
111
- foreach ( $widgets as $i => $widget_instance ) {
112
- if ( empty( $widget_instance['panels_info']['class'] ) ) {
113
- continue;
114
- }
115
-
116
- if( $widget_instance['panels_info']['class'] === 'SiteOrigin_Panels_Widgets_Layout' ) {
117
- // Add the widget option names from the layout widget
118
- $widget_option_names = array_merge( $widget_option_names, $this->get_widget_option_names( $post_id, $widget_instance[ 'panels_data' ] ) );
119
- }
120
- $sidebar_id = $this->get_sidebar_id( $widget_instance );
121
- if ( ! empty( $sidebar_id ) ) {
122
- $widget_option_names[] = $widget_instance['option_name'];
123
- }
124
- $this->all_posts_widgets[ $post_id ][] = $widget_instance;
125
- }
126
-
127
- return $widget_option_names;
128
- }
129
-
130
- /**
131
- * This should be called when a post is saved to set ids required for `is_active_widget` checks. It's necessary to
132
- * do this separately for widgets that call `is_active_widget` in their constructors, e.g. some of Jetpack's widgets
133
- * like Twitter Timeline, Milestone etc.
134
- *
135
- * @param $widgets array The widgets in the layout from $panels_data for which to generate ids.
136
- * @param $post_id int The post id which is used to derive ids.
137
- * @param int $start This keeps track of recursive depth.
138
- *
139
- * @return array The widgets array containing updated widgets.
140
- */
141
- public function generate_sidebar_widget_ids( $widgets, $post_id, $start = 1 ) {
142
- foreach ( $widgets as $i => &$widget_instance ) {
143
- $id_val = $post_id . strval( ( 10000 * $start ) + intval( $i ) );
144
- $widget_class = $widget_instance['panels_info']['class'];
145
-
146
-
147
- if( $widget_instance['panels_info']['class'] === 'SiteOrigin_Panels_Widgets_Layout' ) {
148
- if ( ! empty( $widget_instance['panels_data']['widgets'] ) ) {
149
- // Recursively set widget ids in layout widgets.
150
- $widget_instance[ 'panels_data' ]['widgets'] = $this->generate_sidebar_widget_ids( $widget_instance[ 'panels_data' ]['widgets'], $post_id, ++$start );
151
- }
152
- }
153
-
154
- /** @var WP_Widget $widget */
155
- $widget = SiteOrigin_Panels::get_widget_instance( $widget_class );
156
- if ( ! empty( $widget ) ) {
157
- $widget_instance['so_sidebar_emulator_id'] = $widget->id_base . '-' . $id_val;
158
- $widget_instance['option_name'] = $widget->option_name;
159
- }
160
- }
161
-
162
- return $widgets;
163
- }
164
-
165
- /**
166
- * Add a sidebar for SiteOrigin Panels widgets so they are correctly detected by is_active_widget
167
- *
168
- * @param $sidebars_widgets
169
- *
170
- * @return array
171
- */
172
- function add_widgets_to_sidebars( $sidebars_widgets ) {
173
- if ( empty( $this->all_posts_widgets ) ) {
174
- return $sidebars_widgets;
175
- }
176
-
177
- foreach ( array_keys( $this->all_posts_widgets ) as $post_id ) {
178
- $post_widgets = $this->all_posts_widgets[ $post_id ];
179
- foreach ( $post_widgets as $widget_instance ) {
180
- $sidebar_id = $this->get_sidebar_id( $widget_instance );
181
- if ( empty( $sidebar_id ) ) {
182
- continue;
183
- }
184
- //Sidebars widgets and the global $wp_registered widgets use full widget ids as keys
185
- $siteorigin_panels_widget_ids[] = $sidebar_id;
186
- }
187
- if ( ! empty( $siteorigin_panels_widget_ids ) ) {
188
- $sidebars_widgets[ 'sidebar-siteorigin_panels-post-' . $post_id ] = $siteorigin_panels_widget_ids;
189
- }
190
- }
191
-
192
- return $sidebars_widgets;
193
- }
194
-
195
- /**
196
- * The 'id' key was changed to 'so_sidebar_emulator_id' to try avoid conflicts with widgets that already had
197
- * an 'id' key.
198
- *
199
- * @param $instance
200
- *
201
- * @return null
202
- */
203
- private function get_sidebar_id( $instance ) {
204
- $sidebar_id = null;
205
- if ( ! empty( $instance['id'] ) ) {
206
- $sidebar_id = $instance['id'];
207
- } else if ( ! empty( $instance['so_sidebar_emulator_id'] ) ) {
208
- $sidebar_id = $instance['so_sidebar_emulator_id'];
209
- }
210
-
211
- return $sidebar_id;
212
- }
213
- }
214
-
215
- SiteOrigin_Panels_Sidebars_Emulator::single();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/styles-admin.php DELETED
@@ -1,513 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Styles_Admin {
4
-
5
- function __construct() {
6
- add_action( 'wp_ajax_so_panels_style_form', array( $this, 'action_style_form' ) );
7
-
8
- add_filter( 'siteorigin_panels_data', array( $this, 'convert_data' ) );
9
- add_filter( 'siteorigin_panels_prebuilt_layout', array( $this, 'convert_data' ) );
10
- }
11
-
12
- public static function single() {
13
- static $single;
14
- return empty( $single ) ? $single = new self() : $single;
15
- }
16
-
17
- /**
18
- * Admin action for handling fetching the style fields
19
- */
20
- function action_style_form() {
21
- if ( empty( $_REQUEST['_panelsnonce'] ) || ! wp_verify_nonce( $_REQUEST['_panelsnonce'], 'panels_action' ) ) {
22
- wp_die(
23
- __( 'The supplied nonce is invalid.', 'siteorigin-panels' ),
24
- __( 'Invalid nonce.', 'siteorigin-panels' ),
25
- 403
26
- );
27
- }
28
-
29
- $type = $_REQUEST['type'];
30
-
31
- if ( ! in_array( $type, array( 'row', 'cell', 'widget' ) ) ) {
32
- wp_die(
33
- __( 'Please specify the type of style form to be rendered.', 'siteorigin-panels' ),
34
- __( 'Missing style form type.', 'siteorigin-panels' ),
35
- 400
36
- );
37
- }
38
-
39
- $current = isset( $_REQUEST['style'] ) ? $_REQUEST['style'] : array();
40
- $post_id = empty( $_REQUEST['postId'] ) ? 0 : $_REQUEST['postId'];
41
-
42
- $args = ! empty( $_POST['args'] ) ? json_decode( stripslashes( $_POST['args'] ), true ) : array();
43
-
44
- switch ( $type ) {
45
- case 'row':
46
- $this->render_styles_fields( 'row', '<h3>' . __( 'Row Styles', 'siteorigin-panels' ) . '</h3>', '', $current, $post_id, $args );
47
- break;
48
-
49
- case 'cell':
50
- $cell_number = isset( $args['index'] ) ? ' ' . ( intval( $args['index'] ) + 1 ) : '';
51
- $this->render_styles_fields( 'cell', '<h3>' . sprintf( __( 'Cell%s Styles', 'siteorigin-panels' ), $cell_number ) . '</h3>', '', $current, $post_id, $args );
52
- break;
53
-
54
- case 'widget':
55
- $this->render_styles_fields( 'widget', '<h3>' . __( 'Widget Styles', 'siteorigin-panels' ) . '</h3>', '', $current, $post_id, $args );
56
- break;
57
- }
58
-
59
- wp_die();
60
- }
61
-
62
- /**
63
- * Render all the style fields
64
- *
65
- * @param $section
66
- * @param string $before
67
- * @param string $after
68
- * @param array $current
69
- * @param int $post_id
70
- * @param array $args Arguments passed by the builder
71
- *
72
- * @return bool
73
- */
74
- function render_styles_fields( $section, $before = '', $after = '', $current = array(), $post_id = 0, $args = array() ) {
75
- $fields = array();
76
- $fields = apply_filters( 'siteorigin_panels_' . $section . '_style_fields', $fields, $post_id, $args );
77
- $fields = apply_filters( 'siteorigin_panels_general_style_fields', $fields, $post_id, $args );
78
- if ( empty( $fields ) ) {
79
- return false;
80
- }
81
-
82
- $groups = array(
83
- 'attributes' => array(
84
- 'name' => __( 'Attributes', 'siteorigin-panels' ),
85
- 'priority' => 5
86
- ),
87
- 'layout' => array(
88
- 'name' => __( 'Layout', 'siteorigin-panels' ),
89
- 'priority' => 10
90
- ),
91
- 'design' => array(
92
- 'name' => __( 'Design', 'siteorigin-panels' ),
93
- 'priority' => 15
94
- ),
95
- );
96
-
97
- // Check if we need a default group
98
- foreach ( $fields as $field_id => $field ) {
99
- if ( empty( $field['group'] ) || $field['group'] == 'theme' ) {
100
- if ( empty( $groups['theme'] ) ) {
101
- $groups['theme'] = array(
102
- 'name' => __( 'Theme', 'siteorigin-panels' ),
103
- 'priority' => 10
104
- );
105
- }
106
- $fields[ $field_id ]['group'] = 'theme';
107
- }
108
- }
109
- $groups = apply_filters( 'siteorigin_panels_' . $section . '_style_groups', $groups, $post_id, $args );
110
- $groups = apply_filters( 'siteorigin_panels_general_style_groups', $groups, $post_id, $args );
111
-
112
- // Sort the style fields and groups by priority
113
- uasort( $fields, array( $this, 'sort_fields' ) );
114
- uasort( $groups, array( $this, 'sort_fields' ) );
115
-
116
- echo $before;
117
-
118
- $group_counts = array();
119
- foreach ( $fields as $field_id => $field ) {
120
- if ( empty( $group_counts[ $field['group'] ] ) ) {
121
- $group_counts[ $field['group'] ] = 0;
122
- }
123
- $group_counts[ $field['group'] ] ++;
124
- }
125
-
126
- foreach ( $groups as $group_id => $group ) {
127
-
128
- if ( empty( $group_counts[ $group_id ] ) ) {
129
- continue;
130
- }
131
-
132
- ?>
133
- <div class="style-section-wrapper">
134
- <div class="style-section-head">
135
- <h4><?php echo esc_html( $group['name'] ) ?></h4>
136
- </div>
137
- <div class="style-section-fields" style="display: none">
138
- <?php
139
- foreach ( $fields as $field_id => $field ) {
140
- $default = isset( $field[ 'default' ] ) ? $field[ 'default' ] : false;
141
-
142
- if ( $field['group'] == $group_id ) {
143
- ?>
144
- <div class="style-field-wrapper">
145
- <?php if ( ! empty( $field['name'] ) ) : ?>
146
- <label><?php echo $field['name'] ?></label>
147
- <?php endif; ?>
148
- <div
149
- class="style-field style-field-<?php echo sanitize_html_class( $field['type'] ) ?>">
150
- <?php $this->render_style_field( $field, isset( $current[ $field_id ] ) ? $current[ $field_id ] : $default, $field_id, $current ) ?>
151
- </div>
152
- </div>
153
- <?php
154
-
155
- }
156
-
157
- }
158
- ?>
159
- </div>
160
- </div>
161
- <?php
162
- }
163
-
164
- echo $after;
165
- }
166
-
167
- /**
168
- * Generate the style field
169
- *
170
- * @param array $field Everything needed to display the field
171
- * @param $current
172
- * @param $field_id
173
- * @param $current_styles
174
- */
175
- function render_style_field( $field, $current, $field_id, $current_styles ) {
176
- $field_name = 'style[' . $field_id . ']';
177
-
178
- echo '<div class="style-input-wrapper">';
179
- switch ( $field['type'] ) {
180
- case 'measurement' :
181
-
182
- if ( ! empty( $field['multiple'] ) ) {
183
- ?>
184
- <div class="measurement-inputs">
185
- <div class="measurement-wrapper">
186
- <input type="text" class="measurement-value measurement-top"
187
- placeholder="<?php _e( 'Top', 'siteorigin-panels' ) ?>"/>
188
- </div>
189
- <div class="measurement-wrapper">
190
- <input type="text" class="measurement-value measurement-right"
191
- placeholder="<?php _e( 'Right', 'siteorigin-panels' ) ?>"/>
192
- </div>
193
- <div class="measurement-wrapper">
194
- <input type="text" class="measurement-value measurement-bottom"
195
- placeholder="<?php _e( 'Bottom', 'siteorigin-panels' ) ?>"/>
196
- </div>
197
- <div class="measurement-wrapper">
198
- <input type="text" class="measurement-value measurement-left"
199
- placeholder="<?php _e( 'Left', 'siteorigin-panels' ) ?>"/>
200
- </div>
201
- </div>
202
- <?php
203
- } else {
204
- ?><input type="text" class="measurement-value measurement-value-single"/><?php
205
- }
206
-
207
- ?>
208
- <select
209
- class="measurement-unit measurement-unit-<?php echo ! empty( $field['multiple'] ) ? 'multiple' : 'single' ?>">
210
- <?php foreach ( $this->measurements_list() as $measurement ): ?>
211
- <option
212
- value="<?php echo esc_html( $measurement ) ?>"><?php echo esc_html( $measurement ) ?></option>
213
- <?php endforeach ?>
214
- </select>
215
- <input type="hidden" name="<?php echo esc_attr( $field_name ) ?>"
216
- value="<?php echo esc_attr( $current ) ?>"/>
217
- <?php
218
- break;
219
-
220
- case 'color' :
221
- ?>
222
- <input type="text" name="<?php echo esc_attr( $field_name ) ?>"
223
- value="<?php echo esc_attr( $current ) ?>" class="so-wp-color-field"/>
224
- <?php
225
- break;
226
-
227
- case 'image' :
228
- $image = false;
229
- if ( ! empty( $current ) ) {
230
- $image = SiteOrigin_Panels_Styles::get_attachment_image_src( $current, 'thumbnail' );
231
- }
232
-
233
- $fallback_url = ( ! empty( $current_styles[ $field_id . '_fallback' ] ) && $current_styles[ $field_id . '_fallback' ] !== 'false' ? $current_styles[ $field_id . '_fallback' ] : '' );
234
- $fallback_field_name = 'style[' . $field_id . '_fallback]';
235
-
236
- ?>
237
- <div class="so-image-selector">
238
- <div class="current-image" <?php if ( ! empty( $image ) ) {
239
- echo 'style="background-image: url(' . esc_url( $image[0] ) . ');"';
240
- } ?>>
241
- </div>
242
-
243
- <div class="select-image">
244
- <?php _e( 'Select Image', 'siteorigin-panels' ) ?>
245
- </div>
246
- <input type="hidden" name="<?php echo esc_attr( $field_name ) ?>"
247
- value="<?php echo intval( $current ) ?>"/>
248
- </div>
249
- <a href="#" class="remove-image<?php if ( empty( $current ) ) echo ' hidden' ?>"><?php _e( 'Remove', 'siteorigin-panels' ) ?></a>
250
-
251
- <input type="text" value="<?php echo esc_url( $fallback_url ) ?>"
252
- placeholder="<?php esc_attr_e( 'External URL', 'siteorigin-panels' ) ?>"
253
- name="<?php echo esc_attr( $fallback_field_name ) ?>"
254
- class="image-fallback widefat" />
255
- <?php
256
- break;
257
-
258
- case 'url' :
259
- case 'text' :
260
- ?><input type="text" name="<?php echo esc_attr( $field_name ) ?>"
261
- value="<?php echo esc_attr( $current ) ?>" class="widefat" /><?php
262
- break;
263
-
264
- case 'checkbox' :
265
- $current = (bool) $current;
266
- ?>
267
- <label class="so-checkbox-label">
268
- <input type="checkbox" name="<?php echo esc_attr( $field_name ) ?>" <?php checked( $current ) ?> />
269
- <?php echo esc_html( isset( $field['label'] ) ? $field['label'] : __( 'Enabled', 'siteorigin-panels' ) ) ?>
270
- </label>
271
- <?php
272
- break;
273
-
274
- case 'select' :
275
- ?>
276
- <select name="<?php echo esc_attr( $field_name ) ?>">
277
- <?php foreach ( $field['options'] as $k => $v ) : ?>
278
- <option
279
- value="<?php echo esc_attr( $k ) ?>" <?php selected( $current, $k ) ?>><?php echo esc_html( $v ) ?></option>
280
- <?php endforeach; ?>
281
- </select>
282
- <?php
283
- break;
284
-
285
- case 'radio' :
286
- $radio_id = $field_name . '-' . uniqid();
287
- foreach ( $field['options'] as $k => $v ) :
288
- ?>
289
- <label for="<?php echo esc_attr( $radio_id . '-' . $k ) ?>">
290
- <input type="radio" name="<?php echo esc_attr( $radio_id ) ?>"
291
- id="<?php echo esc_attr( $radio_id . '-' . $k ) ?>"
292
- value="<?php echo esc_attr( $k ) ?>" <?php checked( $k, $current ) ?>> <?php echo esc_html( $v ) ?>
293
- </label>
294
- <?php
295
- endforeach;
296
- break;
297
-
298
- case 'textarea' :
299
- case 'code' :
300
- ?><textarea type="text" name="<?php echo esc_attr( $field_name ) ?>"
301
- class="widefat <?php if ( $field['type'] == 'code' ) {
302
- echo 'so-field-code';
303
- } ?>" rows="4"><?php echo esc_textarea( $current ) ?></textarea><?php
304
- break;
305
- }
306
-
307
- echo '</div>';
308
-
309
- if ( ! empty( $field['description'] ) ) {
310
- ?><p class="so-description"><?php echo wp_kses_post( $field['description'] ) ?></p><?php
311
- }
312
- }
313
-
314
- /**
315
- * Sanitize the style fields in panels_data
316
- *
317
- * @param $panels_data
318
- *
319
- * @return mixed
320
- */
321
- function sanitize_all( $panels_data ) {
322
- if ( ! empty( $panels_data['widgets'] ) ) {
323
- // Sanitize the widgets
324
- for ( $i = 0; $i < count( $panels_data['widgets'] ); $i ++ ) {
325
- if ( empty( $panels_data['widgets'][ $i ]['panels_info']['style'] ) ) {
326
- continue;
327
- }
328
- $panels_data['widgets'][ $i ]['panels_info']['style'] = $this->sanitize_style_fields( 'widget', $panels_data['widgets'][ $i ]['panels_info']['style'] );
329
- }
330
- }
331
-
332
- if ( ! empty( $panels_data['grids'] ) ) {
333
- // The rows
334
- for ( $i = 0; $i < count( $panels_data['grids'] ); $i ++ ) {
335
- if ( empty( $panels_data['grids'][ $i ]['style'] ) ) {
336
- continue;
337
- }
338
- $panels_data['grids'][ $i ]['style'] = $this->sanitize_style_fields( 'row', $panels_data['grids'][ $i ]['style'] );
339
- }
340
- }
341
-
342
- if ( ! empty( $panels_data['grid_cells'] ) ) {
343
- // And finally, the cells
344
- for ( $i = 0; $i < count( $panels_data['grid_cells'] ); $i ++ ) {
345
- if ( empty( $panels_data['grid_cells'][ $i ]['style'] ) ) {
346
- continue;
347
- }
348
- $panels_data['grid_cells'][ $i ]['style'] = $this->sanitize_style_fields( 'cell', $panels_data['grid_cells'][ $i ]['style'] );
349
- }
350
- }
351
-
352
- return $panels_data;
353
- }
354
-
355
- /**
356
- * Sanitize style fields.
357
- *
358
- * @param $section
359
- * @param $styles
360
- *
361
- * @return array Sanitized styles
362
- */
363
- function sanitize_style_fields( $section, $styles ) {
364
- // Use the filter to get the fields for this section.
365
- if ( empty( $fields_cache[ $section ] ) ) {
366
- // This filter doesn't pass in the arguments $post_id and $args
367
- // Plugins looking to extend fields, should always add their fields if these are empty
368
- $fields_cache[ $section ] = array();
369
- $fields_cache[ $section ] = apply_filters( 'siteorigin_panels_' . $section . '_style_fields', $fields_cache[ $section ], false, false );
370
- $fields_cache[ $section ] = apply_filters( 'siteorigin_panels_general_style_fields', $fields_cache[ $section ], false, false );
371
- }
372
- $fields = $fields_cache[ $section ];
373
-
374
- if ( empty( $fields ) ) {
375
- return array();
376
- }
377
-
378
- $return = array();
379
- foreach ( $fields as $k => $field ) {
380
- // Skip this if no field type is set
381
- if ( empty( $field['type'] ) ) {
382
- continue;
383
- }
384
-
385
- // Handle the special case of a checkbox
386
- if ( $field['type'] == 'checkbox' ) {
387
- $return[ $k ] = ! empty( $styles[ $k ] ) ? true : '';
388
- continue;
389
- }
390
-
391
- // Ignore this if we don't even have a value for the style, unless 'image' field which might have a fallback.
392
- if ( ! isset( $styles[ $k ] ) || ( $field['type'] != 'image' && $styles[ $k ] == '' ) ) {
393
- continue;
394
- }
395
-
396
- switch ( $field['type'] ) {
397
- case 'color' :
398
- $color = $styles[ $k ];
399
- if ( preg_match( '|^#([A-Fa-f0-9]{3,8})$|', $color ) ) {
400
- $return[ $k ] = $color;
401
- } else {
402
- $return[ $k ] = '';
403
- }
404
- break;
405
- case 'image' :
406
- $return[ $k ] = ! empty( $styles[ $k ] ) ? sanitize_text_field( $styles[ $k ] ) : false;
407
- $fallback_name = $k . '_fallback';
408
- if ( empty( $styles[ $k ] ) && empty( $styles[ $fallback_name ] ) ) {
409
- break;
410
- }
411
- $return[ $fallback_name ] = ! empty( $styles[ $fallback_name ] ) ? esc_url_raw( $styles[ $fallback_name ] ) : false;
412
- break;
413
- case 'url' :
414
- $return[ $k ] = esc_url_raw( $styles[ $k ] );
415
- break;
416
- case 'measurement' :
417
- $measurements = array_map( 'preg_quote', $this->measurements_list() );
418
- if ( ! empty( $field['multiple'] ) ) {
419
- if ( preg_match_all( '/(?:(-?[0-9\.,]+).*?(' . implode( '|', $measurements ) . ')+)/', $styles[ $k ], $match ) ) {
420
- $return[ $k ] = $styles[ $k ];
421
- } else {
422
- $return[ $k ] = '';
423
- }
424
- } else {
425
- if ( preg_match( '/([-?0-9\.,]+).*?(' . implode( '|', $measurements ) . ')/', $styles[ $k ], $match ) ) {
426
- $return[ $k ] = $match[1] . $match[2];
427
- } else {
428
- $return[ $k ] = '';
429
- }
430
- }
431
- break;
432
- case 'select' :
433
- case 'radio' :
434
- if ( ! empty( $styles[ $k ] ) && in_array( $styles[ $k ], array_keys( $field['options'] ) ) ) {
435
- $return[ $k ] = $styles[ $k ];
436
- }
437
- break;
438
- default:
439
- // Just pass the value through.
440
- $return[ $k ] = $styles[ $k ];
441
- break;
442
-
443
- }
444
- }
445
-
446
- return $return;
447
- }
448
-
449
- /**
450
- * Convert the single string attribute of the grid style into an array.
451
- *
452
- * @param $panels_data
453
- *
454
- * @return mixed
455
- */
456
- function convert_data( $panels_data ) {
457
- if ( empty( $panels_data ) || empty( $panels_data['grids'] ) || ! is_array( $panels_data['grids'] ) ) {
458
- return $panels_data;
459
- }
460
-
461
- foreach( $panels_data['grids'] as & $grid ) {
462
- if ( ! is_array( $grid ) || empty( $grid ) || empty( $grid['style'] ) ) {
463
- continue;
464
- }
465
-
466
- if ( is_string( $grid['style'] ) ) {
467
- $grid['style'] = array(
468
- $grid['style']
469
- );
470
- }
471
- }
472
-
473
- return $panels_data;
474
- }
475
-
476
- /**
477
- * Get list of supported mesurements
478
- *
479
- * @return array
480
- */
481
- function measurements_list() {
482
- $measurements = array(
483
- 'px',
484
- '%',
485
- 'in',
486
- 'cm',
487
- 'mm',
488
- 'em',
489
- 'ex',
490
- 'pt',
491
- 'pc',
492
- 'rem'
493
- );
494
-
495
- // Allow themes and plugins to trim or enhance the list.
496
- return apply_filters( 'siteorigin_panels_style_get_measurements_list', $measurements );
497
- }
498
-
499
- /**
500
- * User sort function to sort by the priority key value.
501
- *
502
- * @param $a
503
- * @param $b
504
- *
505
- * @return int
506
- */
507
- static function sort_fields( $a, $b ) {
508
- return ( ( isset( $a['priority'] ) ? $a['priority'] : 10 ) > ( isset( $b['priority'] ) ? $b['priority'] : 10 ) ) ? 1 : - 1;
509
- }
510
- }
511
-
512
- // Initialise all the default styling
513
- SiteOrigin_Panels_Styles::single();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/styles.php DELETED
@@ -1,709 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class for handling all the default styling.
5
- *
6
- * Class SiteOrigin_Panels_Default_Styles
7
- */
8
- class SiteOrigin_Panels_Styles {
9
-
10
- public function __construct() {
11
- add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ), 5 );
12
-
13
- // Adding all the fields
14
- add_filter( 'siteorigin_panels_row_style_fields', array( $this, 'row_style_fields' ) );
15
- add_filter( 'siteorigin_panels_cell_style_fields', array( $this, 'cell_style_fields' ) );
16
- add_filter( 'siteorigin_panels_widget_style_fields', array( $this, 'widget_style_fields' ) );
17
-
18
- // Style wrapper attributes
19
- add_filter( 'siteorigin_panels_row_style_attributes', array( $this, 'general_style_attributes' ), 10, 2 );
20
- add_filter( 'siteorigin_panels_row_style_attributes', array( $this, 'row_style_attributes' ), 10, 2 );
21
- add_filter( 'siteorigin_panels_row_style_attributes', array( $this, 'vantage_row_style_attributes' ), 11, 2 );
22
- add_filter( 'siteorigin_panels_cell_style_attributes', array( $this, 'general_style_attributes' ), 10, 2 );
23
- add_filter( 'siteorigin_panels_widget_style_attributes', array( $this, 'general_style_attributes' ), 10, 2 );
24
-
25
- // Style wrapper CSS
26
- add_filter( 'siteorigin_panels_row_style_css', array( $this, 'general_style_css' ), 10, 2 );
27
- add_filter( 'siteorigin_panels_cell_style_css', array( $this, 'general_style_css' ), 10, 2 );
28
- add_filter( 'siteorigin_panels_widget_style_css', array( $this, 'general_style_css' ), 10, 2 );
29
-
30
- add_filter( 'siteorigin_panels_row_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
31
- add_filter( 'siteorigin_panels_cell_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
32
- add_filter( 'siteorigin_panels_widget_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
33
-
34
- // Main filter to add any custom CSS.
35
- add_filter( 'siteorigin_panels_css_object', array( $this, 'filter_css_object' ), 10, 4 );
36
-
37
- // Filtering specific attributes
38
- add_filter( 'siteorigin_panels_css_row_margin_bottom', array( $this, 'filter_row_bottom_margin' ), 10, 2 );
39
- add_filter( 'siteorigin_panels_css_row_gutter', array( $this, 'filter_row_gutter' ), 10, 2 );
40
- add_filter( 'siteorigin_panels_css_widget_css', array( $this, 'filter_widget_style_css' ), 10, 2 );
41
- }
42
-
43
- public static function single() {
44
- static $single;
45
- return empty( $single ) ? $single = new self() : $single;
46
- }
47
-
48
- static function register_scripts() {
49
- wp_register_script(
50
- 'siteorigin-panels-front-styles',
51
- siteorigin_panels_url( 'js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
52
- array( 'jquery' ),
53
- SITEORIGIN_PANELS_VERSION
54
- );
55
- wp_register_script(
56
- 'siteorigin-parallax',
57
- siteorigin_panels_url( 'js/siteorigin-parallax' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
58
- array( 'jquery' ),
59
- SITEORIGIN_PANELS_VERSION
60
- );
61
- wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
62
- 'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting( 'full-width-container' ) )
63
- ) );
64
- }
65
-
66
- /**
67
- * These are general styles that apply to all elements
68
- *
69
- * @param $label
70
- *
71
- * @return array
72
- */
73
- static function get_general_style_fields( $id, $label ) {
74
- $fields = array();
75
-
76
- // All the attribute fields
77
-
78
- $fields['id'] = array(
79
- 'name' => sprintf( __( '%s ID', 'siteorigin-panels' ), $label ),
80
- 'type' => 'text',
81
- 'group' => 'attributes',
82
- 'description' => sprintf( __( 'A custom ID used for this %s.', 'siteorigin-panels' ), strtolower( $label ) ),
83
- 'priority' => 4,
84
- );
85
-
86
- $fields['class'] = array(
87
- 'name' => sprintf( __( '%s Class', 'siteorigin-panels' ), $label ),
88
- 'type' => 'text',
89
- 'group' => 'attributes',
90
- 'description' => __( 'A CSS class', 'siteorigin-panels' ),
91
- 'priority' => 5,
92
- );
93
-
94
- $fields[ $id . '_css' ] = array(
95
- 'name' => __( 'CSS Styles', 'siteorigin-panels' ),
96
- 'type' => 'code',
97
- 'group' => 'attributes',
98
- 'description' => __( 'One style attribute per line.', 'siteorigin-panels' ),
99
- 'priority' => 10,
100
- );
101
-
102
- $fields[ 'mobile_css' ] = array(
103
- 'name' => __( 'Mobile CSS Styles', 'siteorigin-panels' ),
104
- 'type' => 'code',
105
- 'group' => 'attributes',
106
- 'description' => __( 'CSS applied when in mobile view.', 'siteorigin-panels' ),
107
- 'priority' => 11,
108
- );
109
-
110
- // The layout fields
111
-
112
- $fields['padding'] = array(
113
- 'name' => __( 'Padding', 'siteorigin-panels' ),
114
- 'type' => 'measurement',
115
- 'group' => 'layout',
116
- 'description' => sprintf( __( 'Padding around the entire %s.', 'siteorigin-panels' ), strtolower( $label ) ),
117
- 'priority' => 7,
118
- 'multiple' => true
119
- );
120
-
121
- $fields['mobile_padding'] = array(
122
- 'name' => __( 'Mobile Padding', 'siteorigin-panels' ),
123
- 'type' => 'measurement',
124
- 'group' => 'layout',
125
- 'description' => __( 'Padding when on mobile devices.', 'siteorigin-panels' ),
126
- 'priority' => 8,
127
- 'multiple' => true
128
- );
129
-
130
- // The general design fields
131
-
132
- $fields['background'] = array(
133
- 'name' => __( 'Background Color', 'siteorigin-panels' ),
134
- 'type' => 'color',
135
- 'group' => 'design',
136
- 'description' => sprintf( __( 'Background color of the %s.', 'siteorigin-panels' ), strtolower( $label ) ),
137
- 'priority' => 5,
138
- );
139
-
140
- $fields['background_image_attachment'] = array(
141
- 'name' => __( 'Background Image', 'siteorigin-panels' ),
142
- 'type' => 'image',
143
- 'group' => 'design',
144
- 'description' => sprintf( __( 'Background image of the %s.', 'siteorigin-panels' ), strtolower( $label ) ),
145
- 'priority' => 6,
146
- );
147
-
148
- $fields['background_display'] = array(
149
- 'name' => __( 'Background Image Display', 'siteorigin-panels' ),
150
- 'type' => 'select',
151
- 'group' => 'design',
152
- 'options' => array(
153
- 'tile' => __( 'Tiled Image', 'siteorigin-panels' ),
154
- 'cover' => __( 'Cover', 'siteorigin-panels' ),
155
- 'center' => __( 'Centered, with original size', 'siteorigin-panels' ),
156
- 'fixed' => __( 'Fixed', 'siteorigin-panels' ),
157
- 'parallax' => __( 'Parallax', 'siteorigin-panels' ),
158
- 'parallax-original' => __( 'Parallax (Original Size)', 'siteorigin-panels' ),
159
- ),
160
- 'description' => __( 'How the background image is displayed.', 'siteorigin-panels' ),
161
- 'priority' => 7,
162
- );
163
-
164
- $fields['border_color'] = array(
165
- 'name' => __( 'Border Color', 'siteorigin-panels' ),
166
- 'type' => 'color',
167
- 'group' => 'design',
168
- 'description' => sprintf( __( 'Border color of the %s.', 'siteorigin-panels' ), strtolower( $label ) ),
169
- 'priority' => 10,
170
- );
171
-
172
- return $fields;
173
- }
174
-
175
- /**
176
- * All the row styling fields
177
- *
178
- * @param $fields
179
- *
180
- * @return array
181
- */
182
- static function row_style_fields( $fields ) {
183
- // Add the general fields
184
- $fields = wp_parse_args( $fields, self::get_general_style_fields( 'row', __( 'Row', 'siteorigin-panels' ) ) );
185
-
186
- $fields['cell_class'] = array(
187
- 'name' => __( 'Cell Class', 'siteorigin-panels' ),
188
- 'type' => 'text',
189
- 'group' => 'attributes',
190
- 'description' => __( 'Class added to all cells in this row.', 'siteorigin-panels' ),
191
- 'priority' => 6,
192
- );
193
-
194
- // Add the layout fields
195
-
196
- $fields['bottom_margin'] = array(
197
- 'name' => __( 'Bottom Margin', 'siteorigin-panels' ),
198
- 'type' => 'measurement',
199
- 'group' => 'layout',
200
- 'description' => sprintf( __( 'Space below the row. Default is %spx.', 'siteorigin-panels' ), siteorigin_panels_setting( 'margin-bottom' ) ),
201
- 'priority' => 5,
202
- );
203
-
204
- $fields['gutter'] = array(
205
- 'name' => __( 'Gutter', 'siteorigin-panels' ),
206
- 'type' => 'measurement',
207
- 'group' => 'layout',
208
- 'description' => sprintf( __( 'Amount of space between cells. Default is %spx.', 'siteorigin-panels' ), siteorigin_panels_setting( 'margin-sides' ) ),
209
- 'priority' => 6,
210
- );
211
-
212
- $fields['row_stretch'] = array(
213
- 'name' => __( 'Row Layout', 'siteorigin-panels' ),
214
- 'type' => 'select',
215
- 'group' => 'layout',
216
- 'options' => array(
217
- '' => __( 'Standard', 'siteorigin-panels' ),
218
- 'full' => __( 'Full Width', 'siteorigin-panels' ),
219
- 'full-stretched' => __( 'Full Width Stretched', 'siteorigin-panels' ),
220
- 'full-stretched-padded' => __( 'Full Width Stretched Padded', 'siteorigin-panels' ),
221
- ),
222
- 'priority' => 10,
223
- );
224
-
225
- $fields['collapse_behaviour'] = array(
226
- 'name' => __( 'Collapse Behaviour', 'siteorigin-panels' ),
227
- 'type' => 'select',
228
- 'group' => 'layout',
229
- 'options' => array(
230
- '' => __( 'Standard', 'siteorigin-panels' ),
231
- 'no_collapse' => __( 'No Collapse', 'siteorigin-panels' ),
232
- ),
233
- 'priority' => 15,
234
- );
235
-
236
- $fields['collapse_order'] = array(
237
- 'name' => __( 'Collapse Order', 'siteorigin-panels' ),
238
- 'type' => 'select',
239
- 'group' => 'layout',
240
- 'options' => array(
241
- '' => __( 'Default', 'siteorigin-panels' ),
242
- 'left-top' => __( 'Left on Top', 'siteorigin-panels' ),
243
- 'right-top' => __( 'Right on Top', 'siteorigin-panels' ),
244
- ),
245
- 'priority' => 16,
246
- );
247
-
248
- if ( siteorigin_panels_setting( 'legacy-layout' ) != 'always' ) {
249
- $fields['cell_alignment'] = array(
250
- 'name' => __( 'Cell Vertical Alignment', 'siteorigin-panels' ),
251
- 'type' => 'select',
252
- 'group' => 'layout',
253
- 'options' => array(
254
- 'flex-start' => __( 'Top', 'siteorigin-panels' ),
255
- 'center' => __( 'Center', 'siteorigin-panels' ),
256
- 'flex-end' => __( 'Bottom', 'siteorigin-panels' ),
257
- 'stretch' => __( 'Stretch', 'siteorigin-panels' ),
258
- ),
259
- 'priority' => 17,
260
- );
261
- }
262
-
263
- return $fields;
264
- }
265
-
266
- /**
267
- * All the cell styling fields
268
- *
269
- * @param $fields
270
- *
271
- * @return array
272
- */
273
- static function cell_style_fields( $fields ) {
274
- // Add the general fields
275
- $fields = wp_parse_args( $fields, self::get_general_style_fields( 'cell', __( 'Cell', 'siteorigin-panels' ) ) );
276
-
277
- $fields['vertical_alignment'] = array(
278
- 'name' => __( 'Vertical Alignment', 'siteorigin-panels' ),
279
- 'type' => 'select',
280
- 'group' => 'layout',
281
- 'options' => array(
282
- 'auto' => __( 'Use row setting', 'siteorigin-panels' ),
283
- 'flex-start' => __( 'Top', 'siteorigin-panels' ),
284
- 'center' => __( 'Center', 'siteorigin-panels' ),
285
- 'flex-end' => __( 'Bottom', 'siteorigin-panels' ),
286
- 'stretch' => __( 'Stretch', 'siteorigin-panels' ),
287
- ),
288
- 'priority' => 16,
289
- );
290
-
291
- $fields['font_color'] = array(
292
- 'name' => __( 'Font Color', 'siteorigin-panels' ),
293
- 'type' => 'color',
294
- 'group' => 'design',
295
- 'description' => __( 'Color of text inside this cell.', 'siteorigin-panels' ),
296
- 'priority' => 15,
297
- );
298
-
299
- $fields['link_color'] = array(
300
- 'name' => __( 'Links Color', 'siteorigin-panels' ),
301
- 'type' => 'color',
302
- 'group' => 'design',
303
- 'description' => __( 'Color of links inside this cell.', 'siteorigin-panels' ),
304
- 'priority' => 16,
305
- );
306
-
307
- return $fields;
308
- }
309
-
310
- /**
311
- * @param $fields
312
- *
313
- * @return array
314
- */
315
- static function widget_style_fields( $fields ) {
316
-
317
- // Add the general fields
318
- $fields = wp_parse_args( $fields, self::get_general_style_fields( 'widget', __( 'Widget', 'siteorigin-panels' ) ) );
319
-
320
- $fields['margin'] = array(
321
- 'name' => __( 'Margin', 'siteorigin-panels' ),
322
- 'type' => 'measurement',
323
- 'group' => 'layout',
324
- 'description' => __( 'Margins around the widget.', 'siteorigin-panels' ),
325
- 'priority' => 6,
326
- 'multiple' => true
327
- );
328
-
329
- // How lets add the design fields
330
-
331
- $fields['font_color'] = array(
332
- 'name' => __( 'Font Color', 'siteorigin-panels' ),
333
- 'type' => 'color',
334
- 'group' => 'design',
335
- 'description' => __( 'Color of text inside this widget.', 'siteorigin-panels' ),
336
- 'priority' => 15,
337
- );
338
-
339
- $fields['link_color'] = array(
340
- 'name' => __( 'Links Color', 'siteorigin-panels' ),
341
- 'type' => 'color',
342
- 'group' => 'design',
343
- 'description' => __( 'Color of links inside this widget.', 'siteorigin-panels' ),
344
- 'priority' => 16,
345
- );
346
-
347
- return $fields;
348
- }
349
-
350
- /**
351
- * Style attributes that apply to rows, cells and widgets
352
- *
353
- * @param $attributes
354
- * @param $style
355
- *
356
- * @return array $attributes
357
- */
358
- static function general_style_attributes( $attributes, $style ){
359
- if ( ! empty( $style['class'] ) ) {
360
- if( ! is_array( $style['class'] ) ) {
361
- $style['class'] = explode( ' ', $style[ 'class' ] );
362
- }
363
- $attributes['class'] = array_merge( $attributes['class'], $style['class'] );
364
- }
365
-
366
- if ( ! empty( $style['background_display'] ) &&
367
- ! empty( $style['background_image_attachment'] )
368
- ) {
369
-
370
- $url = self::get_attachment_image_src( $style['background_image_attachment'], 'full' );
371
-
372
- if (
373
- ! empty( $url ) &&
374
- ( $style['background_display'] == 'parallax' || $style['background_display'] == 'parallax-original' )
375
- ) {
376
- wp_enqueue_script( 'siteorigin-parallax' );
377
- $parallax_args = array(
378
- 'backgroundUrl' => $url[0],
379
- 'backgroundSize' => array( $url[1], $url[2] ),
380
- 'backgroundSizing' => $style['background_display'] == 'parallax-original' ? 'original' : 'scaled',
381
- 'limitMotion' => siteorigin_panels_setting( 'parallax-motion' ) ? floatval( siteorigin_panels_setting( 'parallax-motion' ) ) : 'auto',
382
- );
383
- $attributes['data-siteorigin-parallax'] = json_encode( $parallax_args );
384
- }
385
- }
386
-
387
- if ( ! empty( $style['id'] ) ) {
388
- $attributes['id'] = sanitize_html_class( $style['id'] );
389
- }
390
-
391
- return $attributes;
392
- }
393
-
394
- static function row_style_attributes( $attributes, $style ) {
395
- if ( ! empty( $style['row_stretch'] ) ) {
396
- $attributes['class'][] = 'siteorigin-panels-stretch';
397
- $attributes['data-stretch-type'] = $style['row_stretch'];
398
- wp_enqueue_script( 'siteorigin-panels-front-styles' );
399
- }
400
-
401
- return $attributes;
402
- }
403
-
404
- static function vantage_row_style_attributes( $attributes, $style ) {
405
- if ( isset( $style['class'] ) && $style['class'] == 'wide-grey' && ! empty( $attributes['style'] ) ) {
406
- $attributes['style'] = preg_replace( '/padding-left: 1000px; padding-right: 1000px;/', '', $attributes['style'] );
407
- }
408
-
409
- return $attributes;
410
- }
411
-
412
- /**
413
- * Get the CSS styles that apply to all rows, cells and widgets
414
- *
415
- * @param $css
416
- * @param $style
417
- *
418
- * @return mixed
419
- */
420
- static function general_style_css( $css, $style ){
421
-
422
- if ( ! empty( $style['background'] ) ) {
423
- $css[ 'background-color' ] = $style['background'];
424
- }
425
-
426
- if ( ! empty( $style['background_display'] ) &&
427
- ! ( empty( $style['background_image_attachment'] ) && empty( $style['background_image_attachment_fallback'] ) )
428
- ) {
429
- $url = self::get_attachment_image_src( $style['background_image_attachment'], 'full' );
430
-
431
- if ( empty( $url ) && ! empty( $style['background_image_attachment_fallback'] ) ) {
432
- $url = $style['background_image_attachment_fallback'];
433
- }
434
-
435
- if ( ! empty( $url ) ) {
436
- $css['background-image'] = 'url(' .( is_array( $url ) ? $url[0] : $url ) . ')';
437
-
438
- switch ( $style['background_display'] ) {
439
- case 'parallax':
440
- case 'parallax-original':
441
- $css[ 'background-position' ] = 'center center';
442
- $css[ 'background-repeat' ] = 'no-repeat';
443
- break;
444
- case 'tile':
445
- $css[ 'background-repeat' ] = 'repeat';
446
- break;
447
- case 'cover':
448
- $css[ 'background-position' ] = 'center center';
449
- $css[ 'background-size' ] = 'cover';
450
- break;
451
- case 'center':
452
- $css[ 'background-position' ] = 'center center';
453
- $css[ 'background-repeat' ] = 'no-repeat';
454
- break;
455
- case 'fixed':
456
- $css[ 'background-attachment' ] = 'fixed';
457
- $css[ 'background-position' ] = 'center center';
458
- $css[ 'background-size' ] = 'cover';
459
- break;
460
- }
461
- }
462
- }
463
-
464
- if ( ! empty( $style[ 'border_color' ] ) ) {
465
- $css[ 'border' ] = '1px solid ' . $style['border_color'];
466
- }
467
-
468
- if ( ! empty( $style[ 'font_color' ] ) ) {
469
- $css[ 'color' ] = $style['font_color'];
470
- }
471
-
472
- if( ! empty( $style[ 'padding' ] ) ) {
473
- $css['padding'] = $style[ 'padding' ];
474
- }
475
-
476
- // Find which key the CSS is stored in
477
- foreach( array( 'row_css', 'cell_css', 'widget_css', '' ) as $css_key ) {
478
- if( empty( $css_key ) || ! empty( $style[ $css_key ] ) ) {
479
- break;
480
- }
481
- }
482
- if ( ! empty( $css_key ) && ! empty( $style[ $css_key ] ) ) {
483
- preg_match_all( '/^([A-Za-z0-9\-]+?):(.+?);?$/m', $style[ $css_key ], $matches );
484
-
485
- if ( ! empty( $matches[0] ) ) {
486
- for ( $i = 0; $i < count( $matches[0] ); $i ++ ) {
487
- $css[ $matches[1][ $i ] ] = $matches[2][ $i ];
488
- }
489
- }
490
- }
491
-
492
- return $css;
493
- }
494
-
495
- /**
496
- * Get the mobile styling for rows, cells and widgets
497
- *
498
- * @param $css
499
- * @param $style
500
- *
501
- * @return mixed
502
- */
503
- static function general_style_mobile_css( $css, $style ){
504
- if( ! empty( $style['mobile_padding'] ) ) {
505
- $css['padding'] = $style[ 'mobile_padding' ];
506
- }
507
-
508
- if ( ! empty( $style['background_display'] ) &&
509
- $style['background_display'] == 'fixed' &&
510
- ! ( empty( $style['background_image_attachment'] ) && empty( $style['background_image_attachment_fallback'] ) )
511
- ) {
512
- $css[ 'background-attachment' ] = 'scroll';
513
- }
514
-
515
- if ( ! empty( $style[ 'mobile_css' ] ) ) {
516
- preg_match_all( '/^([A-Za-z0-9\-]+?):(.+?);?$/m', $style[ 'mobile_css' ], $matches );
517
-
518
- if ( ! empty( $matches[0] ) ) {
519
- for ( $i = 0; $i < count( $matches[0] ); $i ++ ) {
520
- $css[ $matches[1][ $i ] ] = $matches[2][ $i ];
521
- }
522
- }
523
- }
524
-
525
- return $css;
526
- }
527
-
528
- /**
529
- * @param SiteOrigin_Panels_Css_Builder $css
530
- * @param $panels_data
531
- * @param $post_id
532
- *
533
- * @return mixed
534
- */
535
- static function filter_css_object( $css, $panels_data, $post_id, $layout ) {
536
- $mobile_width = siteorigin_panels_setting( 'mobile-width' );
537
- if( empty( $layout ) ) {
538
- return $css;
539
- }
540
-
541
- foreach( $layout as $ri => $row ) {
542
- if( empty( $row[ 'style' ] ) ) $row[ 'style' ] = array();
543
-
544
- $standard_css = apply_filters( 'siteorigin_panels_row_style_css', array(), $row['style'] );
545
- $mobile_css = apply_filters( 'siteorigin_panels_row_style_mobile_css', array(), $row['style'] );
546
-
547
- if ( ! empty( $standard_css ) ) {
548
- $css->add_row_css(
549
- $post_id,
550
- $ri,
551
- '> .panel-row-style',
552
- $standard_css
553
- );
554
- }
555
- if ( ! empty( $mobile_css ) ) {
556
- $css->add_row_css(
557
- $post_id,
558
- $ri,
559
- '> .panel-row-style',
560
- $mobile_css,
561
- $mobile_width
562
- );
563
- }
564
-
565
- // Add in flexbox alignment to the main row element
566
- if ( siteorigin_panels_setting( 'legacy-layout' ) != 'always' && ! SiteOrigin_Panels::is_legacy_browser() && ! empty( $row['style']['cell_alignment'] ) ) {
567
- $css->add_row_css(
568
- $post_id,
569
- $ri,
570
- array( '.panel-no-style', '.panel-has-style > .panel-row-style' ),
571
- array(
572
- '-webkit-align-items' => $row['style']['cell_alignment'],
573
- 'align-items' => $row['style']['cell_alignment'],
574
- )
575
- );
576
- }
577
-
578
- // Process the cells if there are any
579
- if( empty( $row[ 'cells' ] ) ) continue;
580
-
581
- foreach( $row[ 'cells' ] as $ci => $cell ) {
582
- if( empty( $cell[ 'style' ] ) ) $cell[ 'style' ] = array();
583
-
584
- $standard_css = apply_filters( 'siteorigin_panels_cell_style_css', array(), $cell['style'] );
585
- $mobile_css = apply_filters( 'siteorigin_panels_cell_style_mobile_css', array(), $cell['style'] );
586
-
587
- if ( ! empty( $standard_css ) ) {
588
- $css->add_cell_css(
589
- $post_id,
590
- $ri,
591
- $ci,
592
- '> .panel-cell-style',
593
- $standard_css
594
- );
595
- }
596
- if ( ! empty( $mobile_css ) ) {
597
- $css->add_cell_css(
598
- $post_id,
599
- $ri,
600
- $ci,
601
- '> .panel-cell-style',
602
- $mobile_css,
603
- $mobile_width
604
- );
605
- }
606
-
607
- if ( ! empty( $cell[ 'style' ]['vertical_alignment'] ) ) {
608
- $css->add_cell_css(
609
- $post_id,
610
- $ri,
611
- $ci,
612
- '',
613
- array(
614
- 'align-self' => $cell[ 'style' ]['vertical_alignment']
615
- )
616
- );
617
- }
618
-
619
- // Process the widgets if there are any
620
- if( empty( $cell[ 'widgets' ] ) ) continue;
621
-
622
- foreach( $cell['widgets'] as $wi => $widget ) {
623
- if ( empty( $widget['panels_info'] ) ) continue;
624
- if ( empty( $widget['panels_info']['style'] ) ) $widget['panels_info']['style'] = array();
625
-
626
- $standard_css = apply_filters( 'siteorigin_panels_widget_style_css', array(), $widget['panels_info']['style'] );
627
- $mobile_css = apply_filters( 'siteorigin_panels_widget_style_mobile_css', array(), $widget['panels_info']['style'] );
628
-
629
- if( ! empty( $standard_css ) ) {
630
- $css->add_widget_css(
631
- $post_id,
632
- $ri,
633
- $ci,
634
- $wi,
635
- '> .panel-widget-style',
636
- $standard_css
637
- );
638
- }
639
-
640
- if( ! empty( $mobile_css ) ) {
641
- $css->add_widget_css(
642
- $post_id,
643
- $ri,
644
- $ci,
645
- $wi,
646
- '> .panel-widget-style',
647
- $mobile_css,
648
- $mobile_width
649
- );
650
- }
651
-
652
- if ( ! empty( $widget['panels_info']['style']['link_color'] ) ) {
653
- $css->add_widget_css( $post_id, $ri, $ci, $wi, ' a', array(
654
- 'color' => $widget['panels_info']['style']['link_color']
655
- ) );
656
- }
657
- }
658
- }
659
- }
660
-
661
- return $css;
662
- }
663
-
664
- static function filter_row_bottom_margin( $margin, $grid ) {
665
- if ( ! empty( $grid['style']['bottom_margin'] ) ) {
666
- $margin = $grid['style']['bottom_margin'];
667
- }
668
-
669
- return $margin;
670
- }
671
-
672
- static function filter_row_gutter( $gutter, $grid ) {
673
- if ( ! empty( $grid['style']['gutter'] ) ) {
674
- $gutter = $grid['style']['gutter'];
675
- }
676
-
677
- return $gutter;
678
- }
679
-
680
- /**
681
- * Adds widget specific styles not included in the general style fields.
682
- *
683
- * @param $widget_css The CSS properties and values
684
- * @param $widget_style_data The style settings as obtained from the style fields.
685
- *
686
- * @return mixed
687
- */
688
- static function filter_widget_style_css( $widget_css, $widget_style_data ) {
689
- if ( ! empty( $widget_style_data['margin'] ) ) {
690
- $widget_css['margin'] = $widget_style_data['margin'];
691
- }
692
-
693
- return $widget_css;
694
- }
695
-
696
- public static function get_attachment_image_src( $image, $size = 'full' ){
697
- if( empty( $image ) ) {
698
- return false;
699
- }
700
- else if( is_numeric( $image ) ) {
701
- return wp_get_attachment_image_src( $image, $size );
702
- }
703
- else if( is_string( $image ) ) {
704
- preg_match( '/(.*?)\#([0-9]+)x([0-9]+)$/', $image, $matches );
705
- return ! empty( $matches ) ? $matches : false;
706
- }
707
- }
708
-
709
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/widget-shortcode.php DELETED
@@ -1,122 +0,0 @@
1
- <?php
2
-
3
- class SiteOrigin_Panels_Widget_Shortcode {
4
-
5
- static $text_widgets = array(
6
- 'SiteOrigin_Widget_Editor_Widget',
7
- 'SiteOrigin_Panels_Widgets_Layout',
8
- 'WP_Widget_Black_Studio_TinyMCE',
9
- 'WP_Widget_Text',
10
- );
11
-
12
- static function init() {
13
- add_shortcode( 'siteorigin_widget', 'SiteOrigin_Panels_Widget_Shortcode::shortcode' );
14
- }
15
-
16
- static function add_filters() {
17
- add_filter( 'siteorigin_panels_the_widget_html', 'SiteOrigin_Panels_Widget_Shortcode::widget_html', 10, 4 );
18
- }
19
-
20
- static function remove_filters(){
21
- remove_filter( 'siteorigin_panels_the_widget_html', 'SiteOrigin_Panels_Widget_Shortcode::widget_html' );
22
- }
23
-
24
- /**
25
- * This shortcode just displays a widget based on the given arguments
26
- *
27
- * @param $attr
28
- * @param $content
29
- *
30
- * @return string
31
- */
32
- static function shortcode( $attr, $content ){
33
- $attr = shortcode_atts( array(
34
- 'class' => false,
35
- 'id' => '',
36
- ), $attr, 'siteorigin_widget' );
37
-
38
- $attr[ 'class' ] = html_entity_decode( $attr[ 'class' ] );
39
- $attr[ 'class' ] = apply_filters( 'siteorigin_panels_widget_class', $attr[ 'class' ] );
40
-
41
- $the_widget = ! empty( $attr[ 'class' ] ) ? SiteOrigin_Panels::get_widget_instance( $attr['class'] ) : null;
42
- if( ! empty( $the_widget ) ) {
43
-
44
- $data = self::decode_data( $content );
45
-
46
- $widget_args = ! empty( $data[ 'args' ] ) ? $data[ 'args' ] : array();
47
- $widget_instance = ! empty( $data[ 'instance' ] ) ? $data[ 'instance' ] : array();
48
-
49
- $widget_args = wp_parse_args( array(
50
- 'before_widget' => '',
51
- 'after_widget' => '',
52
- 'before_title' => '<h3 class="widget-title">',
53
- 'after_title' => '</h3>',
54
- ), $widget_args );
55
-
56
- ob_start();
57
- $the_widget->widget( $widget_args, $widget_instance );
58
- return ob_get_clean();
59
- }
60
- }
61
-
62
- /**
63
- * Get the shortcode for a specific widget
64
- *
65
- * @param $widget
66
- * @param $args
67
- * @param $instance
68
- *
69
- * @return string
70
- */
71
- static function get_shortcode( $widget, $args, $instance ){
72
- unset( $instance[ 'panels_info' ] );
73
-
74
- $data = array(
75
- 'instance' => $instance,
76
- 'args' => $args,
77
- );
78
-
79
- // This allows other plugins to implement their own shortcode. For example, to work when Page Builder isn't active
80
- $shortcode_name = apply_filters( 'siteorigin_panels_cache_shortcode', 'siteorigin_widget', $widget, $instance, $args );
81
-
82
- $shortcode = '[' . $shortcode_name . ' ';
83
- $shortcode .= 'class="' . htmlentities( preg_replace( '/\\\\+/', '\\\\\\\\', get_class( $widget ) ) ) . '"]';
84
- $shortcode .= self::encode_data( $data ) ;
85
- $shortcode .= '[/' . $shortcode_name . ']';
86
-
87
- return $shortcode;
88
- }
89
-
90
- /**
91
- * A filter to replace widgets with
92
- */
93
- static function widget_html( $html, $widget, $args, $instance ){
94
- if(
95
- empty( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] ) ||
96
- // Don't try create HTML if there already is some
97
- ! empty( $html ) ||
98
- ! is_object( $widget ) ||
99
- // Skip for known text based widgets
100
- in_array( get_class( $widget ), self::$text_widgets )
101
- ) {
102
- return $html;
103
- }
104
-
105
- return self::get_shortcode( $widget, $args, $instance );
106
- }
107
-
108
- static function encode_data( $data ){
109
- return '<input type="hidden" value="' . htmlentities( json_encode( $data ), ENT_QUOTES ) . '" />';
110
- }
111
-
112
- static function decode_data( $string ){
113
- preg_match( '/value="([^"]*)"/', trim( $string ), $matches );
114
- if( ! empty( $matches[1] ) ) {
115
- $data = json_decode( html_entity_decode( $matches[1], ENT_QUOTES ), true );
116
- return $data;
117
- }
118
- else {
119
- return array();
120
- }
121
- }
122
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/widgets/layout.php DELETED
@@ -1,129 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * This widget give you the full Page Builder interface inside a widget. Fully nestable.
5
- *
6
- * Class SiteOrigin_Panels_Widgets_Builder
7
- */
8
- class SiteOrigin_Panels_Widgets_Layout extends WP_Widget {
9
- function __construct() {
10
- parent::__construct(
11
- 'siteorigin-panels-builder',
12
- // TRANSLATORS: This is the name of a widget
13
- __( 'Layout Builder', 'siteorigin-panels' ),
14
- array(
15
- 'description' => __( 'A complete SiteOrigin Page Builder layout as a widget.', 'siteorigin-panels' ),
16
- 'panels_title' => false,
17
- ),
18
- array(
19
- )
20
- );
21
- }
22
-
23
- function widget($args, $instance) {
24
- if( empty($instance['panels_data']) ) return;
25
-
26
- if( is_string( $instance['panels_data'] ) ) {
27
- $instance['panels_data'] = json_decode( $instance['panels_data'], true );
28
- }
29
- if(empty($instance['panels_data']['widgets'])) return;
30
-
31
- if( ! empty( $instance['panels_data']['widgets'] ) ) {
32
- foreach( $instance['panels_data']['widgets'] as & $widget ) {
33
- $widget['panels_info']['class'] = str_replace( '&#92;', '\\', $widget['panels_info']['class'] );
34
- }
35
- }
36
-
37
- if( empty( $instance['builder_id'] ) ) $instance['builder_id'] = uniqid();
38
-
39
- echo $args['before_widget'];
40
- echo SiteOrigin_Panels::renderer()->render( 'w'.$instance['builder_id'], true, $instance['panels_data'], $layout_data );
41
- if( ! empty( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] ) && siteorigin_panels_setting( 'copy-styles' ) ) {
42
- $widget_css = '@import url(' . SiteOrigin_Panels::front_css_url() . '); ';
43
- $widget_css .= SiteOrigin_Panels::renderer()->generate_css( 'w'.$instance['builder_id'], $instance['panels_data'], $layout_data );
44
- $widget_css = preg_replace( '/\s+/', ' ', $widget_css );
45
- echo "\n\n" .
46
- '<style type="text/css" class="panels-style" data-panels-style-for-post="' . esc_attr( 'w'.$instance['builder_id'] ) . '">' .
47
- $widget_css .
48
- '</style>';
49
- }
50
- echo $args['after_widget'];
51
- }
52
-
53
- function update($new, $old) {
54
- $new['builder_id'] = uniqid();
55
-
56
- if( is_string($new['panels_data']) && ! empty( $new['panels_data'] ) ) {
57
- // This is still in a string format, so we'll convert it to an array for sanitization
58
- $new['panels_data'] = json_decode( $new['panels_data'], true );
59
- }
60
-
61
- if ( ! empty( $new['panels_data'] ) && ! empty( $new['panels_data']['widgets'] ) ) {
62
- $new['panels_data']['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets(
63
- $new['panels_data']['widgets'],
64
- ! empty( $old['panels_data']['widgets'] ) ? $old['panels_data']['widgets'] : false
65
- );
66
- foreach( $new['panels_data']['widgets'] as & $widget ) {
67
- $widget['panels_info']['class'] = str_replace( '\\', '&#92;', $widget['panels_info']['class'] );
68
- }
69
- }
70
-
71
- return $new;
72
- }
73
-
74
- function form( $instance ){
75
-
76
- if ( ! is_admin() ) {
77
- ?>
78
- <p>
79
- <?php _e( 'This widget can currently only be used in the WordPress admin interface.', 'siteorigin-panels' ) ?>
80
- </p>
81
- <?php
82
- return;
83
- }
84
-
85
- $instance = wp_parse_args($instance, array(
86
- 'panels_data' => '',
87
- 'builder_id' => uniqid(),
88
- ) );
89
- $form_id = uniqid();
90
-
91
- if( ! empty( $instance['panels_data']['widgets'] ) ) {
92
- foreach( $instance['panels_data']['widgets'] as & $widget ) {
93
- $widget['panels_info']['class'] = str_replace( '&#92;', '\\', $widget['panels_info']['class'] );
94
- }
95
- }
96
-
97
- if( ! is_string( $instance['panels_data'] ) ) {
98
- $instance['panels_data'] = json_encode( $instance['panels_data'] );
99
- }
100
-
101
- ?>
102
- <div class="siteorigin-page-builder-widget" id="siteorigin-page-builder-widget-<?php echo esc_attr( $form_id ) ?>" data-builder-id="<?php echo esc_attr( $form_id ) ?>" data-type="layout_widget">
103
- <p>
104
- <button class="button-secondary siteorigin-panels-display-builder" ><?php _e('Open Builder', 'siteorigin-panels') ?></button>
105
- </p>
106
-
107
- <input type="hidden" data-panels-filter="json_parse" value="" class="panels-data" name="<?php echo $this->get_field_name('panels_data') ?>" id="<?php echo $this->get_field_id('panels_data') ?>" />
108
-
109
- <script type="text/javascript">
110
- ( function( panelsData ){
111
- // Create the panels_data input
112
- document.getElementById('<?php echo $this->get_field_id('panels_data') ?>').value = JSON.stringify( panelsData );
113
- } )( <?php echo $instance['panels_data']; ?> );
114
- </script>
115
-
116
- <input type="hidden" value="<?php echo esc_attr( $instance['builder_id'] ) ?>" name="<?php echo $this->get_field_name('builder_id') ?>" />
117
- </div>
118
- <script type="text/javascript">
119
- if(
120
- typeof jQuery.fn.soPanelsSetupBuilderWidget != 'undefined' &&
121
- ( ! jQuery('body').hasClass('wp-customizer') || jQuery( "#siteorigin-page-builder-widget-<?php echo esc_attr( $form_id ) ?>").closest( '.panel-dialog' ).length )
122
- ) {
123
- jQuery( "#siteorigin-page-builder-widget-<?php echo esc_attr( $form_id ) ?>").soPanelsSetupBuilderWidget();
124
- }
125
- </script>
126
- <?php
127
- }
128
-
129
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/widgets/post-content.php DELETED
@@ -1,76 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Widget for displaying content from a post
5
- *
6
- * Class SiteOrigin_Panels_Widgets_PostContent
7
- */
8
- class SiteOrigin_Panels_Widgets_PostContent extends WP_Widget {
9
- function __construct() {
10
- parent::__construct(
11
- 'siteorigin-panels-post-content',
12
- __( 'Post Content', 'siteorigin-panels' ),
13
- array(
14
- 'description' => __( 'Displays content from the current post.', 'siteorigin-panels' ),
15
- )
16
- );
17
- }
18
-
19
- function widget( $args, $instance ) {
20
- if( is_admin() ) return;
21
-
22
- echo $args['before_widget'];
23
- $content = apply_filters('siteorigin_panels_widget_post_content', $this->default_content($instance['type']));
24
- echo $content;
25
- echo $args['after_widget'];
26
- }
27
-
28
- /**
29
- * The default content for post types
30
- * @param $type
31
- * @return string
32
- */
33
- function default_content($type){
34
- global $post;
35
- if(empty($post)) return;
36
-
37
- switch($type) {
38
- case 'title' :
39
- return '<h1 class="entry-title">' . $post->post_title . '</h1>';
40
- case 'content' :
41
- return '<div class="entry-content">' . wpautop($post->post_content) . '</div>';
42
- case 'featured' :
43
- if(!has_post_thumbnail()) return '';
44
- return '<div class="featured-image">' . get_the_post_thumbnail($post->ID) . '</div>';
45
- default :
46
- return '';
47
- }
48
- }
49
-
50
- function update($new, $old){
51
- return $new;
52
- }
53
-
54
- function form( $instance ) {
55
- $instance = wp_parse_args($instance, array(
56
- 'type' => 'content',
57
- ));
58
-
59
- $types = apply_filters('siteorigin_panels_widget_post_content_types', array(
60
- '' => __('None', 'siteorigin-panels'),
61
- 'title' => __('Title', 'siteorigin-panels'),
62
- 'featured' => __('Featured Image', 'siteorigin-panels'),
63
- ));
64
-
65
- ?>
66
- <p>
67
- <label for="<?php echo $this->get_field_id( 'type' ) ?>"><?php _e( 'Display Content', 'siteorigin-panels' ) ?></label>
68
- <select id="<?php echo $this->get_field_id( 'type' ) ?>" name="<?php echo $this->get_field_name( 'type' ) ?>">
69
- <?php foreach ($types as $type_id => $title) : ?>
70
- <option value="<?php echo esc_attr($type_id) ?>" <?php selected($type_id, $instance['type']) ?>><?php echo esc_html($title) ?></option>
71
- <?php endforeach ?>
72
- </select>
73
- </p>
74
- <?php
75
- }
76
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/widgets/post-loop-helper.php DELETED
@@ -1,100 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * A helper widget for the main SiteOrigin_Panels_Widgets_PostLoop class
5
- *
6
- * Class SiteOrigin_Panels_Widgets_PostLoop_Helper
7
- */
8
- class SiteOrigin_Panels_Widgets_PostLoop_Helper extends SiteOrigin_Widget {
9
-
10
- /**
11
- * SiteOrigin_Panels_Widgets_PostLoop_Helper constructor.
12
- *
13
- * @param array $templates
14
- */
15
- function __construct( $templates ) {
16
-
17
- $template_options = array();
18
- if( ! empty( $templates ) ) {
19
- foreach( $templates as $template ) {
20
- $headers = get_file_data( locate_template( $template ), array(
21
- 'loop_name' => 'Loop Name',
22
- ) );
23
- $template_options[ $template ] = esc_html( ! empty( $headers['loop_name'] ) ? $headers['loop_name'] : $template );
24
- }
25
- }
26
-
27
- parent::__construct(
28
- 'siteorigin-panels-postloop-helper',
29
- __( 'Post Loop', 'siteorigin-panels' ),
30
- array(
31
- 'description' => __( 'Displays a post loop.', 'siteorigin-panels' ),
32
- 'has_preview' => false,
33
- ),
34
- array(),
35
- array(
36
- 'title' => array(
37
- 'type' => 'text',
38
- 'label' => __( 'Title', 'siteorigin-panels' ),
39
- ),
40
- 'template' => array(
41
- 'type' => 'select',
42
- 'label' => __( 'Template', 'siteorigin-panels' ),
43
- 'options' => $template_options,
44
- 'default' => 'loop.php',
45
- ),
46
- 'more' => array(
47
- 'type' => 'checkbox',
48
- 'label' => __( 'More link', 'so-widgets-bundle' ),
49
- 'description' => __( 'If the template supports it, cut posts and display the more link.', 'siteorigin-panels' ),
50
- 'default' => false,
51
- ),
52
- 'posts' => array(
53
- 'type' => 'posts',
54
- 'label' => __( 'Posts query', 'so-widgets-bundle' ),
55
- 'hide' => true
56
- ),
57
- )
58
- );
59
- }
60
-
61
- /**
62
- * Convert this instance into one that's compatible with the posts field
63
- *
64
- * @param $instance
65
- *
66
- * @return mixed
67
- */
68
- function modify_instance( $instance ) {
69
- if( ! empty( $instance['post_type'] ) ) {
70
- $value = array();
71
-
72
- if( ! empty( $instance['post_type'] ) ) $value['post_type'] = $instance['post_type'];
73
- if( ! empty( $instance['posts_per_page'] ) ) $value['posts_per_page'] = $instance['posts_per_page'];
74
- if( ! empty( $instance['order'] ) ) $value['order'] = $instance['order'];
75
- if( ! empty( $instance['orderby'] ) ) $value['orderby'] = $instance['orderby'];
76
- if( ! empty( $instance['sticky'] ) ) $value['sticky'] = $instance['sticky'];
77
- if( ! empty( $instance['additional'] ) ) $value['additional'] = $instance['additional'];
78
- $instance[ 'posts' ] = $value;
79
-
80
- unset( $instance[ 'post_type' ] );
81
- unset( $instance[ 'posts_per_page' ] );
82
- unset( $instance[ 'order' ] );
83
- unset( $instance[ 'orderby' ] );
84
- unset( $instance[ 'sticky' ] );
85
- unset( $instance[ 'additional' ] );
86
- }
87
-
88
- return $instance;
89
- }
90
-
91
- /**
92
- * @param array $args
93
- * @param array $instance
94
- *
95
- * @return bool
96
- */
97
- function widget( $args, $instance ) {
98
- return false;
99
- }
100
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/inc/widgets/post-loop.php DELETED
@@ -1,422 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Display a loop of posts.
5
- *
6
- * Class SiteOrigin_Panels_Widgets_PostLoop
7
- */
8
- class SiteOrigin_Panels_Widgets_PostLoop extends WP_Widget {
9
-
10
- static $rendering_loop;
11
-
12
- static $current_loop_template;
13
- static $current_loop_instance;
14
-
15
- /**
16
- * @var SiteOrigin_Panels_Widgets_PostLoop_Helper
17
- */
18
- private $helper;
19
-
20
- function __construct() {
21
- parent::__construct(
22
- 'siteorigin-panels-postloop',
23
- __( 'Post Loop', 'siteorigin-panels' ),
24
- array(
25
- 'description' => __( 'Displays a post loop.', 'siteorigin-panels' ),
26
- ),
27
- array(
28
- 'width' => 800,
29
- )
30
- );
31
- }
32
-
33
- /**
34
- * Are we currently rendering a post loop
35
- *
36
- * @return bool
37
- */
38
- static function is_rendering_loop() {
39
- return self::$rendering_loop;
40
- }
41
-
42
- /**
43
- * Which post loop is currently being rendered
44
- *
45
- * @return array
46
- */
47
- static function get_current_loop_template() {
48
- return self::$current_loop_template;
49
- }
50
-
51
- /**
52
- * Which post loop is currently being rendered
53
- *
54
- * @return array
55
- */
56
- static function get_current_loop_instance() {
57
- return self::$current_loop_instance;
58
- }
59
-
60
- /**
61
- * Update the widget
62
- *
63
- * @param array $new
64
- * @param array $old
65
- * @return array
66
- */
67
- function update( $new, $old ){
68
- if( class_exists( 'SiteOrigin_Widget' ) && class_exists( 'SiteOrigin_Widget_Field_Posts' ) ) {
69
- $helper = $this->get_helper_widget( $this->get_loop_templates() );
70
- return $helper->update( $new, $old );
71
- }
72
- else {
73
- $new['more'] = !empty( $new['more'] );
74
- return $new;
75
- }
76
- }
77
-
78
- /**
79
- * @param array $args
80
- * @param array $instance
81
- */
82
- function widget( $args, $instance ) {
83
- if( empty( $instance['template'] ) ) return;
84
- if( is_admin() ) return;
85
-
86
- static $depth = 0;
87
- $depth++;
88
- if( $depth > 1 ) {
89
- // Because of infinite loops, don't render this post loop if its inside another
90
- $depth--;
91
- echo $args['before_widget'].$args['after_widget'];
92
- return;
93
- }
94
-
95
- $query_args = $instance;
96
- //If Widgets Bundle post selector is available and a posts query has been saved using it.
97
- if ( function_exists( 'siteorigin_widget_post_selector_process_query' ) && ! empty( $instance['posts'] ) ) {
98
- $query_args = siteorigin_widget_post_selector_process_query($instance['posts']);
99
- $query_args['additional'] = empty($instance['additional']) ? array() : $instance['additional'];
100
- }
101
- else {
102
- if ( ! empty( $instance['posts'] ) ) {
103
- // This is using the new WB 1.9 posts field
104
- $query_args = wp_parse_args( $instance['posts'], $query_args );
105
- }
106
-
107
- if( ! empty( $query_args['sticky'] ) ) {
108
- switch( $query_args['sticky'] ){
109
- case 'ignore' :
110
- $query_args['ignore_sticky_posts'] = 1;
111
- break;
112
- case 'only' :
113
- $query_args['post__in'] = get_option( 'sticky_posts' );
114
- break;
115
- case 'exclude' :
116
- $query_args['post__not_in'] = get_option( 'sticky_posts' );
117
- break;
118
- }
119
- }
120
- unset($query_args['template']);
121
- unset($query_args['title']);
122
- unset($query_args['sticky']);
123
- if (empty($query_args['additional'])) {
124
- $query_args['additional'] = array();
125
- }
126
- }
127
- $query_args = wp_parse_args($query_args['additional'], $query_args);
128
- unset($query_args['additional']);
129
-
130
- global $wp_rewrite;
131
-
132
- if( $wp_rewrite->using_permalinks() ) {
133
-
134
- if( get_query_var('paged') ) {
135
- // When the widget appears on a sub page.
136
- $query_args['paged'] = get_query_var('paged');
137
- }
138
- elseif( strpos( $_SERVER['REQUEST_URI'], '/page/' ) !== false ) {
139
- // When the widget appears on the home page.
140
- preg_match('/\/page\/([0-9]+)\//', $_SERVER['REQUEST_URI'], $matches);
141
- if(!empty($matches[1])) $query_args['paged'] = intval($matches[1]);
142
- else $query_args['paged'] = 1;
143
- }
144
- else $query_args['paged'] = 1;
145
- }
146
- else {
147
- // Get current page number when we're not using permalinks
148
- $query_args['paged'] = isset($_GET['paged']) ? intval($_GET['paged']) : 1;
149
- }
150
-
151
- // Exclude the current post to prevent possible infinite loop
152
-
153
- global $siteorigin_panels_current_post;
154
-
155
- if( !empty($siteorigin_panels_current_post) ){
156
- if( !empty( $query_args['post__not_in'] ) ){
157
- if( !is_array( $query_args['post__not_in'] ) ){
158
- $query_args['post__not_in'] = explode( ',', $query_args['post__not_in'] );
159
- $query_args['post__not_in'] = array_map( 'intval', $query_args['post__not_in'] );
160
- }
161
- $query_args['post__not_in'][] = $siteorigin_panels_current_post;
162
- }
163
- else {
164
- $query_args['post__not_in'] = array( $siteorigin_panels_current_post );
165
- }
166
- }
167
-
168
- if( !empty($query_args['post__in']) && !is_array($query_args['post__in']) ) {
169
- $query_args['post__in'] = explode(',', $query_args['post__in']);
170
- $query_args['post__in'] = array_map('intval', $query_args['post__in']);
171
- }
172
-
173
- // Create the query
174
- query_posts( apply_filters( 'siteorigin_panels_postloop_query_args', $query_args ) );
175
- echo $args['before_widget'];
176
-
177
- // Filter the title
178
- $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
179
- if ( !empty( $instance['title'] ) ) {
180
- echo $args['before_title'] . $instance['title'] . $args['after_title'];
181
- }
182
-
183
- global $more; $old_more = $more; $more = empty($instance['more']);
184
- self::$rendering_loop = true;
185
- self::$current_loop_instance = $instance;
186
- self::$current_loop_template = $instance['template'];
187
- if(strpos('/'.$instance['template'], '/content') !== false) {
188
- while( have_posts() ) {
189
- the_post();
190
- locate_template($instance['template'], true, false);
191
- }
192
- }
193
- else {
194
- locate_template($instance['template'], true, false);
195
- }
196
- self::$rendering_loop = false;
197
- self::$current_loop_instance = null;
198
- self::$current_loop_template = null;
199
-
200
- echo $args['after_widget'];
201
-
202
- // Reset everything
203
- wp_reset_query();
204
- $depth--;
205
- }
206
-
207
- /**
208
- * Display the form for the post loop.
209
- *
210
- * @param array $instance
211
- * @return string|void
212
- */
213
- function form( $instance ) {
214
- $templates = $this->get_loop_templates();
215
- if( empty($templates) ) {
216
- ?><p><?php _e("Your theme doesn't have any post loops.", 'siteorigin-panels') ?></p><?php
217
- return;
218
- }
219
-
220
- // If the Widgets Bundle is installed and the post selector is available, use that.
221
- // Otherwise revert back to our own form fields.
222
- if( class_exists( 'SiteOrigin_Widget' ) && class_exists( 'SiteOrigin_Widget_Field_Posts' ) ) {
223
- $helper = $this->get_helper_widget( $templates );
224
- $helper->form( $instance );
225
- }
226
- else {
227
- $instance = wp_parse_args( $instance, array(
228
- 'title' => '',
229
- 'template' => 'loop.php',
230
-
231
- // Query args
232
- 'post_type' => 'post',
233
- 'posts_per_page' => '',
234
-
235
- 'order' => 'DESC',
236
- 'orderby' => 'date',
237
-
238
- 'sticky' => '',
239
-
240
- 'additional' => '',
241
- 'more' => false,
242
- ) );
243
-
244
- ?>
245
- <p>
246
- <label for="<?php echo $this->get_field_id( 'title' ) ?>"><?php _e( 'Title', 'siteorigin-panels' ) ?></label>
247
- <input type="text" class="widefat" name="<?php echo $this->get_field_name( 'title' ) ?>" id="<?php echo $this->get_field_id( 'title' ) ?>" value="<?php echo esc_attr( $instance['title'] ) ?>">
248
- </p>
249
- <p>
250
- <label for="<?php echo $this->get_field_id('template') ?>"><?php _e('Template', 'siteorigin-panels') ?></label>
251
- <select id="<?php echo $this->get_field_id( 'template' ) ?>" name="<?php echo $this->get_field_name( 'template' ) ?>">
252
- <?php foreach($templates as $template) : ?>
253
- <option value="<?php echo esc_attr($template) ?>" <?php selected($instance['template'], $template) ?>>
254
- <?php
255
- $headers = get_file_data( locate_template($template), array(
256
- 'loop_name' => 'Loop Name',
257
- ) );
258
- echo esc_html(!empty($headers['loop_name']) ? $headers['loop_name'] : $template);
259
- ?>
260
- </option>
261
- <?php endforeach; ?>
262
- </select>
263
- </p>
264
-
265
- <p>
266
- <label for="<?php echo $this->get_field_id('more') ?>"><?php _e('More Link', 'siteorigin-panels') ?></label>
267
- <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'more' ) ?>" name="<?php echo $this->get_field_name( 'more' ) ?>" <?php checked( $instance['more'] ) ?> /><br/>
268
- <small><?php _e('If the template supports it, cut posts and display the more link.', 'siteorigin-panels') ?></small>
269
- </p>
270
- <?php
271
-
272
- if ( ! empty( $instance['posts'] ) ) {
273
- $instance = wp_parse_args( $instance['posts'] , $instance );
274
- unset( $instance['posts'] );
275
- //unset post__in and taxonomies?
276
- }
277
- // Get all the loop template files
278
- $post_types = get_post_types(array('public' => true));
279
- $post_types = array_values($post_types);
280
- $post_types = array_diff($post_types, array('attachment', 'revision', 'nav_menu_item'));
281
- ?>
282
- <p>
283
- <label for="<?php echo $this->get_field_id('post_type') ?>"><?php _e('Post Type', 'siteorigin-panels') ?></label>
284
- <select id="<?php echo $this->get_field_id( 'post_type' ) ?>" name="<?php echo $this->get_field_name( 'post_type' ) ?>" value="<?php echo esc_attr($instance['post_type']) ?>">
285
- <?php foreach($post_types as $type) : ?>
286
- <option value="<?php echo esc_attr($type) ?>" <?php selected($instance['post_type'], $type) ?>><?php echo esc_html($type) ?></option>
287
- <?php endforeach; ?>
288
- </select>
289
- </p>
290
-
291
- <p>
292
- <label for="<?php echo $this->get_field_id('posts_per_page') ?>"><?php _e('Posts Per Page', 'siteorigin-panels') ?></label>
293
- <input type="text" class="small-text" id="<?php echo $this->get_field_id( 'posts_per_page' ) ?>" name="<?php echo $this->get_field_name( 'posts_per_page' ) ?>" value="<?php echo esc_attr($instance['posts_per_page']) ?>" />
294
- </p>
295
-
296
- <p>
297
- <label <?php echo $this->get_field_id('orderby') ?>><?php _e('Order By', 'siteorigin-panels') ?></label>
298
- <select id="<?php echo $this->get_field_id( 'orderby' ) ?>" name="<?php echo $this->get_field_name( 'orderby' ) ?>" value="<?php echo esc_attr($instance['orderby']) ?>">
299
- <option value="none" <?php selected($instance['orderby'], 'none') ?>><?php esc_html_e('None', 'siteorigin-panels') ?></option>
300
- <option value="ID" <?php selected($instance['orderby'], 'ID') ?>><?php esc_html_e('Post ID', 'siteorigin-panels') ?></option>
301
- <option value="author" <?php selected($instance['orderby'], 'author') ?>><?php esc_html_e('Author', 'siteorigin-panels') ?></option>
302
- <option value="name" <?php selected($instance['orderby'], 'name') ?>><?php esc_html_e('Name', 'siteorigin-panels') ?></option>
303
- <option value="name" <?php selected($instance['orderby'], 'name') ?>><?php esc_html_e('Name', 'siteorigin-panels') ?></option>
304
- <option value="date" <?php selected($instance['orderby'], 'date') ?>><?php esc_html_e('Date', 'siteorigin-panels') ?></option>
305
- <option value="modified" <?php selected($instance['orderby'], 'modified') ?>><?php esc_html_e('Modified', 'siteorigin-panels') ?></option>
306
- <option value="parent" <?php selected($instance['orderby'], 'parent') ?>><?php esc_html_e('Parent', 'siteorigin-panels') ?></option>
307
- <option value="rand" <?php selected($instance['orderby'], 'rand') ?>><?php esc_html_e('Random', 'siteorigin-panels') ?></option>
308
- <option value="comment_count" <?php selected($instance['orderby'], 'comment_count') ?>><?php esc_html_e('Comment Count', 'siteorigin-panels') ?></option>
309
- <option value="menu_order" <?php selected($instance['orderby'], 'menu_order') ?>><?php esc_html_e('Menu Order', 'siteorigin-panels') ?></option>
310
- <option value="post__in" <?php selected($instance['orderby'], 'post__in') ?>><?php esc_html_e('Post In Order', 'siteorigin-panels') ?></option>
311
- </select>
312
- </p>
313
-
314
- <p>
315
- <label for="<?php echo $this->get_field_id('order') ?>"><?php _e('Order', 'siteorigin-panels') ?></label>
316
- <select id="<?php echo $this->get_field_id( 'order' ) ?>" name="<?php echo $this->get_field_name( 'order' ) ?>" value="<?php echo esc_attr($instance['order']) ?>">
317
- <option value="DESC" <?php selected($instance['order'], 'DESC') ?>><?php esc_html_e('Descending', 'siteorigin-panels') ?></option>
318
- <option value="ASC" <?php selected($instance['order'], 'ASC') ?>><?php esc_html_e('Ascending', 'siteorigin-panels') ?></option>
319
- </select>
320
- </p>
321
-
322
- <p>
323
- <label for="<?php echo $this->get_field_id('sticky') ?>"><?php _e('Sticky Posts', 'siteorigin-panels') ?></label>
324
- <select id="<?php echo $this->get_field_id( 'sticky' ) ?>" name="<?php echo $this->get_field_name( 'sticky' ) ?>" value="<?php echo esc_attr($instance['sticky']) ?>">
325
- <option value="" <?php selected($instance['sticky'], '') ?>><?php esc_html_e('Default', 'siteorigin-panels') ?></option>
326
- <option value="ignore" <?php selected($instance['sticky'], 'ignore') ?>><?php esc_html_e('Ignore Sticky', 'siteorigin-panels') ?></option>
327
- <option value="exclude" <?php selected($instance['sticky'], 'exclude') ?>><?php esc_html_e('Exclude Sticky', 'siteorigin-panels') ?></option>
328
- <option value="only" <?php selected($instance['sticky'], 'only') ?>><?php esc_html_e('Only Sticky', 'siteorigin-panels') ?></option>
329
- </select>
330
- </p>
331
-
332
- <p>
333
- <label for="<?php echo $this->get_field_id('additional') ?>"><?php _e('Additional ', 'siteorigin-panels') ?></label>
334
- <input type="text" class="widefat" id="<?php echo $this->get_field_id( 'additional' ) ?>" name="<?php echo $this->get_field_name( 'additional' ) ?>" value="<?php echo esc_attr($instance['additional']) ?>" />
335
- <small>
336
- <?php
337
- echo preg_replace(
338
- '/1\{ *(.*?) *\}/',
339
- '<a href="http://codex.wordpress.org/Function_Reference/query_posts">$1</a>',
340
- __('Additional query arguments. See 1{query_posts}.', 'siteorigin-panels')
341
- )
342
- ?>
343
- </small>
344
- </p>
345
- <?php
346
- }
347
- }
348
-
349
- /**
350
- * Get all the existing files
351
- *
352
- * @return array
353
- */
354
- function get_loop_templates(){
355
- $templates = array();
356
-
357
- $template_files = array(
358
- 'loop*.php',
359
- '*/loop*.php',
360
- 'content*.php',
361
- '*/content*.php',
362
- );
363
-
364
- $template_dirs = array( get_template_directory(), get_stylesheet_directory() );
365
- $template_dirs = apply_filters( 'siteorigin_panels_postloop_template_directory', $template_dirs );
366
- $template_dirs = array_unique( $template_dirs );
367
- foreach( $template_dirs as $dir ){
368
- foreach( $template_files as $template_file ) {
369
- foreach( (array) glob($dir.'/'.$template_file) as $file ) {
370
- if( file_exists( $file ) ) $templates[] = str_replace($dir.'/', '', $file);
371
- }
372
- }
373
- }
374
-
375
- $templates = array_unique( apply_filters( 'siteorigin_panels_postloop_templates', $templates ) );
376
- foreach ( $templates as $template_key => $template) {
377
- $invalid = false;
378
-
379
- // Ensure the provided file has a valid name and path
380
- if ( validate_file( $template ) != 0 ) {
381
- $invalid = true;
382
- }
383
-
384
- // Don't expect non-PHP files
385
- if ( substr( $template, -4 ) != '.php' ) {
386
- $invalid = true;
387
- }
388
-
389
- $template = locate_template( $template );
390
- if ( empty( $template ) || $invalid ) {
391
- unset( $templates[ $template_key ] );
392
- }
393
- }
394
- // Update array indexes to ensure logical indexing
395
- sort( $templates );
396
- sort( $templates );
397
-
398
- return $templates;
399
- }
400
-
401
-
402
- /**
403
- * Get the helper widget based on the Widgets Bundle's classes.
404
- *
405
- * @param $templates array Blog loop templates.
406
- *
407
- * @return mixed
408
- */
409
- private function get_helper_widget( $templates ) {
410
- if ( empty( $this->helper ) &&
411
- class_exists( 'SiteOrigin_Widget' ) &&
412
- class_exists( 'SiteOrigin_Widget_Field_Posts' ) ) {
413
- $this->helper = new SiteOrigin_Panels_Widgets_PostLoop_Helper( $templates );
414
- }
415
- // These ensure the form fields name attributes are correct.
416
- $this->helper->id_base = $this->id_base;
417
- $this->helper->id = $this->id;
418
- $this->helper->number = $this->number;
419
-
420
- return $this->helper;
421
- }
422
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/live-editor/jquery.scrollTo.js DELETED
@@ -1,210 +0,0 @@
1
- /*!
2
- * jQuery.scrollTo
3
- * Copyright (c) 2007-2015 Ariel Flesler - aflesler ○ gmail • com | http://flesler.blogspot.com
4
- * Licensed under MIT
5
- * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
6
- * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
7
- * @author Ariel Flesler
8
- * @version 2.1.2
9
- */
10
- ;(function(factory) {
11
- 'use strict';
12
- if (typeof define === 'function' && define.amd) {
13
- // AMD
14
- define(['jquery'], factory);
15
- } else if (typeof module !== 'undefined' && module.exports) {
16
- // CommonJS
17
- module.exports = factory(require('jquery'));
18
- } else {
19
- // Global
20
- factory(jQuery);
21
- }
22
- })(function($) {
23
- 'use strict';
24
-
25
- var $scrollTo = $.scrollTo = function(target, duration, settings) {
26
- return $(window).scrollTo(target, duration, settings);
27
- };
28
-
29
- $scrollTo.defaults = {
30
- axis:'xy',
31
- duration: 0,
32
- limit:true
33
- };
34
-
35
- function isWin(elem) {
36
- return !elem.nodeName ||
37
- $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
38
- }
39
-
40
- $.fn.scrollTo = function(target, duration, settings) {
41
- if (typeof duration === 'object') {
42
- settings = duration;
43
- duration = 0;
44
- }
45
- if (typeof settings === 'function') {
46
- settings = { onAfter:settings };
47
- }
48
- if (target === 'max') {
49
- target = 9e9;
50
- }
51
-
52
- settings = $.extend({}, $scrollTo.defaults, settings);
53
- // Speed is still recognized for backwards compatibility
54
- duration = duration || settings.duration;
55
- // Make sure the settings are given right
56
- var queue = settings.queue && settings.axis.length > 1;
57
- if (queue) {
58
- // Let's keep the overall duration
59
- duration /= 2;
60
- }
61
- settings.offset = both(settings.offset);
62
- settings.over = both(settings.over);
63
-
64
- return this.each(function() {
65
- // Null target yields nothing, just like jQuery does
66
- if (target === null) return;
67
-
68
- var win = isWin(this),
69
- elem = win ? this.contentWindow || window : this,
70
- $elem = $(elem),
71
- targ = target,
72
- attr = {},
73
- toff;
74
-
75
- switch (typeof targ) {
76
- // A number will pass the regex
77
- case 'number':
78
- case 'string':
79
- if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
80
- targ = both(targ);
81
- // We are done
82
- break;
83
- }
84
- // Relative/Absolute selector
85
- targ = win ? $(targ) : $(targ, elem);
86
- /* falls through */
87
- case 'object':
88
- if (targ.length === 0) return;
89
- // DOMElement / jQuery
90
- if (targ.is || targ.style) {
91
- // Get the real position of the target
92
- toff = (targ = $(targ)).offset();
93
- }
94
- }
95
-
96
- var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
97
-
98
- $.each(settings.axis.split(''), function(i, axis) {
99
- var Pos = axis === 'x' ? 'Left' : 'Top',
100
- pos = Pos.toLowerCase(),
101
- key = 'scroll' + Pos,
102
- prev = $elem[key](),
103
- max = $scrollTo.max(elem, axis);
104
-
105
- if (toff) {// jQuery / DOMElement
106
- attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
107
-
108
- // If it's a dom element, reduce the margin
109
- if (settings.margin) {
110
- attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
111
- attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
112
- }
113
-
114
- attr[key] += offset[pos] || 0;
115
-
116
- if (settings.over[pos]) {
117
- // Scroll to a fraction of its width/height
118
- attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
119
- }
120
- } else {
121
- var val = targ[pos];
122
- // Handle percentage values
123
- attr[key] = val.slice && val.slice(-1) === '%' ?
124
- parseFloat(val) / 100 * max
125
- : val;
126
- }
127
-
128
- // Number or 'number'
129
- if (settings.limit && /^\d+$/.test(attr[key])) {
130
- // Check the limits
131
- attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
132
- }
133
-
134
- // Don't waste time animating, if there's no need.
135
- if (!i && settings.axis.length > 1) {
136
- if (prev === attr[key]) {
137
- // No animation needed
138
- attr = {};
139
- } else if (queue) {
140
- // Intermediate animation
141
- animate(settings.onAfterFirst);
142
- // Don't animate this axis again in the next iteration.
143
- attr = {};
144
- }
145
- }
146
- });
147
-
148
- animate(settings.onAfter);
149
-
150
- function animate(callback) {
151
- var opts = $.extend({}, settings, {
152
- // The queue setting conflicts with animate()
153
- // Force it to always be true
154
- queue: true,
155
- duration: duration,
156
- complete: callback && function() {
157
- callback.call(elem, targ, settings);
158
- }
159
- });
160
- $elem.animate(attr, opts);
161
- }
162
- });
163
- };
164
-
165
- // Max scrolling position, works on quirks mode
166
- // It only fails (not too badly) on IE, quirks mode.
167
- $scrollTo.max = function(elem, axis) {
168
- var Dim = axis === 'x' ? 'Width' : 'Height',
169
- scroll = 'scroll'+Dim;
170
-
171
- if (!isWin(elem))
172
- return elem[scroll] - $(elem)[Dim.toLowerCase()]();
173
-
174
- var size = 'client' + Dim,
175
- doc = elem.ownerDocument || elem.document,
176
- html = doc.documentElement,
177
- body = doc.body;
178
-
179
- return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
180
- };
181
-
182
- function both(val) {
183
- return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
184
- }
185
-
186
- // Add special hooks so that window scroll properties can be animated
187
- $.Tween.propHooks.scrollLeft =
188
- $.Tween.propHooks.scrollTop = {
189
- get: function(t) {
190
- return $(t.elem)[t.prop]();
191
- },
192
- set: function(t) {
193
- var curr = this.get(t);
194
- // If interrupt is true and user scrolled, stop animating
195
- if (t.options.interrupt && t._last && t._last !== curr) {
196
- return $(t.elem).stop();
197
- }
198
- var next = Math.round(t.now);
199
- // Don't waste CPU
200
- // Browsers don't render floating point scroll
201
- if (curr !== next) {
202
- $(t.elem)[t.prop](next);
203
- t._last = this.get(t);
204
- }
205
- }
206
- };
207
-
208
- // AMD requirement
209
- return $scrollTo;
210
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/live-editor/jquery.scrollTo.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(w){"use strict";var y=w.scrollTo=function(e,t,o){return w(window).scrollTo(e,t,o)};function g(e){return!e.nodeName||-1!==w.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function t(e){return w.isFunction(e)||w.isPlainObject(e)?e:{top:e,left:e}}return y.defaults={axis:"xy",duration:0,limit:!0},w.fn.scrollTo=function(e,o,x){"object"==typeof o&&(x=o,o=0),"function"==typeof x&&(x={onAfter:x}),"max"===e&&(e=9e9),x=w.extend({},y.defaults,x),o=o||x.duration;var v=x.queue&&1<x.axis.length;return v&&(o/=2),x.offset=t(x.offset),x.over=t(x.over),this.each(function(){if(null!==e){var f,u=g(this),c=u?this.contentWindow||window:this,l=w(c),d=e,m={};switch(typeof d){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(d)){d=t(d);break}d=u?w(d):w(d,c);case"object":if(0===d.length)return;(d.is||d.style)&&(f=(d=w(d)).offset())}var p=w.isFunction(x.offset)&&x.offset(c,d)||x.offset;w.each(x.axis.split(""),function(e,t){var o="x"===t?"Left":"Top",n=o.toLowerCase(),r="scroll"+o,i=l[r](),s=y.max(c,t);if(f)m[r]=f[n]+(u?0:i-l.offset()[n]),x.margin&&(m[r]-=parseInt(d.css("margin"+o),10)||0,m[r]-=parseInt(d.css("border"+o+"Width"),10)||0),m[r]+=p[n]||0,x.over[n]&&(m[r]+=d["x"===t?"width":"height"]()*x.over[n]);else{var a=d[n];m[r]=a.slice&&"%"===a.slice(-1)?parseFloat(a)/100*s:a}x.limit&&/^\d+$/.test(m[r])&&(m[r]=m[r]<=0?0:Math.min(m[r],s)),!e&&1<x.axis.length&&(i===m[r]?m={}:v&&(h(x.onAfterFirst),m={}))}),h(x.onAfter)}function h(e){var t=w.extend({},x,{queue:!0,duration:o,complete:e&&function(){e.call(c,d,x)}});l.animate(m,t)}})},y.max=function(e,t){var o="x"===t?"Width":"Height",n="scroll"+o;if(!g(e))return e[n]-w(e)[o.toLowerCase()]();var r="client"+o,i=e.ownerDocument||e.document,s=i.documentElement,a=i.body;return Math.max(s[n],a[n])-Math.min(s[r],a[r])},w.Tween.propHooks.scrollLeft=w.Tween.propHooks.scrollTop={get:function(e){return w(e.elem)[e.prop]()},set:function(e){var t=this.get(e);if(e.options.interrupt&&e._last&&e._last!==t)return w(e.elem).stop();var o=Math.round(e.now);t!==o&&(w(e.elem)[e.prop](o),e._last=this.get(e))}},y});
 
trunk/js/live-editor/live-editor-front.js DELETED
@@ -1,41 +0,0 @@
1
- var iframe = window.frameElement;
2
-
3
- if ( iframe ) {
4
- iframe.contentDocument = document;
5
- var windowParent = window.parent;
6
-
7
- if( typeof windowParent !== 'undefined' && typeof windowParent.jQuery !== 'undefined' ) {
8
- windowParent.jQuery( iframe ).trigger( "iframeloading" );
9
- jQuery( function () {
10
- windowParent.jQuery( iframe ).trigger( "iframeready" );
11
- } );
12
- }
13
- }
14
-
15
- /**
16
- * Scroll this window over a specific element. Called by the main live editor.
17
- * @param el
18
- */
19
- function liveEditorScrollTo( el ){
20
- var $ = jQuery,
21
- $el = $( el ),
22
- rect = $el[0].getBoundingClientRect();
23
-
24
- if( rect.top <= 0 || rect.bottom >= $(window).height() ) {
25
- var newScrollTop = 0;
26
-
27
- if( rect.top < 0 || $el.height() >= $( window ).height() * 0.8 ) {
28
- // Scroll up to the element
29
- newScrollTop = $( window ).scrollTop() + rect.top - 150;
30
- } else if( rect.bottom > $(window).height() ) {
31
- // Scroll down to the element
32
- newScrollTop = $( window ).scrollTop() + ( rect.bottom - $(window).height() ) + 150;
33
- }
34
-
35
- $( window )
36
- .clearQueue()
37
- .animate({
38
- scrollTop: newScrollTop
39
- }, 450 );
40
- }
41
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/live-editor/live-editor-front.min.js DELETED
@@ -1 +0,0 @@
1
- var iframe=window.frameElement;if(iframe){iframe.contentDocument=document;var windowParent=window.parent;void 0!==windowParent&&void 0!==windowParent.jQuery&&(windowParent.jQuery(iframe).trigger("iframeloading"),jQuery(function(){windowParent.jQuery(iframe).trigger("iframeready")}))}function liveEditorScrollTo(o){var e=jQuery,i=e(o),n=i[0].getBoundingClientRect();if(n.top<=0||n.bottom>=e(window).height()){var r=0;n.top<0||i.height()>=.8*e(window).height()?r=e(window).scrollTop()+n.top-150:n.bottom>e(window).height()&&(r=e(window).scrollTop()+(n.bottom-e(window).height())+150),e(window).clearQueue().animate({scrollTop:r},450)}}
 
trunk/js/siteorigin-panels-2101.min.js DELETED
@@ -1 +0,0 @@
1
- !function o(n,a,r){function d(t,e){if(!a[t]){if(!n[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(h)return h(t,!0);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}var l=a[t]={exports:{}};n[t][0].call(l.exports,function(e){return d(n[t][1][e]||e)},l,l.exports,o,n,a,r)}return a[t].exports}for(var h="function"==typeof require&&require,e=0;e<r.length;e++)d(r[e]);return d}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var t=0;return this.each(function(e){t+=e.get("weight")}),t}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(1<this.models.length){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",function(){e.builder.initSortable()}),this.on("open_dialog_complete",function(){e.builder.trigger("builder_resize")})}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var t=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").load(function(){var e=l(this);e.show(),e.contents().scrollTop(t.previewScrollTop)})},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var i=this,s=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(s),this.entries.each(function(e){var t=i.historyEntryTemplate({title:panelsOptions.loc.history[e.get("text")],count:e.get("count")});l(t).data("historyEntry",e).prependTo(s)}),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(s),s.find(".history-entry").click(function(){var e=jQuery(this);s.find(".history-entry").not(e).removeClass("so-selected"),e.addClass("so-selected");var t=e.data("historyEntry");i.selectedEntry=t,i.selectedEntry.cid!==i.currentEntry.cid?i.$(".so-buttons .so-restore").removeClass("disabled"):i.$(".so-buttons .so-restore").addClass("disabled"),i.previewEntry(t)}),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").submit()},restoreSelectedEntry:function(){return this.$(".so-buttons .so-restore").hasClass("disabled")||(this.currentEntry.get("data")===this.selectedEntry.get("data")||("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data")))),this.closeDialog()),!1},updateEntryTimes:function(){var s=this;this.$(".history-entries .history-entry").each(function(){var e=jQuery(this),t=e.find(".timesince"),i=e.data("historyEntry");t.html(s.timeSince(i.get("time")))})},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return 3600<i&&(1===(t=Math.floor(i/3600))?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),60<i&&(1===(t=Math.floor(i/60))?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),0<i&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,r=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(r("#siteorigin-panels-dialog-prebuilt").html(),{})),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=r(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");this.$(".so-content").empty(),"import"==(this.currentTab=i)?this.displayImportExport():this.displayLayoutDirectory("",1,i),this.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(r("#siteorigin-panels-dialog-prebuilt-importexport").html());var l=this,o=l.$(".import-upload-ui"),t=new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:o.find(".file-browse-button").get(0),container:o.get(0),drop_element:o.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&o.addClass("has-drag-drop"),o.find(".progress-precent").css("width","0%")},FilesAdded:function(e){o.find(".file-browse-button").blur(),o.find(".drag-upload-area").removeClass("file-dragover"),o.find(".progress-bar").fadeIn("fast"),l.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){o.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,t,i){var s=JSON.parse(i.response);_.isUndefined(s.widgets)?alert(panelsOptions.plupload.error_message):(l.uploadedLayout=s,o.find(".progress-bar").hide(),l.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",t.name)),l.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}});t.init(),/Edge\/\d./i.test(navigator.userAgent)&&setTimeout(function(){t.refresh()},250),o.find(".drag-upload-area").on("dragover",function(){r(this).addClass("file-dragover")}).on("dragleave",function(){r(this).removeClass("file-dragover")}),e.find(".so-export").submit(function(e){var t=r(this),i=l.builder.model.getPanelsData(),s=r('input[name="post_title"]').val();s||(s=r('input[name="post_ID"]').val()),i.name=s,t.find('input[name="panels_export_data"]').val(JSON.stringify(i))})},displayLayoutDirectory:function(s,l,o){var n=this,a=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===s&&(s=""),void 0===l&&(l=1),void 0===o&&(o="directory-siteorigin"),o.match("^directory-")&&!panelsOptions.directory_enabled)return a.removeClass("so-panels-loading").html(r("#siteorigin-panels-directory-enable").html()),void a.find(".so-panels-enable-directory").click(function(e){e.preventDefault(),r.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},function(){}),panelsOptions.directory_enabled=!0,a.addClass("so-panels-loading"),n.displayLayoutDirectory(s,l,o)});r.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:s,page:l,type:o},function(e){if(n.currentTab===o){a.removeClass("so-panels-loading").html(n.directoryTemplate(e));var t=a.find(".so-previous"),i=a.find(".so-next");l<=1?t.addClass("button-disabled"):t.click(function(e){e.preventDefault(),n.displayLayoutDirectory(s,l-1,n.currentTab)}),l===e.max_num_pages||0===e.max_num_pages?i.addClass("button-disabled"):i.click(function(e){e.preventDefault(),n.displayLayoutDirectory(s,l+1,n.currentTab)}),a.find(".so-screenshot").each(function(){var e=r(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=r("<img/>").attr("src",e.data("src")).load(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")});else r("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")}),a.find(".so-directory-browse").html(e.title)}},"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout(function(){e.removeClass("so-confirmed").html(i)},2500),setTimeout(function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")},200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout"}),i=new r.Deferred;return r.get(panelsOptions.ajaxurl,e,function(e){var t="";e.success?i.resolve(e.data):(t=e.data.message,i.reject(e.data)),this.setStatusMessage(t,!1,!e.success),this.updateButtonState(!0)}.bind(this)),i.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(r(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var a=window.panels,h=jQuery;t.exports=a.view.dialog.extend({cellPreviewTemplate:_.template(a.helpers.utils.processTemplate(h("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},rowView:null,dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview(),this.renderStyles()},this),this.row={cells:new a.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(h("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");return this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove(),_.isUndefined(this.model)||(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.$("input.so-row-field").keyup(function(){h(this).trigger("change")}),this},renderStyles:function(){this.styles&&(this.styles.off("styles_loaded"),this.styles.remove()),this.styles=new a.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e||(this.styles.remove(),0===t.children().length&&(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.hide()))},this)},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)||(this.row={cells:this.model.get("cells").clone(),style:{},ratio:this.model.get("ratio"),ratio_direction:this.model.get("ratio_direction")},this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction")),this.clearCellStylesCache()),this},regenerateRowPreview:function(){var t,r=this,d=this.$(".row-preview"),s=this.getSelectedCellIndex();d.empty(),this.row.cells.each(function(i,n){var o=h(this.cellPreviewTemplate({weight:i.get("weight")}));d.append(o),n==s&&o.find(".preview-cell-in").addClass("cell-selected");var e,a=o.prev();a.length&&((e=h('<div class="resize-handle"></div>')).appendTo(o).dblclick(function(){var e=r.row.cells.at(n-1),t=i.get("weight")+e.get("weight");i.set("weight",t/2),e.set("weight",t/2),r.scaleRowWidths()}),e.draggable({axis:"x",containment:d,start:function(e,t){var i=o.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:o.outerWidth(),left:6,height:o.outerHeight()});i.find(".resize-handle").remove();var s=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),right:6,height:a.outerHeight()});s.find(".resize-handle").remove(),h(this).data({newCellClone:i,prevCellClone:s}),o.find("> .preview-cell-in").css("visibility","hidden"),a.find("> .preview-cell-in").css("visibility","hidden")},drag:function(e,t){var i=r.row.cells.at(n).get("weight"),s=r.row.cells.at(n-1).get("weight"),l=i-(t.position.left+6)/d.width(),o=s+(t.position.left+6)/d.width();t.helper.offset().left,d.offset().left;h(this).data("newCellClone").css("width",d.width()*l).find(".preview-cell-weight").html(Math.round(1e3*l)/10),h(this).data("prevCellClone").css("width",d.width()*o).find(".preview-cell-weight").html(Math.round(1e3*o)/10)},stop:function(e,t){h(this).data("newCellClone").remove(),h(this).data("prevCellClone").remove(),o.find(".preview-cell-in").css("visibility","visible"),a.find(".preview-cell-in").css("visibility","visible");var i=(t.position.left+6)/d.width(),s=r.row.cells.at(n),l=r.row.cells.at(n-1);.02<s.get("weight")-i&&.02<l.get("weight")+i&&(s.set("weight",s.get("weight")-i),l.set("weight",l.get("weight")+i)),r.scaleRowWidths(),t.helper.css("left",-6)}})),o.click(function(e){if(h(e.target).is(".preview-cell")||h(e.target).is(".preview-cell-in")){var t=h(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),o.find(".preview-cell-weight").click(function(e){r.$(".resize-handle").css("pointer-event","none").draggable("disable"),d.find(".preview-cell-weight").each(function(){var e=jQuery(this).hide();h('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(e.html())).insertAfter(e).focus(function(){clearTimeout(t)}).keyup(function(e){9!==e.keyCode&&h(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),h(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var t=d.find(".preview-cell-weight-input"),i=t.index(h(this));i===t.length-1?t.eq(0).focus().select():t.eq(i+1).focus().select()}}).blur(function(){d.find(".preview-cell-weight-input").each(function(e,t){isNaN(parseFloat(h(t).val()))&&h(t).val(Math.floor(1e3*r.row.cells.at(e).get("weight"))/10)}),t=setTimeout(function(){if(0===d.find(".preview-cell-weight-input").length)return!1;var l=[],o=[],n=0,a=0;if(d.find(".preview-cell-weight-input").each(function(e,t){var i=parseFloat(h(t).val());i=isNaN(i)?1/r.row.cells.length:Math.round(10*i)/1e3;var s=!h(t).hasClass("no-user-interacted");l.push(i),o.push(s),s?n+=i:a+=i}),0<n&&0<a&&0<1-n)for(var e=0;e<l.length;e++)o[e]||(l[e]=l[e]/a*(1-n));var t=_.reduce(l,function(e,t){return e+t});l=l.map(function(e){return e/t}),.01<Math.min.apply(Math,l)&&r.row.cells.each(function(e,t){e.set("weight",l[t])}),d.find(".preview-cell").each(function(e,t){var i=r.row.cells.at(e).get("weight");h(t).animate({width:Math.round(1e3*i)/10+"%"},250),h(t).find(".preview-cell-weight-input").val(Math.round(1e3*i)/10)}),d.find(".preview-cell").css("overflow","visible"),setTimeout(r.regenerateRowPreview.bind(r),260)},100)}).click(function(){h(this).select()})}),h(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var i=-1;return this.$(".preview-cell .preview-cell-in").each(function(e,t){h(t).is(".cell-selected")&&(i=e)}),i},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.on("styles_loaded",function(e){e&&(t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"),t.show())})}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(-1<e){var t=this.cellStylesCache[e];t||((t=new a.view.styles).model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach(function(e){e.remove()}),this.cellStylesCache=[]},scaleRowWidths:function(){var s=this;this.$(".row-preview .preview-cell").each(function(e,t){var i=s.row.cells.at(e);h(t).css("width",100*i.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*i.get("weight"))/10)})},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):12<e.cells&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form select[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,s=1,l=0;l<e.cells;l++)t.push(s),s*=e.ratio;var o=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/o}),t=_.filter(t,function(e){return.01<e}),"left"===e.direction&&(t=t.reverse()),this.row.cells=new a.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new a.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),this.row.ratio=e.ratio,this.row.ratio_direction=e.direction,i)this.regenerateRowPreview();else{var n=this;this.$(".preview-cell").each(function(e,t){var i=n.row.cells.at(e).get("weight");h(t).animate({width:Math.round(1e3*i)/10+"%"},250),h(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)}),this.$(".preview-cell").css("overflow","visible"),setTimeout(n.regenerateRowPreview.bind(n),260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||(this.model.setCells(this.row.cells),this.model.set("ratio",this.row.ratio),this.model.set("ratio_direction",this.row.ratio_direction)),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.rowView.visualDestroyModel(),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery,o=e("../view/widgets/js-widget");t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.listenTo(this.model,"change:values",this.handleChangeValues),this.listenTo(this.model,"destroy",this.remove),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})}),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",function(e){e||(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this)},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(0===i)return!1;do{if(t=e.eq(--i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t)&&0<i);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){this.$(".so-content").addClass("so-panels-loading");var e={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")},i=this.$(".so-content");l.post(panelsOptions.ajaxurl,e,null,"html").done(function(e){var t=e.replace(/{\$id}/g,this.model.cid);i.removeClass("so-panels-loading").html(t),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),0<i.find("> .widget-content").length&&o.addWidget(i,this.model.widget_id)}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,i.removeClass("so-panels-loading").html(t)})}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();t=_.isUndefined(t.widgets)?{}:(t=t.widgets)[Object.keys(t)[0]],this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.widgetView.visualDestroyModel(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.widgetView.duplicateHandler(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":31}],10:[function(e,t,i){var s=window.panels,o=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(o("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler"},initializeDialog:function(){this.on("open_dialog",function(){this.filter.search="",this.filterWidgets(this.filter)},this),this.on("open_dialog_complete",function(){this.$(".so-sidebar-search").val("").focus(),this.balanceWidgetHeights()}),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(o("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,function(e){var t=o(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),o('<span class="widget-icon" />').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))},this);var t=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,function(e){o(this.dialogTabTemplate({title:e.title})).data({message:e.message,filter:e.filter}).appendTo(t)},this),this.initTabs();var e=this;o(window).resize(function(){e.balanceWidgetHeights()})},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.click()}else this.filter.search=o(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(l){_.isUndefined(l)&&(l={}),_.isUndefined(l.groups)&&(l.groups=""),this.$(".widget-type-list .widget-type").each(function(){var e,t=o(this),i=t.data("class"),s=_.isUndefined(panelsOptions.widgets[i])?null:panelsOptions.widgets[i];(e=!!_.isEmpty(l.groups)||null!==s&&!_.isEmpty(_.intersection(l.groups,panelsOptions.widgets[i].groups)))&&(_.isUndefined(l.search)||""===l.search||-1===s.title.toLowerCase().indexOf(l.search.toLowerCase())&&(e=!1)),e?t.show():t.hide()}),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.trigger("before_user_adds_widget"),this.builder.addHistoryEntry("widget_added");var t=o(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData(),this.builder.trigger("after_user_adds_widget",i)},balanceWidgetHeights:function(e){var s=[[]],l=null,i=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each(function(e,t){e%i==0&&0!==e&&o(t).css("clear","both")}),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each(function(e,t){var i=o(t);null!==l&&l.position().top!==i.position().top&&(s[s.length]=[]),l=i,s[s.length-1].push(i)}),_.each(s,function(e,t){var i=_.max(e.map(function(e){return e.height()}));_.each(e,function(e){e.height(i)})})}})},{}],11:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e);return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&((t=JSON.parse(t)).thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t)).thingType&&t.thingType===e?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],13:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;(t=e.attributes[s])instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)(t=e.models[o])instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":(s=new panels.model.row).builder=i;var l={style:e.style};e.hasOwnProperty("label")&&(l.label=e.label),e.hasOwnProperty("color_label")&&(l.color_label=e.color_label),s.set(l),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":(s=new panels.model.cell).row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":for(var o in(s=new panels.model.widget).cell=i,e)e.hasOwnProperty(o)&&s.set(o,e[o]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var n=0;n<e.length;n++)s.push(this.unserialize(e[n],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(n=0;n<e.length;n++)s.push(this.unserialize(e[n],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[function(e,t,i){t.exports={generateUUID:function(){var i=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(i+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=(i+16*Math.random())%16|0;return i=Math.floor(i/16),("x"==e?t:3&t|8).toString(16)})},processTemplate:function(e){return _.isUndefined(e)||_.isNull(e)?"":e=(e=(e=e.replace(/{{%/g,"<%")).replace(/%}}/g,"%>")).trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var d=window.panels,h=jQuery;t.exports=function(a,r){return this.each(function(){var e=jQuery(this);if(!e.data("soPanelsBuilderWidgetInitialized")||r){var t=e.closest("form").find(".widget-id").val(),i=h.extend(!0,{},a);if(_.isUndefined(t)||!(-1<t.indexOf("__i__"))){var s=new d.model.builder,l=new d.view.builder({model:s,config:i}),o=e.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(o)||(o.on("close_dialog",function(){s.refreshPanelsData()}),o.on("open_dialog_complete",function(){l.trigger("builder_resize")}),o.model.on("destroy",function(){s.emptyRows().destroy()}),l.setDialogParents(panelsOptions.loc.layout_widget,o));var n=Boolean(e.closest(".widget-content").length);l.render().attach({container:e,dialog:n||"dialog"===e.data("mode"),type:e.data("type")}).setDataField(e.find("input.panels-data")),n||"dialog"===e.data("mode")?(l.setDialogParents(panelsOptions.loc.layout_widget,l.dialog),e.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),l.dialog.openDialog()})):e.find(".siteorigin-panels-display-builder").parent().remove(),h(document).trigger("panels_setup",l),e.data("soPanelsBuilderWidgetInitialized",!0)}}})}},{}],16:[function(e,t,i){var s={};window.panels=s,(window.siteoriginPanels=s).helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery(function(i){var e,t,s,l,o=i("#siteorigin-panels-metabox");if(s=i("form#post"),o.length&&s.length)t=(e=o).find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:i("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==i("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorPreview:e.data("preview-url")};else if(i(".siteorigin-panels-builder-form").length){var n=i(".siteorigin-panels-builder-form");e=n.find(".siteorigin-panels-builder-container"),t=n.find('input[name="panels_data"]'),l={editorType:"standalone",postId:(s=n).data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:n.data("preview-url")}}if(!_.isUndefined(e)){var a=window.siteoriginPanels,r=new a.model.builder,d=new a.view.builder({model:r,config:l});d.render().attach({container:e}).setDataField(t).attachToEditor(),s.submit(function(){r.refreshPanelsData()}),e.removeClass("so-panels-loading"),i(document).trigger("panels_setup",d,window.panels)}i(document).on("widget-added",function(e,t){i(t).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()}),i("body").hasClass("wp-customizer")||i(function(){i(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})})},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return(l.builder=this).get("rows").add(l,i),l},loadPanelsData:function(s,e){try{e===this.layoutPosition.BEFORE?s=this.concatPanelsData(s,this.getPanelsData()):e===this.layoutPosition.AFTER&&(s=this.concatPanelsData(this.getPanelsData(),s)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(s)),{silent:!0});var t,i=[];if(_.isUndefined(s.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<s.grid_cells.length;l++)t=parseInt(s.grid_cells[l].grid),_.isUndefined(i[t])&&(i[t]=[]),i[t].push(s.grid_cells[l]);var o=this;if(_.each(i,function(e,t){var i={};_.isUndefined(s.grids[t].style)||(i.style=s.grids[t].style),_.isUndefined(s.grids[t].ratio)||(i.ratio=s.grids[t].ratio),_.isUndefined(s.grids[t].ratio_direction)||(i.ratio_direction=s.grids[t].ratio_direction),_.isUndefined(s.grids[t].color_label)||(i.color_label=s.grids[t].color_label),_.isUndefined(s.grids[t].label)||(i.label=s.grids[t].label),o.addRow(i,e,{noAnimate:!0})}),_.isUndefined(s.widgets))return;_.each(s.widgets,function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),(s.cell=i).get("widgets").add(s,{noAnimate:!0})}),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var a=t.widgets[i];a.panels_info.grid=parseInt(a.panels_info.grid)+s,a.panels_info.id=parseInt(a.panels_info.id)+l,o.widgets.push(a)}return o},getPanelsData:function(){var n={widgets:[],grids:[],grid_cells:[]},a=0;return this.get("rows").each(function(e,o){e.get("cells").each(function(e,l){e.get("widgets").each(function(e,t){var i={class:e.get("class"),raw:e.get("raw"),grid:o,cell:l,id:a++,widget_id:e.get("widget_id"),style:e.get("style"),label:e.get("label")};_.isEmpty(i.widget_id)&&(i.widget_id=panels.helpers.utils.generateUUID());var s=_.extend(_.clone(e.get("values")),{panels_info:i});n.widgets.push(s)}),n.grid_cells.push({grid:o,index:l,weight:e.get("weight"),style:e.get("style")})}),n.grids.push({cells:e.get("cells").length,style:e.get("style"),ratio:e.get("ratio"),ratio_direction:e.get("ratio_direction"),color_label:e.get("color_label"),label:e.get("label")})}),n},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,c){var t,u=this,i=jQuery('<div id="wrapper">'+e+"</div>");if(i.find(".panel-layout .panel-grid").length){var p={grids:[],grid_cells:[],widgets:[]},g=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),f=(t=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}),w=function(e){var t,i=e.find("div");if(!i.length)return e.html();for(t=0;t<i.length-1&&jQuery.trim(i.eq(t).text())==jQuery.trim(i.eq(t+1).text());t++);var s=i.eq(t).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:i.eq(t).html()}},s=i.find(".panel-layout").eq(0),l=function(e,t){return jQuery(t).closest(".panel-layout").is(s)};return i.find("> .panel-layout > .panel-grid").filter(l).each(function(h,e){var t=jQuery(e),i=t.find(".panel-grid-cell").filter(l);p.grids.push({cells:i.length,style:t.data("style"),ratio:t.data("ratio"),ratio_direction:t.data("ratio-direction"),color_label:t.data("color-label"),label:t.data("label")}),i.each(function(d,e){var t=jQuery(e),i=t.find(".so-panel").filter(l);p.grid_cells.push({grid:h,weight:_.isUndefined(t.data("weight"))?1:parseFloat(t.data("weight")),style:t.data("style")}),i.each(function(e,t){var i=jQuery(t),s=i.find(".panel-widget-style").length?i.find(".panel-widget-style").html():i.html(),l={grid:h,cell:d,style:i.data("style"),raw:!1,label:i.data("label")};s=s.trim();var o=g.exec(s);if(_.isNull(o)||""!==s.replace(g,"").trim())return-1!==s.indexOf("panel-layout")&&jQuery("<div>"+s+"</div>").find(".panel-layout .panel-grid").length?(l.class="SiteOrigin_Panels_Widgets_Layout",p.widgets.push({panels_data:u.getPanelsDataFromHtml(s,c),panels_info:l})):(l.class=c,p.widgets.push(_.extend(w(i),{filter:"1",type:"visual",panels_info:l}))),!0;try{var n=/class="(.*?)"/.exec(o[3]),a=jQuery(o[5]),r=JSON.parse(f(a.val())).instance;l.class=n[1].replace(/\\\\+/g,"\\"),l.raw=!1,r.panels_info=l,p.widgets.push(r)}catch(e){l.class=c,p.widgets.push(_.extend(w(i),{filter:"1",type:"visual",panels_info:l}))}return!0})})}),i.find(".panel-layout").remove(),i.find("style[data-panels-style-for-post]").remove(),i.html().replace(/^\s+|\s+$/gm,"").length&&(p.grids.push({cells:1,style:{}}),p.grid_cells.push({grid:p.grids.length-1,weight:1}),p.widgets.push({filter:"1",text:i.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:c,raw:!1,grid:p.grids.length-1,cell:0}})),p}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:c,raw:!1,grid:0,cell:0}}]}}})},{}],18:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each(function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})}),i}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(n){var a=this.get("cells")||new panels.collection.cells,r=[];a.each(function(e,t){var i=n.at(t);if(i)e.set("weight",i.get("weight"));else{for(var s=a.at(n.length-1),l=e.get("widgets").models.slice(),o=0;o<l.length;o++)l[o].moveToCell(s,{silent:!1});r.push(e)}}),_.each(r,function(e){a.remove(e)}),n.length>a.length&&_.each(n.slice(a.length,n.length),function(e){e.set({collection:a}),e.row=this,a.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var t=0,e=this.get("cells");e.each(function(e){t+=e.get("weight")}),e.each(function(e){e.set("weight",e.get("weight")/t)}),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each(function(e){i.add(e.clone(t),{silent:!0})}),t.set("cells",i),t}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(i){return _.each(i,function(e,t){_.isString(t)&&"_"===t[0]?delete i[t]:_.isObject(i[t])&&l(i[t])}),i};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)t.hasOwnProperty(s)&&i.push(s);for(var l in i=_.uniq(i))if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]],n=(o=o.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(n=n.slice(0,20)).join(" ")}return this.getWidgetField("description")}})},{}],22:[function(e,t,i){var s=window.panels,r=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(r("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var t=this;r(window).on("contextmenu",function(e){return t.active&&!t.isOverEl(t.$el,e)?(t.closeMenu(),t.active=!1,e.preventDefault(),!1):!!t.active||(t.active=!1,t.trigger("activate_context",e,t),void(t.active&&(e.preventDefault(),t.openMenu({left:e.pageX,top:e.pageY}))))})},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),r(window).on("keyup",{menu:this},this.keyboardListen),r(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",r(window).height()-20),e.left+this.$el.outerWidth()+10>=r(window).width()&&(e.left=r(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-r(window).scrollTop()+10>=r(window).height()&&(e.top=r(window).height()+r(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").focus()},closeMenu:function(){this.trigger("close_menu"),r(window).off("keyup",this.keyboardListen),r(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var l=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var o=r(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(o),o.find(".so-item:not(.so-confirm)").click(function(){var e=r(this);s(e.data("key")),l.closeMenu()}),o.find(".so-item.so-confirm").click(function(){var e=r(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void l.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout(function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))},2500)}),o.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return 0<this.$el.find("#panels-menu-section-"+e).length},searchKeyUp:function(e){var t=r(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var l=i.find("ul li:visible"),o=l.filter(".so-active").eq(0);if(o.length){l.removeClass("so-active");var n=l.index(o);38===e.which?o=n-1<0?l.last():l.eq(n-1):40===e.which&&(o=n+1>=l.length?l.first():l.eq(n+1))}else 38===e.which?o=l.last():40===e.which&&(o=l.first());return o.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?i.find("ul li:visible").trigger("click"):i.find("ul li.so-active:visible").trigger("click"),!1;if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each(function(){var e=r(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()});i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],23:[function(e,t,i){var a=window.panels,n=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(a.helpers.utils.processTemplate(n("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor"},rows:null,initialize:function(e){var s=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",function(){this.displayLiveEditor()}),this.dialogs={widgets:new a.dialog.widgets,row:new a.dialog.row,prebuilt:new a.dialog.prebuilt},_.each(this.dialogs,function(e,t,i){i[t].setBuilder(s)}),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),n(window).resize(function(e){e.target===window&&s.trigger("builder_resize")}),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new a.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",function(){this.displayAttachedBuilder({confirm:!1})},this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new a.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),s=panelsOptions.loc.welcomeMessage,l=[];this.supports("addWidget")?l.push(s.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?l.push(s.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?l.push(s.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var o="";3===l.length?o=s.threeEnabled:2===l.length?o=s.twoEnabled:1===l.length?o=s.oneEnabled:0===l.length&&(o=s.addingDisabled);var n=_.template(a.helpers.utils.processTemplate(o))({items:l})+" "+s.docsMessage;return i.find(".so-message-wrapper").html(n),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var t=this.metabox,l=this;n("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").click(function(e){e.preventDefault(),n("#wp-content-editor-container").show(),n("#wp-content-wrap").removeClass("panels-active"),n("#content-resize-handle").show(),l.trigger("hide_builder")}).end().append(n('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+t.find(".hndle span").html()+"</button>").click(function(e){l.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&t.find(".so-switch-to-standard").click(function(e){e.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(l.addHistoryEntry("back_to_editor"),l.model.loadPanelsData(!1),n("#wp-content-wrap").show(),t.hide(),n(window).resize(),l.attachedVisible=!1,l.trigger("hide_builder"))}).show(),t.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var e=this.model.get("data");_.isEmpty(e.widgets)&&_.isEmpty(e.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var i=function(){var e=l.$(".so-builder-toolbar");if(l.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void l.$el.css("padding-top",e.outerHeight());var t=n(window).scrollTop()-l.$el.offset().top;"fixed"===n("#wpadminbar").css("position")&&(t+=n("#wpadminbar").outerHeight());var i=0,s=l.$el.outerHeight()-e.outerHeight()+20;i<t&&t<s?"fixed"!==e.css("position")&&e.css({top:n("#wpadminbar").outerHeight(),left:l.$el.offset().left,width:l.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(t,0),l.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),l.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",i,this),n(document).scroll(i),i(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():n("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return n("#wp-content-wrap").hide(),n("#editor-expand-toggle").on("change.editor-expand",function(){n(this).prop("checked")||n("#wp-content-wrap").hide()}),this.metabox.show().find("> .inside").show(),n(window).resize(),n(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var o=this,e=o.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+e+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(e,t){o.model.get("rows").remove(n(t.item).data("view").model,{silent:!0}),o.model.refreshPanelsData()},receive:function(e,t){o.model.get("rows").add(n(t.item).data("view").model,{silent:!0,at:n(t.item).index()}),o.model.refreshPanelsData()},stop:function(e,t){var i=n(t.item),s=i.data("view"),l=o.model.get("rows");l.get(s.model)&&(o.addHistoryEntry("row_moved"),l.remove(s.model,{silent:!0}),l.add(s.model,{silent:!0,at:i.index()}),s.trigger("move",i.index()),o.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));n(this.dataField).val()!==e&&(n(this.dataField).val(e),n(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new a.view.row({model:e});s.builder=this,s.render(),_.isUndefined(i.at)||t.length<=1?s.$el.appendTo(this.$(".so-rows-container")):s.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&s.visualCreate(),this.refreshSortable(),s.resize(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var t=new a.model.row,e=new a.collection.cells([{weight:.5},{weight:.5}]);e.each(function(e){e.row=t}),t.set("cells",e),t.builder=this.model,this.dialogs.row.setRowModel(t),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=a.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof a.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)||(this.liveEditor=new a.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added")),this},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new a.dialog.history,(this.dialogs.history.builder=this).dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||n.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){n(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(n("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents")).initEvent("keyup",!0,!0):(e=document.createEventObject()).eventType="keyup",e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():n("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}n("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){n("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var t,e=(n.hasData(window)&&n._data(window)).events.scroll,i=0;i<e.length;i++)if("editor-expand"===e[i].namespace){t=e[i],n(window).unbind("scroll",t.handler),n(window).bind("scroll",function(e){this.attachedVisible||t.handler(e)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e&&(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow")),this},setDialogParents:function(s,l){_.each(this.dialogs,function(e,t,i){i[t].setParent(s,l)}),this.on("add_dialog",function(e){e.setParent(s,l)},this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(t,i){var e=this;if(n.contains(e.$el.get(0),t.target)){var s=n([]).add(e.$(".so-panels-welcome-message:visible")).add(e.$(".so-rows-container > .so-row-container")).add(e.$(".so-cells > .cell")).add(e.$(".cell-wrapper > .so-widget")).filter(function(e){return i.isOverEl(n(this),t)}),l=s.last().data("view");void 0!==l&&void 0!==l.buildContextualMenu?l.buildContextualMenu(t,i):s.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(t,i)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),a.helpers.clipboard.canCopyPaste()&&a.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],24:[function(e,t,i){var l=window.panels,r=jQuery;t.exports=Backbone.View.extend({template:_.template(l.helpers.utils.processTemplate(r("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var i=this;return this.model.get("widgets").each(function(e){var t=new l.view.widget({model:e});t.cell=i,t.render(),t.$el.appendTo(i.$(".widgets-container"))}),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var o=this,e=o.row.builder,t=e.$el.attr("id"),n=e.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(e,t){o.row.builder.trigger("widget_sortable_move")},remove:function(e,t){o.model.get("widgets").remove(r(t.item).data("view").model,{silent:!0}),n.refreshPanelsData()},receive:function(e,t){var i=r(t.item).data("view").model;i.cell=o.model,o.model.get("widgets").add(i,{silent:!0,at:r(t.item).index()}),n.refreshPanelsData()},stop:function(e,t){var i=r(t.item),s=i.data("view"),l=i.closest(".cell").data("view");o.model.get("widgets").get(s.model)&&(o.row.builder.addHistoryEntry("widget_moved"),s.model.moveToCell(l.model,{},i.index()),s.cell=l,n.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return 720<t.outerWidth()&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var o,n=this.$(".resize-handle").css("position","absolute"),e=this.row.$el,a=this;return n.draggable({axis:"x",containment:e,start:function(e,t){if(o=a.$el.prev().data("view"),!_.isUndefined(o)){var i=a.$el.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.$el.outerWidth(),left:5,height:a.$el.outerHeight()});i.find(".resize-handle").remove();var s=o.$el.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:o.$el.outerWidth(),right:5,height:o.$el.outerHeight()});s.find(".resize-handle").remove(),r(this).data({newCellClone:i,prevCellClone:s})}},drag:function(e,t){var i=a.row.$el.width()+10,s=a.model.get("weight")-(t.position.left+n.outerWidth()/2)/i,l=o.model.get("weight")+(t.position.left+n.outerWidth()/2)/i;r(this).data("newCellClone").css("width",i*s).find(".preview-cell-weight").html(Math.round(1e3*s)/10),r(this).data("prevCellClone").css("width",i*l).find(".preview-cell-weight").html(Math.round(1e3*l)/10)},stop:function(e,t){r(this).data("newCellClone").remove(),r(this).data("prevCellClone").remove();var i=a.row.$el.width()+10,s=a.model.get("weight")-(t.position.left+n.outerWidth()/2)/i,l=o.model.get("weight")+(t.position.left+n.outerWidth()/2)/i;.02<s&&.02<l&&(a.row.builder.addHistoryEntry("cell_resized"),a.model.set("weight",s),o.model.set("weight",l),a.row.resize()),t.helper.css("left",-n.outerWidth()/2),a.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new l.view.widget({model:e});s.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),s.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?s.$el.appendTo(this.$(".widgets-container")):s.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&s.visualCreate(),this.refreshSortable(),this.row.resize(),this.row.builder.trigger("widget_added")},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=l.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof l.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new l.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)});var s={};this.row.builder.supports("addWidget")&&l.helpers.clipboard.isModel("widget-model")&&(s.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(s)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},s,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],25:[function(e,t,i){var o=window.panels,d=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(o.helpers.utils.processTemplate(d("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(o.helpers.utils.processTemplate(d("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return(this.builder=e).trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=d(_.template(o.helpers.utils.processTemplate(e))(t)),s={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(s.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(s.right_sidebar=i.find(".right-sidebar").html()),s},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=this,i=d('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');i.click(function(e){e.preventDefault(),t.closeDialog(),t.parentDialog.openDialog()}),this.$(".so-title-bar .so-title").before(i)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(d(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var l=this;return e.click(function(e){e.preventDefault();var t=d(this);l.$(".so-sidebar-tabs li").removeClass("tab-active"),l.$(".so-content .so-content-tabs > *").hide(),t.parent().addClass("tab-active");var i=t.attr("href");if(!_.isUndefined(i)&&"#"===i.charAt(0)){var s=i.split("#")[1];l.$(".so-content .so-content-tabs .tab-"+s).show()}l.trigger("tab_click",t)}),this.$(".so-sidebar-tabs li a").first().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",d(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=d(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),d("html").click(function(l){this.$(".so-dropdown-links-wrapper").not(".hidden").each(function(e,t){var i=d(t),s=d(l.target);0!==s.length&&(s.is(".so-needs-confirm")&&!s.is(".so-confirmed")||s.is(".so-dropdown-button"))||i.addClass("hidden")})}.bind(this))},initEditableLabel:function(){var l=this.$(".so-title-bar .so-title-editable");l.keypress(function(e){var t="keypress"===e.type&&13===e.keyCode;if(t){var i=d(":tabbable"),s=i.index(l);i.eq(s+1).focus(),window.getSelection().removeAllRanges()}return!t}).blur(function(){var e=l.text().replace(/^\s+|\s+$/gm,"");e!==l.data("original-value").replace(/^\s+|\s+$/gm,"")&&(l.text(e),this.trigger("edit_label",e))}.bind(this)),l.focus(function(){l.data("original-value",l.text()),o.helpers.utils.selectElementContents(this)})},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e&&t.addClass("so-disabled"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),o.helpers.pageScroll.lock(),d(window).on("keyup",this.keyboardListen),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),d(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),o.helpers.pageScroll.unlock(),d(window).off("keyup",this.keyboardListen),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},keyboardListen:function(e){27===e.which&&d(".so-panels-dialog-wrapper .so-close").trigger("click")},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var a,t=this.$(e),r={};return t.find("[name]").each(function(){var t=d(this);try{var e=/([A-Za-z_]+)\[(.*)\]/.exec(t.attr("name"));if(_.isEmpty(e))return!0;_.isUndefined(e[2])?a=t.attr("name"):(a=e[2].split("][")).unshift(e[1]),a=a.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var i=r,s=null,l=!!_.isString(t.attr("type"))&&t.attr("type").toLowerCase();if("checkbox"===l)s=t.is(":checked")?""===t.val()||t.val():null;else if("radio"===l){if(!t.is(":checked"))return;s=t.val()}else if("SELECT"===t.prop("tagName")){var o=t.find("option:selected");1===o.length?s=t.find("option:selected").val():1<o.length&&(s=_.map(t.find("option:selected"),function(e,t){return d(e).val()}))}else s=t.val();if(!_.isUndefined(t.data("panels-filter")))switch(t.data("panels-filter")){case"json_parse":try{s=JSON.parse(s)}catch(e){s=""}}if(null!==s)for(var n=0;n<a.length;n++)n===a.length-1?""===a[n]?i.push(s):i[a[n]]=s:(_.isUndefined(i[a[n]])&&(""===a[n+1]?i[a[n]]=[]:i[a[n]]={}),i=i[a[n]])}catch(e){console.log("Field ["+t.attr("name")+"] could not be processed and was skipped - "+e.message)}}),r},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var s=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(e){var t=this.$(".so-"+e+"-sidebar"),i=this.$(".so-show-"+e+"-sidebar");this.hasSidebar(e)?(i.hide(),s.matches?(i.show(),i.closest(".so-title-bar").addClass("so-has-"+e+"-button"),t.hide(),t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+e+"-sidebar")):(i.hide(),i.closest(".so-title-bar").removeClass("so-has-"+e+"-button"),t.show(),t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+e+"-sidebar"))):(t.hide(),i.hide())}.bind(this))},hasSidebar:function(e){return 0<this.$(".so-"+e+"-sidebar").children().length},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],26:[function(e,t,i){var s=window.panels,o=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(o("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){this.setElement(this.template()),this.$el.hide();var t=!1;o(document).mousedown(function(){t=!0}).mouseup(function(){t=!1});var i=this;return this.$el.on("mouseenter",".so-widget-wrapper",function(){var e=o(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))}),this.$el.on("mouseleave",".so-widget-wrapper",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",function(){this.resetHighlights()}),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===o("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===o('#title[name="post_title"]').val()&&o('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),o(document).one("heartbeat-tick.autosave",function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())}),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},collapse:function(){this.$el.toggleClass("so-collapsed");var e=this.$(".live-editor-collapse span");e.html(e.data(this.$el.hasClass("so-collapsed")?"expand":"collapse"))},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return 0===o(this).parents(".so-panel").length}).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout(function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")},100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e,t){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,function(e,t){return e+t},0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=o('<iframe src="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var l=o('<form id="soPostToPreviewFrame" method="post" />').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return o.each(e,function(e,t){o('<input type="hidden" />').attr({name:e,value:t}).appendTo(l)}),l.submit().remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var l=this;e.data("iframeready",!1).on("iframeready",function(){var e=o(this),t=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(l.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(l.loadTimes)||(l.loadTimes=l.loadTimes.slice(0,4))),setTimeout(function(){t.scrollTop(l.previewScrollTop),l.$(".so-preview-overlay").hide()},100);var i=t.find("#pl-"+l.builder.config.postId);i.find(".panel-grid .panel-grid-cell .so-panel").filter(function(){return o(this).closest(".panel-layout").is(i)}).each(function(e,t){var i=o(t),s=l.$(".so-live-editor-builder .so-widget-wrapper").eq(i.data("index"));s.data("live-editor-preview-widget",i),i.css({cursor:"pointer"}).mouseenter(function(){s.parent().addClass("so-hovered"),l.highlightElement(i)}).mouseleave(function(){s.parent().removeClass("so-hovered"),l.resetHighlights()}).click(function(e){e.preventDefault(),s.find(".title h4").click()})}),t.find("a").css({"pointer-events":"none"}).click(function(e){e.preventDefault()})}}).on("load",function(){var e=o(this);e.data("iframeready")||e.trigger("iframeready")})},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=o(e.currentTarget);this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode")}})},{}],27:[function(e,t,i){var n=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(n.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resize),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),e.on("add",function(e){t.listenTo(e.get("widgets"),"add",t.resize)},this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each(function(e){var t=new n.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))}),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resize),this.listenTo(this.builder,"builder_resize",this.resize),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",function(){e.model.destroy(),e.builder.model.refreshPanelsData()})},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){n.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=n.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof n.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout(function(){t.removeClass("so-confirmed").html(i)},2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new n.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new n.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(t){this.$(".so-cells > .cell").each(function(){var e=l(this).data("view");_.isUndefined(e)||e.model.cid===t.cid&&e.remove()})},buildContextualMenu:function(e,t){for(var i=[],s=1;s<5;s++)i.push({title:s+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],s=0;s<t;s++)i.push({weight:100/t});var l=new n.model.row({collection:this.collection}),o=new n.collection.cells(i);o.each(function(e){e.row=l}),l.setCells(o),l.builder=this.builder.model,this.builder.model.get("rows").add(l,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var l={};this.builder.supports("editRow")&&(l.edit={title:panelsOptions.loc.contextual.row_edit}),n.helpers.clipboard.canCopyPaste()&&(l.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&n.helpers.clipboard.isModel("row-model")&&(l.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(l.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(l.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(l)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},l,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],28:[function(e,t,i){window.panels;var d=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var s={builderType:i.builderType};return"cell"===e&&(s.index=i.index),d.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(s),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each(function(){var t=d(this);t.find(".style-section-head").click(function(e){e.preventDefault(),t.find(".style-section-fields").slideToggle("fast")})}),_.isUndefined(d.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!d.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=d.map(panelsOptions.wpColorPickerOptions.palettes,function(e){return e})),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each(function(){var s=null,l=d(this);l.find(".so-image-selector").click(function(e){e.preventDefault(),null===s&&(s=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",function(){var t=s.state().get("selection").first().attributes,i=t.url;if(!_.isUndefined(t.sizes))try{i=t.sizes.thumbnail.url}catch(e){i=t.sizes.full.url}l.find(".current-image").css("background-image","url("+i+")"),l.find(".so-image-selector > input").val(t.id),l.find(".remove-image").removeClass("hidden")}),s.open()}),l.find(".remove-image").click(function(e){e.preventDefault(),l.find(".current-image").css("background-image","none"),l.find(".so-image-selector > input").val(""),l.find(".remove-image").addClass("hidden")})}),this.$(".style-field-measurement").each(function(){var e=d(this),n=e.find('input[type="text"]'),a=e.find("select"),r=e.find('input[type="hidden"]');n.focus(function(){d(this).select()});!function(e){if(""!==e){var t=/(?:([0-9\.,\-]+)(.*))+/,i=r.val().split(" "),s=[];for(var l in i){var o=t.exec(i[l]);_.isNull(o)||_.isUndefined(o[1])||_.isUndefined(o[2])||(s.push(o[1]),a.val(o[2]))}1===n.length?n.val(s.join(" ")):(1===s.length?s=[s[0],s[0],s[0],s[0]]:2===s.length?s=[s[0],s[1],s[0],s[1]]:3===s.length&&(s=[s[0],s[1],s[2],s[1]]),n.each(function(e,t){d(t).val(s[e])}))}}(r.val());var t=function(e){if(1===n.length){var t=n.val().split(" ").filter(function(e){return""!==e}).map(function(e){return e+a.val()}).join(" ");r.val(t)}else{var i=d(e.target),s=[],l=[],o=[];n.each(function(e,t){var i=""!==d(t).val()?parseFloat(d(t).val()):null;s.push(i),null===i?l.push(e):o.push(e)}),3===l.length&&o[0]===n.index(i)&&(n.val(i.val()),s=[i.val(),i.val(),i.val(),i.val()]),JSON.stringify(s)===JSON.stringify([null,null,null,null])?r.val(""):r.val(s.map(function(e){return(null===e?0:e)+a.val()}).join(" "))}};n.change(t),a.change(t)})}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle()})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),l.trim(this.$(".actions").html()).length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")||this.getEditDialog().openDialog(),this},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resize(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],30:[function(e,t,i){var a=jQuery,s={addWidget:function(e,t,i){var s=wp.customHtmlWidgets,l=a("<div></div>"),o=t.find(".widget-content:first");o.before(l);var n=new s.CustomHtmlWidgetControl({el:l,syncContainer:o});return n.initializeEditor(),n.editor.codemirror.refresh(),n}};t.exports=s},{}],31:[function(e,t,i){var l=e("./custom-html-widget"),o=e("./media-widget"),n=e("./text-widget"),s={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,s=e.find("> .id_base").val();switch(s){case this.CUSTOM_HTML:i=l;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=o;break;case this.TEXT:i=n}i.addWidget(s,e,t)}};t.exports=s},{"./custom-html-widget":30,"./media-widget":32,"./text-widget":33}],32:[function(e,t,i){var h=jQuery,s={addWidget:function(e,t,i){var s=wp.mediaWidgets,l=s.controlConstructors[e];if(l){var o=s.modelConstructors[e]||s.MediaWidgetModel,n=t.find("> .widget-content"),a=h('<div class="media-widget-control"></div>');n.before(a);var r={};n.find(".media-widget-instance-property").each(function(){var e=h(this);r[e.data("property")]=e.val()}),r.widget_id=i;var d=new l({el:a,syncContainer:n,model:new o(r)});return d.render(),d}}};t.exports=s},{}],33:[function(e,t,i){var h=jQuery,s={addWidget:function(e,t,i){var s=wp.textWidgets,l={},o=t.find(".visual");if(0<o.length){if(!o.val())return null;var n=h("<div></div>"),a=t.find(".widget-content:first");a.before(n),l={el:n,syncContainer:a}}else l={el:t};var r=new s.TextWidgetControl(l),d=wp.oldEditor?wp.oldEditor:wp.editor;return d&&d.hasOwnProperty("autop")&&(wp.editor.autop=d.autop,wp.editor.removep=d.removep,wp.editor.initialize=d.initialize),r.initializeEditor(),r}};t.exports=s},{}]},{},[16]);
 
trunk/js/siteorigin-parallax.js DELETED
@@ -1,153 +0,0 @@
1
- /**
2
- * @copyright Greg Priday - <https://siteorigin.com/>
3
- * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
4
- */
5
-
6
- ( function( $ ){
7
-
8
- $.fn.siteOriginParallax = function( options ){
9
-
10
- var $$ = $(this);
11
-
12
- if( options === 'refreshParallax' ) {
13
- return $$.trigger( 'refreshParallax' );
14
- }
15
-
16
- options = $.extend( {
17
- // We need to know the background image URL to use
18
- backgroundUrl: null,
19
- // And the exact size of that image
20
- backgroundSize: null,
21
- // We can work out the aspect ratio from the size
22
- backgroundAspectRatio: null,
23
- // How we want to handle sizing of the background image
24
- backgroundSizing: 'scaled',
25
- // Should we limit the amount of motion in the background image
26
- // The number of pixels the background image can move for every pixel of scrolling
27
- limitMotion: 'auto',
28
- }, options );
29
-
30
- if( options.backgroundAspectRatio === null ) {
31
- options.backgroundAspectRatio = options.backgroundSize[0] / options.backgroundSize[1];
32
- }
33
-
34
- var setupParallax = function( ){
35
- try {
36
- var wrapperSize = [
37
- $$.outerWidth(),
38
- $$.outerHeight()
39
- ];
40
-
41
- var bounding = $$[0].getBoundingClientRect();
42
- var windowHeight = $( window ).outerHeight();
43
-
44
- if( $$.data('siteorigin-parallax-init') === undefined ) {
45
- // Do the initial setup
46
- $$.css( {
47
- 'background-image' : 'url(' + options.backgroundUrl + ')'
48
- } );
49
- }
50
-
51
- var limitMotion;
52
- if( options.limitMotion === 'auto' ) {
53
- if( windowHeight < 720 ) {
54
- limitMotion = 0.55;
55
- } else if( windowHeight > 1300 ) {
56
- limitMotion = 0.45;
57
- } else {
58
- limitMotion = (-0.00017 * ( windowHeight - 720 ) ) + 0.55;
59
- }
60
- } else {
61
- limitMotion = parseFloat( options.limitMotion );
62
- }
63
-
64
- // What percent is this through a screen cycle
65
- // -1 is when the bottom of the wrapper is at the top of the screen
66
- // 1 is when the top of the wrapper is at the bottom of the screen
67
- var position = ( bounding.bottom + ( bounding.top - windowHeight ) ) / ( windowHeight + bounding.height );
68
- var percent = ( position - 1 ) / - 2;
69
- var topPosition = 0;
70
- var limitScale = 1;
71
- var backgroundSize = options.backgroundSize;
72
-
73
- // Do the setup for every time something changes
74
- if( options.backgroundSizing === 'scaled' ) {
75
- // This is the required Y height to create a parallax effect
76
- var finalY = wrapperSize[1] / ( limitMotion ? limitMotion : 1 );
77
- var scaleBG = wrapperSize[0] / backgroundSize[0]; // The initial scaling is based on container width
78
-
79
- if( finalY > backgroundSize[1] * scaleBG ) {
80
- // This image wouldn't be tall enough to give a decent parallax effect, so we'll scale it up
81
- scaleBG = finalY / backgroundSize[1];
82
- limitMotion = false;
83
- }
84
-
85
- $$.css(
86
- 'background-size',
87
- ( backgroundSize[0] * scaleBG ) + 'px ' +
88
- ( backgroundSize[1] * scaleBG ) + 'px'
89
- );
90
-
91
- // Work out the top position
92
- if( bounding.top > - wrapperSize[1] && bounding.bottom - windowHeight < wrapperSize[1] ) {
93
- // This is the scaled background height
94
- var backgroundHeight = backgroundSize[1] * scaleBG;
95
-
96
- // Check if we need to limit the amount of motion in the background image
97
- if( limitMotion && backgroundHeight > windowHeight * limitMotion ) {
98
- // Work out how much to scale percent position based on how much motion we want.
99
- limitScale = ( windowHeight * limitMotion ) / ( backgroundHeight );
100
- // Percent is scaled so that the midpoint is still 0.5
101
- percent = ( percent * limitScale ) + ( ( 1 - limitScale ) / 2 );
102
- }
103
- // console.log( percent );
104
-
105
- topPosition = - ( backgroundHeight - wrapperSize[1] ) * percent;
106
- }
107
-
108
- $$.css( 'background-position', '50% ' + topPosition + 'px' );
109
-
110
- } else if( options.backgroundSizing === 'original' ) {
111
- // See scaled version or explanation of this code.
112
- if( limitMotion && backgroundSize[1] > windowHeight * limitMotion ) {
113
- limitScale = ( windowHeight * limitMotion ) / ( backgroundSize[1] );
114
- percent = (percent * limitScale) + ( ( 1 - limitScale ) / 2 );
115
- }
116
-
117
- // In this case, the background height is always the background size
118
- topPosition = - ( backgroundSize[1] - wrapperSize[1] ) * percent;
119
-
120
- // This is a version with no scaling
121
- $$.css( 'background-size', 'auto' );
122
- $$.css( 'background-position', '50% ' + topPosition + 'px' );
123
- }
124
- }
125
- catch( err ) {
126
- console.log( err.message );
127
- $$.css( {
128
- 'background-size': options.backgroundSizing === 'scaled' ? 'cover' : 'auto',
129
- 'background-position': '50% 50%'
130
- } );
131
- }
132
- };
133
- setupParallax();
134
-
135
- // All the events where we'll need to change the parallax
136
- $( window ).on( 'scroll', setupParallax );
137
- $( window ).on( 'resize', setupParallax );
138
- $( window ).on( 'panelsStretchRows', setupParallax );
139
- $$.on( 'refreshParallax', setupParallax );
140
- // Ensure that the parallax has run on inital load.
141
- setTimeout( function () {
142
- setupParallax();
143
- }, 100 );
144
- };
145
-
146
- }( jQuery ) );
147
-
148
-
149
- jQuery( function( $ ){
150
- $('[data-siteorigin-parallax]' ).each( function(){
151
- $( this ).siteOriginParallax( $( this ).data('siteorigin-parallax') );
152
- } );
153
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/siteorigin-parallax.min.js DELETED
@@ -1 +0,0 @@
1
- !function(b){b.fn.siteOriginParallax=function(g){var d=b(this);if("refreshParallax"===g)return d.trigger("refreshParallax");null===(g=b.extend({backgroundUrl:null,backgroundSize:null,backgroundAspectRatio:null,backgroundSizing:"scaled",limitMotion:"auto"},g)).backgroundAspectRatio&&(g.backgroundAspectRatio=g.backgroundSize[0]/g.backgroundSize[1]);var i=function(){try{var i,o=[d.outerWidth(),d.outerHeight()],a=d[0].getBoundingClientRect(),n=b(window).outerHeight();void 0===d.data("siteorigin-parallax-init")&&d.css({"background-image":"url("+g.backgroundUrl+")"}),i="auto"===g.limitMotion?n<720?.55:1300<n?.45:-17e-5*(n-720)+.55:parseFloat(g.limitMotion);var r=((a.bottom+(a.top-n))/(n+a.height)-1)/-2,t=0,e=1,c=g.backgroundSize;if("scaled"===g.backgroundSizing){var s=o[1]/(i||1),u=o[0]/c[0];if(s>c[1]*u&&(u=s/c[1],i=!1),d.css("background-size",c[0]*u+"px "+c[1]*u+"px"),a.top>-o[1]&&a.bottom-n<o[1]){var l=c[1]*u;i&&n*i<l&&(r=r*(e=n*i/l)+(1-e)/2),t=-(l-o[1])*r}d.css("background-position","50% "+t+"px")}else"original"===g.backgroundSizing&&(i&&c[1]>n*i&&(r=r*(e=n*i/c[1])+(1-e)/2),t=-(c[1]-o[1])*r,d.css("background-size","auto"),d.css("background-position","50% "+t+"px"))}catch(i){console.log(i.message),d.css({"background-size":"scaled"===g.backgroundSizing?"cover":"auto","background-position":"50% 50%"})}};i(),b(window).on("scroll",i),b(window).on("resize",i),b(window).on("panelsStretchRows",i),d.on("refreshParallax",i),setTimeout(function(){i()},100)}}(jQuery),jQuery(function(i){i("[data-siteorigin-parallax]").each(function(){i(this).siteOriginParallax(i(this).data("siteorigin-parallax"))})});
 
trunk/js/yoast-compat.js DELETED
@@ -1,118 +0,0 @@
1
- /* global jQuery, YoastSEO */
2
-
3
- jQuery(function($){
4
-
5
- if( typeof YoastSEO.app === 'undefined' ){
6
- // Skip all this if we don't have the yoast app
7
- return;
8
- }
9
-
10
- var decodeEntities = (function() {
11
- // this prevents any overhead from creating the object each time
12
- var element = document.createElement('div');
13
-
14
- function decodeHTMLEntities (str) {
15
- if(str && typeof str === 'string') {
16
- // strip script/html tags
17
- str = str.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, '');
18
- str = str.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, '');
19
- element.innerHTML = str;
20
- str = element.textContent;
21
- element.textContent = '';
22
- }
23
-
24
- return str;
25
- }
26
-
27
- return decodeHTMLEntities;
28
- })();
29
-
30
- var SiteOriginYoastCompat = function() {
31
- YoastSEO.app.registerPlugin( 'siteOriginYoastCompat', { status: 'ready' } );
32
- YoastSEO.app.registerModification( 'content', this.contentModification, 'siteOriginYoastCompat', 5 );
33
- };
34
-
35
- SiteOriginYoastCompat.prototype.contentModification = function(data) {
36
- var re = new RegExp( panelsOptions.siteoriginWidgetRegex , "i" );
37
- var $data = $( '<div>' + data + '</div>' );
38
-
39
- if( $data.find('.so-panel.widget').length === 0 ) {
40
- // Skip this for non Page builder pages
41
- return data;
42
- }
43
-
44
- $data.find('.so-panel.widget').each(function(i, el) {
45
-
46
- var $widget = $(el);
47
- // Style wrappers prevent us from matching the widget shortcode correctly.
48
- if ( $widget.find( '> .panel-widget-style' ).length > 0 ) {
49
- $widget = $widget.find( '> .panel-widget-style' );
50
- }
51
- var match = re.exec( $widget.html() );
52
-
53
- try{
54
- if( ! _.isNull( match ) && $widget.html().replace( re, '' ).trim() === '' ) {
55
- var classMatch = /class="(.*?)"/.exec( match[3] ),
56
- dataInput = jQuery( match[5] ),
57
- data = JSON.parse( decodeEntities( dataInput.val( ) ) ),
58
- widgetInstance = data.instance,
59
- newHTML = '';
60
-
61
- if( ! _.isNull(widgetInstance.title) ) {
62
- newHTML += '<h3>' + widgetInstance.title + '</h3>';
63
- }
64
-
65
- if( ! _.isNull( classMatch ) ) {
66
- var widgetClass = classMatch[1];
67
- switch( widgetClass ) {
68
- case 'SiteOrigin_Widget_Image_Widget':
69
- // We want a direct assignment for the SO Image Widget to get rid of the title
70
- newHTML = $('<img/>').attr({
71
- 'src': '#' + widgetInstance.image,
72
- 'srcset': '',
73
- 'alt': widgetInstance.alt,
74
- 'title': widgetInstance.title,
75
- }).prop('outerHTML');
76
- break;
77
-
78
- case 'WP_Widget_Media_Image':
79
- newHTML = $('<img/>').attr({
80
- 'src': '#' + widgetInstance.attachment_id,
81
- 'srcset': '',
82
- 'alt': widgetInstance.alt,
83
- 'title': widgetInstance.image_title,
84
- }).prop('outerHTML');
85
- break;
86
-
87
- case 'SiteOrigin_Widget_Accordion_Widget':
88
- case 'SiteOrigin_Widget_Tabs_Widget':
89
- var contentItems = widgetClass === 'SiteOrigin_Widget_Accordion_Widget' ? widgetInstance.panels : widgetInstance.tabs;
90
- newHTML = $( '<div/>' );
91
- for( var i = 0; i < contentItems.length; i++ ) {
92
- var item = contentItems[ i ];
93
- if ( item.content_type !== 'text' ) {
94
- continue;
95
- }
96
-
97
- newHTML.append( '<h3>' + item.title + '</h3>' );
98
- newHTML.append( '<div>' + item.content_text + '</div>')
99
- }
100
- newHTML = newHTML.prop( 'outerHTML' );
101
- break;
102
- }
103
- }
104
-
105
- $widget.html(newHTML);
106
- }
107
- }
108
- catch(e) {
109
- // If there was an error, just clear the widget content.
110
- $widget.html('');
111
- }
112
-
113
- });
114
- return $data.html();
115
- };
116
-
117
- new SiteOriginYoastCompat();
118
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/js/yoast-compat.min.js DELETED
@@ -1 +0,0 @@
1
- jQuery(function(p){if(void 0!==YoastSEO.app){var e,m=(e=document.createElement("div"),function(t){return t&&"string"==typeof t&&(t=(t=t.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),e.innerHTML=t,t=e.textContent,e.textContent=""),t}),t=function(){YoastSEO.app.registerPlugin("siteOriginYoastCompat",{status:"ready"}),YoastSEO.app.registerModification("content",this.contentModification,"siteOriginYoastCompat",5)};t.prototype.contentModification=function(t){var d=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),e=p("<div>"+t+"</div>");return 0===e.find(".so-panel.widget").length?t:(e.find(".so-panel.widget").each(function(t,e){var i=p(e);0<i.find("> .panel-widget-style").length&&(i=i.find("> .panel-widget-style"));var n=d.exec(i.html());try{if(!_.isNull(n)&&""===i.html().replace(d,"").trim()){var a=/class="(.*?)"/.exec(n[3]),r=jQuery(n[5]),o=JSON.parse(m(r.val())).instance,s="";if(_.isNull(o.title)||(s+="<h3>"+o.title+"</h3>"),!_.isNull(a)){var c=a[1];switch(c){case"SiteOrigin_Widget_Image_Widget":s=p("<img/>").attr({src:"#"+o.image,srcset:"",alt:o.alt,title:o.title}).prop("outerHTML");break;case"WP_Widget_Media_Image":s=p("<img/>").attr({src:"#"+o.attachment_id,srcset:"",alt:o.alt,title:o.image_title}).prop("outerHTML");break;case"SiteOrigin_Widget_Accordion_Widget":case"SiteOrigin_Widget_Tabs_Widget":var l="SiteOrigin_Widget_Accordion_Widget"===c?o.panels:o.tabs;s=p("<div/>");for(t=0;t<l.length;t++){var g=l[t];"text"===g.content_type&&(s.append("<h3>"+g.title+"</h3>"),s.append("<div>"+g.content_text+"</div>"))}s=s.prop("outerHTML")}}i.html(s)}}catch(t){i.html("")}}),e.html())},new t}});
 
trunk/lang/siteorigin-panels.pot DELETED
@@ -1,1756 +0,0 @@
1
- # Copyright (C) 2019 siteorigin-panels
2
- # This file is distributed under the same license as the siteorigin-panels package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: siteorigin-panels\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Language-Team: SiteOrigin <support@siteorigin.com>\n"
10
- "Last-Translator: SiteOrigin <support@siteorigin.com>\n"
11
- "Report-Msgid-Bugs-To: http://www.siteorigin.com/thread\n"
12
- "X-Poedit-Basepath: ..\n"
13
- "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
14
- "X-Poedit-SearchPath-0: .\n"
15
- "X-Poedit-SearchPathExcluded-0: *.js\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
-
19
- #: compat/layout-block.php:86
20
- msgid "You need to add a widget, row, or prebuilt layout before you'll see anything here. :)"
21
- msgstr ""
22
-
23
- #: inc/admin-dashboard.php:23
24
- msgid "SiteOrigin Page Builder News"
25
- msgstr ""
26
-
27
- #: inc/admin-dashboard.php:76
28
- msgid "Blog"
29
- msgstr ""
30
-
31
- #. translators: accessibility text
32
- #. translators: accessibility text
33
- #. translators: accessibility text
34
- #: inc/admin-dashboard.php:78, inc/admin-dashboard.php:97, inc/admin-dashboard.php:109
35
- msgid "(opens in a new window)"
36
- msgstr ""
37
-
38
- #: inc/admin-dashboard.php:86
39
- msgid "Email Support"
40
- msgstr ""
41
-
42
- #. translators: accessibility text
43
- #: inc/admin-dashboard.php:88
44
- msgid "(email SiteOrigin support)"
45
- msgstr ""
46
-
47
- #: inc/admin-dashboard.php:95, inc/admin.php:158
48
- msgid "Support Forum"
49
- msgstr ""
50
-
51
- #. translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated.
52
- #: inc/admin-dashboard.php:107
53
- msgid "Get Premium"
54
- msgstr ""
55
-
56
- #: inc/admin-layouts.php:40, inc/admin-layouts.php:220
57
- msgid "Layouts Directory"
58
- msgstr ""
59
-
60
- #: inc/admin-layouts.php:184
61
- msgid "Invalid request."
62
- msgstr ""
63
-
64
- #: inc/admin-layouts.php:199
65
- msgid "Theme Defined Layouts"
66
- msgstr ""
67
-
68
- #: inc/admin-layouts.php:270
69
- msgid "Clone %s"
70
- msgstr ""
71
-
72
- #: inc/admin-layouts.php:308
73
- msgid " - Results For:"
74
- msgstr ""
75
-
76
- #: inc/admin-layouts.php:341
77
- msgid "Missing layout ID or no such layout exists"
78
- msgstr ""
79
-
80
- #: inc/admin-layouts.php:387
81
- msgid "There was a problem fetching the layout. Please try again later."
82
- msgstr ""
83
-
84
- #: inc/admin-widget-dialog.php:99, widgets/widgets.php:164
85
- msgid "Widgets Bundle"
86
- msgstr ""
87
-
88
- #: inc/admin-widget-dialog.php:114
89
- msgid "Enable more widgets in the 1{Widgets Bundle settings}."
90
- msgstr ""
91
-
92
- #: inc/admin-widget-dialog.php:120, inc/data/widgets-bundle.php:11, inc/data/widgets-bundle.php:23, inc/data/widgets-bundle.php:35, inc/data/widgets-bundle.php:47, inc/data/widgets-bundle.php:59, inc/data/widgets-bundle.php:71
93
- msgid "SiteOrigin Widgets Bundle"
94
- msgstr ""
95
-
96
- #: inc/admin-widget-dialog.php:121
97
- msgid "Install the 1{Widgets Bundle} to get extra widgets."
98
- msgstr ""
99
-
100
- #: inc/admin-widget-dialog.php:129
101
- msgid "Page Builder Widgets"
102
- msgstr ""
103
-
104
- #: inc/admin-widget-dialog.php:137
105
- msgid "You can enable the legacy (PB) widgets in the 1{Page Builder settings}."
106
- msgstr ""
107
-
108
- #: inc/admin-widget-dialog.php:145
109
- msgid "WordPress Widgets"
110
- msgstr ""
111
-
112
- #: inc/admin-widget-dialog.php:185, inc/settings.php:339
113
- msgid "Recommended Widgets"
114
- msgstr ""
115
-
116
- #: inc/admin-widgets-bundle.php:19, inc/admin-widgets-bundle.php:20
117
- msgid "Install Page Builder Plugin"
118
- msgstr ""
119
-
120
- #: inc/admin-widgets-bundle.php:77
121
- msgid "Installing %s"
122
- msgstr ""
123
-
124
- #: inc/admin.php:161, tpl/js-templates.php:44
125
- msgid "Addons"
126
- msgstr ""
127
-
128
- #: inc/admin.php:175, inc/admin.php:571, inc/admin.php:1156, inc/admin.php:1161, inc/settings.php:198, tpl/js-templates.php:197
129
- msgid "Page Builder"
130
- msgstr ""
131
-
132
- #: inc/admin.php:327
133
- msgid "All Widgets"
134
- msgstr ""
135
-
136
- #: inc/admin.php:354
137
- msgid "Missing Widget"
138
- msgstr ""
139
-
140
- #: inc/admin.php:355
141
- msgid "Page Builder doesn't know about this widget."
142
- msgstr ""
143
-
144
- #. translators: Number of seconds since
145
- #: inc/admin.php:359
146
- msgid "%d seconds"
147
- msgstr ""
148
-
149
- #. translators: Number of minutes since
150
- #: inc/admin.php:361
151
- msgid "%d minutes"
152
- msgstr ""
153
-
154
- #. translators: Number of hours since
155
- #: inc/admin.php:363
156
- msgid "%d hours"
157
- msgstr ""
158
-
159
- #. translators: A single second since
160
- #: inc/admin.php:366
161
- msgid "%d second"
162
- msgstr ""
163
-
164
- #. translators: A single minute since
165
- #: inc/admin.php:368
166
- msgid "%d minute"
167
- msgstr ""
168
-
169
- #. translators: A single hour since
170
- #: inc/admin.php:370
171
- msgid "%d hour"
172
- msgstr ""
173
-
174
- #. translators: Time ago - eg. "1 minute before".
175
- #: inc/admin.php:373
176
- msgid "%s before"
177
- msgstr ""
178
-
179
- #: inc/admin.php:374
180
- msgid "Now"
181
- msgstr ""
182
-
183
- #: inc/admin.php:378
184
- msgid "Current"
185
- msgstr ""
186
-
187
- #: inc/admin.php:379
188
- msgid "Original"
189
- msgstr ""
190
-
191
- #: inc/admin.php:380
192
- msgid "Version restored"
193
- msgstr ""
194
-
195
- #: inc/admin.php:381
196
- msgid "Converted to editor"
197
- msgstr ""
198
-
199
- #. translators: Message displayed in the history when a widget is deleted
200
- #: inc/admin.php:385
201
- msgid "Widget deleted"
202
- msgstr ""
203
-
204
- #. translators: Message displayed in the history when a widget is added
205
- #: inc/admin.php:387
206
- msgid "Widget added"
207
- msgstr ""
208
-
209
- #. translators: Message displayed in the history when a widget is edited
210
- #: inc/admin.php:389
211
- msgid "Widget edited"
212
- msgstr ""
213
-
214
- #. translators: Message displayed in the history when a widget is duplicated
215
- #: inc/admin.php:391
216
- msgid "Widget duplicated"
217
- msgstr ""
218
-
219
- #. translators: Message displayed in the history when a widget position is changed
220
- #: inc/admin.php:393
221
- msgid "Widget moved"
222
- msgstr ""
223
-
224
- #. translators: Message displayed in the history when a row is deleted
225
- #: inc/admin.php:397
226
- msgid "Row deleted"
227
- msgstr ""
228
-
229
- #. translators: Message displayed in the history when a row is added
230
- #: inc/admin.php:399
231
- msgid "Row added"
232
- msgstr ""
233
-
234
- #. translators: Message displayed in the history when a row is edited
235
- #: inc/admin.php:401
236
- msgid "Row edited"
237
- msgstr ""
238
-
239
- #. translators: Message displayed in the history when a row position is changed
240
- #: inc/admin.php:403
241
- msgid "Row moved"
242
- msgstr ""
243
-
244
- #. translators: Message displayed in the history when a row is duplicated
245
- #: inc/admin.php:405
246
- msgid "Row duplicated"
247
- msgstr ""
248
-
249
- #. translators: Message displayed in the history when a row is pasted
250
- #: inc/admin.php:407
251
- msgid "Row pasted"
252
- msgstr ""
253
-
254
- #: inc/admin.php:410
255
- msgid "Cell resized"
256
- msgstr ""
257
-
258
- #: inc/admin.php:413
259
- msgid "Prebuilt layout loaded"
260
- msgstr ""
261
-
262
- #: inc/admin.php:417
263
- msgid "Loading prebuilt layout"
264
- msgstr ""
265
-
266
- #: inc/admin.php:418
267
- msgid "Would you like to copy this editor's existing content to Page Builder?"
268
- msgstr ""
269
-
270
- #: inc/admin.php:419
271
- msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
272
- msgstr ""
273
-
274
- #. translators: This is the title for a widget called "Layout Builder"
275
- #: inc/admin.php:421
276
- msgid "Layout Builder Widget"
277
- msgstr ""
278
-
279
- #. translators: A standard confirmation message
280
- #: inc/admin.php:423, tpl/js-templates.php:97, tpl/js-templates.php:422
281
- msgid "Are you sure?"
282
- msgstr ""
283
-
284
- #. translators: When a layout file is ready to be inserted. %s is the filename.
285
- #: inc/admin.php:425
286
- msgid "%s is ready to insert."
287
- msgstr ""
288
-
289
- #: inc/admin.php:429
290
- msgid "Add Widget Below"
291
- msgstr ""
292
-
293
- #: inc/admin.php:430
294
- msgid "Add Widget to Cell"
295
- msgstr ""
296
-
297
- #: inc/admin.php:431, tpl/js-templates.php:224
298
- msgid "Search Widgets"
299
- msgstr ""
300
-
301
- #: inc/admin.php:433, tpl/js-templates.php:17, tpl/js-templates.php:19
302
- msgid "Add Row"
303
- msgstr ""
304
-
305
- #: inc/admin.php:434
306
- msgid "Column"
307
- msgstr ""
308
-
309
- #: inc/admin.php:436
310
- msgid "Cell Actions"
311
- msgstr ""
312
-
313
- #: inc/admin.php:437
314
- msgid "Paste Widget"
315
- msgstr ""
316
-
317
- #: inc/admin.php:439
318
- msgid "Widget Actions"
319
- msgstr ""
320
-
321
- #: inc/admin.php:440
322
- msgid "Edit Widget"
323
- msgstr ""
324
-
325
- #: inc/admin.php:441
326
- msgid "Duplicate Widget"
327
- msgstr ""
328
-
329
- #: inc/admin.php:442
330
- msgid "Delete Widget"
331
- msgstr ""
332
-
333
- #: inc/admin.php:443
334
- msgid "Copy Widget"
335
- msgstr ""
336
-
337
- #: inc/admin.php:444
338
- msgid "Paste Widget Below"
339
- msgstr ""
340
-
341
- #: inc/admin.php:446
342
- msgid "Row Actions"
343
- msgstr ""
344
-
345
- #: inc/admin.php:447, tpl/js-templates.php:95
346
- msgid "Edit Row"
347
- msgstr ""
348
-
349
- #: inc/admin.php:448, tpl/js-templates.php:96
350
- msgid "Duplicate Row"
351
- msgstr ""
352
-
353
- #: inc/admin.php:449, tpl/js-templates.php:97
354
- msgid "Delete Row"
355
- msgstr ""
356
-
357
- #: inc/admin.php:450
358
- msgid "Copy Row"
359
- msgstr ""
360
-
361
- #: inc/admin.php:451
362
- msgid "Paste Row"
363
- msgstr ""
364
-
365
- #: inc/admin.php:453
366
- msgid "Draft"
367
- msgstr ""
368
-
369
- #: inc/admin.php:454
370
- msgid "Untitled"
371
- msgstr ""
372
-
373
- #: inc/admin.php:456
374
- msgid "New Row"
375
- msgstr ""
376
-
377
- #: inc/admin.php:457, inc/admin.php:465, inc/styles.php:184, tpl/js-templates.php:62
378
- msgid "Row"
379
- msgstr ""
380
-
381
- #: inc/admin.php:460
382
- msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
383
- msgstr ""
384
-
385
- #: inc/admin.php:461
386
- msgid "Add a {{%= items[0] %}} to get started."
387
- msgstr ""
388
-
389
- #: inc/admin.php:462
390
- msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
391
- msgstr ""
392
-
393
- #: inc/admin.php:463
394
- msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
395
- msgstr ""
396
-
397
- #: inc/admin.php:464, inc/styles.php:318, tpl/js-templates.php:61
398
- msgid "Widget"
399
- msgstr ""
400
-
401
- #: inc/admin.php:466, tpl/js-templates.php:63
402
- msgid "Prebuilt Layout"
403
- msgstr ""
404
-
405
- #: inc/admin.php:468
406
- msgid "Read our %s if you need help."
407
- msgstr ""
408
-
409
- #: inc/admin.php:469, tpl/js-templates.php:64
410
- msgid "documentation"
411
- msgstr ""
412
-
413
- #: inc/admin.php:478
414
- msgid "Page Builder layouts"
415
- msgstr ""
416
-
417
- #: inc/admin.php:479
418
- msgid "Error uploading or importing file."
419
- msgstr ""
420
-
421
- #: inc/admin.php:486
422
- msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
423
- msgstr ""
424
-
425
- #. translators: This is the default name given to a user's home page
426
- #: inc/admin.php:654, inc/home.php:26
427
- msgid "Home Page"
428
- msgstr ""
429
-
430
- #: inc/admin.php:755
431
- msgid "Untitled Widget"
432
- msgstr ""
433
-
434
- #: inc/admin.php:935
435
- msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
436
- msgstr ""
437
-
438
- #: inc/admin.php:941
439
- msgid "Save and reload this page to start using the widget after you've installed it."
440
- msgstr ""
441
-
442
- #: inc/admin.php:957
443
- msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
444
- msgstr ""
445
-
446
- #: inc/admin.php:1072, inc/styles-admin.php:23
447
- msgid "The supplied nonce is invalid."
448
- msgstr ""
449
-
450
- #: inc/admin.php:1073, inc/styles-admin.php:24
451
- msgid "Invalid nonce."
452
- msgstr ""
453
-
454
- #: inc/admin.php:1079
455
- msgid "Please specify the type of widget form to be rendered."
456
- msgstr ""
457
-
458
- #: inc/admin.php:1080
459
- msgid "Missing widget type."
460
- msgstr ""
461
-
462
- #: inc/admin.php:1174
463
- msgid "%s Widget"
464
- msgid_plural "%s Widgets"
465
- msgstr[0] ""
466
- msgstr[1] ""
467
-
468
- #: inc/admin.php:1217
469
- msgid "Get a lightbox addon for SiteOrigin widgets"
470
- msgstr ""
471
-
472
- #: inc/admin.php:1221
473
- msgid "Get the row, cell and widget animations addon"
474
- msgstr ""
475
-
476
- #: inc/admin.php:1225
477
- msgid "Get premium email support for SiteOrigin Page Builder"
478
- msgstr ""
479
-
480
- #: inc/admin.php:1416
481
- msgid "Toggle editor selection menu"
482
- msgstr ""
483
-
484
- #: inc/admin.php:1417, inc/admin.php:1464, inc/settings.php:198, settings/tpl/settings.php:9
485
- msgid "SiteOrigin Page Builder"
486
- msgstr ""
487
-
488
- #: inc/admin.php:1418
489
- msgid "Block Editor"
490
- msgstr ""
491
-
492
- #: inc/data/widgets-bundle.php:7
493
- msgid "SiteOrigin Editor"
494
- msgstr ""
495
-
496
- #: inc/data/widgets-bundle.php:8
497
- msgid "A rich text editor"
498
- msgstr ""
499
-
500
- #: inc/data/widgets-bundle.php:19
501
- msgid "SiteOrigin Button"
502
- msgstr ""
503
-
504
- #: inc/data/widgets-bundle.php:20, widgets/widgets/button/button.php:8
505
- msgid "A simple button"
506
- msgstr ""
507
-
508
- #: inc/data/widgets-bundle.php:31
509
- msgid "SiteOrigin Image"
510
- msgstr ""
511
-
512
- #: inc/data/widgets-bundle.php:32
513
- msgid "Choose images from your media library."
514
- msgstr ""
515
-
516
- #: inc/data/widgets-bundle.php:43
517
- msgid "SiteOrigin Slider"
518
- msgstr ""
519
-
520
- #: inc/data/widgets-bundle.php:44
521
- msgid "A basic slider widget."
522
- msgstr ""
523
-
524
- #: inc/data/widgets-bundle.php:55
525
- msgid "SiteOrigin Features"
526
- msgstr ""
527
-
528
- #: inc/data/widgets-bundle.php:56
529
- msgid "Display site features as a collection of icons."
530
- msgstr ""
531
-
532
- #: inc/data/widgets-bundle.php:67
533
- msgid "SiteOrigin Post Carousel"
534
- msgstr ""
535
-
536
- #: inc/data/widgets-bundle.php:68
537
- msgid "Display your posts as a carousel."
538
- msgstr ""
539
-
540
- #: inc/home.php:25
541
- msgid "Custom Home Page Builder"
542
- msgstr ""
543
-
544
- #: inc/revisions.php:83
545
- msgid "Page Builder Content"
546
- msgstr ""
547
-
548
- #: inc/settings.php:225
549
- msgid "Page Builder Settings"
550
- msgstr ""
551
-
552
- #: inc/settings.php:241
553
- msgid "General"
554
- msgstr ""
555
-
556
- #: inc/settings.php:247
557
- msgid "Post Types"
558
- msgstr ""
559
-
560
- #: inc/settings.php:249
561
- msgid "The post types on which to use Page Builder."
562
- msgstr ""
563
-
564
- #: inc/settings.php:254
565
- msgid "Use Classic Editor for new posts"
566
- msgstr ""
567
-
568
- #: inc/settings.php:255
569
- msgid "New posts of the above Post Types will be created using the Classic Editor."
570
- msgstr ""
571
-
572
- #: inc/settings.php:260
573
- msgid "Live Editor Quick Link"
574
- msgstr ""
575
-
576
- #: inc/settings.php:261
577
- msgid "Display a Live Editor button in the admin bar."
578
- msgstr ""
579
-
580
- #: inc/settings.php:266
581
- msgid "Display Widget Count"
582
- msgstr ""
583
-
584
- #: inc/settings.php:267
585
- msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
586
- msgstr ""
587
-
588
- #: inc/settings.php:272
589
- msgid "Limit Parallax Motion"
590
- msgstr ""
591
-
592
- #: inc/settings.php:273
593
- msgid "How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
594
- msgstr ""
595
-
596
- #: inc/settings.php:278
597
- msgid "Sidebars Emulator"
598
- msgstr ""
599
-
600
- #: inc/settings.php:279
601
- msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
602
- msgstr ""
603
-
604
- #: inc/settings.php:284
605
- msgid "Upgrade Teaser"
606
- msgstr ""
607
-
608
- #: inc/settings.php:286
609
- msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
610
- msgstr ""
611
-
612
- #: inc/settings.php:294
613
- msgid "Default To Page Builder Interface"
614
- msgstr ""
615
-
616
- #: inc/settings.php:296
617
- msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for new posts\"%s setting must be enabled."
618
- msgstr ""
619
-
620
- #: inc/settings.php:303
621
- msgid "Layout Block Default Mode"
622
- msgstr ""
623
-
624
- #: inc/settings.php:306, tpl/js-templates.php:141
625
- msgid "Edit"
626
- msgstr ""
627
-
628
- #: inc/settings.php:307
629
- msgid "Preview"
630
- msgstr ""
631
-
632
- #: inc/settings.php:309
633
- msgid "Whether to display layout blocks in edit mode or preview mode in the block editor."
634
- msgstr ""
635
-
636
- #: inc/settings.php:315
637
- msgid "Widgets"
638
- msgstr ""
639
-
640
- #: inc/settings.php:321
641
- msgid "Widget Title HTML"
642
- msgstr ""
643
-
644
- #: inc/settings.php:322
645
- msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
646
- msgstr ""
647
-
648
- #: inc/settings.php:327
649
- msgid "Add Widget Class"
650
- msgstr ""
651
-
652
- #: inc/settings.php:328
653
- msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
654
- msgstr ""
655
-
656
- #: inc/settings.php:333
657
- msgid "Legacy Bundled Widgets"
658
- msgstr ""
659
-
660
- #: inc/settings.php:334
661
- msgid "Load legacy widgets from Page Builder 1."
662
- msgstr ""
663
-
664
- #: inc/settings.php:340
665
- msgid "Display recommend widgets in Page Builder add widget dialog."
666
- msgstr ""
667
-
668
- #: inc/settings.php:345
669
- msgid "Instant Open Widgets"
670
- msgstr ""
671
-
672
- #: inc/settings.php:346
673
- msgid "Open a widget form as soon as its added to a page."
674
- msgstr ""
675
-
676
- #: inc/settings.php:352, inc/styles-admin.php:88
677
- msgid "Layout"
678
- msgstr ""
679
-
680
- #: inc/settings.php:360
681
- msgid "Responsive Layout"
682
- msgstr ""
683
-
684
- #: inc/settings.php:361
685
- msgid "Collapse widgets, rows and columns on mobile devices."
686
- msgstr ""
687
-
688
- #: inc/settings.php:366
689
- msgid "Use Tablet Layout"
690
- msgstr ""
691
-
692
- #: inc/settings.php:367
693
- msgid "Collapses columns differently on tablet devices."
694
- msgstr ""
695
-
696
- #: inc/settings.php:373
697
- msgid "Detect older browsers"
698
- msgstr ""
699
-
700
- #: inc/settings.php:374
701
- msgid "Never"
702
- msgstr ""
703
-
704
- #: inc/settings.php:375
705
- msgid "Always"
706
- msgstr ""
707
-
708
- #: inc/settings.php:377
709
- msgid "Use Legacy Layout Engine"
710
- msgstr ""
711
-
712
- #: inc/settings.php:378
713
- msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
714
- msgstr ""
715
-
716
- #: inc/settings.php:384
717
- msgid "Tablet Width"
718
- msgstr ""
719
-
720
- #: inc/settings.php:385
721
- msgid "Device width, in pixels, to collapse into a tablet view ."
722
- msgstr ""
723
-
724
- #: inc/settings.php:391
725
- msgid "Mobile Width"
726
- msgstr ""
727
-
728
- #: inc/settings.php:392
729
- msgid "Device width, in pixels, to collapse into a mobile view ."
730
- msgstr ""
731
-
732
- #: inc/settings.php:398
733
- msgid "Row/Widget Bottom Margin"
734
- msgstr ""
735
-
736
- #: inc/settings.php:399
737
- msgid "Default margin below rows and widgets."
738
- msgstr ""
739
-
740
- #: inc/settings.php:404
741
- msgid "Last Row With Margin"
742
- msgstr ""
743
-
744
- #: inc/settings.php:405
745
- msgid "Allow margin in last row."
746
- msgstr ""
747
-
748
- #: inc/settings.php:411
749
- msgid "Row Gutter"
750
- msgstr ""
751
-
752
- #: inc/settings.php:412
753
- msgid "Default spacing between columns in each row."
754
- msgstr ""
755
-
756
- #: inc/settings.php:418
757
- msgid "Full Width Container"
758
- msgstr ""
759
-
760
- #: inc/settings.php:419
761
- msgid "The container used for the full width layout."
762
- msgstr ""
763
-
764
- #: inc/settings.php:426
765
- msgid "Content"
766
- msgstr ""
767
-
768
- #: inc/settings.php:432
769
- msgid "Copy Content"
770
- msgstr ""
771
-
772
- #: inc/settings.php:433
773
- msgid "Copy content from Page Builder to post content."
774
- msgstr ""
775
-
776
- #: inc/settings.php:438
777
- msgid "Copy Styles"
778
- msgstr ""
779
-
780
- #: inc/settings.php:439
781
- msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
782
- msgstr ""
783
-
784
- #: inc/settings.php:486, inc/styles-admin.php:269
785
- msgid "Enabled"
786
- msgstr ""
787
-
788
- #: inc/styles-admin.php:33
789
- msgid "Please specify the type of style form to be rendered."
790
- msgstr ""
791
-
792
- #: inc/styles-admin.php:34
793
- msgid "Missing style form type."
794
- msgstr ""
795
-
796
- #: inc/styles-admin.php:46
797
- msgid "Row Styles"
798
- msgstr ""
799
-
800
- #: inc/styles-admin.php:51
801
- msgid "Cell%s Styles"
802
- msgstr ""
803
-
804
- #: inc/styles-admin.php:55
805
- msgid "Widget Styles"
806
- msgstr ""
807
-
808
- #: inc/styles-admin.php:84
809
- msgid "Attributes"
810
- msgstr ""
811
-
812
- #: inc/styles-admin.php:92
813
- msgid "Design"
814
- msgstr ""
815
-
816
- #: inc/styles-admin.php:102
817
- msgid "Theme"
818
- msgstr ""
819
-
820
- #: inc/styles-admin.php:187, inc/styles.php:254, inc/styles.php:283
821
- msgid "Top"
822
- msgstr ""
823
-
824
- #: inc/styles-admin.php:191, widgets/widgets/button/button.php:30
825
- msgid "Right"
826
- msgstr ""
827
-
828
- #: inc/styles-admin.php:195, inc/styles.php:256, inc/styles.php:285
829
- msgid "Bottom"
830
- msgstr ""
831
-
832
- #: inc/styles-admin.php:199, widgets/widgets/button/button.php:29
833
- msgid "Left"
834
- msgstr ""
835
-
836
- #: inc/styles-admin.php:244
837
- msgid "Select Image"
838
- msgstr ""
839
-
840
- #: inc/styles-admin.php:249
841
- msgid "Remove"
842
- msgstr ""
843
-
844
- #: inc/styles-admin.php:252
845
- msgid "External URL"
846
- msgstr ""
847
-
848
- #: inc/styles.php:79
849
- msgid "%s ID"
850
- msgstr ""
851
-
852
- #: inc/styles.php:82
853
- msgid "A custom ID used for this %s."
854
- msgstr ""
855
-
856
- #: inc/styles.php:87
857
- msgid "%s Class"
858
- msgstr ""
859
-
860
- #: inc/styles.php:90
861
- msgid "A CSS class"
862
- msgstr ""
863
-
864
- #: inc/styles.php:95
865
- msgid "CSS Styles"
866
- msgstr ""
867
-
868
- #: inc/styles.php:98
869
- msgid "One style attribute per line."
870
- msgstr ""
871
-
872
- #: inc/styles.php:103
873
- msgid "Mobile CSS Styles"
874
- msgstr ""
875
-
876
- #: inc/styles.php:106
877
- msgid "CSS applied when in mobile view."
878
- msgstr ""
879
-
880
- #: inc/styles.php:113
881
- msgid "Padding"
882
- msgstr ""
883
-
884
- #: inc/styles.php:116
885
- msgid "Padding around the entire %s."
886
- msgstr ""
887
-
888
- #: inc/styles.php:122
889
- msgid "Mobile Padding"
890
- msgstr ""
891
-
892
- #: inc/styles.php:125
893
- msgid "Padding when on mobile devices."
894
- msgstr ""
895
-
896
- #: inc/styles.php:133
897
- msgid "Background Color"
898
- msgstr ""
899
-
900
- #: inc/styles.php:136
901
- msgid "Background color of the %s."
902
- msgstr ""
903
-
904
- #: inc/styles.php:141
905
- msgid "Background Image"
906
- msgstr ""
907
-
908
- #: inc/styles.php:144
909
- msgid "Background image of the %s."
910
- msgstr ""
911
-
912
- #: inc/styles.php:149
913
- msgid "Background Image Display"
914
- msgstr ""
915
-
916
- #: inc/styles.php:153
917
- msgid "Tiled Image"
918
- msgstr ""
919
-
920
- #: inc/styles.php:154
921
- msgid "Cover"
922
- msgstr ""
923
-
924
- #: inc/styles.php:155
925
- msgid "Centered, with original size"
926
- msgstr ""
927
-
928
- #: inc/styles.php:156
929
- msgid "Fixed"
930
- msgstr ""
931
-
932
- #: inc/styles.php:157
933
- msgid "Parallax"
934
- msgstr ""
935
-
936
- #: inc/styles.php:158
937
- msgid "Parallax (Original Size)"
938
- msgstr ""
939
-
940
- #: inc/styles.php:160
941
- msgid "How the background image is displayed."
942
- msgstr ""
943
-
944
- #: inc/styles.php:165
945
- msgid "Border Color"
946
- msgstr ""
947
-
948
- #: inc/styles.php:168
949
- msgid "Border color of the %s."
950
- msgstr ""
951
-
952
- #: inc/styles.php:187
953
- msgid "Cell Class"
954
- msgstr ""
955
-
956
- #: inc/styles.php:190
957
- msgid "Class added to all cells in this row."
958
- msgstr ""
959
-
960
- #: inc/styles.php:197
961
- msgid "Bottom Margin"
962
- msgstr ""
963
-
964
- #: inc/styles.php:200
965
- msgid "Space below the row. Default is %spx."
966
- msgstr ""
967
-
968
- #: inc/styles.php:205
969
- msgid "Gutter"
970
- msgstr ""
971
-
972
- #: inc/styles.php:208
973
- msgid "Amount of space between cells. Default is %spx."
974
- msgstr ""
975
-
976
- #: inc/styles.php:213
977
- msgid "Row Layout"
978
- msgstr ""
979
-
980
- #: inc/styles.php:217, inc/styles.php:230
981
- msgid "Standard"
982
- msgstr ""
983
-
984
- #: inc/styles.php:218
985
- msgid "Full Width"
986
- msgstr ""
987
-
988
- #: inc/styles.php:219
989
- msgid "Full Width Stretched"
990
- msgstr ""
991
-
992
- #: inc/styles.php:220
993
- msgid "Full Width Stretched Padded"
994
- msgstr ""
995
-
996
- #: inc/styles.php:226
997
- msgid "Collapse Behaviour"
998
- msgstr ""
999
-
1000
- #: inc/styles.php:231
1001
- msgid "No Collapse"
1002
- msgstr ""
1003
-
1004
- #: inc/styles.php:237
1005
- msgid "Collapse Order"
1006
- msgstr ""
1007
-
1008
- #: inc/styles.php:241, inc/widgets/post-loop.php:325, widgets/widgets.php:635, widgets/widgets.php:757
1009
- msgid "Default"
1010
- msgstr ""
1011
-
1012
- #: inc/styles.php:242
1013
- msgid "Left on Top"
1014
- msgstr ""
1015
-
1016
- #: inc/styles.php:243
1017
- msgid "Right on Top"
1018
- msgstr ""
1019
-
1020
- #: inc/styles.php:250
1021
- msgid "Cell Vertical Alignment"
1022
- msgstr ""
1023
-
1024
- #: inc/styles.php:255, inc/styles.php:284, widgets/widgets/button/button.php:31
1025
- msgid "Center"
1026
- msgstr ""
1027
-
1028
- #: inc/styles.php:257, inc/styles.php:286
1029
- msgid "Stretch"
1030
- msgstr ""
1031
-
1032
- #: inc/styles.php:275
1033
- msgid "Cell"
1034
- msgstr ""
1035
-
1036
- #: inc/styles.php:278
1037
- msgid "Vertical Alignment"
1038
- msgstr ""
1039
-
1040
- #: inc/styles.php:282
1041
- msgid "Use row setting"
1042
- msgstr ""
1043
-
1044
- #: inc/styles.php:292, inc/styles.php:332
1045
- msgid "Font Color"
1046
- msgstr ""
1047
-
1048
- #: inc/styles.php:295
1049
- msgid "Color of text inside this cell."
1050
- msgstr ""
1051
-
1052
- #: inc/styles.php:300, inc/styles.php:340
1053
- msgid "Links Color"
1054
- msgstr ""
1055
-
1056
- #: inc/styles.php:303
1057
- msgid "Color of links inside this cell."
1058
- msgstr ""
1059
-
1060
- #: inc/styles.php:321
1061
- msgid "Margin"
1062
- msgstr ""
1063
-
1064
- #: inc/styles.php:324
1065
- msgid "Margins around the widget."
1066
- msgstr ""
1067
-
1068
- #: inc/styles.php:335
1069
- msgid "Color of text inside this widget."
1070
- msgstr ""
1071
-
1072
- #: inc/styles.php:343
1073
- msgid "Color of links inside this widget."
1074
- msgstr ""
1075
-
1076
- #. translators: This is the name of a widget
1077
- #: inc/widgets/layout.php:13
1078
- msgid "Layout Builder"
1079
- msgstr ""
1080
-
1081
- #: inc/widgets/layout.php:15
1082
- msgid "A complete SiteOrigin Page Builder layout as a widget."
1083
- msgstr ""
1084
-
1085
- #: inc/widgets/layout.php:79
1086
- msgid "This widget can currently only be used in the WordPress admin interface."
1087
- msgstr ""
1088
-
1089
- #: inc/widgets/layout.php:104
1090
- msgid "Open Builder"
1091
- msgstr ""
1092
-
1093
- #: inc/widgets/post-content.php:12
1094
- msgid "Post Content"
1095
- msgstr ""
1096
-
1097
- #: inc/widgets/post-content.php:14
1098
- msgid "Displays content from the current post."
1099
- msgstr ""
1100
-
1101
- #: inc/widgets/post-content.php:60, inc/widgets/post-loop.php:299, widgets/widgets.php:608, widgets/widgets.php:783
1102
- msgid "None"
1103
- msgstr ""
1104
-
1105
- #: inc/widgets/post-content.php:61, inc/widgets/post-loop-helper.php:38, inc/widgets/post-loop.php:246, widgets/widgets/call-to-action/call-to-action.php:15, widgets/widgets/list/list.php:15, widgets/widgets/price-box/price-box.php:15
1106
- msgid "Title"
1107
- msgstr ""
1108
-
1109
- #: inc/widgets/post-content.php:62
1110
- msgid "Featured Image"
1111
- msgstr ""
1112
-
1113
- #: inc/widgets/post-content.php:67
1114
- msgid "Display Content"
1115
- msgstr ""
1116
-
1117
- #: inc/widgets/post-loop-helper.php:29, inc/widgets/post-loop.php:23
1118
- msgid "Post Loop"
1119
- msgstr ""
1120
-
1121
- #: inc/widgets/post-loop-helper.php:31, inc/widgets/post-loop.php:25
1122
- msgid "Displays a post loop."
1123
- msgstr ""
1124
-
1125
- #: inc/widgets/post-loop-helper.php:42, inc/widgets/post-loop.php:250
1126
- msgid "Template"
1127
- msgstr ""
1128
-
1129
- #: inc/widgets/post-loop-helper.php:49, inc/widgets/post-loop.php:268
1130
- msgid "If the template supports it, cut posts and display the more link."
1131
- msgstr ""
1132
-
1133
- #: inc/widgets/post-loop.php:216
1134
- msgid "Your theme doesn't have any post loops."
1135
- msgstr ""
1136
-
1137
- #: inc/widgets/post-loop.php:266
1138
- msgid "More Link"
1139
- msgstr ""
1140
-
1141
- #: inc/widgets/post-loop.php:283, widgets/widgets.php:594
1142
- msgid "Post Type"
1143
- msgstr ""
1144
-
1145
- #: inc/widgets/post-loop.php:292, widgets/widgets.php:601
1146
- msgid "Posts Per Page"
1147
- msgstr ""
1148
-
1149
- #: inc/widgets/post-loop.php:297, widgets/widgets.php:606
1150
- msgid "Order By"
1151
- msgstr ""
1152
-
1153
- #: inc/widgets/post-loop.php:300, widgets/widgets.php:609
1154
- msgid "Post ID"
1155
- msgstr ""
1156
-
1157
- #: inc/widgets/post-loop.php:301, widgets/widgets.php:610
1158
- msgid "Author"
1159
- msgstr ""
1160
-
1161
- #: inc/widgets/post-loop.php:302, inc/widgets/post-loop.php:303, widgets/widgets.php:611, widgets/widgets.php:612, widgets/widgets/testimonial/testimonial.php:15
1162
- msgid "Name"
1163
- msgstr ""
1164
-
1165
- #: inc/widgets/post-loop.php:304, widgets/widgets.php:613
1166
- msgid "Date"
1167
- msgstr ""
1168
-
1169
- #: inc/widgets/post-loop.php:305, widgets/widgets.php:614
1170
- msgid "Modified"
1171
- msgstr ""
1172
-
1173
- #: inc/widgets/post-loop.php:306, widgets/widgets.php:615
1174
- msgid "Parent"
1175
- msgstr ""
1176
-
1177
- #: inc/widgets/post-loop.php:307, widgets/widgets.php:616
1178
- msgid "Random"
1179
- msgstr ""
1180
-
1181
- #: inc/widgets/post-loop.php:308, widgets/widgets.php:617
1182
- msgid "Comment Count"
1183
- msgstr ""
1184
-
1185
- #: inc/widgets/post-loop.php:309, widgets/widgets.php:618
1186
- msgid "Menu Order"
1187
- msgstr ""
1188
-
1189
- #: inc/widgets/post-loop.php:310
1190
- msgid "Post In Order"
1191
- msgstr ""
1192
-
1193
- #: inc/widgets/post-loop.php:315, widgets/widgets.php:624
1194
- msgid "Order"
1195
- msgstr ""
1196
-
1197
- #: inc/widgets/post-loop.php:317, widgets/widgets.php:627
1198
- msgid "Descending"
1199
- msgstr ""
1200
-
1201
- #: inc/widgets/post-loop.php:318, widgets/widgets.php:626
1202
- msgid "Ascending"
1203
- msgstr ""
1204
-
1205
- #: inc/widgets/post-loop.php:323, widgets/widgets.php:633
1206
- msgid "Sticky Posts"
1207
- msgstr ""
1208
-
1209
- #: inc/widgets/post-loop.php:326, widgets/widgets.php:636
1210
- msgid "Ignore Sticky"
1211
- msgstr ""
1212
-
1213
- #: inc/widgets/post-loop.php:327, widgets/widgets.php:637
1214
- msgid "Exclude Sticky"
1215
- msgstr ""
1216
-
1217
- #: inc/widgets/post-loop.php:328, widgets/widgets.php:638
1218
- msgid "Only Sticky"
1219
- msgstr ""
1220
-
1221
- #: inc/widgets/post-loop.php:333
1222
- msgid "Additional "
1223
- msgstr ""
1224
-
1225
- #: inc/widgets/post-loop.php:340, widgets/widgets.php:648
1226
- msgid "Additional query arguments. See 1{query_posts}."
1227
- msgstr ""
1228
-
1229
- #: settings/tpl/help.php:6
1230
- msgid "Please read the 1{settings guide} of the Page Builder documentation for help."
1231
- msgstr ""
1232
-
1233
- #: settings/tpl/settings.php:12
1234
- msgid "Search Settings"
1235
- msgstr ""
1236
-
1237
- #: settings/tpl/settings.php:29
1238
- msgid "Settings Saved"
1239
- msgstr ""
1240
-
1241
- #: settings/tpl/settings.php:78
1242
- msgid "Save Settings"
1243
- msgstr ""
1244
-
1245
- #: siteorigin-panels.php:3
1246
- msgid "Page Builder by SiteOrigin"
1247
- msgstr ""
1248
-
1249
- #: siteorigin-panels.php:4
1250
- msgid "https://siteorigin.com/page-builder/"
1251
- msgstr ""
1252
-
1253
- #: siteorigin-panels.php:5
1254
- msgid "A drag and drop, responsive page builder that simplifies building your website."
1255
- msgstr ""
1256
-
1257
- #: siteorigin-panels.php:7
1258
- msgid "SiteOrigin"
1259
- msgstr ""
1260
-
1261
- #: siteorigin-panels.php:8
1262
- msgid "https://siteorigin.com"
1263
- msgstr ""
1264
-
1265
- #: siteorigin-panels.php:325
1266
- msgid "Read More"
1267
- msgstr ""
1268
-
1269
- #: siteorigin-panels.php:473
1270
- msgid "Edit Home Page"
1271
- msgstr ""
1272
-
1273
- #: siteorigin-panels.php:493, tpl/js-templates.php:34, tpl/js-templates.php:36
1274
- msgid "Live Editor"
1275
- msgstr ""
1276
-
1277
- #: tpl/admin-home-page.php:21
1278
- msgid "On"
1279
- msgstr ""
1280
-
1281
- #: tpl/admin-home-page.php:21
1282
- msgid "Off"
1283
- msgstr ""
1284
-
1285
- #: tpl/admin-home-page.php:25
1286
- msgid "Custom Home Page"
1287
- msgstr ""
1288
-
1289
- #: tpl/admin-home-page.php:41
1290
- msgid "Home page updated. 1{View page}."
1291
- msgstr ""
1292
-
1293
- #: tpl/admin-home-page.php:60
1294
- msgid "Save Home Page"
1295
- msgstr ""
1296
-
1297
- #: tpl/admin-home-page.php:64
1298
- msgid "This interface requires Javascript"
1299
- msgstr ""
1300
-
1301
- #: tpl/help.php:2
1302
- msgid "You can use SiteOrigin Page Builder to create home and sub pages, filled your own widgets."
1303
- msgstr ""
1304
-
1305
- #: tpl/help.php:3
1306
- msgid "The page layouts are responsive and fully customizable."
1307
- msgstr ""
1308
-
1309
- #: tpl/help.php:18
1310
- msgid "Read the 1{full documentation} on SiteOrigin. Ask a question on our 2{support forum} if you need help and sign up to 3{our newsletter} to stay up to date with future developments."
1311
- msgstr ""
1312
-
1313
- #: tpl/js-templates.php:12, tpl/js-templates.php:14
1314
- msgid "Add Widget"
1315
- msgstr ""
1316
-
1317
- #: tpl/js-templates.php:22, tpl/js-templates.php:387
1318
- msgid "Prebuilt Layouts"
1319
- msgstr ""
1320
-
1321
- #: tpl/js-templates.php:24
1322
- msgid "Layouts"
1323
- msgstr ""
1324
-
1325
- #: tpl/js-templates.php:29
1326
- msgid "Edit History"
1327
- msgstr ""
1328
-
1329
- #: tpl/js-templates.php:31
1330
- msgid "History"
1331
- msgstr ""
1332
-
1333
- #: tpl/js-templates.php:42
1334
- msgid "Page Builder Addons"
1335
- msgstr ""
1336
-
1337
- #: tpl/js-templates.php:48
1338
- msgid "Revert to Editor"
1339
- msgstr ""
1340
-
1341
- #: tpl/js-templates.php:60
1342
- msgid "Add a %s, %s or %s to get started. Read our %s if you need help."
1343
- msgstr ""
1344
-
1345
- #: tpl/js-templates.php:71
1346
- msgid "Pro Tip"
1347
- msgstr ""
1348
-
1349
- #: tpl/js-templates.php:142, tpl/js-templates.php:268, tpl/js-templates.php:353
1350
- msgid "Duplicate"
1351
- msgstr ""
1352
-
1353
- #: tpl/js-templates.php:143, tpl/js-templates.php:267, tpl/js-templates.php:352
1354
- msgid "Delete"
1355
- msgstr ""
1356
-
1357
- #: tpl/js-templates.php:206, tpl/js-templates.php:271, tpl/js-templates.php:360, tpl/js-templates.php:554
1358
- msgid "Done"
1359
- msgstr ""
1360
-
1361
- #: tpl/js-templates.php:220
1362
- msgid "Add New Widget %s"
1363
- msgstr ""
1364
-
1365
- #: tpl/js-templates.php:236
1366
- msgid "Close"
1367
- msgstr ""
1368
-
1369
- #: tpl/js-templates.php:321
1370
- msgid "Left to Right"
1371
- msgstr ""
1372
-
1373
- #: tpl/js-templates.php:322
1374
- msgid "Right to Left"
1375
- msgstr ""
1376
-
1377
- #: tpl/js-templates.php:333
1378
- msgid "1{Set row layout}: %1$s columns with a ratio of %2$s going from %3$s"
1379
- msgstr ""
1380
-
1381
- #: tpl/js-templates.php:339
1382
- msgid "Set"
1383
- msgstr ""
1384
-
1385
- #: tpl/js-templates.php:358, tpl/js-templates.php:416
1386
- msgid "Insert"
1387
- msgstr ""
1388
-
1389
- #: tpl/js-templates.php:378
1390
- msgid "Page Builder Layouts"
1391
- msgstr ""
1392
-
1393
- #: tpl/js-templates.php:382
1394
- msgid "Search"
1395
- msgstr ""
1396
-
1397
- #: tpl/js-templates.php:397
1398
- msgid "Import/Export"
1399
- msgstr ""
1400
-
1401
- #: tpl/js-templates.php:404
1402
- msgid "Clone: %s"
1403
- msgstr ""
1404
-
1405
- #: tpl/js-templates.php:420
1406
- msgid "Insert after"
1407
- msgstr ""
1408
-
1409
- #: tpl/js-templates.php:421
1410
- msgid "Insert before"
1411
- msgstr ""
1412
-
1413
- #: tpl/js-templates.php:422
1414
- msgid "Replace current"
1415
- msgstr ""
1416
-
1417
- #: tpl/js-templates.php:433
1418
- msgid "Do you want to browse the Prebuilt Layouts directory?"
1419
- msgstr ""
1420
-
1421
- #: tpl/js-templates.php:434
1422
- msgid "Enable"
1423
- msgstr ""
1424
-
1425
- #: tpl/js-templates.php:447
1426
- msgid "Your search didn't return any results"
1427
- msgstr ""
1428
-
1429
- #: tpl/js-templates.php:475
1430
- msgid "Previous"
1431
- msgstr ""
1432
-
1433
- #: tpl/js-templates.php:476
1434
- msgid "Next"
1435
- msgstr ""
1436
-
1437
- #: tpl/js-templates.php:486
1438
- msgid "Drop import file here"
1439
- msgstr ""
1440
-
1441
- #: tpl/js-templates.php:487
1442
- msgid "Or"
1443
- msgstr ""
1444
-
1445
- #: tpl/js-templates.php:490
1446
- msgid "Select Import File"
1447
- msgstr ""
1448
-
1449
- #: tpl/js-templates.php:504
1450
- msgid "Download Layout"
1451
- msgstr ""
1452
-
1453
- #: tpl/js-templates.php:515
1454
- msgid "Page Builder Change History"
1455
- msgstr ""
1456
-
1457
- #: tpl/js-templates.php:530
1458
- msgid "Restore Version"
1459
- msgstr ""
1460
-
1461
- #: tpl/js-templates.php:548, tpl/js-templates.php:549
1462
- msgid "Collapse"
1463
- msgstr ""
1464
-
1465
- #: tpl/js-templates.php:548
1466
- msgid "Expand"
1467
- msgstr ""
1468
-
1469
- #: tpl/js-templates.php:556
1470
- msgid "Toggle desktop mode"
1471
- msgstr ""
1472
-
1473
- #: tpl/js-templates.php:559
1474
- msgid "Toggle tablet mode"
1475
- msgstr ""
1476
-
1477
- #: tpl/js-templates.php:562
1478
- msgid "Toggle mobile mode"
1479
- msgstr ""
1480
-
1481
- #: tpl/js-templates.php:601
1482
- msgid "No Results"
1483
- msgstr ""
1484
-
1485
- #: tpl/js-templates.php:611
1486
- msgid "Add SiteOrigin Layout Block"
1487
- msgstr ""
1488
-
1489
- #: widgets/widgets.php:161
1490
- msgid "This is a legacy widget. "
1491
- msgstr ""
1492
-
1493
- #: widgets/widgets.php:162
1494
- msgid "Ideally you should move to using widgets from the SiteOrigin Widgets Bundle instead. "
1495
- msgstr ""
1496
-
1497
- #: widgets/widgets.php:163
1498
- msgid "It'll be moved to a separate plugin after Page Builder 2.6 is released. "
1499
- msgstr ""
1500
-
1501
- #: widgets/widgets.php:220
1502
- msgid "Style"
1503
- msgstr ""
1504
-
1505
- #: widgets/widgets.php:244
1506
- msgid "%s Style"
1507
- msgstr ""
1508
-
1509
- #: widgets/widgets.php:644
1510
- msgid "Additional Arguments"
1511
- msgstr ""
1512
-
1513
- #: widgets/widgets.php:705
1514
- msgid "Gallery (PB)"
1515
- msgstr ""
1516
-
1517
- #: widgets/widgets.php:707
1518
- msgid "Displays a gallery."
1519
- msgstr ""
1520
-
1521
- #: widgets/widgets.php:746
1522
- msgid "Gallery Images"
1523
- msgstr ""
1524
-
1525
- #: widgets/widgets.php:747
1526
- msgid "edit gallery"
1527
- msgstr ""
1528
-
1529
- #: widgets/widgets.php:751
1530
- msgid "Comma separated attachment IDs. Defaults to all current page's attachments."
1531
- msgstr ""
1532
-
1533
- #: widgets/widgets.php:755
1534
- msgid "Image Size"
1535
- msgstr ""
1536
-
1537
- #: widgets/widgets.php:758
1538
- msgid "Large"
1539
- msgstr ""
1540
-
1541
- #: widgets/widgets.php:759
1542
- msgid "Medium"
1543
- msgstr ""
1544
-
1545
- #: widgets/widgets.php:760
1546
- msgid "Thumbnail"
1547
- msgstr ""
1548
-
1549
- #: widgets/widgets.php:761
1550
- msgid "Full"
1551
- msgstr ""
1552
-
1553
- #: widgets/widgets.php:769
1554
- msgid "Gallery Type"
1555
- msgstr ""
1556
-
1557
- #: widgets/widgets.php:774
1558
- msgid "Columns"
1559
- msgstr ""
1560
-
1561
- #: widgets/widgets.php:779
1562
- msgid "Link To"
1563
- msgstr ""
1564
-
1565
- #: widgets/widgets.php:781
1566
- msgid "Attachment Page"
1567
- msgstr ""
1568
-
1569
- #: widgets/widgets.php:782
1570
- msgid "File"
1571
- msgstr ""
1572
-
1573
- #: widgets/widgets.php:800
1574
- msgid "Image (PB)"
1575
- msgstr ""
1576
-
1577
- #: widgets/widgets.php:802
1578
- msgid "Displays a simple image."
1579
- msgstr ""
1580
-
1581
- #: widgets/widgets.php:835, widgets/widgets/animated-image/animated-image.php:15
1582
- msgid "Image URL"
1583
- msgstr ""
1584
-
1585
- #: widgets/widgets.php:839, widgets/widgets/button/button.php:19
1586
- msgid "Destination URL"
1587
- msgstr ""
1588
-
1589
- #: widgets/widgets.php:853
1590
- msgid "Embedded Video (PB)"
1591
- msgstr ""
1592
-
1593
- #: widgets/widgets.php:855
1594
- msgid "Embeds a video."
1595
- msgstr ""
1596
-
1597
- #: widgets/widgets.php:893
1598
- msgid "Video"
1599
- msgstr ""
1600
-
1601
- #: widgets/widgets.php:909
1602
- msgid "Self Hosted Video (PB)"
1603
- msgstr ""
1604
-
1605
- #: widgets/widgets.php:911
1606
- msgid "A self hosted video player."
1607
- msgstr ""
1608
-
1609
- #: widgets/widgets.php:953
1610
- msgid "Video URL"
1611
- msgstr ""
1612
-
1613
- #: widgets/widgets.php:957
1614
- msgid "Poster URL"
1615
- msgstr ""
1616
-
1617
- #: widgets/widgets.php:959
1618
- msgid "An image that displays before the video starts playing."
1619
- msgstr ""
1620
-
1621
- #: widgets/widgets.php:964
1622
- msgid "Auto Play Video"
1623
- msgstr ""
1624
-
1625
- #: widgets/widgets/animated-image/animated-image.php:6
1626
- msgid "Animated Image (PB)"
1627
- msgstr ""
1628
-
1629
- #: widgets/widgets/animated-image/animated-image.php:8
1630
- msgid "An image that animates in when it enters the screen."
1631
- msgstr ""
1632
-
1633
- #: widgets/widgets/animated-image/animated-image.php:19
1634
- msgid "Animation"
1635
- msgstr ""
1636
-
1637
- #: widgets/widgets/animated-image/animated-image.php:21
1638
- msgid "Fade In"
1639
- msgstr ""
1640
-
1641
- #: widgets/widgets/animated-image/animated-image.php:22
1642
- msgid "Slide Up"
1643
- msgstr ""
1644
-
1645
- #: widgets/widgets/animated-image/animated-image.php:23
1646
- msgid "Slide Down"
1647
- msgstr ""
1648
-
1649
- #: widgets/widgets/animated-image/animated-image.php:24
1650
- msgid "Slide Left"
1651
- msgstr ""
1652
-
1653
- #: widgets/widgets/animated-image/animated-image.php:25
1654
- msgid "Slide Right"
1655
- msgstr ""
1656
-
1657
- #: widgets/widgets/button/button.php:6
1658
- msgid "Button (PB)"
1659
- msgstr ""
1660
-
1661
- #: widgets/widgets/button/button.php:15, widgets/widgets/list/list.php:19, widgets/widgets/testimonial/testimonial.php:27
1662
- msgid "Text"
1663
- msgstr ""
1664
-
1665
- #: widgets/widgets/button/button.php:23, widgets/widgets/call-to-action/call-to-action.php:31, widgets/widgets/price-box/price-box.php:44, widgets/widgets/testimonial/testimonial.php:36
1666
- msgid "Open In New Window"
1667
- msgstr ""
1668
-
1669
- #: widgets/widgets/button/button.php:27
1670
- msgid "Button Alignment"
1671
- msgstr ""
1672
-
1673
- #: widgets/widgets/button/button.php:32
1674
- msgid "Justify"
1675
- msgstr ""
1676
-
1677
- #: widgets/widgets/call-to-action/call-to-action.php:6
1678
- msgid "Call To Action (PB)"
1679
- msgstr ""
1680
-
1681
- #: widgets/widgets/call-to-action/call-to-action.php:8
1682
- msgid "A Call to Action block"
1683
- msgstr ""
1684
-
1685
- #: widgets/widgets/call-to-action/call-to-action.php:19
1686
- msgid "Sub Title"
1687
- msgstr ""
1688
-
1689
- #: widgets/widgets/call-to-action/call-to-action.php:23, widgets/widgets/price-box/price-box.php:36
1690
- msgid "Button Text"
1691
- msgstr ""
1692
-
1693
- #: widgets/widgets/call-to-action/call-to-action.php:27, widgets/widgets/price-box/price-box.php:40
1694
- msgid "Button URL"
1695
- msgstr ""
1696
-
1697
- #: widgets/widgets/call-to-action/call-to-action.php:37, widgets/widgets/price-box/price-box.php:49
1698
- msgid "Button"
1699
- msgstr ""
1700
-
1701
- #: widgets/widgets/list/list.php:6
1702
- msgid "List (PB)"
1703
- msgstr ""
1704
-
1705
- #: widgets/widgets/list/list.php:8, widgets/widgets/price-box/price-box.php:8
1706
- msgid "Displays a bullet list of elements"
1707
- msgstr ""
1708
-
1709
- #: widgets/widgets/list/list.php:20, widgets/widgets/price-box/price-box.php:32
1710
- msgid "Start each new point with an asterisk (*)"
1711
- msgstr ""
1712
-
1713
- #: widgets/widgets/price-box/price-box.php:6
1714
- msgid "Price Box (PB)"
1715
- msgstr ""
1716
-
1717
- #: widgets/widgets/price-box/price-box.php:19
1718
- msgid "Price"
1719
- msgstr ""
1720
-
1721
- #: widgets/widgets/price-box/price-box.php:23
1722
- msgid "Per"
1723
- msgstr ""
1724
-
1725
- #: widgets/widgets/price-box/price-box.php:27
1726
- msgid "Information Text"
1727
- msgstr ""
1728
-
1729
- #: widgets/widgets/price-box/price-box.php:31
1730
- msgid "Features Text"
1731
- msgstr ""
1732
-
1733
- #: widgets/widgets/price-box/price-box.php:50
1734
- msgid "Feature List"
1735
- msgstr ""
1736
-
1737
- #: widgets/widgets/testimonial/testimonial.php:6
1738
- msgid "Testimonial (PB)"
1739
- msgstr ""
1740
-
1741
- #: widgets/widgets/testimonial/testimonial.php:8
1742
- msgid "Displays a bullet list of points"
1743
- msgstr ""
1744
-
1745
- #: widgets/widgets/testimonial/testimonial.php:19
1746
- msgid "Location"
1747
- msgstr ""
1748
-
1749
- #: widgets/widgets/testimonial/testimonial.php:23
1750
- msgid "Image"
1751
- msgstr ""
1752
-
1753
- #. translators: Uniform Resource Locator
1754
- #: widgets/widgets/testimonial/testimonial.php:32
1755
- msgid "URL"
1756
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/license.txt DELETED
@@ -1,674 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
- Preamble
9
-
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
12
-
13
- The licenses for most software and other practical works are designed
14
- to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
- share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- them if you wish), that you receive source code or can get it if you
26
- want it, that you can change the software or use pieces of it in new
27
- free programs, and that you know you can do these things.
28
-
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
-
68
- The precise terms and conditions for copying, distribution and
69
- modification follow.
70
-
71
- TERMS AND CONDITIONS
72
-
73
- 0. Definitions.
74
-
75
- "This License" refers to version 3 of the GNU General Public License.
76
-
77
- "Copyright" also means copyright-like laws that apply to other kinds of
78
- works, such as semiconductor masks.
79
-
80
- "The Program" refers to any copyrightable work licensed under this
81
- License. Each licensee is addressed as "you". "Licensees" and
82
- "recipients" may be individuals or organizations.
83
-
84
- To "modify" a work means to copy from or adapt all or part of the work
85
- in a fashion requiring copyright permission, other than the making of an
86
- exact copy. The resulting work is called a "modified version" of the
87
- earlier work or a work "based on" the earlier work.
88
-
89
- A "covered work" means either the unmodified Program or a work based
90
- on the Program.
91
-
92
- To "propagate" a work means to do anything with it that, without
93
- permission, would make you directly or secondarily liable for
94
- infringement under applicable copyright law, except executing it on a
95
- computer or modifying a private copy. Propagation includes copying,
96
- distribution (with or without modification), making available to the
97
- public, and in some countries other activities as well.
98
-
99
- To "convey" a work means any kind of propagation that enables other
100
- parties to make or receive copies. Mere interaction with a user through
101
- a computer network, with no transfer of a copy, is not conveying.
102
-
103
- An interactive user interface displays "Appropriate Legal Notices"
104
- to the extent that it includes a convenient and prominently visible
105
- feature that (1) displays an appropriate copyright notice, and (2)
106
- tells the user that there is no warranty for the work (except to the
107
- extent that warranties are provided), that licensees may convey the
108
- work under this License, and how to view a copy of this License. If
109
- the interface presents a list of user commands or options, such as a
110
- menu, a prominent item in the list meets this criterion.
111
-
112
- 1. Source Code.
113
-
114
- The "source code" for a work means the preferred form of the work
115
- for making modifications to it. "Object code" means any non-source
116
- form of a work.
117
-
118
- A "Standard Interface" means an interface that either is an official
119
- standard defined by a recognized standards body, or, in the case of
120
- interfaces specified for a particular programming language, one that
121
- is widely used among developers working in that language.
122
-
123
- The "System Libraries" of an executable work include anything, other
124
- than the work as a whole, that (a) is included in the normal form of
125
- packaging a Major Component, but which is not part of that Major
126
- Component, and (b) serves only to enable use of the work with that
127
- Major Component, or to implement a Standard Interface for which an
128
- implementation is available to the public in source code form. A
129
- "Major Component", in this context, means a major essential component
130
- (kernel, window system, and so on) of the specific operating system
131
- (if any) on which the executable work runs, or a compiler used to
132
- produce the work, or an object code interpreter used to run it.
133
-
134
- The "Corresponding Source" for a work in object code form means all
135
- the source code needed to generate, install, and (for an executable
136
- work) run the object code and to modify the work, including scripts to
137
- control those activities. However, it does not include the work's
138
- System Libraries, or general-purpose tools or generally available free
139
- programs which are used unmodified in performing those activities but
140
- which are not part of the work. For example, Corresponding Source
141
- includes interface definition files associated with source files for
142
- the work, and the source code for shared libraries and dynamically
143
- linked subprograms that the work is specifically designed to require,
144
- such as by intimate data communication or control flow between those
145
- subprograms and other parts of the work.
146
-
147
- The Corresponding Source need not include anything that users
148
- can regenerate automatically from other parts of the Corresponding
149
- Source.
150
-
151
- The Corresponding Source for a work in source code form is that
152
- same work.
153
-
154
- 2. Basic Permissions.
155
-
156
- All rights granted under this License are granted for the term of
157
- copyright on the Program, and are irrevocable provided the stated
158
- conditions are met. This License explicitly affirms your unlimited
159
- permission to run the unmodified Program. The output from running a
160
- covered work is covered by this License only if the output, given its
161
- content, constitutes a covered work. This License acknowledges your
162
- rights of fair use or other equivalent, as provided by copyright law.
163
-
164
- You may make, run and propagate covered works that you do not
165
- convey, without conditions so long as your license otherwise remains
166
- in force. You may convey covered works to others for the sole purpose
167
- of having them make modifications exclusively for you, or provide you
168
- with facilities for running those works, provided that you comply with
169
- the terms of this License in conveying all material for which you do
170
- not control copyright. Those thus making or running the covered works
171
- for you must do so exclusively on your behalf, under your direction
172
- and control, on terms that prohibit them from making any copies of
173
- your copyrighted material outside their relationship with you.
174
-
175
- Conveying under any other circumstances is permitted solely under
176
- the conditions stated below. Sublicensing is not allowed; section 10
177
- makes it unnecessary.
178
-
179
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
-
181
- No covered work shall be deemed part of an effective technological
182
- measure under any applicable law fulfilling obligations under article
183
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
- similar laws prohibiting or restricting circumvention of such
185
- measures.
186
-
187
- When you convey a covered work, you waive any legal power to forbid
188
- circumvention of technological measures to the extent such circumvention
189
- is effected by exercising rights under this License with respect to
190
- the covered work, and you disclaim any intention to limit operation or
191
- modification of the work as a means of enforcing, against the work's
192
- users, your or third parties' legal rights to forbid circumvention of
193
- technological measures.
194
-
195
- 4. Conveying Verbatim Copies.
196
-
197
- You may convey verbatim copies of the Program's source code as you
198
- receive it, in any medium, provided that you conspicuously and
199
- appropriately publish on each copy an appropriate copyright notice;
200
- keep intact all notices stating that this License and any
201
- non-permissive terms added in accord with section 7 apply to the code;
202
- keep intact all notices of the absence of any warranty; and give all
203
- recipients a copy of this License along with the Program.
204
-
205
- You may charge any price or no price for each copy that you convey,
206
- and you may offer support or warranty protection for a fee.
207
-
208
- 5. Conveying Modified Source Versions.
209
-
210
- You may convey a work based on the Program, or the modifications to
211
- produce it from the Program, in the form of source code under the
212
- terms of section 4, provided that you also meet all of these conditions:
213
-
214
- a) The work must carry prominent notices stating that you modified
215
- it, and giving a relevant date.
216
-
217
- b) The work must carry prominent notices stating that it is
218
- released under this License and any conditions added under section
219
- 7. This requirement modifies the requirement in section 4 to
220
- "keep intact all notices".
221
-
222
- c) You must license the entire work, as a whole, under this
223
- License to anyone who comes into possession of a copy. This
224
- License will therefore apply, along with any applicable section 7
225
- additional terms, to the whole of the work, and all its parts,
226
- regardless of how they are packaged. This License gives no
227
- permission to license the work in any other way, but it does not
228
- invalidate such permission if you have separately received it.
229
-
230
- d) If the work has interactive user interfaces, each must display
231
- Appropriate Legal Notices; however, if the Program has interactive
232
- interfaces that do not display Appropriate Legal Notices, your
233
- work need not make them do so.
234
-
235
- A compilation of a covered work with other separate and independent
236
- works, which are not by their nature extensions of the covered work,
237
- and which are not combined with it such as to form a larger program,
238
- in or on a volume of a storage or distribution medium, is called an
239
- "aggregate" if the compilation and its resulting copyright are not
240
- used to limit the access or legal rights of the compilation's users
241
- beyond what the individual works permit. Inclusion of a covered work
242
- in an aggregate does not cause this License to apply to the other
243
- parts of the aggregate.
244
-
245
- 6. Conveying Non-Source Forms.
246
-
247
- You may convey a covered work in object code form under the terms
248
- of sections 4 and 5, provided that you also convey the
249
- machine-readable Corresponding Source under the terms of this License,
250
- in one of these ways:
251
-
252
- a) Convey the object code in, or embodied in, a physical product
253
- (including a physical distribution medium), accompanied by the
254
- Corresponding Source fixed on a durable physical medium
255
- customarily used for software interchange.
256
-
257
- b) Convey the object code in, or embodied in, a physical product
258
- (including a physical distribution medium), accompanied by a
259
- written offer, valid for at least three years and valid for as
260
- long as you offer spare parts or customer support for that product
261
- model, to give anyone who possesses the object code either (1) a
262
- copy of the Corresponding Source for all the software in the
263
- product that is covered by this License, on a durable physical
264
- medium customarily used for software interchange, for a price no
265
- more than your reasonable cost of physically performing this
266
- conveying of source, or (2) access to copy the
267
- Corresponding Source from a network server at no charge.
268
-
269
- c) Convey individual copies of the object code with a copy of the
270
- written offer to provide the Corresponding Source. This
271
- alternative is allowed only occasionally and noncommercially, and
272
- only if you received the object code with such an offer, in accord
273
- with subsection 6b.
274
-
275
- d) Convey the object code by offering access from a designated
276
- place (gratis or for a charge), and offer equivalent access to the
277
- Corresponding Source in the same way through the same place at no
278
- further charge. You need not require recipients to copy the
279
- Corresponding Source along with the object code. If the place to
280
- copy the object code is a network server, the Corresponding Source
281
- may be on a different server (operated by you or a third party)
282
- that supports equivalent copying facilities, provided you maintain
283
- clear directions next to the object code saying where to find the
284
- Corresponding Source. Regardless of what server hosts the
285
- Corresponding Source, you remain obligated to ensure that it is
286
- available for as long as needed to satisfy these requirements.
287
-
288
- e) Convey the object code using peer-to-peer transmission, provided
289
- you inform other peers where the object code and Corresponding
290
- Source of the work are being offered to the general public at no
291
- charge under subsection 6d.
292
-
293
- A separable portion of the object code, whose source code is excluded
294
- from the Corresponding Source as a System Library, need not be
295
- included in conveying the object code work.
296
-
297
- A "User Product" is either (1) a "consumer product", which means any
298
- tangible personal property which is normally used for personal, family,
299
- or household purposes, or (2) anything designed or sold for incorporation
300
- into a dwelling. In determining whether a product is a consumer product,
301
- doubtful cases shall be resolved in favor of coverage. For a particular
302
- product received by a particular user, "normally used" refers to a
303
- typical or common use of that class of product, regardless of the status
304
- of the particular user or of the way in which the particular user
305
- actually uses, or expects or is expected to use, the product. A product
306
- is a consumer product regardless of whether the product has substantial
307
- commercial, industrial or non-consumer uses, unless such uses represent
308
- the only significant mode of use of the product.
309
-
310
- "Installation Information" for a User Product means any methods,
311
- procedures, authorization keys, or other information required to install
312
- and execute modified versions of a covered work in that User Product from
313
- a modified version of its Corresponding Source. The information must
314
- suffice to ensure that the continued functioning of the modified object
315
- code is in no case prevented or interfered with solely because
316
- modification has been made.
317
-
318
- If you convey an object code work under this section in, or with, or
319
- specifically for use in, a User Product, and the conveying occurs as
320
- part of a transaction in which the right of possession and use of the
321
- User Product is transferred to the recipient in perpetuity or for a
322
- fixed term (regardless of how the transaction is characterized), the
323
- Corresponding Source conveyed under this section must be accompanied
324
- by the Installation Information. But this requirement does not apply
325
- if neither you nor any third party retains the ability to install
326
- modified object code on the User Product (for example, the work has
327
- been installed in ROM).
328
-
329
- The requirement to provide Installation Information does not include a
330
- requirement to continue to provide support service, warranty, or updates
331
- for a work that has been modified or installed by the recipient, or for
332
- the User Product in which it has been modified or installed. Access to a
333
- network may be denied when the modification itself materially and
334
- adversely affects the operation of the network or violates the rules and
335
- protocols for communication across the network.
336
-
337
- Corresponding Source conveyed, and Installation Information provided,
338
- in accord with this section must be in a format that is publicly
339
- documented (and with an implementation available to the public in
340
- source code form), and must require no special password or key for
341
- unpacking, reading or copying.
342
-
343
- 7. Additional Terms.
344
-
345
- "Additional permissions" are terms that supplement the terms of this
346
- License by making exceptions from one or more of its conditions.
347
- Additional permissions that are applicable to the entire Program shall
348
- be treated as though they were included in this License, to the extent
349
- that they are valid under applicable law. If additional permissions
350
- apply only to part of the Program, that part may be used separately
351
- under those permissions, but the entire Program remains governed by
352
- this License without regard to the additional permissions.
353
-
354
- When you convey a copy of a covered work, you may at your option
355
- remove any additional permissions from that copy, or from any part of
356
- it. (Additional permissions may be written to require their own
357
- removal in certain cases when you modify the work.) You may place
358
- additional permissions on material, added by you to a covered work,
359
- for which you have or can give appropriate copyright permission.
360
-
361
- Notwithstanding any other provision of this License, for material you
362
- add to a covered work, you may (if authorized by the copyright holders of
363
- that material) supplement the terms of this License with terms:
364
-
365
- a) Disclaiming warranty or limiting liability differently from the
366
- terms of sections 15 and 16 of this License; or
367
-
368
- b) Requiring preservation of specified reasonable legal notices or
369
- author attributions in that material or in the Appropriate Legal
370
- Notices displayed by works containing it; or
371
-
372
- c) Prohibiting misrepresentation of the origin of that material, or
373
- requiring that modified versions of such material be marked in
374
- reasonable ways as different from the original version; or
375
-
376
- d) Limiting the use for publicity purposes of names of licensors or
377
- authors of the material; or
378
-
379
- e) Declining to grant rights under trademark law for use of some
380
- trade names, trademarks, or service marks; or
381
-
382
- f) Requiring indemnification of licensors and authors of that
383
- material by anyone who conveys the material (or modified versions of
384
- it) with contractual assumptions of liability to the recipient, for
385
- any liability that these contractual assumptions directly impose on
386
- those licensors and authors.
387
-
388
- All other non-permissive additional terms are considered "further
389
- restrictions" within the meaning of section 10. If the Program as you
390
- received it, or any part of it, contains a notice stating that it is
391
- governed by this License along with a term that is a further
392
- restriction, you may remove that term. If a license document contains
393
- a further restriction but permits relicensing or conveying under this
394
- License, you may add to a covered work material governed by the terms
395
- of that license document, provided that the further restriction does
396
- not survive such relicensing or conveying.
397
-
398
- If you add terms to a covered work in accord with this section, you
399
- must place, in the relevant source files, a statement of the
400
- additional terms that apply to those files, or a notice indicating
401
- where to find the applicable terms.
402
-
403
- Additional terms, permissive or non-permissive, may be stated in the
404
- form of a separately written license, or stated as exceptions;
405
- the above requirements apply either way.
406
-
407
- 8. Termination.
408
-
409
- You may not propagate or modify a covered work except as expressly
410
- provided under this License. Any attempt otherwise to propagate or
411
- modify it is void, and will automatically terminate your rights under
412
- this License (including any patent licenses granted under the third
413
- paragraph of section 11).
414
-
415
- However, if you cease all violation of this License, then your
416
- license from a particular copyright holder is reinstated (a)
417
- provisionally, unless and until the copyright holder explicitly and
418
- finally terminates your license, and (b) permanently, if the copyright
419
- holder fails to notify you of the violation by some reasonable means
420
- prior to 60 days after the cessation.
421
-
422
- Moreover, your license from a particular copyright holder is
423
- reinstated permanently if the copyright holder notifies you of the
424
- violation by some reasonable means, this is the first time you have
425
- received notice of violation of this License (for any work) from that
426
- copyright holder