Page Builder by SiteOrigin - Version 2.4.8

Version Description

  • May 13 2016 =
  • Reverted Wordfence fix from 2.4.7 - it raised other issues.
Download this release

Release Info

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

Code changes from version 2.4.6 to 2.4.8

changelog.txt DELETED
@@ -1,173 +0,0 @@
1
- == Changelog ==
2
-
3
- = 2.4.6 - April 13 2016 =
4
- * Fixed Javascript errors with layout builder widget.
5
-
6
- = 2.4.5 - April 13 2016 =
7
- * Only trigger contextual menu for topmost dialog.
8
- * Improved design of Live Editor preview.
9
- * Added Live Editor link in the admin menu bar.
10
-
11
- = 2.4.4 - April 6 2016 =
12
- * Fixed ordering of new rows, widgets and cells in builder interface.
13
- * Fixed Layout Builder widget sanitization error. Was causing fatal error on older versions of PHP.
14
-
15
- = 2.4.3 - April 6 2016 =
16
- * Fixed measurement style fields.
17
- * Properly process raw widgets in Live Editor.
18
- * Remove empty widgets from raw widget processing.
19
-
20
- = 2.4.2 - April 4 2016 =
21
- * Improved error handling and reporting.
22
- * Don't add widget class for TwentySixteen theme.
23
-
24
- = 2.4.1 - April 2 2016 =
25
- * Fixed: Copying content from standard editor to Page Builder
26
- * Fixed: Plugin conflict with Jetpack Widget Visibility and other plugins.
27
-
28
- = 2.4 - April 1 2016 =
29
- * Created new Live Editor.
30
- * Changes to Page Builder admin HTML structure for Live Editor.
31
- * New layout for prebuilt dialog.
32
- * Now possible to append, prepend and replace layouts in prebuilt dialog.
33
- * Fixed contextual menu in Layout Builder widget.
34
- * Added row/widget actions to contextual menu.
35
- * Clarified functionality of "Switch to Editor" button by renaming to "Revert to Editor".
36
- * refreshPanelsData function is called more consistently.
37
- * Various background performance enhancements.
38
- * Full JS code refactoring.
39
- * Fixed cell bottom margins with reverse collapse order.
40
- * Improved window scroll locking for dialogs.
41
- * Added `in_widget_form` action when rendering widget forms
42
- * Custom home page now saves revisions.
43
-
44
- = 2.3.2 - March 11 2016 =
45
- * Fixed compatibility with WordPress 4.5
46
-
47
- = 2.3.1 - February 10 2016 =
48
- * Fixed fatal error on RTL sites.
49
- * Made setting to enable tablet layout. Disabled by default.
50
-
51
- = 2.3 - February 10 2016 =
52
- * Delete preview panels data if there are no widgets.
53
- * Added a collapse order field.
54
- * Added custom row ID field.
55
- * Fixed copy content setting.
56
- * Added tablet responsive level.
57
- * Fixed admin templates.
58
- * Fix to ensure live editor works with HTTPs admin requests.
59
- * Fix for Yoast SEO compatibility.
60
- * Removed use of filter_input for HHVM issues.
61
- * Added panelsStretchRows event after frontend row stretch event.
62
- * Minor performance enhancements.
63
- * Merged all separate JS files into a single Browserify compiled file.
64
- * Added version numbers to some JS files to ensure cache busting.
65
-
66
- = 2.2.2 - December 09 2015 =
67
- * Fix tab name for WordPress 4.4. Was displaying undefined.
68
- * Fix to ensure siteorigin-panels class is added to Page Builder pages.
69
-
70
- = 2.2.1 - October 22 2015 =
71
- * Various fixes to widget class names.
72
- * Added option to remove default `widget` class from Page Builder widgets.
73
- * Added action to saving home page.
74
- * Added support for defaults in widget and row styles.
75
- * Improve check for the homepage in sidebars simulator.
76
- * Changed parallax library to improve theme compatibility.
77
- * List privately published posts and pages under the prebuilt layout dialog Clone options.
78
-
79
- = 2.2 - September 7 2015 =
80
- * Added prebuilt layout directory.
81
- * Added contextual menu for quick actions.
82
- * Added parallax background images.
83
- * Properly handle missing widgets when saving forms.
84
- * Don't revert to default page template when using custom home page interface.
85
- * Various minor bug fixes and improvements.
86
-
87
- = 2.1.5 - August 19 2015 =
88
- * Fixed handling of checkboxes and array fields.
89
- * Properly position Page Builder tab in WordPress 4.3.
90
-
91
- = 2.1.4 =
92
- * Fixed handling of raw forms.
93
-
94
- = 2.1.3 =
95
- * Removed use of filter_input for compatibility with HHVM
96
- * Fixed checkbox handling in forms.
97
- * Removed unnecessary sprintf calls to lower chance of translations causing issues.
98
- * More generic handling of builder instances to allow them to be used in different places.
99
- * Use implicit check for whether editor is undefined or null.
100
- * Added optional $widget_id parameter to siteorigin_panels_render_form.
101
- * Improved checking for home page in sidebars emulator.
102
- * Added a builder "type" to allow more targetted instances.
103
-
104
- = 2.1.2 =
105
- * Removed rendered content cache introduced in 2.1.1
106
-
107
- = 2.1.1 =
108
- * Added translations for 16 additional languages
109
- * Modified strings to improve translatability.
110
- * Row and Widget style measurement fields now allow multiple values.
111
- * New rows now added below row of currently selected cell.
112
- * Orphaned widgets in edited rows are now moved into remaining cell.
113
- * Made panels javascript object globally accessible.
114
- * panels_info array now passed into widget rendering function.
115
- * Removed unnecessary action triggers from customizer that was breaking some themes.
116
- * Disabling Page Builder on a page now properly creates history entry.
117
- * Small fixes to sidebars emulator.
118
- * Fixed import/export on custom home page interface.
119
- * Removed call to filter_input from global space.
120
- * Fixed bundled widgets conflict with Yoast SEO.
121
- * Prevented double rendering issue with Yoast SEO.
122
-
123
- = 2.1 =
124
- * Improved Page Builder settings page.
125
- * Added sidebar emulation, which makes a Page Builder page appear to be a sidebar. Improves compatibility with other widgets.
126
- * Removed jPlayer. Self hosted widget (legacy) now uses MediaElement.
127
- * Small usability improvements.
128
- * Added legacy widget migration for gallery widget.
129
- * Layout file based import/export feature.
130
- * Added widget title setting to change widget title HTML.
131
- * Added setting to control full width container.
132
- * Fixed: Handling of namespaced widgets.
133
- * Fixed: Layout Builder widget now works in the Customizer.
134
- * Fixed: Custom home page interface now properly uses page_on_front.
135
- * Fixed: Page URL for home page in custom home page.
136
- * Fixed: Custom home page encoding.
137
-
138
- = 2.0.7 =
139
- * Fixed issue that prevented prebuilt layouts from showing up.
140
-
141
- = 2.0.6 =
142
- * Added nonce to all admin requests.
143
- * Fixed live editor for missing widgets.
144
- * Fixed handling of multi-line row/widget custom CSS.
145
- * Fixed issue with encoding of panels_data.
146
-
147
- = 2.0.5 =
148
- * Added proper escaping in widget form.
149
-
150
- = 2.0.4 =
151
- * Changed how data is json encoded to prevent malformed Page Builder data.
152
- * Fixed import/export.
153
- * Added layout widget notification (doesn't work in customizer).
154
- * Fixed translation domains.
155
- * Additional hooks and filters.
156
-
157
- = 2.0.3 =
158
- * Fixed issue with double calling sidebar_admin_setup that was breaking some widgets.
159
- * Fixed fetching content from TinyMCE in text mode.
160
-
161
- = 2.0.2 =
162
- * Fixed fatal error in validation for PHP < 5.5
163
-
164
- = 2.0.1 =
165
- * Fixed issue with preview causing content loss in standard editor.
166
- * Fixed issue with Black Studio TinyMCE
167
- * Changed templating tags in js-templates.php to prevent fatal errors with some server configurations.
168
-
169
- = 2.0 =
170
- * Complete rewrite of Page Builder Javascript using Backbone.
171
- * Complete UI redesign.
172
- * Grid Engine rewrite for more efficient CSS.
173
- * Various performance enhancements and bug fixes.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/admin.css CHANGED
@@ -271,6 +271,9 @@
271
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
272
  box-shadow: 0 1px 2px rgba(0,0,0,0.075);
273
  }
 
 
 
