Cherry Projects - Version 1.2.3

Version Description

  • Add responsive layouts for masonry and grid layout
  • Fixed bugs
Download this release

Release Info

Developer TemplateMonster 2002
Plugin Icon 128x128 Cherry Projects
Version 1.2.3
Comparing to
See all releases

Code changes from version 1.2.2 to 1.2.3

admin/assets/css/admin-style.css CHANGED
@@ -37,6 +37,12 @@
37
  background: rgba(0, 0, 0, 0.2); }
38
  #cherry-projects-options-form .cherry-projects-options-list-wrapper::-webkit-scrollbar-corner {
39
  background: transparent; }
 
 
 
 
 
 
40
  #cherry-projects-options-form .cherry-projects-options-control-wrapper {
41
  position: relative;
42
  margin-top: 30px;
@@ -74,12 +80,10 @@
74
 
75
  .option-section {
76
  display: -webkit-box;
77
- display: -webkit-flex;
78
  display: -ms-flexbox;
79
  display: flex;
80
- -webkit-flex-flow: row nowrap;
81
- -ms-flex-flow: row nowrap;
82
- flex-flow: row nowrap;
83
  box-shadow: 0px 5px 21px rgba(0, 0, 0, 0.1);
84
  padding: 20px 30px;
85
  background-color: #fff;
@@ -90,16 +94,14 @@
90
  border-radius: 0 0 4px 4px; }
91
  .option-section .option-info-wrapper {
92
  -webkit-box-flex: 0;
93
- -webkit-flex: 0 1 30%;
94
- -ms-flex: 0 1 30%;
95
- flex: 0 1 30%; }
96
  .option-section .option-info-wrapper .option-description {
97
  font-style: italic; }
98
  .option-section .option-ui-element-wrapper {
99
  -webkit-box-flex: 0;
100
- -webkit-flex: 0 1 70%;
101
- -ms-flex: 0 1 70%;
102
- flex: 0 1 70%; }
103
 
104
  .notice-box {
105
  background: #23282d;
@@ -163,82 +165,73 @@
163
  top: 0;
164
  left: 0;
165
  -webkit-animation: tm-bounce 2.0s infinite ease-in-out;
166
- animation: tm-bounce 2.0s infinite ease-in-out; }
167
 
168
  .double-bounce-2 {
169
  -webkit-animation-delay: -1.0s;
170
- animation-delay: -1.0s; }
171
 
172
  @-webkit-keyframes tm-bounce {
173
  0%, 100% {
174
  -webkit-transform: scale(0);
175
- transform: scale(0); }
176
  50% {
177
  -webkit-transform: scale(1);
178
- transform: scale(1); } }
179
 
180
  @keyframes tm-bounce {
181
  0%, 100% {
182
  -webkit-transform: scale(0);
183
- transform: scale(0); }
184
  50% {
185
  -webkit-transform: scale(1);
186
- transform: scale(1); } }
 
187
  .cherry-project-tabs-wrapper.cherry-component {
188
  padding: 5px 0; }
189
 
190
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box {
191
  display: -webkit-box;
192
- display: -webkit-flex;
193
  display: -ms-flexbox;
194
  display: flex;
195
- -webkit-flex-flow: row wrap;
196
- -ms-flex-flow: row wrap;
197
- flex-flow: row wrap; }
198
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .detail_label-wrap {
199
  -webkit-box-flex: 0;
200
- -webkit-flex: 0 1 49%;
201
- -ms-flex: 0 1 49%;
202
- flex: 0 1 49%;
203
  margin-right: 1%; }
204
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .detail_info-wrap {
205
  -webkit-box-flex: 0;
206
- -webkit-flex: 0 1 49%;
207
- -ms-flex: 0 1 49%;
208
- flex: 0 1 49%;
209
  margin-left: 1%; }
210
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .skill_label-wrap {
211
  -webkit-box-flex: 0;
212
- -webkit-flex: 0 1 100%;
213
- -ms-flex: 0 1 100%;
214
- flex: 0 1 100%;
215
  margin-bottom: 20px; }
216
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .skill_value-wrap {
217
  -webkit-box-flex: 0;
218
- -webkit-flex: 0 1 100%;
219
- -ms-flex: 0 1 100%;
220
- flex: 0 1 100%; }
221
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_type-wrap {
222
  -webkit-box-flex: 0;
223
- -webkit-flex: 0 1 100%;
224
- -ms-flex: 0 1 100%;
225
- flex: 0 1 100%;
226
  margin-bottom: 20px; }
227
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_embed-wrap {
228
  -webkit-box-flex: 0;
229
- -webkit-flex: 0 1 100%;
230
- -ms-flex: 0 1 100%;
231
- flex: 0 1 100%;
232
  margin-bottom: 20px; }
233
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_src-wrap {
234
  -webkit-box-flex: 0;
235
- -webkit-flex: 0 1 10%;
236
- -ms-flex: 0 1 10%;
237
- flex: 0 1 10%;
238
  margin-right: 5px; }
239
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .poster_src-wrap {
240
  -webkit-box-flex: 0;
241
- -webkit-flex: 0 1 10%;
242
- -ms-flex: 0 1 10%;
243
- flex: 0 1 10%;
244
  margin-left: 5px; }
37
  background: rgba(0, 0, 0, 0.2); }
38
  #cherry-projects-options-form .cherry-projects-options-list-wrapper::-webkit-scrollbar-corner {
39
  background: transparent; }
40
+ #cherry-projects-options-form .cherry-projects-options-list-wrapper {
41
+ position: relative;
42
+ padding: 30px;
43
+ background-color: #fff;
44
+ border-radius: 4px;
45
+ box-shadow: 0px 5px 21px rgba(0, 0, 0, 0.1); }
46
  #cherry-projects-options-form .cherry-projects-options-control-wrapper {
47
  position: relative;
48
  margin-top: 30px;
80
 
81
  .option-section {
82
  display: -webkit-box;
 
83
  display: -ms-flexbox;
84
  display: flex;
85
+ -ms-flex-flow: row nowrap;
86
+ flex-flow: row nowrap;
 
87
  box-shadow: 0px 5px 21px rgba(0, 0, 0, 0.1);
88
  padding: 20px 30px;
89
  background-color: #fff;
94
  border-radius: 0 0 4px 4px; }
95
  .option-section .option-info-wrapper {
96
  -webkit-box-flex: 0;
97
+ -ms-flex: 0 1 30%;
98
+ flex: 0 1 30%; }
 
99
  .option-section .option-info-wrapper .option-description {
100
  font-style: italic; }
101
  .option-section .option-ui-element-wrapper {
102
  -webkit-box-flex: 0;
103
+ -ms-flex: 0 1 70%;
104
+ flex: 0 1 70%; }
 
105
 
106
  .notice-box {
107
  background: #23282d;
165
  top: 0;
166
  left: 0;
167
  -webkit-animation: tm-bounce 2.0s infinite ease-in-out;
168
+ animation: tm-bounce 2.0s infinite ease-in-out; }
169
 
170
  .double-bounce-2 {
171
  -webkit-animation-delay: -1.0s;
172
+ animation-delay: -1.0s; }
173
 
174
  @-webkit-keyframes tm-bounce {
175
  0%, 100% {
176
  -webkit-transform: scale(0);
177
+ transform: scale(0); }
178
  50% {
179
  -webkit-transform: scale(1);
180
+ transform: scale(1); } }
181
 
182
  @keyframes tm-bounce {
183
  0%, 100% {
184
  -webkit-transform: scale(0);
185
+ transform: scale(0); }
186
  50% {
187
  -webkit-transform: scale(1);
188
+ transform: scale(1); } }
189
+
190
  .cherry-project-tabs-wrapper.cherry-component {
191
  padding: 5px 0; }
192
 
193
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box {
194
  display: -webkit-box;
 
195
  display: -ms-flexbox;
196
  display: flex;
197
+ -ms-flex-flow: row wrap;
198
+ flex-flow: row wrap; }
 
199
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .detail_label-wrap {
200
  -webkit-box-flex: 0;
201
+ -ms-flex: 0 1 49%;
202
+ flex: 0 1 49%;
 
203
  margin-right: 1%; }
204
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .detail_info-wrap {
205
  -webkit-box-flex: 0;
206
+ -ms-flex: 0 1 49%;
207
+ flex: 0 1 49%;
 
208
  margin-left: 1%; }
209
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .skill_label-wrap {
210
  -webkit-box-flex: 0;
211
+ -ms-flex: 0 1 100%;
212
+ flex: 0 1 100%;
 
213
  margin-bottom: 20px; }
214
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .skill_value-wrap {
215
  -webkit-box-flex: 0;
216
+ -ms-flex: 0 1 100%;
217
+ flex: 0 1 100%; }
 
218
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_type-wrap {
219
  -webkit-box-flex: 0;
220
+ -ms-flex: 0 1 100%;
221
+ flex: 0 1 100%;
 
222
  margin-bottom: 20px; }
223
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_embed-wrap {
224
  -webkit-box-flex: 0;
225
+ -ms-flex: 0 1 100%;
226
+ flex: 0 1 100%;
 
227
  margin-bottom: 20px; }
228
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .video_src-wrap {
229
  -webkit-box-flex: 0;
230
+ -ms-flex: 0 1 10%;
231
+ flex: 0 1 10%;
 
232
  margin-right: 5px; }
