Magee Shortcodes - Version 1.5.1

Version Description

  • 27/04/2016 =
  • Fixed color picker issues
Download this release

Release Info

Developer magictheme
Plugin Icon 128x128 Magee Shortcodes
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.4.2 to 1.5.1

Files changed (49) hide show
  1. Magee.php +4 -2
  2. assets/css/admin.css +253 -40
  3. assets/css/shortcode.css +26 -5
  4. assets/css/twentytwenty.css +205 -205
  5. assets/images/insert_shortcode.png +0 -0
  6. assets/images/list.png +0 -0
  7. assets/images/preview.png +0 -0
  8. assets/js/admin.js +256 -19
  9. assets/js/combodate.js +489 -0
  10. assets/js/jquery.twentytwenty.js +105 -103
  11. assets/js/moment.js +3690 -0
  12. inc/core.php +270 -13
  13. inc/options.php +1068 -933
  14. inc/popup.php +12 -3
  15. readme.txt +24 -15
  16. shortcodes/class-accordion.php +27 -1
  17. shortcodes/class-alert.php +15 -3
  18. shortcodes/class-button.php +16 -2
  19. shortcodes/class-countdowns.php +22 -2
  20. shortcodes/class-counter.php +11 -5
  21. shortcodes/class-custom-box.php +3 -0
  22. shortcodes/class-dailymotion.php +32 -13
  23. shortcodes/class-divider.php +34 -13
  24. shortcodes/class-document.php +26 -11
  25. shortcodes/class-dropcap.php +5 -1
  26. shortcodes/class-dummy-image.php +3 -1
  27. shortcodes/class-dummy-text.php +1 -1
  28. shortcodes/class-expand.php +43 -12
  29. shortcodes/class-feature-box.php +6 -3
  30. shortcodes/class-flip-box.php +5 -0
  31. shortcodes/class-heading.php +39 -18
  32. shortcodes/class-highlight.php +3 -1
  33. shortcodes/class-icon.php +3 -1
  34. shortcodes/class-image-compare.php +9 -9
  35. shortcodes/class-image-frame.php +3 -0
  36. shortcodes/class-list.php +15 -4
  37. shortcodes/class-modal.php +24 -1
  38. shortcodes/class-panel.php +1 -1
  39. shortcodes/class-person.php +29 -1
  40. shortcodes/class-piechart.php +13 -1
  41. shortcodes/class-popover.php +35 -2
  42. shortcodes/class-promo-box.php +32 -5
  43. shortcodes/class-section.php +6 -6
  44. shortcodes/class-social.php +30 -1
  45. shortcodes/class-tabs.php +23 -1
  46. shortcodes/class-tooltip.php +34 -2
  47. shortcodes/class-video.php +5 -5
  48. shortcodes/class-vimeo.php +74 -34
  49. shortcodes/class-youtube.php +108 -52
Magee.php CHANGED
@@ -3,18 +3,19 @@
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: http://www.mageewp.com/magee-shortcode.html
5
  Description: Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. With Magee Shortcodes, you can easily create accordion, buttons, boxes, columns, social and much more. They allow you to create so many different page layouts. You could quickly and easily built your own custom pages using all the various shortcodes that Magee Shortcodes includes.
6
- Version: 1.4.2
7
  Author: MageeWP
8
  Author URI: http://www.mageewp.com
9
  Text Domain: magee-shortcodes
10
  Domain Path: /languages
11
  License: GPLv2 or later
12
  */
 
13
  if ( ! defined( 'ABSPATH' ) ) return;
14
  if(!class_exists('Magee_Core') && !defined( 'MAGEE_SHORTCODE_LIB_DIR') ):
15
  define( 'MAGEE_SHORTCODES_PATH', __FILE__ );
16
  define( 'MAGEE_SHORTCODES_DIR_PATH', plugin_dir_path( __FILE__ ));
17
- define( 'MAGEE_SHORTCODES_VER', '1.4.2' );
18
 
19
  require_once 'inc/core.php';
20
  require_once 'inc/options.php';
@@ -22,4 +23,5 @@ define( 'MAGEE_SHORTCODES_VER', '1.4.2' );
22
  new Magee_Core;
23
 
24
  add_filter( 'the_content', array('Magee_Core','fix_shortcodes') );
 
25
  endif;
3
  Plugin Name: Magee Shortcodes
4
  Plugin URI: http://www.mageewp.com/magee-shortcode.html
5
  Description: Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. With Magee Shortcodes, you can easily create accordion, buttons, boxes, columns, social and much more. They allow you to create so many different page layouts. You could quickly and easily built your own custom pages using all the various shortcodes that Magee Shortcodes includes.
6
+ Version: 1.5.1
7
  Author: MageeWP
8
  Author URI: http://www.mageewp.com
9
  Text Domain: magee-shortcodes
10
  Domain Path: /languages
11
  License: GPLv2 or later
12
  */
13
+
14
  if ( ! defined( 'ABSPATH' ) ) return;
15
  if(!class_exists('Magee_Core') && !defined( 'MAGEE_SHORTCODE_LIB_DIR') ):
16
  define( 'MAGEE_SHORTCODES_PATH', __FILE__ );
17
  define( 'MAGEE_SHORTCODES_DIR_PATH', plugin_dir_path( __FILE__ ));
18
+ define( 'MAGEE_SHORTCODES_VER', '1.5.1' );
19
 
20
  require_once 'inc/core.php';
21
  require_once 'inc/options.php';
23
  new Magee_Core;
24
 
25
  add_filter( 'the_content', array('Magee_Core','fix_shortcodes') );
26
+ add_filter( 'the_content', array('Magee_Core','unrecognize_shortcodes') );
27
  endif;
assets/css/admin.css CHANGED
@@ -1,46 +1,54 @@
1
  .magee_shortcodes_list li{
2
- display:inline-block;
3
- }
4
- .col-md-2{
5
- position:relative;
6
- min-height:1px;
7
- padding-right:15px;
8
- padding-left:15px;
9
- float:left;
10
- width:20%;
11
- box-sizing:border-box;
12
- -moz-box-sizing:border-box; /* Firefox */
13
- -webkit-box-sizing:border-box; /* Safari */
14
- }
15
- .clear{
16
- clear:both;
17
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  #TB_ajaxContent{
19
- max-width:100%;
20
- box-sizing:border-box;
21
- -moz-box-sizing:border-box; /* Firefox */
22
- -webkit-box-sizing:border-box; /* Safari */
23
- }
 
24
  #magee-shortcodes-settings{
25
- display:none;
26
- }
 
27
  .magee-form-desc{
28
- display:block;
29
- font-size: 14px;
30
- color: #939292;
31
- font-style: italic;
32
- line-height: 21px;
33
- }
 
34
  .iconpicker i{
35
- padding:5px;
36
- cursor:pointer;
37
- }
 
38
  img.uploaded-image{
39
- display:none;
40
- }
 
41
  .magee-form-textarea{
42
- width:100%;
43
- }
44
 
45
  a.magee_shortcode_item {
46
  text-decoration: none;
@@ -88,6 +96,7 @@ a.magee_shortcode_item i {
88
  background-color: #f5f5f5;
89
  padding: 10px;
90
  font-size: 18px;
 
91
  }
92
 
93
  .param-item {
@@ -138,6 +147,7 @@ input#magee_icon {
138
  .iconpicker {
139
  border: 1px solid #ccc;
140
  border-width: 1px 0 0 1px;
 
141
  }
142
 
143
  .iconpicker .fa {
@@ -183,12 +193,12 @@ input#magee_icon {
183
  #magee_slider_slides .widget-content label {
184
  float: left;
185
  width: 300px;
186
- clear: left;
187
- padding-bottom: 20px;
188
  }
189
  #magee_slider_slides .widget-content label span{
190
- margin-bottom:5px;
191
- }
192
  #magee_slider_slides div.option-item input[type="text"] {
193
  background: url("../images/input-bg.png") repeat-x scroll center top #ffffff;
194
  border-radius: 3px;
@@ -280,4 +290,207 @@ a.child-shortcode-addhover {
280
  background-color: #fff;
281
  border-color: #666;
282
  color :#666;
283
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  .magee_shortcodes_list li{
2
+ display:inline-block;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  }
4
+
5
+ .col-md-2 {
6
+ position:relative;
7
+ min-height:1px;
8
+ padding-right:15px;
9
+ padding-left:15px;
10
+ float:left;
11
+ width:20%;
12
+ box-sizing:border-box;
13
+ -moz-box-sizing:border-box; /* Firefox */
14
+ -webkit-box-sizing:border-box; /* Safari */
15
+ }
16
+
17
+ .clear {
18
+ clear:both;
19
+ }
20
+
21
  #TB_ajaxContent{
22
+ max-width:100%;
23
+ box-sizing:border-box;
24
+ -moz-box-sizing:border-box; /* Firefox */
25
+ -webkit-box-sizing:border-box; /* Safari */
26
+ }
27
+
28
  #magee-shortcodes-settings{
29
+ display:none;
30
+ }
31
+
32
  .magee-form-desc{
33
+ display:block;
34
+ font-size: 14px;
35
+ color: #939292;
36
+ font-style: italic;
37
+ line-height: 21px;
38
+ }
39
+
40
  .iconpicker i{
41
+ padding:5px;
42
+ cursor:pointer;
43
+ }
44
+
45
  img.uploaded-image{
46
+ display:none;
47
+ }
48
+
49
  .magee-form-textarea{
50
+ width:100%;
51
+ }
52
 
53
  a.magee_shortcode_item {
54
  text-decoration: none;
96
  background-color: #f5f5f5;
97
  padding: 10px;
98
  font-size: 18px;
99
+ display:none;
100
  }
101
 
102
  .param-item {
147
  .iconpicker {
148
  border: 1px solid #ccc;
149
  border-width: 1px 0 0 1px;
150
+ display:none;
151
  }
152
 
153
  .iconpicker .fa {
193
  #magee_slider_slides .widget-content label {
194
  float: left;
195
  width: 300px;
196
+ clear: left;
197
+ padding-bottom: 20px;
198
  }
199
  #magee_slider_slides .widget-content label span{
200
+ margin-bottom:5px;
201
+ }
202
  #magee_slider_slides div.option-item input[type="text"] {
203
  background: url("../images/input-bg.png") repeat-x scroll center top #ffffff;
204
  border-radius: 3px;
290
  background-color: #fff;
291
  border-color: #666;
292
  color :#666;
293
+ }
294
+ .probar {
295
+ width: 100%;
296
+ height: 10px;
297
+ border: 2px solid #ccc;
298
+ border-radius: 10px;
299
+ position: relative;
300
+ box-shadow: 0 0 5px rgba(0,0,0,.2) inset;
301
+ }
302
+ .probar-control {
303
+ position:absolute;
304
+ width: 14px;
305
+ height: 14px;
306
+ border-radius: 14px;
307
+ margin-left:-9px;
308
+ border: 2px solid #3F91B1;
309
+ top:-4px;
310
+ background-color: #fff;
311
+ cursor: pointer;
312
+ }
313
+ .choose-show-param {
314
+ display:none ;
315
+
316
+ }
317
+ #TB_title a {
318
+ float: right;
319
+ font-size: 13px;
320
+ margin:0 20px 0 5px;
321
+ }
322
+
323
+ .probar {
324
+ width: 600px;
325
+ float: left;
326
+ margin-top: 12px;
327
+ margin-right: 10px;
328
+ }
329
+
330
+ .param-item input[type="number"].magee-form-number {
331
+ width: 100px;
332
+ }
333
+ .choose-show{
334
+ background-color:#CCF7D5;
335
+ color: #17A534;
336
+ font-weight: bold;
337
+ }
338
+ .choose-show-param {
339
+ border: 1px solid #ddd;
340
+ line-height: 28px;
341
+ padding: 6px 15px;
342
+ font-size: 14px;
343
+ cursor: pointer;
344
+ }
345
+
346
+ .icon-val {
347
+ margin-bottom: 10px;
348
+ overflow:hidden;
349
+ }
350
+
351
+ .param-item .icon-val input[type="text"] {
352
+ width: 640px;
353
+ float: left;
354
+ }
355
+ .param-item .icon-val button {
356
+ margin-top: 8px;
357
+ margin-left: 10px;
358
+ }
359
+ .param-item .icon-val button {
360
+ margin-bottom: 7px;
361
+ }
362
+
363
+ #custom_icon {
364
+ margin-left: 0;
365
+ }
366
+
367
+ .magee_shortcodes_list .col-md-2 {
368
+ width: 25%;
369
+ }
370
+
371
+ a.magee_shortcode_item {
372
+ padding: 0;
373
+ line-height: 40px;
374
+ font-size: 14px;
375
+ }
376
+
377
+ a.magee_shortcode_item i {
378
+ width: 40px;
379
+ text-align: center;
380
+ background-color: #eee;
381
+ line-height: 40px;
382
+ margin-right: 10px;
383
+ }
384
+
385
+ a.magee_shortcode_item:hover i {
386
+ background-color: #0073AA;
387
+ }
388
+
389
+ #TB_title {
390
+ background-color:#222;
391
+ color: #fff;
392
+ height: 50px;
393
+ line-height: 50px;
394
+ }
395
+ a#TB_closeWindowButton {
396
+ top:-10px;
397
+ right:-30px;
398
+ margin: 0;
399
+ padding: 0;
400
+ }
401
+ a#TB_closeWindowButton .tb-close-icon {
402
+ top: 0;
403
+ /*right: auto;
404
+ left: 100%;*/
405
+ background-color:#0073AA;
406
+ color: #fff;
407
+ height: 50px;
408
+ }
409
+
410
+ a#TB_closeWindowButton:hover {
411
+ text-decoration: none;
412
+ }
413
+
414
+ a#TB_closeWindowButton .tb-close-icon:before {
415
+ line-height: 50px;
416
+ }
417
+
418
+ #TB_ajaxWindowTitle {
419
+ line-height: inherit;
420
+ }
421
+
422
+ #TB_title a {
423
+ float: right;
424
+ font-size: 13px;
425
+ margin: 0 30px 0 0;
426
+ background-color: #fff;
427
+ color: #222;
428
+ text-decoration: none;
429
+ line-height: 30px;
430
+ margin-top: 10px;
431
+ padding: 0 10px;
432
+ }
433
+
434
+ #TB_ajaxWindowTitle a.link-forum {
435
+ margin-right: 10px;
436
+ }
437
+
438
+ .param-item {
439
+ background-color: #eee;
440
+ padding: 20px;
441
+ border: 0;
442
+ }
443
+
444
+ .shortcode-name {
445
+ background-color: #eee;
446
+ }
447
+
448
+ .probar {
449
+ margin-bottom: 10px;
450
+ }
451
+
452
+ .magee-shortcode-actions a {
453
+ margin-left: 5px!important;
454
+ }
455
+
456
+ #preview {
457
+ background-color: #fff;
458
+ margin: 0 -15px;
459
+ padding: 20px;
460
+ position: relative;
461
+ }
462
+
463
+ .magee_shortcodes_container .wp-picker-container input[type=text].wp-color-picker {
464
+ width: 696px;
465
+ display:block!important;
466
+ }
467
+ .magee_shortcodes_container .wp-color-result{
468
+ display:none;
469
+ }
470
+ .wp-picker-holder {
471
+ width: 260px;
472
+ }
473
+ .magee_shortcodes_list .col-md-2 {
474
+ margin-bottom: 0;
475
+ }
476
+ .magee-preview-delete {
477
+ position: absolute;
478
+ top: 20px;
479
+ right: 10px;
480
+ font-size: 20px;
481
+ cursor: pointer;
482
+ }
483
+
484
+ .preview-title {
485
+ border-bottom: 1px solid #ccc;
486
+ margin-bottom: 10px;
487
+ }
488
+ .example-list {
489
+ background-color: #eee;
490
+ margin-bottom: 10px;
491
+ padding: 20px;
492
+ font-size: 14px;
493
+ }
494
+ .example-link {
495
+ text-decoration: none;
496
+ }
assets/css/shortcode.css CHANGED
@@ -1102,7 +1102,7 @@ a.magee-btn-normal:hover {
1102
  color: #777;
1103
  background-color: #f8f8f8;
1104
  }
1105
-
1106
  /*
1107
  * 6.0 Panels & Alerts
1108
  */
@@ -1148,14 +1148,13 @@ a.magee-btn-normal:hover {
1148
  opacity: 1;
1149
  }
1150
 
1151
- .close {
1152
  -webkit-transition: all 0.2s ease;
1153
  -moz-transition: all 0.2s ease;
1154
  -o-transition: all 0.2s ease;
1155
  transition: all 0.2s ease;
1156
  }
1157
-
1158
- .close:hover {
1159
  color: inherit;
1160
  -webkit-transform: rotate(90deg);
1161
  transform: rotate(90deg);
@@ -1164,11 +1163,28 @@ a.magee-btn-normal:hover {
1164
  -o-transition: all 0.2s ease;
1165
  transition: all 0.2s ease;
1166
  }
 
 
 
 
 
 
 
 
1167
 
 
 
 
 
 
 
 
 
 
1168
  /*
1169
  * 7.0 Pricing
1170
  */
1171
-
1172
  .magee-pricing-box {
1173
  box-shadow: 1px 1px 5px 0 rgba(0,0,0,.1);
1174
  overflow: hidden;
@@ -1528,6 +1544,7 @@ a.magee-btn-normal:hover {
1528
 
1529
  .magee-promo-box {
1530
  display: table;
 
1531
  }
1532
 
1533
  .magee-promo-box.boxed {
@@ -1787,6 +1804,8 @@ h3.counter-title {
1787
  .magee-timeline > ul {
1788
  list-style-type: none;
1789
  margin-bottom: 0;
 
 
1790
  }
1791
 
1792
  .magee-timeline > ul > li {
@@ -2392,6 +2411,7 @@ h3.counter-title {
2392
  }
2393
 
2394
  .ss-boxes-up::before,
 
2395
  .ss-boxes-down:after {
2396
  left: 0;
2397
  width: 100%;
@@ -3093,6 +3113,7 @@ ol.multi-carousel-indicators {
3093
  margin: 5px 0 0;
3094
  }
3095
 
 
3096
  /*
3097
  * 22.0 Blog List
3098
  */
1102
  color: #777;
1103
  background-color: #f8f8f8;
1104
  }
1105
+
1106
  /*
1107
  * 6.0 Panels & Alerts
1108
  */
1148
  opacity: 1;
1149
  }
1150
 
1151
+ .magee-alert .close {
1152
  -webkit-transition: all 0.2s ease;
1153
  -moz-transition: all 0.2s ease;
1154
  -o-transition: all 0.2s ease;
1155
  transition: all 0.2s ease;
1156
  }
1157
+ .magee-alert .close:hover {
 
1158
  color: inherit;
1159
  -webkit-transform: rotate(90deg);
1160
  transform: rotate(90deg);
1163
  -o-transition: all 0.2s ease;
1164
  transition: all 0.2s ease;
1165
  }
1166
+ button.close {
1167
+ background: none;
1168
+ border: none;
1169
+ border-bottom: none;
1170
+ border-radius: 0;
1171
+ padding: 0;
1172
+ color: inherit;
1173
+ }
1174
 
1175
+ button.close:hover {
1176
+ background: none;
1177
+ }
1178
+
1179
+ button.close:active {
1180
+ padding: 0;
1181
+ background: none;
1182
+ border: none;
1183
+ }
1184
  /*
1185
  * 7.0 Pricing
1186
  */
1187
+
1188
  .magee-pricing-box {
1189
  box-shadow: 1px 1px 5px 0 rgba(0,0,0,.1);
1190
  overflow: hidden;
1544
 
1545
  .magee-promo-box {
1546
  display: table;
1547
+ width:100%;
1548
  }
1549
 
1550
  .magee-promo-box.boxed {
1804
  .magee-timeline > ul {
1805
  list-style-type: none;
1806
  margin-bottom: 0;
1807
+ margin-top: 0;
1808
+ padding-left: 0;
1809
  }
1810
 
1811
  .magee-timeline > ul > li {
2411
  }
2412
 
2413
  .ss-boxes-up::before,
2414
+
2415
  .ss-boxes-down:after {
2416
  left: 0;
2417
  width: 100%;
3113
  margin: 5px 0 0;
3114
  }
3115
 
3116
+
3117
  /*
3118
  * 22.0 Blog List
3119
  */
assets/css/twentytwenty.css CHANGED
@@ -1,205 +1,205 @@
1
- .twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after, .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
2
- content: " ";
3
- display: block;
4
- background: white;
5
- position: absolute;
6
- z-index: 30;
7
- -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
8
- -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
9
- box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); }
10
-
11
- .twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after {
12
- width: 3px;
13
- height: 9999px;
14
- left: 50%;
15
- margin-left: -1.5px; }
16
-
17
- .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
18
- width: 9999px;
19
- height: 3px;
20
- top: 50%;
21
- margin-top: -1.5px; }
22
-
23
- .twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
24
- position: absolute;
25
- top: 0;
26
- width: 100%;
27
- height: 100%; }
28
-
29
- .twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
30
- -webkit-transition-duration: 0.5s;
31
- -moz-transition-duration: 0.5s;
32
- transition-duration: 0.5s; }
33
-
34
- .twentytwenty-before-label, .twentytwenty-after-label {
35
- -webkit-transition-property: opacity;
36
- -moz-transition-property: opacity;
37
- transition-property: opacity; }
38
-
39
- .twentytwenty-before-label:before, .twentytwenty-after-label:before {
40
- color: white;
41
- font-size: 13px;
42
- letter-spacing: 0.1em; }
43
-
44
- .twentytwenty-before-label:before, .twentytwenty-after-label:before {
45
- position: absolute;
46
- background: rgba(255, 255, 255, 0.2);
47
- line-height: 38px;
48
- padding: 0 20px;
49
- -webkit-border-radius: 2px;
50
- -moz-border-radius: 2px;
51
- border-radius: 2px; }
52
-
53
- .twentytwenty-horizontal .twentytwenty-before-label:before, .twentytwenty-horizontal .twentytwenty-after-label:before {
54
- top: 50%;
55
- margin-top: -19px; }
56
-
57
- .twentytwenty-vertical .twentytwenty-before-label:before, .twentytwenty-vertical .twentytwenty-after-label:before {
58
- left: 50%;
59
- margin-left: -45px;
60
- text-align: center;
61
- width: 90px; }
62
-
63
- .twentytwenty-left-arrow, .twentytwenty-right-arrow, .twentytwenty-up-arrow, .twentytwenty-down-arrow {
64
- width: 0;
65
- height: 0;
66
- border: 6px inset transparent;
67
- position: absolute; }
68
-
69
- .twentytwenty-left-arrow, .twentytwenty-right-arrow {
70
- top: 50%;
71
- margin-top: -6px; }
72
-
73
- .twentytwenty-up-arrow, .twentytwenty-down-arrow {
74
- left: 50%;
75
- margin-left: -6px; }
76
-
77
- .twentytwenty-container {
78
- -webkit-box-sizing: content-box;
79
- -moz-box-sizing: content-box;
80
- box-sizing: content-box;
81
- z-index: 0;
82
- overflow: hidden;
83
- position: relative;
84
- -webkit-user-select: none;
85
- -moz-user-select: none; }
86
- .twentytwenty-container img {
87
- max-width: 100%;
88
- position: absolute;
89
- top: 0;
90
- display: block; }
91
- .twentytwenty-container.active .twentytwenty-overlay, .twentytwenty-container.active :hover.twentytwenty-overlay {
92
- background: rgba(0, 0, 0, 0); }
93
- .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-before-label,
94
- .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-after-label, .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-before-label,
95
- .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-after-label {
96
- opacity: 0; }
97
- .twentytwenty-container * {
98
- -webkit-box-sizing: content-box;
99
- -moz-box-sizing: content-box;
100
- box-sizing: content-box; }
101
-
102
- .twentytwenty-before-label {
103
- opacity: 0; }
104
- .twentytwenty-before-label:before {
105
- content: "Before"; }
106
-
107
- .twentytwenty-after-label {
108
- opacity: 0; }
109
- .twentytwenty-after-label:before {
110
- content: "After"; }
111
-
112
- .twentytwenty-horizontal .twentytwenty-before-label:before {
113
- left: 10px; }
114
-
115
- .twentytwenty-horizontal .twentytwenty-after-label:before {
116
- right: 10px; }
117
-
118
- .twentytwenty-vertical .twentytwenty-before-label:before {
119
- top: 10px; }
120
-
121
- .twentytwenty-vertical .twentytwenty-after-label:before {
122
- bottom: 10px; }
123
-
124
- .twentytwenty-overlay {
125
- -webkit-transition-property: background;
126
- -moz-transition-property: background;
127
- transition-property: background;
128
- background: rgba(0, 0, 0, 0);
129
- z-index: 25; }
130
- .twentytwenty-overlay:hover {
131
- background: rgba(0, 0, 0, 0.5); }
132
- .twentytwenty-overlay:hover .twentytwenty-after-label {
133
- opacity: 1; }
134
- .twentytwenty-overlay:hover .twentytwenty-before-label {
135
- opacity: 1; }
136
-
137
- .twentytwenty-before {
138
- z-index: 20; }
139
-
140
- .twentytwenty-after {
141
- z-index: 10; }
142
-
143
- .twentytwenty-handle {
144
- height: 38px;
145
- width: 38px;
146
- position: absolute;
147
- left: 50%;
148
- top: 50%;
149
- margin-left: -22px;
150
- margin-top: -22px;
151
- border: 3px solid white;
152
- -webkit-border-radius: 1000px;
153
- -moz-border-radius: 1000px;
154
- border-radius: 1000px;
155
- -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
156
- -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
157
- box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
158
- z-index: 40;
159
- cursor: pointer; }
160
-
161
- .twentytwenty-horizontal .twentytwenty-handle:before {
162
- bottom: 50%;
163
- margin-bottom: 22px;
164
- -webkit-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
165
- -moz-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
166
- box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
167
- .twentytwenty-horizontal .twentytwenty-handle:after {
168
- top: 50%;
169
- margin-top: 22px;
170
- -webkit-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
171
- -moz-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
172
- box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
173
-
174
- .twentytwenty-vertical .twentytwenty-handle:before {
175
- left: 50%;
176
- margin-left: 22px;
177
- -webkit-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
178
- -moz-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
179
- box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
180
- .twentytwenty-vertical .twentytwenty-handle:after {
181
- right: 50%;
182
- margin-right: 22px;
183
- -webkit-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
184
- -moz-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
185
- box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
186
-
187
- .twentytwenty-left-arrow {
188
- border-right: 6px solid white;
189
- left: 50%;
190
- margin-left: -17px; }
191
-
192
- .twentytwenty-right-arrow {
193
- border-left: 6px solid white;
194
- right: 50%;
195
- margin-right: -17px; }
196
-
197
- .twentytwenty-up-arrow {
198
- border-bottom: 6px solid white;
199
- top: 50%;
200
- margin-top: -17px; }
201
-
202
- .twentytwenty-down-arrow {
203
- border-top: 6px solid white;
204
- bottom: 50%;
205
- margin-bottom: -17px; }
1
+ .twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after, .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
2
+ content: " ";
3
+ display: block;
4
+ background: white;
5
+ position: absolute;
6
+ z-index: 30;
7
+ -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
8
+ -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
9
+ box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5); }
10
+
11
+ .twentytwenty-horizontal .twentytwenty-handle:before, .twentytwenty-horizontal .twentytwenty-handle:after {
12
+ width: 3px;
13
+ height: 9999px;
14
+ left: 50%;
15
+ margin-left: -1.5px; }
16
+
17
+ .twentytwenty-vertical .twentytwenty-handle:before, .twentytwenty-vertical .twentytwenty-handle:after {
18
+ width: 9999px;
19
+ height: 3px;
20
+ top: 50%;
21
+ margin-top: -1.5px; }
22
+
23
+ .twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
24
+ position: absolute;
25
+ top: 0;
26
+ width: 100%;
27
+ height: 100%; }
28
+
29
+ .twentytwenty-before-label, .twentytwenty-after-label, .twentytwenty-overlay {
30
+ -webkit-transition-duration: 0.5s;
31
+ -moz-transition-duration: 0.5s;
32
+ transition-duration: 0.5s; }
33
+
34
+ .twentytwenty-before-label, .twentytwenty-after-label {
35
+ -webkit-transition-property: opacity;
36
+ -moz-transition-property: opacity;
37
+ transition-property: opacity; }
38
+
39
+ .twentytwenty-before-label:before, .twentytwenty-after-label:before {
40
+ color: white;
41
+ font-size: 13px;
42
+ letter-spacing: 0.1em; }
43
+
44
+ .twentytwenty-before-label:before, .twentytwenty-after-label:before {
45
+ position: absolute;
46
+ background: rgba(255, 255, 255, 0.2);
47
+ line-height: 38px;
48
+ padding: 0 20px;
49
+ -webkit-border-radius: 2px;
50
+ -moz-border-radius: 2px;
51
+ border-radius: 2px; }
52
+
53
+ .twentytwenty-horizontal .twentytwenty-before-label:before, .twentytwenty-horizontal .twentytwenty-after-label:before {
54
+ top: 50%;
55
+ margin-top: -19px; }
56
+
57
+ .twentytwenty-vertical .twentytwenty-before-label:before, .twentytwenty-vertical .twentytwenty-after-label:before {
58
+ left: 50%;
59
+ margin-left: -45px;
60
+ text-align: center;
61
+ width: 90px; }
62
+
63
+ .twentytwenty-left-arrow, .twentytwenty-right-arrow, .twentytwenty-up-arrow, .twentytwenty-down-arrow {
64
+ width: 0;
65
+ height: 0;
66
+ border: 6px inset transparent;
67
+ position: absolute; }
68
+
69
+ .twentytwenty-left-arrow, .twentytwenty-right-arrow {
70
+ top: 50%;
71
+ margin-top: -6px; }
72
+
73
+ .twentytwenty-up-arrow, .twentytwenty-down-arrow {
74
+ left: 50%;
75
+ margin-left: -6px; }
76
+
77
+ .twentytwenty-container {
78
+ -webkit-box-sizing: content-box;
79
+ -moz-box-sizing: content-box;
80
+ box-sizing: content-box;
81
+ z-index: 0;
82
+ overflow: hidden;
83
+ position: relative;
84
+ -webkit-user-select: none;
85
+ -moz-user-select: none; }
86
+ .twentytwenty-container img {
87
+ max-width: 100%;
88
+ position: absolute;
89
+ top: 0;
90
+ display: block; }
91
+ .twentytwenty-container.active .twentytwenty-overlay, .twentytwenty-container.active :hover.twentytwenty-overlay {
92
+ background: rgba(0, 0, 0, 0); }
93
+ .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-before-label,
94
+ .twentytwenty-container.active .twentytwenty-overlay .twentytwenty-after-label, .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-before-label,
95
+ .twentytwenty-container.active :hover.twentytwenty-overlay .twentytwenty-after-label {
96
+ opacity: 0; }
97
+ .twentytwenty-container * {
98
+ -webkit-box-sizing: content-box;
99
+ -moz-box-sizing: content-box;
100
+ box-sizing: content-box; }
101
+
102
+ .twentytwenty-before-label {
103
+ opacity: 0; }
104
+ .twentytwenty-before-label:before {
105
+ content: "Before"; }
106
+
107
+ .twentytwenty-after-label {
108
+ opacity: 0; }
109
+ .twentytwenty-after-label:before {
110
+ content: "After"; }
111
+
112
+ .twentytwenty-horizontal .twentytwenty-before-label:before {
113
+ left: 10px; }
114
+
115
+ .twentytwenty-horizontal .twentytwenty-after-label:before {
116
+ right: 10px; }
117
+
118
+ .twentytwenty-vertical .twentytwenty-before-label:before {
119
+ top: 10px; }
120
+
121
+ .twentytwenty-vertical .twentytwenty-after-label:before {
122
+ bottom: 10px; }
123
+
124
+ .twentytwenty-overlay {
125
+ -webkit-transition-property: background;
126
+ -moz-transition-property: background;
127
+ transition-property: background;
128
+ background: rgba(0, 0, 0, 0);
129
+ z-index: 25; }
130
+ .twentytwenty-overlay:hover {
131
+ background: rgba(0, 0, 0, 0.5); }
132
+ .twentytwenty-overlay:hover .twentytwenty-after-label {
133
+ opacity: 1; }
134
+ .twentytwenty-overlay:hover .twentytwenty-before-label {
135
+ opacity: 1; }
136
+
137
+ .twentytwenty-before {
138
+ z-index: 20; }
139
+
140
+ .twentytwenty-after {
141
+ z-index: 10; }
142
+
143
+ .twentytwenty-handle {
144
+ height: 38px;
145
+ width: 38px;
146
+ position: absolute;
147
+ left: 50%;
148
+ top: 50%;
149
+ margin-left: -22px;
150
+ margin-top: -22px;
151
+ border: 3px solid white;
152
+ -webkit-border-radius: 1000px;
153
+ -moz-border-radius: 1000px;
154
+ border-radius: 1000px;
155
+ -webkit-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
156
+ -moz-box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
157
+ box-shadow: 0px 0px 12px rgba(51, 51, 51, 0.5);
158
+ z-index: 40;
159
+ cursor: pointer; }
160
+
161
+ .twentytwenty-horizontal .twentytwenty-handle:before {
162
+ bottom: 50%;
163
+ margin-bottom: 22px;
164
+ -webkit-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
165
+ -moz-box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
166
+ box-shadow: 0 3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
167
+ .twentytwenty-horizontal .twentytwenty-handle:after {
168
+ top: 50%;
169
+ margin-top: 22px;
170
+ -webkit-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
171
+ -moz-box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
172
+ box-shadow: 0 -3px 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
173
+
174
+ .twentytwenty-vertical .twentytwenty-handle:before {
175
+ left: 50%;
176
+ margin-left: 22px;
177
+ -webkit-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
178
+ -moz-box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
179
+ box-shadow: 3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
180
+ .twentytwenty-vertical .twentytwenty-handle:after {
181
+ right: 50%;
182
+ margin-right: 22px;
183
+ -webkit-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
184
+ -moz-box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5);
185
+ box-shadow: -3px 0 0 white, 0px 0px 12px rgba(51, 51, 51, 0.5); }
186
+
187
+ .twentytwenty-left-arrow {
188
+ border-right: 6px solid white;
189
+ left: 50%;
190
+ margin-left: -17px; }
191
+
192
+ .twentytwenty-right-arrow {
193
+ border-left: 6px solid white;
194
+ right: 50%;
195
+ margin-right: -17px; }
196
+
197
+ .twentytwenty-up-arrow {
198
+ border-bottom: 6px solid white;
199
+ top: 50%;
200
+ margin-top: -17px; }
201
+
202
+ .twentytwenty-down-arrow {
203
+ border-top: 6px solid white;
204
+ bottom: 50%;
205
+ margin-bottom: -17px; }
assets/images/insert_shortcode.png ADDED
Binary file
assets/images/list.png ADDED
Binary file
assets/images/preview.png ADDED
Binary file
assets/js/admin.js CHANGED
@@ -6,11 +6,11 @@ $('.magee_shortcodes,.magee_shortcodes_textarea').click(function(){
6
  if(typeof params != 'undefined' && params.identifier) {
7
  popup = params.identifier;
8
  }
9
- var height = $("#TB_window").outerHeight();
10
-
11
  // load thickbox
12
- tb_show("Magee Shortcodes", ajaxurl + "?action=magee_shortcodes_popup&popup=" + popup + "&width=800&height=" + 500);
13
-
14
  // $('#TB_window').hide();
15
 
16
  })
@@ -40,33 +40,234 @@ $(document).on("click",'a.magee_shortcode_item',function(){
40
  form.find("#magee-shortcodes-settings .current_shortcode").text(shortcode);
41
  form.find("#magee-shortcodes-settings #magee-shortcode").val(shortcode);
42
  form.find("#magee-shortcodes-settings-inner").html(data);
43
- $('.wp-color-picker-field').wpColorPicker();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  $.ajax({
45
  type: "POST",
46
  url: ajaxurl,
47
  dataType: "html",
48
  data: {action:'magee_control_button'},
49
  success:function(data){ $('#TB_window').append(data);
50
-
51
  var content_height = $('#TB_window').outerHeight();
52
- $('#TB_ajaxContent').css({'height':content_height-100});
53
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }});
55
-
56
 
57
  },
58
  error:function(){
59
  }
60
  });
61
-
62
  });
63
 
64
- $(document).on("click",".magee-shortcodes-home",function(){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  $("#magee-shortcodes-settings").hide();
66
  $("#TB_footer").remove();
67
  $("#magee-shortcodes-settings-innter").html("");
68
  $(".magee_shortcodes_list").show();
69
-
 
 
 
 
70
  });
71
 
72
  // insert shortcode into editor
@@ -103,9 +304,9 @@ tb_remove();
103
  $(document).on("click",".iconpicker i",function(e){
104
  var icon = $(this).data('name');
105
  $('.iconpicker i').removeClass('selected');
106
- $(this).parent('.iconpicker').find('input').val(icon);
107
  $(this).addClass('selected');
108
-
109
  });
110
 
111
 
@@ -186,12 +387,48 @@ tb_remove();
186
  $clone = $(this).parents("#magee_shortcodes_container").children(".column-shortcode-inner").eq(0).clone(true);
187
  $clone.removeClass("column-shortcode-inner hidden");
188
  $clone.addClass("column-shortcode-inner");
189
- //$clone.find('textarea').eq(0).val("Column Content");
190
- //$clone.find('#magee_class').eq(0).val("");
191
- //$clone.find('#magee_id').eq(0).val("");
192
- //$(this).parents("#magee-shortcodes-settings-inner").children(".column-shortcode-inner").eq(0).find('textarea').eq(0).val("Column Content") ;
193
  $(".shortcode-add").before($clone.append(html));
194
 
195
  });
196
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  });
6
  if(typeof params != 'undefined' && params.identifier) {
7
  popup = params.identifier;
8
  }
9
+
10
+ var magee = "Magee Shortcodes<span class='shortcode_show_name'></span><a class='link-doc' target='_blank' href='https://www.mageewp.com/magee-shortcode-guide.html'>Document</a><a class='link-forum' target='_blank' href='https://www.mageewp.com/forums/magee-shortcode/'>Forums</a>";
11
  // load thickbox
12
+ var height = $(window).height()-150;
13
+ tb_show(magee, ajaxurl + "?action=magee_shortcodes_popup&popup=" + popup + "&width=800&height="+height);
14
  // $('#TB_window').hide();
15
 
16
  })
40
  form.find("#magee-shortcodes-settings .current_shortcode").text(shortcode);
41
  form.find("#magee-shortcodes-settings #magee-shortcode").val(shortcode);
42
  form.find("#magee-shortcodes-settings-inner").html(data);
43
+ var myOptions = {
44
+ change: function(event, ui){
45
+ $('.magee_shortcodes_container .wp-color-picker-field').each(function(){
46
+ var color = $(this).parents('.wp-picker-container').find('.wp-color-result').css("background-color")
47
+ $(this).css("background-color",color);
48
+ var top = parseInt($(this).parents('.wp-picker-container').find('a.iris-square-value').css("top").replace('px',''));
49
+ var percent = parseInt($(this).parents('.wp-picker-container').find('div.iris-slider-offset span').css("bottom"));
50
+ if(top < 87 && percent < 97){
51
+ $(this).css("color","black");
52
+ }else{
53
+ $(this).css("color","white");
54
+ }
55
+ });
56
+ },
57
+ };
58
+
59
+ $('.magee_shortcodes_container .wp-color-picker-field').wpColorPicker(myOptions);
60
  $.ajax({
61
  type: "POST",
62
  url: ajaxurl,
63
  dataType: "html",
64
  data: {action:'magee_control_button'},
65
  success:function(data){ $('#TB_window').append(data);
 
66
  var content_height = $('#TB_window').outerHeight();
67
+ var title_height = $('#TB_title').outerHeight();
68
+ var footer_height = $('#TB_footer').outerHeight();
69
+ $('#TB_ajaxContent').css({'height':content_height-title_height-footer_height-15});
70
+ //colorpicker controls
71
+ $('.magee_shortcodes_container .wp-color-picker-field').each(function(){
72
+ var color = $(this).attr('value');
73
+ $(this).css("background-color",color);
74
+ var since = 0 ;
75
+ var show = $(this);
76
+ $(this).parents('.wp-picker-container').find('.wp-picker-holder').mouseover(function(e){
77
+ since = 0;
78
+ event.cancelBubble=true;
79
+ });
80
+ $(this).parents('.wp-picker-container').find('.wp-picker-holder').mouseout(function(e){
81
+ since = 1;
82
+ event.cancelBubble=true;
83
+ });
84
+ $(document).mousedown(function(){
85
+ if(since == 1){
86
+
87
+ show.parents('.wp-picker-container').find('.wp-picker-holder').css("display","none");
88
+ }
89
+ });
90
+ $(this).click(function(){
91
+ $(this).parents('.wp-picker-container').find('.wp-picker-holder').css("display","block");
92
+ });
93
+
94
+ });
95
+ //add shortcode name
96
+ $('#TB_ajaxWindowTitle> span:first-child').before("&nbsp;<i class='fa fa-angle-right title_icon' ></i>&nbsp;");
97
+ $('#TB_ajaxWindowTitle> span').append($("#magee-shortcodes-settings-inner h2").text());
98
+ //when image compare to be hidden
99
+ if($('h2.shortcode-name').text() == 'Image Compare Shortcode'){
100
+ $('.TB_footer .magee-shortcodes-preview').css("display","none") ;
101
+ }
102
+ //input number controls
103
+
104
+ $('.magee-form-number').each(function(){
105
+ var number_obj = $(this);
106
+ var number = parseInt($(this).attr('max'));
107
+ var total =parseInt($(this).parent('.field').find('.probar').width());
108
+ var op = total/number;
109
+ var val = parseInt($(this).val());
110
+ var left = op*val.toString();
111
+ $(this).parent('.field').find('.probar-control').css('left',left);
112
+ $(this).parents('.param-item').find('.probar').click(function(e){
113
+ e = e||window.event;
114
+ var x2 = e.clientX;
115
+ var x3 = $(this).parents('.param-item').find('.probar').offset().left;
116
+
117
+ var lv = (x2-x3)/total*100;
118
+ $(this).parents('.param-item').find('.probar-control').css('left',lv.toString()+'%');
119
+ number_obj.val(Math.round(parseInt($(this).parents('.param-item').find('.probar-control').css('left'))/op));
120
+ });
121
+ $(this).change(function(){
122
+ if(parseInt($(this).val()) > number){
123
+ $(this).parents('.param-item').find('.probar-control').css('left','100%');
124
+ }else{
125
+ newleft = op*parseInt($(this).val()).toString();
126
+ $(this).parents('.param-item').find('.probar-control').css('left',newleft);
127
+ }
128
+ });
129
+ var z = 0 ;
130
+ var x1,y1;
131
+ $(this).parents('.param-item').find('.probar-control').mousedown(function(e){
132
+ z = 1;
133
+ e = e||window.event;
134
+ x1 = $(this).parents('.param-item').find('.probar').offset().left;
135
+ y1 = x1 + total;
136
+
137
+ });
138
+
139
+ $(document).mousemove(function(e){
140
+ if(z == 1){
141
+ var e=e||window.event;
142
+ var x = e.clientX;
143
+ if(x>y1 || x< x1){
144
+ if(x>y1){
145
+ number_obj.parents('.param-item').find('.probar-control').css('left','100%') ;
146
+ }
147
+ if(x < x1){
148
+ number_obj.parents('.param-item').find('.probar-control').css('left','0%') ;
149
+ }
150
+ }else{
151
+ var pc = (x-x1)/total*100;
152
+ number_obj.parents('.param-item').find('.probar-control').css('left',pc.toString()+'%');
153
+ number_obj.val(Math.round(parseInt(number_obj.parents('.param-item').find('.probar-control').css('left'))/op));
154
+ }
155
+ }
156
+
157
+ });
158
+ $(document).mouseup(function(){
159
+ z = 0;
160
+ }) ;
161
+ });
162
+
163
+ //input choose controls
164
+ $('.choose-show').each(function(){
165
+ if($(this).find('.choose-show-param').eq(0).is(':hidden') && $(this).find('.choose-show-param').eq(1).is(':hidden')){
166
+ var value = $(this).find('.choose-show-param').eq(0).attr('name');
167
+ $(this).parents('.param-item').find('.magee-form-choose').val(value);
168
+ $(this).find('.choose-show-param').eq(0).css('display','block');
169
+ if($(this).find('.choose-show-param').eq(0).text() == 'Yes'){$(this).css({'background-color':'#CCF7D5','color': '#17A534','font-weight': 'bold'});}
170
+ if($(this).find('.choose-show-param').eq(0).text() == 'No'){$(this).css({'background-color':'#FFDEDE','color': '#ff0000','font-weight': 'bold'});}
171
+ }else{
172
+ if($(this).find('.choose-show-param').eq(0).is(':hidden')){
173
+ var value = $(this).find('.choose-show-param').eq(1).attr('name');
174
+ $(this).parents('.param-item').find('.magee-form-choose').val(value);
175
+ if($(this).find('.choose-show-param').eq(1).text() == 'Yes'){$(this).css({'background-color':'#CCF7D5','color': '#17A534','font-weight': 'bold'});}
176
+ if($(this).find('.choose-show-param').eq(1).text() == 'No'){$(this).css({'background-color':'#FFDEDE','color': '#ff0000','font-weight': 'bold'});}
177
+ }else{
178
+ var value = $(this).find('.choose-show-param').eq(0).attr('name');
179
+ $(this).parents('.param-item').find('.magee-form-choose').val(value);
180
+ if($(this).find('.choose-show-param').eq(0).text() == 'Yes'){$(this).css({'background-color':'#CCF7D5','color': '#17A534','font-weight': 'bold'});}
181
+ if($(this).find('.choose-show-param').eq(0).text() == 'No'){$(this).css({'background-color':'#FFDEDE','color': '#ff0000','font-weight': 'bold'});}
182
+ }
183
+ }
184
+
185
+
186
+ });
187
+
188
+ //date picker
189
+ $(".magee-form-datetime").combodate();
190
+ var year = $("select.year option:selected").text();
191
+ var month = $("select.month option:selected").text();
192
+ var day = $("select.day option:selected").text();
193
+ var hour = $("select.hour option:selected").text();
194
+ var minute = $("select.minute option:selected").text();
195
+ $(".magee-form-date").val(year+'-'+month+'-'+day+' '+hour+':'+minute);
196
  }});
197
+
198
 
199
  },
200
  error:function(){
201
  }
202
  });
203
+
204
  });
205
 
206
+ //preview
207
+ $(document).on("click",'.magee-shortcodes-preview',function(e){
208
+
209
+ var data1={
210
+ action:"js"
211
+ };
212
+ e.stopPropagation();
213
+ var preview_height = $("#TB_window").height()-40;
214
+
215
+ $("#preview").css({"display":"block","position": "absolute","width": "1200px","height":preview_height,"top": "0px","left": "-200px"});
216
+
217
+ var height = $("#preview").height()-$(".preview-title").height()-50;
218
+ var iframe = "<iframe id='magee-sc-form-preview' width='100%' height='"+height.toString()+"'></iframe>";
219
+
220
+ if($("#magee-sc-form-preview").length>0){
221
+
222
+ $("#magee-sc-form-preview").remove();
223
+ }
224
+ $("#preview").append(iframe);
225
+ $.ajax({
226
+ type: "POST",
227
+ url: ajaxurl,
228
+ dataType: "html",
229
+ data:{action: "js" },
230
+ success:function(data){
231
+ $("#magee-sc-form-preview").contents().find("head").append(data);
232
+ },
233
+ error:function(){
234
+ }
235
+ });
236
+ //$.post(ajaxurl, data1,function(responsive) {
237
+
238
+ //});
239
+
240
+ var html = $('#magee_shortcodes_container form').serializeArray();
241
+ var shortcode = $('#magee_shortcodes_container form').find("input#magee-shortcode").val();
242
+ var data=
243
+ $.ajax({
244
+ type: "POST",
245
+ url: ajaxurl,
246
+ dataType: "html",
247
+ data:{name:shortcode, action:"say",preview:html},
248
+ success:function(data){
249
+ $("#magee-sc-form-preview").contents().find("body").append(data);
250
+
251
+ },
252
+ error:function(){
253
+ }
254
+
255
+ });
256
+
257
+ }) ;
258
+
259
+ $(document).on("click","a.magee-shortcodes-home",function(){
260
+ var height = $(window).height()-150;
261
+ $('#TB_ajaxContent').css('height',height);
262
  $("#magee-shortcodes-settings").hide();
263
  $("#TB_footer").remove();
264
  $("#magee-shortcodes-settings-innter").html("");
265
  $(".magee_shortcodes_list").show();
266
+ $("#TB_ajaxWindowTitle").find("i").remove();
267
+ $("#TB_ajaxWindowTitle").find("span").html('');
268
+ $("#TB_ajaxWindowTitle").html($("#TB_ajaxWindowTitle").html().replace(/&nbsp;/g,''));
269
+ $("#preview").css("display","none");
270
+ $("#magee-sc-form-preview").remove();
271
  });
272
 
273
  // insert shortcode into editor
304
  $(document).on("click",".iconpicker i",function(e){
305
  var icon = $(this).data('name');
306
  $('.iconpicker i').removeClass('selected');
307
+ $(this).parent('.iconpicker').siblings('.icon-val').find('input').val(icon);
308
  $(this).addClass('selected');
309
+ $(this).parent('.iconpicker').css('display','none');
310
  });
311
 
312
 
387
  $clone = $(this).parents("#magee_shortcodes_container").children(".column-shortcode-inner").eq(0).clone(true);
388
  $clone.removeClass("column-shortcode-inner hidden");
389
  $clone.addClass("column-shortcode-inner");
 
 
 
 
390
  $(".shortcode-add").before($clone.append(html));
391
 
392
  });
393
+
394
+ // type choose to show
395
+ $(document).on('click','.choose-show',function(){
396
+ $(this).each(function(){
397
+ if($(this).find(".choose-show-param").eq(0).is(':hidden')){
398
+ $(this).find(".choose-show-param").eq(1).css("display","none");
399
+ var value = $(this).find(".choose-show-param").eq(0).attr("name");
400
+ $(this).parents('.param-item').find(".magee-form-choose").val(value);
401
+ $(this).find(".choose-show-param").eq(0).css("display","block");
402
+ if($(this).find(".choose-show-param").eq(0).text() == 'Yes'){$(this).css({'background-color':'#CCF7D5','color': '#17A534','font-weight': 'bold'});}
403
+ if($(this).find(".choose-show-param").eq(0).text() == 'No'){$(this).css({'background-color':'#FFDEDE','color': '#ff0000','font-weight': 'bold'});}
404
+ }else{
405
+ $(this).find(".choose-show-param").eq(0).css("display","none");
406
+ var value = $(this).find(".choose-show-param").eq(1).attr("name");
407
+ $(this).parents('.param-item').find(".magee-form-choose").val(value);
408
+ $(this).find(".choose-show-param").eq(1).css("display","block");
409
+ if($(this).find(".choose-show-param").eq(1).text() == 'Yes'){$(this).css({'background-color':'#CCF7D5','color': '#17A534','font-weight': 'bold'});}
410
+ if($(this).find(".choose-show-param").eq(1).text() == 'No'){$(this).css({'background-color':'#FFDEDE','color': '#ff0000','font-weight': 'bold'});}
411
+ }
412
+ });
413
+ });
414
+ // change end time for countdown
415
+ $(document).on('change',"span.combodate select",function(){
416
+ var year = $("select.year option:selected").text();
417
+ var month = $("select.month option:selected").text();
418
+ var day = $("select.day option:selected").text();
419
+ var hour = $("select.hour option:selected").text();
420
+ var minute = $("select.minute option:selected").text();
421
+ $(".magee-form-date").val(year+'-'+month+'-'+day+' '+hour+':'+minute);
422
+ });
423
+ //choose icon to show
424
+ $(document).on('click',".custom_icon",function(){
425
+ $(this).each(function(){
426
+ $(this).parents(".param-item").find(".iconpicker").css('display','block');
427
+ });
428
+ });
429
+ $(document).on('click',".magee-preview-delete",function(){
430
+ $("#preview").css('display','none');
431
+ $("#magee-sc-form-preview").remove();
432
+ });
433
+
434
  });
assets/js/combodate.js ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Combodate - 1.0.7
3
+ * Dropdown date and time picker.
4
+ * Converts text input into dropdowns to pick day, month, year, hour, minute and second.
5
+ * Uses momentjs as datetime library http://momentjs.com.
6
+ * For i18n include corresponding file from https://github.com/timrwood/moment/tree/master/lang
7
+ *
8
+ * Confusion at noon and midnight - see http://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight
9
+ * In combodate:
10
+ * 12:00 pm --> 12:00 (24-h format, midday)
11
+ * 12:00 am --> 00:00 (24-h format, midnight, start of day)
12
+ *
13
+ * Differs from momentjs parse rules:
14
+ * 00:00 pm, 12:00 pm --> 12:00 (24-h format, day not change)
15
+ * 00:00 am, 12:00 am --> 00:00 (24-h format, day not change)
16
+ *
17
+ *
18
+ * Author: Vitaliy Potapov
19
+ * Project page: http://github.com/vitalets/combodate
20
+ * Copyright (c) 2012 Vitaliy Potapov. Released under MIT License.
21
+ **/
22
+ (function ($) {
23
+
24
+ var Combodate = function (element, options) {
25
+ this.$element = $(element);
26
+ if(!this.$element.is('input')) {
27
+ $.error('Combodate should be applied to INPUT element');
28
+ return;
29
+ }
30
+ this.options = $.extend({}, $.fn.combodate.defaults, options, this.$element.data());
31
+ this.init();
32
+ };
33
+
34
+ Combodate.prototype = {
35
+ constructor: Combodate,
36
+ init: function () {
37
+ this.map = {
38
+ //key regexp moment.method
39
+ day: ['D', 'date'],
40
+ month: ['M', 'month'],
41
+ year: ['Y', 'year'],
42
+ hour: ['[Hh]', 'hours'],
43
+ minute: ['m', 'minutes'],
44
+ second: ['s', 'seconds'],
45
+ ampm: ['[Aa]', '']
46
+ };
47
+
48
+ this.$widget = $('<span class="combodate"></span>').html(this.getTemplate());
49
+
50
+ this.initCombos();
51
+
52
+ //update original input on change
53
+ this.$widget.on('change', 'select', $.proxy(function(e) {
54
+ this.$element.val(this.getValue()).change();
55
+ // update days count if month or year changes
56
+ if (this.options.smartDays) {
57
+ if ($(e.target).is('.month') || $(e.target).is('.year')) {
58
+ this.fillCombo('day');
59
+ }
60
+ }
61
+ }, this));
62
+
63
+ this.$widget.find('select').css('width', 'auto');
64
+
65
+ // hide original input and insert widget
66
+ this.$element.hide().after(this.$widget);
67
+
68
+ // set initial value
69
+ this.setValue(this.$element.val() || this.options.value);
70
+ },
71
+
72
+ /*
73
+ Replace tokens in template with <select> elements
74
+ */
75
+ getTemplate: function() {
76
+ var tpl = this.options.template;
77
+ var customClass = this.options.customClass;
78
+
79
+ //first pass
80
+ $.each(this.map, function(k, v) {
81
+ v = v[0];
82
+ var r = new RegExp(v+'+'),
83
+ token = v.length > 1 ? v.substring(1, 2) : v;
84
+
85
+ tpl = tpl.replace(r, '{'+token+'}');
86
+ });
87
+
88
+ //replace spaces with &nbsp;
89
+ tpl = tpl.replace(/ /g, '&nbsp;');
90
+
91
+ //second pass
92
+ $.each(this.map, function(k, v) {
93
+ v = v[0];
94
+ var token = v.length > 1 ? v.substring(1, 2) : v;
95
+
96
+ tpl = tpl.replace('{'+token+'}', '<select class="'+k+' '+customClass+'"></select>');
97
+ });
98
+
99
+ return tpl;
100
+ },
101
+
102
+ /*
103
+ Initialize combos that presents in template
104
+ */
105
+ initCombos: function() {
106
+ for (var k in this.map) {
107
+ var $c = this.$widget.find('.'+k);
108
+ // set properties like this.$day, this.$month etc.
109
+ this['$'+k] = $c.length ? $c : null;
110
+ // fill with items
111
+ this.fillCombo(k);
112
+ }
113
+ },
114
+
115
+ /*
116
+ Fill combo with items
117
+ */
118
+ fillCombo: function(k) {
119
+ var $combo = this['$'+k];
120
+ if (!$combo) {
121
+ return;
122
+ }
123
+
124
+ // define method name to fill items, e.g `fillDays`
125
+ var f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1);
126
+ var items = this[f]();
127
+ var value = $combo.val();
128
+
129
+ $combo.empty();
130
+ for(var i=0; i<items.length; i++) {
131
+ $combo.append('<option value="'+items[i][0]+'">'+items[i][1]+'</option>');
132
+ }
133
+
134
+ $combo.val(value);
135
+ },
136
+
137
+ /*
138
+ Initialize items of combos. Handles `firstItem` option
139
+ */
140
+ fillCommon: function(key) {
141
+ var values = [],
142
+ relTime;
143
+
144
+ if(this.options.firstItem === 'name') {
145
+ //need both to support moment ver < 2 and >= 2
146
+ relTime = moment.relativeTime || moment.langData()._relativeTime;
147
+ var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key];
148
+ //take last entry (see momentjs lang files structure)
149
+ header = header.split(' ').reverse()[0];
150
+ values.push(['', header]);
151
+ } else if(this.options.firstItem === 'empty') {
152
+ values.push(['', '']);
153
+ }
154
+ return values;
155
+ },
156
+
157
+ /*
158
+ fill year
159
+ */
160
+ fillYear: function() {
161
+ var items = [], name, i,
162
+ longNames = this.options.template.indexOf('YYYY') !== -1;
163
+
164
+ for(i=this.options.maxYear; i>=this.options.minYear; i--) {
165
+ name = longNames ? i : (i+'').substring(2);
166
+ items[this.options.yearDescending ? 'push' : 'unshift']([i, name]);
167
+ }
168
+
169
+ items = this.fillCommon('y').concat(items);
170
+
171
+ return items;
172
+ },
173
+
174
+ /*
175
+ fill month
176
+ */
177
+ fillMonth: function() {
178
+ var items = this.fillCommon('M'), name, i,
179
+ longNames = this.options.template.indexOf('MMMM') !== -1,
180
+ shortNames = this.options.template.indexOf('MMM') !== -1,
181
+ twoDigit = this.options.template.indexOf('MM') !== -1;
182
+
183
+ for(i=0; i<=11; i++) {
184
+ if(longNames) {
185
+ //see https://github.com/timrwood/momentjs.com/pull/36
186
+ name = moment().date(1).month(i).format('MMMM');
187
+ } else if(shortNames) {
188
+ name = moment().date(1).month(i).format('MMM');
189
+ } else if(twoDigit) {
190
+ name = this.leadZero(i+1);
191
+ } else {
192
+ name = i+1;
193
+ }
194
+ items.push([i, name]);
195
+ }
196
+ return items;
197
+ },
198
+
199
+ /*
200
+ fill day
201
+ */
202
+ fillDay: function() {
203
+ var items = this.fillCommon('d'), name, i,
204
+ twoDigit = this.options.template.indexOf('DD') !== -1,
205
+ daysCount = 31;
206
+
207
+ // detect days count (depends on month and year)
208
+ // originally https://github.com/vitalets/combodate/pull/7
209
+ if (this.options.smartDays && this.$month && this.$year) {
210
+ var month = parseInt(this.$month.val(), 10);
211
+ var year = parseInt(this.$year.val(), 10);
212
+
213
+ if (!isNaN(month) && !isNaN(year)) {
214
+ daysCount = moment([year, month]).daysInMonth();
215
+ }
216
+ }
217
+
218
+ for (i = 1; i <= daysCount; i++) {
219
+ name = twoDigit ? this.leadZero(i) : i;
220
+ items.push([i, name]);
221
+ }
222
+ return items;
223
+ },
224
+
225
+
226
+ /*
227
+ fill hour
228
+ */
229
+ fillHour: function() {
230
+ var items = this.fillCommon('h'), name, i,
231
+ h12 = this.options.template.indexOf('h') !== -1,
232
+ h24 = this.options.template.indexOf('H') !== -1,
233
+ twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1,
234
+ min = h12 ? 1 : 0,
235
+ max = h12 ? 12 : 23;
236
+
237
+ for(i=min; i<=max; i++) {
238
+ name = twoDigit ? this.leadZero(i) : i;
239
+ items.push([i, name]);
240
+ }
241
+ return items;
242
+ },
243
+
244
+ /*
245
+ fill minute
246
+ */
247
+ fillMinute: function() {
248
+ var items = this.fillCommon('m'), name, i,
249
+ twoDigit = this.options.template.indexOf('mm') !== -1;
250
+
251
+ for(i=0; i<=59; i+= this.options.minuteStep) {
252
+ name = twoDigit ? this.leadZero(i) : i;
253
+ items.push([i, name]);
254
+ }
255
+ return items;
256
+ },
257
+
258
+ /*
259
+ fill second
260
+ */
261
+ fillSecond: function() {
262
+ var items = this.fillCommon('s'), name, i,
263
+ twoDigit = this.options.template.indexOf('ss') !== -1;
264
+
265
+ for(i=0; i<=59; i+= this.options.secondStep) {
266
+ name = twoDigit ? this.leadZero(i) : i;
267
+ items.push([i, name]);
268
+ }
269
+ return items;
270
+ },
271
+
272
+ /*
273
+ fill ampm
274
+ */
275
+ fillAmpm: function() {
276
+ var ampmL = this.options.template.indexOf('a') !== -1,
277
+ ampmU = this.options.template.indexOf('A') !== -1,
278
+ items = [
279
+ ['am', ampmL ? 'am' : 'AM'],
280
+ ['pm', ampmL ? 'pm' : 'PM']
281
+ ];
282
+ return items;
283
+ },
284
+
285
+ /*
286
+ Returns current date value from combos.
287
+ If format not specified - `options.format` used.
288
+ If format = `null` - Moment object returned.
289
+ */
290
+ getValue: function(format) {
291
+ var dt, values = {},
292
+ that = this,
293
+ notSelected = false;
294
+
295
+ //getting selected values
296
+ $.each(this.map, function(k, v) {
297
+ if(k === 'ampm') {
298
+ return;
299
+ }
300
+ var def = k === 'day' ? 1 : 0;
301
+
302
+ values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def;
303
+
304
+ if(isNaN(values[k])) {
305
+ notSelected = true;
306
+ return false;
307
+ }
308
+ });
309
+
310
+ //if at least one visible combo not selected - return empty string
311
+ if(notSelected) {
312
+ return '';
313
+ }
314
+
315
+ //convert hours 12h --> 24h
316
+ if(this.$ampm) {
317
+ //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)
318
+ if(values.hour === 12) {
319
+ values.hour = this.$ampm.val() === 'am' ? 0 : 12;
320
+ } else {
321
+ values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12;
322
+ }
323
+ }
324
+
325
+ dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]);
326
+
327
+ //highlight invalid date
328
+ this.highlight(dt);
329
+
330
+ format = format === undefined ? this.options.format : format;
331
+ if(format === null) {
332
+ return dt.isValid() ? dt : null;
333
+ } else {
334
+ return dt.isValid() ? dt.format(format) : '';
335
+ }
336
+ },
337
+
338
+ setValue: function(value) {
339
+ if(!value) {
340
+ return;
341
+ }
342
+
343
+ // parse in strict mode (third param `true`)
344
+ var dt = typeof value === 'string' ? moment(value, this.options.format, true) : moment(value),
345
+ that = this,
346
+ values = {};
347
+
348
+ //function to find nearest value in select options
349
+ function getNearest($select, value) {
350
+ var delta = {};
351
+ $select.children('option').each(function(i, opt){
352
+ var optValue = $(opt).attr('value'),
353
+ distance;
354
+
355
+ if(optValue === '') return;
356
+ distance = Math.abs(optValue - value);
357
+ if(typeof delta.distance === 'undefined' || distance < delta.distance) {
358
+ delta = {value: optValue, distance: distance};
359
+ }
360
+ });
361
+ return delta.value;
362
+ }
363
+
364
+ if(dt.isValid()) {
365
+ //read values from date object
366
+ $.each(this.map, function(k, v) {
367
+ if(k === 'ampm') {
368
+ return;
369
+ }
370
+ values[k] = dt[v[1]]();
371
+ });
372
+
373
+ if(this.$ampm) {
374
+ //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)
375
+ if(values.hour >= 12) {
376
+ values.ampm = 'pm';
377
+ if(values.hour > 12) {
378
+ values.hour -= 12;
379
+ }
380
+ } else {
381
+ values.ampm = 'am';
382
+ if(values.hour === 0) {
383
+ values.hour = 12;
384
+ }
385
+ }
386
+ }
387
+
388
+ $.each(values, function(k, v) {
389
+ //call val() for each existing combo, e.g. this.$hour.val()
390
+ if(that['$'+k]) {
391
+
392
+ if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) {
393
+ v = getNearest(that['$'+k], v);
394
+ }
395
+
396
+ if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) {
397
+ v = getNearest(that['$'+k], v);
398
+ }
399
+
400
+ that['$'+k].val(v);
401
+ }
402
+ });
403
+
404
+ // update days count
405
+ if (this.options.smartDays) {
406
+ this.fillCombo('day');
407
+ }
408
+
409
+ this.$element.val(dt.format(this.options.format)).change();
410
+ }
411
+ },
412
+
413
+ /*
414
+ highlight combos if date is invalid
415
+ */
416
+ highlight: function(dt) {
417
+ if(!dt.isValid()) {
418
+ if(this.options.errorClass) {
419
+ this.$widget.addClass(this.options.errorClass);
420
+ } else {
421
+ //store original border color
422
+ if(!this.borderColor) {
423
+ this.borderColor = this.$widget.find('select').css('border-color');
424
+ }
425
+ this.$widget.find('select').css('border-color', 'red');
426
+ }
427
+ } else {
428
+ if(this.options.errorClass) {
429
+ this.$widget.removeClass(this.options.errorClass);
430
+ } else {
431
+ this.$widget.find('select').css('border-color', this.borderColor);
432
+ }
433
+ }
434
+ },
435
+
436
+ leadZero: function(v) {
437
+ return v <= 9 ? '0' + v : v;
438
+ },
439
+
440
+ destroy: function() {
441
+ this.$widget.remove();
442
+ this.$element.removeData('combodate').show();
443
+ }
444
+
445
+ //todo: clear method
446
+ };
447
+
448
+ $.fn.combodate = function ( option ) {
449
+ var d, args = Array.apply(null, arguments);
450
+ args.shift();
451
+
452
+ //getValue returns date as string / object (not jQuery object)
453
+ if(option === 'getValue' && this.length && (d = this.eq(0).data('combodate'))) {
454
+ return d.getValue.apply(d, args);
455
+ }
456
+
457
+ return this.each(function () {
458
+ var $this = $(this),
459
+ data = $this.data('combodate'),
460
+ options = typeof option == 'object' && option;
461
+ if (!data) {
462
+ $this.data('combodate', (data = new Combodate(this, options)));
463
+ }
464
+ if (typeof option == 'string' && typeof data[option] == 'function') {
465
+ data[option].apply(data, args);
466
+ }
467
+ });
468
+ };
469
+
470
+ $.fn.combodate.defaults = {
471
+ //in this format value stored in original input
472
+ format: 'YYYY-MM-DD HH:mm',
473
+ //in this format items in dropdowns are displayed
474
+ template: 'YYYY /MMM / D / H : mm',
475
+ //initial value, can be `new Date()`
476
+ value: null,
477
+ minYear: 1970,
478
+ maxYear: 2020,
479
+ yearDescending: true,
480
+ minuteStep: 5,
481
+ secondStep: 1,
482
+ firstItem: 'empty', //'name', 'empty', 'none'
483
+ errorClass: null,
484
+ customClass: '',
485
+ roundTime: true, // whether to round minutes and seconds if step > 1
486
+ smartDays: false // whether days in combo depend on selected month: 31, 30, 28
487
+ };
488
+
489
+ }(window.jQuery));
assets/js/jquery.twentytwenty.js CHANGED
@@ -1,103 +1,105 @@
1
- (function($){
2
-
3
- $.fn.twentytwenty = function(options) {
4
- var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options);
5
- return this.each(function() {
6
-
7
- var sliderPct = options.default_offset_pct;
8
- var container = $(this);
9
- var sliderOrientation = options.orientation;
10
- var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';
11
- var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';
12
-
13
-
14
- container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>");
15
- container.append("<div class='twentytwenty-overlay'></div>");
16
- var beforeImg = container.find("img:first");
17
- var afterImg = container.find("img:last");
18
- container.append("<div class='twentytwenty-handle'></div>");
19
- var slider = container.find(".twentytwenty-handle");
20
- slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>");
21
- slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>");
22
- container.addClass("twentytwenty-container");
23
- beforeImg.addClass("twentytwenty-before");
24
- afterImg.addClass("twentytwenty-after");
25
-
26
- var overlay = container.find(".twentytwenty-overlay");
27
- overlay.append("<div class='twentytwenty-before-label'></div>");
28
- overlay.append("<div class='twentytwenty-after-label'></div>");
29
-
30
- var calcOffset = function(dimensionPct) {
31
- var w = beforeImg.width();
32
- var h = beforeImg.height();
33
- return {
34
- w: w+"px",
35
- h: h+"px",
36
- cw: (dimensionPct*w)+"px",
37
- ch: (dimensionPct*h)+"px"
38
- };
39
- };
40
-
41
- var adjustContainer = function(offset) {
42
- if (sliderOrientation === 'vertical') {
43
- beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)");
44
- }
45
- else {
46
- beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)");
47
- }
48
- container.css("height", offset.h);
49
- };
50
-
51
- var adjustSlider = function(pct) {
52
- var offset = calcOffset(pct);
53
- slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw);
54
- adjustContainer(offset);
55
- }
56
-
57
- $(window).on("resize.twentytwenty", function(e) {
58
- adjustSlider(sliderPct);
59
- });
60
-
61
- var offsetX = 0;
62
- var imgWidth = 0;
63
-
64
- slider.on("movestart", function(e) {
65
- if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {
66
- e.preventDefault();
67
- }
68
- else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {
69
- e.preventDefault();
70
- }
71
- container.addClass("active");
72
- offsetX = container.offset().left;
73
- offsetY = container.offset().top;
74
- imgWidth = beforeImg.width();
75
- imgHeight = beforeImg.height();
76
- });
77
-
78
- slider.on("moveend", function(e) {
79
- container.removeClass("active");
80
- });
81
-
82
- slider.on("move", function(e) {
83
- if (container.hasClass("active")) {
84
- sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth;
85
- if (sliderPct < 0) {
86
- sliderPct = 0;
87
- }
88
- if (sliderPct > 1) {
89
- sliderPct = 1;
90
- }
91
- adjustSlider(sliderPct);
92
- }
93
- });
94
-
95
- container.find("img").on("mousedown", function(event) {
96
- event.preventDefault();
97
- });
98
-
99
- $(window).trigger("resize.twentytwenty");
100
- });
101
- };
102
-
103
- })(jQuery);
 
 
1
+ (function($){
2
+
3
+ $.fn.twentytwenty = function(options) {
4
+ var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options);
5
+ return this.each(function() {
6
+
7
+ var sliderPct = options.default_offset_pct;
8
+ var container = $(this);
9
+ var sliderOrientation = options.orientation;
10
+ var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';
11
+ var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';
12
+
13
+
14
+ container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>");
15
+ container.append("<div class='twentytwenty-overlay'></div>");
16
+ var beforeImg = container.find("img:first");
17
+ var afterImg = container.find("img:last");
18
+ container.append("<div class='twentytwenty-handle'></div>");
19
+ var slider = container.find(".twentytwenty-handle");
20
+ slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>");
21
+ slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>");
22
+ container.addClass("twentytwenty-container");
23
+ beforeImg.addClass("twentytwenty-before");
24
+ afterImg.addClass("twentytwenty-after");
25
+
26
+ var overlay = container.find(".twentytwenty-overlay");
27
+ overlay.append("<div class='twentytwenty-before-label'></div>");
28
+ overlay.append("<div class='twentytwenty-after-label'></div>");
29
+
30
+ var calcOffset = function(dimensionPct) {
31
+ var w = beforeImg.width();
32
+ var h = beforeImg.height();
33
+ return {
34
+ w: w+"px",
35
+ h: h+"px",
36
+ cw: (dimensionPct*w)+"px",
37
+ ch: (dimensionPct*h)+"px"
38
+ };
39
+ };
40
+
41
+ var adjustContainer = function(offset) {
42
+ if (sliderOrientation === 'vertical') {
43
+ beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)");
44
+ }
45
+ else {
46
+ beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)");
47
+ }
48
+ container.css("height", offset.h);
49
+ };
50
+
51
+ var adjustSlider = function(pct) {
52
+ var offset = calcOffset(pct);
53
+ slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw);
54
+ adjustContainer(offset);
55
+ }
56
+
57
+ $(window).on("resize.twentytwenty", function(e) {
58
+ adjustSlider(sliderPct);
59
+ });
60
+ var offsetX = 0;
61
+ var imgWidth = 0;
62
+ slider.on("movestart", function(e) {
63
+
64
+ if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {
65
+
66
+ e.preventDefault();
67
+ }
68
+ else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {
69
+ e.preventDefault();
70
+ }
71
+ container.addClass("active");
72
+ offsetX = container.offset().left;
73
+ offsetY = container.offset().top;
74
+ imgWidth = beforeImg.width();
75
+ imgHeight = beforeImg.height();
76
+ });
77
+
78
+ slider.on("moveend", function(e) {
79
+ container.removeClass("active");
80
+
81
+ });
82
+
83
+ slider.on("move", function(e) {
84
+
85
+ if (container.hasClass("active")) {
86
+ sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth;
87
+ if (sliderPct < 0) {
88
+ sliderPct = 0;
89
+ }
90
+ if (sliderPct > 1) {
91
+ sliderPct = 1;
92
+ }
93
+ adjustSlider(sliderPct);
94
+ }
95
+ });
96
+ container.find("img").on("mousedown", function(event) {
97
+ event.preventDefault();
98
+
99
+ });
100
+
101
+ $(window).trigger("resize.twentytwenty");
102
+ });
103
+ };
104
+
105
+ })(jQuery);
assets/js/moment.js ADDED
@@ -0,0 +1,3690 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ //! moment.js
2
+ //! version : 2.12.0
3
+ //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
+ //! license : MIT
5
+ //! momentjs.com
6
+
7
+ ;(function (global, factory) {
8
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
9
+ typeof define === 'function' && define.amd ? define(factory) :
10
+ global.moment = factory()
11
+ }(this, function () { 'use strict';
12
+
13
+ var hookCallback;
14
+
15
+ function utils_hooks__hooks () {
16
+ return hookCallback.apply(null, arguments);
17
+ }
18
+
19
+ // This is done to register the method called with moment()
20
+ // without creating circular dependencies.
21
+ function setHookCallback (callback) {
22
+ hookCallback = callback;
23
+ }
24
+
25
+ function isArray(input) {
26
+ return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
27
+ }
28
+
29
+ function isDate(input) {
30
+ return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
31
+ }
32
+
33
+ function map(arr, fn) {
34
+ var res = [], i;
35
+ for (i = 0; i < arr.length; ++i) {
36
+ res.push(fn(arr[i], i));
37
+ }
38
+ return res;
39
+ }
40
+
41
+ function hasOwnProp(a, b) {
42
+ return Object.prototype.hasOwnProperty.call(a, b);
43
+ }
44
+
45
+ function extend(a, b) {
46
+ for (var i in b) {
47
+ if (hasOwnProp(b, i)) {
48
+ a[i] = b[i];
49
+ }
50
+ }
51
+
52
+ if (hasOwnProp(b, 'toString')) {
53
+ a.toString = b.toString;
54
+ }
55
+
56
+ if (hasOwnProp(b, 'valueOf')) {
57
+ a.valueOf = b.valueOf;
58
+ }
59
+
60
+ return a;
61
+ }
62
+
63
+ function create_utc__createUTC (input, format, locale, strict) {
64
+ return createLocalOrUTC(input, format, locale, strict, true).utc();
65
+ }
66
+
67
+ function defaultParsingFlags() {
68
+ // We need to deep clone this object.
69
+ return {
70
+ empty : false,
71
+ unusedTokens : [],
72
+ unusedInput : [],
73
+ overflow : -2,
74
+ charsLeftOver : 0,
75
+ nullInput : false,
76
+ invalidMonth : null,
77
+ invalidFormat : false,
78
+ userInvalidated : false,
79
+ iso : false
80
+ };
81
+ }
82
+
83
+ function getParsingFlags(m) {
84
+ if (m._pf == null) {
85
+ m._pf = defaultParsingFlags();
86
+ }
87
+ return m._pf;
88
+ }
89
+
90
+ function valid__isValid(m) {
91
+ if (m._isValid == null) {
92
+ var flags = getParsingFlags(m);
93
+ m._isValid = !isNaN(m._d.getTime()) &&
94
+ flags.overflow < 0 &&
95
+ !flags.empty &&
96
+ !flags.invalidMonth &&
97
+ !flags.invalidWeekday &&
98
+ !flags.nullInput &&
99
+ !flags.invalidFormat &&
100
+ !flags.userInvalidated;
101
+
102
+ if (m._strict) {
103
+ m._isValid = m._isValid &&
104
+ flags.charsLeftOver === 0 &&
105
+ flags.unusedTokens.length === 0 &&
106
+ flags.bigHour === undefined;
107
+ }
108
+ }
109
+ return m._isValid;
110
+ }
111
+
112
+ function valid__createInvalid (flags) {
113
+ var m = create_utc__createUTC(NaN);
114
+ if (flags != null) {
115
+ extend(getParsingFlags(m), flags);
116
+ }
117
+ else {
118
+ getParsingFlags(m).userInvalidated = true;
119
+ }
120
+
121
+ return m;
122
+ }
123
+
124
+ function isUndefined(input) {
125
+ return input === void 0;
126
+ }
127
+
128
+ // Plugins that add properties should also add the key here (null value),
129
+ // so we can properly clone ourselves.
130
+ var momentProperties = utils_hooks__hooks.momentProperties = [];
131
+
132
+ function copyConfig(to, from) {
133
+ var i, prop, val;
134
+
135
+ if (!isUndefined(from._isAMomentObject)) {
136
+ to._isAMomentObject = from._isAMomentObject;
137
+ }
138
+ if (!isUndefined(from._i)) {
139
+ to._i = from._i;
140
+ }
141
+ if (!isUndefined(from._f)) {
142
+ to._f = from._f;
143
+ }
144
+ if (!isUndefined(from._l)) {
145
+ to._l = from._l;
146
+ }
147
+ if (!isUndefined(from._strict)) {
148
+ to._strict = from._strict;
149
+ }
150
+ if (!isUndefined(from._tzm)) {
151
+ to._tzm = from._tzm;
152
+ }
153
+ if (!isUndefined(from._isUTC)) {
154
+ to._isUTC = from._isUTC;
155
+ }
156
+ if (!isUndefined(from._offset)) {
157
+ to._offset = from._offset;
158
+ }
159
+ if (!isUndefined(from._pf)) {
160
+ to._pf = getParsingFlags(from);
161
+ }
162
+ if (!isUndefined(from._locale)) {
163
+ to._locale = from._locale;
164
+ }
165
+
166
+ if (momentProperties.length > 0) {
167
+ for (i in momentProperties) {
168
+ prop = momentProperties[i];
169
+ val = from[prop];
170
+ if (!isUndefined(val)) {
171
+ to[prop] = val;
172
+ }
173
+ }
174
+ }
175
+
176
+ return to;
177
+ }
178
+
179
+ var updateInProgress = false;
180
+
181
+ // Moment prototype object
182
+ function Moment(config) {
183
+ copyConfig(this, config);
184
+ this._d = new Date(config._d != null ? config._d.getTime() : NaN);
185
+ // Prevent infinite loop in case updateOffset creates new moment
186
+ // objects.
187
+ if (updateInProgress === false) {
188
+ updateInProgress = true;
189
+ utils_hooks__hooks.updateOffset(this);
190
+ updateInProgress = false;
191
+ }
192
+ }
193
+
194
+ function isMoment (obj) {
195
+ return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
196
+ }
197
+
198
+ function absFloor (number) {
199
+ if (number < 0) {
200
+ return Math.ceil(number);
201
+ } else {
202
+ return Math.floor(number);
203
+ }
204
+ }
205
+
206
+ function toInt(argumentForCoercion) {
207
+ var coercedNumber = +argumentForCoercion,
208
+ value = 0;
209
+
210
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
211
+ value = absFloor(coercedNumber);
212
+ }
213
+
214
+ return value;
215
+ }
216
+
217
+ // compare two arrays, return the number of differences
218
+ function compareArrays(array1, array2, dontConvert) {
219
+ var len = Math.min(array1.length, array2.length),
220
+ lengthDiff = Math.abs(array1.length - array2.length),
221
+ diffs = 0,
222
+ i;
223
+ for (i = 0; i < len; i++) {
224
+ if ((dontConvert && array1[i] !== array2[i]) ||
225
+ (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
226
+ diffs++;
227
+ }
228
+ }
229
+ return diffs + lengthDiff;
230
+ }
231
+
232
+ function warn(msg) {
233
+ if (utils_hooks__hooks.suppressDeprecationWarnings === false &&
234
+ (typeof console !== 'undefined') && console.warn) {
235
+ console.warn('Deprecation warning: ' + msg);
236
+ }
237
+ }
238
+
239
+ function deprecate(msg, fn) {
240
+ var firstTime = true;
241
+
242
+ return extend(function () {
243
+ if (firstTime) {
244
+ warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack);
245
+ firstTime = false;
246
+ }
247
+ return fn.apply(this, arguments);
248
+ }, fn);
249
+ }
250
+
251
+ var deprecations = {};
252
+
253
+ function deprecateSimple(name, msg) {
254
+ if (!deprecations[name]) {
255
+ warn(msg);
256
+ deprecations[name] = true;
257
+ }
258
+ }
259
+
260
+ utils_hooks__hooks.suppressDeprecationWarnings = false;
261
+
262
+ function isFunction(input) {
263
+ return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
264
+ }
265
+
266
+ function isObject(input) {
267
+ return Object.prototype.toString.call(input) === '[object Object]';
268
+ }
269
+
270
+ function locale_set__set (config) {
271
+ var prop, i;
272
+ for (i in config) {
273
+ prop = config[i];
274
+ if (isFunction(prop)) {
275
+ this[i] = prop;
276
+ } else {
277
+ this['_' + i] = prop;
278
+ }
279
+ }
280
+ this._config = config;
281
+ // Lenient ordinal parsing accepts just a number in addition to
282
+ // number + (possibly) stuff coming from _ordinalParseLenient.
283
+ this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
284
+ }
285
+
286
+ function mergeConfigs(parentConfig, childConfig) {
287
+ var res = extend({}, parentConfig), prop;
288
+ for (prop in childConfig) {
289
+ if (hasOwnProp(childConfig, prop)) {
290
+ if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
291
+ res[prop] = {};
292
+ extend(res[prop], parentConfig[prop]);
293
+ extend(res[prop], childConfig[prop]);
294
+ } else if (childConfig[prop] != null) {
295
+ res[prop] = childConfig[prop];
296
+ } else {
297
+ delete res[prop];
298
+ }
299
+ }
300
+ }
301
+ return res;
302
+ }
303
+
304
+ function Locale(config) {
305
+ if (config != null) {
306
+ this.set(config);
307
+ }
308
+ }
309
+
310
+ // internal storage for locale config files
311
+ var locales = {};
312
+ var globalLocale;
313
+
314
+ function normalizeLocale(key) {
315
+ return key ? key.toLowerCase().replace('_', '-') : key;
316
+ }
317
+
318
+ // pick the locale from the array
319
+ // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
320
+ // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
321
+ function chooseLocale(names) {
322
+ var i = 0, j, next, locale, split;
323
+
324
+ while (i < names.length) {
325
+ split = normalizeLocale(names[i]).split('-');
326
+ j = split.length;
327
+ next = normalizeLocale(names[i + 1]);
328
+ next = next ? next.split('-') : null;
329
+ while (j > 0) {
330
+ locale = loadLocale(split.slice(0, j).join('-'));
331
+ if (locale) {
332
+ return locale;
333
+ }
334
+ if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
335
+ //the next array item is better than a shallower substring of this one
336
+ break;
337
+ }
338
+ j--;
339
+ }
340
+ i++;
341
+ }
342
+ return null;
343
+ }
344
+
345
+ function loadLocale(name) {
346
+ var oldLocale = null;
347
+ // TODO: Find a better way to register and load all the locales in Node
348
+ if (!locales[name] && (typeof module !== 'undefined') &&
349
+ module && module.exports) {
350
+ try {
351
+ oldLocale = globalLocale._abbr;
352
+ require('./locale/' + name);
353
+ // because defineLocale currently also sets the global locale, we
354
+ // want to undo that for lazy loaded locales
355
+ locale_locales__getSetGlobalLocale(oldLocale);
356
+ } catch (e) { }
357
+ }
358
+ return locales[name];
359
+ }
360
+
361
+ // This function will load locale and then set the global locale. If
362
+ // no arguments are passed in, it will simply return the current global
363
+ // locale key.
364
+ function locale_locales__getSetGlobalLocale (key, values) {
365
+ var data;
366
+ if (key) {
367
+ if (isUndefined(values)) {
368
+ data = locale_locales__getLocale(key);
369
+ }
370
+ else {
371
+ data = defineLocale(key, values);
372
+ }
373
+
374
+ if (data) {
375
+ // moment.duration._locale = moment._locale = data;
376
+ globalLocale = data;
377
+ }
378
+ }
379
+
380
+ return globalLocale._abbr;
381
+ }
382
+
383
+ function defineLocale (name, config) {
384
+ if (config !== null) {
385
+ config.abbr = name;
386
+ if (locales[name] != null) {
387
+ deprecateSimple('defineLocaleOverride',
388
+ 'use moment.updateLocale(localeName, config) to change ' +
389
+ 'an existing locale. moment.defineLocale(localeName, ' +
390
+ 'config) should only be used for creating a new locale');
391
+ config = mergeConfigs(locales[name]._config, config);
392
+ } else if (config.parentLocale != null) {
393
+ if (locales[config.parentLocale] != null) {
394
+ config = mergeConfigs(locales[config.parentLocale]._config, config);
395
+ } else {
396
+ // treat as if there is no base config
397
+ deprecateSimple('parentLocaleUndefined',
398
+ 'specified parentLocale is not defined yet');
399
+ }
400
+ }
401
+ locales[name] = new Locale(config);
402
+
403
+ // backwards compat for now: also set the locale
404
+ locale_locales__getSetGlobalLocale(name);
405
+
406
+ return locales[name];
407
+ } else {
408
+ // useful for testing
409
+ delete locales[name];
410
+ return null;
411
+ }
412
+ }
413
+
414
+ function updateLocale(name, config) {
415
+ if (config != null) {
416
+ var locale;
417
+ if (locales[name] != null) {
418
+ config = mergeConfigs(locales[name]._config, config);
419
+ }
420
+ locale = new Locale(config);
421
+ locale.parentLocale = locales[name];
422
+ locales[name] = locale;
423
+
424
+ // backwards compat for now: also set the locale
425
+ locale_locales__getSetGlobalLocale(name);
426
+ } else {
427
+ // pass null for config to unupdate, useful for tests
428
+ if (locales[name] != null) {
429
+ if (locales[name].parentLocale != null) {
430
+ locales[name] = locales[name].parentLocale;
431
+ } else if (locales[name] != null) {
432
+ delete locales[name];
433
+ }
434
+ }
435
+ }
436
+ return locales[name];
437
+ }
438
+
439
+ // returns locale data
440
+ function locale_locales__getLocale (key) {
441
+ var locale;
442
+
443
+ if (key && key._locale && key._locale._abbr) {
444
+ key = key._locale._abbr;
445
+ }
446
+
447
+ if (!key) {
448
+ return globalLocale;
449
+ }
450
+
451
+ if (!isArray(key)) {
452
+ //short-circuit everything else
453
+ locale = loadLocale(key);
454
+ if (locale) {
455
+ return locale;
456
+ }
457
+ key = [key];
458
+ }
459
+
460
+ return chooseLocale(key);
461
+ }
462
+
463
+ function locale_locales__listLocales() {
464
+ return Object.keys(locales);
465
+ }
466
+
467
+ var aliases = {};
468
+
469
+ function addUnitAlias (unit, shorthand) {
470
+ var lowerCase = unit.toLowerCase();
471
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
472
+ }
473
+
474
+ function normalizeUnits(units) {
475
+ return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
476
+ }
477
+
478
+ function normalizeObjectUnits(inputObject) {
479
+ var normalizedInput = {},
480
+ normalizedProp,
481
+ prop;
482
+
483
+ for (prop in inputObject) {
484
+ if (hasOwnProp(inputObject, prop)) {
485
+ normalizedProp = normalizeUnits(prop);
486
+ if (normalizedProp) {
487
+ normalizedInput[normalizedProp] = inputObject[prop];
488
+ }
489
+ }
490
+ }
491
+
492
+ return normalizedInput;
493
+ }
494
+
495
+ function makeGetSet (unit, keepTime) {
496
+ return function (value) {
497
+ if (value != null) {
498
+ get_set__set(this, unit, value);
499
+ utils_hooks__hooks.updateOffset(this, keepTime);
500
+ return this;
501
+ } else {
502
+ return get_set__get(this, unit);
503
+ }
504
+ };
505
+ }
506
+
507
+ function get_set__get (mom, unit) {
508
+ return mom.isValid() ?
509
+ mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
510
+ }
511
+
512
+ function get_set__set (mom, unit, value) {
513
+ if (mom.isValid()) {
514
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
515
+ }
516
+ }
517
+
518
+ // MOMENTS
519
+
520
+ function getSet (units, value) {
521
+ var unit;
522
+ if (typeof units === 'object') {
523
+ for (unit in units) {
524
+ this.set(unit, units[unit]);
525
+ }
526
+ } else {
527
+ units = normalizeUnits(units);
528
+ if (isFunction(this[units])) {
529
+ return this[units](value);
530
+ }
531
+ }
532
+ return this;
533
+ }
534
+
535
+ function zeroFill(number, targetLength, forceSign) {
536
+ var absNumber = '' + Math.abs(number),
537
+ zerosToFill = targetLength - absNumber.length,
538
+ sign = number >= 0;
539
+ return (sign ? (forceSign ? '+' : '') : '-') +
540
+ Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
541
+ }
542
+
543
+ var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
544
+
545
+ var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
546
+
547
+ var formatFunctions = {};
548
+
549
+ var formatTokenFunctions = {};
550
+
551
+ // token: 'M'
552
+ // padded: ['MM', 2]
553
+ // ordinal: 'Mo'
554
+ // callback: function () { this.month() + 1 }
555
+ function addFormatToken (token, padded, ordinal, callback) {
556
+ var func = callback;
557
+ if (typeof callback === 'string') {
558
+ func = function () {
559
+ return this[callback]();
560
+ };
561
+ }
562
+ if (token) {
563
+ formatTokenFunctions[token] = func;
564
+ }
565
+ if (padded) {
566
+ formatTokenFunctions[padded[0]] = function () {
567
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
568
+ };
569
+ }
570
+ if (ordinal) {
571
+ formatTokenFunctions[ordinal] = function () {
572
+ return this.localeData().ordinal(func.apply(this, arguments), token);
573
+ };
574
+ }
575
+ }
576
+
577
+ function removeFormattingTokens(input) {
578
+ if (input.match(/\[[\s\S]/)) {
579
+ return input.replace(/^\[|\]$/g, '');
580
+ }
581
+ return input.replace(/\\/g, '');
582
+ }
583
+
584
+ function makeFormatFunction(format) {
585
+ var array = format.match(formattingTokens), i, length;
586
+
587
+ for (i = 0, length = array.length; i < length; i++) {
588
+ if (formatTokenFunctions[array[i]]) {
589
+ array[i] = formatTokenFunctions[array[i]];
590
+ } else {
591
+ array[i] = removeFormattingTokens(array[i]);
592
+ }
593
+ }
594
+
595
+ return function (mom) {
596
+ var output = '';
597
+ for (i = 0; i < length; i++) {
598
+ output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
599
+ }
600
+ return output;
601
+ };
602
+ }
603
+
604
+ // format date using native date object
605
+ function formatMoment(m, format) {
606
+ if (!m.isValid()) {
607
+ return m.localeData().invalidDate();
608
+ }
609
+
610
+ format = expandFormat(format, m.localeData());
611
+ formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
612
+
613
+ return formatFunctions[format](m);
614
+ }
615
+
616
+ function expandFormat(format, locale) {
617
+ var i = 5;
618
+
619
+ function replaceLongDateFormatTokens(input) {
620
+ return locale.longDateFormat(input) || input;
621
+ }
622
+
623
+ localFormattingTokens.lastIndex = 0;
624
+ while (i >= 0 && localFormattingTokens.test(format)) {
625
+ format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
626
+ localFormattingTokens.lastIndex = 0;
627
+ i -= 1;
628
+ }
629
+
630
+ return format;
631
+ }
632
+
633
+ var match1 = /\d/; // 0 - 9
634
+ var match2 = /\d\d/; // 00 - 99
635
+ var match3 = /\d{3}/; // 000 - 999
636
+ var match4 = /\d{4}/; // 0000 - 9999
637
+ var match6 = /[+-]?\d{6}/; // -999999 - 999999
638
+ var match1to2 = /\d\d?/; // 0 - 99
639
+ var match3to4 = /\d\d\d\d?/; // 999 - 9999
640
+ var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
641
+ var match1to3 = /\d{1,3}/; // 0 - 999
642
+ var match1to4 = /\d{1,4}/; // 0 - 9999
643
+ var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
644
+
645
+ var matchUnsigned = /\d+/; // 0 - inf
646
+ var matchSigned = /[+-]?\d+/; // -inf - inf
647
+
648
+ var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
649
+ var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
650
+
651
+ var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
652
+
653
+ // any word (or two) characters or numbers including two/three word month in arabic.
654
+ // includes scottish gaelic two word and hyphenated months
655
+ var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
656
+
657
+
658
+ var regexes = {};
659
+
660
+ function addRegexToken (token, regex, strictRegex) {
661
+ regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
662
+ return (isStrict && strictRegex) ? strictRegex : regex;
663
+ };
664
+ }
665
+
666
+ function getParseRegexForToken (token, config) {
667
+ if (!hasOwnProp(regexes, token)) {
668
+ return new RegExp(unescapeFormat(token));
669
+ }
670
+
671
+ return regexes[token](config._strict, config._locale);
672
+ }
673
+
674
+ // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
675
+ function unescapeFormat(s) {
676
+ return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
677
+ return p1 || p2 || p3 || p4;
678
+ }));
679
+ }
680
+
681
+ function regexEscape(s) {
682
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
683
+ }
684
+
685
+ var tokens = {};
686
+
687
+ function addParseToken (token, callback) {
688
+ var i, func = callback;
689
+ if (typeof token === 'string') {
690
+ token = [token];
691
+ }
692
+ if (typeof callback === 'number') {
693
+ func = function (input, array) {
694
+ array[callback] = toInt(input);
695
+ };
696
+ }
697
+ for (i = 0; i < token.length; i++) {
698
+ tokens[token[i]] = func;
699
+ }
700
+ }
701
+
702
+ function addWeekParseToken (token, callback) {
703
+ addParseToken(token, function (input, array, config, token) {
704
+ config._w = config._w || {};
705
+ callback(input, config._w, config, token);
706
+ });
707
+ }
708
+
709
+ function addTimeToArrayFromToken(token, input, config) {
710
+ if (input != null && hasOwnProp(tokens, token)) {
711
+ tokens[token](input, config._a, config, token);
712
+ }
713
+ }
714
+
715
+ var YEAR = 0;
716
+ var MONTH = 1;
717
+ var DATE = 2;
718
+ var HOUR = 3;
719
+ var MINUTE = 4;
720
+ var SECOND = 5;
721
+ var MILLISECOND = 6;
722
+ var WEEK = 7;
723
+ var WEEKDAY = 8;
724
+
725
+ function daysInMonth(year, month) {
726
+ return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
727
+ }
728
+
729
+ // FORMATTING
730
+
731
+ addFormatToken('M', ['MM', 2], 'Mo', function () {
732
+ return this.month() + 1;
733
+ });
734
+
735
+ addFormatToken('MMM', 0, 0, function (format) {
736
+ return this.localeData().monthsShort(this, format);
737
+ });
738
+
739
+ addFormatToken('MMMM', 0, 0, function (format) {
740
+ return this.localeData().months(this, format);
741
+ });
742
+
743
+ // ALIASES
744
+
745
+ addUnitAlias('month', 'M');
746
+
747
+ // PARSING
748
+
749
+ addRegexToken('M', match1to2);
750
+ addRegexToken('MM', match1to2, match2);
751
+ addRegexToken('MMM', function (isStrict, locale) {
752
+ return locale.monthsShortRegex(isStrict);
753
+ });
754
+ addRegexToken('MMMM', function (isStrict, locale) {
755
+ return locale.monthsRegex(isStrict);
756
+ });
757
+
758
+ addParseToken(['M', 'MM'], function (input, array) {
759
+ array[MONTH] = toInt(input) - 1;
760
+ });
761
+
762
+ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
763
+ var month = config._locale.monthsParse(input, token, config._strict);
764
+ // if we didn't find a month name, mark the date as invalid.
765
+ if (month != null) {
766
+ array[MONTH] = month;
767
+ } else {
768
+ getParsingFlags(config).invalidMonth = input;
769
+ }
770
+ });
771
+
772
+ // LOCALES
773
+
774
+ var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;
775
+ var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
776
+ function localeMonths (m, format) {
777
+ return isArray(this._months) ? this._months[m.month()] :
778
+ this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
779
+ }
780
+
781
+ var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
782
+ function localeMonthsShort (m, format) {
783
+ return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
784
+ this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
785
+ }
786
+
787
+ function localeMonthsParse (monthName, format, strict) {
788
+ var i, mom, regex;
789
+
790
+ if (!this._monthsParse) {
791
+ this._monthsParse = [];
792
+ this._longMonthsParse = [];
793
+ this._shortMonthsParse = [];
794
+ }
795
+
796
+ for (i = 0; i < 12; i++) {
797
+ // make the regex if we don't have it already
798
+ mom = create_utc__createUTC([2000, i]);
799
+ if (strict && !this._longMonthsParse[i]) {
800
+ this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
801
+ this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
802
+ }
803
+ if (!strict && !this._monthsParse[i]) {
804
+ regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
805
+ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
806
+ }
807
+ // test the regex
808
+ if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
809
+ return i;
810
+ } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
811
+ return i;
812
+ } else if (!strict && this._monthsParse[i].test(monthName)) {
813
+ return i;
814
+ }
815
+ }
816
+ }
817
+
818
+ // MOMENTS
819
+
820
+ function setMonth (mom, value) {
821
+ var dayOfMonth;
822
+
823
+ if (!mom.isValid()) {
824
+ // No op
825
+ return mom;
826
+ }
827
+
828
+ if (typeof value === 'string') {
829
+ if (/^\d+$/.test(value)) {
830
+ value = toInt(value);
831
+ } else {
832
+ value = mom.localeData().monthsParse(value);
833
+ // TODO: Another silent failure?
834
+ if (typeof value !== 'number') {
835
+ return mom;
836
+ }
837
+ }
838
+ }
839
+
840
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
841
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
842
+ return mom;
843
+ }
844
+
845
+ function getSetMonth (value) {
846
+ if (value != null) {
847
+ setMonth(this, value);
848
+ utils_hooks__hooks.updateOffset(this, true);
849
+ return this;
850
+ } else {
851
+ return get_set__get(this, 'Month');
852
+ }
853
+ }
854
+
855
+ function getDaysInMonth () {
856
+ return daysInMonth(this.year(), this.month());
857
+ }
858
+
859
+ var defaultMonthsShortRegex = matchWord;
860
+ function monthsShortRegex (isStrict) {
861
+ if (this._monthsParseExact) {
862
+ if (!hasOwnProp(this, '_monthsRegex')) {
863
+ computeMonthsParse.call(this);
864
+ }
865
+ if (isStrict) {
866
+ return this._monthsShortStrictRegex;
867
+ } else {
868
+ return this._monthsShortRegex;
869
+ }
870
+ } else {
871
+ return this._monthsShortStrictRegex && isStrict ?
872
+ this._monthsShortStrictRegex : this._monthsShortRegex;
873
+ }
874
+ }
875
+
876
+ var defaultMonthsRegex = matchWord;
877
+ function monthsRegex (isStrict) {
878
+ if (this._monthsParseExact) {
879
+ if (!hasOwnProp(this, '_monthsRegex')) {
880
+ computeMonthsParse.call(this);
881
+ }
882
+ if (isStrict) {
883
+ return this._monthsStrictRegex;
884
+ } else {
885
+ return this._monthsRegex;
886
+ }
887
+ } else {
888
+ return this._monthsStrictRegex && isStrict ?
889
+ this._monthsStrictRegex : this._monthsRegex;
890
+ }
891
+ }
892
+
893
+ function computeMonthsParse () {
894
+ function cmpLenRev(a, b) {
895
+ return b.length - a.length;
896
+ }
897
+
898
+ var shortPieces = [], longPieces = [], mixedPieces = [],
899
+ i, mom;
900
+ for (i = 0; i < 12; i++) {
901
+ // make the regex if we don't have it already
902
+ mom = create_utc__createUTC([2000, i]);
903
+ shortPieces.push(this.monthsShort(mom, ''));
904
+ longPieces.push(this.months(mom, ''));
905
+ mixedPieces.push(this.months(mom, ''));
906
+ mixedPieces.push(this.monthsShort(mom, ''));
907
+ }
908
+ // Sorting makes sure if one month (or abbr) is a prefix of another it
909
+ // will match the longer piece.
910
+ shortPieces.sort(cmpLenRev);
911
+ longPieces.sort(cmpLenRev);
912
+ mixedPieces.sort(cmpLenRev);
913
+ for (i = 0; i < 12; i++) {
914
+ shortPieces[i] = regexEscape(shortPieces[i]);
915
+ longPieces[i] = regexEscape(longPieces[i]);
916
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
917
+ }
918
+
919
+ this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
920
+ this._monthsShortRegex = this._monthsRegex;
921
+ this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')$', 'i');
922
+ this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')$', 'i');
923
+ }
924
+
925
+ function checkOverflow (m) {
926
+ var overflow;
927
+ var a = m._a;
928
+
929
+ if (a && getParsingFlags(m).overflow === -2) {
930
+ overflow =
931
+ a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
932
+ a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
933
+ a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
934
+ a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
935
+ a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
936
+ a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
937
+ -1;
938
+
939
+ if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
940
+ overflow = DATE;
941
+ }
942
+ if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
943
+ overflow = WEEK;
944
+ }
945
+ if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
946
+ overflow = WEEKDAY;
947
+ }
948
+
949
+ getParsingFlags(m).overflow = overflow;
950
+ }
951
+
952
+ return m;
953
+ }
954
+
955
+ // iso 8601 regex
956
+ // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
957
+ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
958
+ var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
959
+
960
+ var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
961
+
962
+ var isoDates = [
963
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
964
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
965
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
966
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
967
+ ['YYYY-DDD', /\d{4}-\d{3}/],
968
+ ['YYYY-MM', /\d{4}-\d\d/, false],
969
+ ['YYYYYYMMDD', /[+-]\d{10}/],
970
+ ['YYYYMMDD', /\d{8}/],
971
+ // YYYYMM is NOT allowed by the standard
972
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
973
+ ['GGGG[W]WW', /\d{4}W\d{2}/, false],
974
+ ['YYYYDDD', /\d{7}/]
975
+ ];
976
+
977
+ // iso time formats and regexes
978
+ var isoTimes = [
979
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
980
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
981
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
982
+ ['HH:mm', /\d\d:\d\d/],
983
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
984
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
985
+ ['HHmmss', /\d\d\d\d\d\d/],
986
+ ['HHmm', /\d\d\d\d/],
987
+ ['HH', /\d\d/]
988
+ ];
989
+
990
+ var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
991
+
992
+ // date from iso format
993
+ function configFromISO(config) {
994
+ var i, l,
995
+ string = config._i,
996
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
997
+ allowTime, dateFormat, timeFormat, tzFormat;
998
+
999
+ if (match) {
1000
+ getParsingFlags(config).iso = true;
1001
+
1002
+ for (i = 0, l = isoDates.length; i < l; i++) {
1003
+ if (isoDates[i][1].exec(match[1])) {
1004
+ dateFormat = isoDates[i][0];
1005
+ allowTime = isoDates[i][2] !== false;
1006
+ break;
1007
+ }
1008
+ }
1009
+ if (dateFormat == null) {
1010
+ config._isValid = false;
1011
+ return;
1012
+ }
1013
+ if (match[3]) {
1014
+ for (i = 0, l = isoTimes.length; i < l; i++) {
1015
+ if (isoTimes[i][1].exec(match[3])) {
1016
+ // match[2] should be 'T' or space
1017
+ timeFormat = (match[2] || ' ') + isoTimes[i][0];
1018
+ break;
1019
+ }
1020
+ }
1021
+ if (timeFormat == null) {
1022
+ config._isValid = false;
1023
+ return;
1024
+ }
1025
+ }
1026
+ if (!allowTime && timeFormat != null) {
1027
+ config._isValid = false;
1028
+ return;
1029
+ }
1030
+ if (match[4]) {
1031
+ if (tzRegex.exec(match[4])) {
1032
+ tzFormat = 'Z';
1033
+ } else {
1034
+ config._isValid = false;
1035
+ return;
1036
+ }
1037
+ }
1038
+ config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
1039
+ configFromStringAndFormat(config);
1040
+ } else {
1041
+ config._isValid = false;
1042
+ }
1043
+ }
1044
+
1045
+ // date from iso format or fallback
1046
+ function configFromString(config) {
1047
+ var matched = aspNetJsonRegex.exec(config._i);
1048
+
1049
+ if (matched !== null) {
1050
+ config._d = new Date(+matched[1]);
1051
+ return;
1052
+ }
1053
+
1054
+ configFromISO(config);
1055
+ if (config._isValid === false) {
1056
+ delete config._isValid;
1057
+ utils_hooks__hooks.createFromInputFallback(config);
1058
+ }
1059
+ }
1060
+
1061
+ utils_hooks__hooks.createFromInputFallback = deprecate(
1062
+ 'moment construction falls back to js Date. This is ' +
1063
+ 'discouraged and will be removed in upcoming major ' +
1064
+ 'release. Please refer to ' +
1065
+ 'https://github.com/moment/moment/issues/1407 for more info.',
1066
+ function (config) {
1067
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
1068
+ }
1069
+ );
1070
+
1071
+ function createDate (y, m, d, h, M, s, ms) {
1072
+ //can't just apply() to create a date:
1073
+ //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
1074
+ var date = new Date(y, m, d, h, M, s, ms);
1075
+
1076
+ //the date constructor remaps years 0-99 to 1900-1999
1077
+ if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
1078
+ date.setFullYear(y);
1079
+ }
1080
+ return date;
1081
+ }
1082
+
1083
+ function createUTCDate (y) {
1084
+ var date = new Date(Date.UTC.apply(null, arguments));
1085
+
1086
+ //the Date.UTC function remaps years 0-99 to 1900-1999
1087
+ if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
1088
+ date.setUTCFullYear(y);
1089
+ }
1090
+ return date;
1091
+ }
1092
+
1093
+ // FORMATTING
1094
+
1095
+ addFormatToken('Y', 0, 0, function () {
1096
+ var y = this.year();
1097
+ return y <= 9999 ? '' + y : '+' + y;
1098
+ });
1099
+
1100
+ addFormatToken(0, ['YY', 2], 0, function () {
1101
+ return this.year() % 100;
1102
+ });
1103
+
1104
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
1105
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
1106
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1107
+
1108
+ // ALIASES
1109
+
1110
+ addUnitAlias('year', 'y');
1111
+
1112
+ // PARSING
1113
+
1114
+ addRegexToken('Y', matchSigned);
1115
+ addRegexToken('YY', match1to2, match2);
1116
+ addRegexToken('YYYY', match1to4, match4);
1117
+ addRegexToken('YYYYY', match1to6, match6);
1118
+ addRegexToken('YYYYYY', match1to6, match6);
1119
+
1120
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1121
+ addParseToken('YYYY', function (input, array) {
1122
+ array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);
1123
+ });
1124
+ addParseToken('YY', function (input, array) {
1125
+ array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);
1126
+ });
1127
+ addParseToken('Y', function (input, array) {
1128
+ array[YEAR] = parseInt(input, 10);
1129
+ });
1130
+
1131
+ // HELPERS
1132
+
1133
+ function daysInYear(year) {
1134
+ return isLeapYear(year) ? 366 : 365;
1135
+ }
1136
+
1137
+ function isLeapYear(year) {
1138
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
1139
+ }
1140
+
1141
+ // HOOKS
1142
+
1143
+ utils_hooks__hooks.parseTwoDigitYear = function (input) {
1144
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1145
+ };
1146
+
1147
+ // MOMENTS
1148
+
1149
+ var getSetYear = makeGetSet('FullYear', false);
1150
+
1151
+ function getIsLeapYear () {
1152
+ return isLeapYear(this.year());
1153
+ }
1154
+
1155
+ // start-of-first-week - start-of-year
1156
+ function firstWeekOffset(year, dow, doy) {
1157
+ var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1158
+ fwd = 7 + dow - doy,
1159
+ // first-week day local weekday -- which local weekday is fwd
1160
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1161
+
1162
+ return -fwdlw + fwd - 1;
1163
+ }
1164
+
1165
+ //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1166
+ function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1167
+ var localWeekday = (7 + weekday - dow) % 7,
1168
+ weekOffset = firstWeekOffset(year, dow, doy),
1169
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1170
+ resYear, resDayOfYear;
1171
+
1172
+ if (dayOfYear <= 0) {
1173
+ resYear = year - 1;
1174
+ resDayOfYear = daysInYear(resYear) + dayOfYear;
1175
+ } else if (dayOfYear > daysInYear(year)) {
1176
+ resYear = year + 1;
1177
+ resDayOfYear = dayOfYear - daysInYear(year);
1178
+ } else {
1179
+ resYear = year;
1180
+ resDayOfYear = dayOfYear;
1181
+ }
1182
+
1183
+ return {
1184
+ year: resYear,
1185
+ dayOfYear: resDayOfYear
1186
+ };
1187
+ }
1188
+
1189
+ function weekOfYear(mom, dow, doy) {
1190
+ var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1191
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1192
+ resWeek, resYear;
1193
+
1194
+ if (week < 1) {
1195
+ resYear = mom.year() - 1;
1196
+ resWeek = week + weeksInYear(resYear, dow, doy);
1197
+ } else if (week > weeksInYear(mom.year(), dow, doy)) {
1198
+ resWeek = week - weeksInYear(mom.year(), dow, doy);
1199
+ resYear = mom.year() + 1;
1200
+ } else {
1201
+ resYear = mom.year();
1202
+ resWeek = week;
1203
+ }
1204
+
1205
+ return {
1206
+ week: resWeek,
1207
+ year: resYear
1208
+ };
1209
+ }
1210
+
1211
+ function weeksInYear(year, dow, doy) {
1212
+ var weekOffset = firstWeekOffset(year, dow, doy),
1213
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
1214
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
1215
+ }
1216
+
1217
+ // Pick the first defined of two or three arguments.
1218
+ function defaults(a, b, c) {
1219
+ if (a != null) {
1220
+ return a;
1221
+ }
1222
+ if (b != null) {
1223
+ return b;
1224
+ }
1225
+ return c;
1226
+ }
1227
+
1228
+ function currentDateArray(config) {
1229
+ // hooks is actually the exported moment object
1230
+ var nowValue = new Date(utils_hooks__hooks.now());
1231
+ if (config._useUTC) {
1232
+ return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
1233
+ }
1234
+ return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
1235
+ }
1236
+
1237
+ // convert an array to a date.
1238
+ // the array should mirror the parameters below
1239
+ // note: all values past the year are optional and will default to the lowest possible value.
1240
+ // [year, month, day , hour, minute, second, millisecond]
1241
+ function configFromArray (config) {
1242
+ var i, date, input = [], currentDate, yearToUse;
1243
+
1244
+ if (config._d) {
1245
+ return;
1246
+ }
1247
+
1248
+ currentDate = currentDateArray(config);
1249
+
1250
+ //compute day of the year from weeks and weekdays
1251
+ if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
1252
+ dayOfYearFromWeekInfo(config);
1253
+ }
1254
+
1255
+ //if the day of the year is set, figure out what it is
1256
+ if (config._dayOfYear) {
1257
+ yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
1258
+
1259
+ if (config._dayOfYear > daysInYear(yearToUse)) {
1260
+ getParsingFlags(config)._overflowDayOfYear = true;
1261
+ }
1262
+
1263
+ date = createUTCDate(yearToUse, 0, config._dayOfYear);
1264
+ config._a[MONTH] = date.getUTCMonth();
1265
+ config._a[DATE] = date.getUTCDate();
1266
+ }
1267
+
1268
+ // Default to current date.
1269
+ // * if no year, month, day of month are given, default to today
1270
+ // * if day of month is given, default month and year
1271
+ // * if month is given, default only year
1272
+ // * if year is given, don't default anything
1273
+ for (i = 0; i < 3 && config._a[i] == null; ++i) {
1274
+ config._a[i] = input[i] = currentDate[i];
1275
+ }
1276
+
1277
+ // Zero out whatever was not defaulted, including time
1278
+ for (; i < 7; i++) {
1279
+ config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
1280
+ }
1281
+
1282
+ // Check for 24:00:00.000
1283
+ if (config._a[HOUR] === 24 &&
1284
+ config._a[MINUTE] === 0 &&
1285
+ config._a[SECOND] === 0 &&
1286
+ config._a[MILLISECOND] === 0) {
1287
+ config._nextDay = true;
1288
+ config._a[HOUR] = 0;
1289
+ }
1290
+
1291
+ config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
1292
+ // Apply timezone offset from input. The actual utcOffset can be changed
1293
+ // with parseZone.
1294
+ if (config._tzm != null) {
1295
+ config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
1296
+ }
1297
+
1298
+ if (config._nextDay) {
1299
+ config._a[HOUR] = 24;
1300
+ }
1301
+ }
1302
+
1303
+ function dayOfYearFromWeekInfo(config) {
1304
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
1305
+
1306
+ w = config._w;
1307
+ if (w.GG != null || w.W != null || w.E != null) {
1308
+ dow = 1;
1309
+ doy = 4;
1310
+
1311
+ // TODO: We need to take the current isoWeekYear, but that depends on
1312
+ // how we interpret now (local, utc, fixed offset). So create
1313
+ // a now version of current config (take local/utc/offset flags, and
1314
+ // create now).
1315
+ weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);
1316
+ week = defaults(w.W, 1);
1317
+ weekday = defaults(w.E, 1);
1318
+ if (weekday < 1 || weekday > 7) {
1319
+ weekdayOverflow = true;
1320
+ }
1321
+ } else {
1322
+ dow = config._locale._week.dow;
1323
+ doy = config._locale._week.doy;
1324
+
1325
+ weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);
1326
+ week = defaults(w.w, 1);
1327
+
1328
+ if (w.d != null) {
1329
+ // weekday -- low day numbers are considered next week
1330
+ weekday = w.d;
1331
+ if (weekday < 0 || weekday > 6) {
1332
+ weekdayOverflow = true;
1333
+ }
1334
+ } else if (w.e != null) {
1335
+ // local weekday -- counting starts from begining of week
1336
+ weekday = w.e + dow;
1337
+ if (w.e < 0 || w.e > 6) {
1338
+ weekdayOverflow = true;
1339
+ }
1340
+ } else {
1341
+ // default to begining of week
1342
+ weekday = dow;
1343
+ }
1344
+ }
1345
+ if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
1346
+ getParsingFlags(config)._overflowWeeks = true;
1347
+ } else if (weekdayOverflow != null) {
1348
+ getParsingFlags(config)._overflowWeekday = true;
1349
+ } else {
1350
+ temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
1351
+ config._a[YEAR] = temp.year;
1352
+ config._dayOfYear = temp.dayOfYear;
1353
+ }
1354
+ }
1355
+
1356
+ // constant that refers to the ISO standard
1357
+ utils_hooks__hooks.ISO_8601 = function () {};
1358
+
1359
+ // date from string and format string
1360
+ function configFromStringAndFormat(config) {
1361
+ // TODO: Move this to another part of the creation flow to prevent circular deps
1362
+ if (config._f === utils_hooks__hooks.ISO_8601) {
1363
+ configFromISO(config);
1364
+ return;
1365
+ }
1366
+
1367
+ config._a = [];
1368
+ getParsingFlags(config).empty = true;
1369
+
1370
+ // This array is used to make a Date, either with `new Date` or `Date.UTC`
1371
+ var string = '' + config._i,
1372
+ i, parsedInput, tokens, token, skipped,
1373
+ stringLength = string.length,
1374
+ totalParsedInputLength = 0;
1375
+
1376
+ tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
1377
+
1378
+ for (i = 0; i < tokens.length; i++) {
1379
+ token = tokens[i];
1380
+ parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
1381
+ // console.log('token', token, 'parsedInput', parsedInput,
1382
+ // 'regex', getParseRegexForToken(token, config));
1383
+ if (parsedInput) {
1384
+ skipped = string.substr(0, string.indexOf(parsedInput));
1385
+ if (skipped.length > 0) {
1386
+ getParsingFlags(config).unusedInput.push(skipped);
1387
+ }
1388
+ string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
1389
+ totalParsedInputLength += parsedInput.length;
1390
+ }
1391
+ // don't parse if it's not a known token
1392
+ if (formatTokenFunctions[token]) {
1393
+ if (parsedInput) {
1394
+ getParsingFlags(config).empty = false;
1395
+ }
1396
+ else {
1397
+ getParsingFlags(config).unusedTokens.push(token);
1398
+ }
1399
+ addTimeToArrayFromToken(token, parsedInput, config);
1400
+ }
1401
+ else if (config._strict && !parsedInput) {
1402
+ getParsingFlags(config).unusedTokens.push(token);
1403
+ }
1404
+ }
1405
+
1406
+ // add remaining unparsed input length to the string
1407
+ getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
1408
+ if (string.length > 0) {
1409
+ getParsingFlags(config).unusedInput.push(string);
1410
+ }
1411
+
1412
+ // clear _12h flag if hour is <= 12
1413
+ if (getParsingFlags(config).bigHour === true &&
1414
+ config._a[HOUR] <= 12 &&
1415
+ config._a[HOUR] > 0) {
1416
+ getParsingFlags(config).bigHour = undefined;
1417
+ }
1418
+ // handle meridiem
1419
+ config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
1420
+
1421
+ configFromArray(config);
1422
+ checkOverflow(config);
1423
+ }
1424
+
1425
+
1426
+ function meridiemFixWrap (locale, hour, meridiem) {
1427
+ var isPm;
1428
+
1429
+ if (meridiem == null) {
1430
+ // nothing to do
1431
+ return hour;
1432
+ }
1433
+ if (locale.meridiemHour != null) {
1434
+ return locale.meridiemHour(hour, meridiem);
1435
+ } else if (locale.isPM != null) {
1436
+ // Fallback
1437
+ isPm = locale.isPM(meridiem);
1438
+ if (isPm && hour < 12) {
1439
+ hour += 12;
1440
+ }
1441
+ if (!isPm && hour === 12) {
1442
+ hour = 0;
1443
+ }
1444
+ return hour;
1445
+ } else {
1446
+ // this is not supposed to happen
1447
+ return hour;
1448
+ }
1449
+ }
1450
+
1451
+ // date from string and array of format strings
1452
+ function configFromStringAndArray(config) {
1453
+ var tempConfig,
1454
+ bestMoment,
1455
+
1456
+ scoreToBeat,
1457
+ i,
1458
+ currentScore;
1459
+
1460
+ if (config._f.length === 0) {
1461
+ getParsingFlags(config).invalidFormat = true;
1462
+ config._d = new Date(NaN);
1463
+ return;
1464
+ }
1465
+
1466
+ for (i = 0; i < config._f.length; i++) {
1467
+ currentScore = 0;
1468
+ tempConfig = copyConfig({}, config);
1469
+ if (config._useUTC != null) {
1470
+ tempConfig._useUTC = config._useUTC;
1471
+ }
1472
+ tempConfig._f = config._f[i];
1473
+ configFromStringAndFormat(tempConfig);
1474
+
1475
+ if (!valid__isValid(tempConfig)) {
1476
+ continue;
1477
+ }
1478
+
1479
+ // if there is any input that was not parsed add a penalty for that format
1480
+ currentScore += getParsingFlags(tempConfig).charsLeftOver;
1481
+
1482
+ //or tokens
1483
+ currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
1484
+
1485
+ getParsingFlags(tempConfig).score = currentScore;
1486
+
1487
+ if (scoreToBeat == null || currentScore < scoreToBeat) {
1488
+ scoreToBeat = currentScore;
1489
+ bestMoment = tempConfig;
1490
+ }
1491
+ }
1492
+
1493
+ extend(config, bestMoment || tempConfig);
1494
+ }
1495
+
1496
+ function configFromObject(config) {
1497
+ if (config._d) {
1498
+ return;
1499
+ }
1500
+
1501
+ var i = normalizeObjectUnits(config._i);
1502
+ config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
1503
+ return obj && parseInt(obj, 10);
1504
+ });
1505
+
1506
+ configFromArray(config);
1507
+ }
1508
+
1509
+ function createFromConfig (config) {
1510
+ var res = new Moment(checkOverflow(prepareConfig(config)));
1511
+ if (res._nextDay) {
1512
+ // Adding is smart enough around DST
1513
+ res.add(1, 'd');
1514
+ res._nextDay = undefined;
1515
+ }
1516
+
1517
+ return res;
1518
+ }
1519
+
1520
+ function prepareConfig (config) {
1521
+ var input = config._i,
1522
+ format = config._f;
1523
+
1524
+ config._locale = config._locale || locale_locales__getLocale(config._l);
1525
+
1526
+ if (input === null || (format === undefined && input === '')) {
1527
+ return valid__createInvalid({nullInput: true});
1528
+ }
1529
+
1530
+ if (typeof input === 'string') {
1531
+ config._i = input = config._locale.preparse(input);
1532
+ }
1533
+
1534
+ if (isMoment(input)) {
1535
+ return new Moment(checkOverflow(input));
1536
+ } else if (isArray(format)) {
1537
+ configFromStringAndArray(config);
1538
+ } else if (format) {
1539
+ configFromStringAndFormat(config);
1540
+ } else if (isDate(input)) {
1541
+ config._d = input;
1542
+ } else {
1543
+ configFromInput(config);
1544
+ }
1545
+
1546
+ if (!valid__isValid(config)) {
1547
+ config._d = null;
1548
+ }
1549
+
1550
+ return config;
1551
+ }
1552
+
1553
+ function configFromInput(config) {
1554
+ var input = config._i;
1555
+ if (input === undefined) {
1556
+ config._d = new Date(utils_hooks__hooks.now());
1557
+ } else if (isDate(input)) {
1558
+ config._d = new Date(+input);
1559
+ } else if (typeof input === 'string') {
1560
+ configFromString(config);
1561
+ } else if (isArray(input)) {
1562
+ config._a = map(input.slice(0), function (obj) {
1563
+ return parseInt(obj, 10);
1564
+ });
1565
+ configFromArray(config);
1566
+ } else if (typeof(input) === 'object') {
1567
+ configFromObject(config);
1568
+ } else if (typeof(input) === 'number') {
1569
+ // from milliseconds
1570
+
1571
+ config._d = new Date(input);
1572
+ } else {
1573
+ utils_hooks__hooks.createFromInputFallback(config);
1574
+ }
1575
+ }
1576
+
1577
+ function createLocalOrUTC (input, format, locale, strict, isUTC) {
1578
+ var c = {};
1579
+
1580
+ if (typeof(locale) === 'boolean') {
1581
+ strict = locale;
1582
+ locale = undefined;
1583
+ }
1584
+ // object construction must be done this way.
1585
+ // https://github.com/moment/moment/issues/1423
1586
+ c._isAMomentObject = true;
1587
+ c._useUTC = c._isUTC = isUTC;
1588
+ c._l = locale;
1589
+ c._i = input;
1590
+ c._f = format;
1591
+ c._strict = strict;
1592
+
1593
+ return createFromConfig(c);
1594
+ }
1595
+
1596
+ function local__createLocal (input, format, locale, strict) {
1597
+ return createLocalOrUTC(input, format, locale, strict, false);
1598
+ }
1599
+
1600
+ var prototypeMin = deprecate(
1601
+ 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
1602
+ function () {
1603
+ var other = local__createLocal.apply(null, arguments);
1604
+ if (this.isValid() && other.isValid()) {
1605
+ return other < this ? this : other;
1606
+ } else {
1607
+ return valid__createInvalid();
1608
+ }
1609
+ }
1610
+ );
1611
+
1612
+ var prototypeMax = deprecate(
1613
+ 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
1614
+ function () {
1615
+ var other = local__createLocal.apply(null, arguments);
1616
+ if (this.isValid() && other.isValid()) {
1617
+ return other > this ? this : other;
1618
+ } else {
1619
+ return valid__createInvalid();
1620
+ }
1621
+ }
1622
+ );
1623
+
1624
+ // Pick a moment m from moments so that m[fn](other) is true for all
1625
+ // other. This relies on the function fn to be transitive.
1626
+ //
1627
+ // moments should either be an array of moment objects or an array, whose
1628
+ // first element is an array of moment objects.
1629
+ function pickBy(fn, moments) {
1630
+ var res, i;
1631
+ if (moments.length === 1 && isArray(moments[0])) {
1632
+ moments = moments[0];
1633
+ }
1634
+ if (!moments.length) {
1635
+ return local__createLocal();
1636
+ }
1637
+ res = moments[0];
1638
+ for (i = 1; i < moments.length; ++i) {
1639
+ if (!moments[i].isValid() || moments[i][fn](res)) {
1640
+ res = moments[i];
1641
+ }
1642
+ }
1643
+ return res;
1644
+ }
1645
+
1646
+ // TODO: Use [].sort instead?
1647
+ function min () {
1648
+ var args = [].slice.call(arguments, 0);
1649
+
1650
+ return pickBy('isBefore', args);
1651
+ }
1652
+
1653
+ function max () {
1654
+ var args = [].slice.call(arguments, 0);
1655
+
1656
+ return pickBy('isAfter', args);
1657
+ }
1658
+
1659
+ var now = function () {
1660
+ return Date.now ? Date.now() : +(new Date());
1661
+ };
1662
+
1663
+ function Duration (duration) {
1664
+ var normalizedInput = normalizeObjectUnits(duration),
1665
+ years = normalizedInput.year || 0,
1666
+ quarters = normalizedInput.quarter || 0,
1667
+ months = normalizedInput.month || 0,
1668
+ weeks = normalizedInput.week || 0,
1669
+ days = normalizedInput.day || 0,
1670
+ hours = normalizedInput.hour || 0,
1671
+ minutes = normalizedInput.minute || 0,
1672
+ seconds = normalizedInput.second || 0,
1673
+ milliseconds = normalizedInput.millisecond || 0;
1674
+
1675
+ // representation for dateAddRemove
1676
+ this._milliseconds = +milliseconds +
1677
+ seconds * 1e3 + // 1000
1678
+ minutes * 6e4 + // 1000 * 60
1679
+ hours * 36e5; // 1000 * 60 * 60
1680
+ // Because of dateAddRemove treats 24 hours as different from a
1681
+ // day when working around DST, we need to store them separately
1682
+ this._days = +days +
1683
+ weeks * 7;
1684
+ // It is impossible translate months into days without knowing
1685
+ // which months you are are talking about, so we have to store
1686
+ // it separately.
1687
+ this._months = +months +
1688
+ quarters * 3 +
1689
+ years * 12;
1690
+
1691
+ this._data = {};
1692
+
1693
+ this._locale = locale_locales__getLocale();
1694
+
1695
+ this._bubble();
1696
+ }
1697
+
1698
+ function isDuration (obj) {
1699
+ return obj instanceof Duration;
1700
+ }
1701
+
1702
+ // FORMATTING
1703
+
1704
+ function offset (token, separator) {
1705
+ addFormatToken(token, 0, 0, function () {
1706
+ var offset = this.utcOffset();
1707
+ var sign = '+';
1708
+ if (offset < 0) {
1709
+ offset = -offset;
1710
+ sign = '-';
1711
+ }
1712
+ return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
1713
+ });
1714
+ }
1715
+
1716
+ offset('Z', ':');
1717
+ offset('ZZ', '');
1718
+
1719
+ // PARSING
1720
+
1721
+ addRegexToken('Z', matchShortOffset);
1722
+ addRegexToken('ZZ', matchShortOffset);
1723
+ addParseToken(['Z', 'ZZ'], function (input, array, config) {
1724
+ config._useUTC = true;
1725
+ config._tzm = offsetFromString(matchShortOffset, input);
1726
+ });
1727
+
1728
+ // HELPERS
1729
+
1730
+ // timezone chunker
1731
+ // '+10:00' > ['10', '00']
1732
+ // '-1530' > ['-15', '30']
1733
+ var chunkOffset = /([\+\-]|\d\d)/gi;
1734
+
1735
+ function offsetFromString(matcher, string) {
1736
+ var matches = ((string || '').match(matcher) || []);
1737
+ var chunk = matches[matches.length - 1] || [];
1738
+ var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
1739
+ var minutes = +(parts[1] * 60) + toInt(parts[2]);
1740
+
1741
+ return parts[0] === '+' ? minutes : -minutes;
1742
+ }
1743
+
1744
+ // Return a moment from input, that is local/utc/zone equivalent to model.
1745
+ function cloneWithOffset(input, model) {
1746
+ var res, diff;
1747
+ if (model._isUTC) {
1748
+ res = model.clone();
1749
+ diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);
1750
+ // Use low-level api, because this fn is low-level api.
1751
+ res._d.setTime(+res._d + diff);
1752
+ utils_hooks__hooks.updateOffset(res, false);
1753
+ return res;
1754
+ } else {
1755
+ return local__createLocal(input).local();
1756
+ }
1757
+ }
1758
+
1759
+ function getDateOffset (m) {
1760
+ // On Firefox.24 Date#getTimezoneOffset returns a floating point.
1761
+ // https://github.com/moment/moment/pull/1871
1762
+ return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
1763
+ }
1764
+
1765
+ // HOOKS
1766
+
1767
+ // This function will be called whenever a moment is mutated.
1768
+ // It is intended to keep the offset in sync with the timezone.
1769
+ utils_hooks__hooks.updateOffset = function () {};
1770
+
1771
+ // MOMENTS
1772
+
1773
+ // keepLocalTime = true means only change the timezone, without
1774
+ // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
1775
+ // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
1776
+ // +0200, so we adjust the time as needed, to be valid.
1777
+ //
1778
+ // Keeping the time actually adds/subtracts (one hour)
1779
+ // from the actual represented time. That is why we call updateOffset
1780
+ // a second time. In case it wants us to change the offset again
1781
+ // _changeInProgress == true case, then we have to adjust, because
1782
+ // there is no such time in the given timezone.
1783
+ function getSetOffset (input, keepLocalTime) {
1784
+ var offset = this._offset || 0,
1785
+ localAdjust;
1786
+ if (!this.isValid()) {
1787
+ return input != null ? this : NaN;
1788
+ }
1789
+ if (input != null) {
1790
+ if (typeof input === 'string') {
1791
+ input = offsetFromString(matchShortOffset, input);
1792
+ } else if (Math.abs(input) < 16) {
1793
+ input = input * 60;
1794
+ }
1795
+ if (!this._isUTC && keepLocalTime) {
1796
+ localAdjust = getDateOffset(this);
1797
+ }
1798
+ this._offset = input;
1799
+ this._isUTC = true;
1800
+ if (localAdjust != null) {
1801
+ this.add(localAdjust, 'm');
1802
+ }
1803
+ if (offset !== input) {
1804
+ if (!keepLocalTime || this._changeInProgress) {
1805
+ add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);
1806
+ } else if (!this._changeInProgress) {
1807
+ this._changeInProgress = true;
1808
+ utils_hooks__hooks.updateOffset(this, true);
1809
+ this._changeInProgress = null;
1810
+ }
1811
+ }
1812
+ return this;
1813
+ } else {
1814
+ return this._isUTC ? offset : getDateOffset(this);
1815
+ }
1816
+ }
1817
+
1818
+ function getSetZone (input, keepLocalTime) {
1819
+ if (input != null) {
1820
+ if (typeof input !== 'string') {
1821
+ input = -input;
1822
+ }
1823
+
1824
+ this.utcOffset(input, keepLocalTime);
1825
+
1826
+ return this;
1827
+ } else {
1828
+ return -this.utcOffset();
1829
+ }
1830
+ }
1831
+
1832
+ function setOffsetToUTC (keepLocalTime) {
1833
+ return this.utcOffset(0, keepLocalTime);
1834
+ }
1835
+
1836
+ function setOffsetToLocal (keepLocalTime) {
1837
+ if (this._isUTC) {
1838
+ this.utcOffset(0, keepLocalTime);
1839
+ this._isUTC = false;
1840
+
1841
+ if (keepLocalTime) {
1842
+ this.subtract(getDateOffset(this), 'm');
1843
+ }
1844
+ }
1845
+ return this;
1846
+ }
1847
+
1848
+ function setOffsetToParsedOffset () {
1849
+ if (this._tzm) {
1850
+ this.utcOffset(this._tzm);
1851
+ } else if (typeof this._i === 'string') {
1852
+ this.utcOffset(offsetFromString(matchOffset, this._i));
1853
+ }
1854
+ return this;
1855
+ }
1856
+
1857
+ function hasAlignedHourOffset (input) {
1858
+ if (!this.isValid()) {
1859
+ return false;
1860
+ }
1861
+ input = input ? local__createLocal(input).utcOffset() : 0;
1862
+
1863
+ return (this.utcOffset() - input) % 60 === 0;
1864
+ }
1865
+
1866
+ function isDaylightSavingTime () {
1867
+ return (
1868
+ this.utcOffset() > this.clone().month(0).utcOffset() ||
1869
+ this.utcOffset() > this.clone().month(5).utcOffset()
1870
+ );
1871
+ }
1872
+
1873
+ function isDaylightSavingTimeShifted () {
1874
+ if (!isUndefined(this._isDSTShifted)) {
1875
+ return this._isDSTShifted;
1876
+ }
1877
+
1878
+ var c = {};
1879
+
1880
+ copyConfig(c, this);
1881
+ c = prepareConfig(c);
1882
+
1883
+ if (c._a) {
1884
+ var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);
1885
+ this._isDSTShifted = this.isValid() &&
1886
+ compareArrays(c._a, other.toArray()) > 0;
1887
+ } else {
1888
+ this._isDSTShifted = false;
1889
+ }
1890
+
1891
+ return this._isDSTShifted;
1892
+ }
1893
+
1894
+ function isLocal () {
1895
+ return this.isValid() ? !this._isUTC : false;
1896
+ }
1897
+
1898
+ function isUtcOffset () {
1899
+ return this.isValid() ? this._isUTC : false;
1900
+ }
1901
+
1902
+ function isUtc () {
1903
+ return this.isValid() ? this._isUTC && this._offset === 0 : false;
1904
+ }
1905
+
1906
+ // ASP.NET json date format regex
1907
+ var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;
1908
+
1909
+ // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
1910
+ // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
1911
+ // and further modified to allow for strings containing both week and day
1912
+ var isoRegex = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;
1913
+
1914
+ function create__createDuration (input, key) {
1915
+ var duration = input,
1916
+ // matching against regexp is expensive, do it on demand
1917
+ match = null,
1918
+ sign,
1919
+ ret,
1920
+ diffRes;
1921
+
1922
+ if (isDuration(input)) {
1923
+ duration = {
1924
+ ms : input._milliseconds,
1925
+ d : input._days,
1926
+ M : input._months
1927
+ };
1928
+ } else if (typeof input === 'number') {
1929
+ duration = {};
1930
+ if (key) {
1931
+ duration[key] = input;
1932
+ } else {
1933
+ duration.milliseconds = input;
1934
+ }
1935
+ } else if (!!(match = aspNetRegex.exec(input))) {
1936
+ sign = (match[1] === '-') ? -1 : 1;
1937
+ duration = {
1938
+ y : 0,
1939
+ d : toInt(match[DATE]) * sign,
1940
+ h : toInt(match[HOUR]) * sign,
1941
+ m : toInt(match[MINUTE]) * sign,
1942
+ s : toInt(match[SECOND]) * sign,
1943
+ ms : toInt(match[MILLISECOND]) * sign
1944
+ };
1945
+ } else if (!!(match = isoRegex.exec(input))) {
1946
+ sign = (match[1] === '-') ? -1 : 1;
1947
+ duration = {
1948
+ y : parseIso(match[2], sign),
1949
+ M : parseIso(match[3], sign),
1950
+ w : parseIso(match[4], sign),
1951
+ d : parseIso(match[5], sign),
1952
+ h : parseIso(match[6], sign),
1953
+ m : parseIso(match[7], sign),
1954
+ s : parseIso(match[8], sign)
1955
+ };
1956
+ } else if (duration == null) {// checks for null or undefined
1957
+ duration = {};
1958
+ } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
1959
+ diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));
1960
+
1961
+ duration = {};
1962
+ duration.ms = diffRes.milliseconds;
1963
+ duration.M = diffRes.months;
1964
+ }
1965
+
1966
+ ret = new Duration(duration);
1967
+
1968
+ if (isDuration(input) && hasOwnProp(input, '_locale')) {
1969
+ ret._locale = input._locale;
1970
+ }
1971
+
1972
+ return ret;
1973
+ }
1974
+
1975
+ create__createDuration.fn = Duration.prototype;
1976
+
1977
+ function parseIso (inp, sign) {
1978
+ // We'd normally use ~~inp for this, but unfortunately it also
1979
+ // converts floats to ints.
1980
+ // inp may be undefined, so careful calling replace on it.
1981
+ var res = inp && parseFloat(inp.replace(',', '.'));
1982
+ // apply sign while we're at it
1983
+ return (isNaN(res) ? 0 : res) * sign;
1984
+ }
1985
+
1986
+ function positiveMomentsDifference(base, other) {
1987
+ var res = {milliseconds: 0, months: 0};
1988
+
1989
+ res.months = other.month() - base.month() +
1990
+ (other.year() - base.year()) * 12;
1991
+ if (base.clone().add(res.months, 'M').isAfter(other)) {
1992
+ --res.months;
1993
+ }
1994
+
1995
+ res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
1996
+
1997
+ return res;
1998
+ }
1999
+
2000
+ function momentsDifference(base, other) {
2001
+ var res;
2002
+ if (!(base.isValid() && other.isValid())) {
2003
+ return {milliseconds: 0, months: 0};
2004
+ }
2005
+
2006
+ other = cloneWithOffset(other, base);
2007
+ if (base.isBefore(other)) {
2008
+ res = positiveMomentsDifference(base, other);
2009
+ } else {
2010
+ res = positiveMomentsDifference(other, base);
2011
+ res.milliseconds = -res.milliseconds;
2012
+ res.months = -res.months;
2013
+ }
2014
+
2015
+ return res;
2016
+ }
2017
+
2018
+ function absRound (number) {
2019
+ if (number < 0) {
2020
+ return Math.round(-1 * number) * -1;
2021
+ } else {
2022
+ return Math.round(number);
2023
+ }
2024
+ }
2025
+
2026
+ // TODO: remove 'name' arg after deprecation is removed
2027
+ function createAdder(direction, name) {
2028
+ return function (val, period) {
2029
+ var dur, tmp;
2030
+ //invert the arguments, but complain about it
2031
+ if (period !== null && !isNaN(+period)) {
2032
+ deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
2033
+ tmp = val; val = period; period = tmp;
2034
+ }
2035
+
2036
+ val = typeof val === 'string' ? +val : val;
2037
+ dur = create__createDuration(val, period);
2038
+ add_subtract__addSubtract(this, dur, direction);
2039
+ return this;
2040
+ };
2041
+ }
2042
+
2043
+ function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {
2044
+ var milliseconds = duration._milliseconds,
2045
+ days = absRound(duration._days),
2046
+ months = absRound(duration._months);
2047
+
2048
+ if (!mom.isValid()) {
2049
+ // No op
2050
+ return;
2051
+ }
2052
+
2053
+ updateOffset = updateOffset == null ? true : updateOffset;
2054
+
2055
+ if (milliseconds) {
2056
+ mom._d.setTime(+mom._d + milliseconds * isAdding);
2057
+ }
2058
+ if (days) {
2059
+ get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);
2060
+ }
2061
+ if (months) {
2062
+ setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);
2063
+ }
2064
+ if (updateOffset) {
2065
+ utils_hooks__hooks.updateOffset(mom, days || months);
2066
+ }
2067
+ }
2068
+
2069
+ var add_subtract__add = createAdder(1, 'add');
2070
+ var add_subtract__subtract = createAdder(-1, 'subtract');
2071
+
2072
+ function moment_calendar__calendar (time, formats) {
2073
+ // We want to compare the start of today, vs this.
2074
+ // Getting start-of-today depends on whether we're local/utc/offset or not.
2075
+ var now = time || local__createLocal(),
2076
+ sod = cloneWithOffset(now, this).startOf('day'),
2077
+ diff = this.diff(sod, 'days', true),
2078
+ format = diff < -6 ? 'sameElse' :
2079
+ diff < -1 ? 'lastWeek' :
2080
+ diff < 0 ? 'lastDay' :
2081
+ diff < 1 ? 'sameDay' :
2082
+ diff < 2 ? 'nextDay' :
2083
+ diff < 7 ? 'nextWeek' : 'sameElse';
2084
+
2085
+ var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]);
2086
+
2087
+ return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));
2088
+ }
2089
+
2090
+ function clone () {
2091
+ return new Moment(this);
2092
+ }
2093
+
2094
+ function isAfter (input, units) {
2095
+ var localInput = isMoment(input) ? input : local__createLocal(input);
2096
+ if (!(this.isValid() && localInput.isValid())) {
2097
+ return false;
2098
+ }
2099
+ units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
2100
+ if (units === 'millisecond') {
2101
+ return +this > +localInput;
2102
+ } else {
2103
+ return +localInput < +this.clone().startOf(units);
2104
+ }
2105
+ }
2106
+
2107
+ function isBefore (input, units) {
2108
+ var localInput = isMoment(input) ? input : local__createLocal(input);
2109
+ if (!(this.isValid() && localInput.isValid())) {
2110
+ return false;
2111
+ }
2112
+ units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
2113
+ if (units === 'millisecond') {
2114
+ return +this < +localInput;
2115
+ } else {
2116
+ return +this.clone().endOf(units) < +localInput;
2117
+ }
2118
+ }
2119
+
2120
+ function isBetween (from, to, units) {
2121
+ return this.isAfter(from, units) && this.isBefore(to, units);
2122
+ }
2123
+
2124
+ function isSame (input, units) {
2125
+ var localInput = isMoment(input) ? input : local__createLocal(input),
2126
+ inputMs;
2127
+ if (!(this.isValid() && localInput.isValid())) {
2128
+ return false;
2129
+ }
2130
+ units = normalizeUnits(units || 'millisecond');
2131
+ if (units === 'millisecond') {
2132
+ return +this === +localInput;
2133
+ } else {
2134
+ inputMs = +localInput;
2135
+ return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
2136
+ }
2137
+ }
2138
+
2139
+ function isSameOrAfter (input, units) {
2140
+ return this.isSame(input, units) || this.isAfter(input,units);
2141
+ }
2142
+
2143
+ function isSameOrBefore (input, units) {
2144
+ return this.isSame(input, units) || this.isBefore(input,units);
2145
+ }
2146
+
2147
+ function diff (input, units, asFloat) {
2148
+ var that,
2149
+ zoneDelta,
2150
+ delta, output;
2151
+
2152
+ if (!this.isValid()) {
2153
+ return NaN;
2154
+ }
2155
+
2156
+ that = cloneWithOffset(input, this);
2157
+
2158
+ if (!that.isValid()) {
2159
+ return NaN;
2160
+ }
2161
+
2162
+ zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
2163
+
2164
+ units = normalizeUnits(units);
2165
+
2166
+ if (units === 'year' || units === 'month' || units === 'quarter') {
2167
+ output = monthDiff(this, that);
2168
+ if (units === 'quarter') {
2169
+ output = output / 3;
2170
+ } else if (units === 'year') {
2171
+ output = output / 12;
2172
+ }
2173
+ } else {
2174
+ delta = this - that;
2175
+ output = units === 'second' ? delta / 1e3 : // 1000
2176
+ units === 'minute' ? delta / 6e4 : // 1000 * 60
2177
+ units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
2178
+ units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
2179
+ units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
2180
+ delta;
2181
+ }
2182
+ return asFloat ? output : absFloor(output);
2183
+ }
2184
+
2185
+ function monthDiff (a, b) {
2186
+ // difference in months
2187
+ var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
2188
+ // b is in (anchor - 1 month, anchor + 1 month)
2189
+ anchor = a.clone().add(wholeMonthDiff, 'months'),
2190
+ anchor2, adjust;
2191
+
2192
+ if (b - anchor < 0) {
2193
+ anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
2194
+ // linear across the month
2195
+ adjust = (b - anchor) / (anchor - anchor2);
2196
+ } else {
2197
+ anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
2198
+ // linear across the month
2199
+ adjust = (b - anchor) / (anchor2 - anchor);
2200
+ }
2201
+
2202
+ return -(wholeMonthDiff + adjust);
2203
+ }
2204
+
2205
+ utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
2206
+
2207
+ function toString () {
2208
+ return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
2209
+ }
2210
+
2211
+ function moment_format__toISOString () {
2212
+ var m = this.clone().utc();
2213
+ if (0 < m.year() && m.year() <= 9999) {
2214
+ if (isFunction(Date.prototype.toISOString)) {
2215
+ // native implementation is ~50x faster, use it when we can
2216
+ return this.toDate().toISOString();
2217
+ } else {
2218
+ return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
2219
+ }
2220
+ } else {
2221
+ return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
2222
+ }
2223
+ }
2224
+
2225
+ function format (inputString) {
2226
+ var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);
2227
+ return this.localeData().postformat(output);
2228
+ }
2229
+
2230
+ function from (time, withoutSuffix) {
2231
+ if (this.isValid() &&
2232
+ ((isMoment(time) && time.isValid()) ||
2233
+ local__createLocal(time).isValid())) {
2234
+ return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
2235
+ } else {
2236
+ return this.localeData().invalidDate();
2237
+ }
2238
+ }
2239
+
2240
+ function fromNow (withoutSuffix) {
2241
+ return this.from(local__createLocal(), withoutSuffix);
2242
+ }
2243
+
2244
+ function to (time, withoutSuffix) {
2245
+ if (this.isValid() &&
2246
+ ((isMoment(time) && time.isValid()) ||
2247
+ local__createLocal(time).isValid())) {
2248
+ return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
2249
+ } else {
2250
+ return this.localeData().invalidDate();
2251
+ }
2252
+ }
2253
+
2254
+ function toNow (withoutSuffix) {
2255
+ return this.to(local__createLocal(), withoutSuffix);
2256
+ }
2257
+
2258
+ // If passed a locale key, it will set the locale for this
2259
+ // instance. Otherwise, it will return the locale configuration
2260
+ // variables for this instance.
2261
+ function locale (key) {
2262
+ var newLocaleData;
2263
+
2264
+ if (key === undefined) {
2265
+ return this._locale._abbr;
2266
+ } else {
2267
+ newLocaleData = locale_locales__getLocale(key);
2268
+ if (newLocaleData != null) {
2269
+ this._locale = newLocaleData;
2270
+ }
2271
+ return this;
2272
+ }
2273
+ }
2274
+
2275
+ var lang = deprecate(
2276
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
2277
+ function (key) {
2278
+ if (key === undefined) {
2279
+ return this.localeData();
2280
+ } else {
2281
+ return this.locale(key);
2282
+ }
2283
+ }
2284
+ );
2285
+
2286
+ function localeData () {
2287
+ return this._locale;
2288
+ }
2289
+
2290
+ function startOf (units) {
2291
+ units = normalizeUnits(units);
2292
+ // the following switch intentionally omits break keywords
2293
+ // to utilize falling through the cases.
2294
+ switch (units) {
2295
+ case 'year':
2296
+ this.month(0);
2297
+ /* falls through */
2298
+ case 'quarter':
2299
+ case 'month':
2300
+ this.date(1);
2301
+ /* falls through */
2302
+ case 'week':
2303
+ case 'isoWeek':
2304
+ case 'day':
2305
+ this.hours(0);
2306
+ /* falls through */
2307
+ case 'hour':
2308
+ this.minutes(0);
2309
+ /* falls through */
2310
+ case 'minute':
2311
+ this.seconds(0);
2312
+ /* falls through */
2313
+ case 'second':
2314
+ this.milliseconds(0);
2315
+ }
2316
+
2317
+ // weeks are a special case
2318
+ if (units === 'week') {
2319
+ this.weekday(0);
2320
+ }
2321
+ if (units === 'isoWeek') {
2322
+ this.isoWeekday(1);
2323
+ }
2324
+
2325
+ // quarters are also special
2326
+ if (units === 'quarter') {
2327
+ this.month(Math.floor(this.month() / 3) * 3);
2328
+ }
2329
+
2330
+ return this;
2331
+ }
2332
+
2333
+ function endOf (units) {
2334
+ units = normalizeUnits(units);
2335
+ if (units === undefined || units === 'millisecond') {
2336
+ return this;
2337
+ }
2338
+ return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
2339
+ }
2340
+
2341
+ function to_type__valueOf () {
2342
+ return +this._d - ((this._offset || 0) * 60000);
2343
+ }
2344
+
2345
+ function unix () {
2346
+ return Math.floor(+this / 1000);
2347
+ }
2348
+
2349
+ function toDate () {
2350
+ return this._offset ? new Date(+this) : this._d;
2351
+ }
2352
+
2353
+ function toArray () {
2354
+ var m = this;
2355
+ return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
2356
+ }
2357
+
2358
+ function toObject () {
2359
+ var m = this;
2360
+ return {
2361
+ years: m.year(),
2362
+ months: m.month(),
2363
+ date: m.date(),
2364
+ hours: m.hours(),
2365
+ minutes: m.minutes(),
2366
+ seconds: m.seconds(),
2367
+ milliseconds: m.milliseconds()
2368
+ };
2369
+ }
2370
+
2371
+ function toJSON () {
2372
+ // new Date(NaN).toJSON() === null
2373
+ return this.isValid() ? this.toISOString() : null;
2374
+ }
2375
+
2376
+ function moment_valid__isValid () {
2377
+ return valid__isValid(this);
2378
+ }
2379
+
2380
+ function parsingFlags () {
2381
+ return extend({}, getParsingFlags(this));
2382
+ }
2383
+
2384
+ function invalidAt () {
2385
+ return getParsingFlags(this).overflow;
2386
+ }
2387
+
2388
+ function creationData() {
2389
+ return {
2390
+ input: this._i,
2391
+ format: this._f,
2392
+ locale: this._locale,
2393
+ isUTC: this._isUTC,
2394
+ strict: this._strict
2395
+ };
2396
+ }
2397
+
2398
+ // FORMATTING
2399
+
2400
+ addFormatToken(0, ['gg', 2], 0, function () {
2401
+ return this.weekYear() % 100;
2402
+ });
2403
+
2404
+ addFormatToken(0, ['GG', 2], 0, function () {
2405
+ return this.isoWeekYear() % 100;
2406
+ });
2407
+
2408
+ function addWeekYearFormatToken (token, getter) {
2409
+ addFormatToken(0, [token, token.length], 0, getter);
2410
+ }
2411
+
2412
+ addWeekYearFormatToken('gggg', 'weekYear');
2413
+ addWeekYearFormatToken('ggggg', 'weekYear');
2414
+ addWeekYearFormatToken('GGGG', 'isoWeekYear');
2415
+ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
2416
+
2417
+ // ALIASES
2418
+
2419
+ addUnitAlias('weekYear', 'gg');
2420
+ addUnitAlias('isoWeekYear', 'GG');
2421
+
2422
+ // PARSING
2423
+
2424
+ addRegexToken('G', matchSigned);
2425
+ addRegexToken('g', matchSigned);
2426
+ addRegexToken('GG', match1to2, match2);
2427
+ addRegexToken('gg', match1to2, match2);
2428
+ addRegexToken('GGGG', match1to4, match4);
2429
+ addRegexToken('gggg', match1to4, match4);
2430
+ addRegexToken('GGGGG', match1to6, match6);
2431
+ addRegexToken('ggggg', match1to6, match6);
2432
+
2433
+ addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
2434
+ week[token.substr(0, 2)] = toInt(input);
2435
+ });
2436
+
2437
+ addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
2438
+ week[token] = utils_hooks__hooks.parseTwoDigitYear(input);
2439
+ });
2440
+
2441
+ // MOMENTS
2442
+
2443
+ function getSetWeekYear (input) {
2444
+ return getSetWeekYearHelper.call(this,
2445
+ input,
2446
+ this.week(),
2447
+ this.weekday(),
2448
+ this.localeData()._week.dow,
2449
+ this.localeData()._week.doy);
2450
+ }
2451
+
2452
+ function getSetISOWeekYear (input) {
2453
+ return getSetWeekYearHelper.call(this,
2454
+ input, this.isoWeek(), this.isoWeekday(), 1, 4);
2455
+ }
2456
+
2457
+ function getISOWeeksInYear () {
2458
+ return weeksInYear(this.year(), 1, 4);
2459
+ }
2460
+
2461
+ function getWeeksInYear () {
2462
+ var weekInfo = this.localeData()._week;
2463
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
2464
+ }
2465
+
2466
+ function getSetWeekYearHelper(input, week, weekday, dow, doy) {
2467
+ var weeksTarget;
2468
+ if (input == null) {
2469
+ return weekOfYear(this, dow, doy).year;
2470
+ } else {
2471
+ weeksTarget = weeksInYear(input, dow, doy);
2472
+ if (week > weeksTarget) {
2473
+ week = weeksTarget;
2474
+ }
2475
+ return setWeekAll.call(this, input, week, weekday, dow, doy);
2476
+ }
2477
+ }
2478
+
2479
+ function setWeekAll(weekYear, week, weekday, dow, doy) {
2480
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
2481
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
2482
+
2483
+ this.year(date.getUTCFullYear());
2484
+ this.month(date.getUTCMonth());
2485
+ this.date(date.getUTCDate());
2486
+ return this;
2487
+ }
2488
+
2489
+ // FORMATTING
2490
+
2491
+ addFormatToken('Q', 0, 'Qo', 'quarter');
2492
+
2493
+ // ALIASES
2494
+
2495
+ addUnitAlias('quarter', 'Q');
2496
+
2497
+ // PARSING
2498
+
2499
+ addRegexToken('Q', match1);
2500
+ addParseToken('Q', function (input, array) {
2501
+ array[MONTH] = (toInt(input) - 1) * 3;
2502
+ });
2503
+
2504
+ // MOMENTS
2505
+
2506
+ function getSetQuarter (input) {
2507
+ return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
2508
+ }
2509
+
2510
+ // FORMATTING
2511
+
2512
+ addFormatToken('w', ['ww', 2], 'wo', 'week');
2513
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
2514
+
2515
+ // ALIASES
2516
+
2517
+ addUnitAlias('week', 'w');
2518
+ addUnitAlias('isoWeek', 'W');
2519
+
2520
+ // PARSING
2521
+
2522
+ addRegexToken('w', match1to2);
2523
+ addRegexToken('ww', match1to2, match2);
2524
+ addRegexToken('W', match1to2);
2525
+ addRegexToken('WW', match1to2, match2);
2526
+
2527
+ addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
2528
+ week[token.substr(0, 1)] = toInt(input);
2529
+ });
2530
+
2531
+ // HELPERS
2532
+
2533
+ // LOCALES
2534
+
2535
+ function localeWeek (mom) {
2536
+ return weekOfYear(mom, this._week.dow, this._week.doy).week;
2537
+ }
2538
+
2539
+ var defaultLocaleWeek = {
2540
+ dow : 0, // Sunday is the first day of the week.
2541
+ doy : 6 // The week that contains Jan 1st is the first week of the year.
2542
+ };
2543
+
2544
+ function localeFirstDayOfWeek () {
2545
+ return this._week.dow;
2546
+ }
2547
+
2548
+ function localeFirstDayOfYear () {
2549
+ return this._week.doy;
2550
+ }
2551
+
2552
+ // MOMENTS
2553
+
2554
+ function getSetWeek (input) {
2555
+ var week = this.localeData().week(this);
2556
+ return input == null ? week : this.add((input - week) * 7, 'd');
2557
+ }
2558
+
2559
+ function getSetISOWeek (input) {
2560
+ var week = weekOfYear(this, 1, 4).week;
2561
+ return input == null ? week : this.add((input - week) * 7, 'd');
2562
+ }
2563
+
2564
+ // FORMATTING
2565
+
2566
+ addFormatToken('D', ['DD', 2], 'Do', 'date');
2567
+
2568
+ // ALIASES
2569
+
2570
+ addUnitAlias('date', 'D');
2571
+
2572
+ // PARSING
2573
+
2574
+ addRegexToken('D', match1to2);
2575
+ addRegexToken('DD', match1to2, match2);
2576
+ addRegexToken('Do', function (isStrict, locale) {
2577
+ return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
2578
+ });
2579
+
2580
+ addParseToken(['D', 'DD'], DATE);
2581
+ addParseToken('Do', function (input, array) {
2582
+ array[DATE] = toInt(input.match(match1to2)[0], 10);
2583
+ });
2584
+
2585
+ // MOMENTS
2586
+
2587
+ var getSetDayOfMonth = makeGetSet('Date', true);
2588
+
2589
+ // FORMATTING
2590
+
2591
+ addFormatToken('d', 0, 'do', 'day');
2592
+
2593
+ addFormatToken('dd', 0, 0, function (format) {
2594
+ return this.localeData().weekdaysMin(this, format);
2595
+ });
2596
+
2597
+ addFormatToken('ddd', 0, 0, function (format) {
2598
+ return this.localeData().weekdaysShort(this, format);
2599
+ });
2600
+
2601
+ addFormatToken('dddd', 0, 0, function (format) {
2602
+ return this.localeData().weekdays(this, format);
2603
+ });
2604
+
2605
+ addFormatToken('e', 0, 0, 'weekday');
2606
+ addFormatToken('E', 0, 0, 'isoWeekday');
2607
+
2608
+ // ALIASES
2609
+
2610
+ addUnitAlias('day', 'd');
2611
+ addUnitAlias('weekday', 'e');
2612
+ addUnitAlias('isoWeekday', 'E');
2613
+
2614
+ // PARSING
2615
+
2616
+ addRegexToken('d', match1to2);
2617
+ addRegexToken('e', match1to2);
2618
+ addRegexToken('E', match1to2);
2619
+ addRegexToken('dd', matchWord);
2620
+ addRegexToken('ddd', matchWord);
2621
+ addRegexToken('dddd', matchWord);
2622
+
2623
+ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
2624
+ var weekday = config._locale.weekdaysParse(input, token, config._strict);
2625
+ // if we didn't get a weekday name, mark the date as invalid
2626
+ if (weekday != null) {
2627
+ week.d = weekday;
2628
+ } else {
2629
+ getParsingFlags(config).invalidWeekday = input;
2630
+ }
2631
+ });
2632
+
2633
+ addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
2634
+ week[token] = toInt(input);
2635
+ });
2636
+
2637
+ // HELPERS
2638
+
2639
+ function parseWeekday(input, locale) {
2640
+ if (typeof input !== 'string') {
2641
+ return input;
2642
+ }
2643
+
2644
+ if (!isNaN(input)) {
2645
+ return parseInt(input, 10);
2646
+ }
2647
+
2648
+ input = locale.weekdaysParse(input);
2649
+ if (typeof input === 'number') {
2650
+ return input;
2651
+ }
2652
+
2653
+ return null;
2654
+ }
2655
+
2656
+ // LOCALES
2657
+
2658
+ var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
2659
+ function localeWeekdays (m, format) {
2660
+ return isArray(this._weekdays) ? this._weekdays[m.day()] :
2661
+ this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
2662
+ }
2663
+
2664
+ var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
2665
+ function localeWeekdaysShort (m) {
2666
+ return this._weekdaysShort[m.day()];
2667
+ }
2668
+
2669
+ var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
2670
+ function localeWeekdaysMin (m) {
2671
+ return this._weekdaysMin[m.day()];
2672
+ }
2673
+
2674
+ function localeWeekdaysParse (weekdayName, format, strict) {
2675
+ var i, mom, regex;
2676
+
2677
+ if (!this._weekdaysParse) {
2678
+ this._weekdaysParse = [];
2679
+ this._minWeekdaysParse = [];
2680
+ this._shortWeekdaysParse = [];
2681
+ this._fullWeekdaysParse = [];
2682
+ }
2683
+
2684
+ for (i = 0; i < 7; i++) {
2685
+ // make the regex if we don't have it already
2686
+
2687
+ mom = local__createLocal([2000, 1]).day(i);
2688
+ if (strict && !this._fullWeekdaysParse[i]) {
2689
+ this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
2690
+ this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
2691
+ this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
2692
+ }
2693
+ if (!this._weekdaysParse[i]) {
2694
+ regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
2695
+ this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
2696
+ }
2697
+ // test the regex
2698
+ if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
2699
+ return i;
2700
+ } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
2701
+ return i;
2702
+ } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
2703
+ return i;
2704
+ } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
2705
+ return i;
2706
+ }
2707
+ }
2708
+ }
2709
+
2710
+ // MOMENTS
2711
+
2712
+ function getSetDayOfWeek (input) {
2713
+ if (!this.isValid()) {
2714
+ return input != null ? this : NaN;
2715
+ }
2716
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
2717
+ if (input != null) {
2718
+ input = parseWeekday(input, this.localeData());
2719
+ return this.add(input - day, 'd');
2720
+ } else {
2721
+ return day;
2722
+ }
2723
+ }
2724
+
2725
+ function getSetLocaleDayOfWeek (input) {
2726
+ if (!this.isValid()) {
2727
+ return input != null ? this : NaN;
2728
+ }
2729
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
2730
+ return input == null ? weekday : this.add(input - weekday, 'd');
2731
+ }
2732
+
2733
+ function getSetISODayOfWeek (input) {
2734
+ if (!this.isValid()) {
2735
+ return input != null ? this : NaN;
2736
+ }
2737
+ // behaves the same as moment#day except
2738
+ // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
2739
+ // as a setter, sunday should belong to the previous week.
2740
+ return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
2741
+ }
2742
+
2743
+ // FORMATTING
2744
+
2745
+ addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
2746
+
2747
+ // ALIASES
2748
+
2749
+ addUnitAlias('dayOfYear', 'DDD');
2750
+
2751
+ // PARSING
2752
+
2753
+ addRegexToken('DDD', match1to3);
2754
+ addRegexToken('DDDD', match3);
2755
+ addParseToken(['DDD', 'DDDD'], function (input, array, config) {
2756
+ config._dayOfYear = toInt(input);
2757
+ });
2758
+
2759
+ // HELPERS
2760
+
2761
+ // MOMENTS
2762
+
2763
+ function getSetDayOfYear (input) {
2764
+ var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
2765
+ return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
2766
+ }
2767
+
2768
+ // FORMATTING
2769
+
2770
+ function hFormat() {
2771
+ return this.hours() % 12 || 12;
2772
+ }
2773
+
2774
+ addFormatToken('H', ['HH', 2], 0, 'hour');
2775
+ addFormatToken('h', ['hh', 2], 0, hFormat);
2776
+
2777
+ addFormatToken('hmm', 0, 0, function () {
2778
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
2779
+ });
2780
+
2781
+ addFormatToken('hmmss', 0, 0, function () {
2782
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
2783
+ zeroFill(this.seconds(), 2);
2784
+ });
2785
+
2786
+ addFormatToken('Hmm', 0, 0, function () {
2787
+ return '' + this.hours() + zeroFill(this.minutes(), 2);
2788
+ });
2789
+
2790
+ addFormatToken('Hmmss', 0, 0, function () {
2791
+ return '' + this.hours() + zeroFill(this.minutes(), 2) +
2792
+ zeroFill(this.seconds(), 2);
2793
+ });
2794
+
2795
+ function meridiem (token, lowercase) {
2796
+ addFormatToken(token, 0, 0, function () {
2797
+ return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
2798
+ });
2799
+ }
2800
+
2801
+ meridiem('a', true);
2802
+ meridiem('A', false);
2803
+
2804
+ // ALIASES
2805
+
2806
+ addUnitAlias('hour', 'h');
2807
+
2808
+ // PARSING
2809
+
2810
+ function matchMeridiem (isStrict, locale) {
2811
+ return locale._meridiemParse;
2812
+ }
2813
+
2814
+ addRegexToken('a', matchMeridiem);
2815
+ addRegexToken('A', matchMeridiem);
2816
+ addRegexToken('H', match1to2);
2817
+ addRegexToken('h', match1to2);
2818
+ addRegexToken('HH', match1to2, match2);
2819
+ addRegexToken('hh', match1to2, match2);
2820
+
2821
+ addRegexToken('hmm', match3to4);
2822
+ addRegexToken('hmmss', match5to6);
2823
+ addRegexToken('Hmm', match3to4);
2824
+ addRegexToken('Hmmss', match5to6);
2825
+
2826
+ addParseToken(['H', 'HH'], HOUR);
2827
+ addParseToken(['a', 'A'], function (input, array, config) {
2828
+ config._isPm = config._locale.isPM(input);
2829
+ config._meridiem = input;
2830
+ });
2831
+ addParseToken(['h', 'hh'], function (input, array, config) {
2832
+ array[HOUR] = toInt(input);
2833
+ getParsingFlags(config).bigHour = true;
2834
+ });
2835
+ addParseToken('hmm', function (input, array, config) {
2836
+ var pos = input.length - 2;
2837
+ array[HOUR] = toInt(input.substr(0, pos));
2838
+ array[MINUTE] = toInt(input.substr(pos));
2839
+ getParsingFlags(config).bigHour = true;
2840
+ });
2841
+ addParseToken('hmmss', function (input, array, config) {
2842
+ var pos1 = input.length - 4;
2843
+ var pos2 = input.length - 2;
2844
+ array[HOUR] = toInt(input.substr(0, pos1));
2845
+ array[MINUTE] = toInt(input.substr(pos1, 2));
2846
+ array[SECOND] = toInt(input.substr(pos2));
2847
+ getParsingFlags(config).bigHour = true;
2848
+ });
2849
+ addParseToken('Hmm', function (input, array, config) {
2850
+ var pos = input.length - 2;
2851
+ array[HOUR] = toInt(input.substr(0, pos));
2852
+ array[MINUTE] = toInt(input.substr(pos));
2853
+ });
2854
+ addParseToken('Hmmss', function (input, array, config) {
2855
+ var pos1 = input.length - 4;
2856
+ var pos2 = input.length - 2;
2857
+ array[HOUR] = toInt(input.substr(0, pos1));
2858
+ array[MINUTE] = toInt(input.substr(pos1, 2));
2859
+ array[SECOND] = toInt(input.substr(pos2));
2860
+ });
2861
+
2862
+ // LOCALES
2863
+
2864
+ function localeIsPM (input) {
2865
+ // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
2866
+ // Using charAt should be more compatible.
2867
+ return ((input + '').toLowerCase().charAt(0) === 'p');
2868
+ }
2869
+
2870
+ var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
2871
+ function localeMeridiem (hours, minutes, isLower) {
2872
+ if (hours > 11) {
2873
+ return isLower ? 'pm' : 'PM';
2874
+ } else {
2875
+ return isLower ? 'am' : 'AM';
2876
+ }
2877
+ }
2878
+
2879
+
2880
+ // MOMENTS
2881
+
2882
+ // Setting the hour should keep the time, because the user explicitly
2883
+ // specified which hour he wants. So trying to maintain the same hour (in
2884
+ // a new timezone) makes sense. Adding/subtracting hours does not follow
2885
+ // this rule.
2886
+ var getSetHour = makeGetSet('Hours', true);
2887
+
2888
+ // FORMATTING
2889
+
2890
+ addFormatToken('m', ['mm', 2], 0, 'minute');
2891
+
2892
+ // ALIASES
2893
+
2894
+ addUnitAlias('minute', 'm');
2895
+
2896
+ // PARSING
2897
+
2898
+ addRegexToken('m', match1to2);
2899
+ addRegexToken('mm', match1to2, match2);
2900
+ addParseToken(['m', 'mm'], MINUTE);
2901
+
2902
+ // MOMENTS
2903
+
2904
+ var getSetMinute = makeGetSet('Minutes', false);
2905
+
2906
+ // FORMATTING
2907
+
2908
+ addFormatToken('s', ['ss', 2], 0, 'second');
2909
+
2910
+ // ALIASES
2911
+
2912
+ addUnitAlias('second', 's');
2913
+
2914
+ // PARSING
2915
+
2916
+ addRegexToken('s', match1to2);
2917
+ addRegexToken('ss', match1to2, match2);
2918
+ addParseToken(['s', 'ss'], SECOND);
2919
+
2920
+ // MOMENTS
2921
+
2922
+ var getSetSecond = makeGetSet('Seconds', false);
2923
+
2924
+ // FORMATTING
2925
+
2926
+ addFormatToken('S', 0, 0, function () {
2927
+ return ~~(this.millisecond() / 100);
2928
+ });
2929
+
2930
+ addFormatToken(0, ['SS', 2], 0, function () {
2931
+ return ~~(this.millisecond() / 10);
2932
+ });
2933
+
2934
+ addFormatToken(0, ['SSS', 3], 0, 'millisecond');
2935
+ addFormatToken(0, ['SSSS', 4], 0, function () {
2936
+ return this.millisecond() * 10;
2937
+ });
2938
+ addFormatToken(0, ['SSSSS', 5], 0, function () {
2939
+ return this.millisecond() * 100;
2940
+ });
2941
+ addFormatToken(0, ['SSSSSS', 6], 0, function () {
2942
+ return this.millisecond() * 1000;
2943
+ });
2944
+ addFormatToken(0, ['SSSSSSS', 7], 0, function () {
2945
+ return this.millisecond() * 10000;
2946
+ });
2947
+ addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
2948
+ return this.millisecond() * 100000;
2949
+ });
2950
+ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
2951
+ return this.millisecond() * 1000000;
2952
+ });
2953
+
2954
+
2955
+ // ALIASES
2956
+
2957
+ addUnitAlias('millisecond', 'ms');
2958
+
2959
+ // PARSING
2960
+
2961
+ addRegexToken('S', match1to3, match1);
2962
+ addRegexToken('SS', match1to3, match2);
2963
+ addRegexToken('SSS', match1to3, match3);
2964
+
2965
+ var token;
2966
+ for (token = 'SSSS'; token.length <= 9; token += 'S') {
2967
+ addRegexToken(token, matchUnsigned);
2968
+ }
2969
+
2970
+ function parseMs(input, array) {
2971
+ array[MILLISECOND] = toInt(('0.' + input) * 1000);
2972
+ }
2973
+
2974
+ for (token = 'S'; token.length <= 9; token += 'S') {
2975
+ addParseToken(token, parseMs);
2976
+ }
2977
+ // MOMENTS
2978
+
2979
+ var getSetMillisecond = makeGetSet('Milliseconds', false);
2980
+
2981
+ // FORMATTING
2982
+
2983
+ addFormatToken('z', 0, 0, 'zoneAbbr');
2984
+ addFormatToken('zz', 0, 0, 'zoneName');
2985
+
2986
+ // MOMENTS
2987
+
2988
+ function getZoneAbbr () {
2989
+ return this._isUTC ? 'UTC' : '';
2990
+ }
2991
+
2992
+ function getZoneName () {
2993
+ return this._isUTC ? 'Coordinated Universal Time' : '';
2994
+ }
2995
+
2996
+ var momentPrototype__proto = Moment.prototype;
2997
+
2998
+ momentPrototype__proto.add = add_subtract__add;
2999
+ momentPrototype__proto.calendar = moment_calendar__calendar;
3000
+ momentPrototype__proto.clone = clone;
3001
+ momentPrototype__proto.diff = diff;
3002
+ momentPrototype__proto.endOf = endOf;
3003
+ momentPrototype__proto.format = format;
3004
+ momentPrototype__proto.from = from;
3005
+ momentPrototype__proto.fromNow = fromNow;
3006
+ momentPrototype__proto.to = to;
3007
+ momentPrototype__proto.toNow = toNow;
3008
+ momentPrototype__proto.get = getSet;
3009
+ momentPrototype__proto.invalidAt = invalidAt;
3010
+ momentPrototype__proto.isAfter = isAfter;
3011
+ momentPrototype__proto.isBefore = isBefore;
3012
+ momentPrototype__proto.isBetween = isBetween;
3013
+ momentPrototype__proto.isSame = isSame;
3014
+ momentPrototype__proto.isSameOrAfter = isSameOrAfter;
3015
+ momentPrototype__proto.isSameOrBefore = isSameOrBefore;
3016
+ momentPrototype__proto.isValid = moment_valid__isValid;
3017
+ momentPrototype__proto.lang = lang;
3018
+ momentPrototype__proto.locale = locale;
3019
+ momentPrototype__proto.localeData = localeData;
3020
+ momentPrototype__proto.max = prototypeMax;
3021
+ momentPrototype__proto.min = prototypeMin;
3022
+ momentPrototype__proto.parsingFlags = parsingFlags;
3023
+ momentPrototype__proto.set = getSet;
3024
+ momentPrototype__proto.startOf = startOf;
3025
+ momentPrototype__proto.subtract = add_subtract__subtract;
3026
+ momentPrototype__proto.toArray = toArray;
3027
+ momentPrototype__proto.toObject = toObject;
3028
+ momentPrototype__proto.toDate = toDate;
3029
+ momentPrototype__proto.toISOString = moment_format__toISOString;
3030
+ momentPrototype__proto.toJSON = toJSON;
3031
+ momentPrototype__proto.toString = toString;
3032
+ momentPrototype__proto.unix = unix;
3033
+ momentPrototype__proto.valueOf = to_type__valueOf;
3034
+ momentPrototype__proto.creationData = creationData;
3035
+
3036
+ // Year
3037
+ momentPrototype__proto.year = getSetYear;
3038
+ momentPrototype__proto.isLeapYear = getIsLeapYear;
3039
+
3040
+ // Week Year
3041
+ momentPrototype__proto.weekYear = getSetWeekYear;
3042
+ momentPrototype__proto.isoWeekYear = getSetISOWeekYear;
3043
+
3044
+ // Quarter
3045
+ momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;
3046
+
3047
+ // Month
3048
+ momentPrototype__proto.month = getSetMonth;
3049
+ momentPrototype__proto.daysInMonth = getDaysInMonth;
3050
+
3051
+ // Week
3052
+ momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;
3053
+ momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;
3054
+ momentPrototype__proto.weeksInYear = getWeeksInYear;
3055
+ momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;
3056
+
3057
+ // Day
3058
+ momentPrototype__proto.date = getSetDayOfMonth;
3059
+ momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;
3060
+ momentPrototype__proto.weekday = getSetLocaleDayOfWeek;
3061
+ momentPrototype__proto.isoWeekday = getSetISODayOfWeek;
3062
+ momentPrototype__proto.dayOfYear = getSetDayOfYear;
3063
+
3064
+ // Hour
3065
+ momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;
3066
+
3067
+ // Minute
3068
+ momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;
3069
+
3070
+
3071
+ // Second
3072
+ momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;
3073
+
3074
+ // Millisecond
3075
+ momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;
3076
+
3077
+ // Offset
3078
+ momentPrototype__proto.utcOffset = getSetOffset;
3079
+ momentPrototype__proto.utc = setOffsetToUTC;
3080
+ momentPrototype__proto.local = setOffsetToLocal;
3081
+ momentPrototype__proto.parseZone = setOffsetToParsedOffset;
3082
+ momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;
3083
+ momentPrototype__proto.isDST = isDaylightSavingTime;
3084
+ momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;
3085
+ momentPrototype__proto.isLocal = isLocal;
3086
+ momentPrototype__proto.isUtcOffset = isUtcOffset;
3087
+ momentPrototype__proto.isUtc = isUtc;
3088
+ momentPrototype__proto.isUTC = isUtc;
3089
+
3090
+ // Timezone
3091
+ momentPrototype__proto.zoneAbbr = getZoneAbbr;
3092
+ momentPrototype__proto.zoneName = getZoneName;
3093
+
3094
+ // Deprecations
3095
+ momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
3096
+ momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
3097
+ momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
3098
+ momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);
3099
+
3100
+ var momentPrototype = momentPrototype__proto;
3101
+
3102
+ function moment__createUnix (input) {
3103
+ return local__createLocal(input * 1000);
3104
+ }
3105
+
3106
+ function moment__createInZone () {
3107
+ return local__createLocal.apply(null, arguments).parseZone();
3108
+ }
3109
+
3110
+ var defaultCalendar = {
3111
+ sameDay : '[Today at] LT',
3112
+ nextDay : '[Tomorrow at] LT',
3113
+ nextWeek : 'dddd [at] LT',
3114
+ lastDay : '[Yesterday at] LT',
3115
+ lastWeek : '[Last] dddd [at] LT',
3116
+ sameElse : 'L'
3117
+ };
3118
+
3119
+ function locale_calendar__calendar (key, mom, now) {
3120
+ var output = this._calendar[key];
3121
+ return isFunction(output) ? output.call(mom, now) : output;
3122
+ }
3123
+
3124
+ var defaultLongDateFormat = {
3125
+ LTS : 'h:mm:ss A',
3126
+ LT : 'h:mm A',
3127
+ L : 'MM/DD/YYYY',
3128
+ LL : 'MMMM D, YYYY',
3129
+ LLL : 'MMMM D, YYYY h:mm A',
3130
+ LLLL : 'dddd, MMMM D, YYYY h:mm A'
3131
+ };
3132
+
3133
+ function longDateFormat (key) {
3134
+ var format = this._longDateFormat[key],
3135
+ formatUpper = this._longDateFormat[key.toUpperCase()];
3136
+
3137
+ if (format || !formatUpper) {
3138
+ return format;
3139
+ }
3140
+
3141
+ this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
3142
+ return val.slice(1);
3143
+ });
3144
+
3145
+ return this._longDateFormat[key];
3146
+ }
3147
+
3148
+ var defaultInvalidDate = 'Invalid date';
3149
+
3150
+ function invalidDate () {
3151
+ return this._invalidDate;
3152
+ }
3153
+
3154
+ var defaultOrdinal = '%d';
3155
+ var defaultOrdinalParse = /\d{1,2}/;
3156
+
3157
+ function ordinal (number) {
3158
+ return this._ordinal.replace('%d', number);
3159
+ }
3160
+
3161
+ function preParsePostFormat (string) {
3162
+ return string;
3163
+ }
3164
+
3165
+ var defaultRelativeTime = {
3166
+ future : 'in %s',
3167
+ past : '%s ago',
3168
+ s : 'a few seconds',
3169
+ m : 'a minute',
3170
+ mm : '%d minutes',
3171
+ h : 'an hour',
3172
+ hh : '%d hours',
3173
+ d : 'a day',
3174
+ dd : '%d days',
3175
+ M : 'a month',
3176
+ MM : '%d months',
3177
+ y : 'a year',
3178
+ yy : '%d years'
3179
+ };
3180
+
3181
+ function relative__relativeTime (number, withoutSuffix, string, isFuture) {
3182
+ var output = this._relativeTime[string];
3183
+ return (isFunction(output)) ?
3184
+ output(number, withoutSuffix, string, isFuture) :
3185
+ output.replace(/%d/i, number);
3186
+ }
3187
+
3188
+ function pastFuture (diff, output) {
3189
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
3190
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output);
3191
+ }
3192
+
3193
+ var prototype__proto = Locale.prototype;
3194
+
3195
+ prototype__proto._calendar = defaultCalendar;
3196
+ prototype__proto.calendar = locale_calendar__calendar;
3197
+ prototype__proto._longDateFormat = defaultLongDateFormat;
3198
+ prototype__proto.longDateFormat = longDateFormat;
3199
+ prototype__proto._invalidDate = defaultInvalidDate;
3200
+ prototype__proto.invalidDate = invalidDate;
3201
+ prototype__proto._ordinal = defaultOrdinal;
3202
+ prototype__proto.ordinal = ordinal;
3203
+ prototype__proto._ordinalParse = defaultOrdinalParse;
3204
+ prototype__proto.preparse = preParsePostFormat;
3205
+ prototype__proto.postformat = preParsePostFormat;
3206
+ prototype__proto._relativeTime = defaultRelativeTime;
3207
+ prototype__proto.relativeTime = relative__relativeTime;
3208
+ prototype__proto.pastFuture = pastFuture;
3209
+ prototype__proto.set = locale_set__set;
3210
+
3211
+ // Month
3212
+ prototype__proto.months = localeMonths;
3213
+ prototype__proto._months = defaultLocaleMonths;
3214
+ prototype__proto.monthsShort = localeMonthsShort;
3215
+ prototype__proto._monthsShort = defaultLocaleMonthsShort;
3216
+ prototype__proto.monthsParse = localeMonthsParse;
3217
+ prototype__proto._monthsRegex = defaultMonthsRegex;
3218
+ prototype__proto.monthsRegex = monthsRegex;
3219
+ prototype__proto._monthsShortRegex = defaultMonthsShortRegex;
3220
+ prototype__proto.monthsShortRegex = monthsShortRegex;
3221
+
3222
+ // Week
3223
+ prototype__proto.week = localeWeek;
3224
+ prototype__proto._week = defaultLocaleWeek;
3225
+ prototype__proto.firstDayOfYear = localeFirstDayOfYear;
3226
+ prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;
3227
+
3228
+ // Day of Week
3229
+ prototype__proto.weekdays = localeWeekdays;
3230
+ prototype__proto._weekdays = defaultLocaleWeekdays;
3231
+ prototype__proto.weekdaysMin = localeWeekdaysMin;
3232
+ prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;
3233
+ prototype__proto.weekdaysShort = localeWeekdaysShort;
3234
+ prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;
3235
+ prototype__proto.weekdaysParse = localeWeekdaysParse;
3236
+
3237
+ // Hours
3238
+ prototype__proto.isPM = localeIsPM;
3239
+ prototype__proto._meridiemParse = defaultLocaleMeridiemParse;
3240
+ prototype__proto.meridiem = localeMeridiem;
3241
+
3242
+ function lists__get (format, index, field, setter) {
3243
+ var locale = locale_locales__getLocale();
3244
+ var utc = create_utc__createUTC().set(setter, index);
3245
+ return locale[field](utc, format);
3246
+ }
3247
+
3248
+ function list (format, index, field, count, setter) {
3249
+ if (typeof format === 'number') {
3250
+ index = format;
3251
+ format = undefined;
3252
+ }
3253
+
3254
+ format = format || '';
3255
+
3256
+ if (index != null) {
3257
+ return lists__get(format, index, field, setter);
3258
+ }
3259
+
3260
+ var i;
3261
+ var out = [];
3262
+ for (i = 0; i < count; i++) {
3263
+ out[i] = lists__get(format, i, field, setter);
3264
+ }
3265
+ return out;
3266
+ }
3267
+
3268
+ function lists__listMonths (format, index) {
3269
+ return list(format, index, 'months', 12, 'month');
3270
+ }
3271
+
3272
+ function lists__listMonthsShort (format, index) {
3273
+ return list(format, index, 'monthsShort', 12, 'month');
3274
+ }
3275
+
3276
+ function lists__listWeekdays (format, index) {
3277
+ return list(format, index, 'weekdays', 7, 'day');
3278
+ }
3279
+
3280
+ function lists__listWeekdaysShort (format, index) {
3281
+ return list(format, index, 'weekdaysShort', 7, 'day');
3282
+ }
3283
+
3284
+ function lists__listWeekdaysMin (format, index) {
3285
+ return list(format, index, 'weekdaysMin', 7, 'day');
3286
+ }
3287
+
3288
+ locale_locales__getSetGlobalLocale('en', {
3289
+ ordinalParse: /\d{1,2}(th|st|nd|rd)/,
3290
+ ordinal : function (number) {
3291
+ var b = number % 10,
3292
+ output = (toInt(number % 100 / 10) === 1) ? 'th' :
3293
+ (b === 1) ? 'st' :
3294
+ (b === 2) ? 'nd' :
3295
+ (b === 3) ? 'rd' : 'th';
3296
+ return number + output;
3297
+ }
3298
+ });
3299
+
3300
+ // Side effect imports
3301
+ utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);
3302
+ utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);
3303
+
3304
+ var mathAbs = Math.abs;
3305
+
3306
+ function duration_abs__abs () {
3307
+ var data = this._data;
3308
+
3309
+ this._milliseconds = mathAbs(this._milliseconds);
3310
+ this._days = mathAbs(this._days);
3311
+ this._months = mathAbs(this._months);
3312
+
3313
+ data.milliseconds = mathAbs(data.milliseconds);
3314
+ data.seconds = mathAbs(data.seconds);
3315
+ data.minutes = mathAbs(data.minutes);
3316
+ data.hours = mathAbs(data.hours);
3317
+ data.months = mathAbs(data.months);
3318
+ data.years = mathAbs(data.years);
3319
+
3320
+ return this;
3321
+ }
3322
+
3323
+ function duration_add_subtract__addSubtract (duration, input, value, direction) {
3324
+ var other = create__createDuration(input, value);
3325
+
3326
+ duration._milliseconds += direction * other._milliseconds;
3327
+ duration._days += direction * other._days;
3328
+ duration._months += direction * other._months;
3329
+
3330
+ return duration._bubble();
3331
+ }
3332
+
3333
+ // supports only 2.0-style add(1, 's') or add(duration)
3334
+ function duration_add_subtract__add (input, value) {
3335
+ return duration_add_subtract__addSubtract(this, input, value, 1);
3336
+ }
3337
+
3338
+ // supports only 2.0-style subtract(1, 's') or subtract(duration)
3339
+ function duration_add_subtract__subtract (input, value) {
3340
+ return duration_add_subtract__addSubtract(this, input, value, -1);
3341
+ }
3342
+
3343
+ function absCeil (number) {
3344
+ if (number < 0) {
3345
+ return Math.floor(number);
3346
+ } else {
3347
+ return Math.ceil(number);
3348
+ }
3349
+ }
3350
+
3351
+ function bubble () {
3352
+ var milliseconds = this._milliseconds;
3353
+ var days = this._days;
3354
+ var months = this._months;
3355
+ var data = this._data;
3356
+ var seconds, minutes, hours, years, monthsFromDays;
3357
+
3358
+ // if we have a mix of positive and negative values, bubble down first
3359
+ // check: https://github.com/moment/moment/issues/2166
3360
+ if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
3361
+ (milliseconds <= 0 && days <= 0 && months <= 0))) {
3362
+ milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
3363
+ days = 0;
3364
+ months = 0;
3365
+ }
3366
+
3367
+ // The following code bubbles up values, see the tests for
3368
+ // examples of what that means.
3369
+ data.milliseconds = milliseconds % 1000;
3370
+
3371
+ seconds = absFloor(milliseconds / 1000);
3372
+ data.seconds = seconds % 60;
3373
+
3374
+ minutes = absFloor(seconds / 60);
3375
+ data.minutes = minutes % 60;
3376
+
3377
+ hours = absFloor(minutes / 60);
3378
+ data.hours = hours % 24;
3379
+
3380
+ days += absFloor(hours / 24);
3381
+
3382
+ // convert days to months
3383
+ monthsFromDays = absFloor(daysToMonths(days));
3384
+ months += monthsFromDays;
3385
+ days -= absCeil(monthsToDays(monthsFromDays));
3386
+
3387
+ // 12 months -> 1 year
3388
+ years = absFloor(months / 12);
3389
+ months %= 12;
3390
+
3391
+ data.days = days;
3392
+ data.months = months;
3393
+ data.years = years;
3394
+
3395
+ return this;
3396
+ }
3397
+
3398
+ function daysToMonths (days) {
3399
+ // 400 years have 146097 days (taking into account leap year rules)
3400
+ // 400 years have 12 months === 4800
3401
+ return days * 4800 / 146097;
3402
+ }
3403
+
3404
+ function monthsToDays (months) {
3405
+ // the reverse of daysToMonths
3406
+ return months * 146097 / 4800;
3407
+ }
3408
+
3409
+ function as (units) {
3410
+ var days;
3411
+ var months;
3412
+ var milliseconds = this._milliseconds;
3413
+
3414
+ units = normalizeUnits(units);
3415
+
3416
+ if (units === 'month' || units === 'year') {
3417
+ days = this._days + milliseconds / 864e5;
3418
+ months = this._months + daysToMonths(days);
3419
+ return units === 'month' ? months : months / 12;
3420
+ } else {
3421
+ // handle milliseconds separately because of floating point math errors (issue #1867)
3422
+ days = this._days + Math.round(monthsToDays(this._months));
3423
+ switch (units) {
3424
+ case 'week' : return days / 7 + milliseconds / 6048e5;
3425
+ case 'day' : return days + milliseconds / 864e5;
3426
+ case 'hour' : return days * 24 + milliseconds / 36e5;
3427
+ case 'minute' : return days * 1440 + milliseconds / 6e4;
3428
+ case 'second' : return days * 86400 + milliseconds / 1000;
3429
+ // Math.floor prevents floating point math errors here
3430
+ case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
3431
+ default: throw new Error('Unknown unit ' + units);
3432
+ }
3433
+ }
3434
+ }
3435
+
3436
+ // TODO: Use this.as('ms')?
3437
+ function duration_as__valueOf () {
3438
+ return (
3439
+ this._milliseconds +
3440
+ this._days * 864e5 +
3441
+ (this._months % 12) * 2592e6 +
3442
+ toInt(this._months / 12) * 31536e6
3443
+ );
3444
+ }
3445
+
3446
+ function makeAs (alias) {
3447
+ return function () {
3448
+ return this.as(alias);
3449
+ };
3450
+ }
3451
+
3452
+ var asMilliseconds = makeAs('ms');
3453
+ var asSeconds = makeAs('s');
3454
+ var asMinutes = makeAs('m');
3455
+ var asHours = makeAs('h');
3456
+ var asDays = makeAs('d');
3457
+ var asWeeks = makeAs('w');
3458
+ var asMonths = makeAs('M');
3459
+ var asYears = makeAs('y');
3460
+
3461
+ function duration_get__get (units) {
3462
+ units = normalizeUnits(units);
3463
+ return this[units + 's']();
3464
+ }
3465
+
3466
+ function makeGetter(name) {
3467
+ return function () {
3468
+ return this._data[name];
3469
+ };
3470
+ }
3471
+
3472
+ var milliseconds = makeGetter('milliseconds');
3473
+ var seconds = makeGetter('seconds');
3474
+ var minutes = makeGetter('minutes');
3475
+ var hours = makeGetter('hours');
3476
+ var days = makeGetter('days');
3477
+ var months = makeGetter('months');
3478
+ var years = makeGetter('years');
3479
+
3480
+ function weeks () {
3481
+ return absFloor(this.days() / 7);
3482
+ }
3483
+
3484
+ var round = Math.round;
3485
+ var thresholds = {
3486
+ s: 45, // seconds to minute
3487
+ m: 45, // minutes to hour
3488
+ h: 22, // hours to day
3489
+ d: 26, // days to month
3490
+ M: 11 // months to year
3491
+ };
3492
+
3493
+ // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
3494
+ function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
3495
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
3496
+ }
3497
+
3498
+ function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {
3499
+ var duration = create__createDuration(posNegDuration).abs();
3500
+ var seconds = round(duration.as('s'));
3501
+ var minutes = round(duration.as('m'));
3502
+ var hours = round(duration.as('h'));
3503
+ var days = round(duration.as('d'));
3504
+ var months = round(duration.as('M'));
3505
+ var years = round(duration.as('y'));
3506
+
3507
+ var a = seconds < thresholds.s && ['s', seconds] ||
3508
+ minutes <= 1 && ['m'] ||
3509
+ minutes < thresholds.m && ['mm', minutes] ||
3510
+ hours <= 1 && ['h'] ||
3511
+ hours < thresholds.h && ['hh', hours] ||
3512
+ days <= 1 && ['d'] ||
3513
+ days < thresholds.d && ['dd', days] ||
3514
+ months <= 1 && ['M'] ||
3515
+ months < thresholds.M && ['MM', months] ||
3516
+ years <= 1 && ['y'] || ['yy', years];
3517
+
3518
+ a[2] = withoutSuffix;
3519
+ a[3] = +posNegDuration > 0;
3520
+ a[4] = locale;
3521
+ return substituteTimeAgo.apply(null, a);
3522
+ }
3523
+
3524
+ // This function allows you to set a threshold for relative time strings
3525
+ function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {
3526
+ if (thresholds[threshold] === undefined) {
3527
+ return false;
3528
+ }
3529
+ if (limit === undefined) {
3530
+ return thresholds[threshold];
3531
+ }
3532
+ thresholds[threshold] = limit;
3533
+ return true;
3534
+ }
3535
+
3536
+ function humanize (withSuffix) {
3537
+ var locale = this.localeData();
3538
+ var output = duration_humanize__relativeTime(this, !withSuffix, locale);
3539
+
3540
+ if (withSuffix) {
3541
+ output = locale.pastFuture(+this, output);
3542
+ }
3543
+
3544
+ return locale.postformat(output);
3545
+ }
3546
+
3547
+ var iso_string__abs = Math.abs;
3548
+
3549
+ function iso_string__toISOString() {
3550
+ // for ISO strings we do not use the normal bubbling rules:
3551
+ // * milliseconds bubble up until they become hours
3552
+ // * days do not bubble at all
3553
+ // * months bubble up until they become years
3554
+ // This is because there is no context-free conversion between hours and days
3555
+ // (think of clock changes)
3556
+ // and also not between days and months (28-31 days per month)
3557
+ var seconds = iso_string__abs(this._milliseconds) / 1000;
3558
+ var days = iso_string__abs(this._days);
3559
+ var months = iso_string__abs(this._months);
3560
+ var minutes, hours, years;
3561
+
3562
+ // 3600 seconds -> 60 minutes -> 1 hour
3563
+ minutes = absFloor(seconds / 60);
3564
+ hours = absFloor(minutes / 60);
3565
+ seconds %= 60;
3566
+ minutes %= 60;
3567
+
3568
+ // 12 months -> 1 year
3569
+ years = absFloor(months / 12);
3570
+ months %= 12;
3571
+
3572
+
3573
+ // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
3574
+ var Y = years;
3575
+ var M = months;
3576
+ var D = days;
3577
+ var h = hours;
3578
+ var m = minutes;
3579
+ var s = seconds;
3580
+ var total = this.asSeconds();
3581
+
3582
+ if (!total) {
3583
+ // this is the same as C#'s (Noda) and python (isodate)...
3584
+ // but not other JS (goog.date)
3585
+ return 'P0D';
3586
+ }
3587
+
3588
+ return (total < 0 ? '-' : '') +
3589
+ 'P' +
3590
+ (Y ? Y + 'Y' : '') +
3591
+ (M ? M + 'M' : '') +
3592
+ (D ? D + 'D' : '') +
3593
+ ((h || m || s) ? 'T' : '') +
3594
+ (h ? h + 'H' : '') +
3595
+ (m ? m + 'M' : '') +
3596
+ (s ? s + 'S' : '');
3597
+ }
3598
+
3599
+ var duration_prototype__proto = Duration.prototype;
3600
+
3601
+ duration_prototype__proto.abs = duration_abs__abs;
3602
+ duration_prototype__proto.add = duration_add_subtract__add;
3603
+ duration_prototype__proto.subtract = duration_add_subtract__subtract;
3604
+ duration_prototype__proto.as = as;
3605
+ duration_prototype__proto.asMilliseconds = asMilliseconds;
3606
+ duration_prototype__proto.asSeconds = asSeconds;
3607
+ duration_prototype__proto.asMinutes = asMinutes;
3608
+ duration_prototype__proto.asHours = asHours;
3609
+ duration_prototype__proto.asDays = asDays;
3610
+ duration_prototype__proto.asWeeks = asWeeks;
3611
+ duration_prototype__proto.asMonths = asMonths;
3612
+ duration_prototype__proto.asYears = asYears;
3613
+ duration_prototype__proto.valueOf = duration_as__valueOf;
3614
+ duration_prototype__proto._bubble = bubble;
3615
+ duration_prototype__proto.get = duration_get__get;
3616
+ duration_prototype__proto.milliseconds = milliseconds;
3617
+ duration_prototype__proto.seconds = seconds;
3618
+ duration_prototype__proto.minutes = minutes;
3619
+ duration_prototype__proto.hours = hours;
3620
+ duration_prototype__proto.days = days;
3621
+ duration_prototype__proto.weeks = weeks;
3622
+ duration_prototype__proto.months = months;
3623
+ duration_prototype__proto.years = years;
3624
+ duration_prototype__proto.humanize = humanize;
3625
+ duration_prototype__proto.toISOString = iso_string__toISOString;
3626
+ duration_prototype__proto.toString = iso_string__toISOString;
3627
+ duration_prototype__proto.toJSON = iso_string__toISOString;
3628
+ duration_prototype__proto.locale = locale;
3629
+ duration_prototype__proto.localeData = localeData;
3630
+
3631
+ // Deprecations
3632
+ duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);
3633
+ duration_prototype__proto.lang = lang;
3634
+
3635
+ // Side effect imports
3636
+
3637
+ // FORMATTING
3638
+
3639
+ addFormatToken('X', 0, 0, 'unix');
3640
+ addFormatToken('x', 0, 0, 'valueOf');
3641
+
3642
+ // PARSING
3643
+
3644
+ addRegexToken('x', matchSigned);
3645
+ addRegexToken('X', matchTimestamp);
3646
+ addParseToken('X', function (input, array, config) {
3647
+ config._d = new Date(parseFloat(input, 10) * 1000);
3648
+ });
3649
+ addParseToken('x', function (input, array, config) {
3650
+ config._d = new Date(toInt(input));
3651
+ });
3652
+
3653
+ // Side effect imports
3654
+
3655
+
3656
+ utils_hooks__hooks.version = '2.12.0';
3657
+
3658
+ setHookCallback(local__createLocal);
3659
+
3660
+ utils_hooks__hooks.fn = momentPrototype;
3661
+ utils_hooks__hooks.min = min;
3662
+ utils_hooks__hooks.max = max;
3663
+ utils_hooks__hooks.now = now;
3664
+ utils_hooks__hooks.utc = create_utc__createUTC;
3665
+ utils_hooks__hooks.unix = moment__createUnix;
3666
+ utils_hooks__hooks.months = lists__listMonths;
3667
+ utils_hooks__hooks.isDate = isDate;
3668
+ utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;
3669
+ utils_hooks__hooks.invalid = valid__createInvalid;
3670
+ utils_hooks__hooks.duration = create__createDuration;
3671
+ utils_hooks__hooks.isMoment = isMoment;
3672
+ utils_hooks__hooks.weekdays = lists__listWeekdays;
3673
+ utils_hooks__hooks.parseZone = moment__createInZone;
3674
+ utils_hooks__hooks.localeData = locale_locales__getLocale;
3675
+ utils_hooks__hooks.isDuration = isDuration;
3676
+ utils_hooks__hooks.monthsShort = lists__listMonthsShort;
3677
+ utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;
3678
+ utils_hooks__hooks.defineLocale = defineLocale;
3679
+ utils_hooks__hooks.updateLocale = updateLocale;
3680
+ utils_hooks__hooks.locales = locale_locales__listLocales;
3681
+ utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;
3682
+ utils_hooks__hooks.normalizeUnits = normalizeUnits;
3683
+ utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;
3684
+ utils_hooks__hooks.prototype = momentPrototype;
3685
+
3686
+ var _moment = utils_hooks__hooks;
3687
+
3688
+ return _moment;
3689
+
3690
+ }));
inc/core.php CHANGED
@@ -30,7 +30,12 @@ class Magee_Core{
30
 
31
  add_action('wp_ajax_magee_control_button', array(&$this, 'get_control_button') );
32
  add_action( 'wp_ajax_nopriv_magee_control_button', array(&$this, 'get_control_button') );
33
-
 
 
 
 
 
34
  }else{
35
  add_action( 'wp_enqueue_scripts', array($this,'frontend_scripts' ));
36
 
@@ -55,12 +60,17 @@ public static function init() {
55
  }
56
 
57
  function admin_scripts() {
58
- wp_enqueue_script('thickbox');
59
  wp_enqueue_style('thickbox');
60
  wp_enqueue_style( 'wp-color-picker' );
61
  wp_enqueue_style('font-awesome', plugins_url( 'assets/font-awesome/css/font-awesome.css',MAGEE_SHORTCODES_PATH ), '', '4.4.0', false );
 
62
  wp_enqueue_style('magee-admin', plugins_url( 'assets/css/admin.css',MAGEE_SHORTCODES_PATH ), '', MAGEE_SHORTCODES_VER, false );
 
 
63
  wp_enqueue_script( 'magee-admin-js', plugins_url( 'assets/js/admin.js',MAGEE_SHORTCODES_PATH ), array( 'jquery','wp-color-picker' ),MAGEE_SHORTCODES_VER, true );
 
 
64
 
65
  }
66
  function frontend_scripts() {
@@ -82,11 +92,11 @@ function frontend_scripts() {
82
  wp_enqueue_script( 'jquery.twentytwenty', plugins_url( 'assets/js/jquery.twentytwenty.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'), '', false );
83
 
84
  wp_enqueue_script( 'magee-main', plugins_url( 'assets/js/magee-shortcodes.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),MAGEE_SHORTCODES_VER, true );
85
- wp_enqueue_script( 'magee-main', plugins_url( 'assets/js/main.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),MAGEE_SHORTCODES_VER, true );
86
 
87
  }
88
 
89
-
90
  //action to add a custom button to the content editor
91
  function add_shortcodes_button($context) {
92
 
@@ -97,6 +107,7 @@ function add_shortcodes_button($context) {
97
  $title = __('Magee Shortcodes','magee-shortcodes');
98
 
99
  //append the icon
 
100
  $context .= "<a class='magee_shortcodes button' title='{$title}'><img style='margin-bottom:2px' src='{$img}' />".__("Magee Shortcodes",'magee-shortcodes')."</a>";
101
 
102
  return $context;
@@ -117,12 +128,18 @@ function add_shortcodes_button($context) {
117
  if( isset($_POST['shortcode']) && isset($magee_shortcodes[$_POST['shortcode']]) ){
118
  if( $magee_shortcodes[$_POST['shortcode']]['popup_title'] == 'Column Shortcode'){
119
  echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
 
 
 
120
  $this->popup = $_POST['shortcode'];
121
  echo '<div class="column-shortcode-inner">'.self::formate_shortcode().'</div>';
122
  echo '<div class="shortcode-add"><a href="#" class="child-shortcode-add">add</a></div>' ;
123
 
124
  }else{
125
  echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
 
 
 
126
  $this->popup = $_POST['shortcode'];
127
  echo self::formate_shortcode();
128
  }
@@ -183,7 +200,23 @@ function init_shortcodes() {
183
  }
184
 
185
 
186
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  public static function colourBrightness($hex, $percent) {
188
  // Work out if hash given
189
  $hash = '';
@@ -247,8 +280,13 @@ function init_shortcodes() {
247
 
248
 
249
  function get_control_button(){
250
-
251
- echo '<div class="TB_footer" id="TB_footer"><div class="magee-shortcode-actions magee-shortcode-clearfix"><a class="button button-large magee-shortcodes-home" href="javascript:void(0);">'.__("Shortcodes List",'magee-shortcodes').'</a> <a class="button button-primary button-large magee-shortcode-insert" href="javascript:void(0);">'.__("Insert shortcode",'magee-shortcodes').'</a></div></div>';
 
 
 
 
 
252
  exit(0);
253
  }
254
 
@@ -510,8 +548,8 @@ function init_shortcodes() {
510
  $output .= $row_start;;
511
  $output .= '<div class="magee-upload-container">';
512
  $output .= '<img src="" alt="Image" class="uploaded-image" />';
513
- $output .= '<input type="hidden" class="magee-form-text magee-form-upload magee-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
514
- $output .= '<a href="' . $pkey . '" class="magee-upload-button" data-upid="' . $pkey . '">'.__('Upload','magee-shortcodes').'</a>';
515
  $output .= '</div>';
516
  $output .= $row_end;
517
 
@@ -540,10 +578,18 @@ function init_shortcodes() {
540
 
541
  // prepare
542
  $output .= $row_start;
 
 
 
 
 
543
  $output .= '<div class="iconpicker">';
544
- $output .= '<div><input type="text" class="magee-form-text magee-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "</div>\n";
 
545
  foreach( $param['options'] as $value => $option ) {
 
546
  $output .= '<i class="fa ' . $value . '" data-name="' . $value . '"></i>';
 
547
  }
548
  $output .= '</div>';
549
 
@@ -558,7 +604,37 @@ function init_shortcodes() {
558
  $this->append_output( $output );
559
 
560
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
 
 
 
 
 
 
 
 
 
562
  case 'colorpicker' :
563
 
564
  if(!isset($param['std'])) {
@@ -605,7 +681,63 @@ function init_shortcodes() {
605
  $this->append_output( $output );
606
 
607
  break;
 
 
608
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
609
  }
610
  }
611
 
@@ -844,7 +976,132 @@ function init_shortcodes() {
844
  wp_reset_postdata();
845
  return $magee_sliders;
846
  }
847
-
848
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
849
  }
850
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
  add_action('wp_ajax_magee_control_button', array(&$this, 'get_control_button') );
32
  add_action( 'wp_ajax_nopriv_magee_control_button', array(&$this, 'get_control_button') );
33
+
34
+ add_action('wp_ajax_say', array(&$this, 'say'));
35
+ add_action('wp_ajax_nopriv_say', array(&$this, 'say'));
36
+
37
+ add_action('wp_ajax_js', array(&$this, 'js'));
38
+ add_action('wp_ajax_nopriv_js', array(&$this, 'js'));
39
  }else{
40
  add_action( 'wp_enqueue_scripts', array($this,'frontend_scripts' ));
41
 
60
  }
61
 
62
  function admin_scripts() {
63
+ wp_enqueue_script('thickbox');
64
  wp_enqueue_style('thickbox');
65
  wp_enqueue_style( 'wp-color-picker' );
66
  wp_enqueue_style('font-awesome', plugins_url( 'assets/font-awesome/css/font-awesome.css',MAGEE_SHORTCODES_PATH ), '', '4.4.0', false );
67
+ wp_enqueue_style('magee-shortcode', plugins_url( 'assets/css/shortcode.css',MAGEE_SHORTCODES_PATH ), '', MAGEE_SHORTCODES_VER, false );
68
  wp_enqueue_style('magee-admin', plugins_url( 'assets/css/admin.css',MAGEE_SHORTCODES_PATH ), '', MAGEE_SHORTCODES_VER, false );
69
+ wp_enqueue_style('prettyPhoto', plugins_url( 'assets/css/prettyPhoto.css',MAGEE_SHORTCODES_PATH ), '', MAGEE_SHORTCODES_VER, false );
70
+ wp_enqueue_script( 'magee-twentytwenty', plugins_url( 'assets/js/jquery.twentytwenty.js',MAGEE_SHORTCODES_PATH ), array( 'jquery','wp-color-picker' ),MAGEE_SHORTCODES_VER, true );
71
  wp_enqueue_script( 'magee-admin-js', plugins_url( 'assets/js/admin.js',MAGEE_SHORTCODES_PATH ), array( 'jquery','wp-color-picker' ),MAGEE_SHORTCODES_VER, true );
72
+ wp_enqueue_script( 'combodate-js', plugins_url( 'assets/js/combodate.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),'', true );
73
+ wp_enqueue_script( 'moment-js', plugins_url( 'assets/js/moment.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),'', true );
74
 
75
  }
76
  function frontend_scripts() {
92
  wp_enqueue_script( 'jquery.twentytwenty', plugins_url( 'assets/js/jquery.twentytwenty.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'), '', false );
93
 
94
  wp_enqueue_script( 'magee-main', plugins_url( 'assets/js/magee-shortcodes.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),MAGEE_SHORTCODES_VER, true );
95
+ //wp_enqueue_script( 'magee-main', plugins_url( 'assets/js/main.js',MAGEE_SHORTCODES_PATH ), array( 'jquery'),MAGEE_SHORTCODES_VER, true );
96
 
97
  }
98
 
99
+
100
  //action to add a custom button to the content editor
101
  function add_shortcodes_button($context) {
102
 
107
  $title = __('Magee Shortcodes','magee-shortcodes');
108
 
109
  //append the icon
110
+
111
  $context .= "<a class='magee_shortcodes button' title='{$title}'><img style='margin-bottom:2px' src='{$img}' />".__("Magee Shortcodes",'magee-shortcodes')."</a>";
112
 
113
  return $context;
128
  if( isset($_POST['shortcode']) && isset($magee_shortcodes[$_POST['shortcode']]) ){
129
  if( $magee_shortcodes[$_POST['shortcode']]['popup_title'] == 'Column Shortcode'){
130
  echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
131
+ if(isset($magee_shortcodes[$_POST['shortcode']]['name'])){
132
+ echo '<div class="example-list">Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="https://demo.mageewp.com/magee-shortcodes-demo/'.$magee_shortcodes[$_POST['shortcode']]['name'].'"> Examples of use</a>.</div>';
133
+ }
134
  $this->popup = $_POST['shortcode'];
135
  echo '<div class="column-shortcode-inner">'.self::formate_shortcode().'</div>';
136
  echo '<div class="shortcode-add"><a href="#" class="child-shortcode-add">add</a></div>' ;
137
 
138
  }else{
139
  echo '<h2 class="shortcode-name">'.$magee_shortcodes[$_POST['shortcode']]['popup_title'].'</h2>';
140
+ if(isset($magee_shortcodes[$_POST['shortcode']]['name'])){
141
+ echo '<div class="example-list">Want to know more about this shortcode? Check <a class="example-link" target="_blank" href="https://demo.mageewp.com/magee-shortcodes-demo/'.$magee_shortcodes[$_POST['shortcode']]['name'].'"> Examples of use</a>.</div>';
142
+ }
143
  $this->popup = $_POST['shortcode'];
144
  echo self::formate_shortcode();
145
  }
200
  }
201
 
202
 
203
+
204
+ public static function unrecognize_shortcodes($content){
205
+ $pre = "/<pre(.*?)>(.*?)<\/pre>/";
206
+
207
+ preg_match_all($pre,$content,$result);
208
+ $count = count($result);
209
+ foreach( $result as $val){
210
+
211
+ foreach( $val as $cval){
212
+
213
+ $ck = str_replace('[',"&#91;",strval($cval));
214
+ $content = str_replace($val,$ck,$content);
215
+ }
216
+ }
217
+ return $content;
218
+
219
+ }
220
  public static function colourBrightness($hex, $percent) {
221
  // Work out if hash given
222
  $hash = '';
280
 
281
 
282
  function get_control_button(){
283
+ //path to preview icon
284
+ $preview = plugins_url( 'assets/images/preview.png',MAGEE_SHORTCODES_PATH );
285
+ //path to list icon
286
+ $list = plugins_url( 'assets/images/list.png',MAGEE_SHORTCODES_PATH );
287
+ //path to insert shortcode icon
288
+ $insert = plugins_url( 'assets/images/insert_shortcode.png',MAGEE_SHORTCODES_PATH );
289
+ echo '<div class="TB_footer" id="TB_footer"><div class="magee-shortcode-actions magee-shortcode-clearfix"><a class="button button-large magee-shortcodes-home" href="javascript:void(0);"><img src="'.$list.'"/></a><a class="button button-primary button-large magee-shortcodes-preview" ><img style="margin-bottom:-3px;margin-right:5px" src="'.$preview.'"/>'.__("Live Preview",'magee-shortcodes').'</a><a class="button button-primary button-large magee-shortcode-insert" href="javascript:void(0);"><img style="margin-bottom:-3px;margin-right:5px" src="'.$insert.'"/>'.__("Insert shortcode",'magee-shortcodes').'</a></div></div>';
290
  exit(0);
291
  }
292
 
548
  $output .= $row_start;;
549
  $output .= '<div class="magee-upload-container">';
550
  $output .= '<img src="" alt="Image" class="uploaded-image" />';
551
+ $output .= '<input type="text" class="magee-form-text magee-form-upload magee-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
552
+ $output .= '<a href="' . $pkey . '" class="button magee-upload-button" data-upid="' . $pkey . '">'.__('Upload','magee-shortcodes').'</a>';
553
  $output .= '</div>';
554
  $output .= $row_end;
555
 
578
 
579
  // prepare
580
  $output .= $row_start;
581
+ $output .= '<div class="icon-val"><input type="text" class="magee-form-text magee-input" style="display:block" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />';
582
+ $output .= '<button type="button" id="custom_icon" class="button custom_icon">Icon Picker</button>'. "\n";
583
+ $output .= '<button type="button" id="insert-media-button" class="button magee-upload-button" data-editor="content" data-upid="' . $pkey . '"><span class="wp-media-buttons-icon">'.__('Upload','magee-shortcodes').'</span></button>' . "\n";
584
+ $output .= "</div>\n";
585
+
586
  $output .= '<div class="iconpicker">';
587
+
588
+
589
  foreach( $param['options'] as $value => $option ) {
590
+
591
  $output .= '<i class="fa ' . $value . '" data-name="' . $value . '"></i>';
592
+
593
  }
594
  $output .= '</div>';
595
 
604
  $this->append_output( $output );
605
 
606
  break;
607
+
608
+ case 'icon' :
609
+
610
+ // prepare
611
+ $output .= $row_start;
612
+ $output .= '<div class="icon-val"><input type="text" class="magee-form-text magee-input" style="display:block" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />';
613
+ $output .= '<button type="button" id="custom_icon" class="button custom_icon">Icon Picker</button>'. "\n";
614
+ $output .= "</div>\n";
615
+
616
+ $output .= '<div class="iconpicker">';
617
+
618
+
619
+ foreach( $param['options'] as $value => $option ) {
620
+
621
+ $output .= '<i class="fa ' . $value . '" data-name="' . $value . '"></i>';
622
+
623
+ }
624
+ $output .= '</div>';
625
+
626
+ if(!isset($param['std'])) {
627
+ $param['std'] = '';
628
+ }
629
 
630
+
631
+ $output .= $row_end;
632
+
633
+ // append
634
+ $this->append_output( $output );
635
+
636
+ break;
637
+
638
  case 'colorpicker' :
639
 
640
  if(!isset($param['std'])) {
681
  $this->append_output( $output );
682
 
683
  break;
684
+
685
+ case 'number':
686
 
687
+ // prepare
688
+ $output .= $row_start;;
689
+ $output .= '<div class="probar"><div class="probar-control"></div></div>'. "\n";;
690
+ $output .= '<input type="number" class="magee-form-number" name="'.$pkey.'" id="'.$pkey.'" max="'.$param['max'].'" min="'.$param['min'].'" step="1" value="'.$param['std'].'"/>'. "\n";
691
+ $output .= $row_end;
692
+ // append
693
+ $this->append_output( $output );
694
+
695
+ break;
696
+
697
+ case 'choose' :
698
+
699
+ // prepare
700
+ $output .= $row_start;;
701
+ $output .= '<div class="choose-show">' . "\n";
702
+ if( $param['options'] && is_array($param['options']) ) {
703
+ foreach( $param['options'] as $value => $option )
704
+ {
705
+ $selected = (isset($param['std']) && $param['std'] == $value) ? 'style="display:block"' : '';
706
+ $output .= '<span class="choose-show-param" name="'.$value.'" '.$selected.'>' .$option. '</span>' . "\n";
707
+ }
708
+ }
709
+ $output .= '</div>' . "\n";
710
+ $output .= '<input type="hidden" class="magee-form-choose" value="" name="'.$pkey.'" id="'.$pkey.'"/>'. "\n";
711
+
712
+ $output .= $row_end;
713
+ // append
714
+ $this->append_output( $output );
715
+
716
+ break;
717
+
718
+ case 'datepicker' :
719
+
720
+ // prepare
721
+ $output .= $row_start;;
722
+ $output .= '<input type="text" id="datetime24" class="magee-form-datetime" data-format="DD-MM-YYYY HH:mm" data-template="YYYY / MM / DD HH : mm" name="datetime" value="'.$param['std'] .'">';
723
+ $output .= '<input type="text" class="magee-form-date" value="" name="'.$pkey.'" id="'.$pkey.'"/>'. "\n";
724
+ $output .= $row_end;
725
+ // append
726
+ $this->append_output( $output );
727
+
728
+ break;
729
+
730
+ case 'link' :
731
+ // prepare
732
+ $output .= $row_start;;
733
+ $output .= '<div class="icon-val"><input type="text" class="magee-form-text magee-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />';
734
+ $output .= '<button type="button" id="insert-media-button" class="button magee-upload-button" data-editor="content" data-upid="' . $pkey . '"><span class="wp-media-buttons-icon">'.__('Upload','magee-shortcodes').'</span></button>' . "\n";
735
+ $output .= '</div>' . "\n";
736
+ $output .= $row_end;
737
+ // append
738
+ $this->append_output( $output );
739
+
740
+ break;
741
  }
742
  }
743
 
976
  wp_reset_postdata();
977
  return $magee_sliders;
978
  }
979
+
980
+ /*
981
+ * live preview
982
+ * ---------------------------------------------------------------------
983
+ */
984
+ function say($all){
985
+
986
+ // echo do_shortcode(str_replace( '\"', '"', $_POST['preview'] ) );
987
+ $magee_shortcodes = $this->magee_shortcodes ;
988
+ $shortcode = '';
989
+
990
+ if( isset( $magee_shortcodes ) && is_array( $magee_shortcodes ) && isset($_POST['name']) )
991
+ {
992
+
993
+ $popup = $_POST['name'];
994
+
995
+ $params = $magee_shortcodes[$popup]['params'];
996
+
997
+ $shortcode = $magee_shortcodes[$popup]['shortcode'];
998
+
999
+
1000
+ $attrs = array();
1001
+ if( isset( $_POST['preview'] ) ):
1002
+ foreach( $_POST['preview'] as $attr){
1003
+ $attrs[str_replace('magee_','',$attr['name'])] = $attr['value'];
1004
+ }
1005
+
1006
+ foreach( $params as $pkey => $param )
1007
+ {
1008
+
1009
+ if( isset($attrs[$pkey] )){
1010
+
1011
+ $shortcode = str_replace('{{'.$pkey.'}}',$attrs[$pkey],$shortcode);
1012
+
1013
+ }else{
1014
+ $shortcode = str_replace('{{'.$pkey.'}}','',$shortcode);
1015
+ }
1016
+ }
1017
+ endif;
1018
+ if( $_POST['name'] == 'column' ):
1019
+
1020
+ if( count($_POST['preview'])>6){
1021
+
1022
+ $common = array_slice($_POST['preview'],count($_POST['preview'])-2,2) ;
1023
+ array_splice($_POST['preview'],count($_POST['preview'])-2,2);
1024
+ $loop = array_chunk($_POST['preview'],4);
1025
+ $i = '';
1026
+ $copyshortcode = '';
1027
+ for( $i=0;$i<count($loop);$i++){
1028
+ $cparams = $magee_shortcodes['column']['child_shortcode']['params'];
1029
+
1030
+ $cshortcode = $magee_shortcodes['column']['child_shortcode']['shortcode'];
1031
+ $attrs = array();
1032
+ $perattr = array_merge($loop[$i],$common);
1033
+
1034
+ foreach( $perattr as $attr){
1035
+
1036
+ $attrs[str_replace('magee_','',$attr['name'])] = $attr['value'];
1037
+ }
1038
+ foreach( $cparams as $cpkey => $cparam )
1039
+ {
1040
+
1041
+ if( isset($attrs[$cpkey] )){
1042
+
1043
+ $cshortcode = str_replace('{{'.$cpkey.'}}',$attrs[$cpkey],$cshortcode);
1044
+
1045
+ }else{
1046
+ $cshortcode = str_replace('{{'.$cpkey.'}}','',$cshortcode);
1047
+ }
1048
+ }
1049
+ $copyshortcode .= $cshortcode;
1050
+ }
1051
+ $shortcode = str_replace('{{child_shortcode}}',$copyshortcode,$shortcode);
1052
+
1053
+ }else{
1054
+ $cparams = $magee_shortcodes['column']['child_shortcode']['params'];
1055
+
1056
+ $cshortcode = $magee_shortcodes['column']['child_shortcode']['shortcode'];
1057
+ $attrs = array();
1058
+ foreach( $_POST['preview'] as $attr){
1059
+
1060
+ $attrs[str_replace('magee_','',$attr['name'])] = $attr['value'];
1061
+ }
1062
+ foreach( $cparams as $cpkey => $cparam )
1063
+ {
1064
+
1065
+ if( isset($attrs[$cpkey] )){
1066
+
1067
+ $cshortcode = str_replace('{{'.$cpkey.'}}',$attrs[$cpkey],$cshortcode);
1068
+
1069
+ }else{
1070
+ $cshortcode = str_replace('{{'.$cpkey.'}}','',$cshortcode);
1071
+ }
1072
+ }
1073
+ $shortcode = str_replace('{{child_shortcode}}',$cshortcode,$shortcode);
1074
+ }
1075
+ endif;
1076
+
1077
+
1078
+ }
1079
+ $shortcode = str_replace('\\\'','\'',$shortcode);
1080
+ $shortcode = str_replace('\\"','"',$shortcode);
1081
+ $shortcode = str_replace('\\\\','\\',$shortcode);
1082
+ $shortcode = str_replace('\"','"',$shortcode);
1083
+ echo do_shortcode($shortcode);
1084
+ die();
1085
  }
1086
+ function js(){
1087
+ $script = "<link rel='stylesheet' id='font-awesome-css' href=".plugins_url( 'assets/font-awesome/css/font-awesome.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1088
+ $script .= "<link rel='stylesheet' id='bootstrap-css' href=".plugins_url( 'assets/bootstrap/css/bootstrap.min.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1089
+ $script .= "<link rel='stylesheet' id='prettyPhoto-css' href=".plugins_url( 'assets/css/prettyPhoto.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1090
+ $script .= "<link rel='stylesheet' id='twentytwenty-css' href=".plugins_url( 'assets/css/twentytwenty.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1091
+ $script .= "<link rel='stylesheet' id='animate-css' href=".plugins_url( 'assets/css/animate.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1092
+ $script .= "<link rel='stylesheet' id='magee-shortcode-css' href=".plugins_url( 'assets/css/shortcode.css',MAGEE_SHORTCODES_PATH )." type='text/css' media='' />";
1093
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/js/jquery.twentytwenty.js',MAGEE_SHORTCODES_PATH )."></script>";
1094
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/bootstrap/js/bootstrap.min.js',MAGEE_SHORTCODES_PATH )."></script>";
1095
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/js/jquery.waypoints.js',MAGEE_SHORTCODES_PATH )."></script>";
1096
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/jquery-countdown/jquery.countdown.min.js',MAGEE_SHORTCODES_PATH )."></script>";
1097
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/jquery-easy-pie-chart/jquery.easypiechart.min.js',MAGEE_SHORTCODES_PATH )."></script>";
1098
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/js/jquery.prettyPhoto.js',MAGEE_SHORTCODES_PATH )."></script>";
1099
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/js/jquery.event.move.js',MAGEE_SHORTCODES_PATH )."></script>";
1100
+ $script .= "<script type='text/javascript' src=".plugins_url( 'assets/js/magee-shortcodes.js',MAGEE_SHORTCODES_PATH )."></script>";
1101
+ $script .= "<script type='text/javascript' src='https://f.vimeocdn.com/js/froogaloop2.min.js'></script>";
1102
+ echo $script;
1103
+ die();
1104
+ }
1105
+ }
1106
+
1107
+
inc/options.php CHANGED
@@ -7,16 +7,19 @@
7
  function magee_shortcode_menus($name){
8
  $menus[''] = 'Default';
9
  if( $name !== ''){
10
- $menu = wp_get_nav_menus();
 
 
11
  foreach ( $menu as $val){
12
- if (isset($val->name)) {
13
- $menus[$val->name] = $val->name;
14
  }
15
- }
16
  if(isset( $menus)){
17
- return $menus;
18
  }
19
- }
 
20
  }
21
 
22
  global $magee_shortcodes,$magee_sliders;
@@ -28,7 +31,7 @@ $choices_with_default = array( '' => 'Default', 'yes' => 'Yes', 'no' => 'No' );
28
  $reverse_choices_with_default = array( '' => 'Default', 'no' => 'No', 'yes' => 'Yes' );
29
  $leftright = array( 'left' => 'Left', 'right' => 'Right' );
30
  $textalign = array( 'left' => __( 'Left', 'magee-shortcodes' ), 'center' => __( 'Center', 'magee-shortcodes' ), 'right' => __( 'Right', 'magee-shortcodes' ) );
31
-
32
  $dec_numbers = array( '0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5', '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1' => '1', '2' => '2', '2.5' => '2.5', '3' => '3' );
33
  $animation_type = array('' => 'None',"bounce" => "bounce", "flash" => "flash", "pulse" => "pulse", "rubberBand" => "rubberBand", "shake" => "shake", "swing" => "swing", "tada" => "tada", "wobble" => "wobble", "bounceIn" => "bounceIn", "bounceInDown" => "bounceInDown", "bounceInLeft" => "bounceInLeft", "bounceInRight" => "bounceInRight", "bounceInUp" => "bounceInUp", "bounceOut" => "bounceOut", "bounceOutDown" => "bounceOutDown", "bounceOutLeft" => "bounceOutLeft", "bounceOutRight" => "bounceOutRight", "bounceOutUp" => "bounceOutUp", "fadeIn" => "fadeIn", "fadeInDown" => "fadeInDown", "fadeInDownBig" => "fadeInDownBig", "fadeInLeft" => "fadeInLeft", "fadeInLeftBig" => "fadeInLeftBig", "fadeInRight" => "fadeInRight", "fadeInRightBig" => "fadeInRightBig", "fadeInUp" => "fadeInUp", "fadeInUpBig" => "fadeInUpBig", "fadeOut" => "fadeOut", "fadeOutDown" => "fadeOutDown", "fadeOutDownBig" => "fadeOutDownBig", "fadeOutLeft" => "fadeOutLeft", "fadeOutLeftBig" => "fadeOutLeftBig", "fadeOutRight" => "fadeOutRight", "fadeOutRightBig" => "fadeOutRightBig", "fadeOutUp" => "fadeOutUp", "fadeOutUpBig" => "fadeOutUpBig", "flip" => "flip", "flipInX" => "flipInX", "flipInY" => "flipInY", "flipOutX" => "flipOutX", "flipOutY" => "flipOutY", "lightSpeedIn" => "lightSpeedIn", "lightSpeedOut" => "lightSpeedOut", "rotateIn" => "rotateIn", "rotateInDownLeft" => "rotateInDownLeft", "rotateInDownRight" => "rotateInDownRight", "rotateInUpLeft" => "rotateInUpLeft", "rotateInUpRight" => "rotateInUpRight", "rotateOut" => "rotateOut", "rotateOutDownLeft" => "rotateOutDownLeft", "rotateOutDownRight" => "rotateOutDownRight", "rotateOutUpLeft" => "rotateOutUpLeft", "rotateOutUpRight" => "rotateOutUpRight", "hinge" => "hinge", "rollIn" => "rollIn", "rollOut" => "rollOut", "zoomIn" => "zoomIn", "zoomInDown" => "zoomInDown", "zoomInLeft" => "zoomInLeft", "zoomInRight" => "zoomInRight", "zoomInUp" => "zoomInUp", "zoomOut" => "zoomOut", "zoomOutDown" => "zoomOutDown", "zoomOutLeft" => "zoomOutLeft", "zoomOutRight" => "zoomOutRight", "zoomOutUp" => "zoomOutUp", "slideInDown" => "slideInDown", "slideInLeft" => "slideInLeft", "slideInRight" => "slideInRight", "slideInUp" => "slideInUp", "slideOutDown" => "slideOutDown", "slideOutLeft" => "slideOutLeft", "slideOutRight" => "slideOutRight", "slideOutUp" => "slideOutUp");
34
  $columns = array(""=>"default","1"=>"1/12","2"=>"2/12","3"=>"3/12","4"=>"4/12","5"=>"5/12","6"=>"6/12","7"=>"7/12","8"=>"8/12","9"=>"9/12","10"=>"10/12","11"=>"11/12","12"=>"12/12");
@@ -102,7 +105,7 @@ $magee_shortcodes['accordion'] = array(
102
  ),
103
  'shortcode' => '[ms_accordion style="{{style}}" type="{{type}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_accordion]',
104
  'popup_title' => __( 'Accordion Shortcode', 'magee-shortcodes' ),
105
-
106
 
107
  );
108
 
@@ -144,29 +147,33 @@ $magee_shortcodes['alert'] = array(
144
 
145
 
146
  'border_width' => array(
147
- 'std' => '0px',
148
- 'type' => 'text',
 
 
149
  'label' => __( 'Border Width', 'magee-shortcodes' ),
150
  'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
151
  ),
152
 
153
  'border_radius' => array(
154
- 'std' => '0px',
155
- 'type' => 'text',
 
 
156
  'label' => __( 'Border Radius', 'magee-shortcodes' ),
157
  'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
158
  ),
159
 
160
  'box_shadow' => array(
161
  'std' => '',
162
- 'type' => 'select',
163
  'label' => __( 'Box Shadow', 'magee-shortcodes' ),
164
  'desc' => __( 'Display a box shadow for alert.', 'magee-shortcodes' ),
165
  'options' => $reverse_choices
166
  ),
167
  'dismissable' => array(
168
  'std' => '',
169
- 'type' => 'select',
170
  'label' => __( 'Dismissable', 'magee-shortcodes' ),
171
  'desc' => __( 'The alert box is dismissable.', 'magee-shortcodes' ),
172
  'options' => $reverse_choices
@@ -186,7 +193,8 @@ $magee_shortcodes['alert'] = array(
186
  ),
187
  ),
188
  'shortcode' => '[ms_alert icon="{{icon}}" background_color="{{background_color}}" text_color="{{text_color}}" border_width="{{border_width}}" border_radius="{{border_radius}}" box_shadow="{{box_shadow}}" dismissable="{{dismissable}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_alert]',
189
- 'popup_title' => __( 'Alert Shortcode', 'magee-shortcodes' )
 
190
  );
191
 
192
  /*-----------------------------------------------------------------------------------*/
@@ -198,42 +206,42 @@ $magee_shortcodes['audio'] = array(
198
  'params' => array(
199
  'mp3' => array(
200
  'std' => '',
201
- 'type' => 'text',
202
  'label' => __( 'Mp3 URL', 'magee-shortcodes'),
203
  'desc' => __( 'Add the URL of audio in MP3 format.', 'magee-shortcodes')
204
  ),
205
  'ogg' => array(
206
  'std' => '',
207
- 'type' => 'text',
208
  'label' => __( 'Ogg URL', 'magee-shortcodes'),
209
  'desc' => __( 'Add the URL of audio in OGG format.', 'magee-shortcodes')
210
  ),
211
  'wav' => array(
212
  'std' => '',
213
- 'type' => 'text',
214
  'label' => __( 'Wav URL', 'magee-shortcodes'),
215
  'desc' => __( 'Add the URL of audio in WAV format.', 'magee-shortcodes')
216
  ),
217
  'mute' => array(
218
- 'type' => 'select',
219
  'label' => __( 'Mute Audio','magee-shortcodes'),
220
  'desc' => __('Choose to mute the audio.','magee-shortcodes'),
221
  'options' => $reverse_choices,
222
  ),
223
  'autoplay' => array(
224
- 'type' => 'select',
225
  'label' => __( 'Autoplay Audio','magee-shortcodes'),
226
  'desc' => __('Choose to autoplay the audio.','magee-shortcodes'),
227
  'options' => $choices,
228
  ),
229
  'loop' => array(
230
- 'type' => 'select',
231
  'label' => __( 'Loop Audio','magee-shortcodes'),
232
  'desc' => __('Choose to loop the audio.','magee-shortcodes'),
233
  'options' => $choices,
234
  ),
235
  'controls' => array(
236
- 'type' => 'select',
237
  'label' => __( 'Controls Audio','magee-shortcodes'),
238
  'desc' => __('Choose to display controls of the audio.','magee-shortcodes'),
239
  'options' => $choices,
@@ -252,7 +260,8 @@ $magee_shortcodes['audio'] = array(
252
  ),
253
  ),
254
  'shortcode' => '[ms_audio mp3="{{mp3}}" ogg="{{ogg}}" wav="{{wav}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_audio]' ,
255
- 'popup_title' => __( 'Audio Shortcode','magee-shortcodes')
 
256
  );
257
 
258
  /*******************************************************
@@ -299,8 +308,10 @@ $magee_shortcodes['button'] = array(
299
  ),
300
 
301
  'border_width' => array(
302
- 'std' => '',
303
- 'type' => 'text',
 
 
304
  'label' => __('Border Width', 'magee-shortcodes'),
305
  'desc' => __('In pixels (px), default: 2px.', 'magee-shortcodes'),
306
  ),
@@ -317,26 +328,26 @@ $magee_shortcodes['button'] = array(
317
  )
318
  ),
319
  'shadow' => array(
320
- 'type' => 'select',
321
  'label' => __( 'Text Shadow', 'magee-shortcodes' ),
322
  'desc' => __( 'Display shadow for button text.', 'magee-shortcodes' ),
323
  'options' => $reverse_choices
324
  ),
325
  'gradient' => array(
326
- 'type' => 'select',
327
  'label' => __( 'Gradient', 'magee-shortcodes' ),
328
  'desc' => __( 'Display gradient for button.', 'magee-shortcodes' ),
329
  'options' => $reverse_choices
330
  ),
331
  'block' => array(
332
- 'type' => 'select',
333
  'label' => __( 'Block Button', 'magee-shortcodes' ),
334
  'desc' => __( 'Display in full width.', 'magee-shortcodes' ),
335
  'options' => $reverse_choices
336
  ),
337
 
338
  'target' => array(
339
- 'type' => 'select',
340
  'label' => __( 'Button Target', 'magee-shortcodes' ),
341
  'desc' => __( '_self = open in same window <br />_blank = open in new window.', 'magee-shortcodes' ),
342
  'options' => array(
@@ -394,7 +405,8 @@ $magee_shortcodes['button'] = array(
394
  ),
395
  ),
396
  'shortcode' => '[ms_button style="{{style}}" link="{{link}}" size="{{size}}" shape="{{shape}}" shadow="{{shadow}}" block="{{block}}" target="{{target}}" gradient="{{gradient}}" color="{{color}}" text_color="{{textcolor}}" icon="{{icon}}" icon_animation_type="{{iconanimationtype}}" border_width="{{border_width}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_button]',
397
- 'popup_title' => __( 'Button Shortcode', 'magee-shortcodes')
 
398
  );
399
 
400
 
@@ -410,6 +422,7 @@ $magee_shortcodes['column'] = array(
410
  ),
411
  'shortcode' => '[ms_row]{{child_shortcode}}[/ms_row]',
412
  'popup_title' => __( 'Column Shortcode', 'magee-shortcodes'),
 
413
  'child_shortcode' => array(
414
  'params' => array(
415
  'style' => array(
@@ -456,49 +469,6 @@ $magee_shortcodes['column'] = array(
456
 
457
  );
458
 
459
-
460
- /*******************************************************
461
- * Custom Box Config
462
- ********************************************************/
463
- $magee_shortcodes['custom_box'] = array(
464
- 'no_preview' => true,
465
- 'icon' => 'fa-list-alt',
466
- 'params' => array(
467
- 'content' => array(
468
- 'std' => __('Custom Box Content', 'magee-shortcodes'),
469
- 'type' => 'textarea',
470
- 'label' => __( 'Content', 'magee-shortcodes' ),
471
- 'desc' => __( 'Insert content for custom box.', 'magee-shortcodes' ),
472
- ),
473
- 'backgroundimage' => array(
474
- 'type' => 'uploader',
475
- 'label' => __( 'Background Image', 'magee-shortcodes' ),
476
- 'desc' => __( 'Upload an image to display in background of custom box.', 'magee-shortcodes' ),
477
- ),
478
- 'padding' => array(
479
- 'std' => '30px',
480
- 'type' => 'text',
481
- 'label' => __( 'Padding', 'magee-shortcodes' ),
482
- 'desc' => __( 'Content Padding. eg:30px', 'magee-shortcodes')
483
- ),
484
- 'class' => array(
485
- 'std' => '',
486
- 'type' => 'text',
487
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
488
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
489
- ),
490
- 'id' => array(
491
- 'std' => '',
492
- 'type' => 'text',
493
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
494
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
495
- ),
496
- ),
497
- 'shortcode' => '[ms_custom_box backgroundimage="{{backgroundimage}}" padding="{{padding}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_custom_box]',
498
- 'popup_title' => __( ' Custom Box Shortcode', 'magee-shortcodes')
499
- );
500
-
501
-
502
  /*-----------------------------------------------------------------------------------*/
503
  /* Countdowns Config
504
  /*-----------------------------------------------------------------------------------*/
@@ -511,8 +481,8 @@ $magee_shortcodes['countdowns'] = array(
511
 
512
 
513
  'endtime' => array(
514
- 'std' => date('Y-m-d H:i:s',strtotime(' 1 month')),
515
- 'type' => 'text',
516
  'label' => __( 'Set end time for countdown.', 'magee-shortcodes' ),
517
  'desc' => '',
518
 
@@ -547,7 +517,8 @@ $magee_shortcodes['countdowns'] = array(
547
 
548
  ),
549
  'shortcode' => '[ms_countdowns endtime="{{endtime}}" fontcolor="{{fontcolor}}" backgroundcolor="{{backgroundcolor}}" class="{{class}}" id="{{id}}"]',
550
- 'popup_title' => __( 'Countdowns Shortcode', 'magee-shortcodes' )
 
551
  );
552
 
553
 
@@ -591,7 +562,9 @@ $magee_shortcodes['counter'] = array(
591
 
592
  'counter_num' => array(
593
  'std' => '100',
594
- 'type' => 'text',
 
 
595
  'label' => __( 'Counter Num', 'magee-shortcodes' ),
596
  'desc' => __( 'The animated counter number.', 'magee-shortcodes' ),
597
  ),
@@ -610,7 +583,7 @@ $magee_shortcodes['counter'] = array(
610
  ),
611
 
612
  'border' => array(
613
- 'type' => 'select',
614
  'label' => __( 'Display Border', 'magee-shortcodes' ),
615
  'desc' => __( 'Choose to display border for counter.', 'magee-shortcodes' ),
616
  'options' => array(
@@ -636,9 +609,136 @@ $magee_shortcodes['counter'] = array(
636
 
637
  ),
638
  'shortcode' => '[ms_counter top_icon="{{top_icon}}" top_icon_color="{{top_icon_color}}" left_icon="{{left_icon}}" counter_num="{{counter_num}}" left_text="{{left_text}}" right_text="{{right_text}}" title="{{title}}" border="{{border}}" class="{{class}}" id="{{id}}"]',
639
- 'popup_title' => __( 'Counter Shortcode', 'magee-shortcodes' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
640
  );
641
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
 
643
  /*******************************************************
644
  * Divider Config
@@ -681,25 +781,32 @@ $magee_shortcodes['divider'] = array(
681
  )
682
  ),
683
  'margin_top' => array(
684
- 'std' => '30px',
685
- 'type' => 'text',
 
 
686
  'label' => __( 'Margin Top', 'magee-shortcodes' ),
687
  'desc' => __( 'Spacing above the separator. In pixels.', 'magee-shortcodes' ),
688
  ),
689
  'margin_bottom' => array(
690
- 'std' => '30px',
691
- 'type' => 'text',
 
 
692
  'label' => __( 'Margin Bottom', 'magee-shortcodes' ),
693
  'desc' => __( 'Spacing under the separator. In pixels.', 'magee-shortcodes' ),
694
  ),
695
 
696
  'border_size' => array(
697
- 'std' => '',
698
- 'type' => 'text',
 
 
699
  'label' => __( 'Border Size', 'magee-shortcodes' ),
700
  'desc' => __( 'In pixels (px), eg: 1px. ', 'magee-shortcodes' ),
701
  ),
702
  'border_color' => array(
 
703
  'type' => 'colorpicker',
704
  'label' => __( 'Border Color', 'magee-shortcodes' ),
705
  'desc' => __( 'Set the border color.', 'magee-shortcodes' )
@@ -725,57 +832,9 @@ $magee_shortcodes['divider'] = array(
725
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
726
  ),
727
  ),
728
- 'shortcode' => '[ms_divider style="{{style}}" align="{{align}}" width="{{width}}" margin_top="{{margin_top}}" margin_bottom="{{margin_bottom}}" border_size="{{border_size}}" border_color="{{border_color}}" icon="{{icon}}" class="{{class}}" id="{{id}}"]',
729
- 'popup_title' => __( 'Divider Shortcode', 'magee-shortcodes')
730
- );
731
-
732
-
733
- /*-----------------------------------------------------------------------------------*/
734
- /* Dropcap Config
735
- /*-----------------------------------------------------------------------------------*/
736
-
737
- $magee_shortcodes['dropcap'] = array(
738
- 'no_preview' => true,
739
- 'icon' => 'fa-square',
740
- 'params' => array(
741
- 'content' => array(
742
- 'std' => 'A',
743
- 'type' => 'textarea',
744
- 'label' => __( 'Dropcap Letter', 'magee-shortcodes' ),
745
- 'desc' => __( 'Add the letter to be used as dropcap', 'magee-shortcodes' ),
746
- ),
747
- 'color' => array(
748
- 'type' => 'colorpicker',
749
- 'label' => __( 'Color', 'magee-shortcodes' ),
750
- 'desc' => __( 'Controls the color of the dropcap letter. Leave blank for theme option selection.', 'magee ')
751
- ),
752
- 'boxed' => array(
753
- 'type' => 'select',
754
- 'label' => __( 'Boxed Dropcap', 'magee-shortcodes' ),
755
- 'desc' => __( 'Choose to get a boxed dropcap.', 'magee-shortcodes' ),
756
- 'options' => $reverse_choices
757
- ),
758
- 'boxedradius' => array(
759
- 'std' => '8px',
760
- 'type' => 'text',
761
- 'label' => __( 'Box Radius', 'magee-shortcodes' ),
762
- 'desc' => __('Choose the radius of the boxed dropcap. In pixels (px), eg: 1px', 'magee-shortcodes')
763
- ),
764
- 'class' => array(
765
- 'std' => '',
766
- 'type' => 'text',
767
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
768
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
769
- ),
770
- 'id' => array(
771
- 'std' => '',
772
- 'type' => 'text',
773
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
774
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
775
- ),
776
- ),
777
- 'shortcode' => '[ms_dropcap color="{{color}}" boxed="{{boxed}}" boxed_radius="{{boxedradius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_dropcap]',
778
- 'popup_title' => __( 'Dropcap Shortcode', 'magee-shortcodes' )
779
  );
780
 
781
  /*-----------------------------------------------------------------------------------*/
@@ -788,24 +847,28 @@ $magee_shortcodes['document'] = array(
788
  'params' => array(
789
  'url' => array(
790
  'std' => '',
791
- 'type' => 'uploader',
792
  'label' => __( 'Doc URL','magee-shortcodes'),
793
  'desc' => __( 'Upload document to display. Supported formats: doc, xls, pdf etc.','magee-shortcodes')
794
  ),
795
  'width' => array(
796
- 'std' => '',
797
- 'type' => 'text',
 
 
798
  'label' => __( 'Width', 'magee-shortcodes'),
799
  'desc' => __( 'Set width for doc.', 'magee-shortcodes')
800
  ),
801
  'height' => array(
802
- 'std' => '',
803
- 'type' => 'text',
 
 
804
  'label' => __( 'Height', 'magee-shortcodes'),
805
  'desc' => __( 'Set height for doc.', 'magee-shortcodes')
806
  ),
807
  'responsive' => array(
808
- 'type' => 'select',
809
  'label' => __( 'Responsive','magee-shortcodes'),
810
  'desc' => __( 'Choose to responsive or not', 'magee-shortcodes'),
811
  'options' => $choices
@@ -833,50 +896,61 @@ $magee_shortcodes['document'] = array(
833
  ),
834
  ),
835
  'shortcode' => '[ms_document url="{{url}}" width="{{width}}" height="{{height}}" responsive="{{responsive}}" viewer="{{viewer}}" class="{{class}}" id="{{id}}"][/ms_document]',
836
- 'popup_title' => __( 'Document Shortcode','magee-shortcodes')
 
837
  );
838
 
839
  /*-----------------------------------------------------------------------------------*/
840
- /* Dummy_text Config
841
  /*-----------------------------------------------------------------------------------*/
842
 
843
- $magee_shortcodes['dummy_text'] = array(
844
- 'no_preview' => true,
845
- 'icon' => 'fa-text-height',
846
  'params' => array(
847
- 'style' =>array(
848
- 'type' => 'select',
849
- 'label' => __( 'Style','magee-shortcodes'),
850
- 'desc' => __( 'Select text type.','magee-shortcodes'),
851
- 'options' => array(
852
- 'paras' => __( 'Paragraphs', 'magee-shortcodes' ),
853
- 'words' => __( 'Words', 'magee-shortcodes' ),
854
- 'bytes' => __( 'Bytes', 'magee-shortcodes' ),
855
- )
856
- ),
857
- 'amount' => array(
858
- 'std' => '3',
859
- 'type' => 'text',
860
- 'label' => __( 'Amount','magee-shortcodes'),
861
- 'desc' => __( 'Choose how many paragraphs or words to show','magee-shortcodes')
 
 
 
 
 
 
 
 
 
862
  ),
863
  'class' => array(
864
  'std' => '',
865
  'type' => 'text',
866
- 'label' => __( 'CSS Class', 'magee-shortcodes'),
867
  'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
868
  ),
869
  'id' => array(
870
  'std' => '',
871
  'type' => 'text',
872
- 'label' => __( 'CSS ID', 'magee-shortcodes'),
873
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
874
  ),
875
  ),
876
- 'shortcode' => '[ms_dummy_text style="{{style}}" amount="{{amount}}" class="{{class}}" id="{{id}}"][/ms_dummy_text]' ,
877
- 'popup_title' => __( 'Dummy Text Shortcode','magee-shortcodes')
 
878
  );
879
-
880
  /*-----------------------------------------------------------------------------------*/
881
  /* Dummy_image Config
882
  /*-----------------------------------------------------------------------------------*/
@@ -907,14 +981,18 @@ $magee_shortcodes['dummy_image'] = array(
907
  )
908
  ),
909
  'width' => array(
910
- 'std' => '',
911
- 'type' => 'text',
 
 
912
  'label' => __( 'Width', 'magee-shortcodes'),
913
  'desc' => __( 'Set width for image.', 'magee-shortcodes')
914
  ),
915
  'height' => array(
916
- 'std' => '',
917
- 'type' => 'text',
 
 
918
  'label' => __( 'Height', 'magee-shortcodes'),
919
  'desc' => __( 'Set height for image.', 'magee-shortcodes')
920
  ),
@@ -933,89 +1011,55 @@ $magee_shortcodes['dummy_image'] = array(
933
 
934
  ),
935
  'shortcode' => '[ms_dummy_image style="{{style}}" width="{{width}}" height="{{height}}" class="{{class}}" id="{{id}}"][/ms_dummy_image]' ,
936
- 'popup_title' => __( 'Dummy Image Shortcode','magee-shortcodes')
 
937
  );
938
 
 
939
  /*-----------------------------------------------------------------------------------*/
940
- /* Dailymotion Config
941
  /*-----------------------------------------------------------------------------------*/
942
 
943
- $magee_shortcodes['dailymotion'] = array(
944
  'no_preview' => true,
945
- 'icon' => 'fa-video-camera',
946
- 'params' => array(
947
-
948
- 'link' => array(
949
- 'std' => '',
950
- 'type' => 'text',
951
- 'label' => __( 'Dailymotion URL', 'magee-shortcodes' ),
952
- 'desc' => __( 'Add the URL the video will link to, ex: http://example.com.', 'magee-shortcodes' ),
953
- ),
954
- 'width' => array(
955
- 'std' => '100%',
956
- 'type' => 'text',
957
- 'label' => __('Width','magee-shortcodes'),
958
- 'desc' => __('In pixels (px), eg:1px.','magee-shortcodes'),
959
- ),
960
- 'height' => array(
961
- 'std' => '100%',
962
- 'type' => 'text',
963
- 'label' => __('Height','magee-shortcodes'),
964
- 'desc' => __('In pixels (px), eg:1px.','magee-shortcodes'),
965
- ),
966
- 'mute' => array(
967
- 'std' => '',
968
- 'type' => 'select',
969
- 'label' => __('Mute Video' ,'magee-shortcodes'),
970
- 'desc' => __('Choose to mute the video.','magee-shortcodes'),
971
- 'options' => $reverse_choices
972
- ),
973
- 'autoplay' =>array(
974
- 'std' => '',
975
- 'type' => 'select',
976
- 'label' => __('Autoplay Video','magee-shortcodes'),
977
- 'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
978
- 'options' => array(
979
- 'yes' => __('Yes','magee-shortcodes'),
980
- 'no' => __('No','magee-shortcodes'),
981
- )
982
- ),
983
- 'loop' =>array(
984
- 'std' => '',
985
- 'type' => 'select',
986
- 'label' => __('Loop Video','magee-shortcodes'),
987
- 'desc' => __('Choose to loop the video.','magee-shortcodes'),
988
- 'options' => array(
989
- 'yes' => __('Yes','magee-shortcodes'),
990
- 'no' => __('No','magee-shortcodes')
991
- )
992
- ),
993
- 'controls' =>array(
994
- 'std' => '',
995
  'type' => 'select',
996
- 'label' => __('Show Controls','magee-shortcodes'),
997
- 'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
998
  'options' => array(
999
- 'yes' => __('Yes','magee-shortcodes'),
1000
- 'no' => __('No','magee-shortcodes')
 
1001
  )
 
 
 
 
 
 
 
 
1002
  ),
1003
- 'class' =>array(
1004
- 'std' => '',
1005
  'type' => 'text',
1006
- 'label' => __('CSS Class','magee-shortcodes'),
1007
- 'desc' => __('Add a class to the wrapping HTML element.','magee-shortcodes')
1008
- ),
1009
- 'id' => array(
1010
  'std' => '',
1011
  'type' => 'text',
1012
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
1013
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1014
  ),
1015
  ),
1016
- 'shortcode' => '[ms_dailymotion link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_dailymotion]',
1017
- 'popup_title' => __( 'Dailymotion Shortcode', 'magee-shortcodes' )
1018
- );
 
 
1019
 
1020
  /*-----------------------------------------------------------------------------------*/
1021
  /* Expand Config
@@ -1069,7 +1113,8 @@ $magee_shortcodes['expand'] = array(
1069
  ),
1070
  ),
1071
  'shortcode' => '[ms_expand class="{{class}}" id="{{id}}" more_icon="{{more_icon}}" more_text="{{more_text}}" less_icon="{{less_icon}}" less_text="{{less_text}}"]{{content}}[/ms_expand]',
1072
- 'popup_title' => __( 'Expand Shortcode', 'magee-shortcodes')
 
1073
  );
1074
 
1075
  /*-----------------------------------------------------------------------------------*/
@@ -1100,8 +1145,10 @@ $magee_shortcodes['featurebox'] = array(
1100
  ),
1101
 
1102
  'title_font_size' => array(
1103
- 'std' => '18px',
1104
- 'type' => 'text',
 
 
1105
  'label' => __( 'Title Font Size', 'magee-shortcodes' ),
1106
  'desc' => __( 'Set font size for title of feature box.', 'magee-shortcodes' ),
1107
  ),
@@ -1117,14 +1164,16 @@ $magee_shortcodes['featurebox'] = array(
1117
  'options' => $animation_type
1118
  ),
1119
  'icon' => array(
1120
- 'type' => 'iconpicker',
1121
  'label' => __( 'Icon', 'magee-shortcodes' ),
1122
  'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
1123
  'options' => $icons
1124
  ),
1125
  'icon_size' => array(
1126
- 'std' => '46px',
1127
- 'type' => 'text',
 
 
1128
  'label' => __( 'Icon Size', 'magee-shortcodes' ),
1129
  'desc' => __( 'Set size for icon of feature box.', 'magee-shortcodes' ),
1130
  ),
@@ -1139,8 +1188,10 @@ $magee_shortcodes['featurebox'] = array(
1139
  'desc' => __( 'Set border color for icon of feature box.', 'magee-shortcodes' ),
1140
  ),
1141
  'icon_border_width' => array(
1142
- 'std' => '',
1143
- 'type' => 'text',
 
 
1144
  'label' => __( 'Icon Border Width', 'magee-shortcodes' ),
1145
  'desc' => __( 'Set border width for icon of feature box.', 'magee-shortcodes' ),
1146
  ),
@@ -1159,7 +1210,7 @@ $magee_shortcodes['featurebox'] = array(
1159
 
1160
  'spinning_icon' => array(
1161
  'std' => '',
1162
- 'type' => 'select',
1163
  'label' => __( 'Spinning Icon', 'magee-shortcodes' ),
1164
  'desc' => __( 'Choose to spin the icon of feature box.', 'magee-shortcodes' ),
1165
  'options' => $reverse_choices
@@ -1173,7 +1224,7 @@ $magee_shortcodes['featurebox'] = array(
1173
 
1174
  'alignment' => array(
1175
  'std' => '',
1176
- 'type' => 'select',
1177
  'label' => __( 'Icon Alignment', 'magee-shortcodes' ),
1178
  'desc' => __( 'Set alignment for style2/style3 of feature box.', 'magee-shortcodes' ),
1179
  'options' => array(
@@ -1184,7 +1235,7 @@ $magee_shortcodes['featurebox'] = array(
1184
  ),
1185
  'icon_circle' => array(
1186
  'std' => '',
1187
- 'type' => 'select',
1188
  'label' => __( 'Icon Circle', 'magee-shortcodes' ),
1189
  'desc' => __( 'Choose to display icon of feature box in circle.', 'magee-shortcodes' ),
1190
  'options' => $reverse_choices
@@ -1197,14 +1248,18 @@ $magee_shortcodes['featurebox'] = array(
1197
  'desc' => __( 'To upload your own icon image, remember to deselect icon above.', 'magee-shortcodes' ),
1198
  ),
1199
  'icon_image_width' => array(
1200
- 'std' => '',
1201
- 'type' => 'text',
 
 
1202
  'label' => __( 'Icon Image Width', 'magee-shortcodes' ),
1203
  'desc' => __( 'If using custom icon image, set icon image width. In percentage of pixels (px), eg: 1px.', 'magee-shortcodes' ),
1204
  ),
1205
  'icon_image_height' => array(
1206
  'std' => '',
1207
- 'type' => 'text',
 
 
1208
  'label' => __( 'Icon Image Height', 'magee-shortcodes' ),
1209
  'desc' => __( 'If using custom icon image, set icon image height. In percentage of pixels (px), eg: 1px.', 'magee-shortcodes' ),
1210
  ),
@@ -1218,7 +1273,7 @@ $magee_shortcodes['featurebox'] = array(
1218
  ),
1219
  'link_target' => array(
1220
  'std' => '',
1221
- 'type' => 'select',
1222
  'label' => __( 'Link Target', 'magee-shortcodes' ),
1223
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
1224
  'options' => array(
@@ -1269,13 +1324,11 @@ $magee_shortcodes['featurebox'] = array(
1269
  ),
1270
  ),
1271
  'shortcode' => '[ms_featurebox style="{{style}}" title_font_size="{{title_font_size}}" title_color="{{title_color}}" icon_circle="{{icon_circle}}" icon_size="{{icon_size}}" title="{{title}}" icon="{{icon}}" alignment="{{alignment}}" icon_animation_type="{{icon_animation_type}}" icon_color="{{icon_color}}" icon_background_color="{{icon_background_color}}" icon_border_color="{{icon_border_color}}" icon_border_width="{{icon_border_width}}" flip_icon="{{flip_icon}}" spinning_icon="{{spinning_icon}}" icon_image="{{icon_image}}" icon_image_width="{{icon_image_width}}" icon_image_height="{{icon_image_height}}" link_url="{{link_url}}" link_target="{{link_target}}" link_text="{{link_text}}" link_color="{{link_color}}" content_color="{{content_color}}" content_box_background_color="{{content_box_background_color}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_featurebox]',
1272
- 'popup_title' => __( 'Feature Box Shortcode', 'magee-shortcodes')
 
1273
  );
1274
 
1275
 
1276
-
1277
-
1278
-
1279
  /*******************************************************
1280
  * Flip Box Config
1281
  ********************************************************/
@@ -1289,13 +1342,15 @@ $magee_shortcodes['flip_box'] = array(
1289
  'label' => __( 'Direction', 'magee-shortcodes' ),
1290
  'desc' => __( 'Select flip directioon.', 'magee-shortcodes' ),
1291
  'options' => array(
1292
- 'horizontal' => __('horizontal', 'magee-shortcodes'),
1293
- 'vertical' => __('vertical', 'magee-shortcodes'),
1294
  )
1295
  ),
1296
  'front_paddings' => array(
1297
- 'std' => '15px',
1298
- 'type' => 'text',
 
 
1299
  'label' => __( 'Front Container Paddings', 'magee-shortcodes' ),
1300
  'desc' => __( 'Set paddings for front container of flip box.', 'magee-shortcodes' ),
1301
  ),
@@ -1317,8 +1372,10 @@ $magee_shortcodes['flip_box'] = array(
1317
  'desc' => __( 'Insert content for front container of flip box.', 'magee-shortcodes' ),
1318
  ),
1319
  'back_paddings' => array(
1320
- 'std' => '15px',
1321
- 'type' => 'text',
 
 
1322
  'label' => __( 'Back Container Paddings', 'magee-shortcodes' ),
1323
  'desc' => __( 'Set paddings for back container of flip box.', 'magee-shortcodes' ),
1324
  ),
@@ -1355,56 +1412,12 @@ $magee_shortcodes['flip_box'] = array(
1355
  ),
1356
  ),
1357
  'shortcode' => '[ms_flip_box direction="{{direction}}" front_paddings="{{front_paddings}}" front_background="{{front_background}}" back_paddings="{{back_paddings}}" back_background="{{back_background}}" class="{{class}}" id="{{id}}"]{{front_content}}|||{{back_content}}[/ms_flip_box]',
1358
- 'popup_title' => __( 'Flip Box Shortcode', 'magee-shortcodes')
1359
- );
1360
-
1361
- /*-----------------------------------------------------------------------------------*/
1362
- /* Highlight Config
1363
- /*-----------------------------------------------------------------------------------*/
1364
-
1365
- $magee_shortcodes['highlight'] = array(
1366
- 'no_preview' => true,
1367
- 'icon' => 'fa-magic',
1368
- 'params' => array(
1369
-
1370
- 'background_color' => array(
1371
- 'type' => 'colorpicker',
1372
- 'label' => __( 'Background Color', 'magee-shortcodes' ),
1373
- 'desc' => __( 'Set background color for highlight item.', 'magee-shortcodes')
1374
- ),
1375
- 'border_radius' => array(
1376
- 'type' => 'text',
1377
- 'std' =>'5px',
1378
- 'label' => __( 'Border Radius', 'magee-shortcodes' ),
1379
- 'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
1380
- ),
1381
-
1382
- 'content' => array(
1383
- 'std' => __('Your Content Goes Here', 'magee-shortcodes'),
1384
- 'type' => 'textarea',
1385
- 'label' => __( 'Content to Higlight', 'magee-shortcodes' ),
1386
- 'desc' => __( 'Insert content to highlight.', 'magee-shortcodes' ),
1387
- ),
1388
- 'class' => array(
1389
- 'std' => '',
1390
- 'type' => 'text',
1391
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
1392
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
1393
- ),
1394
- 'id' => array(
1395
- 'std' => '',
1396
- 'type' => 'text',
1397
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
1398
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1399
- ),
1400
-
1401
- ),
1402
- 'shortcode' => '[ms_highlight background_color="{{background_color}}" border_radius="{{border_radius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_highlight]',
1403
- 'popup_title' => __( 'Highlight Shortcode', 'magee-shortcodes' )
1404
  );
1405
 
1406
  /*-----------------------------------------------------------------------------------*/
1407
- /* Heading, Config
1408
  /*-----------------------------------------------------------------------------------*/
1409
 
1410
  $magee_shortcodes['heading'] = array(
@@ -1425,11 +1438,11 @@ $magee_shortcodes['heading'] = array(
1425
  'std' => 'border',
1426
  'desc' => __( 'Choose a heading style. Leave blank as default.', 'magee-shortcodes'),
1427
  'options' => array(
1428
- 'none' => 'none',
1429
- 'border' => 'border',
1430
- 'boxed' => 'boxed',
1431
- 'boxed-reverse' => 'boxed-reverse',
1432
- 'doubleline' => 'doubleline',
1433
  )
1434
  ),
1435
 
@@ -1469,32 +1482,40 @@ $magee_shortcodes['heading'] = array(
1469
  ),
1470
 
1471
  'font_size' => array(
1472
- 'std' => '36px',
1473
- 'type' => 'text',
 
 
1474
  'label' => __( 'Font Size', 'magee-shortcodes'),
1475
  'desc' => __( 'Set font size for heading text. In pixels (px), eg: 1px.', 'magee-shortcodes'),
1476
  ),
1477
  'margin_top' => array(
1478
  'std' => '0',
1479
- 'type' => 'text',
 
 
1480
  'label' => __( 'Margin Top', 'magee-shortcodes'),
1481
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1482
  ),
1483
  'margin_bottom' => array(
1484
  'std' => '0',
1485
- 'type' => 'text',
 
 
1486
  'label' => __( 'Margin Bottom', 'magee-shortcodes'),
1487
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1488
  ),
1489
  'border_width' => array(
1490
- 'std' => '5px',
1491
- 'type' => 'text',
 
 
1492
  'label' => __( 'Border Width', 'magee-shortcodes'),
1493
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1494
  ),
1495
  'responsive_text' => array(
1496
  'std' => '',
1497
- 'type' => 'select',
1498
  'label' => __( 'Responsive Text','magee-shortcodes'),
1499
  'desc' => __( 'Choose to display responsive text.', 'magee-shortcodes'),
1500
  'options' => $reverse_choices
@@ -1516,10 +1537,58 @@ $magee_shortcodes['heading'] = array(
1516
  ),
1517
  'shortcode' => '[ms_heading style="{{style}}" color="{{color}}" border_color="{{border_color}}" text_align="{{text_align}}" font_weight="{{font_weight}}" font_size="{{font_size}}" margin_top="{{margin_top}}" margin_bottom="{{margin_bottom}}" border_width="{{border_width}}" responsive_text="{{responsive_text}}" class="{{class}}" id="{{id}}"]{{title}}[/ms_heading]',
1518
  'popup_title' => __( 'Heading Shortcode', 'magee-shortcodes'),
 
 
 
 
 
 
 
 
 
 
 
1519
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1520
 
 
 
 
 
1521
  );
1522
 
 
1523
  /*-----------------------------------------------------------------------------------*/
1524
  /* Icon Config
1525
  /*-----------------------------------------------------------------------------------*/
@@ -1536,8 +1605,10 @@ $magee_shortcodes['icon'] = array(
1536
  'options' => $icons
1537
  ),
1538
  'size' => array(
1539
- 'type' => 'text',
1540
- 'std' => '14px',
 
 
1541
  'label' => __( 'Icon Size', 'magee-shortcodes'),
1542
  'desc' => __( 'Set text size for item.', 'magee-shortcodes'),
1543
  ),
@@ -1549,7 +1620,7 @@ $magee_shortcodes['icon'] = array(
1549
  ),
1550
  'icon_box' => array(
1551
  'std' => '',
1552
- 'type' => 'select',
1553
  'label' => __( 'Icon Box', 'magee-shortcodes'),
1554
  'desc' => __( 'Choose to display boxed icon.', 'magee-shortcodes'),
1555
  'options' => $reverse_choices
@@ -1569,32 +1640,71 @@ $magee_shortcodes['icon'] = array(
1569
 
1570
  ),
1571
  'shortcode' => '[ms_icon icon="{{icon}}" size="{{size}}" color="{{color}}" icon_box="{{icon_box}}" class="{{class}}" id="{{id}}"]',
1572
- 'popup_title' => __( 'Icon Shortcode', 'magee-shortcodes')
 
1573
  );
1574
 
1575
  /*-----------------------------------------------------------------------------------*/
1576
- /* Image Frame Config
1577
  /*-----------------------------------------------------------------------------------*/
1578
 
1579
- $magee_shortcodes['image_frame'] = array(
1580
- 'icon' => 'fa-file-image-o',
1581
  'no_preview' => true,
1582
  'params' => array(
1583
-
1584
- 'src' => array(
1585
  'type' => 'uploader',
1586
- 'label' => __( 'Image', 'magee-shortcodes' ),
1587
- 'desc' => __( 'Upload an image to display.', 'magee-shortcodes' ),
1588
  ),
1589
- 'link' => array(
1590
- 'std' => '',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1591
  'type' => 'text',
1592
  'label' => __( 'Image Link URL', 'magee-shortcodes' ),
1593
  'desc' => __( 'Add the URL the picture will link to, ex: http://example.com.', 'magee-shortcodes' ),
1594
  ),
1595
  'link_target' => array(
1596
  'std' => '',
1597
- 'type' => 'select',
1598
  'label' => __( 'Link Target', 'magee-shortcodes' ),
1599
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
1600
  'options' => array(
@@ -1605,13 +1715,15 @@ $magee_shortcodes['image_frame'] = array(
1605
  ),
1606
  'border_radius' => array(
1607
  'std' => '0',
1608
- 'type' => 'text',
 
 
1609
  'label' => __( 'Border Radius', 'magee-shortcodes' ),
1610
  'desc' => __( 'Choose the border radius of the image frame. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
1611
  ),
1612
  'light_box' => array(
1613
  'std' => '',
1614
- 'type' => 'select' ,
1615
  'label' => __( 'Light Box','magee-shortcodes'),
1616
  'desc' => __( 'Choose to display light box once click.', 'magee-shortcodes'),
1617
  'options' => $reverse_choices
@@ -1631,44 +1743,36 @@ $magee_shortcodes['image_frame'] = array(
1631
 
1632
  ),
1633
  'shortcode' => '[ms_image_frame src="{{src}}" border_radius="{{border_radius}}" link="{{link}}" link_target="{{link_target}}" light_box="{{light_box}}" class="{{class}}" id="{{id}}"]',
1634
- 'popup_title' => __( 'Image Frame Shortcode', 'magee-shortcodes' )
 
1635
  );
1636
 
 
1637
  /*-----------------------------------------------------------------------------------*/
1638
- /* Image Compare Config
1639
  /*-----------------------------------------------------------------------------------*/
1640
 
1641
- $magee_shortcodes['image_compare'] = array(
1642
- 'icon' => 'fa-file-image-o',
1643
- 'no_preview' => true,
1644
- 'params' => array(
1645
- 'image_left' => array(
1646
- 'std' => '',
1647
- 'type' => 'uploader',
1648
- 'label' => __( 'Image Left', 'magee-shortcodes' ),
1649
- 'desc' => __( '.', 'magee-shortcodes')
1650
- ),
1651
- 'image_right' => array(
1652
  'std' => '',
1653
- 'type' => 'uploader',
1654
- 'label' => __( 'Image Right', 'magee-shortcodes' ),
1655
- 'desc' => __( '.', 'magee-shortcodes')
1656
- ),
1657
- 'class' => array(
1658
- 'std' => '',
1659
  'type' => 'text',
1660
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
1661
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
 
 
 
 
 
 
1662
  ),
1663
- 'id' => array(
1664
- 'std' => '',
1665
- 'type' => 'text',
1666
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
1667
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1668
- ),
1669
  ),
1670
- 'shortcode' => '[ms_image_compare image_left="{{image_left}}" image_right="{{image_right}}" class="{{class}}" id="{{id}}"]',
1671
- 'popup_title' => __( 'Image Compare Shortcode', 'magee-shortcodes' )
 
1672
  );
1673
 
1674
  /*******************************************************
@@ -1690,7 +1794,7 @@ $magee_shortcodes['image_compare'] = array(
1690
  'desc' => __( 'Set color fo list icon.', 'magee-shortcodes')
1691
  ),
1692
  'icon_boxed' => array(
1693
- 'type' => 'select',
1694
  'label' => __( 'Icon Boxed', 'magee-shortcodes' ),
1695
  'desc' => __( 'Choose to set icon boxed.', 'magee-shortcodes'),
1696
  'options' =>array(
@@ -1711,7 +1815,7 @@ $magee_shortcodes['image_compare'] = array(
1711
  'circle' => __('Circle','magee-shortcodes'),)
1712
  ),
1713
  'item_border' => array(
1714
- 'type' => 'select',
1715
  'label' => __( 'Item Border', 'magee-shortcodes' ),
1716
  'desc' => __( 'Choose to display item border for list.', 'magee-shortcodes'),
1717
  'options' =>array(
@@ -1719,8 +1823,10 @@ $magee_shortcodes['image_compare'] = array(
1719
  'yes' => __('Yes','magee-shortcodes'),)
1720
  ),
1721
  'item_size' => array(
1722
- 'type' => 'text',
1723
- 'std' => '12px',
 
 
1724
  'label' => __( 'Item Size', 'magee-shortcodes' ),
1725
  'desc' => __( 'Set text font size for item.', 'magee-shortcodes'),
1726
  ),
@@ -1744,35 +1850,9 @@ $magee_shortcodes['image_compare'] = array(
1744
  ),
1745
  ),
1746
  'shortcode' => '[ms_list icon="{{icon}}" icon_color="{{icon_color}}" icon_boxed="{{icon_boxed}}" background_color="{{background_color}}" boxed_shape="{{boxed_shape}}" item_border="{{item_border}}" item_size="{{item_size}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_list]',
1747
- 'popup_title' => __( 'List Shortcode', 'magee-shortcodes' )
1748
- );
1749
-
1750
- /*-----------------------------------------------------------------------------------*/
1751
- /* Label Config
1752
- /*-----------------------------------------------------------------------------------*/
1753
-
1754
- $magee_shortcodes['label'] = array(
1755
- 'no_preview' => true,
1756
- 'icon' => 'fa-bookmark',
1757
- 'params' => array(
1758
-
1759
- 'content' => array(
1760
- 'std' => '',
1761
- 'type' => 'text',
1762
- 'label' => __( 'Text', 'magee-shortcodes' ),
1763
- 'desc' => __( 'Insert text to be displayed in label.','magee-shortcodes')
1764
- ),
1765
- 'background_color' => array(
1766
- 'std' => '',
1767
- 'type' => 'colorpicker',
1768
- 'label' => __( 'Background Color' , 'magee-shortcodes'),
1769
- 'desc' => __( 'Set background color for label.','magee-shortcodes')
1770
- ),
1771
- ),
1772
- 'shortcode' => '[ms_label background_color="{{background_color}}" ]{{content}}[/ms_label]',
1773
- 'popup_title' => __( 'Label Shortcode', 'magee-shortcodes' )
1774
  );
1775
-
1776
 
1777
  /*******************************************************
1778
  * Modal Config
@@ -1806,12 +1886,12 @@ $magee_shortcodes['modal'] = array(
1806
  ),
1807
 
1808
  'showfooter' => array(
1809
- 'type' => 'select',
1810
  'label' => __( 'Show Footer', 'magee-shortcodes' ),
1811
  'desc' => __( 'Choose to show the modal footer with close button.', 'magee-shortcodes' ),
1812
  'options' => array(
1813
- 'yes' => __('yes', 'magee-shortcodes'),
1814
- 'no' => __('no', 'magee-shortcodes'),
1815
  )
1816
  ),
1817
  'content' => array(
@@ -1834,7 +1914,8 @@ $magee_shortcodes['modal'] = array(
1834
  ),
1835
  ),
1836
  'shortcode' => '[ms_modal title="{{title}}" size="{{size}}" showfooter="{{showfooter}}" class="{{class}}" id="{{id}}"][ms_modal_anchor_text]{{modal_anchor_text}}[/ms_modal_anchor_text][ms_modal_content]{{content}}[/ms_modal_content][/ms_modal]',
1837
- 'popup_title' => __( 'Modal Shortcode', 'magee-shortcodes' )
 
1838
  );
1839
 
1840
  /*-----------------------------------------------------------------------------------*/
@@ -1865,75 +1946,75 @@ $magee_shortcodes['menu'] = array(
1865
  ),
1866
  ),
1867
  'shortcode' => '[ms_menu menu="{{menu}}" class="{{class}}" id="{{id}}"][/ms_menu]' ,
1868
- 'popup_title' => __( 'Menu Shortcode', 'magee-shortcodes')
1869
  );
1870
 
1871
  /*-----------------------------------------------------------------------------------*/
1872
- /* Popover Config
1873
  /*-----------------------------------------------------------------------------------*/
1874
 
1875
- $magee_shortcodes['popover'] = array(
1876
  'no_preview' => true,
1877
- 'icon' => 'fa-comment-o',
1878
  'params' => array(
 
1879
  'title' => array(
1880
- 'std' => '',
1881
- 'type' => 'text',
1882
- 'label' => __( 'Popover Heading', 'magee-shortcodes' ),
1883
- 'desc' => __( 'Insert heading text of the popover.', 'magee-shortcodes' ),
1884
- ),
1885
- 'triggering_text' => array(
1886
- 'std' => '',
1887
  'type' => 'text',
1888
- 'label' => __( 'Triggering Text', 'magee-shortcodes' ),
1889
- 'desc' => __( 'Content that will trigger the popover.', 'magee-shortcodes' ),
1890
  ),
1891
-
1892
-
1893
  'content' => array(
1894
- 'std' => '',
1895
  'type' => 'textarea',
1896
- 'label' => __( 'Contents Inside Popover', 'magee-shortcodes' ),
1897
- 'desc' => __( 'Text to be displayed inside the popover.', 'magee-shortcodes' ),
1898
  ),
1899
-
1900
- 'trigger' => array(
1901
- 'type' => 'select',
1902
- 'label' => __( 'Popover Trigger Method', 'magee-shortcodes' ),
1903
- 'desc' => __( 'Choose mouse action to trigger popover.', 'magee-shortcodes' ),
1904
- 'options' => array(
1905
- 'click' => __('Click', 'magee-shortcodes'),
1906
- 'hover' => __('Hover', 'magee-shortcodes'),
1907
- )
1908
  ),
1909
- 'placement' => array(
1910
- 'type' => 'select',
1911
- 'label' => __( 'Popover Position', 'magee-shortcodes' ),
1912
- 'desc' => __( 'Choose the display position of the popover.', 'magee-shortcodes' ),
1913
- 'options' => array(
1914
- 'top' => __('Top', 'magee-shortcodes'),
1915
- 'bottom' => __('Bottom', 'magee-shortcodes'),
1916
- 'left' => __('Left', 'magee-shortcodes'),
1917
- 'Right' => __('Right', 'magee-shortcodes'),
1918
- )
1919
  ),
1920
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1921
  'class' => array(
1922
  'std' => '',
1923
  'type' => 'text',
1924
  'label' => __( 'CSS Class', 'magee-shortcodes' ),
1925
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
1926
  ),
1927
  'id' => array(
1928
  'std' => '',
1929
  'type' => 'text',
1930
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
1931
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
1932
- ),
1933
  ),
1934
- 'shortcode' => '[ms_popover title="{{title}}" triggering_text="{{triggering_text}}" trigger="{{trigger}}" placement="{{placement}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_popover]', // as there is no wrapper shortcode
1935
- 'popup_title' => __( 'Popover Shortcode', 'magee-shortcodes' ),
1936
-
1937
  );
1938
 
1939
  /*-----------------------------------------------------------------------------------*/
@@ -1950,8 +2031,8 @@ $magee_shortcodes['person'] = array(
1950
  'label' => __( 'Style', 'magee-shortcodes'),
1951
  'desc' => __( 'Choose to display info below or beside the image.','magee-shortcodes'),
1952
  'options' => array(
1953
- 'below' => __('below', 'magee-shortcodes') ,
1954
- 'beside' => __('beside', 'magee-shortcodes'),
1955
  ),
1956
  ),
1957
  'name' => array(
@@ -1968,7 +2049,7 @@ $magee_shortcodes['person'] = array(
1968
  ),
1969
  'link_target' => array(
1970
  'std' => '',
1971
- 'type' => 'select',
1972
  'label' => __( 'Link Target', 'magee-shortcodes' ),
1973
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
1974
  'options' => array(
@@ -1985,9 +2066,10 @@ $magee_shortcodes['person'] = array(
1985
  ),
1986
  'overlay_opacity' => array(
1987
  'std' => '0.5',
1988
- 'type' => 'text',
1989
  'label' => __('Image Overlay Opacity', 'magee-shortcodes'),
1990
- 'desc' => __('Opacity ranges between 0 (transparent) and 1 (opaque). ex: .5','magee-shortcodes')
 
1991
  ),
1992
  'content' => array(
1993
  'std' => '',
@@ -2008,7 +2090,9 @@ $magee_shortcodes['person'] = array(
2008
  ),
2009
  'picborder' => array(
2010
  'std' => '0',
2011
- 'type' => 'text',
 
 
2012
  'label' => __( 'Picture Border Size', 'magee-shortcodes' ),
2013
  'desc' => __( 'In pixels (px), ex: 1px. Leave blank for theme option selection.', 'magee-shortcodes' ),
2014
  ),
@@ -2019,13 +2103,17 @@ $magee_shortcodes['person'] = array(
2019
  ),
2020
  'picborderradius' => array(
2021
  'std' => '0',
2022
- 'type' => 'text',
 
 
2023
  'label' => __( 'Picture Border Radius', 'magee-shortcodes' ),
2024
  'desc' => __( 'Choose the border radius of the person image. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
2025
  ),
2026
  'iconboxedradius' => array(
2027
- 'std' => '4px',
2028
- 'type' => 'text',
 
 
2029
  'label' => __( 'Social Icon Box Radius', 'magee-shortcodes' ),
2030
  'desc' => __( 'Choose the border radius of the boxed icons. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
2031
  ),
@@ -2109,142 +2197,51 @@ $magee_shortcodes['person'] = array(
2109
  ),
2110
  ),
2111
  'shortcode' => '[ms_person name="{{name}}" style="{{style}}" title="{{title}}" link_target="{{link_target}}" overlay_color="{{overlay_color}}" overlay_opacity="{{overlay_opacity}}" picture="{{picture}}" piclink="{{piclink}}" picborder="{{picborder}}" picbordercolor="{{picbordercolor}}" picborderradius="{{picborderradius}}" iconboxedradius="{{iconboxedradius}}" iconcolor="{{iconcolor}}" icon1="{{icon1}}" icon2="{{icon2}}" icon3="{{icon3}}" icon4="{{icon4}}" icon5="{{icon5}}" link1="{{link1}}" link2="{{link2}}" link3="{{link3}}" link4="{{link4}}" link5="{{link5}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_person]',
2112
- 'popup_title' => __( 'Person Shortcode', 'magee-shortcodes' )
 
2113
  );
2114
 
2115
  /*-----------------------------------------------------------------------------------*/
2116
- /* Promo_box Config
2117
  /*-----------------------------------------------------------------------------------*/
2118
 
2119
- $magee_shortcodes['promo_box'] = array(
 
2120
  'no_preview' => true,
2121
- 'icon' => 'fa-tag',
2122
  'params' => array(
2123
 
2124
- 'style' => array(
2125
- 'type' => 'select',
2126
- 'label' => __( 'Style', 'magee-shortcodes' ),
2127
- 'desc' => __( 'Select style for promo box.', 'magee-shortcodes' ),
2128
- 'options' => array(
2129
- 'normal' => __('normal', 'magee-shortcodes'),
2130
- 'boxed' => __('boxed', 'magee-shortcodes'),
2131
- )
2132
- ),
2133
- 'border_color' => array(
2134
- 'type' => 'colorpicker',
2135
- 'std' => '#fdd200',
2136
- 'label' => __( 'Border Color', 'magee-shortcodes' ),
2137
- 'desc' => __( 'Set color for highlight border of promo box.', 'magee-shortcodes' ),
2138
- ),
2139
- 'border_width' => array(
2140
- 'std' => '1px',
2141
- 'type' => 'text',
2142
- 'label' => __( 'Border Width', 'magee-shortcodes' ),
2143
- 'desc' => __( 'Set width for highlight border of promo box.', 'magee-shortcodes' ),
2144
  ),
2145
 
2146
- 'border_position' => array(
2147
- 'type' => 'select',
2148
- 'label' => __( 'Border Position', 'magee-shortcodes' ),
 
 
2149
 
2150
- 'desc' => __( 'Choose position for highlight border of promo box.', 'magee-shortcodes' ),
2151
- 'options' => array(
2152
- 'left' => __('Left', 'magee-shortcodes'),
2153
- 'right' => __('Right', 'magee-shortcodes'),
2154
- 'top' => __('Top', 'magee-shortcodes'),
2155
- 'bottom' => __('Bottom', 'magee-shortcodes'),
2156
-
2157
- )
2158
  ),
2159
- 'background_color' => array(
2160
- 'type' => 'colorpicker',
2161
- 'std' =>'#f5f5f5',
2162
- 'label' => __( 'Icon Circle Background Color', 'magee-shortcodes' ),
2163
- 'desc' => __( 'Set background color for promo box.', 'magee-shortcodes' ),
2164
- ),
2165
- 'button_color' => array(
2166
- 'type' => 'colorpicker',
2167
- 'std' =>'',
2168
- 'label' => __( 'Button Color', 'magee-shortcodes' ),
2169
- 'desc' => '',
2170
- ),
2171
-
2172
- 'button_text' => array(
2173
- 'std' => 'Download Now',
2174
- 'type' => 'text',
2175
- 'label' => __( 'Button Text', 'magee-shortcodes' ),
2176
- 'desc' => __( 'Inser text for button of promo box.', 'magee-shortcodes' ),
2177
- ),
2178
- 'button_link' => array(
2179
- 'std' => '',
2180
- 'type' => 'text',
2181
- 'label' => __( 'Button Link URL', 'magee-shortcodes' ),
2182
- 'desc' => __( 'Inser link for button of promo box, eg: http://example.com.', 'magee-shortcodes' ),
2183
- ),
2184
- 'button_icon' => array(
2185
- 'type' => 'iconpicker',
2186
- 'label' => __( 'Button Icon', 'magee-shortcodes' ),
2187
- 'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
2188
- 'options' => $icons
2189
- ),
2190
- 'content' => array(
2191
- 'std' => '',
2192
- 'type' => 'textarea',
2193
- 'label' => __( 'Content', 'magee-shortcodes' ),
2194
- 'desc' => __( 'Insert content for promo box.', 'magee-shortcodes' ),
2195
- ),
2196
- 'class' => array(
2197
- 'std' => '',
2198
- 'type' => 'text',
2199
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
2200
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
2201
- ),
2202
- 'id' => array(
2203
- 'std' => '',
2204
- 'type' => 'text',
2205
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
2206
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
2207
- ),
2208
- ),
2209
- 'shortcode' => '[ms_promo_box style="{{style}}" border_color="{{border_color}}" border_width="{{border_width}}" background_color="{{background_color}}" button_color="{{button_color}}" button_link="{{button_link}}" button_icon="{{button_icon}}" button_text="{{button_text}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_promo_box]',
2210
- 'popup_title' => __( 'Promo Box Shortcode', 'magee-shortcodes' )
2211
- );
2212
-
2213
- /*-----------------------------------------------------------------------------------*/
2214
- /* Piechart Config
2215
- /*-----------------------------------------------------------------------------------*/
2216
-
2217
-
2218
- $magee_shortcodes['piechart'] = array(
2219
- 'no_preview' => true,
2220
- 'icon' => 'fa-circle-o-notch',
2221
- 'params' => array(
2222
-
2223
- 'percent' => array(
2224
- 'std' => '80',
2225
- 'type' => 'text',
2226
- 'label' => __( 'Percent', 'magee-shortcodes' ),
2227
- 'desc' => __( 'From 1 to 100.', 'magee-shortcodes' ),
2228
-
2229
- ),
2230
-
2231
- 'content' => array(
2232
- 'std' => '80%',
2233
- 'type' => 'textarea',
2234
- 'label' => __( 'Title', 'magee-shortcodes' ),
2235
- 'desc' => __( 'Insert title for piechart. It need to be short.', 'magee-shortcodes' ),
2236
-
2237
- ),
2238
- 'size' => array(
2239
- 'std' => '200',
2240
- 'type' => 'text',
2241
- 'label' => __( 'Size', 'magee-shortcodes' ),
2242
- 'desc' => __( 'Set size for piechart.', 'magee-shortcodes' ),
2243
-
2244
  ),
2245
  'font_size' => array(
2246
- 'std' => '40px',
2247
- 'type' => 'text',
 
 
2248
  'label' => __( 'Font Size', 'magee-shortcodes' ),
2249
  'desc' => __( 'Set font size for piechart title.', 'magee-shortcodes' ),
2250
 
@@ -2271,76 +2268,76 @@ $magee_shortcodes['piechart'] = array(
2271
 
2272
  ),
2273
  'shortcode' => '[ms_piechart percent="{{percent}}" filledcolor="{{filledcolor}}" size="{{size}}" font_size="{{font_size}}" unfilledcolor="{{unfilledcolor}}" class="{{class}}" ]{{content}}[/ms_piechart]',
2274
- 'popup_title' => __( 'Piechart Shortcode', 'magee-shortcodes' )
 
2275
  );
2276
 
2277
  /*-----------------------------------------------------------------------------------*/
2278
- /* panel Config
2279
  /*-----------------------------------------------------------------------------------*/
2280
 
2281
- $magee_shortcodes['panel'] = array(
2282
  'no_preview' => true,
2283
- 'icon' => 'fa-list-alt',
2284
  'params' => array(
2285
-
2286
  'title' => array(
2287
- 'std' => 'Panel title',
2288
  'type' => 'text',
2289
- 'label' => __( 'Title', 'magee-shortcodes' ),
2290
- 'desc' => __( 'Insert title for panel.', 'magee-shortcodes' ),
2291
  ),
2292
- 'content' => array(
2293
- 'std' => __('Panel content.', 'magee-shortcodes'),
2294
- 'type' => 'textarea',
2295
- 'label' => __( 'Panel Content', 'magee-shortcodes' ),
2296
- 'desc' => __( 'Insert content for panel.', 'magee-shortcodes' ),
2297
  ),
2298
 
2299
-
2300
- 'title_color' => array(
2301
- 'std' => '#000',
2302
- 'type' => 'colorpicker',
2303
- 'label' => __( 'Title Color', 'magee-shortcodes' ),
2304
- 'desc' => __( 'Set color for panel title.', 'magee-shortcodes' ),
2305
  ),
2306
- 'border_color' => array(
2307
- 'std' => '#ddd',
2308
- 'type' => 'colorpicker',
2309
- 'label' => __( 'Border Color', 'magee-shortcodes' ),
2310
- 'desc' => __( 'Set color for panel border.', 'magee-shortcodes' ),
 
 
 
 
2311
  ),
2312
-
2313
- 'title_background_color' => array(
2314
- 'std' => '#f5f5f5',
2315
- 'type' => 'colorpicker',
2316
- 'label' => __( 'Title Background Color', 'magee-shortcodes' ),
2317
- 'desc' => __( 'Set background color for panel title.', 'magee-shortcodes' ),
 
 
 
 
2318
  ),
2319
 
2320
-
2321
- 'border_radius' => array(
2322
- 'std' => '0px',
2323
- 'type' => 'text',
2324
- 'label' => __( 'Border Radius', 'magee-shortcodes' ),
2325
- 'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
2326
- ),
2327
-
2328
-
2329
  'class' => array(
2330
  'std' => '',
2331
  'type' => 'text',
2332
  'label' => __( 'CSS Class', 'magee-shortcodes' ),
2333
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
2334
  ),
2335
  'id' => array(
2336
  'std' => '',
2337
  'type' => 'text',
2338
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
2339
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
2340
- ),
2341
  ),
2342
- 'shortcode' => '[ms_panel title="{{title}}" title_color="{{title_color}}" border_color="{{border_color}}" title_background_color="{{title_background_color}}" border_radius="{{border_radius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_panel]',
2343
- 'popup_title' => __( 'Panel Shortcode', 'magee-shortcodes' )
 
2344
  );
2345
 
2346
  /*-----------------------------------------------------------------------------------*/
@@ -2375,7 +2372,7 @@ $magee_shortcodes['progress'] = array(
2375
 
2376
  ),
2377
  'number' => array(
2378
- 'type' => 'select',
2379
  'label' => __( 'Display Number', 'magee-shortcodes' ),
2380
  'desc' => __( 'Choose to diplay number for progress bar.', 'magee-shortcodes' ),
2381
  'options' =>$choices
@@ -2384,7 +2381,9 @@ $magee_shortcodes['progress'] = array(
2384
 
2385
  'percent' => array(
2386
  'std' => '50',
2387
- 'type' => 'text',
 
 
2388
  'label' => __( 'Percent', 'magee-shortcodes' ),
2389
  'desc' => __( 'Set percentage for progress bar. 0~100.', 'magee-shortcodes' )
2390
  ),
@@ -2398,7 +2397,9 @@ $magee_shortcodes['progress'] = array(
2398
 
2399
  'height' => array(
2400
  'std' => '30',
2401
- 'type' => 'text',
 
 
2402
  'label' => __( 'Height', 'magee-shortcodes' ),
2403
  'desc' =>__( 'Set height for progress bar.', 'magee-shortcodes' ),
2404
  ),
@@ -2448,7 +2449,112 @@ $magee_shortcodes['progress'] = array(
2448
 
2449
  ),
2450
  'shortcode' => '[ms_progress striped="{{striped}}" rounded="{{rounded}}" number="{{number}}" percent="{{percent}}" text="{{text}}" height="{{height}}" color="{{color}}" textalign="{{textalign}}" textposition="{{textposition}}" class="{{class}}" id="{{id}}"]',
2451
- 'popup_title' => __( 'Progress Shortcode', 'magee-shortcodes' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2452
  );
2453
 
2454
  /*-----------------------------------------------------------------------------------*/
@@ -2490,6 +2596,7 @@ $magee_shortcodes['pullquote'] = array(
2490
  ),
2491
  'shortcode' => '[ms_pullquote align="{{align}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_pullquote]',
2492
  'popup_title' =>__('Pullquote Shortcode','magee-shortcodes'),
 
2493
  );
2494
 
2495
  /*-----------------------------------------------------------------------------------*/
@@ -2515,13 +2622,15 @@ $magee_shortcodes['QRCode'] = array(
2515
  ),
2516
  'size' => array(
2517
  'std' => '100',
2518
- 'type' => 'text',
 
 
2519
  'label' => __('Size in pixel','magee-shortcodes'),
2520
  'desc' => __('Image width and height.','magee-shortcodes'),
2521
  ),
2522
  'click' => array(
2523
  'std' => 'no',
2524
- 'type' => 'select',
2525
  'label' => __('QRCode clickable?','magee-shortcodes'),
2526
  'desc' => __('Choose to make this QR code clickable.','magee-shortcodes'),
2527
  'options' => array(
@@ -2543,7 +2652,8 @@ $magee_shortcodes['QRCode'] = array(
2543
  ),
2544
  ),
2545
  'shortcode' => '[ms_qrcode alt="{{alt}}" size="{{size}}" click="{{click}}" fgcolor="{{fgcolor}}" bgcolor="{{bgcolor}}"]{{content}}[/ms_qrcode]',
2546
- 'popup_title' => __( 'QR Code Shortcode', 'magee-shortcodes' )
 
2547
  );
2548
 
2549
  /*-----------------------------------------------------------------------------------*/
@@ -2587,37 +2697,9 @@ $magee_shortcodes['quote'] = array(
2587
  ),
2588
  'shortcode' => '[ms_quote cite="{{cite}}" url="{{url}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_quote]',
2589
  'popup_title' =>__('Quote Shortcode','magee-shortcodes'),
 
2590
  );
2591
 
2592
- /*-----------------------------------------------------------------------------------*/
2593
- /* Magee Slider Config
2594
- /*-----------------------------------------------------------------------------------*/
2595
-
2596
- $magee_shortcodes['ms_slider'] = array(
2597
- 'no_preview' => true,
2598
- 'icon' => 'fa-sliders',
2599
- 'params' => array(
2600
-
2601
- 'id' => array(
2602
- 'std' => '',
2603
- 'type' => 'select',
2604
- 'label' => __( 'Slider', 'magee-shortcodes' ),
2605
- 'desc' => '',
2606
- 'options' => $magee_sliders
2607
- ),
2608
-
2609
- 'class' => array(
2610
- 'std' => '',
2611
- 'type' => 'text',
2612
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
2613
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
2614
-
2615
- ),),
2616
- 'shortcode' => '[ms_slider id="{{id}}" class="{{class}}"]',
2617
- 'popup_title' => __( 'Slider', 'magee-shortcodes' )
2618
-
2619
- );
2620
-
2621
  /*-----------------------------------------------------------------------------------*/
2622
  /* RSS Feed Config
2623
  /*-----------------------------------------------------------------------------------*/
@@ -2635,7 +2717,9 @@ $magee_shortcodes['rss_feed'] = array(
2635
  ),
2636
  'number' => array(
2637
  'std' => '3',
2638
- 'type' => 'text',
 
 
2639
  'label' => __( 'Number to Display', 'magee-shortcodes'),
2640
  'desc' => __( 'Number of items to show.', 'magee-shortcodes')
2641
  ),
@@ -2654,88 +2738,71 @@ $magee_shortcodes['rss_feed'] = array(
2654
  ),
2655
  'shortcode' => '[ms_rss_feed url="{{url}}" number="{{number}}" class="{{class}}" id="{{id}}"][/ms_rss_feed]',
2656
  'popup_title' =>__('RSS Feed Shortcode','magee-shortcodes'),
 
2657
  );
2658
 
 
2659
  /*-----------------------------------------------------------------------------------*/
2660
- /* Social Config
2661
  /*-----------------------------------------------------------------------------------*/
2662
 
2663
- $magee_shortcodes['social'] = array(
2664
- 'no_preview' => true,
2665
- 'icon' => 'fa-twitter',
2666
  'params' => array(
2667
-
2668
- 'title' => array(
2669
- 'std' => '',
2670
  'type' => 'text',
2671
- 'label' => __( 'Title ', 'magee-shortcodes' ),
2672
- 'desc' => __( 'Insert the title for the social icon.', 'magee-shortcodes' ),
2673
- ),
2674
- 'icon' => array(
2675
- 'type' => 'iconpicker',
2676
- 'label' => __( 'Icon', 'magee-shortcodes' ),
2677
- 'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
2678
- 'options' => $icons
2679
- ),
2680
- 'icon_size' => array(
2681
- 'std' => '13px',
2682
  'type' => 'text',
2683
- 'label' => __( 'Icon Size', 'magee-shortcodes' ),
2684
- 'desc' => __( 'In pixels (px), eg: 13px.', 'magee-shortcodes')
2685
- ),
2686
- 'iconcolor' => array(
2687
- 'type' => 'colorpicker',
2688
- 'label' => __( 'Icon Color', 'magee-shortcodes' ),
2689
- 'desc' => __( 'Set color for icon.', 'magee-shortcodes')
2690
- ),
2691
- 'backgroundcolor' => array(
2692
- 'type' => 'colorpicker',
2693
- 'label' => __( 'Icon Circle Background Color', 'magee-shortcodes' ),
2694
- 'desc' => __( 'Set background color for icon.', 'magee-shortcodes')
2695
  ),
2696
- 'effect_3d' => array(
2697
- 'std'=>'no',
2698
- 'type' => 'select',
2699
- 'label' => __( 'Icon 3D effect' ),
2700
- 'desc' => __( 'Display box shadow for icon.', 'magee-shortcodes'),
2701
- 'options' => array(
2702
- 'yes' => __('Yes', 'magee-shortcodes'),
2703
- 'no' => __('No', 'magee-shortcodes'),
2704
- )
2705
- ),
2706
- 'iconboxedradius' => array(
2707
- 'type' => 'select',
2708
- 'label' => __( 'Icon Box Radius Style', 'magee-shortcodes' ),
2709
- //'desc' => __( '', 'magee-shortcodes' ),
2710
- 'options' => array(
2711
- 'normal' => __('Normal', 'magee-shortcodes'),
2712
- 'boxed' => __('Boxed', 'magee-shortcodes'),
2713
- 'rounded' => __('Rounded', 'magee-shortcodes'),
2714
- 'circle' => __('Circle ', 'magee-shortcodes'),
2715
- )
2716
  ),
2717
- 'iconlink' => array(
2718
- 'std' => '',
2719
  'type' => 'text',
2720
- 'label' => __( 'Icon Link URL', 'magee-shortcodes' ),
2721
- 'desc' => __( 'Add the icon\'s url eg: http://example.com.', 'magee-shortcodes' ),
2722
- ),
2723
- 'class' => array(
2724
- 'std' => '',
2725
  'type' => 'text',
2726
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
2727
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
2728
  ),
2729
- 'id' => array(
2730
  'std' => '',
2731
  'type' => 'text',
2732
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
2733
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
2734
  ),
 
 
 
 
 
 
 
 
 
 
 
 
2735
  ),
2736
- 'shortcode' => '[ms_social icon_size="{{icon_size}}" title="{{title}}" icon="{{icon}}" iconcolor="{{iconcolor}}" effect_3d="{{effect_3d}}" backgroundcolor="{{backgroundcolor}}" iconboxedradius="{{iconboxedradius}}" iconlink="{{iconlink}}" class="{{class}}" id="{{id}}"][/ms_social]',
2737
- 'popup_title' => __( 'Social Shortcode', 'magee-shortcodes' )
2738
- );
 
2739
 
2740
  /*-----------------------------------------------------------------------------------*/
2741
  /* Section Config
@@ -2765,11 +2832,11 @@ $magee_shortcodes['section'] = array(
2765
  'desc' =>__( 'Choose repeat style for the background image.', 'magee-shortcodes' ),
2766
  'std' => '',
2767
  'options' => array(
2768
- 'repeat' => __( 'repeat', 'magee-shortcodes' ),
2769
- 'repeat-x' => __( 'repeat-x', 'magee-shortcodes' ),
2770
- 'repeat-y' => __( 'repeat-y', 'magee-shortcodes' ),
2771
- 'no-repeat' => __( 'no-repeat', 'magee-shortcodes' ),
2772
- 'inherit' => __( 'inherit', 'magee-shortcodes' )
2773
  )
2774
  ),
2775
 
@@ -2779,27 +2846,29 @@ $magee_shortcodes['section'] = array(
2779
  'desc' => __( 'Choose the postion of the background image.', 'magee-shortcodes' ),
2780
  'std' => '',
2781
  'options' => array(
2782
- 'top left' => __( 'top left', 'magee-shortcodes' ),
2783
- 'top center' => __( 'top center', 'magee-shortcodes' ),
2784
- 'top right' => __( 'top right', 'magee-shortcodes' ),
2785
- 'center left' => __( 'center left', 'magee-shortcodes' ),
2786
- 'center center' => __( 'center center', 'magee-shortcodes' ),
2787
- 'center right' => __( 'center right', 'magee-shortcodes' ),
2788
- 'bottom left' => __( 'bottom left', 'magee-shortcodes' ),
2789
- 'bottom center' => __( 'bottom center', 'magee-shortcodes' ),
2790
- 'bottom right' => __( 'bottom right', 'magee-shortcodes' )
2791
  )
2792
  ),
2793
  'background_parallax' => array(
2794
- 'type' => 'select',
2795
  'label' => __( 'Background Parallax', 'magee-shortcodes' ),
2796
  'desc' => __( 'Choose how the background image scrolls and responds.', 'magee-shortcodes' ),
2797
  'std' => 'no',
2798
  'options' => $reverse_choices
2799
  ),
2800
  'border_size' => array(
2801
- 'std' => '',
2802
- 'type' => 'text',
 
 
2803
  'label' => __( 'Border Size', 'magee-shortcodes' ),
2804
  'desc' =>__( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2805
  ),
@@ -2833,31 +2902,39 @@ $magee_shortcodes['section'] = array(
2833
  ),
2834
 
2835
  'padding_top' => array(
2836
- 'std' => '10px',
2837
- 'type' => 'text',
 
 
2838
  'label' => __( 'Padding Top', 'magee-shortcodes' ),
2839
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2840
  ),
2841
  'padding_bottom' => array(
2842
- 'std' => '10px',
2843
- 'type' => 'text',
 
 
2844
  'label' => __( 'Padding Bottom', 'magee-shortcodes' ),
2845
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2846
  ),
2847
  'padding_left' => array(
2848
- 'std' => '10px',
2849
- 'type' => 'text',
 
 
2850
  'label' => __( 'Padding Left', 'magee-shortcodes' ),
2851
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2852
  ),
2853
  'padding_right' => array(
2854
- 'std' => '10px',
2855
- 'type' => 'text',
 
 
2856
  'label' => __( 'Padding Right', 'magee-shortcodes' ),
2857
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2858
  ),
2859
  'contents_in_container' => array(
2860
- 'type' => 'select',
2861
  'label' => __( 'Contents in Container ?', 'magee-shortcodes' ),
2862
  'desc' => __( 'Put the content in container.', 'magee-shortcodes' ),
2863
  'std' => 'no',
@@ -2877,166 +2954,160 @@ $magee_shortcodes['section'] = array(
2877
  'label' => __( 'Top Separator', 'magee-shortcodes' ),
2878
  'desc' => '',
2879
  'options' => array(
2880
- '' => __('none', 'magee-shortcodes'),
2881
- 'triangle' => __('triangle', 'magee-shortcodes'),
2882
- 'doublediagonal' => __('doublediagonal', 'magee-shortcodes'),
2883
- 'halfcircle' => __('halfcircle', 'magee-shortcodes'),
2884
- 'bigtriangle' => __('bigtriangle', 'magee-shortcodes'),
2885
- 'bighalfcircle' => __('bighalfcircle', 'magee-shortcodes'),
2886
- 'curl' => __('curl', 'magee-shortcodes'),
2887
- 'multitriangles' => __('multitriangles', 'magee-shortcodes'),
2888
- 'roundedsplit' => __('roundedsplit', 'magee-shortcodes'),
2889
- 'boxes' => __('boxes', 'magee-shortcodes'),
2890
- 'zigzag' => __('zigzag', 'magee-shortcodes'),
2891
- 'clouds' => __('clouds', 'magee-shortcodes'),
2892
  )
2893
  ),
2894
- 'bottom_separator' => array(
2895
- 'std' => 'yes',
2896
- 'type' => 'select',
2897
- 'label' => __( 'Bottom Separator', 'magee-shortcodes' ),
2898
- 'desc' => '',
2899
- 'options' => array(
2900
- '' => __('none', 'magee-shortcodes'),
2901
- 'triangle' => __('triangle', 'magee-shortcodes'),
2902
- 'halfcircle' => __('halfcircle', 'magee-shortcodes'),
2903
- 'bigtriangle' => __('bigtriangle', 'magee-shortcodes'),
2904
- 'bighalfcircle' => __('bighalfcircle', 'magee-shortcodes'),
2905
- 'curl' => __('curl', 'magee-shortcodes'),
2906
- 'multitriangles' => __('multitriangles', 'magee-shortcodes'),
2907
- 'roundedcorners' => __('roundedcorners', 'magee-shortcodes'),
2908
- 'foldedcorner' => __('foldedcorner', 'magee-shortcodes'),
2909
- 'boxes' => __('boxes', 'magee-shortcodes'),
2910
- 'zigzag' => __('zigzag', 'magee-shortcodes'),
2911
- 'stamp' => __('stamp', 'magee-shortcodes'),
2912
- )
2913
- ),
2914
- 'full_height' => array(
2915
- 'std' => '',
2916
- 'type' => 'select',
2917
- 'label' => __('Full Height' , 'magee-shortcodes'),
2918
- 'desc' => __('Choose to set the section height same as browser window.' , 'magee-shortcodes'),
2919
- 'options' => $reverse_choices
2920
- ),
2921
- 'class' => array(
2922
- 'std' => '',
2923
- 'type' => 'text',
2924
- 'label' => __( 'CSS Class', 'magee-shortcodes' ),
2925
- 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
2926
- ),
2927
- 'id' => array(
2928
- 'std' => '',
2929
- 'type' => 'text',
2930
- 'label' => __( 'CSS ID', 'magee-shortcodes' ),
2931
- 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
2932
- ),
2933
- ),
2934
- 'shortcode' => '[ms_section background_color="{{background_color}}" background_image="{{background_image}}" background_repeat="{{background_repeat}}" background_position="{{background_position}}" background_parallax="{{background_parallax}}" border_size="{{border_size}}" border_color="{{border_color}}" border_style="{{border_style}}" padding_top="{{padding_top}}" padding_bottom="{{padding_bottom}}" padding_left="{{padding_left}}" padding_right="{{padding_right}}" contents_in_container="{{contents_in_container}}" top_separator="{{top_separator}}" bottom_separator="{{bottom_separator}}" full_height="{{full_height}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_section]',
2935
- 'popup_title' => __( 'Section Shortcode', 'magee-shortcodes' )
2936
- );
2937
-
2938
- /*-----------------------------------------------------------------------------------*/
2939
- /* Scheduled_content Config
2940
- /*-----------------------------------------------------------------------------------*/
2941
-
2942
- $magee_shortcodes['scheduled_content'] = array(
2943
- 'no_preview' => true,
2944
- 'icon' => 'fa-clock-o',
2945
- 'params' => array(
2946
- 'time' => array(
2947
- 'std' => '',
2948
- 'type' => 'text',
2949
- 'label' => __( 'Time', 'magee-shortcodes'),
2950
- 'desc' => __( 'Select an random time in one day to show content.</br>Example: 6-12,13-16 show content from 6:00 to 12:00 and from 13:00 to 16:00', 'magee-shortcodes')
2951
- ),
2952
- 'day_week' => array(
2953
- 'std' => '',
2954
- 'type' => 'text',
2955
- 'label' => __( 'Days of Week', 'magee-shortcodes'),
2956
- 'desc' => __( 'Select days from one week to show content.</br>1 => Monday </br>2 => Tuesday </br> 3 => Wednesday</br> 4 => Thursday </br> 5 => Friday </br> 6 => Saturday </br> 7 => Sunday </br>Examples:1-5,7 =>show content at Sunday and from Monday to Friday', 'magee-shortcodes')
2957
- ),
2958
- 'day_month' =>array(
2959
- 'std' => '',
2960
- 'type' => 'text',
2961
- 'label' => __( 'Days of Month', 'magee-shortcodes'),
2962
- 'desc' => __('Select days from one month to show content.</br>Examples:</br>1 => show content only at first day of month </br> 10-25 => show content from 10th to 25th </br> 10-15,20-25 => show content from 10th to 15th and from 20th to 25th','magee-shortcodes')
2963
- ),
2964
- 'months' => array(
2965
- 'std' => '',
2966
- 'type' => 'text',
2967
- 'label' => __('Months','magee-shortcodes'),
2968
- 'desc' => __('Select months from a year to show content.</br>Examples:</br>1 => show content in January </br> 3-6 => show content from March to June </br> 1,5,8-9 => show content in January,May and from August to September','magee-shortcodes')
2969
- ),
2970
- 'years' => array(
2971
  'std' => '',
2972
- 'type' => 'text',
2973
- 'label' => __('Years','magee-shortcodes'),
2974
- 'desc' => __( 'Select years to show content.</br>Examples:</br> 2016 => show content in 2016 </br>2014-2016 => show content from 2014 to 2016 </br> 2016,2017,2345-2666 => show content in 2016,2017 and from 2345 to 2666','magee-shortcodes')
 
2975
  ),
2976
- 'class' => array(
2977
  'std' => '',
2978
  'type' => 'text',
2979
- 'label' => __( 'CSS Class', 'magee-shortcodes'),
2980
  'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
2981
  ),
2982
- 'id' => array(
2983
  'std' => '',
2984
  'type' => 'text',
2985
- 'label' => __( 'CSS ID', 'magee-shortcodes'),
2986
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
2987
- ),
2988
- 'content' => array(
2989
- 'std' => '',
2990
- 'type' => 'textarea',
2991
- 'label' => __( 'Content', 'magee-shortcodes'),
2992
- 'desc' => __( 'Insert scheduled content.', 'magee-shortcodes')
2993
- )
2994
  ),
2995
- 'shortcode' => '[ms_scheduled_content time="{{time}}" day_week="{{day_week}}" day_month="{{day_month}}" months="{{months}}" years="{{years}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_scheduled_content]',
2996
- 'popup_title' => __( 'Scheduled Shortcode','magee-shortcodes')
2997
- );
 
2998
 
2999
  /*-----------------------------------------------------------------------------------*/
3000
- /* Tooltip Config
3001
  /*-----------------------------------------------------------------------------------*/
3002
 
3003
- $magee_shortcodes['tooltip'] = array(
3004
  'no_preview' => true,
3005
- 'icon' => 'fa-comment-o',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3006
  'params' => array(
3007
 
3008
  'title' => array(
3009
  'std' => '',
3010
  'type' => 'text',
3011
- 'label' => __( 'Tooltip Text', 'magee-shortcodes' ),
3012
- 'desc' => __( 'Insert the text that displays in the tooltip', 'magee-shortcodes' )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3013
  ),
3014
- 'placement' => array(
3015
- 'type' => 'select',
3016
- 'label' => __( 'Tooltip Position', 'magee-shortcodes' ),
3017
- 'desc' => __( 'Choose the display position.', 'magee-shortcodes' ),
 
3018
  'options' => array(
3019
- 'top' => __('Top', 'magee-shortcodes'),
3020
- 'bottom' => __('Bottom', 'magee-shortcodes'),
3021
- 'left' => __('Left', 'magee-shortcodes'),
3022
- 'right' => __('Right', 'magee-shortcodes'),
3023
- )
3024
- ),
3025
- 'trigger' => array(
3026
  'type' => 'select',
3027
- 'label' => __( 'Tooltip Trigger', 'magee-shortcodes' ),
3028
- 'desc' => __( 'Choose action to trigger the tooltip.', 'magee-shortcodes' ),
3029
  'options' => array(
3030
- 'hover' => __('Hover', 'magee-shortcodes'),
3031
- 'click' => __('Click', 'magee-shortcodes'),
 
 
3032
  )
3033
- ),
3034
- 'content' => array(
3035
- 'std' => '',
3036
- 'type' => 'textarea',
3037
- 'label' => __( 'Content', 'magee-shortcodes' ),
3038
- 'desc' => __( 'Insert the text that will activate the tooltip hover', 'magee-shortcodes' )
3039
  ),
 
 
 
 
 
 
3040
  'class' => array(
3041
  'std' => '',
3042
  'type' => 'text',
@@ -3048,10 +3119,11 @@ $magee_shortcodes['tooltip'] = array(
3048
  'type' => 'text',
3049
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
3050
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
3051
- ),
3052
  ),
3053
- 'shortcode' => '[ms_tooltip title="{{title}}" placement="{{placement}}" trigger="{{trigger}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_tooltip]',
3054
- 'popup_title' => __( 'Tooltip Shortcode', 'magee-shortcodes' )
 
3055
  );
3056
 
3057
  /*-----------------------------------------------------------------------------------*/
@@ -3105,9 +3177,45 @@ $magee_shortcodes['tabs'] = array(
3105
 
3106
  'shortcode' => '[ms_tabs style="{{style}}" title_color="{{title_color}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_tabs]',
3107
  'popup_title' => __( 'Tab Shortcode', 'magee-shortcodes' ),
 
3108
 
3109
  );
3110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3111
 
3112
  /*-----------------------------------------------------------------------------------*/
3113
  /* testimonial Config
@@ -3140,7 +3248,7 @@ $magee_shortcodes['testimonial'] = array(
3140
  'desc' => __( 'Byline of testimonial\'s author.', 'magee-shortcodes' ),
3141
  ),
3142
  'avatar' => array(
3143
- 'type' => 'uploader',
3144
  'label' => __( 'Avatar', 'magee-shortcodes' ),
3145
  'desc' => __( 'Avatar of testimonial\'s author.', 'magee-shortcodes' ),
3146
  ),
@@ -3175,7 +3283,8 @@ $magee_shortcodes['testimonial'] = array(
3175
  ),
3176
  ),
3177
  'shortcode' => '[ms_testimonial style="{{style}}" name="{{name}}" avatar="{{avatar}}" byline="{{byline}}" alignment="{{alignment}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_testimonial]',
3178
- 'popup_title' => __( 'Testimonial Shortcode', 'magee-shortcodes' )
 
3179
  );
3180
 
3181
 
@@ -3223,45 +3332,70 @@ $magee_shortcodes['timeline'] = array(
3223
  ),
3224
  'shortcode' => '[ms_timeline columns="{{columns}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_timeline]',
3225
  'popup_title' => __( 'Timeline Shortcode', 'magee-shortcodes' ),
3226
-
3227
 
3228
  );
3229
 
3230
  /*-----------------------------------------------------------------------------------*/
3231
- /* Targeted_content Config
3232
  /*-----------------------------------------------------------------------------------*/
3233
 
3234
- $magee_shortcodes['targeted_content'] = array(
3235
- 'no_preview' => true,
3236
- 'icon' => 'fa-eye' ,
3237
- 'params' => array(
3238
- 'type' => array(
3239
- 'type' => 'select',
3240
- 'label' => __( 'Type', 'magee-shortcodes'),
3241
- 'desc' => __( 'Select visible permissions.Private for author only. Members for logged-in users. Guests for users not logged in.', 'magee-shortcodes'),
 
 
 
 
 
 
 
3242
  'options' => array(
3243
- 'private' => __( 'Private','magee-shortcodes'),
3244
- 'members' => __( 'Members','magee-shortcodes'),
3245
- 'guests' => __('Guests','magee-shortcodes'),
 
3246
  )
3247
  ),
 
 
 
 
 
 
 
 
 
3248
  'content' => array(
3249
- 'std' => 'note text',
3250
  'type' => 'textarea',
3251
- 'label' => __( 'Content', 'magee-shortcodes'),
3252
- 'desc' => __( 'Set content for targeted users.', 'magee-shortcodes')
3253
  ),
3254
- 'alternative' => array(
3255
- 'std' => 'alternative text',
3256
- 'type' => 'textarea',
3257
- 'label' => __( 'Alternative Content', 'magee-shortcodes'),
3258
- 'desc' => __( 'Set content for other users.', 'magee-shortcodes')
3259
  ),
 
 
 
 
 
 
3260
  ),
3261
- 'shortcode' => '[ms_targeted_content type="{{type}}" alternative="{{alternative}}"]{{content}}[/ms_targeted_content]',
3262
- 'popup_title' => __( 'Targeted Shortcode','magee-shortcodes')
 
3263
  );
3264
 
 
3265
  /*-----------------------------------------------------------------------------------*/
3266
  /* Video Config
3267
  /*-----------------------------------------------------------------------------------*/
@@ -3273,21 +3407,21 @@ $magee_shortcodes['video'] = array(
3273
 
3274
  'mp4_url' => array(
3275
  'std' => '',
3276
- 'type' => 'text',
3277
  'label' => __( 'Mp4 Video Url','magee-shortcodes'),
3278
  'desc' => __( 'Add the URL of video in MPEG4 format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3279
 
3280
  ),
3281
  'ogv_url' => array(
3282
  'std' => '',
3283
- 'type' => 'text',
3284
  'label' => __( 'Ogv Video Url','magee-shortcodes'),
3285
  'desc' => __( 'Add the URL of video in OGV format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3286
 
3287
  ),
3288
  'webm_url' => array(
3289
  'std' => '',
3290
- 'type' => 'text',
3291
  'label' => __( 'Webm Video Url','magee-shortcodes'),
3292
  'desc' => __( 'Add the URL of video in webm format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3293
 
@@ -3302,25 +3436,25 @@ $magee_shortcodes['video'] = array(
3302
  'width' => array(
3303
  'std' => '100%',
3304
  'type' => 'text',
3305
- 'label' => __('Width','magee-shortcodes'),
3306
  'desc' => __('In pixels (px), eg: 1px.','magee-shortcodes'),
3307
  ),
3308
  'height' => array(
3309
  'std' => '100%',
3310
- 'type' => 'text',
3311
  'label' => __('Height','magee-shortcodes'),
3312
  'desc' => __('In pixels (px), eg: 1px.','magee-shortcodes'),
3313
  ),
3314
  'mute' => array(
3315
  'std' => '',
3316
- 'type' => 'select',
3317
  'label' => __('Mute Video' ,'magee-shortcodes'),
3318
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3319
  'options' => $reverse_choices
3320
  ),
3321
  'autoplay' =>array(
3322
  'std' => '',
3323
- 'type' => 'select',
3324
  'label' => __('Autoplay Video','magee-shortcodes'),
3325
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3326
  'options' => array(
@@ -3330,7 +3464,7 @@ $magee_shortcodes['video'] = array(
3330
  ),
3331
  'loop' =>array(
3332
  'std' => '',
3333
- 'type' => 'select',
3334
  'label' => __('Loop Video','magee-shortcodes'),
3335
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3336
  'options' => array(
@@ -3340,7 +3474,7 @@ $magee_shortcodes['video'] = array(
3340
  ),
3341
  'controls' =>array(
3342
  'std' => '',
3343
- 'type' => 'select',
3344
  'label' => __('Show Controls','magee-shortcodes'),
3345
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3346
  'options' => array(
@@ -3362,7 +3496,8 @@ $magee_shortcodes['video'] = array(
3362
  ),
3363
  ),
3364
  'shortcode' => '[ms_video mp4_url="{{mp4_url}}" ogv_url="{{ogv_url}}" webm_url="{{webm_url}}" poster="{{poster}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_video]',
3365
- 'popup_title' => __( 'Video Shortcode', 'magee-shortcodes' )
 
3366
  );
3367
 
3368
 
@@ -3374,12 +3509,10 @@ $magee_shortcodes['vimeo'] = array(
3374
  'no_preview' => true,
3375
  'icon' => 'fa-vimeo-square',
3376
  'params' => array(
3377
-
3378
-
3379
  'link' => array(
3380
  'std' => '',
3381
  'type' => 'text',
3382
- 'label' => __( 'Video URL', 'magee-shortcodes' ),
3383
  'desc' => __( 'Add the URL the video will link to, ex: http://example.com.', 'magee-shortcodes' ),
3384
  ),
3385
  'width' => array(
@@ -3396,14 +3529,14 @@ $magee_shortcodes['vimeo'] = array(
3396
  ),
3397
  'mute' => array(
3398
  'std' => '',
3399
- 'type' => 'select',
3400
  'label' => __('Mute Video' ,'magee-shortcodes'),
3401
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3402
  'options' => $reverse_choices
3403
  ),
3404
  'autoplay' =>array(
3405
  'std' => '',
3406
- 'type' => 'select',
3407
  'label' => __('Autoplay Video','magee-shortcodes'),
3408
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3409
  'options' => array(
@@ -3413,7 +3546,7 @@ $magee_shortcodes['vimeo'] = array(
3413
  ),
3414
  'loop' =>array(
3415
  'std' => '',
3416
- 'type' => 'select',
3417
  'label' => __('Loop Video','magee-shortcodes'),
3418
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3419
  'options' => array(
@@ -3423,7 +3556,7 @@ $magee_shortcodes['vimeo'] = array(
3423
  ),
3424
  'controls' =>array(
3425
  'std' => '',
3426
- 'type' => 'select',
3427
  'label' => __('Show Controls','magee-shortcodes'),
3428
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3429
  'options' => array(
@@ -3445,7 +3578,8 @@ $magee_shortcodes['vimeo'] = array(
3445
  ),
3446
  ),
3447
  'shortcode' => '[ms_vimeo link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_vimeo]',
3448
- 'popup_title' => __( 'Vimeo Shortcode', 'magee-shortcodes' )
 
3449
  );
3450
  /*-----------------------------------------------------------------------------------*/
3451
  /* Youtube Config
@@ -3476,14 +3610,14 @@ $magee_shortcodes['youtube'] = array(
3476
  ),
3477
  'mute' => array(
3478
  'std' => '',
3479
- 'type' => 'select',
3480
  'label' => __('Mute Video' ,'magee-shortcodes'),
3481
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3482
  'options' => $reverse_choices
3483
  ),
3484
  'autoplay' =>array(
3485
  'std' => '',
3486
- 'type' => 'select',
3487
  'label' => __('Autoplay Video','magee-shortcodes'),
3488
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3489
  'options' => array(
@@ -3493,7 +3627,7 @@ $magee_shortcodes['youtube'] = array(
3493
  ),
3494
  'loop' =>array(
3495
  'std' => '',
3496
- 'type' => 'select',
3497
  'label' => __('Loop Video','magee-shortcodes'),
3498
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3499
  'options' => array(
@@ -3503,7 +3637,7 @@ $magee_shortcodes['youtube'] = array(
3503
  ),
3504
  'controls' =>array(
3505
  'std' => '',
3506
- 'type' => 'select',
3507
  'label' => __('Show Controls','magee-shortcodes'),
3508
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3509
  'options' => array(
@@ -3525,7 +3659,8 @@ $magee_shortcodes['youtube'] = array(
3525
  ),
3526
  ),
3527
  'shortcode' => '[ms_youtube link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_youtube]',
3528
- 'popup_title' => __( 'Youtube Shortcode', 'magee-shortcodes' )
 
3529
  );
3530
 
3531
 
7
  function magee_shortcode_menus($name){
8
  $menus[''] = 'Default';
9
  if( $name !== ''){
10
+
11
+ $menu = wp_get_nav_menus();
12
+
13
  foreach ( $menu as $val){
14
+ if(isset($val->name)){
15
+ $menus[$val->name] = $val->name;
16
  }
17
+ }
18
  if(isset( $menus)){
19
+ return $menus;
20
  }
21
+ }
22
+
23
  }
24
 
25
  global $magee_shortcodes,$magee_sliders;
31
  $reverse_choices_with_default = array( '' => 'Default', 'no' => 'No', 'yes' => 'Yes' );
32
  $leftright = array( 'left' => 'Left', 'right' => 'Right' );
33
  $textalign = array( 'left' => __( 'Left', 'magee-shortcodes' ), 'center' => __( 'Center', 'magee-shortcodes' ), 'right' => __( 'Right', 'magee-shortcodes' ) );
34
+ $opacity = array('0' => '0', '0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5', '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1' => '1');
35
  $dec_numbers = array( '0.1' => '0.1', '0.2' => '0.2', '0.3' => '0.3', '0.4' => '0.4', '0.5' => '0.5', '0.6' => '0.6', '0.7' => '0.7', '0.8' => '0.8', '0.9' => '0.9', '1' => '1', '2' => '2', '2.5' => '2.5', '3' => '3' );
36
  $animation_type = array('' => 'None',"bounce" => "bounce", "flash" => "flash", "pulse" => "pulse", "rubberBand" => "rubberBand", "shake" => "shake", "swing" => "swing", "tada" => "tada", "wobble" => "wobble", "bounceIn" => "bounceIn", "bounceInDown" => "bounceInDown", "bounceInLeft" => "bounceInLeft", "bounceInRight" => "bounceInRight", "bounceInUp" => "bounceInUp", "bounceOut" => "bounceOut", "bounceOutDown" => "bounceOutDown", "bounceOutLeft" => "bounceOutLeft", "bounceOutRight" => "bounceOutRight", "bounceOutUp" => "bounceOutUp", "fadeIn" => "fadeIn", "fadeInDown" => "fadeInDown", "fadeInDownBig" => "fadeInDownBig", "fadeInLeft" => "fadeInLeft", "fadeInLeftBig" => "fadeInLeftBig", "fadeInRight" => "fadeInRight", "fadeInRightBig" => "fadeInRightBig", "fadeInUp" => "fadeInUp", "fadeInUpBig" => "fadeInUpBig", "fadeOut" => "fadeOut", "fadeOutDown" => "fadeOutDown", "fadeOutDownBig" => "fadeOutDownBig", "fadeOutLeft" => "fadeOutLeft", "fadeOutLeftBig" => "fadeOutLeftBig", "fadeOutRight" => "fadeOutRight", "fadeOutRightBig" => "fadeOutRightBig", "fadeOutUp" => "fadeOutUp", "fadeOutUpBig" => "fadeOutUpBig", "flip" => "flip", "flipInX" => "flipInX", "flipInY" => "flipInY", "flipOutX" => "flipOutX", "flipOutY" => "flipOutY", "lightSpeedIn" => "lightSpeedIn", "lightSpeedOut" => "lightSpeedOut", "rotateIn" => "rotateIn", "rotateInDownLeft" => "rotateInDownLeft", "rotateInDownRight" => "rotateInDownRight", "rotateInUpLeft" => "rotateInUpLeft", "rotateInUpRight" => "rotateInUpRight", "rotateOut" => "rotateOut", "rotateOutDownLeft" => "rotateOutDownLeft", "rotateOutDownRight" => "rotateOutDownRight", "rotateOutUpLeft" => "rotateOutUpLeft", "rotateOutUpRight" => "rotateOutUpRight", "hinge" => "hinge", "rollIn" => "rollIn", "rollOut" => "rollOut", "zoomIn" => "zoomIn", "zoomInDown" => "zoomInDown", "zoomInLeft" => "zoomInLeft", "zoomInRight" => "zoomInRight", "zoomInUp" => "zoomInUp", "zoomOut" => "zoomOut", "zoomOutDown" => "zoomOutDown", "zoomOutLeft" => "zoomOutLeft", "zoomOutRight" => "zoomOutRight", "zoomOutUp" => "zoomOutUp", "slideInDown" => "slideInDown", "slideInLeft" => "slideInLeft", "slideInRight" => "slideInRight", "slideInUp" => "slideInUp", "slideOutDown" => "slideOutDown", "slideOutLeft" => "slideOutLeft", "slideOutRight" => "slideOutRight", "slideOutUp" => "slideOutUp");
37
  $columns = array(""=>"default","1"=>"1/12","2"=>"2/12","3"=>"3/12","4"=>"4/12","5"=>"5/12","6"=>"6/12","7"=>"7/12","8"=>"8/12","9"=>"9/12","10"=>"10/12","11"=>"11/12","12"=>"12/12");
105
  ),
106
  'shortcode' => '[ms_accordion style="{{style}}" type="{{type}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_accordion]',
107
  'popup_title' => __( 'Accordion Shortcode', 'magee-shortcodes' ),
108
+ 'name' => __('accordions-shortcode/','magee-shortocdes'),
109
 
110
  );
111
 
147
 
148
 
149
  'border_width' => array(
150
+ 'std' => '0',
151
+ 'type' => 'number',
152
+ 'max' => '50',
153
+ 'min' => '0',
154
  'label' => __( 'Border Width', 'magee-shortcodes' ),
155
  'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
156
  ),
157
 
158
  'border_radius' => array(
159
+ 'std' => '0',
160
+ 'type' => 'number',
161
+ 'max' => '50',
162
+ 'min' => '0',
163
  'label' => __( 'Border Radius', 'magee-shortcodes' ),
164
  'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
165
  ),
166
 
167
  'box_shadow' => array(
168
  'std' => '',
169
+ 'type' => 'choose',
170
  'label' => __( 'Box Shadow', 'magee-shortcodes' ),
171
  'desc' => __( 'Display a box shadow for alert.', 'magee-shortcodes' ),
172
  'options' => $reverse_choices
173
  ),
174
  'dismissable' => array(
175
  'std' => '',
176
+ 'type' => 'choose',
177
  'label' => __( 'Dismissable', 'magee-shortcodes' ),
178
  'desc' => __( 'The alert box is dismissable.', 'magee-shortcodes' ),
179
  'options' => $reverse_choices
193
  ),
194
  ),
195
  'shortcode' => '[ms_alert icon="{{icon}}" background_color="{{background_color}}" text_color="{{text_color}}" border_width="{{border_width}}" border_radius="{{border_radius}}" box_shadow="{{box_shadow}}" dismissable="{{dismissable}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_alert]',
196
+ 'popup_title' => __( 'Alert Shortcode', 'magee-shortcodes' ),
197
+ 'name' => __('alert-shortcode/','magee-shortocdes'),
198
  );
199
 
200
  /*-----------------------------------------------------------------------------------*/
206
  'params' => array(
207
  'mp3' => array(
208
  'std' => '',
209
+ 'type' => 'link',
210
  'label' => __( 'Mp3 URL', 'magee-shortcodes'),
211
  'desc' => __( 'Add the URL of audio in MP3 format.', 'magee-shortcodes')
212
  ),
213
  'ogg' => array(
214
  'std' => '',
215
+ 'type' => 'link',
216
  'label' => __( 'Ogg URL', 'magee-shortcodes'),
217
  'desc' => __( 'Add the URL of audio in OGG format.', 'magee-shortcodes')
218
  ),
219
  'wav' => array(
220
  'std' => '',
221
+ 'type' => 'link',
222
  'label' => __( 'Wav URL', 'magee-shortcodes'),
223
  'desc' => __( 'Add the URL of audio in WAV format.', 'magee-shortcodes')
224
  ),
225
  'mute' => array(
226
+ 'type' => 'choose',
227
  'label' => __( 'Mute Audio','magee-shortcodes'),
228
  'desc' => __('Choose to mute the audio.','magee-shortcodes'),
229
  'options' => $reverse_choices,
230
  ),
231
  'autoplay' => array(
232
+ 'type' => 'choose',
233
  'label' => __( 'Autoplay Audio','magee-shortcodes'),
234
  'desc' => __('Choose to autoplay the audio.','magee-shortcodes'),
235
  'options' => $choices,
236
  ),
237
  'loop' => array(
238
+ 'type' => 'choose',
239
  'label' => __( 'Loop Audio','magee-shortcodes'),
240
  'desc' => __('Choose to loop the audio.','magee-shortcodes'),
241
  'options' => $choices,
242
  ),
243
  'controls' => array(
244
+ 'type' => 'choose',
245
  'label' => __( 'Controls Audio','magee-shortcodes'),
246
  'desc' => __('Choose to display controls of the audio.','magee-shortcodes'),
247
  'options' => $choices,
260
  ),
261
  ),
262
  'shortcode' => '[ms_audio mp3="{{mp3}}" ogg="{{ogg}}" wav="{{wav}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_audio]' ,
263
+ 'popup_title' => __( 'Audio Shortcode','magee-shortcodes'),
264
+ 'name' => __('audio-shortcode/','magee-shortocdes'),
265
  );
266
 
267
  /*******************************************************
308
  ),
309
 
310
  'border_width' => array(
311
+ 'std' => '0',
312
+ 'type' => 'number',
313
+ 'max' => '50',
314
+ 'min' => '0',
315
  'label' => __('Border Width', 'magee-shortcodes'),
316
  'desc' => __('In pixels (px), default: 2px.', 'magee-shortcodes'),
317
  ),
328
  )
329
  ),
330
  'shadow' => array(
331
+ 'type' => 'choose',
332
  'label' => __( 'Text Shadow', 'magee-shortcodes' ),
333
  'desc' => __( 'Display shadow for button text.', 'magee-shortcodes' ),
334
  'options' => $reverse_choices
335
  ),
336
  'gradient' => array(
337
+ 'type' => 'choose',
338
  'label' => __( 'Gradient', 'magee-shortcodes' ),
339
  'desc' => __( 'Display gradient for button.', 'magee-shortcodes' ),
340
  'options' => $reverse_choices
341
  ),
342
  'block' => array(
343
+ 'type' => 'choose',
344
  'label' => __( 'Block Button', 'magee-shortcodes' ),
345
  'desc' => __( 'Display in full width.', 'magee-shortcodes' ),
346
  'options' => $reverse_choices
347
  ),
348
 
349
  'target' => array(
350
+ 'type' => 'choose',
351
  'label' => __( 'Button Target', 'magee-shortcodes' ),
352
  'desc' => __( '_self = open in same window <br />_blank = open in new window.', 'magee-shortcodes' ),
353
  'options' => array(
405
  ),
406
  ),
407
  'shortcode' => '[ms_button style="{{style}}" link="{{link}}" size="{{size}}" shape="{{shape}}" shadow="{{shadow}}" block="{{block}}" target="{{target}}" gradient="{{gradient}}" color="{{color}}" text_color="{{textcolor}}" icon="{{icon}}" icon_animation_type="{{iconanimationtype}}" border_width="{{border_width}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_button]',
408
+ 'popup_title' => __( 'Button Shortcode', 'magee-shortcodes'),
409
+ 'name' => __('buttons-shortcode/','magee-shortocdes'),
410
  );
411
 
412
 
422
  ),
423
  'shortcode' => '[ms_row]{{child_shortcode}}[/ms_row]',
424
  'popup_title' => __( 'Column Shortcode', 'magee-shortcodes'),
425
+ 'name' => __('columns-shortcode/','magee-shortocdes'),
426
  'child_shortcode' => array(
427
  'params' => array(
428
  'style' => array(
469
 
470
  );
471
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
472
  /*-----------------------------------------------------------------------------------*/
473
  /* Countdowns Config
474
  /*-----------------------------------------------------------------------------------*/
481
 
482
 
483
  'endtime' => array(
484
+ 'std' => date('d-m-Y H:i',strtotime(' 1 month')),
485
+ 'type' => 'datepicker',
486
  'label' => __( 'Set end time for countdown.', 'magee-shortcodes' ),
487
  'desc' => '',
488
 
517
 
518
  ),
519
  'shortcode' => '[ms_countdowns endtime="{{endtime}}" fontcolor="{{fontcolor}}" backgroundcolor="{{backgroundcolor}}" class="{{class}}" id="{{id}}"]',
520
+ 'popup_title' => __( 'Countdowns Shortcode', 'magee-shortcodes' ),
521
+ 'name' => __('countdowns-shortcode/','magee-shortocdes'),
522
  );
523
 
524
 
562
 
563
  'counter_num' => array(
564
  'std' => '100',
565
+ 'type' => 'number',
566
+ 'max' => '200',
567
+ 'min' => '0',
568
  'label' => __( 'Counter Num', 'magee-shortcodes' ),
569
  'desc' => __( 'The animated counter number.', 'magee-shortcodes' ),
570
  ),
583
  ),
584
 
585
  'border' => array(
586
+ 'type' => 'choose',
587
  'label' => __( 'Display Border', 'magee-shortcodes' ),
588
  'desc' => __( 'Choose to display border for counter.', 'magee-shortcodes' ),
589
  'options' => array(
609
 
610
  ),
611
  'shortcode' => '[ms_counter top_icon="{{top_icon}}" top_icon_color="{{top_icon_color}}" left_icon="{{left_icon}}" counter_num="{{counter_num}}" left_text="{{left_text}}" right_text="{{right_text}}" title="{{title}}" border="{{border}}" class="{{class}}" id="{{id}}"]',
612
+ 'popup_title' => __( 'Counter Shortcode', 'magee-shortcodes' ),
613
+ 'name' => __('counter-box-shortcode/','magee-shortocdes'),
614
+ );
615
+
616
+ /*******************************************************
617
+ * Custom Box Config
618
+ ********************************************************/
619
+ $magee_shortcodes['custom_box'] = array(
620
+ 'no_preview' => true,
621
+ 'icon' => 'fa-list-alt',
622
+ 'params' => array(
623
+ 'content' => array(
624
+ 'std' => __('Custom Box Content', 'magee-shortcodes'),
625
+ 'type' => 'textarea',
626
+ 'label' => __( 'Content', 'magee-shortcodes' ),
627
+ 'desc' => __( 'Insert content for custom box.', 'magee-shortcodes' ),
628
+ ),
629
+ 'backgroundimage' => array(
630
+ 'type' => 'uploader',
631
+ 'label' => __( 'Background Image', 'magee-shortcodes' ),
632
+ 'desc' => __( 'Upload an image to display in background of custom box.', 'magee-shortcodes' ),
633
+ ),
634
+ 'padding' => array(
635
+ 'std' => '30',
636
+ 'type' => 'number',
637
+ 'min' => '0',
638
+ 'max' => '100',
639
+ 'label' => __( 'Padding', 'magee-shortcodes' ),
640
+ 'desc' => __( 'Content Padding. eg:30px', 'magee-shortcodes')
641
+ ),
642
+ 'class' => array(
643
+ 'std' => '',
644
+ 'type' => 'text',
645
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
646
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
647
+ ),
648
+ 'id' => array(
649
+ 'std' => '',
650
+ 'type' => 'text',
651
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
652
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
653
+ ),
654
+ ),
655
+ 'shortcode' => '[ms_custom_box backgroundimage="{{backgroundimage}}" padding="{{padding}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_custom_box]',
656
+ 'popup_title' => __( ' Custom Box Shortcode', 'magee-shortcodes'),
657
+ 'name' => __('custom-box-shortcode/','magee-shortocdes'),
658
  );
659
 
660
+ /*-----------------------------------------------------------------------------------*/
661
+ /* Dailymotion Config
662
+ /*-----------------------------------------------------------------------------------*/
663
+
664
+ $magee_shortcodes['dailymotion'] = array(
665
+ 'no_preview' => true,
666
+ 'icon' => 'fa-video-camera',
667
+ 'params' => array(
668
+
669
+ 'link' => array(
670
+ 'std' => '',
671
+ 'type' => 'text',
672
+ 'label' => __( 'Dailymotion URL', 'magee-shortcodes' ),
673
+ 'desc' => __( 'Add the URL the video will link to, ex: http://example.com.', 'magee-shortcodes' ),
674
+ ),
675
+ 'width' => array(
676
+ 'std' => '100%',
677
+ 'type' => 'text',
678
+ 'label' => __('Width','magee-shortcodes'),
679
+ 'desc' => __('In pixels (px), eg:1px.','magee-shortcodes'),
680
+ ),
681
+ 'height' => array(
682
+ 'std' => '100%',
683
+ 'type' => 'text',
684
+ 'label' => __('Height','magee-shortcodes'),
685
+ 'desc' => __('In pixels (px), eg:1px.','magee-shortcodes'),
686
+ ),
687
+ 'mute' => array(
688
+ 'std' => '',
689
+ 'type' => 'choose',
690
+ 'label' => __('Mute Video' ,'magee-shortcodes'),
691
+ 'desc' => __('Choose to mute the video.','magee-shortcodes'),
692
+ 'options' => $reverse_choices
693
+ ),
694
+ 'autoplay' =>array(
695
+ 'std' => '',
696
+ 'type' => 'choose',
697
+ 'label' => __('Autoplay Video','magee-shortcodes'),
698
+ 'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
699
+ 'options' => array(
700
+ 'yes' => __('Yes','magee-shortcodes'),
701
+ 'no' => __('No','magee-shortcodes'),
702
+ )
703
+ ),
704
+ 'loop' =>array(
705
+ 'std' => '',
706
+ 'type' => 'choose',
707
+ 'label' => __('Loop Video','magee-shortcodes'),
708
+ 'desc' => __('Choose to loop the video.','magee-shortcodes'),
709
+ 'options' => array(
710
+ 'yes' => __('Yes','magee-shortcodes'),
711
+ 'no' => __('No','magee-shortcodes')
712
+ )
713
+ ),
714
+ 'controls' =>array(
715
+ 'std' => '',
716
+ 'type' => 'choose',
717
+ 'label' => __('Show Controls','magee-shortcodes'),
718
+ 'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
719
+ 'options' => array(
720
+ 'yes' => __('Yes','magee-shortcodes'),
721
+ 'no' => __('No','magee-shortcodes')
722
+ )
723
+ ),
724
+ 'class' =>array(
725
+ 'std' => '',
726
+ 'type' => 'text',
727
+ 'label' => __('CSS Class','magee-shortcodes'),
728
+ 'desc' => __('Add a class to the wrapping HTML element.','magee-shortcodes')
729
+ ),
730
+ 'id' => array(
731
+ 'std' => '',
732
+ 'type' => 'text',
733
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
734
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
735
+ ),
736
+ ),
737
+ 'shortcode' => '[ms_dailymotion link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_dailymotion]',
738
+ 'popup_title' => __( 'Dailymotion Shortcode', 'magee-shortcodes' ),
739
+ 'name' => __('dailymotion-shortcode/','magee-shortocdes'),
740
+ );
741
+
742
 
743
  /*******************************************************
744
  * Divider Config
781
  )
782
  ),
783
  'margin_top' => array(
784
+ 'std' => '30',
785
+ 'type' => 'number',
786
+ 'min' => '0',
787
+ 'max' => '100',
788
  'label' => __( 'Margin Top', 'magee-shortcodes' ),
789
  'desc' => __( 'Spacing above the separator. In pixels.', 'magee-shortcodes' ),
790
  ),
791
  'margin_bottom' => array(
792
+ 'std' => '30',
793
+ 'type' => 'number',
794
+ 'max' => '100',
795
+ 'min' => '0',
796
  'label' => __( 'Margin Bottom', 'magee-shortcodes' ),
797
  'desc' => __( 'Spacing under the separator. In pixels.', 'magee-shortcodes' ),
798
  ),
799
 
800
  'border_size' => array(
801
+ 'std' => '5',
802
+ 'type' => 'number',
803
+ 'max' => '50',
804
+ 'min' => '0',
805
  'label' => __( 'Border Size', 'magee-shortcodes' ),
806
  'desc' => __( 'In pixels (px), eg: 1px. ', 'magee-shortcodes' ),
807
  ),
808
  'border_color' => array(
809
+ 'std' => '#f2f2f2',
810
  'type' => 'colorpicker',
811
  'label' => __( 'Border Color', 'magee-shortcodes' ),
812
  'desc' => __( 'Set the border color.', 'magee-shortcodes' )
832
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
833
  ),
834
  ),
835
+ 'shortcode' => '[ms_divider style="{{style}}" align="{{align}}" width="{{width}}" margin_top="{{margin_top}}" margin_bottom="{{margin_bottom}}" border_size="{{border_size}}" border_color="{{border_color}}" icon="{{icon}}" class="{{class}}" id="{{id}}"][/ms_divider]',
836
+ 'popup_title' => __( 'Divider Shortcode', 'magee-shortcodes'),
837
+ 'name' => __('divider-shortcode/','magee-shortocdes'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
838
  );
839
 
840
  /*-----------------------------------------------------------------------------------*/
847
  'params' => array(
848
  'url' => array(
849
  'std' => '',
850
+ 'type' => 'link',
851
  'label' => __( 'Doc URL','magee-shortcodes'),
852
  'desc' => __( 'Upload document to display. Supported formats: doc, xls, pdf etc.','magee-shortcodes')
853
  ),
854
  'width' => array(
855
+ 'std' => '300',
856
+ 'type' => 'number',
857
+ 'max' => '1000',
858
+ 'min' => '0',
859
  'label' => __( 'Width', 'magee-shortcodes'),
860
  'desc' => __( 'Set width for doc.', 'magee-shortcodes')
861
  ),
862
  'height' => array(
863
+ 'std' => '300',
864
+ 'type' => 'number',
865
+ 'max' => '1000',
866
+ 'min' => '0',
867
  'label' => __( 'Height', 'magee-shortcodes'),
868
  'desc' => __( 'Set height for doc.', 'magee-shortcodes')
869
  ),
870
  'responsive' => array(
871
+ 'type' => 'choose',
872
  'label' => __( 'Responsive','magee-shortcodes'),
873
  'desc' => __( 'Choose to responsive or not', 'magee-shortcodes'),
874
  'options' => $choices
896
  ),
897
  ),
898
  'shortcode' => '[ms_document url="{{url}}" width="{{width}}" height="{{height}}" responsive="{{responsive}}" viewer="{{viewer}}" class="{{class}}" id="{{id}}"][/ms_document]',
899
+ 'popup_title' => __( 'Document Shortcode','magee-shortcodes'),
900
+ 'name' => __('document-shortcode/','magee-shortocdes'),
901
  );
902
 
903
  /*-----------------------------------------------------------------------------------*/
904
+ /* Dropcap Config
905
  /*-----------------------------------------------------------------------------------*/
906
 
907
+ $magee_shortcodes['dropcap'] = array(
908
+ 'no_preview' => true,
909
+ 'icon' => 'fa-square',
910
  'params' => array(
911
+ 'content' => array(
912
+ 'std' => 'A',
913
+ 'type' => 'textarea',
914
+ 'label' => __( 'Dropcap Letter', 'magee-shortcodes' ),
915
+ 'desc' => __( 'Add the letter to be used as dropcap', 'magee-shortcodes' ),
916
+ ),
917
+ 'color' => array(
918
+ 'type' => 'colorpicker',
919
+ 'label' => __( 'Color', 'magee-shortcodes' ),
920
+ 'desc' => __( 'Controls the color of the dropcap letter. Leave blank for theme option selection.', 'magee ')
921
+ ),
922
+ 'boxed' => array(
923
+ 'type' => 'choose',
924
+ 'label' => __( 'Boxed Dropcap', 'magee-shortcodes' ),
925
+ 'desc' => __( 'Choose to get a boxed dropcap.', 'magee-shortcodes' ),
926
+ 'options' => $reverse_choices
927
+ ),
928
+ 'boxedradius' => array(
929
+ 'std' => '8',
930
+ 'type' => 'number',
931
+ 'max' => '50',
932
+ 'min' => '0',
933
+ 'label' => __( 'Box Radius', 'magee-shortcodes' ),
934
+ 'desc' => __('Choose the radius of the boxed dropcap. In pixels (px), eg: 1px', 'magee-shortcodes')
935
  ),
936
  'class' => array(
937
  'std' => '',
938
  'type' => 'text',
939
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
940
  'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
941
  ),
942
  'id' => array(
943
  'std' => '',
944
  'type' => 'text',
945
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
946
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
947
  ),
948
  ),
949
+ 'shortcode' => '[ms_dropcap color="{{color}}" boxed="{{boxed}}" boxed_radius="{{boxedradius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_dropcap]',
950
+ 'popup_title' => __( 'Dropcap Shortcode', 'magee-shortcodes' ),
951
+ 'name' => __('dropcap-shortcode/','magee-shortocdes'),
952
  );
953
+
954
  /*-----------------------------------------------------------------------------------*/
955
  /* Dummy_image Config
956
  /*-----------------------------------------------------------------------------------*/
981
  )
982
  ),
983
  'width' => array(
984
+ 'std' => '500',
985
+ 'type' => 'number',
986
+ 'max' => '1000',
987
+ 'min' => '0' ,
988
  'label' => __( 'Width', 'magee-shortcodes'),
989
  'desc' => __( 'Set width for image.', 'magee-shortcodes')
990
  ),
991
  'height' => array(
992
+ 'std' => '300',
993
+ 'type' => 'number',
994
+ 'max' => '1000',
995
+ 'min' => '0',
996
  'label' => __( 'Height', 'magee-shortcodes'),
997
  'desc' => __( 'Set height for image.', 'magee-shortcodes')
998
  ),
1011
 
1012
  ),
1013
  'shortcode' => '[ms_dummy_image style="{{style}}" width="{{width}}" height="{{height}}" class="{{class}}" id="{{id}}"][/ms_dummy_image]' ,
1014
+ 'popup_title' => __( 'Dummy Image Shortcode','magee-shortcodes'),
1015
+ 'name' => __('dummy-image-shortcode/','magee-shortocdes'),
1016
  );
1017
 
1018
+
1019
  /*-----------------------------------------------------------------------------------*/
1020
+ /* Dummy_text Config
1021
  /*-----------------------------------------------------------------------------------*/
1022
 
1023
+ $magee_shortcodes['dummy_text'] = array(
1024
  'no_preview' => true,
1025
+ 'icon' => 'fa-text-height',
1026
+ 'params' => array(
1027
+ 'style' =>array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1028
  'type' => 'select',
1029
+ 'label' => __( 'Style','magee-shortcodes'),
1030
+ 'desc' => __( 'Select text type.','magee-shortcodes'),
1031
  'options' => array(
1032
+ 'paras' => __( 'Paragraphs', 'magee-shortcodes' ),
1033
+ 'words' => __( 'Words', 'magee-shortcodes' ),
1034
+ 'bytes' => __( 'Bytes', 'magee-shortcodes' ),
1035
  )
1036
+ ),
1037
+ 'amount' => array(
1038
+ 'std' => '3',
1039
+ 'type' => 'number',
1040
+ 'max' => '50',
1041
+ 'min' => '0',
1042
+ 'label' => __( 'Amount','magee-shortcodes'),
1043
+ 'desc' => __( 'Choose how many paragraphs or words to show','magee-shortcodes')
1044
  ),
1045
+ 'class' => array(
1046
+ 'std' => '',
1047
  'type' => 'text',
1048
+ 'label' => __( 'CSS Class', 'magee-shortcodes'),
1049
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
1050
+ ),
1051
+ 'id' => array(
1052
  'std' => '',
1053
  'type' => 'text',
1054
+ 'label' => __( 'CSS ID', 'magee-shortcodes'),
1055
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1056
  ),
1057
  ),
1058
+ 'shortcode' => '[ms_dummy_text style="{{style}}" amount="{{amount}}" class="{{class}}" id="{{id}}"][/ms_dummy_text]' ,
1059
+ 'popup_title' => __( 'Dummy Text Shortcode','magee-shortcodes'),
1060
+ 'name' => __('dummy-text-shortcode/','magee-shortocdes'),
1061
+ );
1062
+
1063
 
1064
  /*-----------------------------------------------------------------------------------*/
1065
  /* Expand Config
1113
  ),
1114
  ),
1115
  'shortcode' => '[ms_expand class="{{class}}" id="{{id}}" more_icon="{{more_icon}}" more_text="{{more_text}}" less_icon="{{less_icon}}" less_text="{{less_text}}"]{{content}}[/ms_expand]',
1116
+ 'popup_title' => __( 'Expand Shortcode', 'magee-shortcodes'),
1117
+ 'name' => __('expand-shortcode/','magee-shortocdes'),
1118
  );
1119
 
1120
  /*-----------------------------------------------------------------------------------*/
1145
  ),
1146
 
1147
  'title_font_size' => array(
1148
+ 'std' => '18',
1149
+ 'type' => 'number',
1150
+ 'max' => '50',
1151
+ 'min' => '0',
1152
  'label' => __( 'Title Font Size', 'magee-shortcodes' ),
1153
  'desc' => __( 'Set font size for title of feature box.', 'magee-shortcodes' ),
1154
  ),
1164
  'options' => $animation_type
1165
  ),
1166
  'icon' => array(
1167
+ 'type' => 'icon',
1168
  'label' => __( 'Icon', 'magee-shortcodes' ),
1169
  'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
1170
  'options' => $icons
1171
  ),
1172
  'icon_size' => array(
1173
+ 'std' => '46',
1174
+ 'type' => 'number',
1175
+ 'max' => '100',
1176
+ 'min' => '0',
1177
  'label' => __( 'Icon Size', 'magee-shortcodes' ),
1178
  'desc' => __( 'Set size for icon of feature box.', 'magee-shortcodes' ),
1179
  ),
1188
  'desc' => __( 'Set border color for icon of feature box.', 'magee-shortcodes' ),
1189
  ),
1190
  'icon_border_width' => array(
1191
+ 'std' => '0',
1192
+ 'type' => 'number',
1193
+ 'max' => '50',
1194
+ 'min' => '0',
1195
  'label' => __( 'Icon Border Width', 'magee-shortcodes' ),
1196
  'desc' => __( 'Set border width for icon of feature box.', 'magee-shortcodes' ),
1197
  ),
1210
 
1211
  'spinning_icon' => array(
1212
  'std' => '',
1213
+ 'type' => 'choose',
1214
  'label' => __( 'Spinning Icon', 'magee-shortcodes' ),
1215
  'desc' => __( 'Choose to spin the icon of feature box.', 'magee-shortcodes' ),
1216
  'options' => $reverse_choices
1224
 
1225
  'alignment' => array(
1226
  'std' => '',
1227
+ 'type' => 'choose',
1228
  'label' => __( 'Icon Alignment', 'magee-shortcodes' ),
1229
  'desc' => __( 'Set alignment for style2/style3 of feature box.', 'magee-shortcodes' ),
1230
  'options' => array(
1235
  ),
1236
  'icon_circle' => array(
1237
  'std' => '',
1238
+ 'type' => 'choose',
1239
  'label' => __( 'Icon Circle', 'magee-shortcodes' ),
1240
  'desc' => __( 'Choose to display icon of feature box in circle.', 'magee-shortcodes' ),
1241
  'options' => $reverse_choices
1248
  'desc' => __( 'To upload your own icon image, remember to deselect icon above.', 'magee-shortcodes' ),
1249
  ),
1250
  'icon_image_width' => array(
1251
+ 'std' => '0',
1252
+ 'type' => 'number',
1253
+ 'max' => '1000',
1254
+ 'min' => '0',
1255
  'label' => __( 'Icon Image Width', 'magee-shortcodes' ),
1256
  'desc' => __( 'If using custom icon image, set icon image width. In percentage of pixels (px), eg: 1px.', 'magee-shortcodes' ),
1257
  ),
1258
  'icon_image_height' => array(
1259
  'std' => '',
1260
+ 'type' => 'number',
1261
+ 'max' => '1000',
1262
+ 'min' => '0',
1263
  'label' => __( 'Icon Image Height', 'magee-shortcodes' ),
1264
  'desc' => __( 'If using custom icon image, set icon image height. In percentage of pixels (px), eg: 1px.', 'magee-shortcodes' ),
1265
  ),
1273
  ),
1274
  'link_target' => array(
1275
  'std' => '',
1276
+ 'type' => 'choose',
1277
  'label' => __( 'Link Target', 'magee-shortcodes' ),
1278
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
1279
  'options' => array(
1324
  ),
1325
  ),
1326
  'shortcode' => '[ms_featurebox style="{{style}}" title_font_size="{{title_font_size}}" title_color="{{title_color}}" icon_circle="{{icon_circle}}" icon_size="{{icon_size}}" title="{{title}}" icon="{{icon}}" alignment="{{alignment}}" icon_animation_type="{{icon_animation_type}}" icon_color="{{icon_color}}" icon_background_color="{{icon_background_color}}" icon_border_color="{{icon_border_color}}" icon_border_width="{{icon_border_width}}" flip_icon="{{flip_icon}}" spinning_icon="{{spinning_icon}}" icon_image="{{icon_image}}" icon_image_width="{{icon_image_width}}" icon_image_height="{{icon_image_height}}" link_url="{{link_url}}" link_target="{{link_target}}" link_text="{{link_text}}" link_color="{{link_color}}" content_color="{{content_color}}" content_box_background_color="{{content_box_background_color}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_featurebox]',
1327
+ 'popup_title' => __( 'Feature Box Shortcode', 'magee-shortcodes'),
1328
+ 'name' => __('feature-box-shortcode/','magee-shortcodes'),
1329
  );
1330
 
1331
 
 
 
 
1332
  /*******************************************************
1333
  * Flip Box Config
1334
  ********************************************************/
1342
  'label' => __( 'Direction', 'magee-shortcodes' ),
1343
  'desc' => __( 'Select flip directioon.', 'magee-shortcodes' ),
1344
  'options' => array(
1345
+ 'horizontal' => __('Horizontal', 'magee-shortcodes'),
1346
+ 'vertical' => __('Vertical', 'magee-shortcodes'),
1347
  )
1348
  ),
1349
  'front_paddings' => array(
1350
+ 'std' => '15',
1351
+ 'type' => 'number',
1352
+ 'max' => '100',
1353
+ 'min' => '0',
1354
  'label' => __( 'Front Container Paddings', 'magee-shortcodes' ),
1355
  'desc' => __( 'Set paddings for front container of flip box.', 'magee-shortcodes' ),
1356
  ),
1372
  'desc' => __( 'Insert content for front container of flip box.', 'magee-shortcodes' ),
1373
  ),
1374
  'back_paddings' => array(
1375
+ 'std' => '15',
1376
+ 'type' => 'number',
1377
+ 'max' => '100',
1378
+ 'min' => '0',
1379
  'label' => __( 'Back Container Paddings', 'magee-shortcodes' ),
1380
  'desc' => __( 'Set paddings for back container of flip box.', 'magee-shortcodes' ),
1381
  ),
1412
  ),
1413
  ),
1414
  'shortcode' => '[ms_flip_box direction="{{direction}}" front_paddings="{{front_paddings}}" front_background="{{front_background}}" back_paddings="{{back_paddings}}" back_background="{{back_background}}" class="{{class}}" id="{{id}}"]{{front_content}}|||{{back_content}}[/ms_flip_box]',
1415
+ 'popup_title' => __( 'Flip Box Shortcode', 'magee-shortcodes'),
1416
+ 'name' => __('flip-box-shortcode/','magee-shortocdes'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1417
  );
1418
 
1419
  /*-----------------------------------------------------------------------------------*/
1420
+ /* Heading Config
1421
  /*-----------------------------------------------------------------------------------*/
1422
 
1423
  $magee_shortcodes['heading'] = array(
1438
  'std' => 'border',
1439
  'desc' => __( 'Choose a heading style. Leave blank as default.', 'magee-shortcodes'),
1440
  'options' => array(
1441
+ 'none' => 'None',
1442
+ 'border' => 'Border',
1443
+ 'boxed' => 'Boxed',
1444
+ 'boxed-reverse' => 'Boxed-reverse',
1445
+ 'doubleline' => 'Doubleline',
1446
  )
1447
  ),
1448
 
1482
  ),
1483
 
1484
  'font_size' => array(
1485
+ 'std' => '36',
1486
+ 'type' => 'number',
1487
+ 'max' => '50',
1488
+ 'min' => '0',
1489
  'label' => __( 'Font Size', 'magee-shortcodes'),
1490
  'desc' => __( 'Set font size for heading text. In pixels (px), eg: 1px.', 'magee-shortcodes'),
1491
  ),
1492
  'margin_top' => array(
1493
  'std' => '0',
1494
+ 'type' => 'number',
1495
+ 'max' => '100',
1496
+ 'min' => '0',
1497
  'label' => __( 'Margin Top', 'magee-shortcodes'),
1498
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1499
  ),
1500
  'margin_bottom' => array(
1501
  'std' => '0',
1502
+ 'type' => 'number',
1503
+ 'max' => '100',
1504
+ 'min' => '0',
1505
  'label' => __( 'Margin Bottom', 'magee-shortcodes'),
1506
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1507
  ),
1508
  'border_width' => array(
1509
+ 'std' => '5',
1510
+ 'type' => 'number',
1511
+ 'max' => '50',
1512
+ 'min' => '0',
1513
  'label' => __( 'Border Width', 'magee-shortcodes'),
1514
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes'),
1515
  ),
1516
  'responsive_text' => array(
1517
  'std' => '',
1518
+ 'type' => 'choose',
1519
  'label' => __( 'Responsive Text','magee-shortcodes'),
1520
  'desc' => __( 'Choose to display responsive text.', 'magee-shortcodes'),
1521
  'options' => $reverse_choices
1537
  ),
1538
  'shortcode' => '[ms_heading style="{{style}}" color="{{color}}" border_color="{{border_color}}" text_align="{{text_align}}" font_weight="{{font_weight}}" font_size="{{font_size}}" margin_top="{{margin_top}}" margin_bottom="{{margin_bottom}}" border_width="{{border_width}}" responsive_text="{{responsive_text}}" class="{{class}}" id="{{id}}"]{{title}}[/ms_heading]',
1539
  'popup_title' => __( 'Heading Shortcode', 'magee-shortcodes'),
1540
+ 'name' => __('heading-shortcode/','magee-shortocdes'),
1541
+ );
1542
+
1543
+ /*-----------------------------------------------------------------------------------*/
1544
+ /* Highlight Config
1545
+ /*-----------------------------------------------------------------------------------*/
1546
+
1547
+ $magee_shortcodes['highlight'] = array(
1548
+ 'no_preview' => true,
1549
+ 'icon' => 'fa-magic',
1550
+ 'params' => array(
1551
 
1552
+ 'background_color' => array(
1553
+ 'type' => 'colorpicker',
1554
+ 'label' => __( 'Background Color', 'magee-shortcodes' ),
1555
+ 'desc' => __( 'Set background color for highlight item.', 'magee-shortcodes')
1556
+ ),
1557
+ 'border_radius' => array(
1558
+ 'type' => 'number',
1559
+ 'std' =>'5',
1560
+ 'max' => '50',
1561
+ 'min' => '0',
1562
+ 'label' => __( 'Border Radius', 'magee-shortcodes' ),
1563
+ 'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
1564
+ ),
1565
+
1566
+ 'content' => array(
1567
+ 'std' => __('Your Content Goes Here', 'magee-shortcodes'),
1568
+ 'type' => 'textarea',
1569
+ 'label' => __( 'Content to Higlight', 'magee-shortcodes' ),
1570
+ 'desc' => __( 'Insert content to highlight.', 'magee-shortcodes' ),
1571
+ ),
1572
+ 'class' => array(
1573
+ 'std' => '',
1574
+ 'type' => 'text',
1575
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
1576
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
1577
+ ),
1578
+ 'id' => array(
1579
+ 'std' => '',
1580
+ 'type' => 'text',
1581
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
1582
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1583
+ ),
1584
 
1585
+ ),
1586
+ 'shortcode' => '[ms_highlight background_color="{{background_color}}" border_radius="{{border_radius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_highlight]',
1587
+ 'popup_title' => __( 'Highlight Shortcode', 'magee-shortcodes' ),
1588
+ 'name' => __('highlight-shortcode/','magee-shortocdes'),
1589
  );
1590
 
1591
+
1592
  /*-----------------------------------------------------------------------------------*/
1593
  /* Icon Config
1594
  /*-----------------------------------------------------------------------------------*/
1605
  'options' => $icons
1606
  ),
1607
  'size' => array(
1608
+ 'type' => 'number',
1609
+ 'std' => '14',
1610
+ 'max' => '50',
1611
+ 'min' => '0',
1612
  'label' => __( 'Icon Size', 'magee-shortcodes'),
1613
  'desc' => __( 'Set text size for item.', 'magee-shortcodes'),
1614
  ),
1620
  ),
1621
  'icon_box' => array(
1622
  'std' => '',
1623
+ 'type' => 'choose',
1624
  'label' => __( 'Icon Box', 'magee-shortcodes'),
1625
  'desc' => __( 'Choose to display boxed icon.', 'magee-shortcodes'),
1626
  'options' => $reverse_choices
1640
 
1641
  ),
1642
  'shortcode' => '[ms_icon icon="{{icon}}" size="{{size}}" color="{{color}}" icon_box="{{icon_box}}" class="{{class}}" id="{{id}}"]',
1643
+ 'popup_title' => __( 'Icon Shortcode', 'magee-shortcodes'),
1644
+ 'name' => __('icon-shortcode/','magee-shortocdes'),
1645
  );
1646
 
1647
  /*-----------------------------------------------------------------------------------*/
1648
+ /* Image Compare Config
1649
  /*-----------------------------------------------------------------------------------*/
1650
 
1651
+ $magee_shortcodes['image_compare'] = array(
1652
+ 'icon' => 'fa-file-image-o',
1653
  'no_preview' => true,
1654
  'params' => array(
1655
+ 'image_left' => array(
1656
+ 'std' => '',
1657
  'type' => 'uploader',
1658
+ 'label' => __( 'Image Left', 'magee-shortcodes' ),
1659
+ 'desc' => __( 'Insert the image displayed in the left.', 'magee-shortcodes')
1660
  ),
1661
+ 'image_right' => array(
1662
+ 'std' => '',
1663
+ 'type' => 'uploader',
1664
+ 'label' => __( 'Image Right', 'magee-shortcodes' ),
1665
+ 'desc' => __( 'Insert the image displayed in the right.', 'magee-shortcodes')
1666
+ ),
1667
+ 'class' => array(
1668
+ 'std' => '',
1669
+ 'type' => 'text',
1670
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
1671
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
1672
+ ),
1673
+ 'id' => array(
1674
+ 'std' => '',
1675
+ 'type' => 'text',
1676
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
1677
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
1678
+ ),
1679
+ ),
1680
+ 'shortcode' => '[ms_image_compare image_left="{{image_left}}" image_right="{{image_right}}" class="{{class}}" id="{{id}}"]',
1681
+ 'popup_title' => __( 'Image Compare Shortcode', 'magee-shortcodes' ),
1682
+ 'name' => __('image-compare-shortcode/','magee-shortocdes'),
1683
+ );
1684
+
1685
+ /*-----------------------------------------------------------------------------------*/
1686
+ /* Image Frame Config
1687
+ /*-----------------------------------------------------------------------------------*/
1688
+
1689
+ $magee_shortcodes['image_frame'] = array(
1690
+ 'icon' => 'fa-file-image-o',
1691
+ 'no_preview' => true,
1692
+ 'params' => array(
1693
+
1694
+ 'src' => array(
1695
+ 'type' => 'uploader',
1696
+ 'label' => __( 'Image', 'magee-shortcodes' ),
1697
+ 'desc' => __( 'Upload an image to display.', 'magee-shortcodes' ),
1698
+ ),
1699
+ 'link' => array(
1700
+ 'std' => '',
1701
  'type' => 'text',
1702
  'label' => __( 'Image Link URL', 'magee-shortcodes' ),
1703
  'desc' => __( 'Add the URL the picture will link to, ex: http://example.com.', 'magee-shortcodes' ),
1704
  ),
1705
  'link_target' => array(
1706
  'std' => '',
1707
+ 'type' => 'choose',
1708
  'label' => __( 'Link Target', 'magee-shortcodes' ),
1709
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
1710
  'options' => array(
1715
  ),
1716
  'border_radius' => array(
1717
  'std' => '0',
1718
+ 'type' => 'number',
1719
+ 'max' => '50',
1720
+ 'min' => '0' ,
1721
  'label' => __( 'Border Radius', 'magee-shortcodes' ),
1722
  'desc' => __( 'Choose the border radius of the image frame. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
1723
  ),
1724
  'light_box' => array(
1725
  'std' => '',
1726
+ 'type' => 'choose' ,
1727
  'label' => __( 'Light Box','magee-shortcodes'),
1728
  'desc' => __( 'Choose to display light box once click.', 'magee-shortcodes'),
1729
  'options' => $reverse_choices
1743
 
1744
  ),
1745
  'shortcode' => '[ms_image_frame src="{{src}}" border_radius="{{border_radius}}" link="{{link}}" link_target="{{link_target}}" light_box="{{light_box}}" class="{{class}}" id="{{id}}"]',
1746
+ 'popup_title' => __( 'Image Frame Shortcode', 'magee-shortcodes' ),
1747
+ 'name' => __('image-frame-shortcode/','magee-shortocdes'),
1748
  );
1749
 
1750
+
1751
  /*-----------------------------------------------------------------------------------*/
1752
+ /* Label Config
1753
  /*-----------------------------------------------------------------------------------*/
1754
 
1755
+ $magee_shortcodes['label'] = array(
1756
+ 'no_preview' => true,
1757
+ 'icon' => 'fa-bookmark',
1758
+ 'params' => array(
1759
+
1760
+ 'content' => array(
 
 
 
 
 
1761
  'std' => '',
 
 
 
 
 
 
1762
  'type' => 'text',
1763
+ 'label' => __( 'Text', 'magee-shortcodes' ),
1764
+ 'desc' => __( 'Insert text to be displayed in label.','magee-shortcodes')
1765
+ ),
1766
+ 'background_color' => array(
1767
+ 'std' => '',
1768
+ 'type' => 'colorpicker',
1769
+ 'label' => __( 'Background Color' , 'magee-shortcodes'),
1770
+ 'desc' => __( 'Set background color for label.','magee-shortcodes')
1771
  ),
 
 
 
 
 
 
1772
  ),
1773
+ 'shortcode' => '[ms_label background_color="{{background_color}}" ]{{content}}[/ms_label]',
1774
+ 'popup_title' => __( 'Label Shortcode', 'magee-shortcodes' ),
1775
+ 'name' => __('label-shortcode/','magee-shortocdes'),
1776
  );
1777
 
1778
  /*******************************************************
1794
  'desc' => __( 'Set color fo list icon.', 'magee-shortcodes')
1795
  ),
1796
  'icon_boxed' => array(
1797
+ 'type' => 'choose',
1798
  'label' => __( 'Icon Boxed', 'magee-shortcodes' ),
1799
  'desc' => __( 'Choose to set icon boxed.', 'magee-shortcodes'),
1800
  'options' =>array(
1815
  'circle' => __('Circle','magee-shortcodes'),)
1816
  ),
1817
  'item_border' => array(
1818
+ 'type' => 'choose',
1819
  'label' => __( 'Item Border', 'magee-shortcodes' ),
1820
  'desc' => __( 'Choose to display item border for list.', 'magee-shortcodes'),
1821
  'options' =>array(
1823
  'yes' => __('Yes','magee-shortcodes'),)
1824
  ),
1825
  'item_size' => array(
1826
+ 'type' => 'number',
1827
+ 'std' => '12',
1828
+ 'max' => '50',
1829
+ 'min' => '0',
1830
  'label' => __( 'Item Size', 'magee-shortcodes' ),
1831
  'desc' => __( 'Set text font size for item.', 'magee-shortcodes'),
1832
  ),
1850
  ),
1851
  ),
1852
  'shortcode' => '[ms_list icon="{{icon}}" icon_color="{{icon_color}}" icon_boxed="{{icon_boxed}}" background_color="{{background_color}}" boxed_shape="{{boxed_shape}}" item_border="{{item_border}}" item_size="{{item_size}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_list]',
1853
+ 'popup_title' => __( 'List Shortcode', 'magee-shortcodes' ),
1854
+ 'name' => __('list-shortcode/','magee-shortcodes'),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1855
  );
 
1856
 
1857
  /*******************************************************
1858
  * Modal Config
1886
  ),
1887
 
1888
  'showfooter' => array(
1889
+ 'type' => 'choose',
1890
  'label' => __( 'Show Footer', 'magee-shortcodes' ),
1891
  'desc' => __( 'Choose to show the modal footer with close button.', 'magee-shortcodes' ),
1892
  'options' => array(
1893
+ 'yes' => __('Yes', 'magee-shortcodes'),
1894
+ 'no' => __('No', 'magee-shortcodes'),
1895
  )
1896
  ),
1897
  'content' => array(
1914
  ),
1915
  ),
1916
  'shortcode' => '[ms_modal title="{{title}}" size="{{size}}" showfooter="{{showfooter}}" class="{{class}}" id="{{id}}"][ms_modal_anchor_text]{{modal_anchor_text}}[/ms_modal_anchor_text][ms_modal_content]{{content}}[/ms_modal_content][/ms_modal]',
1917
+ 'popup_title' => __( 'Modal Shortcode', 'magee-shortcodes' ),
1918
+ 'name' => __('modal-shortcode/','magee-shortocdes'),
1919
  );
1920
 
1921
  /*-----------------------------------------------------------------------------------*/
1946
  ),
1947
  ),
1948
  'shortcode' => '[ms_menu menu="{{menu}}" class="{{class}}" id="{{id}}"][/ms_menu]' ,
1949
+ 'popup_title' => __( 'Menu Shortcode', 'magee-shortcodes'),
1950
  );
1951
 
1952
  /*-----------------------------------------------------------------------------------*/
1953
+ /* panel Config
1954
  /*-----------------------------------------------------------------------------------*/
1955
 
1956
+ $magee_shortcodes['panel'] = array(
1957
  'no_preview' => true,
1958
+ 'icon' => 'fa-list-alt',
1959
  'params' => array(
1960
+
1961
  'title' => array(
1962
+ 'std' => 'Panel title',
 
 
 
 
 
 
1963
  'type' => 'text',
1964
+ 'label' => __( 'Title', 'magee-shortcodes' ),
1965
+ 'desc' => __( 'Insert title for panel.', 'magee-shortcodes' ),
1966
  ),
 
 
1967
  'content' => array(
1968
+ 'std' => __('Panel content.', 'magee-shortcodes'),
1969
  'type' => 'textarea',
1970
+ 'label' => __( 'Panel Content', 'magee-shortcodes' ),
1971
+ 'desc' => __( 'Insert content for panel.', 'magee-shortcodes' ),
1972
  ),
1973
+
1974
+
1975
+ 'title_color' => array(
1976
+ 'std' => '#000',
1977
+ 'type' => 'colorpicker',
1978
+ 'label' => __( 'Title Color', 'magee-shortcodes' ),
1979
+ 'desc' => __( 'Set color for panel title.', 'magee-shortcodes' ),
 
 
1980
  ),
1981
+ 'border_color' => array(
1982
+ 'std' => '#ddd',
1983
+ 'type' => 'colorpicker',
1984
+ 'label' => __( 'Border Color', 'magee-shortcodes' ),
1985
+ 'desc' => __( 'Set color for panel border.', 'magee-shortcodes' ),
 
 
 
 
 
1986
  ),
1987
+
1988
+ 'title_background_color' => array(
1989
+ 'std' => '#f5f5f5',
1990
+ 'type' => 'colorpicker',
1991
+ 'label' => __( 'Title Background Color', 'magee-shortcodes' ),
1992
+ 'desc' => __( 'Set background color for panel title.', 'magee-shortcodes' ),
1993
+ ),
1994
+ 'border_radius' => array(
1995
+ 'std' => '0',
1996
+ 'type' => 'number',
1997
+ 'max' => '50',
1998
+ 'min' => '0',
1999
+ 'label' => __( 'Border Radius', 'magee-shortcodes' ),
2000
+ 'desc' => __('In pixels (px), eg: 1px.', 'magee-shortcodes')
2001
+ ),
2002
  'class' => array(
2003
  'std' => '',
2004
  'type' => 'text',
2005
  'label' => __( 'CSS Class', 'magee-shortcodes' ),
2006
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
2007
  ),
2008
  'id' => array(
2009
  'std' => '',
2010
  'type' => 'text',
2011
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
2012
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
2013
+ ),
2014
  ),
2015
+ 'shortcode' => '[ms_panel title="{{title}}" title_color="{{title_color}}" border_color="{{border_color}}" title_background_color="{{title_background_color}}" border_radius="{{border_radius}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_panel]',
2016
+ 'popup_title' => __( 'Panel Shortcode', 'magee-shortcodes' ),
2017
+ 'name' => __('panel-shortcode/','magee-shortcodes'),
2018
  );
2019
 
2020
  /*-----------------------------------------------------------------------------------*/
2031
  'label' => __( 'Style', 'magee-shortcodes'),
2032
  'desc' => __( 'Choose to display info below or beside the image.','magee-shortcodes'),
2033
  'options' => array(
2034
+ 'below' => __('Below', 'magee-shortcodes') ,
2035
+ 'beside' => __('Beside', 'magee-shortcodes'),
2036
  ),
2037
  ),
2038
  'name' => array(
2049
  ),
2050
  'link_target' => array(
2051
  'std' => '',
2052
+ 'type' => 'choose',
2053
  'label' => __( 'Link Target', 'magee-shortcodes' ),
2054
  'desc' => __( '_self = open in same window _blank = open in new window.', 'magee-shortcodes' ),
2055
  'options' => array(
2066
  ),
2067
  'overlay_opacity' => array(
2068
  'std' => '0.5',
2069
+ 'type' => 'select',
2070
  'label' => __('Image Overlay Opacity', 'magee-shortcodes'),
2071
+ 'desc' => __('Opacity ranges between 0 (transparent) and 1 (opaque). ex: .5','magee-shortcodes'),
2072
+ 'options' => $opacity
2073
  ),
2074
  'content' => array(
2075
  'std' => '',
2090
  ),
2091
  'picborder' => array(
2092
  'std' => '0',
2093
+ 'type' => 'number',
2094
+ 'max' => '50',
2095
+ 'min' => '0',
2096
  'label' => __( 'Picture Border Size', 'magee-shortcodes' ),
2097
  'desc' => __( 'In pixels (px), ex: 1px. Leave blank for theme option selection.', 'magee-shortcodes' ),
2098
  ),
2103
  ),
2104
  'picborderradius' => array(
2105
  'std' => '0',
2106
+ 'type' => 'number',
2107
+ 'max' => '50',
2108
+ 'min' => '0',
2109
  'label' => __( 'Picture Border Radius', 'magee-shortcodes' ),
2110
  'desc' => __( 'Choose the border radius of the person image. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
2111
  ),
2112
  'iconboxedradius' => array(
2113
+ 'std' => '4',
2114
+ 'type' => 'number',
2115
+ 'max' => '50',
2116
+ 'min' => '0',
2117
  'label' => __( 'Social Icon Box Radius', 'magee-shortcodes' ),
2118
  'desc' => __( 'Choose the border radius of the boxed icons. In pixels (px), ex: 1px, or "round". Leave blank for theme option selection.', 'magee-shortcodes' ),
2119
  ),
2197
  ),
2198
  ),
2199
  'shortcode' => '[ms_person name="{{name}}" style="{{style}}" title="{{title}}" link_target="{{link_target}}" overlay_color="{{overlay_color}}" overlay_opacity="{{overlay_opacity}}" picture="{{picture}}" piclink="{{piclink}}" picborder="{{picborder}}" picbordercolor="{{picbordercolor}}" picborderradius="{{picborderradius}}" iconboxedradius="{{iconboxedradius}}" iconcolor="{{iconcolor}}" icon1="{{icon1}}" icon2="{{icon2}}" icon3="{{icon3}}" icon4="{{icon4}}" icon5="{{icon5}}" link1="{{link1}}" link2="{{link2}}" link3="{{link3}}" link4="{{link4}}" link5="{{link5}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_person]',
2200
+ 'popup_title' => __( 'Person Shortcode', 'magee-shortcodes' ),
2201
+ 'name' => __('person-shortcode/','magee-shortcodes'),
2202
  );
2203
 
2204
  /*-----------------------------------------------------------------------------------*/
2205
+ /* Piechart Config
2206
  /*-----------------------------------------------------------------------------------*/
2207
 
2208
+
2209
+ $magee_shortcodes['piechart'] = array(
2210
  'no_preview' => true,
2211
+ 'icon' => 'fa-circle-o-notch',
2212
  'params' => array(
2213
 
2214
+ 'percent' => array(
2215
+ 'std' => '80',
2216
+ 'type' => 'number',
2217
+ 'max' => '100',
2218
+ 'min' => '0',
2219
+ 'label' => __( 'Percent', 'magee-shortcodes' ),
2220
+ 'desc' => __( 'From 1 to 100.', 'magee-shortcodes' ),
2221
+
 
 
 
 
 
 
 
 
 
 
 
 
2222
  ),
2223
 
2224
+ 'content' => array(
2225
+ 'std' => '80%',
2226
+ 'type' => 'textarea',
2227
+ 'label' => __( 'Title', 'magee-shortcodes' ),
2228
+ 'desc' => __( 'Insert title for piechart. It need to be short.', 'magee-shortcodes' ),
2229
 
 
 
 
 
 
 
 
 
2230
  ),
2231
+ 'size' => array(
2232
+ 'std' => '200',
2233
+ 'type' => 'number',
2234
+ 'max' => '500',
2235
+ 'min' => '0',
2236
+ 'label' => __( 'Size', 'magee-shortcodes' ),
2237
+ 'desc' => __( 'Set size for piechart.', 'magee-shortcodes' ),
2238
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2239
  ),
2240
  'font_size' => array(
2241
+ 'std' => '40',
2242
+ 'type' => 'number',
2243
+ 'max' => '50',
2244
+ 'min' => '0',
2245
  'label' => __( 'Font Size', 'magee-shortcodes' ),
2246
  'desc' => __( 'Set font size for piechart title.', 'magee-shortcodes' ),
2247
 
2268
 
2269
  ),
2270
  'shortcode' => '[ms_piechart percent="{{percent}}" filledcolor="{{filledcolor}}" size="{{size}}" font_size="{{font_size}}" unfilledcolor="{{unfilledcolor}}" class="{{class}}" ]{{content}}[/ms_piechart]',
2271
+ 'popup_title' => __( 'Piechart Shortcode', 'magee-shortcodes' ),
2272
+ 'name' => __('piechart-shortcode/','magee-shortcodes'),
2273
  );
2274
 
2275
  /*-----------------------------------------------------------------------------------*/
2276
+ /* Popover Config
2277
  /*-----------------------------------------------------------------------------------*/
2278
 
2279
+ $magee_shortcodes['popover'] = array(
2280
  'no_preview' => true,
2281
+ 'icon' => 'fa-comment-o',
2282
  'params' => array(
 
2283
  'title' => array(
2284
+ 'std' => '',
2285
  'type' => 'text',
2286
+ 'label' => __( 'Popover Heading', 'magee-shortcodes' ),
2287
+ 'desc' => __( 'Insert heading text of the popover.', 'magee-shortcodes' ),
2288
  ),
2289
+ 'triggering_text' => array(
2290
+ 'std' => '',
2291
+ 'type' => 'text',
2292
+ 'label' => __( 'Triggering Text', 'magee-shortcodes' ),
2293
+ 'desc' => __( 'Content that will trigger the popover.', 'magee-shortcodes' ),
2294
  ),
2295
 
2296
+
2297
+ 'content' => array(
2298
+ 'std' => '',
2299
+ 'type' => 'textarea',
2300
+ 'label' => __( 'Contents Inside Popover', 'magee-shortcodes' ),
2301
+ 'desc' => __( 'Text to be displayed inside the popover.', 'magee-shortcodes' ),
2302
  ),
2303
+
2304
+ 'trigger' => array(
2305
+ 'type' => 'select',
2306
+ 'label' => __( 'Popover Trigger Method', 'magee-shortcodes' ),
2307
+ 'desc' => __( 'Choose mouse action to trigger popover.', 'magee-shortcodes' ),
2308
+ 'options' => array(
2309
+ 'click' => __('Click', 'magee-shortcodes'),
2310
+ 'hover' => __('Hover', 'magee-shortcodes'),
2311
+ )
2312
  ),
2313
+ 'placement' => array(
2314
+ 'type' => 'select',
2315
+ 'label' => __( 'Popover Position', 'magee-shortcodes' ),
2316
+ 'desc' => __( 'Choose the display position of the popover.', 'magee-shortcodes' ),
2317
+ 'options' => array(
2318
+ 'top' => __('Top', 'magee-shortcodes'),
2319
+ 'bottom' => __('Bottom', 'magee-shortcodes'),
2320
+ 'left' => __('Left', 'magee-shortcodes'),
2321
+ 'Right' => __('Right', 'magee-shortcodes'),
2322
+ )
2323
  ),
2324
 
 
 
 
 
 
 
 
 
 
2325
  'class' => array(
2326
  'std' => '',
2327
  'type' => 'text',
2328
  'label' => __( 'CSS Class', 'magee-shortcodes' ),
2329
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
2330
  ),
2331
  'id' => array(
2332
  'std' => '',
2333
  'type' => 'text',
2334
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
2335
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
2336
+ ),
2337
  ),
2338
+ 'shortcode' => '[ms_popover title="{{title}}" triggering_text="{{triggering_text}}" trigger="{{trigger}}" placement="{{placement}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_popover]', // as there is no wrapper shortcode
2339
+ 'popup_title' => __( 'Popover Shortcode', 'magee-shortcodes' ),
2340
+ 'name' => __('popover-shortcode/','magee-shortocdes'),
2341
  );
2342
 
2343
  /*-----------------------------------------------------------------------------------*/
2372
 
2373
  ),
2374
  'number' => array(
2375
+ 'type' => 'choose',
2376
  'label' => __( 'Display Number', 'magee-shortcodes' ),
2377
  'desc' => __( 'Choose to diplay number for progress bar.', 'magee-shortcodes' ),
2378
  'options' =>$choices
2381
 
2382
  'percent' => array(
2383
  'std' => '50',
2384
+ 'type' => 'number',
2385
+ 'max' => '100',
2386
+ 'min' => '0',
2387
  'label' => __( 'Percent', 'magee-shortcodes' ),
2388
  'desc' => __( 'Set percentage for progress bar. 0~100.', 'magee-shortcodes' )
2389
  ),
2397
 
2398
  'height' => array(
2399
  'std' => '30',
2400
+ 'type' => 'number',
2401
+ 'max' => '200',
2402
+ 'min' => '0',
2403
  'label' => __( 'Height', 'magee-shortcodes' ),
2404
  'desc' =>__( 'Set height for progress bar.', 'magee-shortcodes' ),
2405
  ),
2449
 
2450
  ),
2451
  'shortcode' => '[ms_progress striped="{{striped}}" rounded="{{rounded}}" number="{{number}}" percent="{{percent}}" text="{{text}}" height="{{height}}" color="{{color}}" textalign="{{textalign}}" textposition="{{textposition}}" class="{{class}}" id="{{id}}"]',
2452
+ 'popup_title' => __( 'Progress Shortcode', 'magee-shortcodes' ),
2453
+ 'name' => __('progress-bar-shortcode/','magee-shortcodes'),
2454
+ );
2455
+
2456
+ /*-----------------------------------------------------------------------------------*/
2457
+ /* Promo_box Config
2458
+ /*-----------------------------------------------------------------------------------*/
2459
+
2460
+ $magee_shortcodes['promo_box'] = array(
2461
+ 'no_preview' => true,
2462
+ 'icon' => 'fa-tag',
2463
+ 'params' => array(
2464
+
2465
+ 'style' => array(
2466
+ 'type' => 'select',
2467
+ 'label' => __( 'Style', 'magee-shortcodes' ),
2468
+ 'desc' => __( 'Select style for promo box.', 'magee-shortcodes' ),
2469
+ 'options' => array(
2470
+ 'normal' => __('Normal', 'magee-shortcodes'),
2471
+ 'boxed' => __('Boxed', 'magee-shortcodes'),
2472
+ )
2473
+ ),
2474
+ 'border_color' => array(
2475
+ 'type' => 'colorpicker',
2476
+ 'std' => '#fdd200',
2477
+ 'label' => __( 'Border Color', 'magee-shortcodes' ),
2478
+ 'desc' => __( 'Set color for highlight border of promo box.', 'magee-shortcodes' ),
2479
+ ),
2480
+ 'border_width' => array(
2481
+ 'std' => '1',
2482
+ 'type' => 'number',
2483
+ 'max' => '50',
2484
+ 'min' => '0',
2485
+ 'label' => __( 'Border Width', 'magee-shortcodes' ),
2486
+ 'desc' => __( 'Set width for highlight border of promo box.', 'magee-shortcodes' ),
2487
+ ),
2488
+
2489
+ 'border_position' => array(
2490
+ 'type' => 'select',
2491
+ 'label' => __( 'Border Position', 'magee-shortcodes' ),
2492
+ 'desc' => __( 'Choose position for highlight border of promo box.', 'magee-shortcodes' ),
2493
+ 'options' => array(
2494
+ 'left' => __('Left', 'magee-shortcodes'),
2495
+ 'right' => __('Right', 'magee-shortcodes'),
2496
+ 'top' => __('Top', 'magee-shortcodes'),
2497
+ 'bottom' => __('Bottom', 'magee-shortcodes'),
2498
+
2499
+ )
2500
+ ),
2501
+ 'background_color' => array(
2502
+ 'type' => 'colorpicker',
2503
+ 'std' =>'#f5f5f5',
2504
+ 'label' => __( 'Icon Circle Background Color', 'magee-shortcodes' ),
2505
+ 'desc' => __( 'Set background color for promo box.', 'magee-shortcodes' ),
2506
+ ),
2507
+ 'button_color' => array(
2508
+ 'type' => 'colorpicker',
2509
+ 'std' =>'',
2510
+ 'label' => __( 'Button Color', 'magee-shortcodes' ),
2511
+ ),
2512
+
2513
+ 'button_text' => array(
2514
+ 'std' => '',
2515
+ 'type' => 'text',
2516
+ 'label' => __( 'Button Text', 'magee-shortcodes' ),
2517
+ 'desc' => __( 'Inser text for button of promo box.', 'magee-shortcodes' ),
2518
+ ),
2519
+ 'button_text_color' => array(
2520
+ 'std' => '#ffffff',
2521
+ 'type' => 'colorpicker',
2522
+ 'label' => __( 'Button Text Color', 'magee-shortcodes' ),
2523
+ ),
2524
+ 'button_link' => array(
2525
+ 'std' => '',
2526
+ 'type' => 'text',
2527
+ 'label' => __( 'Button Link URL', 'magee-shortcodes' ),
2528
+ 'desc' => __( 'Inser link for button of promo box, eg: http://example.com.', 'magee-shortcodes' ),
2529
+ ),
2530
+ 'button_icon' => array(
2531
+ 'type' => 'iconpicker',
2532
+ 'label' => __( 'Button Icon', 'magee-shortcodes' ),
2533
+ 'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
2534
+ 'options' => $icons
2535
+ ),
2536
+ 'content' => array(
2537
+ 'std' => '',
2538
+ 'type' => 'textarea',
2539
+ 'label' => __( 'Content', 'magee-shortcodes' ),
2540
+ 'desc' => __( 'Insert content for promo box.', 'magee-shortcodes' ),
2541
+ ),
2542
+ 'class' => array(
2543
+ 'std' => '',
2544
+ 'type' => 'text',
2545
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
2546
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
2547
+ ),
2548
+ 'id' => array(
2549
+ 'std' => '',
2550
+ 'type' => 'text',
2551
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
2552
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
2553
+ ),
2554
+ ),
2555
+ 'shortcode' => '[ms_promo_box style="{{style}}" border_color="{{border_color}}" border_width="{{border_width}}" border_position="{{border_position}}" background_color="{{background_color}}" button_color="{{button_color}}" button_link="{{button_link}}" button_icon="{{button_icon}}" button_text="{{button_text}}" button_text_color="{{button_text_color}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_promo_box]',
2556
+ 'popup_title' => __( 'Promo Box Shortcode', 'magee-shortcodes' ),
2557
+ 'name' => __('promo-box-shortcode/','magee-shortcodes'),
2558
  );
2559
 
2560
  /*-----------------------------------------------------------------------------------*/
2596
  ),
2597
  'shortcode' => '[ms_pullquote align="{{align}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_pullquote]',
2598
  'popup_title' =>__('Pullquote Shortcode','magee-shortcodes'),
2599
+ 'name' => __('pullquote-shortcode/','magee-shortocdes'),
2600
  );
2601
 
2602
  /*-----------------------------------------------------------------------------------*/
2622
  ),
2623
  'size' => array(
2624
  'std' => '100',
2625
+ 'type' => 'number',
2626
+ 'max' => '200',
2627
+ 'min' => '0',
2628
  'label' => __('Size in pixel','magee-shortcodes'),
2629
  'desc' => __('Image width and height.','magee-shortcodes'),
2630
  ),
2631
  'click' => array(
2632
  'std' => 'no',
2633
+ 'type' => 'choose',
2634
  'label' => __('QRCode clickable?','magee-shortcodes'),
2635
  'desc' => __('Choose to make this QR code clickable.','magee-shortcodes'),
2636
  'options' => array(
2652
  ),
2653
  ),
2654
  'shortcode' => '[ms_qrcode alt="{{alt}}" size="{{size}}" click="{{click}}" fgcolor="{{fgcolor}}" bgcolor="{{bgcolor}}"]{{content}}[/ms_qrcode]',
2655
+ 'popup_title' => __( 'QR Code Shortcode', 'magee-shortcodes' ),
2656
+ 'name' => __('qr-code-shortcode/','magee-shortocdes'),
2657
  );
2658
 
2659
  /*-----------------------------------------------------------------------------------*/
2697
  ),
2698
  'shortcode' => '[ms_quote cite="{{cite}}" url="{{url}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_quote]',
2699
  'popup_title' =>__('Quote Shortcode','magee-shortcodes'),
2700
+ 'name' => __('quote-shortcode/','magee-shortocdes'),
2701
  );
2702
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2703
  /*-----------------------------------------------------------------------------------*/
2704
  /* RSS Feed Config
2705
  /*-----------------------------------------------------------------------------------*/
2717
  ),
2718
  'number' => array(
2719
  'std' => '3',
2720
+ 'type' => 'number',
2721
+ 'max' => '20',
2722
+ 'min' => '0',
2723
  'label' => __( 'Number to Display', 'magee-shortcodes'),
2724
  'desc' => __( 'Number of items to show.', 'magee-shortcodes')
2725
  ),
2738
  ),
2739
  'shortcode' => '[ms_rss_feed url="{{url}}" number="{{number}}" class="{{class}}" id="{{id}}"][/ms_rss_feed]',
2740
  'popup_title' =>__('RSS Feed Shortcode','magee-shortcodes'),
2741
+ 'name' => __('rss-feed-shortcode/','magee-shortocdes'),
2742
  );
2743
 
2744
+
2745
  /*-----------------------------------------------------------------------------------*/
2746
+ /* Scheduled_content Config
2747
  /*-----------------------------------------------------------------------------------*/
2748
 
2749
+ $magee_shortcodes['scheduled_content'] = array(
2750
+ 'no_preview' => true,
2751
+ 'icon' => 'fa-clock-o',
2752
  'params' => array(
2753
+ 'time' => array(
2754
+ 'std' => '6-12,13-16',
 
2755
  'type' => 'text',
2756
+ 'label' => __( 'Time', 'magee-shortcodes'),
2757
+ 'desc' => __( 'Select an random time in one day to show content.</br>Example: 6-12,13-16 show content from 6:00 to 12:00 and from 13:00 to 16:00', 'magee-shortcodes')
2758
+ ),
2759
+ 'day_week' => array(
2760
+ 'std' => '1-5,7',
 
 
 
 
 
 
2761
  'type' => 'text',
2762
+ 'label' => __( 'Days of Week', 'magee-shortcodes'),
2763
+ 'desc' => __( 'Select days from one week to show content.</br>1 => Monday </br>2 => Tuesday </br> 3 => Wednesday</br> 4 => Thursday </br> 5 => Friday </br> 6 => Saturday </br> 7 => Sunday </br>Examples:1-5,7 =>show content at Sunday and from Monday to Friday', 'magee-shortcodes')
 
 
 
 
 
 
 
 
 
 
2764
  ),
2765
+ 'day_month' =>array(
2766
+ 'std' => '10-15,20-25',
2767
+ 'type' => 'text',
2768
+ 'label' => __( 'Days of Month', 'magee-shortcodes'),
2769
+ 'desc' => __('Select days from one month to show content.</br>Examples:</br>1 => show content only at first day of month </br> 10-25 => show content from 10th to 25th </br> 10-15,20-25 => show content from 10th to 15th and from 20th to 25th','magee-shortcodes')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2770
  ),
2771
+ 'months' => array(
2772
+ 'std' => '1,5,8-9',
2773
  'type' => 'text',
2774
+ 'label' => __('Months','magee-shortcodes'),
2775
+ 'desc' => __('Select months from a year to show content.</br>Examples:</br>1 => show content in January </br> 3-6 => show content from March to June </br> 1,5,8-9 => show content in January,May and from August to September','magee-shortcodes')
2776
+ ),
2777
+ 'years' => array(
2778
+ 'std' => '2016,2017,2345-2666',
2779
  'type' => 'text',
2780
+ 'label' => __('Years','magee-shortcodes'),
2781
+ 'desc' => __( 'Select years to show content.</br>Examples:</br> 2016 => show content in 2016 </br>2014-2016 => show content from 2014 to 2016 </br> 2016,2017,2345-2666 => show content in 2016,2017 and from 2345 to 2666','magee-shortcodes')
2782
  ),
2783
+ 'class' => array(
2784
  'std' => '',
2785
  'type' => 'text',
2786
+ 'label' => __( 'CSS Class', 'magee-shortcodes'),
2787
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
2788
  ),
2789
+ 'id' => array(
2790
+ 'std' => '',
2791
+ 'type' => 'text',
2792
+ 'label' => __( 'CSS ID', 'magee-shortcodes'),
2793
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
2794
+ ),
2795
+ 'content' => array(
2796
+ 'std' => '',
2797
+ 'type' => 'textarea',
2798
+ 'label' => __( 'Content', 'magee-shortcodes'),
2799
+ 'desc' => __( 'Insert scheduled content.', 'magee-shortcodes')
2800
+ )
2801
  ),
2802
+ 'shortcode' => '[ms_scheduled_content time="{{time}}" day_week="{{day_week}}" day_month="{{day_month}}" months="{{months}}" years="{{years}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_scheduled_content]',
2803
+ 'popup_title' => __( 'Scheduled Shortcode','magee-shortcodes'),
2804
+ 'name' => __('scheduled-shortcode/','magee-shortocdes'),
2805
+ );
2806
 
2807
  /*-----------------------------------------------------------------------------------*/
2808
  /* Section Config
2832
  'desc' =>__( 'Choose repeat style for the background image.', 'magee-shortcodes' ),
2833
  'std' => '',
2834
  'options' => array(
2835
+ 'repeat' => __( 'Repeat', 'magee-shortcodes' ),
2836
+ 'repeat-x' => __( 'Repeat-x', 'magee-shortcodes' ),
2837
+ 'repeat-y' => __( 'Repeat-y', 'magee-shortcodes' ),
2838
+ 'no-repeat' => __( 'No-repeat', 'magee-shortcodes' ),
2839
+ 'inherit' => __( 'Inherit', 'magee-shortcodes' )
2840
  )
2841
  ),
2842
 
2846
  'desc' => __( 'Choose the postion of the background image.', 'magee-shortcodes' ),
2847
  'std' => '',
2848
  'options' => array(
2849
+ 'top left' => __( 'Top Left', 'magee-shortcodes' ),
2850
+ 'top center' => __( 'Top Center', 'magee-shortcodes' ),
2851
+ 'top right' => __( 'Top Right', 'magee-shortcodes' ),
2852
+ 'center left' => __( 'Center Left', 'magee-shortcodes' ),
2853
+ 'center center' => __( 'Center Center', 'magee-shortcodes' ),
2854
+ 'center right' => __( 'Center Right', 'magee-shortcodes' ),
2855
+ 'bottom left' => __( 'Bottom Left', 'magee-shortcodes' ),
2856
+ 'bottom center' => __( 'Bottom Center', 'magee-shortcodes' ),
2857
+ 'bottom right' => __( 'Bottom Right', 'magee-shortcodes' )
2858
  )
2859
  ),
2860
  'background_parallax' => array(
2861
+ 'type' => 'choose',
2862
  'label' => __( 'Background Parallax', 'magee-shortcodes' ),
2863
  'desc' => __( 'Choose how the background image scrolls and responds.', 'magee-shortcodes' ),
2864
  'std' => 'no',
2865
  'options' => $reverse_choices
2866
  ),
2867
  'border_size' => array(
2868
+ 'std' => '0',
2869
+ 'type' => 'number',
2870
+ 'max' => '50',
2871
+ 'min' => '0',
2872
  'label' => __( 'Border Size', 'magee-shortcodes' ),
2873
  'desc' =>__( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2874
  ),
2902
  ),
2903
 
2904
  'padding_top' => array(
2905
+ 'std' => '10',
2906
+ 'type' => 'number',
2907
+ 'max' => '100',
2908
+ 'min' => '0',
2909
  'label' => __( 'Padding Top', 'magee-shortcodes' ),
2910
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2911
  ),
2912
  'padding_bottom' => array(
2913
+ 'std' => '10',
2914
+ 'type' => 'number',
2915
+ 'max' => '100',
2916
+ 'min' => '0',
2917
  'label' => __( 'Padding Bottom', 'magee-shortcodes' ),
2918
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2919
  ),
2920
  'padding_left' => array(
2921
+ 'std' => '10',
2922
+ 'type' => 'number',
2923
+ 'max' => '100',
2924
+ 'min' => '0',
2925
  'label' => __( 'Padding Left', 'magee-shortcodes' ),
2926
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2927
  ),
2928
  'padding_right' => array(
2929
+ 'std' => '10',
2930
+ 'type' => 'number',
2931
+ 'max' => '100',
2932
+ 'min' => '0',
2933
  'label' => __( 'Padding Right', 'magee-shortcodes' ),
2934
  'desc' => __( 'In pixels (px), eg: 1px.', 'magee-shortcodes' ),
2935
  ),
2936
  'contents_in_container' => array(
2937
+ 'type' => 'choose',
2938
  'label' => __( 'Contents in Container ?', 'magee-shortcodes' ),
2939
  'desc' => __( 'Put the content in container.', 'magee-shortcodes' ),
2940
  'std' => 'no',
2954
  'label' => __( 'Top Separator', 'magee-shortcodes' ),
2955
  'desc' => '',
2956
  'options' => array(
2957
+ '' => __('None', 'magee-shortcodes'),
2958
+ 'triangle' => __('Triangle', 'magee-shortcodes'),
2959
+ 'doublediagonal' => __('Doublediagonal', 'magee-shortcodes'),
2960
+ 'halfcircle' => __('Halfcircle', 'magee-shortcodes'),
2961
+ 'bigtriangle' => __('Bigtriangle', 'magee-shortcodes'),
2962
+ 'bighalfcircle' => __('Bighalfcircle', 'magee-shortcodes'),
2963
+ 'curl' => __('Curl', 'magee-shortcodes'),
2964
+ 'multitriangles' => __('Multitriangles', 'magee-shortcodes'),
2965
+ 'roundedsplit' => __('Roundedsplit', 'magee-shortcodes'),
2966
+ 'boxes' => __('Boxes', 'magee-shortcodes'),
2967
+ 'zigzag' => __('Zigzag', 'magee-shortcodes'),
2968
+ 'clouds' => __('Clouds', 'magee-shortcodes'),
2969
  )
2970
  ),
2971
+ 'bottom_separator' => array(
2972
+ 'std' => 'yes',
2973
+ 'type' => 'select',
2974
+ 'label' => __( 'Bottom Separator', 'magee-shortcodes' ),
2975
+ 'desc' => '',
2976
+ 'options' => array(
2977
+ '' => __('None', 'magee-shortcodes'),
2978
+ 'triangle' => __('Triangle', 'magee-shortcodes'),
2979
+ 'halfcircle' => __('Halfcircle', 'magee-shortcodes'),
2980
+ 'bigtriangle' => __('Bigtriangle', 'magee-shortcodes'),
2981
+ 'bighalfcircle' => __('Bighalfcircle', 'magee-shortcodes'),
2982
+ 'curl' => __('Curl', 'magee-shortcodes'),
2983
+ 'multitriangles' => __('Multitriangles', 'magee-shortcodes'),
2984
+ 'roundedcorners' => __('Roundedcorners', 'magee-shortcodes'),
2985
+ 'foldedcorner' => __('Foldedcorner', 'magee-shortcodes'),
2986
+ 'boxes' => __('Boxes', 'magee-shortcodes'),
2987
+ 'zigzag' => __('Zigzag', 'magee-shortcodes'),
2988
+ 'stamp' => __('Stamp', 'magee-shortcodes'),
2989
+ )
2990
+ ),
2991
+ 'full_height' => array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2992
  'std' => '',
2993
+ 'type' => 'choose',
2994
+ 'label' => __('Full Height' , 'magee-shortcodes'),
2995
+ 'desc' => __('Choose to set the section height same as browser window.' , 'magee-shortcodes'),
2996
+ 'options' => $reverse_choices
2997
  ),
2998
+ 'class' => array(
2999
  'std' => '',
3000
  'type' => 'text',
3001
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
3002
  'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes')
3003
  ),
3004
+ 'id' => array(
3005
  'std' => '',
3006
  'type' => 'text',
3007
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
3008
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes')
3009
+ ),
 
 
 
 
 
 
3010
  ),
3011
+ 'shortcode' => '[ms_section background_color="{{background_color}}" background_image="{{background_image}}" background_repeat="{{background_repeat}}" background_position="{{background_position}}" background_parallax="{{background_parallax}}" border_size="{{border_size}}" border_color="{{border_color}}" border_style="{{border_style}}" padding_top="{{padding_top}}" padding_bottom="{{padding_bottom}}" padding_left="{{padding_left}}" padding_right="{{padding_right}}" contents_in_container="{{contents_in_container}}" top_separator="{{top_separator}}" bottom_separator="{{bottom_separator}}" full_height="{{full_height}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_section]',
3012
+ 'popup_title' => __( 'Section Shortcode', 'magee-shortcodes' ),
3013
+ 'name' => __('section-shortcode/','magee-shortcodes'),
3014
+ );
3015
 
3016
  /*-----------------------------------------------------------------------------------*/
3017
+ /* Magee Slider Config
3018
  /*-----------------------------------------------------------------------------------*/
3019
 
3020
+ $magee_shortcodes['ms_slider'] = array(
3021
  'no_preview' => true,
3022
+ 'icon' => 'fa-sliders',
3023
+ 'params' => array(
3024
+
3025
+ 'id' => array(
3026
+ 'std' => '',
3027
+ 'type' => 'select',
3028
+ 'label' => __( 'Slider', 'magee-shortcodes' ),
3029
+ 'desc' => '',
3030
+ 'options' => $magee_sliders
3031
+ ),
3032
+
3033
+ 'class' => array(
3034
+ 'std' => '',
3035
+ 'type' => 'text',
3036
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
3037
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
3038
+
3039
+ ),),
3040
+ 'shortcode' => '[ms_slider id="{{id}}" class="{{class}}"]',
3041
+ 'popup_title' => __( 'Slider', 'magee-shortcodes' ),
3042
+ 'name' => __('slider-shortcode/','magee-shortocdes'),
3043
+ );
3044
+
3045
+ /*-----------------------------------------------------------------------------------*/
3046
+ /* Social Config
3047
+ /*-----------------------------------------------------------------------------------*/
3048
+
3049
+ $magee_shortcodes['social'] = array(
3050
+ 'no_preview' => true,
3051
+ 'icon' => 'fa-twitter',
3052
  'params' => array(
3053
 
3054
  'title' => array(
3055
  'std' => '',
3056
  'type' => 'text',
3057
+ 'label' => __( 'Title ', 'magee-shortcodes' ),
3058
+ 'desc' => __( 'Insert the title for the social icon.', 'magee-shortcodes' ),
3059
+ ),
3060
+ 'icon' => array(
3061
+ 'type' => 'iconpicker',
3062
+ 'label' => __( 'Icon', 'magee-shortcodes' ),
3063
+ 'desc' => __( 'Click an icon to select, click again to deselect.', 'magee-shortcodes' ),
3064
+ 'options' => $icons
3065
+ ),
3066
+ 'icon_size' => array(
3067
+ 'std' => '13',
3068
+ 'type' => 'number',
3069
+ 'max' => '50',
3070
+ 'min' => '0',
3071
+ 'label' => __( 'Icon Size', 'magee-shortcodes' ),
3072
+ 'desc' => __( 'In pixels (px), eg: 13px.', 'magee-shortcodes')
3073
+ ),
3074
+ 'iconcolor' => array(
3075
+ 'type' => 'colorpicker',
3076
+ 'label' => __( 'Icon Color', 'magee-shortcodes' ),
3077
+ 'desc' => __( 'Set color for icon.', 'magee-shortcodes')
3078
+ ),
3079
+ 'backgroundcolor' => array(
3080
+ 'type' => 'colorpicker',
3081
+ 'label' => __( 'Icon Circle Background Color', 'magee-shortcodes' ),
3082
+ 'desc' => __( 'Set background color for icon.', 'magee-shortcodes')
3083
  ),
3084
+ 'effect_3d' => array(
3085
+ 'std'=>'no',
3086
+ 'type' => 'choose',
3087
+ 'label' => __( 'Icon 3D effect' ),
3088
+ 'desc' => __( 'Display box shadow for icon.', 'magee-shortcodes'),
3089
  'options' => array(
3090
+ 'yes' => __('Yes', 'magee-shortcodes'),
3091
+ 'no' => __('No', 'magee-shortcodes'),
3092
+ )
3093
+ ),
3094
+ 'iconboxedradius' => array(
 
 
3095
  'type' => 'select',
3096
+ 'label' => __( 'Icon Box Radius Style', 'magee-shortcodes' ),
3097
+ //'desc' => __( '', 'magee-shortcodes' ),
3098
  'options' => array(
3099
+ 'normal' => __('Normal', 'magee-shortcodes'),
3100
+ 'boxed' => __('Boxed', 'magee-shortcodes'),
3101
+ 'rounded' => __('Rounded', 'magee-shortcodes'),
3102
+ 'circle' => __('Circle ', 'magee-shortcodes'),
3103
  )
 
 
 
 
 
 
3104
  ),
3105
+ 'iconlink' => array(
3106
+ 'std' => '',
3107
+ 'type' => 'text',
3108
+ 'label' => __( 'Icon Link URL', 'magee-shortcodes' ),
3109
+ 'desc' => __( 'Add the icon\'s url eg: http://example.com.', 'magee-shortcodes' ),
3110
+ ),
3111
  'class' => array(
3112
  'std' => '',
3113
  'type' => 'text',
3119
  'type' => 'text',
3120
  'label' => __( 'CSS ID', 'magee-shortcodes' ),
3121
  'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
3122
+ ),
3123
  ),
3124
+ 'shortcode' => '[ms_social icon_size="{{icon_size}}" title="{{title}}" icon="{{icon}}" iconcolor="{{iconcolor}}" effect_3d="{{effect_3d}}" backgroundcolor="{{backgroundcolor}}" iconboxedradius="{{iconboxedradius}}" iconlink="{{iconlink}}" class="{{class}}" id="{{id}}"][/ms_social]',
3125
+ 'popup_title' => __( 'Social Shortcode', 'magee-shortcodes' ),
3126
+ 'name' => __('social-shortcode/','magee-shortcodes'),
3127
  );
3128
 
3129
  /*-----------------------------------------------------------------------------------*/
3177
 
3178
  'shortcode' => '[ms_tabs style="{{style}}" title_color="{{title_color}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_tabs]',
3179
  'popup_title' => __( 'Tab Shortcode', 'magee-shortcodes' ),
3180
+ 'name' => __('tabs-shortcode/','magee-shortcodes'),
3181
 
3182
  );
3183
 
3184
+ /*-----------------------------------------------------------------------------------*/
3185
+ /* Targeted_content Config
3186
+ /*-----------------------------------------------------------------------------------*/
3187
+
3188
+ $magee_shortcodes['targeted_content'] = array(
3189
+ 'no_preview' => true,
3190
+ 'icon' => 'fa-eye' ,
3191
+ 'params' => array(
3192
+ 'type' => array(
3193
+ 'type' => 'select',
3194
+ 'label' => __( 'Type', 'magee-shortcodes'),
3195
+ 'desc' => __( 'Select visible permissions.Private for author only. Members for logged-in users. Guests for users not logged in.', 'magee-shortcodes'),
3196
+ 'options' => array(
3197
+ 'private' => __( 'Private','magee-shortcodes'),
3198
+ 'members' => __( 'Members','magee-shortcodes'),
3199
+ 'guests' => __('Guests','magee-shortcodes'),
3200
+ )
3201
+ ),
3202
+ 'content' => array(
3203
+ 'std' => 'note text',
3204
+ 'type' => 'textarea',
3205
+ 'label' => __( 'Content', 'magee-shortcodes'),
3206
+ 'desc' => __( 'Set content for targeted users.', 'magee-shortcodes')
3207
+ ),
3208
+ 'alternative' => array(
3209
+ 'std' => 'alternative text',
3210
+ 'type' => 'textarea',
3211
+ 'label' => __( 'Alternative Content', 'magee-shortcodes'),
3212
+ 'desc' => __( 'Set content for other users.', 'magee-shortcodes')
3213
+ ),
3214
+ ),
3215
+ 'shortcode' => '[ms_targeted_content type="{{type}}" alternative="{{alternative}}"]{{content}}[/ms_targeted_content]',
3216
+ 'popup_title' => __( 'Targeted Shortcode','magee-shortcodes'),
3217
+ 'name' => __('targeted-shortcode/','magee-shortocdes'),
3218
+ );
3219
 
3220
  /*-----------------------------------------------------------------------------------*/
3221
  /* testimonial Config
3248
  'desc' => __( 'Byline of testimonial\'s author.', 'magee-shortcodes' ),
3249
  ),
3250
  'avatar' => array(
3251
+ 'type' => 'link',
3252
  'label' => __( 'Avatar', 'magee-shortcodes' ),
3253
  'desc' => __( 'Avatar of testimonial\'s author.', 'magee-shortcodes' ),
3254
  ),
3283
  ),
3284
  ),
3285
  'shortcode' => '[ms_testimonial style="{{style}}" name="{{name}}" avatar="{{avatar}}" byline="{{byline}}" alignment="{{alignment}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_testimonial]',
3286
+ 'popup_title' => __( 'Testimonial Shortcode', 'magee-shortcodes' ),
3287
+ 'name' => __('testimonial-shortcode/','magee-shortcodes'),
3288
  );
3289
 
3290
 
3332
  ),
3333
  'shortcode' => '[ms_timeline columns="{{columns}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_timeline]',
3334
  'popup_title' => __( 'Timeline Shortcode', 'magee-shortcodes' ),
3335
+ 'name' => __('timeline-shortcode/','magee-shortcodes'),
3336
 
3337
  );
3338
 
3339
  /*-----------------------------------------------------------------------------------*/
3340
+ /* Tooltip Config
3341
  /*-----------------------------------------------------------------------------------*/
3342
 
3343
+ $magee_shortcodes['tooltip'] = array(
3344
+ 'no_preview' => true,
3345
+ 'icon' => 'fa-comment-o',
3346
+ 'params' => array(
3347
+
3348
+ 'title' => array(
3349
+ 'std' => '',
3350
+ 'type' => 'text',
3351
+ 'label' => __( 'Tooltip Text', 'magee-shortcodes' ),
3352
+ 'desc' => __( 'Insert the text that displays in the tooltip', 'magee-shortcodes' )
3353
+ ),
3354
+ 'placement' => array(
3355
+ 'type' => 'select',
3356
+ 'label' => __( 'Tooltip Position', 'magee-shortcodes' ),
3357
+ 'desc' => __( 'Choose the display position.', 'magee-shortcodes' ),
3358
  'options' => array(
3359
+ 'top' => __('Top', 'magee-shortcodes'),
3360
+ 'bottom' => __('Bottom', 'magee-shortcodes'),
3361
+ 'left' => __('Left', 'magee-shortcodes'),
3362
+ 'right' => __('Right', 'magee-shortcodes'),
3363
  )
3364
  ),
3365
+ 'trigger' => array(
3366
+ 'type' => 'select',
3367
+ 'label' => __( 'Tooltip Trigger', 'magee-shortcodes' ),
3368
+ 'desc' => __( 'Choose action to trigger the tooltip.', 'magee-shortcodes' ),
3369
+ 'options' => array(
3370
+ 'hover' => __('Hover', 'magee-shortcodes'),
3371
+ 'click' => __('Click', 'magee-shortcodes'),
3372
+ )
3373
+ ),
3374
  'content' => array(
3375
+ 'std' => '',
3376
  'type' => 'textarea',
3377
+ 'label' => __( 'Content', 'magee-shortcodes' ),
3378
+ 'desc' => __( 'Insert the text that will activate the tooltip hover', 'magee-shortcodes' )
3379
  ),
3380
+ 'class' => array(
3381
+ 'std' => '',
3382
+ 'type' => 'text',
3383
+ 'label' => __( 'CSS Class', 'magee-shortcodes' ),
3384
+ 'desc' => __( 'Add a class to the wrapping HTML element.', 'magee-shortcodes' )
3385
  ),
3386
+ 'id' => array(
3387
+ 'std' => '',
3388
+ 'type' => 'text',
3389
+ 'label' => __( 'CSS ID', 'magee-shortcodes' ),
3390
+ 'desc' => __( 'Add an ID to the wrapping HTML element.', 'magee-shortcodes' )
3391
+ ),
3392
  ),
3393
+ 'shortcode' => '[ms_tooltip title="{{title}}" placement="{{placement}}" trigger="{{trigger}}" class="{{class}}" id="{{id}}"]{{content}}[/ms_tooltip]',
3394
+ 'popup_title' => __( 'Tooltip Shortcode', 'magee-shortcodes' ),
3395
+ 'name' => __('tooltip-shortcode/','magee-shortocdes'),
3396
  );
3397
 
3398
+
3399
  /*-----------------------------------------------------------------------------------*/
3400
  /* Video Config
3401
  /*-----------------------------------------------------------------------------------*/
3407
 
3408
  'mp4_url' => array(
3409
  'std' => '',
3410
+ 'type' => 'link',
3411
  'label' => __( 'Mp4 Video Url','magee-shortcodes'),
3412
  'desc' => __( 'Add the URL of video in MPEG4 format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3413
 
3414
  ),
3415
  'ogv_url' => array(
3416
  'std' => '',
3417
+ 'type' => 'link',
3418
  'label' => __( 'Ogv Video Url','magee-shortcodes'),
3419
  'desc' => __( 'Add the URL of video in OGV format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3420
 
3421
  ),
3422
  'webm_url' => array(
3423
  'std' => '',
3424
+ 'type' => 'link',
3425
  'label' => __( 'Webm Video Url','magee-shortcodes'),
3426
  'desc' => __( 'Add the URL of video in webm format. WebM and MP4 format must be included to render your video with cross browser compatibility. OGV is optional.', 'magee-shortcodes' ),
3427
 
3436
  'width' => array(
3437
  'std' => '100%',
3438
  'type' => 'text',
3439
+ 'label' => __('Width','magee-shortcodes'),
3440
  'desc' => __('In pixels (px), eg: 1px.','magee-shortcodes'),
3441
  ),
3442
  'height' => array(
3443
  'std' => '100%',
3444
+ 'type' => 'text',
3445
  'label' => __('Height','magee-shortcodes'),
3446
  'desc' => __('In pixels (px), eg: 1px.','magee-shortcodes'),
3447
  ),
3448
  'mute' => array(
3449
  'std' => '',
3450
+ 'type' => 'choose',
3451
  'label' => __('Mute Video' ,'magee-shortcodes'),
3452
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3453
  'options' => $reverse_choices
3454
  ),
3455
  'autoplay' =>array(
3456
  'std' => '',
3457
+ 'type' => 'choose',
3458
  'label' => __('Autoplay Video','magee-shortcodes'),
3459
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3460
  'options' => array(
3464
  ),
3465
  'loop' =>array(
3466
  'std' => '',
3467
+ 'type' => 'choose',
3468
  'label' => __('Loop Video','magee-shortcodes'),
3469
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3470
  'options' => array(
3474
  ),
3475
  'controls' =>array(
3476
  'std' => '',
3477
+ 'type' => 'choose',
3478
  'label' => __('Show Controls','magee-shortcodes'),
3479
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3480
  'options' => array(
3496
  ),
3497
  ),
3498
  'shortcode' => '[ms_video mp4_url="{{mp4_url}}" ogv_url="{{ogv_url}}" webm_url="{{webm_url}}" poster="{{poster}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_video]',
3499
+ 'popup_title' => __( 'Video Shortcode', 'magee-shortcodes' ),
3500
+ 'name' => __('video-shortcode/','magee-shortocdes'),
3501
  );
3502
 
3503
 
3509
  'no_preview' => true,
3510
  'icon' => 'fa-vimeo-square',
3511
  'params' => array(
 
 
3512
  'link' => array(
3513
  'std' => '',
3514
  'type' => 'text',
3515
+ 'label' => __( 'Vimeo URL', 'magee-shortcodes' ),
3516
  'desc' => __( 'Add the URL the video will link to, ex: http://example.com.', 'magee-shortcodes' ),
3517
  ),
3518
  'width' => array(
3529
  ),
3530
  'mute' => array(
3531
  'std' => '',
3532
+ 'type' => 'choose',
3533
  'label' => __('Mute Video' ,'magee-shortcodes'),
3534
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3535
  'options' => $reverse_choices
3536
  ),
3537
  'autoplay' =>array(
3538
  'std' => '',
3539
+ 'type' => 'choose',
3540
  'label' => __('Autoplay Video','magee-shortcodes'),
3541
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3542
  'options' => array(
3546
  ),
3547
  'loop' =>array(
3548
  'std' => '',
3549
+ 'type' => 'choose',
3550
  'label' => __('Loop Video','magee-shortcodes'),
3551
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3552
  'options' => array(
3556
  ),
3557
  'controls' =>array(
3558
  'std' => '',
3559
+ 'type' => 'choose',
3560
  'label' => __('Show Controls','magee-shortcodes'),
3561
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3562
  'options' => array(
3578
  ),
3579
  ),
3580
  'shortcode' => '[ms_vimeo link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_vimeo]',
3581
+ 'popup_title' => __( 'Vimeo Shortcode', 'magee-shortcodes' ),
3582
+ 'name' => __('vimeo-shortcode/','magee-shortocdes'),
3583
  );
3584
  /*-----------------------------------------------------------------------------------*/
3585
  /* Youtube Config
3610
  ),
3611
  'mute' => array(
3612
  'std' => '',
3613
+ 'type' => 'choose',
3614
  'label' => __('Mute Video' ,'magee-shortcodes'),
3615
  'desc' => __('Choose to mute the video.','magee-shortcodes'),
3616
  'options' => $reverse_choices
3617
  ),
3618
  'autoplay' =>array(
3619
  'std' => '',
3620
+ 'type' => 'choose',
3621
  'label' => __('Autoplay Video','magee-shortcodes'),
3622
  'desc' => __('Choose to autoplay the video.','magee-shortcodes'),
3623
  'options' => array(
3627
  ),
3628
  'loop' =>array(
3629
  'std' => '',
3630
+ 'type' => 'choose',
3631
  'label' => __('Loop Video','magee-shortcodes'),
3632
  'desc' => __('Choose to loop the video.','magee-shortcodes'),
3633
  'options' => array(
3637
  ),
3638
  'controls' =>array(
3639
  'std' => '',
3640
+ 'type' => 'choose',
3641
  'label' => __('Show Controls','magee-shortcodes'),
3642
  'desc' => __('Choose to display controls for the video player.','magee-shortcodes'),
3643
  'options' => array(
3659
  ),
3660
  ),
3661
  'shortcode' => '[ms_youtube link="{{link}}" width="{{width}}" height="{{height}}" mute="{{mute}}" autoplay="{{autoplay}}" loop="{{loop}}" controls="{{controls}}" class="{{class}}" id="{{id}}"][/ms_youtube]',
3662
+ 'popup_title' => __( 'Youtube Shortcode', 'magee-shortcodes' ),
3663
+ 'name' => __('youtube-shortcode/','magee-shortocdes'),
3664
  );
3665
 
3666
 
inc/popup.php CHANGED
@@ -23,8 +23,17 @@ global $magee_shortcodes;
23
 
24
  <div id="magee-shortcodes-settings-inner"></div>
25
  <input name="magee-shortcode" type="hidden" id="magee-shortcode" value="" />
26
- <input name="magee-shortcode-textarea" type="hidden" id="magee-shortcode-textarea" value="" />
27
-
 
 
 
 
 
 
 
 
 
28
  <div class="clear"></div>
29
  </div>
30
  </form>
@@ -86,4 +95,4 @@ global $magee_shortcodes;
86
  </div>
87
  </div>
88
  </div>
89
- </div>
23
 
24
  <div id="magee-shortcodes-settings-inner"></div>
25
  <input name="magee-shortcode" type="hidden" id="magee-shortcode" value="" />
26
+ <input name="magee-shortcode-textarea" type="hidden" id="magee-shortcode-textarea" value="" />
27
+ <div id="preview" style="display:none">
28
+ <div class="label preview-title">
29
+ <span class="magee-form-label-title">Preview</span>
30
+ <span class="magee-form-desc">Due to some external reasons, the preview is not shown exactly the same as reality.</span>
31
+ <span class="magee-preview-delete tb-close-icon"></span>
32
+ </div>
33
+
34
+ </div>
35
+
36
+
37
  <div class="clear"></div>
38
  </div>
39
  </form>
95
  </div>
96
  </div>
97
  </div>
98
+ </div>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: magictheme
3
  Donate link: http://www.mageewp.com/
4
  Tags: shortcodes, shortcode, accordion, alert, button, column, custom box, countdowns, counter, divider, dropcap, feature box, flip box, highlight, list, modal, popover, tooltip, person, promo box, scocial, tab, testimonial, progress, piechart, timeline, panel, section, slider
5
  Requires at least: 4.0
6
- Tested up to: 4.4
7
- Stable tag: 4.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,11 +12,13 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
  ### Overview
14
 
15
- Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. It is based on Bootstrap and coded with HTML5 and CSS3 language, fully responsive in desktops and mobile devices. With enriched settings in options, you could easily create column, section, feature box, person, testimonial and much more. Anyone who wants to create a business site with WordPress may not miss this plugin.
 
16
 
17
  ### Key Features
18
 
19
  * Shortcode Generator
 
20
  * Modern design
21
  * Fully responsive
22
  * Developed with Bootstrap 3
@@ -28,7 +30,7 @@ Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. It is b
28
 
29
  ### Relevant Links
30
 
31
- * [Live Demo](http://www.mageewp.com/magee-shortcodes-demo/)
32
  * [Beginner Guide](http://www.mageewp.com/magee-shortcode-guide.html)
33
  * [Tech Support](http://www.mageewp.com/forums/magee-shortcode/)
34
 
@@ -49,25 +51,32 @@ Activate plugin at "Plugins" administration page.
49
 
50
  == Frequently Asked Questions ==
51
 
52
- * 1.2.4
53
 
54
 
55
  == Screenshots ==
56
 
57
  1. Magee Shortcodes.
58
- 2. Magee Shortcodes Options.
59
- 3. Magee Shortcodes Icons.
60
- 4. You could use this to show alert and set it whether dismissable or not. A lot of color you could select.
61
- 5. You could use the shortcode to custom a lot of different menu style.
62
- 6. You could use the this to show countdown.
63
- 7. You could use the shortcode to dropcap your paragraph, the color is settable.
64
- 8. You could use the shortcode to make a piechart, and the color is settable too.
65
- 9. You could use the shortcode to make feature box, the icon, color, animation is settable.
66
- 10. You could use the shortcode to make timeline.
67
- 11. You could use the shortcode to make testiomnial, it has some styles you could choose.
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
 
 
 
 
71
  = 1.4.2 - 13/03/2016 =
72
  * Fix - Fixed empty menu issues
73
 
3
  Donate link: http://www.mageewp.com/
4
  Tags: shortcodes, shortcode, accordion, alert, button, column, custom box, countdowns, counter, divider, dropcap, feature box, flip box, highlight, list, modal, popover, tooltip, person, promo box, scocial, tab, testimonial, progress, piechart, timeline, panel, section, slider
5
  Requires at least: 4.0
6
+ Tested up to: 4.5
7
+ Stable tag: 4.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  ### Overview
14
 
15
+ Magee Shortcodes is WordPress plugin that provides a pack of shortcodes. It is based on Bootstrap and coded with HTML5 and CSS3 language, fully responsive in desktops and mobile devices With enriched settings in options, you could easily create column, section, feature box, person, testimonial and much more.You can also customize post & page layouts using shortcode generator with one simple click, see how your inserted shortcode effects before it goes live with shortcode preview function. Still, more shortcodes coming soon.
16
+
17
 
18
  ### Key Features
19
 
20
  * Shortcode Generator
21
+ * Shortcode Preview
22
  * Modern design
23
  * Fully responsive
24
  * Developed with Bootstrap 3
30
 
31
  ### Relevant Links
32
 
33
+ * [Examples](https://demo.mageewp.com/magee-shortcodes-demo/)
34
  * [Beginner Guide](http://www.mageewp.com/magee-shortcode-guide.html)
35
  * [Tech Support](http://www.mageewp.com/forums/magee-shortcode/)
36
 
51
 
52
  == Frequently Asked Questions ==
53
 
54
+ * [Tech Support](https://www.mageewp.com/forums/magee-shortcode/)
55
 
56
 
57
  == Screenshots ==
58
 
59
  1. Magee Shortcodes.
60
+ 2. Magee Shortcodes List.
61
+ 3. Magee Shortcodes generator form.
62
+ 4. Magee Shortcodes preview.
63
+ 5. Buttons shortcode examples.
64
+ 6. Promo box shortcode examples.
65
+ 7. Featurebox shortcode examples.
66
+ 8. Progress Bar shortcode examples.
67
+
 
 
68
 
69
  == Changelog ==
70
 
71
+ = 1.5.1 - 27/04/2016 =
72
+ * Fixed color picker issues
73
+
74
+ = 1.5.0 - 21/04/2016 =
75
+ * Feature - Improved shortcode generator appearance
76
+ * Feature - Added shortcode preview function
77
+ * Fixed Promo Box issue
78
+ * Updated .pot file
79
+
80
  = 1.4.2 - 13/03/2016 =
81
  * Fix - Fixed empty menu issues
82
 
shortcodes/class-accordion.php CHANGED
@@ -41,7 +41,32 @@ class Magee_Accordion {
41
  $class .= ' style'.$type;
42
 
43
  $html = '<div class="panel-group magee-accordion accordion-'.$style.' '.esc_attr($class).'" role="tablist" aria-multiselectable="true" id="'.esc_attr($this->id).'">'.do_shortcode( Magee_Core::fix_shortcodes($content)).'</div>';
44
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  return $html;
47
 
@@ -96,6 +121,7 @@ class Magee_Accordion {
96
  </div>';
97
 
98
  $this->num++;
 
99
  return $html;
100
  }
101
 
41
  $class .= ' style'.$type;
42
 
43
  $html = '<div class="panel-group magee-accordion accordion-'.$style.' '.esc_attr($class).'" role="tablist" aria-multiselectable="true" id="'.esc_attr($this->id).'">'.do_shortcode( Magee_Core::fix_shortcodes($content)).'</div>';
44
+ $html .= '<script>
45
+ jQuery(function($) {
46
+ if($("#magee-sc-form-preview").length>0){
47
+ if($("#magee-sc-form-preview").contents().find(".panel-heading").length>1){
48
+ num = $("#magee-sc-form-preview").contents().find(".panel-heading").length ;
49
+ for($i=0;$i<num;$i++){
50
+ $("#magee-sc-form-preview").contents().find(".panel-heading").eq($i).on("click",function(e){
51
+ e.preventDefault();
52
+ if($(this).find("a").attr("class") == "accordion-toggle" || $(this).find("a").attr("class") == "accordion-toggle "){
53
+ $(this).find("a").addClass("collapsed");
54
+ $(this).find("a").attr("aria-expanded","false");
55
+ $(this).next().removeClass("in");
56
+ }else{
57
+ $(this).find("a").removeClass("collapsed");
58
+ $(this).find("a").attr("aria-expanded","true");
59
+ $(this).next().addClass("in");
60
+ $(this).parent(".panel-default").siblings().find("a").addClass("collapsed");
61
+ $(this).parent(".panel-default").siblings().find("a").attr("aria-expanded","false");
62
+ $(this).parent(".panel-default").siblings().find(".panel-heading").next().removeClass("in");
63
+ }
64
+ });
65
+ };
66
+ }
67
+ }
68
+ });
69
+ </script>';
70
 
71
  return $html;
72
 
121
  </div>';
122
 
123
  $this->num++;
124
+
125
  return $html;
126
  }
127
 
shortcodes/class-alert.php CHANGED
@@ -66,13 +66,25 @@ class Magee_Alert {
66
  $class .= ' alert-dismissible';
67
  }
68
 
69
- if( $icon )
70
  $icon_str .= '<i class="fa '.esc_attr($icon).'"></i>';
 
 
71
 
 
72
  $styles = sprintf( '<style type="text/css" scoped="scoped">.%s{%s} </style>', $add_class ,$css_style);
73
  $content = $icon_str.do_shortcode( Magee_Core::fix_shortcodes($content));
74
- $html = sprintf(' %s<div class="alert magee-alert %s " role="alert" id= "%s">%s</div>',$styles,$class,$id,$content);
75
-
 
 
 
 
 
 
 
 
 
76
 
77
  return $html;
78
  }
66
  $class .= ' alert-dismissible';
67
  }
68
 
69
+ if( stristr($icon,'fa-')):
70
  $icon_str .= '<i class="fa '.esc_attr($icon).'"></i>';
71
+ else:
72
+ $icon_str .= '<img class="image-instead" src="'.esc_attr($icon).'" style="padding-right:10px"/>';
73
 
74
+ endif;
75
  $styles = sprintf( '<style type="text/css" scoped="scoped">.%s{%s} </style>', $add_class ,$css_style);
76
  $content = $icon_str.do_shortcode( Magee_Core::fix_shortcodes($content));
77
+ $script = '<script>
78
+ jQuery(function($){
79
+ if($("#magee-sc-form-preview").length>0){
80
+ $("#magee-sc-form-preview").contents().find(".close").on("click",function(){
81
+ $("#magee-sc-form-preview").contents().find(".'.$add_class.'").remove();
82
+ });
83
+ }
84
+ });
85
+ </script>';
86
+ $html = sprintf(' %s<div class="alert magee-alert %s " role="alert" id= "%s">%s</div>%s',$styles,$class,$id,$content,$script);
87
+
88
 
89
  return $html;
90
  }
shortcodes/class-button.php CHANGED
@@ -113,7 +113,11 @@ class Magee_Button {
113
  $animated = '';
114
  if( $icon_animation_type != '' )
115
  $animated = 'animated infinite '.$icon_animation_type;
116
- $content = '<i class="fa '.$icon.' '.$animated.'"></i> '.$content;
 
 
 
 
117
  }
118
 
119
  if( $text_color !='' ){
@@ -167,7 +171,17 @@ class Magee_Button {
167
 
168
  $html = '<style type="text/css">'.$css_style.'</style>';
169
  $html .= sprintf( '<a href="%s" target="%s" style="" class="%s" id="%s">%s</a>', esc_url($link),$target, $class,$id, do_shortcode( Magee_Core::fix_shortcodes($content)) );
170
-
 
 
 
 
 
 
 
 
 
 
171
  return $html;
172
  }
173
 
113
  $animated = '';
114
  if( $icon_animation_type != '' )
115
  $animated = 'animated infinite '.$icon_animation_type;
116
+ if( stristr($icon,'fa-')):
117
+ $content = '<i class="fa '.$icon.' '.$animated.'"></i> '.$content;
118
+ else:
119
+ $content = '<img class="image-instead" src="'.esc_attr($icon).'" style="padding-right:10px"/>'.$content;
120
+ endif;
121
  }
122
 
123
  if( $text_color !='' ){
171
 
172
  $html = '<style type="text/css">'.$css_style.'</style>';
173
  $html .= sprintf( '<a href="%s" target="%s" style="" class="%s" id="%s">%s</a>', esc_url($link),$target, $class,$id, do_shortcode( Magee_Core::fix_shortcodes($content)) );
174
+ $html .= '<script>
175
+ jQuery(function($) {
176
+ if($("#magee-sc-form-preview").length>0){
177
+ $("#magee-sc-form-preview").contents().find("a").on("click",function(e){
178
+ if($(this).attr("href") == "#"){
179
+ e.preventDefault();
180
+ }
181
+ });
182
+ }
183
+ });
184
+ </script>';
185
  return $html;
186
  }
187
 
shortcodes/class-countdowns.php CHANGED
@@ -93,7 +93,25 @@ class Magee_Countdowns {
93
  </ul>
94
  </div>';
95
  $html .= '<script language="javascript">';
96
- $html .= 'jQuery(document).ready(function($){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  $("#'.$countdownsID.'").countdown("'.$endtime.'", function(event) {
98
  $("#'.$countdownsID.' .days .counter-num").text(
99
  event.strftime("%D")
@@ -108,7 +126,9 @@ class Magee_Countdowns {
108
  event.strftime("%S")
109
  );
110
  });
111
- });';
 
 
112
  $html .= '</script>';
113
 
114
  return $html;
93
  </ul>
94
  </div>';
95
  $html .= '<script language="javascript">';
96
+ $html .= 'jQuery(function($) {';
97
+ $html .= 'if($("#magee-sc-form-preview").length>0){';
98
+ $html .= '$("#magee-sc-form-preview").ready(function(){
99
+ $("#magee-sc-form-preview").contents().find("#'.$countdownsID.'").countdown("'.$endtime.'", function(event) {
100
+ $("#magee-sc-form-preview").contents().find("#'.$countdownsID.' .days .counter-num").text(
101
+ event.strftime("%D")
102
+ );
103
+ $("#magee-sc-form-preview").contents().find("#'.$countdownsID.' .hours .counter-num").text(
104
+ event.strftime("%H")
105
+ );
106
+ $("#magee-sc-form-preview").contents().find("#'.$countdownsID.' .minutes .counter-num").text(
107
+ event.strftime("%M")
108
+ );
109
+ $("#magee-sc-form-preview").contents().find("#'.$countdownsID.' .seconds .counter-num").text(
110
+ event.strftime("%S")
111
+ );
112
+ });
113
+ });}else{';
114
+ $html .= '$(document).ready(function(){
115
  $("#'.$countdownsID.'").countdown("'.$endtime.'", function(event) {
116
  $("#'.$countdownsID.' .days .counter-num").text(
117
  event.strftime("%D")
126
  event.strftime("%S")
127
  );
128
  });
129
+
130
+ });}';
131
+ $html .= '})';
132
  $html .= '</script>';
133
 
134
  return $html;
shortcodes/class-counter.php CHANGED
@@ -53,12 +53,18 @@ class Magee_Counter {
53
  $html .= '<div class="magee-counter-box " id="'.esc_attr($id).'">';
54
  endif;
55
  if( $top_icon )
56
- $html .= '<div class="counter-top-icon"><i class="fa '.esc_attr($top_icon).'"></i></div>';
57
-
 
 
 
58
  $html .= '<div class="counter">';
59
- if( $left_icon )
60
- $html .= '<i class="fa '.esc_attr($left_icon).'"></i> ';
61
-
 
 
 
62
  if( $left_text )
63
  $html .= '<span class="unit">'.esc_attr($left_text).'</span>';
64
  if( $counter_num )
53
  $html .= '<div class="magee-counter-box " id="'.esc_attr($id).'">';
54
  endif;
55
  if( $top_icon )
56
+ if( stristr($top_icon,'fa-')):
57
+ $html .= '<div class="counter-top-icon"><i class="fa '.esc_attr($top_icon).'"></i></div>';
58
+ else:
59
+ $html .= '<div class="counter-top-icon"><img class="image-instead" src="'.esc_attr($top_icon).'" /></div>';
60
+ endif;
61
  $html .= '<div class="counter">';
62
+ if( $left_icon )
63
+ if( stristr($left_icon,'fa-')):
64
+ $html .= '<i class="fa '.esc_attr($left_icon).'"></i> ';
65
+ else:
66
+ $html .= '<img class="image-instead" src="'.esc_attr($left_icon).'" />';
67
+ endif;
68
  if( $left_text )
69
  $html .= '<span class="unit">'.esc_attr($left_text).'</span>';
70
  if( $counter_num )
shortcodes/class-custom-box.php CHANGED
@@ -31,6 +31,9 @@ class Magee_Custom_Box {
31
 
32
  extract( $defaults );
33
  self::$args = $defaults;
 
 
 
34
  $uniqid = uniqid('custom_box-');
35
 
36
  $textstyle = sprintf(' .custom-box-1 {padding: %s; background-image: url(%s); } ',$padding,$backgroundimage);
31
 
32
  extract( $defaults );
33
  self::$args = $defaults;
34
+ if(is_numeric($padding))
35
+ $padding = $padding.'px';
36
+
37
  $uniqid = uniqid('custom_box-');
38
 
39
  $textstyle = sprintf(' .custom-box-1 {padding: %s; background-image: url(%s); } ',$padding,$backgroundimage);
shortcodes/class-dailymotion.php CHANGED
@@ -38,7 +38,11 @@ class Magee_Dailymotion {
38
 
39
  extract( $defaults );
40
  self::$args = $defaults;
41
- if( $autoplay == 'yes'):
 
 
 
 
42
  $autoplay = '1';
43
  else:
44
  $autoplay = '0';
@@ -61,20 +65,35 @@ class Magee_Dailymotion {
61
  if( $link !== '')
62
  $link = strtok(basename(esc_url($link)),'_');
63
  if( $width == '100%' || $width == '' && $height == '100%' || $height == ''):
64
- $html = '<div id="dailymotion"><iframe id="'.esc_attr($id).'" class="'.esc_attr($class).'" src="http://www.dailymotion.com/embed/video/' . $link . '?autoplay='.$autoplay.'&loop='.$loop.'&controls='.$controls.'&mute='.$mute.'" frameborder="0" allowfullscreen></iframe></div>';
65
 
66
- $html .= "<script>
67
- var width = document.getElementById('dailymotion').clientWidth;
68
- var newwidth = document.getElementsByTagName('iframe')[0].clientWidth;
69
- var newheight = document.getElementsByTagName('iframe')[0].clientHeight;
70
- var op = newheight/newwidth ;
71
- newwidth = width;
72
- newheight = newwidth*op;
73
- document.getElementsByTagName('iframe')[0].setAttribute('width',newwidth);
74
- document.getElementsByTagName('iframe')[0].setAttribute('height',newheight);
75
- </script>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  else:
77
- $html = '<div id="dailymotion"><iframe id="'.esc_attr($id).'" class="'.$uniqid.' '.esc_attr($class).'" width="'.$width.'" height="'.$height.'" src="http://www.dailymotion.com/embed/video/' . $link . '?autoplay='.$autoplay.'&loop='.$loop.'&controls='.$controls.'&mute='.$mute.'" frameborder="0" allowfullscreen></iframe></div>';
78
  endif;
79
  return $html;
80
  }
38
 
39
  extract( $defaults );
40
  self::$args = $defaults;
41
+ if(is_numeric($width))
42
+ $width = $width.'px';
43
+ if(is_numeric($height))
44
+ $height = $height.'px';
45
+ if( $autoplay == 'yes'):
46
  $autoplay = '1';
47
  else:
48
  $autoplay = '0';
65
  if( $link !== '')
66
  $link = strtok(basename(esc_url($link)),'_');
67
  if( $width == '100%' || $width == '' && $height == '100%' || $height == ''):
68
+ $html = '<div id="dailymotion"><iframe id="'.esc_attr($id).'" class="'.esc_attr($class).'" src="//www.dailymotion.com/embed/video/' . $link . '?autoplay='.$autoplay.'&loop='.$loop.'&controls='.$controls.'&mute='.$mute.'" frameborder="0" allowfullscreen></iframe></div>';
69
 
70
+ $html .= '<script>
71
+ jQuery(function($) {
72
+ if($("#magee-sc-form-preview").length>0){
73
+ $("#magee-sc-form-preview").ready(function(){
74
+ width = $("#magee-sc-form-preview").contents().find("#dailymotion").width();
75
+ iframewidth = $("#magee-sc-form-preview").contents().find("iframe").eq(0).width();
76
+ iframeheight = $("#magee-sc-form-preview").contents().find("iframe").eq(0).height();
77
+ op = iframeheight/iframewidth;
78
+ $("#magee-sc-form-preview").contents().find("iframe").eq(0).width(width-100);
79
+ $("#magee-sc-form-preview").contents().find("iframe").eq(0).height(op*width-100);
80
+ });
81
+
82
+ }else{
83
+ $(document).ready(function(){
84
+ width = $("#dailymotion").width();
85
+ iframewidth = $("iframe").eq(0).width();
86
+ iframeheight = $("iframe").eq(0).height();
87
+ op = iframeheight/iframewidth;
88
+ $("iframe").eq(0).width(width);
89
+ $("iframe").eq(0).height(op*width);
90
+
91
+ });
92
+ }
93
+ });
94
+ </script>';
95
  else:
96
+ $html = '<div id="dailymotion"><iframe id="'.esc_attr($id).'" class="'.esc_attr($class).'" width="'.$width.'" height="'.$height.'" src="//www.dailymotion.com/embed/video/' . $link . '?autoplay='.$autoplay.'&loop='.$loop.'&controls='.$controls.'&mute='.$mute.'" frameborder="0" allowfullscreen></iframe></div>';
97
  endif;
98
  return $html;
99
  }
shortcodes/class-divider.php CHANGED
@@ -25,7 +25,7 @@ class Magee_Divider {
25
  'class' =>'',
26
  'style' =>'normal',
27
  'align' =>'',
28
- 'width' =>'100%',
29
  'margin_top' =>'',
30
  'margin_bottom' =>'',
31
  'border_size' =>'',
@@ -36,6 +36,14 @@ class Magee_Divider {
36
 
37
  extract( $defaults );
38
  self::$args = $defaults;
 
 
 
 
 
 
 
 
39
 
40
  $uniq_class = uniqid('divider-');
41
 
@@ -85,23 +93,36 @@ class Magee_Divider {
85
 
86
 
87
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'" style="margin-top:; margin-bottom:;"><div class="divider-inner divider-border"></div></div>';
88
- if( $style == 'icon' )
89
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'" style="margin-top:; margin-bottom:;">
90
- <div class="divider-inner"><div class="divider-inner-item divider-border double-line">
91
- <div class="divider-inner"></div>
 
 
 
 
 
 
 
 
 
 
 
 
92
  </div>
93
- <div class="divider-inner-item divider-inner-icon"><i class="fa '.esc_attr($icon).'"></i></div>
94
- <div class="divider-inner-item divider-border double-line"><div class="divider-inner"></div></div>
95
- </div>
96
- </div>';
97
  if( $style == 'back_to_top' )
98
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'">
99
  <div class="divider-inner divider-border">
100
- <div class="divider-inner-item divider-border">
101
- <div class="divider-inner"></div></div>
102
- <div class="divider-inner-item divider-inner-back-to-top">
103
- <a href="#" class="magee-back-to-top"><i class="fa fa-arrow-up"></i></a>
104
- </div></div></div>';
 
 
 
105
 
106
  $html = $styles.$html;
107
 
25
  'class' =>'',
26
  'style' =>'normal',
27
  'align' =>'',
28
+ 'width' =>'100',
29
  'margin_top' =>'',
30
  'margin_bottom' =>'',
31
  'border_size' =>'',
36
 
37
  extract( $defaults );
38
  self::$args = $defaults;
39
+ if(is_numeric($width))
40
+ $width = $width.'px';
41
+ if(is_numeric($margin_top))
42
+ $margin_top = $margin_top.'px';
43
+ if(is_numeric($margin_bottom))
44
+ $margin_bottom = $margin_bottom.'px';
45
+ if(is_numeric($border_size))
46
+ $border_size = $border_size.'px';
47
 
48
  $uniq_class = uniqid('divider-');
49
 
93
 
94
 
95
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'" style="margin-top:; margin-bottom:;"><div class="divider-inner divider-border"></div></div>';
96
+ if( $style == 'icon' ):
97
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'" style="margin-top:; margin-bottom:;">
98
+ <div class="divider-inner">
99
+ <div class="divider-inner-item divider-border double-line">
100
+ <div class="divider-inner"></div>
101
+ </div>
102
+ <div class="divider-inner-item divider-inner-icon">';
103
+ if( stristr($icon,'fa-')):
104
+ $html .= '<i class="fa '.esc_attr($icon).'"></i>';
105
+ else:
106
+ $html .= '<img class="image-instead" src="'.esc_attr($icon).'"/>';
107
+ endif;
108
+ $html .= '</div>
109
+ <div class="divider-inner-item divider-border double-line">
110
+ <div class="divider-inner"></div>
111
+ </div>
112
  </div>
113
+ </div>';
114
+ endif;
 
 
115
  if( $style == 'back_to_top' )
116
  $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'">
117
  <div class="divider-inner divider-border">
118
+ <div class="divider-inner-item divider-border">
119
+ <div class="divider-inner"></div>
120
+ </div>
121
+ <div class="divider-inner-item divider-inner-back-to-top">
122
+ <a href="#" class="magee-back-to-top"><i class="fa fa-arrow-up"></i></a>
123
+ </div>
124
+ </div>
125
+ </div>';
126
 
127
  $html = $styles.$html;
128
 
shortcodes/class-document.php CHANGED
@@ -33,26 +33,41 @@ class Magee_Document {
33
  );
34
  extract( $defaults );
35
  self::$args = $defaults;
 
36
  $html = '';
37
  switch(esc_attr($viewer)){
38
  case 'google':
39
- $html .= '<div id="'.esc_attr($id).'" class="magee-document ' .esc_attr($class) . '" ><iframe src="http://docs.google.com/viewer?url='.esc_url($url) .'&embedded=true" width="' . esc_attr($width) . '" height="'.esc_attr($height). '" ></iframe></div>';
40
  break;
41
  case 'microsoft':
42
- $html .= '<div id="'.esc_attr($id).'" class="magee-document ' .esc_attr($class) . '"><iframe src="https://view.officeapps.live.com/op/embed.aspx?src='.esc_url($url) .'" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" class="su-document' .esc_attr($class) . '" id="'.esc_attr($id).'"></iframe></div>';
43
  break;
44
  }
45
 
46
  if($responsive == 'yes'):
47
- $html .= "<script>";
48
- $html .= "var width = document.getElementsByClassName('magee-document')[0].clientWidth;
49
- if( width < '".$width."'){
50
- var op = '".$height."'/'".$width."' ;
51
- document.getElementsByTagName('iframe')[0].style.width = width + 'px';
52
- document.getElementsByTagName('iframe')[0].style.height = op*width + 'px';
53
- }
54
- ";
55
- $html .= "</script>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  endif;
57
 
58
  return $html;
33
  );
34
  extract( $defaults );
35
  self::$args = $defaults;
36
+
37
  $html = '';
38
  switch(esc_attr($viewer)){
39
  case 'google':
40
+ $html .= '<div id="'.esc_attr($id).'" class="magee-document ' .esc_attr($class) . '" ><iframe src="//docs.google.com/viewer?url='.esc_url($url) .'&embedded=true" width="' . esc_attr($width) . 'px" height="'.esc_attr($height). 'px" ></iframe></div>';
41
  break;
42
  case 'microsoft':
43
+ $html .= '<div id="'.esc_attr($id).'" class="magee-document ' .esc_attr($class) . '"><iframe src="//view.officeapps.live.com/op/embed.aspx?src='.esc_url($url) .'" width="' . esc_attr($width) . 'px" height="' . esc_attr($height) . 'px" class="su-document' .esc_attr($class) . '" id="'.esc_attr($id).'"></iframe></div>';
44
  break;
45
  }
46
 
47
  if($responsive == 'yes'):
48
+ $html .= '<script>';
49
+ $html .= 'jQuery(function($) {
50
+ if($("#magee-sc-form-preview").length>0){
51
+ $("#magee-sc-form-preview").ready(function(){
52
+ width = $("#magee-sc-form-preview").contents().find(".magee-document").width();
53
+ if(width < '.$width.'){
54
+ op = '.$height.'/'.$width.';
55
+ $("#magee-sc-form-preview").contents().find("iframe").eq(0).width(width);
56
+ $("#magee-sc-form-preview").contents().find("iframe").eq(0).height(op*width);
57
+ }
58
+ });
59
+ }else{
60
+ $(document).ready(function(){
61
+ width = $(".magee-document").width();
62
+ if(width < '.$width.'){
63
+ op = '.$height.'/'.$width.';
64
+ $("iframe").eq(0).width(width);
65
+ $("iframe").eq(0).height(op*width);
66
+ }
67
+ });
68
+ }
69
+ });';
70
+ $html .= '</script>';
71
  endif;
72
 
73
  return $html;
shortcodes/class-dropcap.php CHANGED
@@ -33,7 +33,8 @@ class Magee_Dropcap {
33
 
34
  extract( $defaults );
35
  self::$args = $defaults;
36
-
 
37
 
38
  $html = sprintf( '<span %s>%s</span>', Magee_Core::attributes( 'dropcap-shortcode' ), do_shortcode( Magee_Core::fix_shortcodes($content)) );
39
 
@@ -52,6 +53,9 @@ class Magee_Dropcap {
52
  if( self::$args['boxed_radius'] ||
53
  self::$args['boxed_radius'] === '0'
54
  ) {
 
 
 
55
  $attr['style'] = sprintf( 'border-radius:%s;', self::$args['boxed_radius'] );
56
  }
57
 
33
 
34
  extract( $defaults );
35
  self::$args = $defaults;
36
+ if(is_numeric($boxed_radius))
37
+ $boxed_radius = $boxed_radius.'px';
38
 
39
  $html = sprintf( '<span %s>%s</span>', Magee_Core::attributes( 'dropcap-shortcode' ), do_shortcode( Magee_Core::fix_shortcodes($content)) );
40
 
53
  if( self::$args['boxed_radius'] ||
54
  self::$args['boxed_radius'] === '0'
55
  ) {
56
+ if(is_numeric(self::$args['boxed_radius']))
57
+ self::$args['boxed_radius'] = self::$args['boxed_radius'].'px';
58
+
59
  $attr['style'] = sprintf( 'border-radius:%s;', self::$args['boxed_radius'] );
60
  }
61
 
shortcodes/class-dummy-image.php CHANGED
@@ -32,11 +32,13 @@ class Magee_Dummy_Image {
32
 
33
  extract( $defaults );
34
  self::$args = $defaults;
 
 
35
  if($style == 'any')
36
  $style = rand(0,10) ;
37
 
38
  $link = 'http://lorempixel.com/' .esc_attr($width). '/' . esc_attr($height) . '/'.esc_attr($style).'/';
39
- $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'"><image src="'.$link.'" width="'.$width.'" height="'.$height.'"/></div>';
40
  return $html;
41
 
42
 
32
 
33
  extract( $defaults );
34
  self::$args = $defaults;
35
+
36
+
37
  if($style == 'any')
38
  $style = rand(0,10) ;
39
 
40
  $link = 'http://lorempixel.com/' .esc_attr($width). '/' . esc_attr($height) . '/'.esc_attr($style).'/';
41
+ $html = '<div class="'.esc_attr($class).'" id="'.esc_attr($id).'"><img src="'.$link.'" width="'.$width.'px" height="'.$height.'px"/></div>';
42
  return $html;
43
 
44
 
shortcodes/class-dummy-text.php CHANGED
@@ -22,7 +22,7 @@ class Magee_Dummy_Text {
22
 
23
  $defaults = Magee_Core::set_shortcode_defaults(
24
  array(
25
- 'style' =>'',
26
  'class' =>'',
27
  'id' =>'',
28
  'amount' =>''
22
 
23
  $defaults = Magee_Core::set_shortcode_defaults(
24
  array(
25
+ 'style' =>'',
26
  'class' =>'',
27
  'id' =>'',
28
  'amount' =>''
shortcodes/class-expand.php CHANGED
@@ -33,9 +33,16 @@ class Magee_Expand {
33
  );
34
  extract( $defaults );
35
  self::$args = $defaults;
 
36
  $html ='
37
  <div class="magee-expand '.esc_attr($class).'" id="'.esc_attr($id).'">
38
- <div class="expand-control"><i class="fa '.esc_attr($more_icon).'"></i> '.esc_attr($more_text).'</div>
 
 
 
 
 
 
39
  <div class="expand-content" style="display:none;">
40
  '.do_shortcode( Magee_Core::fix_shortcodes($content)).'
41
  </div>
@@ -43,18 +50,42 @@ class Magee_Expand {
43
  $html .='
44
  <script>
45
  jQuery(function($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- $(".expand-control").toggle(
48
- function(){
49
- $(this).html(\'<i class="fa '.esc_attr($less_icon).'"></i> '.esc_attr($less_text).'\');
50
- },
51
- function(){
52
- $(this).html(\'<i class="fa '.esc_attr($more_icon).'"></i> '.esc_attr($more_text).'\');
53
- }
54
- );
55
- $(".expand-control").click(function(){
56
- $(".expand-content").slideToggle(500);
57
- });
58
 
59
  });
60
  </script>';
33
  );
34
  extract( $defaults );
35
  self::$args = $defaults;
36
+ $uniqid = uniqid("control-");
37
  $html ='
38
  <div class="magee-expand '.esc_attr($class).'" id="'.esc_attr($id).'">
39
+ <div class="expand-control '.$uniqid.'">';
40
+ if( stristr($more_icon,'fa-')):
41
+ $html .= '<i class="fa '.esc_attr($more_icon).'"></i> ';
42
+ else:
43
+ $html .= '<img src="'.esc_attr($more_icon).'" class="image-instead"/>';
44
+ endif;
45
+ $html .= esc_attr($more_text).'</div>
46
  <div class="expand-content" style="display:none;">
47
  '.do_shortcode( Magee_Core::fix_shortcodes($content)).'
48
  </div>
50
  $html .='
51
  <script>
52
  jQuery(function($) {
53
+ if("'.$less_icon.'".indexOf("fa-")>=0){
54
+ var more = \'<i class="fa '.esc_attr($less_icon).'"></i> '.esc_attr($less_text).'\';
55
+ }else{
56
+ var more = \'<img src="'.esc_attr($less_icon).'" class="image-instead"/>'.esc_attr($less_text).'\';
57
+ }
58
+ if("'.$more_icon.'".indexOf("fa-")>=0){
59
+ var less = \'<i class="fa '.esc_attr($more_icon).'"></i> '.esc_attr($more_text).'\';
60
+ }else{
61
+ var less = \'<img src="'.esc_attr($more_icon).'" class="image-instead"/>'.esc_attr($more_text).'\';
62
+ }
63
+ if($("#magee-sc-form-preview").length>0){
64
+ $("#magee-sc-form-preview").contents().find(".'.$uniqid.'").toggle(
65
+ function(){
66
+ $(this).html(more);
67
+ },
68
+ function(){
69
+ $(this).html(less);
70
+ }
71
+ );
72
+ $("#magee-sc-form-preview").contents().find(".'.$uniqid.'").click(function(){
73
+ $(this).parents(".magee-expand").find(".expand-content").slideToggle(500);
74
+ });
75
+ }else{
76
+ $(".'.$uniqid.'").toggle(
77
+ function(){
78
+ $(this).html(more);
79
+ },
80
+ function(){
81
+ $(this).html(less);
82
+ }
83
+ );
84
+ $(".'.$uniqid.'").click(function(){
85
+ $(this).parents(".magee-expand").find(".expand-content").slideToggle(500);
86
+ });
87
+ }
88
 
 
 
 
 
 
 
 
 
 
 
 
89
 
90
  });
91
  </script>';
shortcodes/class-feature-box.php CHANGED
@@ -68,8 +68,10 @@ class Magee_Featurebox {
68
  $icon_border_width = $icon_border_width.'px';
69
  if( is_numeric($icon_size))
70
  $icon_size = $icon_size.'px';
71
-
72
-
 
 
73
 
74
  if( $title_font_size )
75
  $css_style .= '.'.$uniq_class.' h3 {font-size:'.$title_font_size.';}';
@@ -120,7 +122,8 @@ class Magee_Featurebox {
120
  }
121
  else{
122
  if( $icon !=''){
123
- $html .= '<div class="icon-box '.$icon_box_class.'" data-animation="'.esc_attr($icon_animation_type).'"> <i class="feature-box-icon fa '.esc_attr($icon).' '.$icon_class.' fa-fw"></i></div>';
 
124
  }
125
  }
126
  if( $link_url )
68
  $icon_border_width = $icon_border_width.'px';
69
  if( is_numeric($icon_size))
70
  $icon_size = $icon_size.'px';
71
+ if(is_numeric($icon_image_width))
72
+ $icon_image_width = $icon_image_width.'px';
73
+ if(is_numeric($icon_image_height))
74
+ $icon_image_height = $icon_image_height.'px';
75
 
76
  if( $title_font_size )
77
  $css_style .= '.'.$uniq_class.' h3 {font-size:'.$title_font_size.';}';
122
  }
123
  else{
124
  if( $icon !=''){
125
+
126
+ $html .= '<div class="icon-box '.$icon_box_class.'" data-animation="'.esc_attr($icon_animation_type).'"> <i class="feature-box-icon fa '.esc_attr($icon).' '.$icon_class.' "></i></div>';
127
  }
128
  }
129
  if( $link_url )
shortcodes/class-flip-box.php CHANGED
@@ -37,6 +37,11 @@ class Magee_Flip_Box {
37
 
38
  extract( $defaults );
39
  self::$args = $defaults;
 
 
 
 
 
40
  $uniq_class = uniqid('flip_box-');
41
  $class .= ' '.$uniq_class;
42
  $class .= ' '.$direction;
37
 
38
  extract( $defaults );
39
  self::$args = $defaults;
40
+ if(is_numeric($front_paddings))
41
+ $front_paddings = $front_paddings.'px';
42
+ if(is_numeric($back_paddings))
43
+ $back_paddings = $back_paddings.'px';
44
+
45
  $uniq_class = uniqid('flip_box-');
46
  $class .= ' '.$uniq_class;
47
  $class .= ' '.$direction;
shortcodes/class-heading.php CHANGED
@@ -66,24 +66,45 @@ class Magee_Title {
66
  </style>';
67
  if( $responsive_text == 'yes'){
68
  $html .= '<script>' ;
69
- $html .= 'jQuery(function($) {';
70
- $html .= '$(document).ready(function () {';
71
- $html .= 'if($(window).width() <1200){' ;
72
- $html .= 'newPercentage = (($(window).width() / 1200) * 100) + "%";' ;
73
- $html .= '$(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});' ;
74
- $html .= '}';
75
-
76
- $html .= '});' ;
77
- $html .= '$(window).on("resize", function (){' ;
78
- $html .= 'if($(window).width() <1200){' ;
79
- $html .= 'newPercentage = (($(window).width() / 1200) * 100) + "%";' ;
80
- $html .= '$(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});' ;
81
- $html .= '}else{' ;
82
- $html .= '$(".'.$uniqid.' .heading-inner").css({"font-size": "'.$font_size.'"});' ;
83
- $html .= '}' ;
84
- $html .= '});' ;
85
- $html .= '});' ;
86
- $html .= '</script>' ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  }
88
  if( $style == 'none'){
89
  $html .= '<h1 class="magee-heading '.esc_attr($class).'" id="'.$id.'"><span class="heading-inner">'.do_shortcode( Magee_Core::fix_shortcodes($content)).'</span></h1>';
66
  </style>';
67
  if( $responsive_text == 'yes'){
68
  $html .= '<script>' ;
69
+ $html .= 'jQuery(function($) {
70
+ if($("#magee-sc-form-preview").length>0){
71
+
72
+ $("#magee-sc-form-preview").ready(function(){
73
+ if($("#magee-sc-form-preview").contents().find("body").width() <1200){
74
+ newPercentage = (($("#magee-sc-form-preview").contents().find("body").width() / 1200) * 100) + "%";
75
+ $("#magee-sc-form-preview").contents().find(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});
76
+ }
77
+ });
78
+ $("#preview",window.parent.document).resize(function (){
79
+
80
+ if($("#magee-sc-form-preview").contents().find("body").width() <1200){
81
+ newPercentage = (($("#magee-sc-form-preview").contents().find("body").width() / 1200) * 100) + "%";
82
+ $("#magee-sc-form-preview").contents().find(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});
83
+ }else{
84
+ $("#magee-sc-form-preview").contents().find(".'.$uniqid.' .heading-inner").css({"font-size": "'.$font_size.'"});
85
+ }
86
+ });
87
+ }else{
88
+ $(document).ready(function () {
89
+ if($(window).width() <1200){
90
+ newPercentage = (($(window).width() / 1200) * 100) + "%";
91
+ $(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});
92
+ }
93
+ });
94
+ $(window).on("resize", function (){
95
+ if($(window).width() <1200){
96
+ newPercentage = (($(window).width() / 1200) * 100) + "%";
97
+ $(".'.$uniqid.' .heading-inner").css({"font-size": newPercentage});
98
+ }else{
99
+ $(".'.$uniqid.' .heading-inner").css({"font-size": "'.$font_size.'"});
100
+ }
101
+ });
102
+
103
+
104
+ }
105
+
106
+ });
107
+ </script>' ;
108
  }
109
  if( $style == 'none'){
110
  $html .= '<h1 class="magee-heading '.esc_attr($class).'" id="'.$id.'"><span class="heading-inner">'.do_shortcode( Magee_Core::fix_shortcodes($content)).'</span></h1>';
shortcodes/class-highlight.php CHANGED
@@ -54,7 +54,9 @@ class Magee_Highlight {
54
  $attr['id'] = self::$args['id'];
55
  }
56
 
57
-
 
 
58
  $attr['style'] = sprintf( 'border-radius:%s;', self::$args['border_radius'] );
59
  $attr['style'] .= sprintf( 'background-color:%s;', self::$args['background_color'] );
60
 
54
  $attr['id'] = self::$args['id'];
55
  }
56
 
57
+ if(is_numeric(self::$args['border_radius']))
58
+ self::$args['border_radius'] = self::$args['border_radius'].'px';
59
+
60
  $attr['style'] = sprintf( 'border-radius:%s;', self::$args['border_radius'] );
61
  $attr['style'] .= sprintf( 'background-color:%s;', self::$args['background_color'] );
62
 
shortcodes/class-icon.php CHANGED
@@ -33,12 +33,14 @@ class Magee_Icon {
33
 
34
  extract( $defaults );
35
  self::$args = $defaults;
 
 
 
36
  $html = '';
37
  $css_style = '';
38
  $uniqid = ' magee-fa-icon icon-boxed';
39
  if( $size )
40
  $css_style .= 'font-size:'.$size.';';
41
-
42
  if( $icon_box == 'yes'){
43
  $icon .= $uniqid;
44
  if( $color )
33
 
34
  extract( $defaults );
35
  self::$args = $defaults;
36
+ if(is_numeric($size))
37
+ $size = $size.'px';
38
+
39
  $html = '';
40
  $css_style = '';
41
  $uniqid = ' magee-fa-icon icon-boxed';
42
  if( $size )
43
  $css_style .= 'font-size:'.$size.';';
 
44
  if( $icon_box == 'yes'){
45
  $icon .= $uniqid;
46
  if( $color )
shortcodes/class-image-compare.php CHANGED
@@ -35,15 +35,15 @@ class Magee_Image_Compare {
35
  $class .= $unqid;
36
  $html = '<div id="'.esc_attr($id).'" class="twentytwenty-container '.esc_attr($class).'">
37
  <img src="'.$image_left.'">
38
- <img src="'.$image_right.'">
39
- </div>' ;
40
- $html .= '<script>';
41
- $html .= 'jQuery(function($) {';
42
- $html .= '$(window).load(function() {
43
- $(".'.$class.'").twentytwenty();
44
- });';
45
- $html .= '});' ;
46
- $html .= '</script>';
47
  return $html;
48
  }
49
 
35
  $class .= $unqid;
36
  $html = '<div id="'.esc_attr($id).'" class="twentytwenty-container '.esc_attr($class).'">
37
  <img src="'.$image_left.'">
38
+ <img src="'.$image_right.'">
39
+ </div>' ;
40
+ $html .= '<script>
41
+ jQuery(function($){
42
+ $(document).ready(function(){
43
+ $(".'.esc_attr($class).'").twentytwenty();
44
+ });
45
+ });
46
+ </script>';
47
  return $html;
48
  }
49
 
shortcodes/class-image-frame.php CHANGED
@@ -34,6 +34,9 @@ class Magee_Image_Frame {
34
 
35
  extract( $defaults );
36
  self::$args = $defaults;
 
 
 
37
  $addclass = uniqid('radius');
38
  $class .= ' '.$addclass;
39
  $css_style = '';
34
 
35
  extract( $defaults );
36
  self::$args = $defaults;
37
+ if(is_numeric($border_radius))
38
+ $border_radius = $border_radius.'px';
39
+
40
  $addclass = uniqid('radius');
41
  $class .= ' '.$addclass;
42
  $css_style = '';
shortcodes/class-list.php CHANGED
@@ -38,7 +38,9 @@ class Magee_List {
38
 
39
  extract( $defaults );
40
  self::$args = $defaults;
41
-
 
 
42
  $uniq_class = uniqid('list-');
43
  $class = ' '.$uniq_class;
44
  $this->icon_a=$icon;
@@ -52,11 +54,18 @@ class Magee_List {
52
  if($icon_boxed == 'yes'){
53
  $class .= ' '.$uniq_class.'-icon-list-'.$boxed_shape;
54
  }
55
-
56
  $textstyle=' .'.$uniq_class.' ul {margin: 0;} .'.$uniq_class.' li{list-style-type: none;padding-bottom: .8em;position: relative;padding-left: 2em;font-size:'.$item_size.'}
57
  .'.$uniq_class.' li i{text-align: center;width: 1.6em;height: 1.6em;line-height: 1.6em;position: absolute;top: 0;
58
  left: 0;background-color: '.$background_color.';color: '.$icon_color.';}
59
  .'.$uniq_class.'-icon-list-circle li i {border-radius: 50%;} .'.$uniq_class.'-icon-list-square li i {border-radius: 0;}';
 
 
 
 
 
 
 
60
 
61
  $styles = sprintf( '<style type="text/css" scoped="scoped">%s </style>', $textstyle);
62
  $html= sprintf(' %s<ul class="magee-icon-list %s" id="%s">%s</ul>',$styles,$class,$id,do_shortcode( Magee_Core::fix_shortcodes($content)));
@@ -79,9 +88,11 @@ class Magee_List {
79
 
80
  extract( $defaults );
81
  self::$args = $defaults;
82
-
83
  $html =sprintf('<li><i class="fa %s"></i> %s</li>',$this->icon_a,do_shortcode( Magee_Core::fix_shortcodes($content)));
84
-
 
 
85
  return $html;
86
  }
87
  }
38
 
39
  extract( $defaults );
40
  self::$args = $defaults;
41
+ if(is_numeric($item_size))
42
+ $item_size = $item_size.'px';
43
+
44
  $uniq_class = uniqid('list-');
45
  $class = ' '.$uniq_class;
46
  $this->icon_a=$icon;
54
  if($icon_boxed == 'yes'){
55
  $class .= ' '.$uniq_class.'-icon-list-'.$boxed_shape;
56
  }
57
+ if( stristr($icon,'fa-')):
58
  $textstyle=' .'.$uniq_class.' ul {margin: 0;} .'.$uniq_class.' li{list-style-type: none;padding-bottom: .8em;position: relative;padding-left: 2em;font-size:'.$item_size.'}
59
  .'.$uniq_class.' li i{text-align: center;width: 1.6em;height: 1.6em;line-height: 1.6em;position: absolute;top: 0;
60
  left: 0;background-color: '.$background_color.';color: '.$icon_color.';}
61
  .'.$uniq_class.'-icon-list-circle li i {border-radius: 50%;} .'.$uniq_class.'-icon-list-square li i {border-radius: 0;}';
62
+ else:
63
+ $textstyle=' .'.$uniq_class.' ul {margin: 0;} .'.$uniq_class.' li{list-style-type: none;padding-bottom: .8em;position: relative;padding-left: 2em;font-size:'.$item_size.'}
64
+ .'.$uniq_class.' li img{text-align: center;width: 1.6em;height: 1.6em;line-height: 1.6em;position: absolute;top: 0;
65
+ left: 0;background-color: '.$background_color.';color: '.$icon_color.';}
66
+ .'.$uniq_class.'-icon-list-circle li img{border-radius: 50%;} .'.$uniq_class.'-icon-list-square li img{border-radius: 0;}';
67
+ endif;
68
+
69
 
70
  $styles = sprintf( '<style type="text/css" scoped="scoped">%s </style>', $textstyle);
71
  $html= sprintf(' %s<ul class="magee-icon-list %s" id="%s">%s</ul>',$styles,$class,$id,do_shortcode( Magee_Core::fix_shortcodes($content)));
88
 
89
  extract( $defaults );
90
  self::$args = $defaults;
91
+ if( stristr($this->icon_a,'fa-')):
92
  $html =sprintf('<li><i class="fa %s"></i> %s</li>',$this->icon_a,do_shortcode( Magee_Core::fix_shortcodes($content)));
93
+ else:
94
+ $html =sprintf('<li><img src="%s" class="image_instead"/> %s</li>',$this->icon_a,do_shortcode( Magee_Core::fix_shortcodes($content)));
95
+ endif;
96
  return $html;
97
  }
98
  }
shortcodes/class-modal.php CHANGED
@@ -61,7 +61,30 @@ class Magee_Modal {
61
  $divmodel = sprintf('<div class="modal fade" id="%s_ModalLg" tabindex="-1" role="dialog" aria-labelledby="%s_ModalLgLabel" aria-hidden="true" style="display: none;">
62
  <div class="modal-dialog %s"> %s</div></div>',$uniqid,$uniqid,$sz,$divmodelcontent);
63
  $html= sprintf('%s %s',$diva,$divmodel);
64
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  return $html;
67
  }
61
  $divmodel = sprintf('<div class="modal fade" id="%s_ModalLg" tabindex="-1" role="dialog" aria-labelledby="%s_ModalLgLabel" aria-hidden="true" style="display: none;">
62
  <div class="modal-dialog %s"> %s</div></div>',$uniqid,$uniqid,$sz,$divmodelcontent);
63
  $html= sprintf('%s %s',$diva,$divmodel);
64
+ $html .= '<script>
65
+ jQuery(function($) {
66
+ if($("#magee-sc-form-preview").length>0){
67
+ $("#magee-sc-form-preview").contents().find("span").on("click",function(){
68
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").addClass("in");
69
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").attr("aria-hidden","false");
70
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("display","block");
71
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("padding-right","17px");
72
+ });
73
+ $("#magee-sc-form-preview").contents().find(".btn-normal").on("click",function(){
74
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").removeClass("in");
75
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").attr("aria-hidden","true");
76
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("display","none");
77
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("padding-right","");
78
+ });
79
+ $("#magee-sc-form-preview").contents().find(".close").on("click",function(){
80
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").removeClass("in");
81
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").attr("aria-hidden","true");
82
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("display","none");
83
+ $("#magee-sc-form-preview").contents().find("#'.$uniqid.'_ModalLg").css("padding-right","");
84
+ });
85
+ }
86
+ });
87
+ </script>';
88
 
89
  return $html;
90
  }
shortcodes/class-panel.php CHANGED
@@ -46,7 +46,7 @@ class Magee_Panel {
46
  if( $border_color )
47
  $css_style .= '.'.$add_class.'{border-color:'.esc_attr($border_color).';}';
48
  if( $title_background_color )
49
- $css_style .= '.'.$add_class.' .panel-heading{background-color:'.esc_attr($title_background_color).';}';
50
 
51
  if( $border_radius )
52
  $css_style .= '.'.$add_class.'{border-radius:'.esc_attr($border_radius).';}';
46
  if( $border_color )
47
  $css_style .= '.'.$add_class.'{border-color:'.esc_attr($border_color).';}';
48
  if( $title_background_color )
49
+ $css_style .= '.'.$add_class.' .panel-heading{background-color:'.esc_attr($title_background_color).';over-flow:hidden;}';
50
 
51
  if( $border_radius )
52
  $css_style .= '.'.$add_class.'{border-radius:'.esc_attr($border_radius).';}';
shortcodes/class-person.php CHANGED
@@ -52,6 +52,13 @@ class Magee_Person {
52
 
53
  extract( $defaults );
54
  self::$args = $defaults;
 
 
 
 
 
 
 
55
  $uniqid = uniqid('person-');
56
  $this->id = $id.$uniqid;
57
  $class .= ' '.$uniqid;
@@ -62,8 +69,8 @@ class Magee_Person {
62
  $r = hexdec(substr($overlay_color,0,2)) ;
63
  $g = hexdec(substr($overlay_color,2,2)) ;
64
  $b = hexdec(substr($overlay_color,4,2)) ;
65
-
66
  $textstyle1 = sprintf('.'.$uniqid.' .person-vcard.person-social li a i{ border-radius: %s; background-color:%s;}',$iconboxedradius,$iconcolor);
 
67
  $textstyle2 = sprintf('.'.$uniqid.' .img-box img{ border-radius: %s; display: inline-block;}',$picborderradius);
68
 
69
  $imgstyle = '';
@@ -98,19 +105,40 @@ class Magee_Person {
98
  $divcont = sprintf('<p class="person-desc">%s</p>',do_shortcode( Magee_Core::fix_shortcodes($content)));
99
  $divli = '';
100
  if($icon1 != ''){
 
101
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link1,$icon1);
 
 
 
 
102
  }
103
  if($icon2 != ''){
 
104
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link2,$icon2);
 
 
 
105
  }
106
  if($icon3 != ''){
 
107
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link3,$icon3);
 
 
 
108
  }
109
  if($icon4 != ''){
 
110
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link4,$icon4);
 
 
 
111
  }
112
  if($icon5 != ''){
 
113
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link5,$icon5);
 
 
 
114
  }
115
  if( $style == 'beside'){
116
 
52
 
53
  extract( $defaults );
54
  self::$args = $defaults;
55
+ if(is_numeric($picborder))
56
+ $picborder = $picborder.'px';
57
+ if(is_numeric($picborderradius))
58
+ $picborderradius = $picborderradius.'px';
59
+ if(is_numeric($iconboxedradius))
60
+ $iconboxedradius = $iconboxedradius.'px';
61
+
62
  $uniqid = uniqid('person-');
63
  $this->id = $id.$uniqid;
64
  $class .= ' '.$uniqid;
69
  $r = hexdec(substr($overlay_color,0,2)) ;
70
  $g = hexdec(substr($overlay_color,2,2)) ;
71
  $b = hexdec(substr($overlay_color,4,2)) ;
 
72
  $textstyle1 = sprintf('.'.$uniqid.' .person-vcard.person-social li a i{ border-radius: %s; background-color:%s;}',$iconboxedradius,$iconcolor);
73
+ $textstyle1 .= sprintf('.'.$uniqid.' .person-vcard.person-social li a img{ border-radius: %s; background-color:%s;}',$iconboxedradius,$iconcolor);
74
  $textstyle2 = sprintf('.'.$uniqid.' .img-box img{ border-radius: %s; display: inline-block;}',$picborderradius);
75
 
76
  $imgstyle = '';
105
  $divcont = sprintf('<p class="person-desc">%s</p>',do_shortcode( Magee_Core::fix_shortcodes($content)));
106
  $divli = '';
107
  if($icon1 != ''){
108
+ if( stristr($icon1,'fa-')):
109
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link1,$icon1);
110
+ else:
111
+ $divli .= sprintf(' <li><a href="%s"><img src="%s" class="image_instead"/></i></a></li>',$link1,$icon1);
112
+ endif;
113
+
114
  }
115
  if($icon2 != ''){
116
+ if( stristr($icon2,'fa-')):
117
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link2,$icon2);
118
+ else:
119
+ $divli .= sprintf(' <li><a href="%s"><img src="%s" class="image_instead"/></i></a></li>',$link2,$icon2);
120
+ endif;
121
  }
122
  if($icon3 != ''){
123
+ if( stristr($icon3,'fa-')):
124
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link3,$icon3);
125
+ else:
126
+ $divli .= sprintf(' <li><a href="%s"><img src="%s" class="image_instead"/></i></a></li>',$link3,$icon3);
127
+ endif;
128
  }
129
  if($icon4 != ''){
130
+ if( stristr($icon4,'fa-')):
131
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link4,$icon4);
132
+ else:
133
+ $divli .= sprintf(' <li><a href="%s"><img src="%s" class="image_instead"/></i></a></li>',$link4,$icon4);
134
+ endif;
135
  }
136
  if($icon5 != ''){
137
+ if( stristr($icon5,'fa-')):
138
  $divli .= sprintf(' <li><a href="%s"><i class="fa %s"></i></a></li>',$link5,$icon5);
139
+ else:
140
+ $divli .= sprintf(' <li><a href="%s"><img src="%s" class="image_instead"/></i></a></li>',$link5,$icon5);
141
+ endif;
142
  }
143
  if( $style == 'beside'){
144
 
shortcodes/class-piechart.php CHANGED
@@ -43,7 +43,19 @@ class Magee_Piechart {
43
  </div>';
44
  $html .= '<script language="javascript">';
45
  $html .= "
 
 
 
 
 
 
 
 
 
 
 
46
  jQuery(document).ready(function($){
 
47
  $('#".$chartID."').easyPieChart({
48
  barColor: '".esc_attr($filledcolor)."',
49
  trackColor: '".esc_attr($unfilledcolor)."',
@@ -52,7 +64,7 @@ class Magee_Piechart {
52
  trackWidth: 10,
53
  size: ".absint($size).",
54
  lineCap: 'butt'
55
- }); });";
56
 
57
  $html .= '</script>';
58
  return $html;
43
  </div>';
44
  $html .= '<script language="javascript">';
45
  $html .= "
46
+ if(jQuery('#magee-sc-form-preview').length>0){
47
+ jQuery('#magee-sc-form-preview').contents().find('#".$chartID."').easyPieChart({
48
+ barColor: '".esc_attr($filledcolor)."',
49
+ trackColor: '".esc_attr($unfilledcolor)."',
50
+ scaleColor: false,
51
+ lineWidth: 10,
52
+ trackWidth: 10,
53
+ size: ".absint($size).",
54
+ lineCap: 'butt'
55
+ });
56
+ }else{
57
  jQuery(document).ready(function($){
58
+
59
  $('#".$chartID."').easyPieChart({
60
  barColor: '".esc_attr($filledcolor)."',
61
  trackColor: '".esc_attr($unfilledcolor)."',
64
  trackWidth: 10,
65
  size: ".absint($size).",
66
  lineCap: 'butt'
67
+ }); });}";
68
 
69
  $html .= '</script>';
70
  return $html;
shortcodes/class-popover.php CHANGED
@@ -37,9 +37,42 @@ class Magee_Popover {
37
  $uniqid = uniqid('popover-');
38
  $this->id = $id.$uniqid;
39
 
40
- $html= sprintf('<span class="%s" id="%s" data-toggle="popover" data-trigger="%s" data-placement="%s"
41
  data-content="%s" data-original-title="%s" >%s</span>',$class,$id,$trigger,$placement,do_shortcode( Magee_Core::fix_shortcodes($content)),$title,$triggering_text);
42
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  return $html;
44
  }
45
 
37
  $uniqid = uniqid('popover-');
38
  $this->id = $id.$uniqid;
39
 
40
+ $html= sprintf('<span class="popover-preview %s" id="%s" data-toggle="popover" data-trigger="%s" data-placement="%s"
41
  data-content="%s" data-original-title="%s" >%s</span>',$class,$id,$trigger,$placement,do_shortcode( Magee_Core::fix_shortcodes($content)),$title,$triggering_text);
42
+ $html .= "<script>
43
+ jQuery(function($){
44
+ if(jQuery('#magee-sc-form-preview').length>0){
45
+ $('#magee-sc-form-preview').ready(function(){
46
+ $('#magee-sc-form-preview').contents().find('.popover-preview').css({\"position\":\"relative\",\"top\":\"100px\",\"left\":\"200px\"});
47
+ $('#magee-sc-form-preview').contents().find('.popover-preview').on('".$trigger."',function(){
48
+ if($('#magee-sc-form-preview').contents().find('.popover').length>0){
49
+ $('#magee-sc-form-preview').contents().find('.popover').remove();
50
+ }else{
51
+ var html = '<div class=\"popover-preview-hidden popover fade ".$placement." in\" role=\"tooltip\" id=\"$uniqid\" style=\"display: block;\"><div class=\"arrow\"></div><h3 class=\"popover-title\">".$title."</h3><div class=\"popover-content\">".do_shortcode( Magee_Core::fix_shortcodes($content))."</div></div>';
52
+ $('#magee-sc-form-preview').contents().find('span').after(html);
53
+ var hidden = $('#magee-sc-form-preview').contents().find('.popover-preview-hidden');
54
+ if(hidden.attr('class').indexOf('top')>=0){
55
+ size = ($('#magee-sc-form-preview').contents().find('.popover-preview').width()/2+200-hidden.width()/2).toString();
56
+ hidden.css({\"position\":\"absolute\",\"top\":\"25px\",\"left\":size+\"px\"});}
57
+ if(hidden.attr('class').indexOf('bottom')>=0){
58
+ size = ($('#magee-sc-form-preview').contents().find('.popover-preview').width()/2+200-hidden.width()/2).toString();
59
+ hidden.css({\"position\":\"absolute\",\"top\":\"116px\",\"left\":size+\"px\"});}
60
+ if(hidden.attr('class').indexOf('left')>=0){
61
+ size_width = (200-(hidden.width()+10)).toString();
62
+ size_height = ($('#magee-sc-form-preview').contents().find('.popover-preview').height()/2+100-hidden.height()/2).toString();
63
+ hidden.css({\"position\":\"absolute\",\"top\":size_height+\"px\",\"left\":size_width+\"px\"});}
64
+ if(hidden.attr('class').indexOf('Right')>=0){
65
+ size_width = (200+$('#magee-sc-form-preview').contents().find('.popover-preview').width()).toString();
66
+ size_height = ($('#magee-sc-form-preview').contents().find('.popover-preview').height()/2+100-hidden.height()/2).toString();
67
+ hidden.css({\"position\":\"absolute\",\"top\":size_height+\"px\",\"left\":size_width+\"px\"});}
68
+ }
69
+
70
+ });
71
+
72
+ });
73
+ }
74
+ });
75
+ </script>";
76
  return $html;
77
  }
78
 
shortcodes/class-promo-box.php CHANGED
@@ -33,20 +33,30 @@ class Magee_Promo_Box {
33
  'button_link' =>'#',
34
  'button_icon' =>'',
35
  'button_text' =>'',
 
36
  ), $args
37
  );
38
 
39
  extract( $defaults );
40
  self::$args = $defaults;
 
 
 
41
  $uniq_class = uniqid('promo_box-');
 
42
  $class .= ' '.$uniq_class;
43
  $html = '';
44
-
 
 
 
45
  $textstyle = sprintf('.'.$uniq_class.'.boxed{border-'.esc_attr($border_position).'-width: %s; background-color:%s;border-'.esc_attr($border_position).'-color:%s;}',$border_width,$background_color,$border_color);
46
 
47
  $css_style = '';
48
  if( $button_color !='' )
49
- $css_style .=sprintf('.'.$uniq_class.' .promo-action a{ background-color:%s;',$button_color);
 
 
50
 
51
  if( $style == 'boxed'){
52
  $class .= ' boxed';
@@ -60,12 +70,29 @@ class Magee_Promo_Box {
60
  $html .= '<div class="magee-promo-box '.esc_attr($class).'" id="'.esc_attr($id).'">
61
  <div class="promo-info">
62
  '. do_shortcode( Magee_Core::fix_shortcodes($content)).'
63
- </div>
64
- <div class="promo-action">
65
- <a href="'.esc_url($button_link).'" class="btn-normal btn-lg"><i class="fa '.esc_attr($button_icon).'"></i> '.esc_attr($button_text).'</a>
 
 
 
 
 
 
66
  </div>
67
  </div>';
68
 
 
 
 
 
 
 
 
 
 
 
 
69
  return $html;
70
  }
71
 
33
  'button_link' =>'#',
34
  'button_icon' =>'',
35
  'button_text' =>'',
36
+ 'button_text_color' =>'',
37
  ), $args
38
  );
39
 
40
  extract( $defaults );
41
  self::$args = $defaults;
42
+ if(is_numeric($border_width))
43
+ $border_width = $border_width.'px';
44
+
45
  $uniq_class = uniqid('promo_box-');
46
+ $action_class = uniqid('promo-action-');
47
  $class .= ' '.$uniq_class;
48
  $html = '';
49
+ if($button_text == ''){
50
+
51
+ $html .= '<style type="text/css" scoped="scoped">.'.$action_class.'{display:none;}</style>' ;
52
+ }
53
  $textstyle = sprintf('.'.$uniq_class.'.boxed{border-'.esc_attr($border_position).'-width: %s; background-color:%s;border-'.esc_attr($border_position).'-color:%s;}',$border_width,$background_color,$border_color);
54
 
55
  $css_style = '';
56
  if( $button_color !='' )
57
+ $css_style .=sprintf('.'.$uniq_class.' .promo-action a{background-color:%s;',$button_color);
58
+ if($button_text_color !='')
59
+ $css_style .=sprintf('.'.$uniq_class.' .promo-action a{color:%s;',$button_text_color);
60
 
61
  if( $style == 'boxed'){
62
  $class .= ' boxed';
70
  $html .= '<div class="magee-promo-box '.esc_attr($class).'" id="'.esc_attr($id).'">
71
  <div class="promo-info">
72
  '. do_shortcode( Magee_Core::fix_shortcodes($content)).'
73
+ </div>
74
+ <div class="promo-action '.$action_class.'">
75
+ <a href="'.esc_url($button_link).'" class="btn-normal btn-lg">';
76
+ if( stristr($button_icon,'fa-')):
77
+ $html .= '<i class="fa '.esc_attr($button_icon).'"></i>';
78
+ else:
79
+ $html .= '<img src="'.esc_attr($button_icon).'" class="image_instead"/>';
80
+ endif;
81
+ $html .= esc_attr($button_text).'</a>
82
  </div>
83
  </div>';
84
 
85
+ $html .= '<script>
86
+ jQuery(function($) {
87
+ if($("#magee-sc-form-preview").length>0){
88
+ $("#magee-sc-form-preview").contents().find(".promo-action a").on("click",function(e){
89
+ if($(this).attr("href") == "#"){
90
+ e.preventDefault();
91
+ }
92
+ });
93
+ }
94
+ });
95
+ </script>';
96
  return $html;
97
  }
98
 
shortcodes/class-section.php CHANGED
@@ -49,7 +49,6 @@ class Magee_Section {
49
  $class .= ' '.$add_class;
50
  $css_style = '';
51
  $container = '';
52
-
53
  if( $contents_in_container == 'yes' )
54
  $container = 'container';
55
  else
@@ -57,15 +56,15 @@ class Magee_Section {
57
 
58
 
59
  if( is_numeric($border_size) )
60
- $border_size = border_size.'px';
61
  if( is_numeric($padding_top) )
62
- $padding_top = padding_top.'px';
63
  if( is_numeric($padding_bottom) )
64
- $padding_bottom = padding_bottom.'px';
65
  if( is_numeric($padding_left) )
66
- $padding_left = padding_left.'px';
67
  if( is_numeric($padding_right) )
68
- $padding_right = padding_right.'px';
69
 
70
 
71
  $top_separator_html = '';
@@ -361,6 +360,7 @@ class Magee_Section {
361
 
362
  $styles = sprintf( '<style type="text/css" scoped="scoped">%s </style>',$css_style);
363
  $content = do_shortcode( Magee_Core::fix_shortcodes($content));
 
364
  if ( $full_height == 'yes'):
365
  $html .= sprintf('%s<section class="section magee-section %s fullheight verticalmiddle" id="%s"><div class="section-content"><div class="%s">%s</div></div>%s %s</section>',$styles,esc_attr($class),esc_attr($id),$container,$content,$top_separator_html,$bottom_separator_html);
366
  else:
49
  $class .= ' '.$add_class;
50
  $css_style = '';
51
  $container = '';
 
52
  if( $contents_in_container == 'yes' )
53
  $container = 'container';
54
  else
56
 
57
 
58
  if( is_numeric($border_size) )
59
+ $border_size = $border_size.'px';
60
  if( is_numeric($padding_top) )
61
+ $padding_top = $padding_top.'px';
62
  if( is_numeric($padding_bottom) )
63
+ $padding_bottom = $padding_bottom.'px';
64
  if( is_numeric($padding_left) )
65
+ $padding_left = $padding_left.'px';
66
  if( is_numeric($padding_right) )
67
+ $padding_right = $padding_right.'px';
68
 
69
 
70
  $top_separator_html = '';
360
 
361
  $styles = sprintf( '<style type="text/css" scoped="scoped">%s </style>',$css_style);
362
  $content = do_shortcode( Magee_Core::fix_shortcodes($content));
363
+ $html = '';
364
  if ( $full_height == 'yes'):
365
  $html .= sprintf('%s<section class="section magee-section %s fullheight verticalmiddle" id="%s"><div class="section-content"><div class="%s">%s</div></div>%s %s</section>',$styles,esc_attr($class),esc_attr($id),$container,$content,$top_separator_html,$bottom_separator_html);
366
  else:
shortcodes/class-social.php CHANGED
@@ -37,6 +37,9 @@ class Magee_Social {
37
 
38
  extract( $defaults );
39
  self::$args = $defaults;
 
 
 
40
  $uniqid = uniqid('social-');
41
  $this->id = $id.$uniqid;
42
 
@@ -67,10 +70,36 @@ class Magee_Social {
67
  break;
68
  }
69
 
70
-
71
  $html=sprintf(' %s <a href="%s" Id="%s" class="fa %s magee-icon %s %s %s_social_icon_acolor" data-toggle="tooltip" data-placement="top" title="" data-original-title="%s"></a>',
72
  $styles,$iconlink,$id,$icon,$sty3d,$class,$uqid,$title);
 
 
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  return $html;
75
  }
76
 
37
 
38
  extract( $defaults );
39
  self::$args = $defaults;
40
+ if(is_numeric($icon_size))
41
+ $icon_size = $icon_size.'px';
42
+
43
  $uniqid = uniqid('social-');
44
  $this->id = $id.$uniqid;
45
 
70
  break;
71
  }
72
 
73
+ if( stristr($icon,'fa-')):
74
  $html=sprintf(' %s <a href="%s" Id="%s" class="fa %s magee-icon %s %s %s_social_icon_acolor" data-toggle="tooltip" data-placement="top" title="" data-original-title="%s"></a>',
75
  $styles,$iconlink,$id,$icon,$sty3d,$class,$uqid,$title);
76
+ else:
77
+ $html=sprintf(' %s <a href="%s" Id="%s" class="fa magee-icon %s %s %s_social_icon_acolor" data-toggle="tooltip" data-placement="top" title="" data-original-title="%s"><img src="%s" class="image_instead"/></a>',$styles,$iconlink,$id,$sty3d,$class,$uqid,$title,$icon);
78
 
79
+ endif;
80
+ $html .= "<script>
81
+ jQuery(function($) {
82
+ if($('#magee-sc-form-preview').length>0){
83
+ $('#magee-sc-form-preview').contents().find('a.magee-icon').css({\"position\":\"relative\",\"top\":\"50px\",\"left\":\"200px\"});
84
+ $('#magee-sc-form-preview').contents().find('a.magee-icon').on('click',function(e){
85
+ if($(this).attr('href') == '#'){
86
+ e.preventDefault();
87
+ }
88
+ });
89
+ $('#magee-sc-form-preview').contents().find('a.magee-icon').on('hover',function(){
90
+ if($('#magee-sc-form-preview').contents().find('#tooltip-hidden').length>0){
91
+ $('#magee-sc-form-preview').contents().find('#tooltip-hidden').remove();
92
+ }else{
93
+ var html = '<div class=\"tooltip fade top in\" id=\"tooltip-hidden\" role=\"tooltip\" style=\"display: block;\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\">".$title."</div></div>';
94
+ $('#magee-sc-form-preview').contents().find('a.magee-icon').after(html);
95
+ var hidden = $('#magee-sc-form-preview').contents().find('#tooltip-hidden');
96
+ size = ($('#magee-sc-form-preview').contents().find('a.magee-icon').width()/2+200-hidden.width()/2).toString();
97
+ hidden.css({\"position\":\"absolute\",\"top\":\"20px\",\"left\":size+\"px\"});
98
+ }
99
+ });
100
+ }
101
+ });
102
+ </script>";
103
  return $html;
104
  }
105
 
shortcodes/class-tabs.php CHANGED
@@ -86,7 +86,29 @@ class Magee_Tabs {
86
  $html= $styles.'<div class="magee-tab-box '.$class.'" role="tabpanel" data-example-id="togglable-tabs id='.$id.'">
87
  <ul id="myTab1" class="list-inline '.$txtsty1.'" role="tablist">'.$this->item_tital.'
88
  </ul><div id="myTabContent" class="tab-content '.$tab_content_class.'">'.$items_content.'</div></div>';
89
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  return $html;
91
  }
92
 
86
  $html= $styles.'<div class="magee-tab-box '.$class.'" role="tabpanel" data-example-id="togglable-tabs id='.$id.'">
87
  <ul id="myTab1" class="list-inline '.$txtsty1.'" role="tablist">'.$this->item_tital.'
88
  </ul><div id="myTabContent" class="tab-content '.$tab_content_class.'">'.$items_content.'</div></div>';
89
+ $html .= '<script>
90
+ jQuery(function($) {
91
+ if($("#magee-sc-form-preview").length>0){
92
+ if($("#magee-sc-form-preview").contents().find(".magee-tab-box>ul>li").length>0){
93
+ num = $("#magee-sc-form-preview").contents().find(".magee-tab-box>ul>li").length;
94
+ for($i=0;$i<num;$i++){
95
+ $("#magee-sc-form-preview").contents().find(".magee-tab-box>ul>li").eq($i).on("click",function(e){
96
+ e.preventDefault();
97
+ if($(this).attr("class") == ""){
98
+ $(this).addClass("active").siblings().attr("class","");
99
+ $(this).find("a").attr("aria-expanded","true");
100
+ $(this).siblings().find("a").attr("aria-expanded","false");
101
+ $(this).parents(".magee-tab-box").find(".tab-pane").eq($(this).index()).addClass("active in").siblings().removeClass("active in");
102
+ }
103
+ });
104
+ }
105
+
106
+ }
107
+
108
+
109
+ }
110
+ });
111
+ </script>';
112
  return $html;
113
  }
114
 
shortcodes/class-tooltip.php CHANGED
@@ -36,8 +36,40 @@ class Magee_Tooltip {
36
 
37
 
38
  $html= sprintf('<span class="%s tooltip-text" id="%s" data-toggle="tooltip" data-trigger="%s" data-placement="%s" data-original-title="%s" >%s</span>',$class,$id,$trigger,$placement,$title,do_shortcode( Magee_Core::fix_shortcodes($content)));
39
-
40
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  return $html;
42
  }
43
 
36
 
37
 
38
  $html= sprintf('<span class="%s tooltip-text" id="%s" data-toggle="tooltip" data-trigger="%s" data-placement="%s" data-original-title="%s" >%s</span>',$class,$id,$trigger,$placement,$title,do_shortcode( Magee_Core::fix_shortcodes($content)));
39
+ $html .= "<script>
40
+ jQuery(function($){
41
+ if(jQuery('#magee-sc-form-preview').length>0){
42
+ $('#magee-sc-form-preview').ready(function(){
43
+ $('#magee-sc-form-preview').contents().find('.tooltip-text').css({\"position\":\"relative\",\"top\":\"50px\",\"left\":\"200px\"});
44
+ $('#magee-sc-form-preview').contents().find('.tooltip-text').on('".$trigger."',function(){
45
+ if($('#magee-sc-form-preview').contents().find('#tooltip-hidden').length>0){
46
+ $('#magee-sc-form-preview').contents().find('#tooltip-hidden').remove();
47
+ }else{
48
+ var html = '<div class=\"tooltip fade ".$placement." in\" id=\"tooltip-hidden\" role=\"tooltip\" style=\"display: block;\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\">".$title."</div></div>';
49
+ $('#magee-sc-form-preview').contents().find('span.tooltip-text').after(html);
50
+ var hidden = $('#magee-sc-form-preview').contents().find('#tooltip-hidden');
51
+ if(hidden.attr('class').indexOf('top')>=0){
52
+ size = ($('#magee-sc-form-preview').contents().find('.tooltip-text').width()/2+200-hidden.width()/2).toString();
53
+ hidden.css({\"position\":\"absolute\",\"top\":\"25px\",\"left\":size+\"px\"});}
54
+ if(hidden.attr('class').indexOf('bottom')>=0){
55
+ size = ($('#magee-sc-form-preview').contents().find('.tooltip-text').width()/2+200-hidden.width()/2).toString();
56
+ hidden.css({\"position\":\"absolute\",\"top\":\"68px\",\"left\":size+\"px\"});}
57
+ if(hidden.attr('class').indexOf('left')>=0){
58
+ size_width = (200-(hidden.width()+10)).toString();
59
+ size_height = ($('#magee-sc-form-preview').contents().find('.tooltip-text').height()/2+50-hidden.height()/2).toString();
60
+ hidden.css({\"position\":\"absolute\",\"top\":size_height+\"px\",\"left\":size_width+\"px\"});}
61
+ if(hidden.attr('class').indexOf('right')>=0){
62
+ size_width = (200+$('#magee-sc-form-preview').contents().find('.tooltip-text').width()).toString();
63
+ size_height = ($('#magee-sc-form-preview').contents().find('.tooltip-text').height()/2+50-hidden.height()/2).toString();
64
+ hidden.css({\"position\":\"absolute\",\"top\":size_height+\"px\",\"left\":size_width+\"px\"});}
65
+ }
66
+
67
+ });
68
+
69
+ });
70
+ }
71
+ });
72
+ </script>";
73
  return $html;
74
  }
75
 
shortcodes/class-video.php CHANGED
@@ -43,10 +43,10 @@ class Magee_Video {
43
  extract( $defaults );
44
  self::$args = $defaults;
45
  $html = '';
46
- if( $width == '100%')
47
- $width = '';
48
- if( $height == '100%')
49
- $height = '';
50
  if( $mute == 'yes'):
51
  $mute = 'muted';
52
  else:
@@ -72,7 +72,7 @@ class Magee_Video {
72
  <source src="'.esc_url($ogv_url).'" type="video/mp4">
73
  <source src="'.esc_url($webm_url).'" type="video/mp4">';
74
 
75
- $html .= '<video>';}
76
  else{
77
 
78
  $html .= '<image src="'.esc_url($poster).'">' ;
43
  extract( $defaults );
44
  self::$args = $defaults;
45
  $html = '';
46
+ if(is_numeric($width))
47
+ $width = $width.'px';
48
+ if(is_numeric($height))
49
+ $height = $height.'px';
50
  if( $mute == 'yes'):
51
  $mute = 'muted';
52
  else:
72
  <source src="'.esc_url($ogv_url).'" type="video/mp4">
73
  <source src="'.esc_url($webm_url).'" type="video/mp4">';
74
 
75
+ $html .= '</video>';}
76
  else{
77
 
78
  $html .= '<image src="'.esc_url($poster).'">' ;
shortcodes/class-vimeo.php CHANGED
@@ -40,6 +40,11 @@ class Magee_Vimeo {
40
 
41
  extract( $defaults );
42
  self::$args = $defaults;
 
 
 
 
 
43
  if( $autoplay == 'yes'):
44
  $autoplay = '1';
45
  else:
@@ -60,8 +65,10 @@ class Magee_Vimeo {
60
  else:
61
  $mute = '0';
62
  endif;
 
63
  preg_match( '/[0-9]+/',$link,$match);
64
  $sid = $match[0];
 
65
  $out = "<div id=\"vimeo\" class=\"vimeo-video " .$position . "\">";
66
  if ($mute == 1) {
67
  wp_enqueue_script( 'jquery-froogaloop', 'https://f.vimeocdn.com/js/froogaloop2.min.js',
@@ -73,50 +80,83 @@ class Magee_Vimeo {
73
  preg_match('/https/',$link,$link_match);
74
 
75
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
76
- if(implode($link_match) == ''){$out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" src=\"http://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>" ;
77
  }else{
78
- $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" src=\"https://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";}
79
- if ($mute == 1)
80
- {
81
- $out .= '<script>';
82
- $out .= 'jQuery(function($) {';
83
- $out .= 'var vimeo_iframe = $(\'#player_' .$sid .'\')[0];';
84
- $out .= 'var player = $f(vimeo_iframe);';
85
- $out .= 'player.addEvent(\'ready\', function() {';
86
- $out .= 'player.api(\'setVolume\', 0);';
87
- $out .= '});';
88
- $out .= '});';
89
- $out .= '</script>';
90
- }
91
  $out .= '</div>';
92
- $out .= "<script>
93
- var width = document.getElementById('vimeo').clientWidth;
94
- var height = document.getElementById('vimeo').clientHeight;
95
- var newwidth = document.getElementById('player_".$sid."').clientWidth ;
96
- var newheight = document.getElementById('player_".$sid."').clientHeight ;
97
- var op = newheight/newwidth;
98
- newwidth = width;
99
- newheight = op*newwidth;
100
- document.getElementById('player_".$sid."').setAttribute('width',newwidth);
101
- document.getElementById('player_".$sid."').setAttribute('height',newheight);
102
- </script>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  else:
105
  if(implode($link_match) == ''){
106
- $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" width=\"" .$width ."\" height=\"" .$height ."\" src=\"http://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";}else{
107
- $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" width=\"" .$width ."\" height=\"" .$height ."\" src=\"https://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";
108
  }
109
 
110
  if ($mute == 1)
111
  {
112
  $out .= '<script>';
113
- $out .= 'jQuery(function($) {';
114
- $out .= 'var vimeo_iframe = $(\'#player_' .$sid .'\')[0];';
115
- $out .= 'var player = $f(vimeo_iframe);';
116
- $out .= 'player.addEvent(\'ready\', function() {';
117
- $out .= 'player.api(\'setVolume\', 0);';
118
- $out .= '});';
119
- $out .= '});';
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  $out .= '</script>';
121
  }
122
  $out .= '</div>';
40
 
41
  extract( $defaults );
42
  self::$args = $defaults;
43
+ if(is_numeric($width))
44
+ $width = $width.'px';
45
+ if(is_numeric($height))
46
+ $height = $height.'px';
47
+ $sid = '';
48
  if( $autoplay == 'yes'):
49
  $autoplay = '1';
50
  else:
65
  else:
66
  $mute = '0';
67
  endif;
68
+ if($link !== ''){
69
  preg_match( '/[0-9]+/',$link,$match);
70
  $sid = $match[0];
71
+ }
72
  $out = "<div id=\"vimeo\" class=\"vimeo-video " .$position . "\">";
73
  if ($mute == 1) {
74
  wp_enqueue_script( 'jquery-froogaloop', 'https://f.vimeocdn.com/js/froogaloop2.min.js',
80
  preg_match('/https/',$link,$link_match);
81
 
82
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
83
+ if(implode($link_match) == ''){$out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" src=\"http://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&controls=" .$controls. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>" ;
84
  }else{
85
+ $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" src=\"https://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&controls=" .$controls. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";}
 
 
 
 
 
 
 
 
 
 
 
 
86
  $out .= '</div>';
87
+ $out .= '<script>';
88
+ if ($mute == 1){
89
+ $out .= 'jQuery(function($) {
90
+ if(jQuery("#magee-sc-form-preview").length>0){
91
+ var vimeo_iframe = $("#magee-sc-form-preview").contents().find("#player_' .$sid .'")[0];
92
+ var Froogaloop=function(){function e(a){return new e.fn.init(a)}function g(a,c,b){if(!b.contentWindow.postMessage)return!1;a=JSON.stringify({method:a,value:c});b.contentWindow.postMessage(a,h)}function l(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(e){}"ready"!=b||k||(k=!0);if(!/^https?:\/\/player.vimeo.com/.test(a.origin))return!1;"*"===h&&(h=a.origin);a=c.value;var m=c.data,f=""===f?null:c.player_id;c=f?d[f][b]:d[b];b=[];if(!c)return!1;void 0!==a&&b.push(a);m&&b.push(m);f&&b.push(f);
93
+ return 0<b.length?c.apply(null,b):c.call()}function n(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},k=!1,h="*";e.fn=e.prototype={element:null,init:function(a){"string"===typeof a&&(a=document.getElementById(a));this.element=a;return this},api:function(a,c){if(!this.element||!a)return!1;var b=this.element,d=""!==b.id?b.id:null,e=c&&c.constructor&&c.call&&c.apply?null:c,f=c&&c.constructor&&c.call&&c.apply?c:null;f&&n(a,f,d);g(a,e,b);return this},addEvent:function(a,c){if(!this.element)return!1;
94
+ var b=this.element,d=""!==b.id?b.id:null;n(a,c,d);"ready"!=a?g("addEventListener",a,b):"ready"==a&&k&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b=""!==c.id?c.id:null;a:{if(b&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&g("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",l,!1):window.attachEvent("onmessage",l);return window.Froogaloop=
95
+ window.$f=e}();
96
+ var player = $f(vimeo_iframe);
97
+ player.addEvent(\'ready\', function() {
98
+ player.api(\'setVolume\', 0);
99
+ });
100
+
101
+ }else{
102
+ var vimeo_iframe = $(\'#player_' .$sid .'\')[0];
103
+ var player = $f(vimeo_iframe);
104
+ player.addEvent(\'ready\', function() {
105
+ player.api(\'setVolume\', 0);
106
+ });
107
+
108
+ }
109
+
110
+ });';
111
+ }
112
+ $out .= 'jQuery(function($) {
113
+ if(jQuery("#magee-sc-form-preview").length>0){
114
+ divwidth = $("#magee-sc-form-preview").contents().find("#vimeo").width();
115
+ width = $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").width();
116
+ height = $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").height();
117
+ op = height/width;
118
+ $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").width(divwidth-100);
119
+ $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").height(op*divwidth-100);
120
+ }else{
121
+ divwidth = $("#vimeo").width();
122
+ width = $("#player_'.$sid.'").width();
123
+ height = $("#player_'.$sid.'").height();
124
+ op = height/width;
125
+ $("#player_'.$sid.'").width(divwidth);
126
+ $("#player_'.$sid.'").height(op*divwidth);
127
+ }
128
+ });
129
+ </script>';
130
 
131
  else:
132
  if(implode($link_match) == ''){
133
+ $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" width=\"" .$width ."\" height=\"" .$height ."\" src=\"http://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&controls=" .$controls. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";}else{
134
+ $out .= "<iframe id=\"player_" .$sid ."\" class=\"" .$class ."\" width=\"" .$width ."\" height=\"" .$height ."\" src=\"https://player.vimeo.com/video/" .$sid ."?api=1&player_id=player_" .$sid ."&title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=d01e2f&amp;amp;&loop=" .$loop. "&controls=" .$controls. "&autoplay=" .$autoplay. "\" frameborder=\"0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>";
135
  }
136
 
137
  if ($mute == 1)
138
  {
139
  $out .= '<script>';
140
+ $out .= 'jQuery(function($) {
141
+ if(jQuery("#magee-sc-form-preview").length>0){
142
+ var vimeo_iframe = $("#magee-sc-form-preview").contents().find(\'#player_' .$sid .'\')[0];
143
+ var Froogaloop=function(){function e(a){return new e.fn.init(a)}function g(a,c,b){if(!b.contentWindow.postMessage)return!1;a=JSON.stringify({method:a,value:c});b.contentWindow.postMessage(a,h)}function l(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(e){}"ready"!=b||k||(k=!0);if(!/^https?:\/\/player.vimeo.com/.test(a.origin))return!1;"*"===h&&(h=a.origin);a=c.value;var m=c.data,f=""===f?null:c.player_id;c=f?d[f][b]:d[b];b=[];if(!c)return!1;void 0!==a&&b.push(a);m&&b.push(m);f&&b.push(f);
144
+ return 0<b.length?c.apply(null,b):c.call()}function n(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},k=!1,h="*";e.fn=e.prototype={element:null,init:function(a){"string"===typeof a&&(a=document.getElementById(a));this.element=a;return this},api:function(a,c){if(!this.element||!a)return!1;var b=this.element,d=""!==b.id?b.id:null,e=c&&c.constructor&&c.call&&c.apply?null:c,f=c&&c.constructor&&c.call&&c.apply?c:null;f&&n(a,f,d);g(a,e,b);return this},addEvent:function(a,c){if(!this.element)return!1;
145
+ var b=this.element,d=""!==b.id?b.id:null;n(a,c,d);"ready"!=a?g("addEventListener",a,b):"ready"==a&&k&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b=""!==c.id?c.id:null;a:{if(b&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&g("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",l,!1):window.attachEvent("onmessage",l);return window.Froogaloop=
146
+ window.$f=e}();
147
+ var player = $f(vimeo_iframe);
148
+ player.addEvent(\'ready\', function() {
149
+ player.api(\'setVolume\', 0);
150
+ });
151
+ }else{
152
+ var vimeo_iframe = $(\'#player_' .$sid .'\')[0];
153
+ var player = $f(vimeo_iframe);
154
+ player.addEvent(\'ready\', function() {
155
+ player.api(\'setVolume\', 0);
156
+ });
157
+
158
+ }
159
+ });';
160
  $out .= '</script>';
161
  }
162
  $out .= '</div>';
shortcodes/class-youtube.php CHANGED
@@ -40,6 +40,10 @@ class Magee_Youtube {
40
 
41
  extract( $defaults );
42
  self::$args = $defaults;
 
 
 
 
43
  if( $autoplay == 'yes'):
44
  $autoplay = '1';
45
  else:
@@ -66,61 +70,113 @@ class Magee_Youtube {
66
  // print_r($aaa);
67
  $sid = substr($link,32,11);
68
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
69
- $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"".$sid."\" class=\"".$class."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
70
 
71
- $out .= "<script>var tag = document.createElement('script');";
72
- $out .= "var tag = document.createElement('script');";
73
- $out .= "tag.src = \"//www.youtube.com/iframe_api\";";
74
- $out .= "var firstScriptTag = document.getElementsByTagName('script')[0];";
75
- $out .= "firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);";
76
- $out .= "var player;";
77
- $out .= "function onYouTubeIframeAPIReady() {";
78
- $out .= "player = new YT.Player('" .$sid ."', {";
79
- $out .= "events: {";
80
- $out .= "'onReady': onPlayerReady";
81
- $out .= "}";
82
- $out .= "});";
83
- $out .= "}";
84
- $out .= "function onPlayerReady(event) {";
85
- $out .= "player.playVideo();";
86
- $out .= "event.target.mute();";
87
- $out .= "}";
88
- $out .= "</script>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  $out .= "</div>";
 
 
90
 
91
- $out .= "<script>
92
- var width = document.getElementById('youtube').clientWidth;
93
- var height = document.getElementById('youtube').clientHeight;
94
- var newwidth = document.getElementById('".$sid."').clientWidth ;
95
- var newheight = document.getElementById('".$sid."').clientHeight ;
96
- var op = newheight/newwidth;
97
- newwidth = width;
98
- newheight = op*newwidth;
99
- document.getElementById('".$sid."').setAttribute('width',newwidth);
100
- document.getElementById('".$sid."').setAttribute('height',newheight);
101
- </script>";
102
-
103
- else:
104
- $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"".$sid."\" class=\"".$class."\" width=\"".$width."\" height=\"".$height."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
105
-
106
- $out .= "<script>var tag = document.createElement('script');";
107
- $out .= "var tag = document.createElement('script');";
108
- $out .= "tag.src = \"//www.youtube.com/iframe_api\";";
109
- $out .= "var firstScriptTag = document.getElementsByTagName('script')[0];";
110
- $out .= "firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);";
111
- $out .= "var player;";
112
- $out .= "function onYouTubeIframeAPIReady() {";
113
- $out .= "player = new YT.Player('" .$sid ."', {";
114
- $out .= "events: {";
115
- $out .= "'onReady': onPlayerReady";
116
- $out .= "}";
117
- $out .= "});";
118
- $out .= "}";
119
- $out .= "function onPlayerReady(event) {";
120
- $out .= "player.playVideo();";
121
- $out .= "event.target.mute();";
122
- $out .= "}";
123
- $out .= "</script>";
 
 
 
 
 
 
 
124
  $out .= "</div>";
125
  endif;
126
  return $out;
40
 
41
  extract( $defaults );
42
  self::$args = $defaults;
43
+ if(is_numeric($width))
44
+ $width = $width.'px';
45
+ if(is_numeric($height))
46
+ $height = $height.'px';
47
  if( $autoplay == 'yes'):
48
  $autoplay = '1';
49
  else:
70
  // print_r($aaa);
71
  $sid = substr($link,32,11);
72
  if( $width == '100%' || $height == '100%' && $width == '' || $height == ''):
73
+ $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"player_".$sid."\" class=\"".$class."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
74
 
75
+ $out .= "<script>
76
+ if(document.getElementById('magee-sc-form-preview')){
77
+ var tag = document.getElementById('magee-sc-form-preview').contentWindow.document.createElement('script');
78
+ var tag = document.getElementById('magee-sc-form-preview').contentWindow.document.createElement('script');
79
+ tag.src = \"//www.youtube.com/iframe_api\";
80
+ var firstScriptTag = document.getElementById('magee-sc-form-preview').contentWindow.document.getElementsByTagName('script')[0];
81
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
82
+ var player;
83
+ function onYouTubeIframeAPIReady() {
84
+ player = new YT.Player('player_" .$sid ."', {
85
+ events: {
86
+ 'onReady': onPlayerReady
87
+ }
88
+ });
89
+ }
90
+ function onPlayerReady(event) {
91
+ player.playVideo();
92
+ event.target.mute();
93
+ }
94
+ }else{
95
+ var tag = document.createElement('script');
96
+ var tag = document.createElement('script');
97
+ tag.src = \"//www.youtube.com/iframe_api\";
98
+ var firstScriptTag = document.getElementsByTagName('script')[0];
99
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
100
+ var player;
101
+ function onYouTubeIframeAPIReady() {
102
+ player = new YT.Player('player_" .$sid ."', {
103
+ events: {
104
+ 'onReady': onPlayerReady
105
+ }
106
+ });
107
+ }
108
+ function onPlayerReady(event) {
109
+ player.playVideo();
110
+ event.target.mute();
111
+ }
112
+
113
+ }";
114
+
115
+ $out .= '
116
+ jQuery(function($) {
117
+ if(jQuery("#magee-sc-form-preview").length>0){
118
+ divwidth = $("#magee-sc-form-preview").contents().find("#youtube").width();
119
+ width = $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").width();
120
+ height = $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").height();
121
+ op = height/width;
122
+ $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").width(divwidth-100);
123
+ $("#magee-sc-form-preview").contents().find("#player_'.$sid.'").height(op*divwidth-100);
124
+ }else{
125
+ divwidth = $("#youtube").width();
126
+ width = $("#player_'.$sid.'").width();
127
+ height = $("#player_'.$sid.'").height();
128
+ op = height/width;
129
+ $("#player_'.$sid.'").width(divwidth);
130
+ $("#player_'.$sid.'").height(op*divwidth);
131
+ }
132
+ });
133
+
134
+
135
+ </script>';
136
  $out .= "</div>";
137
+ else:
138
+ $out .= "<div id=\"youtube\" class=\"youtube-video " .$position . "\"><iframe id=\"player_".$sid."\" class=\"".$class."\" width=\"".$width."\" height=\"".$height."\" src=\"//www.youtube.com/embed/" . $sid . "?rel=0&controls=".$controls."&loop=".$loop."&playlist=".$sid."&autoplay=".$autoplay."&enablejsapi=".$mute."\" frameborder=\"0\" allowfullscreen></iframe>";
139
 
140
+ $out .= "<script>
141
+ if(document.getElementById('magee-sc-form-preview')){
142
+ var tag = document.getElementById('magee-sc-form-preview').contentWindow.document.createElement('script');
143
+ var tag = document.getElementById('magee-sc-form-preview').contentWindow.document.createElement('script');
144
+ tag.src = \"//www.youtube.com/iframe_api\";
145
+ var firstScriptTag = document.getElementById('magee-sc-form-preview').contentWindow.document.getElementsByTagName('script')[0];
146
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
147
+ var player;
148
+ function onYouTubeIframeAPIReady() {
149
+ player = new YT.Player('player_" .$sid ."', {
150
+ events: {
151
+ 'onReady': onPlayerReady
152
+ }
153
+ });
154
+ }
155
+ function onPlayerReady(event) {
156
+ player.playVideo();
157
+ event.target.mute();
158
+ }
159
+ }else{
160
+ var tag = document.createElement('script');
161
+ var tag = document.createElement('script');
162
+ tag.src = \"//www.youtube.com/iframe_api\";
163
+ var firstScriptTag = document.getElementsByTagName('script')[0];
164
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
165
+ var player;
166
+ function onYouTubeIframeAPIReady() {
167
+ player = new YT.Player('player_" .$sid ."', {
168
+ events: {
169
+ 'onReady': onPlayerReady
170
+ }
171
+ });
172
+ }
173
+ function onPlayerReady(event) {
174
+ player.playVideo();
175
+ event.target.mute();
176
+ }
177
+
178
+ }
179
+ </script>";
180
  $out .= "</div>";
181
  endif;
182
  return $out;