274
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover {
275
  border: 1px solid #93a7ad;
276
  background: #fff;
@@ -278,22 +281,6 @@
278
  -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
279
  box-shadow: 0 2px 2px rgba(0,0,0,0.075);
280
  }
281
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered {
282
- background: #3a7096;
283
- border: 1px solid #39618c;
284
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
285
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
286
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
287
- }
288
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,
289
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span,
290
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
291
- color: #fff;
292
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
293
- }
294
- .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
295
- color: #eee;
296
- }
297
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper {
298
  padding: 7px 9px;
299
  overflow: hidden;
@@ -318,6 +305,9 @@
318
  margin-right: 5px;
319
  font-style: italic;
320
  }
 
 
 
321
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions {
322
  font-size: 12px;
323
  position: absolute;
@@ -361,6 +351,36 @@
361
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form {
362
  display: none;
363
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight {
365
  border: 1px solid;
366
  -ms-box-sizing: border-box;
@@ -492,6 +512,9 @@
492
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
493
  box-shadow: 0 1px 2px rgba(0,0,0,0.075);
494
  }
 
 
 
495
  .so-widget.ui-sortable-helper.widget-being-dragged:hover {
496
  border: 1px solid #93a7ad;
497
  background: #fff;
@@ -499,22 +522,6 @@
499
  -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
500
  box-shadow: 0 2px 2px rgba(0,0,0,0.075);
501
  }
502
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered {
503
- background: #3a7096;
504
- border: 1px solid #39618c;
505
- -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
506
- -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
507
- box-shadow: 0 2px 2px rgba(0,0,0,0.1);
508
- }
509
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,
510
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span,
511
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
512
- color: #fff;
513
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
514
- }
515
- .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
516
- color: #eee;
517
- }
518
  .so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper {
519
  padding: 7px 9px;
520
  overflow: hidden;
@@ -539,6 +546,9 @@
539
  margin-right: 5px;
540
  font-style: italic;
541
  }
 
 
 