233
  .cherry-ui-repeater-container .cheryr-ui-repeater-content-box .poster_src-wrap {
234
  -webkit-box-flex: 0;
235
+ -ms-flex: 0 1 10%;
236
+ flex: 0 1 10%;
 
237
  margin-left: 5px; }
admin/assets/scss/admin-style.scss CHANGED
@@ -50,7 +50,16 @@
50
  }
51
 
52
  }
53
- .cherry-projects-options-control-wrapper{
 
 
 
 
 
 
 
 
 
54
  position: relative;
55
  margin-top: 30px;
56
  padding: 30px;
50
  }
51
 
52
  }
53
+
54
+ .cherry-projects-options-list-wrapper {
55
+ position: relative;
56
+ padding: 30px;
57
+ background-color: #fff;
58
+ border-radius: 4px;
59
+ box-shadow: 0px 5px 21px rgba(0, 0, 0, 0.1);
60
+ }
61
+
62
+ .cherry-projects-options-control-wrapper {
63
  position: relative;
64
  margin-top: 30px;
65
  padding: 30px;
admin/includes/class-projects-admin.php CHANGED
@@ -453,15 +453,95 @@ class Cherry_Projects_Admin {
453
  'value' => '',
454
  ),
455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  'column_number' => array(
457
  'type' => 'slider',
 
458
  'title' => esc_html__( 'Column number', 'cherry-projects' ),
459
- 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 2, max 6)', 'cherry-projects' ),
460
  'max_value' => 6,
461
- 'min_value' => 2,
 
 
 
 
 
 
 
 
 
 
462
  'value' => 3,
463
  ),
464
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
  'post_per_page' => array(
466
  'type' => 'slider',
467
  'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
453
  'value' => '',
454
  ),
455
 
456
+ 'device_layout_column_number' => array(
457
+ 'type' => 'component-tab-horizontal',
458
+ ),
459
+
460
+ 'column_number_desktop_layout' => array(
461
+ 'type' => 'settings',
462
+ 'parent' => 'device_layout_column_number',
463
+ 'title' => esc_html__( 'Desktop', 'cherry-projects' ),
464
+ 'description' => esc_html__( 'Define column number for desktop layout', 'cherry-projects' ),
465
+ ),
466
+
467
+ 'column_number_laptop_layout' => array(
468
+ 'type' => 'settings',
469
+ 'parent' => 'device_layout_column_number',
470
+ 'title' => esc_html__( 'Laptop', 'cherry-projects' ),
471
+ 'description' => esc_html__( 'Define column number for laptop layout', 'cherry-projects' ),
472
+ ),
473
+
474
+ 'column_number_album_tablet_layout' => array(
475
+ 'type' => 'settings',
476
+ 'parent' => 'device_layout_column_number',
477
+ 'title' => esc_html__( 'Album Tablet', 'cherry-projects' ),
478
+ 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
479
+ ),
480
+
481
+ 'column_number_portrait_tablet_layout' => array(
482
+ 'type' => 'settings',
483
+ 'parent' => 'device_layout_column_number',
484
+ 'title' => esc_html__( 'Portrait Tablet', 'cherry-projects' ),
485
+ 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
486
+ ),
487
+
488
+ 'column_number_mobile_layout' => array(
489
+ 'type' => 'settings',
490
+ 'parent' => 'device_layout_column_number',
491
+ 'title' => esc_html__( 'Mobile', 'cherry-projects' ),
492
+ 'description' => esc_html__( 'Define column number for mobile layout', 'cherry-projects' ),
493
+ ),
494
+
495
  'column_number' => array(
496
  'type' => 'slider',
497
+ 'parent' => 'column_number_desktop_layout',
498
  'title' => esc_html__( 'Column number', 'cherry-projects' ),
499
+ 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
500
  'max_value' => 6,
501
+ 'min_value' => 1,
502
+ 'value' => 4,
503
+ ),
504
+
505
+ 'column_number_laptop' => array(
506
+ 'type' => 'slider',
507
+ 'parent' => 'column_number_laptop_layout',
508
+ 'title' => esc_html__( 'Labtop column number', 'cherry-projects' ),
509
+ 'description' => esc_html__( 'Select laptop number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
510
+ 'max_value' => 6,
511
+ 'min_value' => 1,
512
  'value' => 3,
513
  ),
514
 
515
+ 'column_number_album_tablet' => array(
516
+ 'type' => 'slider',
517
+ 'parent' => 'column_number_album_tablet_layout',
518
+ 'title' => esc_html__( 'Album Tablet column number', 'cherry-projects' ),
519
+ 'description' => esc_html__( 'Select album tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
520
+ 'max_value' => 6,
521
+ 'min_value' => 1,
522
+ 'value' => 2,
523
+ ),
524
+
525
+ 'column_number_portrait_tablet' => array(
526
+ 'type' => 'slider',
527
+ 'parent' => 'column_number_portrait_tablet_layout',
528
+ 'title' => esc_html__( 'Portrait Tablet column number', 'cherry-projects' ),
529
+ 'description' => esc_html__( 'Select portrait tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
530
+ 'max_value' => 6,
531
+ 'min_value' => 1,
532
+ 'value' => 2,
533
+ ),
534
+
535
+ 'column_number_mobile' => array(
536
+ 'type' => 'slider',
537
+ 'parent' => 'column_number_mobile_layout',
538
+ 'title' => esc_html__( 'Tablet column number', 'cherry-projects' ),
539
+ 'description' => esc_html__( 'Select mobile number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
540
+ 'max_value' => 6,
541
+ 'min_value' => 1,
542
+ 'value' => 1,
543
+ ),
544
+
545
  'post_per_page' => array(
546
  'type' => 'slider',
547
  'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
admin/includes/class-projects-options-page.php CHANGED
@@ -47,6 +47,14 @@ class Cherry_Projects_Options_Page {
47
  */
48
  public $utility = null;
49
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Sets up needed actions/filters for the admin to initialize.
52
  *
@@ -74,16 +82,70 @@ class Cherry_Projects_Options_Page {
74
  */
75
  public function init() {
76
  $this->utility = cherry_projects()->get_core()->modules['cherry-utility']->utility;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
- $this->projects_options = array(
79
  'listing-layout' => array(
80
- 'type' => 'radio',
81
- 'title' => esc_html__( 'Projects listing layout', 'cherry-projects' ),
82
- 'description' => esc_html__( 'Choose projects listing view layout.', 'cherry-projects' ),
83
- 'value' => 'grid-layout',
84
- 'class' => '',
85
- 'display_input' => false,
86
- 'options' => array(
 
87
  'grid-layout' => array(
88
  'label' => esc_html__( 'Grid', 'cherry-projects' ),
89
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-grid.svg',
@@ -111,14 +173,16 @@ class Cherry_Projects_Options_Page {
111
  ),
112
  ),
113
  ),
 
114
  'loading-mode' => array(
115
- 'type' => 'radio',
116
- 'title' => esc_html__( 'Pagination mode', 'cherry-projects' ),
117
- 'description' => esc_html__( 'Choose projects pagination mode', 'cherry-projects' ),
118
- 'value' => 'ajax-pagination-mode',
119
- 'class' => '',
120
- 'display_input' => false,
121
- 'options' => array(
 
122
  'ajax-pagination-mode' => array(
123
  'label' => esc_html__( 'Ajax pagination', 'cherry-projects' ),
124
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-ajax-pagination.svg',
@@ -137,14 +201,16 @@ class Cherry_Projects_Options_Page {
137
  ),
138
  ),
139
  ),
 
140
  'loading-animation' => array(
141
- 'type' => 'radio',
142
- 'title' => esc_html__( 'Loading animation', 'cherry-projects' ),
143
- 'description' => esc_html__( 'Choose posts loading animation', 'cherry-projects' ),
144
- 'value' => 'loading-animation-move-up',
145
- 'class' => '',
146
- 'display_input' => false,
147
- 'options' => array(
 
148
  'loading-animation-fade' => array(
149
  'label' => esc_html__( 'Fade animation', 'cherry-projects' ),
150
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fade.svg',
@@ -171,93 +237,105 @@ class Cherry_Projects_Options_Page {
171
  ),
172
  ),
173
  ),
 
174
  'hover-animation' => array(
175
- 'type' => 'radio',
176
- 'title' => esc_html__( 'Hover animation', 'cherry-projects' ),
177
- 'description' => esc_html__( 'Choose posts images hover animation', 'cherry-projects' ),
178
- 'value' => 'simple-scale',
179
- 'class' => '',
180
- 'display_input' => false,
181
- 'options' => array(
 
182
  'simple-fade' => array(
183
- 'label' => esc_html__( 'Fade', 'cherry-projects' ),
184
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-fade.svg',
185
  ),
186
  'simple-scale' => array(
187
- 'label' => esc_html__( 'Scale', 'cherry-projects' ),
188
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-scale.svg',
189
  ),
190
  'custom' => array(
191
- 'label' => esc_html__( 'Custom', 'cherry-projects' ),
192
- 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/inherit.svg',
193
  ),
194
  ),
195
  ),
 
196
  'filter-visible' => array(
197
- 'type' => 'switcher',
198
- 'title' => esc_html__( 'Filters', 'cherry-projects' ),
199
- 'description' => esc_html__( 'Enable/disable listing filters', 'cherry-projects' ),
200
- 'value' => 'true',
 
201
  ),
 
202
  'filter-type' => array(
203
- 'type' => 'radio',
204
- 'title' => esc_html__( 'Filter type', 'cherry-projects' ),
205
- 'description' => esc_html__( 'Select if you want to filter posts by tag or by category.', 'cherry-projects' ),
206
- 'value' => 'category',
207
- 'display-input' => true,
208
- 'options' => array(
 
209
  'category' => array(
210
  'label' => esc_html__( 'Category', 'cherry-projects' ),
211
- 'slave' => 'projects-filter-type-category',
212
  ),
213
  'tag' => array(
214
  'label' => esc_html__( 'Tag', 'cherry-projects' ),
215
- 'slave' => 'projects-filter-type-tag',
216
  ),
217
  ),
218
  ),
 
219
  'category-list' => array(
220
  'type' => 'select',
 
221
  'title' => esc_html__( 'Projects filter categories list', 'cherry-projects' ),
222
  'label' => '',
223
  'description' => '',
224
  'multiple' => true,
225
- 'value' => array(),
226
  'class' => 'cherry-multi-select',
227
- 'options' => false,
228
- 'options_callback' => array( $this->utility->satellite, 'get_terms_array', array( CHERRY_PROJECTS_NAME . '_category', 'slug' ) ),
229
  'master' => 'projects-filter-type-category',
230
  ),
 
231
  'tags-list' => array(
232
  'type' => 'select',
 
233
  'title' => esc_html__( 'Projects filter tags list', 'cherry-projects' ),
234
  'label' => '',
235
  'description' => '',
236
  'multiple' => true,
237
- 'value' => array(),
238
  'class' => 'cherry-multi-select',
239
- 'options' => false,
240
- 'options_callback' => array( $this->utility->satellite, 'get_terms_array', array( CHERRY_PROJECTS_NAME . '_tag', 'slug' ) ),
241
  'master' => 'projects-filter-type-tag',
242
  ),
 
243
  'order-filter-visible' => array(
244
- 'type' => 'switcher',
245
- 'title' => esc_html__( 'Order filters', 'cherry-projects' ),
246
- 'description' => esc_html__( 'Enable/disable order filters', 'cherry-projects' ),
247
- 'value' => 'false',
248
- 'toggle' => array(
249
- 'true_toggle' => 'On',
250
- 'false_toggle' => 'Off',
251
- 'true_slave' => 'projects-order-filter-visible-true',
252
- 'false_slave' => 'projects-order-filter-visible-false',
 
253
  ),
254
  ),
 
255
  'order-filter-default-value' => array(
256
- 'type' => 'radio',
257
- 'title' => esc_html__( 'Order filter default value', 'cherry-projects' ),
258
- 'value' => 'desc',
259
- 'display-input' => true,
260
- 'options' => array(
 
261
  'desc' => array(
262
  'label' => esc_html__( 'DESC', 'cherry-projects' ),
263
  ),
@@ -267,12 +345,14 @@ class Cherry_Projects_Options_Page {
267
  ),
268
  'master' => 'projects-order-filter-visible-true',
269
  ),
 
270
  'orderby-filter-default-value' => array(
271
- 'type' => 'radio',
272
- 'title' => esc_html__( 'Order by filter default value', 'cherry-projects' ),
273
- 'value' => 'date',
274
- 'display-input' => true,
275
- 'options' => array(
 
276
  'date' => array(
277
  'label' => esc_html__( 'Date', 'cherry-projects' ),
278
  ),
@@ -288,12 +368,14 @@ class Cherry_Projects_Options_Page {
288
  ),
289
  'master' => 'projects-order-filter-visible-true',
290
  ),
 
291
  'posts-format' => array(
292
- 'type' => 'radio',
293
- 'title' => esc_html__( 'Post Format', 'cherry-projects' ),
294
- 'value' => 'post-format-all',
295
- 'display-input' => true,
296
- 'options' => array(
 
297
  'post-format-all' => array(
298
  'label' => esc_html__( 'All formats', 'cherry-projects' ),
299
  ),
@@ -314,169 +396,222 @@ class Cherry_Projects_Options_Page {
314
  ),
315
  ),
316
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  'column-number' => array(
318
- 'type' => 'slider',
319
- 'title' => esc_html__( 'Column number', 'cherry-projects' ),
320
- 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 2, max 6)', 'cherry-projects' ),
321
- 'max_value' => 6,
322
- 'min_value' => 2,
323
- 'value' => 3,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  ),
 
325
  'post-per-page' => array(
326
- 'type' => 'slider',
327
- 'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
328
- 'description' => esc_html__( 'Select how many posts per page do you want to display(-1 means that will show all projects)', 'cherry-projects' ),
329
- 'max_value' => 50,
330
- 'min_value' => -1,
331
- 'value' => 9,
 
332
  ),
 
333
  'item-margin' => array(
334
- 'type' => 'slider',
335
- 'title' => esc_html__( 'Item margin', 'cherry-projects' ),
336
- 'description' => esc_html__( 'Select projects item margin (outer indent) value.', 'cherry-projects' ),
337
- 'max_value' => 50,
338
- 'min_value' => 0,
339
- 'value' => 4,
 
340
  ),
 
341
  'justified-fixed-height' => array(
342
- 'type' => 'slider',
343
- 'title' => esc_html__( 'Justified fixed height', 'cherry-projects' ),
344
- 'description' => esc_html__( 'Select projects item justified height value.', 'cherry-projects' ),
345
- 'max_value' => 1000,
346
- 'min_value' => 50,
347
- 'value' => 300,
348
- 'master' => 'projects-listing-layout-justified-layout',
 
349
  ),
 
350
  'grid-template' => array(
351
- 'type' => 'text',
352
- 'title' => esc_html__( 'Grid template', 'cherry-projects' ),
353
- 'description' => esc_html__( 'Grid content template', 'cherry-projects' ),
354
- 'value' => 'grid-default.tmpl',
355
- 'master' => 'projects-listing-layout-grid-layout',
 
356
  ),
 
357
  'masonry-template' => array(
358
- 'type' => 'text',
359
- 'title' => esc_html__( 'Masonry template', 'cherry-projects' ),
360
- 'description' => esc_html__( 'Masonry content template', 'cherry-projects' ),
361
- 'value' => 'masonry-default.tmpl',
362
- 'master' => 'projects-listing-layout-masonry-layout',
 
363
  ),
 
364
  'justified-template' => array(
365
- 'type' => 'text',
366
- 'title' => esc_html__( 'Justified template', 'cherry-projects' ),
367
- 'description' => esc_html__( 'Justified content template', 'cherry-projects' ),
368
- 'value' => 'justified-default.tmpl',
369
- 'master' => 'projects-listing-layout-justified-layout',
 
370
  ),
 
371
  'cascading-grid-template' => array(
372
- 'type' => 'text',
373
- 'title' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
374
- 'description' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
375
- 'value' => 'cascading-grid-default.tmpl',
376
- 'master' => 'projects-listing-layout-cascading-grid-layout',
 
377
  ),
 
378
  'list-template' => array(
379
- 'type' => 'text',
380
- 'title' => esc_html__( 'List template', 'cherry-projects' ),
381
- 'description' => esc_html__( 'List content template', 'cherry-projects' ),
382
- 'value' => 'list-default.tmpl',
383
- 'master' => 'projects-listing-layout-list-layout',
 
384
  ),
 
385
  'standard-post-template' => array(
386
- 'type' => 'text',
387
- 'title' => esc_html__( 'Standard post template', 'cherry-projects' ),
388
- 'description' => esc_html__( 'Standard post template', 'cherry-projects' ),
389
- 'value' => 'standard-post-template.tmpl',
 
390
  ),
 
391
  'image-post-template' => array(
392
- 'type' => 'text',
393
- 'title' => esc_html__( 'Image post template', 'cherry-projects' ),
394
- 'description' => esc_html__( 'Image post template', 'cherry-projects' ),
395
- 'value' => 'image-post-template.tmpl',
 
396
  ),
 
397
  'gallery-post-template' => array(
398
- 'type' => 'text',
399
- 'title' => esc_html__( 'Gallery post template', 'cherry-projects' ),
400
- 'description' => esc_html__( 'Gallery post template', 'cherry-projects' ),
401
- 'value' => 'gallery-post-template.tmpl',
 
402
  ),
 
403
  'audio-post-template' => array(
404
- 'type' => 'text',
405
- 'title' => esc_html__( 'Audio post template', 'cherry-projects' ),
406
- 'description' => esc_html__( 'Audio post template', 'cherry-projects' ),
407
- 'value' => 'audio-post-template.tmpl',
 
408
  ),
 
409
  'video-post-template' => array(
410
- 'type' => 'text',
411
- 'title' => esc_html__( 'Video post template', 'cherry-projects' ),
412
- 'description' => esc_html__( 'Video post template', 'cherry-projects' ),
413
- 'value' => 'video-post-template.tmpl',
 
414
  ),
415
  );
416
 
417
- array_walk( $this->projects_options, array( $this, 'set_field_types' ) );
418
-
419
- if ( in_array( 'slider', $this->field_types ) ) {
420
- $this->field_types[] = 'stepper';
421
- }
422
-
423
-
424
- $this->ui_builder = cherry_projects()->get_core()->init_module( 'cherry-ui-elements', array( 'ui_elements' => $this->field_types ) );
425
-
426
- return true;
427
- }
428
-
429
- /**
430
- * Store field types used in this widget into class property
431
- *
432
- * @since 1.0.0
433
- * @param array $field field data.
434
- * @param [type] $id field key.
435
- * @return bool
436
- */
437
- public function set_field_types( $field, $id ) {
438
-
439
- if ( ! isset( $field['type'] ) ) {
440
- return false;
441
- }
442
-
443
- if ( ! in_array( $field['type'], $this->field_types ) ) {
444
- $this->field_types[] = $field['type'];
445
- }
446
-
447
- return true;
448
- }
449
-
450
- /**
451
- * Register setting sub page
452
- *
453
- * @return void
454
- */
455
- public function render_page() {
456
- add_submenu_page(
457
- 'edit.php?post_type=projects',
458
- esc_html__( 'Projects Options', 'cherry-projects' ),
459
- esc_html__( 'Settings', 'cherry-projects' ),
460
- 'edit_theme_options',
461
- 'cherry-projects-options',
462
- array( $this, 'projects_options_page' ),
463
- '',
464
- 63
465
  );
466
- }
467
-
468
- /**
469
- * Option page callback
470
- *
471
- * @return void
472
- */
473
- public function projects_options_page() {
474
- $html = '';
475
-
476
- $saved_options = get_option( OPTIONS_NAME );
477
- $current_options = array_merge( cherry_projects()->default_options, $saved_options );
478
-
479
- $settings = $this->get_fields( $current_options );
480
 
481
  $html = Cherry_Toolkit::render_view(
482
  CHERRY_PROJECTS_DIR . 'views/options-page.php',
47
  */
48
  public $utility = null;
49
 
50
+ /**
51
+ * Instance of the class Cherry_Interface_Builder.
52
+ *
53
+ * @since 1.0.0
54
+ * @var object
55
+ */
56
+ private $builder = null;
57
+
58
  /**
59
  * Sets up needed actions/filters for the admin to initialize.
60
  *
82
  */
83
  public function init() {
84
  $this->utility = cherry_projects()->get_core()->modules['cherry-utility']->utility;
85
+ $this->builder = cherry_projects()->get_core()->modules['cherry-interface-builder'];
86
+ }
87
+
88
+ /**
89
+ * Store field types used in this widget into class property
90
+ *
91
+ * @since 1.0.0
92
+ * @param array $field field data.
93
+ * @param [type] $id field key.
94
+ * @return bool
95
+ */
96
+ public function set_field_types( $field, $id ) {
97
+
98
+ if ( ! isset( $field['type'] ) ) {
99
+ return false;
100
+ }
101
+
102
+ if ( ! in_array( $field['type'], $this->field_types ) ) {
103
+ $this->field_types[] = $field['type'];
104
+ }
105
+
106
+ return true;
107
+ }
108
+
109
+ /**
110
+ * Register setting sub page
111
+ *
112
+ * @return void
113
+ */
114
+ public function render_page() {
115
+ add_submenu_page(
116
+ 'edit.php?post_type=projects',
117
+ esc_html__( 'Projects Options', 'cherry-projects' ),
118
+ esc_html__( 'Settings', 'cherry-projects' ),
119
+ 'edit_theme_options',
120
+ 'cherry-projects-options',
121
+ array( $this, 'projects_options_page' ),
122
+ '',
123
+ 63
124
+ );
125
+ }
126
+
127
+ /**
128
+ * Option page callback
129
+ *
130
+ * @return void
131
+ */
132
+ public function projects_options_page() {
133
+ $html = '';
134
+
135
+ $ui_settings = array(
136
+ 'base-settings' => array(
137
+ 'type' => 'settings',
138
+ ),
139
 
 
140
  'listing-layout' => array(
141
+ 'type' => 'radio',
142
+ 'parent' => 'base-settings',
143
+ 'title' => esc_html__( 'Projects listing layout', 'cherry-projects' ),
144
+ 'description' => esc_html__( 'Choose projects listing view layout.', 'cherry-projects' ),
145
+ 'value' => cherry_projects()->get_option( 'listing-layout', 'masonry-layout' ),
146
+ 'class' => '',
147
+ 'display_input' => false,
148
+ 'options' => array(
149
  'grid-layout' => array(
150
  'label' => esc_html__( 'Grid', 'cherry-projects' ),
151
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/list-layout-grid.svg',
173
  ),
174
  ),
175
  ),
176
+
177
  'loading-mode' => array(
178
+ 'type' => 'radio',
179
+ 'parent' => 'base-settings',
180
+ 'title' => esc_html__( 'Pagination mode', 'cherry-projects' ),
181
+ 'description' => esc_html__( 'Choose projects pagination mode', 'cherry-projects' ),
182
+ 'value' => cherry_projects()->get_option( 'loading-mode', 'ajax-pagination-mode' ),
183
+ 'class' => '',
184
+ 'display_input' => false,
185
+ 'options' => array(
186
  'ajax-pagination-mode' => array(
187
  'label' => esc_html__( 'Ajax pagination', 'cherry-projects' ),
188
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/loading-mode-ajax-pagination.svg',
201
  ),
202
  ),
203
  ),
204
+
205
  'loading-animation' => array(
206
+ 'type' => 'radio',
207
+ 'parent' => 'base-settings',
208
+ 'title' => esc_html__( 'Loading animation', 'cherry-projects' ),
209
+ 'description' => esc_html__( 'Choose posts loading animation', 'cherry-projects' ),
210
+ 'value' => cherry_projects()->get_option( 'loading-animation', 'loading-animation-move-up' ),
211
+ 'class' => '',
212
+ 'display_input' => false,
213
+ 'options' => array(
214
  'loading-animation-fade' => array(
215
  'label' => esc_html__( 'Fade animation', 'cherry-projects' ),
216
  'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/animation-fade.svg',
237
  ),
238
  ),
239
  ),
240
+
241
  'hover-animation' => array(
242
+ 'type' => 'radio',
243
+ 'parent' => 'base-settings',
244
+ 'title' => esc_html__( 'Hover animation', 'cherry-projects' ),
245
+ 'description' => esc_html__( 'Choose posts images hover animation', 'cherry-projects' ),
246
+ 'value' => cherry_projects()->get_option( 'hover-animation', 'simple-scale' ),
247
+ 'class' => '',
248
+ 'display_input' => false,
249
+ 'options' => array(
250
  'simple-fade' => array(
251
+ 'label' => esc_html__( 'Fade', 'cherry-projects' ),
252
+ 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-fade.svg',
253
  ),
254
  'simple-scale' => array(
255
+ 'label' => esc_html__( 'Scale', 'cherry-projects' ),
256
+ 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/hover-scale.svg',
257
  ),
258
  'custom' => array(
259
+ 'label' => esc_html__( 'Custom', 'cherry-projects' ),
260
+ 'img_src' => CHERRY_PROJECTS_URI . 'public/assets/images/svg/inherit.svg',
261
  ),
262
  ),
263
  ),
264
+
265
  'filter-visible' => array(
266
+ 'type' => 'switcher',
267
+ 'parent' => 'base-settings',
268
+ 'title' => esc_html__( 'Filters', 'cherry-projects' ),
269
+ 'description' => esc_html__( 'Enable/disable listing filters', 'cherry-projects' ),
270
+ 'value' => cherry_projects()->get_option( 'filter-visible', 'true' ),
271
  ),
272
+
273
  'filter-type' => array(
274
+ 'type' => 'radio',
275
+ 'parent' => 'base-settings',
276
+ 'title' => esc_html__( 'Filter type', 'cherry-projects' ),
277
+ 'description' => esc_html__( 'Select if you want to filter posts by tag or by category.', 'cherry-projects' ),
278
+ 'value' => cherry_projects()->get_option( 'filter-type', 'category' ),
279
+ 'display-input' => true,
280
+ 'options' => array(
281
  'category' => array(
282
  'label' => esc_html__( 'Category', 'cherry-projects' ),
283
+ 'slave' => 'projects-filter-type-category',
284
  ),
285
  'tag' => array(
286
  'label' => esc_html__( 'Tag', 'cherry-projects' ),
287
+ 'slave' => 'projects-filter-type-tag',
288
  ),
289
  ),
290
  ),
291
+
292
  'category-list' => array(
293
  'type' => 'select',
294
+ 'parent' => 'base-settings',
295
  'title' => esc_html__( 'Projects filter categories list', 'cherry-projects' ),
296
  'label' => '',
297
  'description' => '',
298
  'multiple' => true,
299
+ 'value' => cherry_projects()->get_option( 'category-list', array() ),
300
  'class' => 'cherry-multi-select',
301
+ 'options' => $this->utility->satellite->get_terms_array( CHERRY_PROJECTS_NAME . '_category', 'slug' ),
 
302
  'master' => 'projects-filter-type-category',
303
  ),
304
+
305
  'tags-list' => array(
306
  'type' => 'select',
307
+ 'parent' => 'base-settings',
308
  'title' => esc_html__( 'Projects filter tags list', 'cherry-projects' ),
309
  'label' => '',
310
  'description' => '',
311
  'multiple' => true,
312
+ 'value' => cherry_projects()->get_option( 'tags-list', array() ),
313
  'class' => 'cherry-multi-select',
314
+ 'options' => $this->utility->satellite->get_terms_array( CHERRY_PROJECTS_NAME . '_tag', 'slug' ),
 
315
  'master' => 'projects-filter-type-tag',
316
  ),
317
+
318
  'order-filter-visible' => array(
319
+ 'type' => 'switcher',
320
+ 'parent' => 'base-settings',
321
+ 'title' => esc_html__( 'Order filters', 'cherry-projects' ),
322
+ 'description' => esc_html__( 'Enable/disable order filters', 'cherry-projects' ),
323
+ 'value' => cherry_projects()->get_option( 'order-filter-visible', 'false' ),
324
+ 'toggle' => array(
325
+ 'true_toggle' => 'On',
326
+ 'false_toggle' => 'Off',
327
+ 'true_slave' => 'projects-order-filter-visible-true',
328
+ 'false_slave' => 'projects-order-filter-visible-false',
329
  ),
330
  ),
331
+
332
  'order-filter-default-value' => array(
333
+ 'type' => 'radio',
334
+ 'parent' => 'base-settings',
335
+ 'title' => esc_html__( 'Order filter default value', 'cherry-projects' ),
336
+ 'value' => cherry_projects()->get_option( 'order-filter-default-value', 'desc' ),
337
+ 'display-input' => true,
338
+ 'options' => array(
339
  'desc' => array(
340
  'label' => esc_html__( 'DESC', 'cherry-projects' ),
341
  ),
345
  ),
346
  'master' => 'projects-order-filter-visible-true',
347
  ),
348
+
349
  'orderby-filter-default-value' => array(
350
+ 'type' => 'radio',
351
+ 'parent' => 'base-settings',
352
+ 'title' => esc_html__( 'Order by filter default value', 'cherry-projects' ),
353
+ 'value' => cherry_projects()->get_option( 'orderby-filter-default-value', 'date' ),
354
+ 'display-input' => true,
355
+ 'options' => array(
356
  'date' => array(
357
  'label' => esc_html__( 'Date', 'cherry-projects' ),
358
  ),
368
  ),
369
  'master' => 'projects-order-filter-visible-true',
370
  ),
371
+
372
  'posts-format' => array(
373
+ 'type' => 'radio',
374
+ 'parent' => 'base-settings',
375
+ 'title' => esc_html__( 'Post Format', 'cherry-projects' ),
376
+ 'value' => cherry_projects()->get_option( 'posts-format', 'post-format-all' ),
377
+ 'display-input' => true,
378
+ 'options' => array(
379
  'post-format-all' => array(
380
  'label' => esc_html__( 'All formats', 'cherry-projects' ),
381
  ),
396
  ),
397
  ),
398
  ),
399
+
400
+ 'device_layout_column_number' => array(
401
+ 'type' => 'component-tab-horizontal',
402
+ 'parent' => 'base-settings',
403
+ ),
404
+
405
+ 'column_number_desktop_layout' => array(
406
+ 'type' => 'settings',
407
+ 'parent' => 'device_layout_column_number',
408
+ 'title' => esc_html__( 'Desktop', 'cherry-projects' ),
409
+ 'description' => esc_html__( 'Define column number for desktop layout', 'cherry-projects' ),
410
+ ),
411
+
412
+ 'column_number_laptop_layout' => array(
413
+ 'type' => 'settings',
414
+ 'parent' => 'device_layout_column_number',
415
+ 'title' => esc_html__( 'Laptop', 'cherry-projects' ),
416
+ 'description' => esc_html__( 'Define column number for laptop layout', 'cherry-projects' ),
417
+ ),
418
+
419
+ 'column_number_album_tablet_layout' => array(
420
+ 'type' => 'settings',
421
+ 'parent' => 'device_layout_column_number',
422
+ 'title' => esc_html__( 'Album Tablet', 'cherry-projects' ),
423
+ 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
424
+ ),
425
+
426
+ 'column_number_portrait_tablet_layout' => array(
427
+ 'type' => 'settings',
428
+ 'parent' => 'device_layout_column_number',
429
+ 'title' => esc_html__( 'Portrait Tablet', 'cherry-projects' ),
430
+ 'description' => esc_html__( 'Define column number for tablet layout', 'cherry-projects' ),
431
+ ),
432
+
433
+ 'column_number_mobile_layout' => array(
434
+ 'type' => 'settings',
435
+ 'parent' => 'device_layout_column_number',
436
+ 'title' => esc_html__( 'Mobile', 'cherry-projects' ),
437
+ 'description' => esc_html__( 'Define column number for mobile layout', 'cherry-projects' ),
438
+ ),
439
+
440
  'column-number' => array(
441
+ 'type' => 'slider',
442
+ 'parent' => 'column_number_desktop_layout',
443
+ 'title' => esc_html__( 'Column number', 'cherry-projects' ),
444
+ 'description' => esc_html__( 'Select number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
445
+ 'max_value' => 6,
446
+ 'min_value' => 1,
447
+ 'value' => cherry_projects()->get_option( 'column-number', 4 ),
448
+ ),
449
+
450
+ 'column-number-laptop' => array(
451
+ 'type' => 'slider',
452
+ 'parent' => 'column_number_laptop_layout',
453
+ 'title' => esc_html__( 'Labtop column number', 'cherry-projects' ),
454
+ 'description' => esc_html__( 'Select laptop number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
455
+ 'max_value' => 6,
456
+ 'min_value' => 1,
457
+ 'value' => cherry_projects()->get_option( 'column-number-laptop', 3 ),
458
+ ),
459
+
460
+ 'column-number-album-tablet' => array(
461
+ 'type' => 'slider',
462
+ 'parent' => 'column_number_album_tablet_layout',
463
+ 'title' => esc_html__( 'Album Tablet column number', 'cherry-projects' ),
464
+ 'description' => esc_html__( 'Select album tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
465
+ 'max_value' => 6,
466
+ 'min_value' => 1,
467
+ 'value' => cherry_projects()->get_option( 'column-number-album-tablet', 2 ),
468
+ ),
469
+
470
+ 'column-number-portrait-tablet' => array(
471
+ 'type' => 'slider',
472
+ 'parent' => 'column_number_portrait_tablet_layout',
473
+ 'title' => esc_html__( 'Portrait Tablet column number', 'cherry-projects' ),
474
+ 'description' => esc_html__( 'Select portrait tablet number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
475
+ 'max_value' => 6,
476
+ 'min_value' => 1,
477
+ 'value' => cherry_projects()->get_option( 'column-number-portrait-tablet', 2 ),
478
+ ),
479
+
480
+ 'column-number-mobile' => array(
481
+ 'type' => 'slider',
482
+ 'parent' => 'column_number_mobile_layout',
483
+ 'title' => esc_html__( 'Tablet column number', 'cherry-projects' ),
484
+ 'description' => esc_html__( 'Select mobile number of columns for masonry and grid projects layouts. (Min 1, max 6)', 'cherry-projects' ),
485
+ 'max_value' => 6,
486
+ 'min_value' => 1,
487
+ 'value' => cherry_projects()->get_option( 'column-number-mobile', 1 ),
488
  ),
489
+
490
  'post-per-page' => array(
491
+ 'type' => 'slider',
492
+ 'parent' => 'base-settings',
493
+ 'title' => esc_html__( 'Posts per page', 'cherry-projects' ),
494
+ 'description' => esc_html__( 'Select how many posts per page do you want to display(-1 means that will show all projects)', 'cherry-projects' ),
495
+ 'max_value' => 50,
496
+ 'min_value' => -1,
497
+ 'value' => cherry_projects()->get_option( 'post-per-page', 9 ),
498
  ),
499
+
500
  'item-margin' => array(
501
+ 'type' => 'slider',
502
+ 'parent' => 'base-settings',
503
+ 'title' => esc_html__( 'Item margin', 'cherry-projects' ),
504
+ 'description' => esc_html__( 'Select projects item margin (outer indent) value.', 'cherry-projects' ),
505
+ 'max_value' => 50,
506
+ 'min_value' => 0,
507
+ 'value' => cherry_projects()->get_option( 'item-margin', 4 ),
508
  ),
509
+
510
  'justified-fixed-height' => array(
511
+ 'type' => 'slider',
512
+ 'parent' => 'base-settings',
513
+ 'title' => esc_html__( 'Justified fixed height', 'cherry-projects' ),
514
+ 'description' => esc_html__( 'Select projects item justified height value.', 'cherry-projects' ),
515
+ 'max_value' => 1000,
516
+ 'min_value' => 50,
517
+ 'value' => cherry_projects()->get_option( 'justified-fixed-height', 300 ),
518
+ 'master' => 'projects-listing-layout-justified-layout',
519
  ),
520
+
521
  'grid-template' => array(
522
+ 'type' => 'text',
523
+ 'parent' => 'base-settings',
524
+ 'title' => esc_html__( 'Grid template', 'cherry-projects' ),
525
+ 'description' => esc_html__( 'Grid content template', 'cherry-projects' ),
526
+ 'value' => cherry_projects()->get_option( 'grid-template', 'grid-default.tmpl' ),
527
+ 'master' => 'projects-listing-layout-grid-layout',
528
  ),
529
+
530
  'masonry-template' => array(
531
+ 'type' => 'text',
532
+ 'parent' => 'base-settings',
533
+ 'title' => esc_html__( 'Masonry template', 'cherry-projects' ),
534
+ 'description' => esc_html__( 'Masonry content template', 'cherry-projects' ),
535
+ 'value' => cherry_projects()->get_option( 'masonry-template', 'masonry-default.tmpl' ),
536
+ 'master' => 'projects-listing-layout-masonry-layout',
537
  ),
538
+
539
  'justified-template' => array(
540
+ 'type' => 'text',
541
+ 'parent' => 'base-settings',
542
+ 'title' => esc_html__( 'Justified template', 'cherry-projects' ),
543
+ 'description' => esc_html__( 'Justified content template', 'cherry-projects' ),
544
+ 'value' => cherry_projects()->get_option( 'justified-template', 'justified-default.tmpl' ),
545
+ 'master' => 'projects-listing-layout-justified-layout',
546
  ),
547
+
548
  'cascading-grid-template' => array(
549
+ 'type' => 'text',
550
+ 'parent' => 'base-settings',
551
+ 'title' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
552
+ 'description' => esc_html__( 'Cascading grid template', 'cherry-projects' ),
553
+ 'value' => cherry_projects()->get_option( 'cascading-grid-template', 'cascading-grid-default.tmpl' ),
554
+ 'master' => 'projects-listing-layout-cascading-grid-layout',
555
  ),
556
+
557
  'list-template' => array(
558
+ 'type' => 'text',
559
+ 'parent' => 'base-settings',
560
+ 'title' => esc_html__( 'List template', 'cherry-projects' ),
561
+ 'description' => esc_html__( 'List content template', 'cherry-projects' ),
562
+ 'value' => cherry_projects()->get_option( 'list-template', 'list-default.tmpl' ),
563
+ 'master' => 'projects-listing-layout-list-layout',
564
  ),
565
+
566
  'standard-post-template' => array(
567
+ 'type' => 'text',
568
+ 'parent' => 'base-settings',
569
+ 'title' => esc_html__( 'Standard post template', 'cherry-projects' ),
570
+ 'description' => esc_html__( 'Standard post template', 'cherry-projects' ),
571
+ 'value' => cherry_projects()->get_option( 'standard-post-template', 'standard-post-template.tmpl' ),
572
  ),
573
+
574
  'image-post-template' => array(
575
+ 'type' => 'text',
576
+ 'parent' => 'base-settings',
577
+ 'title' => esc_html__( 'Image post template', 'cherry-projects' ),
578
+ 'description' => esc_html__( 'Image post template', 'cherry-projects' ),
579
+ 'value' => cherry_projects()->get_option( 'image-post-template', 'image-post-template.tmpl' ),
580
  ),
581
+
582
  'gallery-post-template' => array(
583
+ 'type' => 'text',
584
+ 'parent' => 'base-settings',
585
+ 'title' => esc_html__( 'Gallery post template', 'cherry-projects' ),
586
+ 'description' => esc_html__( 'Gallery post template', 'cherry-projects' ),
587
+ 'value' => cherry_projects()->get_option( 'gallery-post-template', 'gallery-post-template.tmpl' ),
588
  ),
589
+
590
  'audio-post-template' => array(
591
+ 'type' => 'text',
592
+ 'parent' => 'base-settings',
593
+ 'title' => esc_html__( 'Audio post template', 'cherry-projects' ),
594
+ 'description' => esc_html__( 'Audio post template', 'cherry-projects' ),
595
+ 'value' => cherry_projects()->get_option( 'audio-post-template', 'audio-post-template.tmpl' ),
596
  ),
597
+
598
  'video-post-template' => array(
599
+ 'type' => 'text',
600
+ 'parent' => 'base-settings',
601
+ 'title' => esc_html__( 'Video post template', 'cherry-projects' ),
602
+ 'description' => esc_html__( 'Video post template', 'cherry-projects' ),
603
+ 'value' => cherry_projects()->get_option( 'video-post-template', 'video-post-template.tmpl' ),
604
  ),
605
  );
606
 
607
+ $settings = array(
608
+ 'ui-settings' => $this->builder->render( false, $ui_settings ),
609
+ 'labels' => array(
610
+ 'save-button-text' => esc_html__( 'Save', 'cherry-projects' ),
611
+ 'define-as-button-text' => esc_html__( 'Define as default', 'cherry-projects' ),
612
+ 'restore-button-text' => esc_html__( 'Restore', 'cherry-projects' ),
613
+ ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
614
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
 
616
  $html = Cherry_Toolkit::render_view(
617
  CHERRY_PROJECTS_DIR . 'views/options-page.php',
cherry-framework/config.json CHANGED
@@ -63,7 +63,7 @@
63
  "cherry-handler" : {
64
  "name" : "Cherry handler",
65
  "description" : "Initialize handlers.",
66
- "version" : "1.1.2",
67
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/02.%20cherry-handler.md",
68
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
69
  "compatible" : ["theme", "plugin"],
63
  "cherry-handler" : {
64
  "name" : "Cherry handler",
65
  "description" : "Initialize handlers.",
66
+ "version" : "1.1.3",
67
  "doc_link" : "https://github.com/CherryFramework/cherry-framework-docs/blob/master/02.%20cherry-handler.md",
68
  "git_link" : "https://github.com/CherryFramework/cherry-framework/tree/master/modules/cherry-handler",
69
  "compatible" : ["theme", "plugin"],
cherry-projects.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Cherry Projects
4
  * Plugin URI: http://www.cherryframework.com/
5
  * Description: A projects plugin for WordPress.
6
- * Version: 1.2.2
7
  * Author: Cherry Team
8
  * Author URI: http://www.cherryframework.com/
9
  * Text Domain: cherry-projects
@@ -138,7 +138,7 @@ if ( ! class_exists( 'Cherry_Projects' ) ) {
138
  *
139
  * @since 1.0.0
140
  */
141
- define( 'CHERRY_PROJECTS_VERSION', '1.2.2' );
142
 
143
  /**
144
  * Set the slug of the plugin.
@@ -379,32 +379,36 @@ if ( ! class_exists( 'Cherry_Projects' ) ) {
379
  public function create_plugin_options() {
380
 
381
  $this->default_options = array(
382
- 'listing-layout' => 'grid-layout',
383
- 'loading-mode' => 'ajax-pagination-mode',
384
- 'loading-animation' => 'loading-animation-move-up',
385
- 'hover-animation' => 'simple-scale',
386
- 'filter-visible' => 'true',
387
- 'filter-type' => 'category',
388
- 'category-list' => array(),
389
- 'tags-list' => array(),
390
- 'order-filter-visible' => 'false',
391
- 'order-filter-default-value' => 'desc',
392
- 'orderby-filter-default-value' => 'date',
393
- 'posts-format' => 'post-format-all',
394
- 'column-number' => 3,
395
- 'post-per-page' => 9,
396
- 'item-margin' => 4,
397
- 'justified-fixed-height' => 300,
398
- 'masonry-template' => 'masonry-default.tmpl',
399
- 'grid-template' => 'grid-default.tmpl',
400
- 'justified-template' => 'justified-default.tmpl',
401
- 'cascading-grid-template' => 'cascading-grid-default.tmpl',
402
- 'list-template' => 'list-default.tmpl',
403
- 'standard-post-template' => 'standard-post-template.tmpl',
404
- 'image-post-template' => 'image-post-template.tmpl',
405
- 'gallery-post-template' => 'gallery-post-template.tmpl',
406
- 'audio-post-template' => 'audio-post-template.tmpl',
407
- 'video-post-template' => 'video-post-template.tmpl',
 
 
 
 
408
  );
409
 
410
  if ( ! self::is_db_option_exist( OPTIONS_NAME ) ) {
3
  * Plugin Name: Cherry Projects
4
  * Plugin URI: http://www.cherryframework.com/
5
  * Description: A projects plugin for WordPress.
6
+ * Version: 1.2.3
7
  * Author: Cherry Team
8
  * Author URI: http://www.cherryframework.com/
9
  * Text Domain: cherry-projects
138
  *
139
  * @since 1.0.0
140
  */
141
+ define( 'CHERRY_PROJECTS_VERSION', '1.2.3' );
142
 
143
  /**
144
  * Set the slug of the plugin.
379
  public function create_plugin_options() {
380
 
381
  $this->default_options = array(
382
+ 'listing-layout' => 'grid-layout',
383
+ 'loading-mode' => 'ajax-pagination-mode',
384
+ 'loading-animation' => 'loading-animation-move-up',
385
+ 'hover-animation' => 'simple-scale',
386
+ 'filter-visible' => 'true',
387
+ 'filter-type' => 'category',
388
+ 'category-list' => array(),
389
+ 'tags-list' => array(),
390
+ 'order-filter-visible' => 'false',
391
+ 'order-filter-default-value' => 'desc',
392
+ 'orderby-filter-default-value' => 'date',
393
+ 'posts-format' => 'post-format-all',
394
+ 'column-number' => 4,
395
+ 'column-number-laptop' => 4,
396
+ 'column-number-album-tablet' => 3,
397
+ 'column-number-portrait-tablet' => 2,
398
+ 'column-number-mobile' => 1,
399
+ 'post-per-page' => 9,
400
+ 'item-margin' => 4,
401
+ 'justified-fixed-height' => 300,
402
+ 'masonry-template' => 'masonry-default.tmpl',
403
+ 'grid-template' => 'grid-default.tmpl',
404
+ 'justified-template' => 'justified-default.tmpl',
405
+ 'cascading-grid-template' => 'cascading-grid-default.tmpl',
406
+ 'list-template' => 'list-default.tmpl',
407
+ 'standard-post-template' => 'standard-post-template.tmpl',
408
+ 'image-post-template' => 'image-post-template.tmpl',
409
+ 'gallery-post-template' => 'gallery-post-template.tmpl',
410
+ 'audio-post-template' => 'audio-post-template.tmpl',
411
+ 'video-post-template' => 'video-post-template.tmpl',
412
  );
413
 
414
  if ( ! self::is_db_option_exist( OPTIONS_NAME ) ) {
public/assets/js/cherry-projects-plugin.js CHANGED
@@ -238,7 +238,7 @@
238
 
239
  ajaxRequestObject = $.ajax( {
240
  type: 'POST',
241
- url: cherryProjectsObjects.ajax_url,
242
  data: data,
243
  cache: false,
244
  beforeSend: function() {
@@ -318,7 +318,7 @@
318
 
319
  ajaxRequestObject = $.ajax( {
320
  type: 'POST',
321
- url: cherryProjectsObjects.ajax_url,
322
  data: data,
323
  cache: false,
324
  beforeSend: function() {
@@ -491,19 +491,19 @@
491
 
492
  switch ( getResponsiveLayout() ) {
493
  case 'xl':
494
- map = cherryProjectsObjects.cascadingListMap || [ 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ];
495
  break
496
  case 'lg':
497
- map = [ 1, 2, 2, 3, 3, 3 ];
498
  break
499
  case 'md':
500
- map = [ 1, 2, 2 ];
501
  break
502
  case 'sm':
503
- map = [ 1, 2, 2 ];
504
  break
505
  case 'xs':
506
- map = [ 1 ];
507
  break
508
  }
509
 
@@ -557,24 +557,28 @@
557
  }
558
 
559
  function getResponsiveColumn() {
560
- var columnPerView = +projectsSettings['column-number'],
561
- widthLayout = getResponsiveLayout();
 
 
 
 
562
 
563
  switch ( widthLayout ) {
564
  case 'xl':
565
  columnPerView = +projectsSettings['column-number'];
566
  break
567
  case 'lg':
568
- columnPerView = Math.ceil( +projectsSettings['column-number'] / 2 );
569
  break
570
  case 'md':
571
- columnPerView = Math.ceil( +projectsSettings['column-number'] / 3 );
572
  break
573
  case 'sm':
574
- columnPerView = Math.ceil( +projectsSettings['column-number'] / 4 );
575
  break
576
  case 'xs':
577
- columnPerView = 1;
578
  break
579
  }
580
 
238
 
239
  ajaxRequestObject = $.ajax( {
240
  type: 'POST',
241
+ url: window.cherryProjectsObjects.ajax_url,
242
  data: data,
243
  cache: false,
244
  beforeSend: function() {
318
 
319
  ajaxRequestObject = $.ajax( {
320
  type: 'POST',
321
+ url: window.cherryProjectsObjects.ajax_url,
322
  data: data,
323
  cache: false,
324
  beforeSend: function() {
491
 
492
  switch ( getResponsiveLayout() ) {
493
  case 'xl':
494
+ map = window.cherryProjectsObjects.cascadingListMap || [ 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ];
495
  break
496
  case 'lg':
497
+ map = window.cherryProjectsObjects.cascadingListMapDevice.laptop || [ 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ];
498
  break
499
  case 'md':
500
+ map = window.cherryProjectsObjects.cascadingListMapDevice.album_tablet || [ 1, 2, 2, 3, 3, 3 ];
501
  break
502
  case 'sm':
503
+ map = window.cherryProjectsObjects.cascadingListMapDevice.portrait_tablet || [ 1, 2, 2 ];
504
  break
505
  case 'xs':
506
+ map = window.cherryProjectsObjects.cascadingListMapDevice.mobile || [ 1 ];
507
  break
508
  }
509
 
557
  }
558
 
559
  function getResponsiveColumn() {
560
+ var columnPerView = +projectsSettings['column-number'],
561
+ widthLayout = getResponsiveLayout(),
562
+ columnNumberLaptop = +projectsSettings['column-number-laptop'] || 4,
563
+ columnNumberAlbumTablet = +projectsSettings['column-number-album-tablet'] || 3,
564
+ columnNumberPortraitTablet = +projectsSettings['column-number-portrait-tablet'] || 2,
565
+ columnNumberMobile = +projectsSettings['column-number-mobile'] || 1;
566
 
567
  switch ( widthLayout ) {
568
  case 'xl':
569
  columnPerView = +projectsSettings['column-number'];
570
  break
571
  case 'lg':
572
+ columnPerView = columnNumberLaptop;
573
  break
574
  case 'md':
575
+ columnPerView = columnNumberAlbumTablet;
576
  break
577
  case 'sm':
578
+ columnPerView = columnNumberPortraitTablet;
579
  break
580
  case 'xs':
581
+ columnPerView = columnNumberMobile;
582
  break
583
  }
584
 
public/includes/class-projects-data.php CHANGED
@@ -69,34 +69,38 @@ class Cherry_Project_Data {
69
  */
70
  public function set_default_options() {
71
  $this->default_options = array(
72
- 'listing-layout' => cherry_projects()->get_option( 'listing-layout', 'masonry-layout' ),
73
- 'loading-mode' => cherry_projects()->get_option( 'loading-mode', 'ajax-pagination-mode' ),
74
- 'loading-animation' => cherry_projects()->get_option( 'loading-animation', 'loading-animation-fade' ),
75
- 'hover-animation' => cherry_projects()->get_option( 'hover-animation', 'simple-fade' ),
76
- 'filter-visible' => cherry_projects()->get_option( 'filter-visible', 'true' ),
77
- 'filter-type' => cherry_projects()->get_option( 'filter-type', 'category' ),
78
- 'category-list' => cherry_projects()->get_option( 'category-list', array() ),
79
- 'tags-list' => cherry_projects()->get_option( 'tags-list', array() ),
80
- 'order-filter-visible' => cherry_projects()->get_option( 'order-filter-visible', 'true' ),
81
- 'order-filter-default-value' => cherry_projects()->get_option( 'order-filter-default-value', 'desc' ),
82
- 'orderby-filter-default-value' => cherry_projects()->get_option( 'orderby-filter-default-value', 'date' ),
83
- 'posts-format' => cherry_projects()->get_option( 'posts-format', 'post-format-all' ),
84
- 'single-term' => cherry_projects()->get_option( 'single-term', '' ),
85
- 'column-number' => cherry_projects()->get_option( 'column-number', 3 ),
86
- 'post-per-page' => cherry_projects()->get_option( 'post-per-page', 9 ),
87
- 'item-margin' => cherry_projects()->get_option( 'item-margin', 4 ),
88
- 'justified-fixed-height' => cherry_projects()->get_option( 'justified-fixed-height', 300 ),
89
- 'masonry-template' => cherry_projects()->get_option( 'masonry-template', 'masonry-default.tmpl' ),
90
- 'grid-template' => cherry_projects()->get_option( 'grid-template', 'grid-default.tmpl' ),
91
- 'justified-template' => cherry_projects()->get_option( 'justified-template', 'justified-default.tmpl' ),
92
- 'cascading-grid-template' => cherry_projects()->get_option( 'cascading-grid-template', 'cascading-grid-default.tmpl' ),
93
- 'list-template' => cherry_projects()->get_option( 'list-template', 'list-default.tmpl' ),
94
- 'standard-post-template' => cherry_projects()->get_option( 'standard-post-template', 'standard-post-template.tmpl' ),
95
- 'image-post-template' => cherry_projects()->get_option( 'image-post-template', 'image-post-template.tmpl' ),
96
- 'gallery-post-template' => cherry_projects()->get_option( 'gallery-post-template', 'gallery-post-template.tmpl' ),
97
- 'audio-post-template' => cherry_projects()->get_option( 'audio-post-template', 'audio-post-template.tmpl' ),
98
- 'video-post-template' => cherry_projects()->get_option( 'video-post-template', 'video-post-template.tmpl' ),
99
- 'echo' => true,
 
 
 
 
100
  );
101
 
102
  /**
@@ -161,16 +165,20 @@ class Cherry_Project_Data {
161
  }
162
 
163
  $settings = array(
164
- 'list-layout' => $this->options['listing-layout'],
165
- 'loading-mode' => $this->options['loading-mode'],
166
- 'post-per-page' => $this->options['post-per-page'],
167
- 'column-number' => $this->options['column-number'],
168
- 'item-margin' => $this->options['item-margin'],
169
- 'fixed-height' => $this->options['justified-fixed-height'],
170
- 'posts-format' => $this->options['posts-format'],
171
- 'single-term' => $this->options['single-term'],
172
- 'filter-type' => $this->options['filter-type'],
173
- 'template' => $template,
 
 
 
 
174
  );
175
 
176
  $settings = json_encode( $settings );
@@ -810,7 +818,7 @@ class Cherry_Project_Data {
810
  * @since 1.0.0
811
  */
812
  public function enqueue_scripts() {
813
- wp_enqueue_script( 'waypoints', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/jquery.waypoints.min.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
814
  wp_enqueue_script( 'imagesloaded', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/imagesloaded.pkgd.min.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
815
  wp_enqueue_script( 'magnific-popup', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
816
  wp_enqueue_script( 'cherry-projects-plugin', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/cherry-projects-plugin.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
@@ -818,11 +826,19 @@ class Cherry_Project_Data {
818
 
819
  $cascading_list_map = apply_filters( 'cherry_projects_cascading_list_map', array( 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ) );
820
 
 
 
 
 
 
 
 
821
  // Ajax js object portfolio_type_ajax.
822
  wp_localize_script( 'cherry-projects-scripts', 'cherryProjectsObjects',
823
  array(
824
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
825
- 'cascadingListMap' => $cascading_list_map,
 
826
  )
827
  );
828
  }
69
  */
70
  public function set_default_options() {
71
  $this->default_options = array(
72
+ 'listing-layout' => cherry_projects()->get_option( 'listing-layout', 'masonry-layout' ),
73
+ 'loading-mode' => cherry_projects()->get_option( 'loading-mode', 'ajax-pagination-mode' ),
74
+ 'loading-animation' => cherry_projects()->get_option( 'loading-animation', 'loading-animation-fade' ),
75
+ 'hover-animation' => cherry_projects()->get_option( 'hover-animation', 'simple-fade' ),
76
+ 'filter-visible' => cherry_projects()->get_option( 'filter-visible', 'true' ),
77
+ 'filter-type' => cherry_projects()->get_option( 'filter-type', 'category' ),
78
+ 'category-list' => cherry_projects()->get_option( 'category-list', array() ),
79
+ 'tags-list' => cherry_projects()->get_option( 'tags-list', array() ),
80
+ 'order-filter-visible' => cherry_projects()->get_option( 'order-filter-visible', 'true' ),
81
+ 'order-filter-default-value' => cherry_projects()->get_option( 'order-filter-default-value', 'desc' ),
82
+ 'orderby-filter-default-value' => cherry_projects()->get_option( 'orderby-filter-default-value', 'date' ),
83
+ 'posts-format' => cherry_projects()->get_option( 'posts-format', 'post-format-all' ),
84
+ 'single-term' => cherry_projects()->get_option( 'single-term', '' ),
85
+ 'column-number' => cherry_projects()->get_option( 'column-number', 4 ),
86
+ 'column-number-laptop' => cherry_projects()->get_option( 'column-number-laptop', 4 ),
87
+ 'column-number-album-tablet' => cherry_projects()->get_option( 'column-number-album-tablet', 3 ),
88
+ 'column-number-portrait-tablet' => cherry_projects()->get_option( 'column-number-portrait-tablet', 2 ),
89
+ 'column-number-mobile' => cherry_projects()->get_option( 'column-number-mobile', 1 ),
90
+ 'post-per-page' => cherry_projects()->get_option( 'post-per-page', 9 ),
91
+ 'item-margin' => cherry_projects()->get_option( 'item-margin', 4 ),
92
+ 'justified-fixed-height' => cherry_projects()->get_option( 'justified-fixed-height', 300 ),
93
+ 'masonry-template' => cherry_projects()->get_option( 'masonry-template', 'masonry-default.tmpl' ),
94
+ 'grid-template' => cherry_projects()->get_option( 'grid-template', 'grid-default.tmpl' ),
95
+ 'justified-template' => cherry_projects()->get_option( 'justified-template', 'justified-default.tmpl' ),
96
+ 'cascading-grid-template' => cherry_projects()->get_option( 'cascading-grid-template', 'cascading-grid-default.tmpl' ),
97
+ 'list-template' => cherry_projects()->get_option( 'list-template', 'list-default.tmpl' ),
98
+ 'standard-post-template' => cherry_projects()->get_option( 'standard-post-template', 'standard-post-template.tmpl' ),
99
+ 'image-post-template' => cherry_projects()->get_option( 'image-post-template', 'image-post-template.tmpl' ),
100
+ 'gallery-post-template' => cherry_projects()->get_option( 'gallery-post-template', 'gallery-post-template.tmpl' ),
101
+ 'audio-post-template' => cherry_projects()->get_option( 'audio-post-template', 'audio-post-template.tmpl' ),
102
+ 'video-post-template' => cherry_projects()->get_option( 'video-post-template', 'video-post-template.tmpl' ),
103
+ 'echo' => true,
104
  );
105
 
106
  /**
165
  }
166
 
167
  $settings = array(
168
+ 'list-layout' => $this->options['listing-layout'],
169
+ 'loading-mode' => $this->options['loading-mode'],
170
+ 'post-per-page' => $this->options['post-per-page'],
171
+ 'column-number' => $this->options['column-number'],
172
+ 'column-number-laptop' => $this->options['column-number-laptop'],
173
+ 'column-number-album-tablet' => $this->options['column-number-album-tablet'],
174
+ 'column-number-portrait-tablet' => $this->options['column-number-portrait-tablet'],
175
+ 'column-number-mobile' => $this->options['column-number-mobile'],
176
+ 'item-margin' => $this->options['item-margin'],
177
+ 'fixed-height' => $this->options['justified-fixed-height'],
178
+ 'posts-format' => $this->options['posts-format'],
179
+ 'single-term' => $this->options['single-term'],
180
+ 'filter-type' => $this->options['filter-type'],
181
+ 'template' => $template,
182
  );
183
 
184
  $settings = json_encode( $settings );
818
  * @since 1.0.0
819
  */
820
  public function enqueue_scripts() {
821
+ wp_enqueue_script( 'jquery-waypoints', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/jquery.waypoints.min.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
822
  wp_enqueue_script( 'imagesloaded', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/imagesloaded.pkgd.min.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
823
  wp_enqueue_script( 'magnific-popup', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/jquery.magnific-popup.min.js', array( 'jquery' ), '1.1.0', true );
824
  wp_enqueue_script( 'cherry-projects-plugin', trailingslashit( CHERRY_PROJECTS_URI ) . 'public/assets/js/cherry-projects-plugin.js', array( 'jquery' ), CHERRY_PROJECTS_VERSION, true );
826
 
827
  $cascading_list_map = apply_filters( 'cherry_projects_cascading_list_map', array( 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ) );
828
 
829
+ $cascading_list_map_device = apply_filters( 'cherry_projects_cascading_list_map_device', array(
830
+ 'laptop' => array( 1, 2, 2, 3, 3, 3, 4, 4, 4, 4 ),
831
+ 'album_tablet' => array( 1, 2, 2, 3, 3, 3 ),
832
+ 'portrait_tablet' => array( 1, 2, 2 ),
833
+ 'mobile' => array( 1 ),
834
+ ) );
835
+
836
  // Ajax js object portfolio_type_ajax.
837
  wp_localize_script( 'cherry-projects-scripts', 'cherryProjectsObjects',
838
  array(
839
+ 'ajax_url' => admin_url( 'admin-ajax.php' ),
840
+ 'cascadingListMap' => $cascading_list_map,
841
+ 'cascadingListMapDevice' => $cascading_list_map_device,
842
  )
843
  );
844
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: TemplateMonster 2002
4
  Tags: custom post type, projects, portfolio, cherry framework
5
  Requires at least: 4.5
6
  Tested up to: 4.7.2
7
- Stable tag: 1.2.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -149,3 +149,8 @@ Standard templates can be rewritten in the theme. For that you need to create ch
149
  * Add responsive layouts for cascading grid layout
150
  * Add projects items ajax success loading callback
151
  * Fixed bugs
 
 
 
 
 
4
  Tags: custom post type, projects, portfolio, cherry framework
5
  Requires at least: 4.5
6
  Tested up to: 4.7.2
7
+ Stable tag: 1.2.3
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
149
  * Add responsive layouts for cascading grid layout
150
  * Add projects items ajax success loading callback
151
  * Fixed bugs
152
+
153
+ = 1.2.3 =
154
+
155
+ * Add responsive layouts for masonry and grid layout
156
+ * Fixed bugs
views/options-page.php CHANGED
@@ -14,17 +14,7 @@
14
  <form id="cherry-projects-options-form" method="post">
15
  <div class="cherry-projects-options-page-wrapper">
16
  <div class="cherry-projects-options-list-wrapper">
17
- <?php foreach ( $__data['settings']['ui-settings'] as $key => $settings ) { ?>
18
- <div class="option-section <?php echo $settings['master']; ?>">
19
- <div class="option-info-wrapper">
20
- <h3 class="option-title"><?php echo $settings['title']; ?></h3>
21
- <span class="option-description"><?php echo $settings['description']; ?></span>
22
- </div>
23
- <div class="option-ui-element-wrapper">
24
- <?php echo $settings['ui-html']; ?>
25
- </div>
26
- </div>
27
- <?php } ?>
28
  </div>
29
  <div class="cherry-projects-options-control-wrapper">
30
  <div id="cherry-projects-save-options" class="custom-button save-button">
@@ -42,4 +32,4 @@
42
  </div>
43
  </div>
44
  </div>
45
- </form>
14
  <form id="cherry-projects-options-form" method="post">
15
  <div class="cherry-projects-options-page-wrapper">
16
  <div class="cherry-projects-options-list-wrapper">
17
+ <?php echo $__data['settings']['ui-settings']; ?>
 
 
 
 
 
 
 
 
 
 
18
  </div>
19
  <div class="cherry-projects-options-control-wrapper">
20
  <div id="cherry-projects-save-options" class="custom-button save-button">
32
  </div>
33
  </div>
34
  </div>
35
+ </form>