542
  .so-widget.ui-sortable-helper.widget-being-dragged .title .actions {
543
  font-size: 12px;
544
  position: absolute;
@@ -582,6 +592,36 @@
582
  .so-widget.ui-sortable-helper.widget-being-dragged .form {
583
  display: none;
584
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  /* Handles displaying a builder in the WordPress widget interface */
586
  .widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container {
587
  padding-top: 0;
@@ -1526,6 +1566,15 @@
1526
  .so-panels-dialog .so-visual-styles .style-field-image .remove-image .remove-image {
1527
  color: #333;
1528
  }
 
 
 
 
 
 
 
 
 
1529
  .so-panels-dialog .so-visual-styles .so-field-code {
1530
  font-size: 12px;
1531
  font-family: "Courier 10 Pitch", Courier, monospace;
271
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
272
  box-shadow: 0 1px 2px rgba(0,0,0,0.075);
273
  }
274
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-move {
275
+ cursor: auto;
276
+ }
277
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget:hover {
278
  border: 1px solid #93a7ad;
279
  background: #fff;
281
  -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
282
  box-shadow: 0 2px 2px rgba(0,0,0,0.075);
283
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .so-widget-wrapper {
285
  padding: 7px 9px;
286
  overflow: hidden;
305
  margin-right: 5px;
306
  font-style: italic;
307
  }
308
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-no-edit h4 {
309
+ cursor: auto;
310
+ }
311
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .title .actions {
312
  font-size: 12px;
313
  position: absolute;
351
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget .form {
352
  display: none;
353
  }
354
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only,
355
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover {
356
+ background: #f5f5f5;
357
+ border: 1px solid #a6bac1;
358
+ -webkit-box-shadow: none;
359
+ -moz-box-shadow: none;
360
+ box-shadow: none;
361
+ }
362
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only h4,
363
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover h4,
364
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only small,
365
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-widget-read-only:hover small {
366
+ opacity: 0.5;
367
+ }
368
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered {
369
+ background: #3a7096;
370
+ border: 1px solid #39618c;
371
+ -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
372
+ -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
373
+ box-shadow: 0 2px 2px rgba(0,0,0,0.1);
374
+ }
375
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered h4,
376
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered span,
377
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
378
+ color: #fff;
379
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
380
+ }
381
+ .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget.so-hovered small {
382
+ color: #eee;
383
+ }
384
  .siteorigin-panels-builder .so-rows-container .so-row-container .so-cells .cell .widgets-container .so-widget-sortable-highlight {
385
  border: 1px solid;
386
  -ms-box-sizing: border-box;
512
  -moz-box-shadow: 0 1px 2px rgba(0,0,0,0.075);
513
  box-shadow: 0 1px 2px rgba(0,0,0,0.075);
514
  }
515
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-move {
516
+ cursor: auto;
517
+ }
518
  .so-widget.ui-sortable-helper.widget-being-dragged:hover {
519
  border: 1px solid #93a7ad;
520
  background: #fff;
522
  -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.075);
523
  box-shadow: 0 2px 2px rgba(0,0,0,0.075);
524
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
525
  .so-widget.ui-sortable-helper.widget-being-dragged .so-widget-wrapper {
526
  padding: 7px 9px;
527
  overflow: hidden;
546
  margin-right: 5px;
547
  font-style: italic;
548
  }
549
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-no-edit h4 {
550
+ cursor: auto;
551
+ }
552
  .so-widget.ui-sortable-helper.widget-being-dragged .title .actions {
553
  font-size: 12px;
554
  position: absolute;
592
  .so-widget.ui-sortable-helper.widget-being-dragged .form {
593
  display: none;
594
  }
595
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only,
596
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover {
597
+ background: #f5f5f5;
598
+ border: 1px solid #a6bac1;
599
+ -webkit-box-shadow: none;
600
+ -moz-box-shadow: none;
601
+ box-shadow: none;
602
+ }
603
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only h4,
604
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover h4,
605
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only small,
606
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-widget-read-only:hover small {
607
+ opacity: 0.5;
608
+ }
609
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered {
610
+ background: #3a7096;
611
+ border: 1px solid #39618c;
612
+ -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
613
+ -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.1);
614
+ box-shadow: 0 2px 2px rgba(0,0,0,0.1);
615
+ }
616
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered h4,
617
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered span,
618
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
619
+ color: #fff;
620
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
621
+ }
622
+ .so-widget.ui-sortable-helper.widget-being-dragged.so-hovered small {
623
+ color: #eee;
624
+ }
625
  /* Handles displaying a builder in the WordPress widget interface */
626
  .widgets-holder-wrap .widget-inside .siteorigin-panels-builder .so-builder-container {
627
  padding-top: 0;
1566
  .so-panels-dialog .so-visual-styles .style-field-image .remove-image .remove-image {
1567
  color: #333;
1568
  }
1569
+ .so-panels-dialog .so-visual-styles .style-field-checkbox label {
1570
+ -webkit-user-select: none;
1571
+ /* Chrome all / Safari all */
1572
+ -moz-user-select: none;
1573
+ /* Firefox all */
1574
+ -ms-user-select: none;
1575
+ /* IE 10+ */
1576
+ user-select: none;
1577
+ }
1578
  .so-panels-dialog .so-visual-styles .so-field-code {
1579
  font-size: 12px;
1580
  font-family: "Courier 10 Pitch", Courier, monospace;
css/live-editor-preview.css ADDED
@@ -0,0 +1,744 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: .6em 1em .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
+ }
inc/admin-actions.php CHANGED
@@ -35,8 +35,7 @@ function siteorigin_panels_ajax_widget_form(){
35
  $request = array_map('stripslashes_deep', $_REQUEST);
36
 
37
  $widget = $request['widget'];
38
-
39
- $instance = !empty($request['instance']) ? json_decode( $request['instance'] , true ) : array();
40
 
41
  $form = siteorigin_panels_render_form( $widget, $instance, $_REQUEST['raw'] == 'true' );
42
  $form = apply_filters('siteorigin_panels_ajax_widget_form', $form, $widget, $instance);
@@ -254,3 +253,15 @@ function siteorigin_panels_ajax_directory_enable(){
254
  wp_die();
255
  }
256
  add_action('wp_ajax_so_panels_directory_enable', 'siteorigin_panels_ajax_directory_enable');
 
 
 
 
 
 
 
 
 
 
 
 
35
  $request = array_map('stripslashes_deep', $_REQUEST);
36
 
37
  $widget = $request['widget'];
38
+ $instance = !empty($request['instance']) ? json_decode( $request['instance'], true ) : array();
 
39
 
40
  $form = siteorigin_panels_render_form( $widget, $instance, $_REQUEST['raw'] == 'true' );
41
  $form = apply_filters('siteorigin_panels_ajax_widget_form', $form, $widget, $instance);
253
  wp_die();
254
  }
255
  add_action('wp_ajax_so_panels_directory_enable', 'siteorigin_panels_ajax_directory_enable');
256
+
257
+ /**
258
+ * Preview in the live editor when there is no public view of the item
259
+ */
260
+ function siteorigin_panels_live_editor_preview(){
261
+ if( empty( $_REQUEST['_panelsnonce'] ) || !wp_verify_nonce($_REQUEST['_panelsnonce'], 'live-editor-preview') ) wp_die();
262
+
263
+ include plugin_dir_path( __FILE__ ) . '../tpl/live-editor-preview.php';
264
+
265
+ exit();
266
+ }
267
+ add_action('wp_ajax_so_panels_live_editor_preview', 'siteorigin_panels_live_editor_preview');
inc/default-styles.php CHANGED
@@ -5,7 +5,7 @@
5
  */
6
  function siteorigin_panels_default_styles_register_scripts(){
7
  wp_register_script( 'siteorigin-panels-front-styles', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
8
- wp_register_script( 'siteorigin-panels-front-parallax', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/jquery.stellar' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
9
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
10
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting('full-width-container') )
11
  ) );
@@ -78,7 +78,7 @@ class SiteOrigin_Panels_Default_Styling {
78
  'name' => __('Bottom Margin', 'siteorigin-panels'),
79
  'type' => 'measurement',
80
  'group' => 'layout',
81
- 'description' => __('Space below the row.', 'siteorigin-panels'),
82
  'priority' => 5,
83
  );
84
 
@@ -86,7 +86,7 @@ class SiteOrigin_Panels_Default_Styling {
86
  'name' => __('Gutter', 'siteorigin-panels'),
87
  'type' => 'measurement',
88
  'group' => 'layout',
89
- 'description' => __('Amount of space between columns.', 'siteorigin-panels'),
90
  'priority' => 6,
91
  );
92
 
@@ -293,12 +293,14 @@ class SiteOrigin_Panels_Default_Styling {
293
  if( !empty($url) ) {
294
 
295
  if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
296
- wp_enqueue_script('siteorigin-panels-front-parallax');
297
- $attributes['data-stellar-background-ratio'] = '0.5';
298
- $attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center; background-repeat: no-repeat;';
299
- if( $args['background_display'] == 'parallax' ) {
300
- $attributes['style'] .= 'background-size: cover;';
301
- }
 
 
302
  }
303
  else {
304
  $attributes['style'] .= 'background-image: url(' . $url[0] . ');';
@@ -367,12 +369,14 @@ class SiteOrigin_Panels_Default_Styling {
367
  if( !empty($url) ) {
368
 
369
  if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
370
- wp_enqueue_script('siteorigin-panels-front-parallax');
371
- $attributes['data-stellar-background-ratio'] = '0.5';
372
- $attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center; background-repeat: no-repeat;';
373
- if( $args['background_display'] == 'parallax' ) {
374
- $attributes['style'] .= 'background-size: cover;';
375
- }
 
 
376
  }
377
  else {
378
  $attributes['style'] .= 'background-image: url(' . $url[0] . ');';
5
  */
6
  function siteorigin_panels_default_styles_register_scripts(){
7
  wp_register_script( 'siteorigin-panels-front-styles', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
8
+ wp_register_script( 'siteorigin-parallax', plugin_dir_url(SITEORIGIN_PANELS_BASE_FILE) . 'js/siteorigin-parallax' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array('jquery'), SITEORIGIN_PANELS_VERSION );
9
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
10
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting('full-width-container') )
11
  ) );
78
  'name' => __('Bottom Margin', 'siteorigin-panels'),
79
  'type' => 'measurement',
80
  'group' => 'layout',
81
+ 'description' => sprintf( __('Space below the row. Default is %spx.', 'siteorigin-panels'), siteorigin_panels_setting( 'margin-bottom' ) ),
82
  'priority' => 5,
83
  );
84
 
86
  'name' => __('Gutter', 'siteorigin-panels'),
87
  'type' => 'measurement',
88
  'group' => 'layout',
89
+ 'description' => sprintf( __('Amount of space between columns. Default is %spx.', 'siteorigin-panels'), siteorigin_panels_setting( 'margin-sides' ) ),
90
  'priority' => 6,
91
  );
92
 
293
  if( !empty($url) ) {
294
 
295
  if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
296
+ wp_enqueue_script('siteorigin-parallax');
297
+ $parallax_args = array(
298
+ 'backgroundUrl' => $url[0],
299
+ 'backgroundSize' => array( $url[1], $url[2] ),
300
+ 'backgroundSizing' => $args['background_display'] == 'parallax-original' ? 'original' : 'scaled',
301
+ );
302
+ $attributes['data-siteorigin-parallax'] = json_encode( $parallax_args );
303
+ $attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center center; background-repeat: no-repeat;';
304
  }
305
  else {
306
  $attributes['style'] .= 'background-image: url(' . $url[0] . ');';
369
  if( !empty($url) ) {
370
 
371
  if( $args['background_display'] == 'parallax' || $args['background_display'] == 'parallax-original' ) {
372
+ wp_enqueue_script('siteorigin-parallax');
373
+ $parallax_args = array(
374
+ 'backgroundUrl' => $url[0],
375
+ 'backgroundSize' => array( $url[1], $url[2] ),
376
+ 'backgroundSizing' => $args['background_display'] == 'parallax-original' ? 'original' : 'scaled',
377
+ );
378
+ $attributes['data-siteorigin-parallax'] = json_encode( $parallax_args );
379
+ $attributes['style'] .= 'background-image: url(' . $url[0] . '); background-position: center center; background-repeat: no-repeat;';
380
  }
381
  else {
382
  $attributes['style'] .= 'background-image: url(' . $url[0] . ');';
inc/sidebars-emulator.php CHANGED
@@ -6,7 +6,7 @@ class SiteOrigin_Panels_Sidebars_Emulator {
6
 
7
  function __construct() {
8
  $this->all_posts_widgets = array();
9
- add_action( 'widgets_init', array( $this, 'register_widgets' ), 99 );
10
  add_filter( 'sidebars_widgets', array( $this, 'add_widgets_to_sidebars' ) );
11
  }
12
 
@@ -125,4 +125,4 @@ class SiteOrigin_Panels_Sidebars_Emulator {
125
  }
126
  }
127
 
128
- SiteOrigin_Panels_Sidebars_Emulator::single();
6
 
7
  function __construct() {
8
  $this->all_posts_widgets = array();
9
+ add_action( 'init', array( $this, 'register_widgets' ), 15 );
10
  add_filter( 'sidebars_widgets', array( $this, 'add_widgets_to_sidebars' ) );
11
  }
12
 
125
  }
126
  }
127
 
128
+ SiteOrigin_Panels_Sidebars_Emulator::single();
inc/styles.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
 
3
-
4
  /**
5
  * Admin action for handling fetching the style fields
6
  */
7
  function siteorigin_panels_ajax_action_style_form(){
8
  $type = $_REQUEST['type'];
9
  if( !in_array($type, array('row', 'widget') ) ) exit();
 
10
 
11
  $current = isset( $_REQUEST['style'] ) ? $_REQUEST['style'] : array();
12
  $post_id = empty( $_REQUEST['postId'] ) ? 0 : $_REQUEST['postId'];
13
 
14
- $args = !empty( $_POST['args'] ) ? json_decode( $_POST['args'], true) : array();
15
 
16
  switch($type) {
17
  case 'row':
@@ -35,6 +35,8 @@ add_action('wp_ajax_so_panels_style_form', 'siteorigin_panels_ajax_action_style_
35
  * @param array $current
36
  * @param int $post_id
37
  * @param array $args Arguments passed by the builder
 
 
38
  */
39
  function siteorigin_panels_render_styles_fields( $section, $before = '', $after = '', $current = array(), $post_id = 0, $args = array() ){
40
  $fields = apply_filters('siteorigin_panels_' . $section . '_style_fields', array(), $post_id, $args );
1
  <?php
2
 
 
3
  /**
4
  * Admin action for handling fetching the style fields
5
  */
6
  function siteorigin_panels_ajax_action_style_form(){
7
  $type = $_REQUEST['type'];
8
  if( !in_array($type, array('row', 'widget') ) ) exit();
9
+ if( empty( $_GET['_panelsnonce'] ) || !wp_verify_nonce( $_GET['_panelsnonce'], 'panels_action' ) ) exit();
10
 
11
  $current = isset( $_REQUEST['style'] ) ? $_REQUEST['style'] : array();
12
  $post_id = empty( $_REQUEST['postId'] ) ? 0 : $_REQUEST['postId'];
13
 
14
+ $args = !empty( $_POST['args'] ) ? json_decode( stripslashes( $_POST['args'] ), true) : array();
15
 
16
  switch($type) {
17
  case 'row':
35
  * @param array $current
36
  * @param int $post_id
37
  * @param array $args Arguments passed by the builder
38
+ *
39
+ * @return bool
40
  */
41
  function siteorigin_panels_render_styles_fields( $section, $before = '', $after = '', $current = array(), $post_id = 0, $args = array() ){
42
  $fields = apply_filters('siteorigin_panels_' . $section . '_style_fields', array(), $post_id, $args );
js/siteorigin-panels-24.js CHANGED
@@ -584,7 +584,7 @@ module.exports = panels.view.dialog.extend( {
584
 
585
  // Handle exporting the file
586
  c.find( '.so-export' ).submit( function ( e ) {
587
- var $$ = jQuery( this );
588
  $$.find( 'input[name="panels_export_data"]' ).val( JSON.stringify( thisView.builder.model.getPanelsData() ) );
589
  } );
590
 
@@ -904,10 +904,17 @@ module.exports = panels.view.dialog.extend( {
904
  this.styles = new panels.view.styles();
905
  this.styles.model = this.model;
906
  this.styles.render( 'row', $( '#post_ID' ).val(), {
907
- builderType: this.builder.builderType,
908
  dialog: this
909
  } );
910
 
 
 
 
 
 
 
 
911
  var $rightSidebar = this.$( '.so-sidebar.so-right-sidebar' );
912
  this.styles.attach( $rightSidebar );
913
 
@@ -1330,7 +1337,7 @@ module.exports = panels.view.dialog.extend( {
1330
  }, args );
1331
 
1332
  // Set the cells
1333
- if( ! _.isUndefined( this.model ) ) {
1334
  this.model.setCells( this.row.cells );
1335
  }
1336
 
@@ -1480,11 +1487,18 @@ module.exports = panels.view.dialog.extend( {
1480
  this.$( '.so-title .widget-name' ).html( panelsOptions.loc.missing_widget.title );
1481
  }
1482
 
 
 
 
 
 
 
 
1483
  // Now we need to attach the style window
1484
  this.styles = new panels.view.styles();
1485
  this.styles.model = this.model;
1486
  this.styles.render( 'widget', $( '#post_ID' ).val(), {
1487
- builderType: this.builder.builderType,
1488
  dialog: this
1489
  } );
1490
 
@@ -1518,13 +1532,15 @@ module.exports = panels.view.dialog.extend( {
1518
  if ( currentIndex === 0 ) {
1519
  return false;
1520
  } else {
1521
- var widgetView = widgets.eq( currentIndex - 1 ).data( 'view' );
1522
- if ( _.isUndefined( widgetView ) ) {
1523
- return false;
1524
- }
1525
-
1526
- return widgetView.getEditDialog();
1527
  }
 
 
1528
  },
1529
 
1530
  /**
@@ -1536,18 +1552,21 @@ module.exports = panels.view.dialog.extend( {
1536
  if ( widgets.length <= 1 ) {
1537
  return false;
1538
  }
1539
- var currentIndex = widgets.index( this.widgetView.$el );
 
1540
 
1541
  if ( currentIndex === widgets.length - 1 ) {
1542
  return false;
1543
  } else {
1544
- var widgetView = widgets.eq( currentIndex + 1 ).data( 'view' );
1545
- if ( _.isUndefined( widgetView ) ) {
1546
- return false;
1547
- }
1548
-
1549
- return widgetView.getEditDialog();
1550
  }
 
 
1551
  },
1552
 
1553
  /**
@@ -1916,12 +1935,15 @@ module.exports = panels.view.dialog.extend( {
1916
 
1917
  var panels = window.panels, $ = jQuery;
1918
 
1919
- module.exports = function () {
1920
 
1921
  return this.each( function () {
1922
  var $$ = jQuery( this );
1923
  var widgetId = $$.closest( 'form' ).find( '.widget-id' ).val();
1924
 
 
 
 
1925
  // Exit if this isn't a real widget
1926
  if ( ! _.isUndefined( widgetId ) && widgetId.indexOf( '__i__' ) > - 1 ) {
1927
  return;
@@ -1932,7 +1954,8 @@ module.exports = function () {
1932
 
1933
  // Now for the view to display the builder
1934
  var builderView = new panels.view.builder( {
1935
- model: builderModel
 
1936
  } );
1937
 
1938
  // Save panels data when we close the dialog, if we're in a dialog
@@ -1962,12 +1985,12 @@ module.exports = function () {
1962
  .render()
1963
  .attach( {
1964
  container: $$,
1965
- dialog: isWidget,
1966
  type: $$.data( 'type' )
1967
  } )
1968
  .setDataField( $$.find( 'input.panels-data' ) );
1969
 
1970
- if ( isWidget ) {
1971
  // Set up the dialog opening
1972
  builderView.setDialogParents( panelsOptions.loc.layout_widget, builderView.dialog );
1973
  $$.find( '.siteorigin-panels-display-builder' ).click( function ( e ) {
@@ -1988,11 +2011,11 @@ module.exports = function () {
1988
  /**
1989
  * Everything we need for SiteOrigin Page Builder.
1990
  *
1991
- * @copyright Greg Priday 2013 - 2014 - <https://siteorigin.com/>
1992
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
1993
  */
1994
 
1995
- /* global Backbone, _, jQuery, tinyMCE, panelsOptions, plupload, confirm, console */
1996
 
1997
  /**
1998
  * Convert template into something compatible with Underscore.js templates
@@ -2059,29 +2082,44 @@ jQuery.fn.soPanelsSetupBuilderWidget = require( './jquery/setup-builder-widget'
2059
  // Set up Page Builder if we're on the main interface
2060
  jQuery( function ( $ ) {
2061
 
2062
- var container, field, form, editorType, editorId, postId, builderType, loadLiveEditor;
 
 
 
2063
 
2064
  if ( $( '#siteorigin-panels-metabox' ).length && $( 'form#post' ).length ) {
2065
  // This is usually the case when we're in the post edit interface
2066
  container = $( '#siteorigin-panels-metabox' );
2067
  field = $( '#siteorigin-panels-metabox .siteorigin-panels-data-field' );
2068
  form = $( 'form#post' );
2069
- editorType = 'tinymce';
2070
- editorId = '#content';
2071
- postId = $( '#post_ID' ).val();
2072
- builderType = 'editor_attached';
2073
- loadLiveEditor = $( '#siteorigin-panels-metabox' ).data('live-editor') == 1;
 
 
 
 
 
2074
  }
2075
  else if ( $( '.siteorigin-panels-builder-form' ).length ) {
2076
  // We're dealing with another interface like the custom home page interface
2077
  var $$ = $( '.siteorigin-panels-builder-form' );
 
2078
  container = $$.find( '.siteorigin-panels-builder-container' );
2079
  field = $$.find( 'input[name="panels_data"]' );
2080
  form = $$;
2081
- editorId = '#post_content';
2082
- postId = $( '#panels-home-page' ).data( 'post-id' );
2083
- builderType = $$.data( 'type' );
2084
- loadLiveEditor = false;
 
 
 
 
 
 
2085
  }
2086
 
2087
  if ( ! _.isUndefined( container ) ) {
@@ -2091,15 +2129,6 @@ jQuery( function ( $ ) {
2091
  // Create the main builder model
2092
  var builderModel = new panels.model.builder();
2093
 
2094
- // Create the builder config
2095
- var builderConfig = {
2096
- editorType: editorType,
2097
- postId: postId,
2098
- editorId: editorId,
2099
- builderType: builderType,
2100
- loadLiveEditor: loadLiveEditor
2101
- };
2102
-
2103
  // Now for the view to display the builder
2104
  var builderView = new panels.view.builder( {
2105
  model: builderModel,
@@ -2110,16 +2139,13 @@ jQuery( function ( $ ) {
2110
  builderView
2111
  .render()
2112
  .attach( {
2113
- container: container,
2114
- type: builderType
2115
  } )
2116
  .setDataField( field )
2117
- .attachToEditor()
2118
- .addLiveEditor( postId )
2119
- .addHistoryBrowser();
2120
 
2121
  // When the form is submitted, update the panels data
2122
- form.submit( function ( e ) {
2123
  // Refresh the data
2124
  builderModel.refreshPanelsData();
2125
  } );
@@ -2265,8 +2291,18 @@ module.exports = Backbone.Model.extend( {
2265
  newWidget.set( 'style', panels_info.style );
2266
  }
2267
 
 
 
 
 
 
 
 
 
 
 
2268
  newWidget.cell = cell;
2269
- cell.widgets.add( newWidget, {noAnimate: true} );
2270
  } );
2271
 
2272
  this.trigger( 'load_panels_data' );
@@ -2333,6 +2369,8 @@ module.exports = Backbone.Model.extend( {
2333
  */
2334
  getPanelsData: function () {
2335
 
 
 
2336
  var data = {
2337
  'widgets': [],
2338
  'grids': [],
@@ -2346,15 +2384,23 @@ module.exports = Backbone.Model.extend( {
2346
 
2347
  cell.widgets.each( function ( widget, wi ) {
2348
  // Add the data for the widget, including the panels_info field.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2349
  var values = _.extend( _.clone( widget.get( 'values' ) ), {
2350
- panels_info: {
2351
- class: widget.get( 'class' ),
2352
- raw: widget.get( 'raw' ),
2353
- grid: ri,
2354
- cell: ci,
2355
- id: widgetId ++,
2356
- style: widget.get( 'style' )
2357
- }
2358
  } );
2359
  data.widgets.push( values );
2360
  } );
@@ -2412,6 +2458,19 @@ module.exports = Backbone.Model.extend( {
2412
  return position === this.layoutPosition.BEFORE ||
2413
  position === this.layoutPosition.AFTER ||
2414
  position === this.layoutPosition.REPLACE;
 
 
 
 
 
 
 
 
 
 
 
 
 
2415
  }
2416
 
2417
  } );
@@ -2637,7 +2696,10 @@ module.exports = Backbone.Model.extend( {
2637
  raw: false,
2638
 
2639
  // Visual style fields
2640
- styles: {}
 
 
 
2641
  },
2642
 
2643
  indexes: null,
@@ -3135,9 +3197,7 @@ var panels = window.panels, $ = jQuery;
3135
  module.exports = Backbone.View.extend( {
3136
 
3137
  // Config options
3138
- editorType: null,
3139
- postId: null,
3140
- editorId: null,
3141
 
3142
  template: _.template( $( '#siteorigin-panels-builder' ).html().panelsProcessTemplate() ),
3143
  dialogs: {},
@@ -3149,9 +3209,6 @@ module.exports = Backbone.View.extend( {
3149
  liveEditor: undefined,
3150
  menu: false,
3151
 
3152
- /* The builderType is sent with all requests to the server */
3153
- builderType: '',
3154
-
3155
  events: {
3156
  'click .so-tool-button.so-widget-add': 'displayAddWidgetDialog',
3157
  'click .so-tool-button.so-row-add': 'displayAddRowDialog',
@@ -3169,18 +3226,32 @@ module.exports = Backbone.View.extend( {
3169
  initialize: function ( options ) {
3170
  var builder = this;
3171
 
3172
- if ( ! _.isUndefined( options.config ) ) {
3173
- this.editorType = options.config.editorType;
3174
- this.editorId = options.config.editorId;
3175
- this.builderType = options.config.builderType;
3176
- this.postId = options.config.postId;
3177
-
3178
- if( options.config.loadLiveEditor ) {
3179
- this.on( 'builder_live_editor_added', function(){
3180
- this.displayLiveEditor();
3181
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3182
  }
3183
- }
3184
 
3185
  // Now lets create all the dialog boxes that the main builder interface uses
3186
  this.dialogs = {
@@ -3248,7 +3319,6 @@ module.exports = Backbone.View.extend( {
3248
  attach: function ( options ) {
3249
 
3250