Livemesh SiteOrigin Widgets - Version 2.5.1

Version Description

  • Fixed - The posts grid widget won't show up with the free version of the plugin
Download this release

Release Info

Developer livemesh
Plugin Icon 128x128 Livemesh SiteOrigin Widgets
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.3 to 2.5.1

Files changed (68) hide show
  1. admin/admin-init.php +22 -0
  2. admin/views/documentation.php +70 -8
  3. admin/views/settings.php +5 -9
  4. assets/js/lsow-frontend.js +16 -16
  5. assets/js/lsow-frontend.min.js +1 -1
  6. freemius/.codeclimate.yml +19 -0
  7. freemius/.travis.yml +11 -0
  8. freemius/assets/img/addons-for-beaver-builder.png +0 -0
  9. freemius/assets/js/postmessage.min.js +1 -0
  10. freemius/composer.json +10 -0
  11. freemius/gulpfile.js +167 -0
  12. freemius/gulpfile.min.js +1 -0
  13. freemius/includes/class-freemius.php +104 -23
  14. freemius/includes/class-fs-plugin-updater.php +2 -2
  15. freemius/includes/entities/class-fs-site.php +4 -1
  16. freemius/includes/fs-plugin-info-dialog.php +1 -1
  17. freemius/package.json +1 -1
  18. freemius/start.php +1 -1
  19. freemius/templates/connect.php +11 -0
  20. freemius/templates/debug.php +10 -0
  21. freemius/templates/forms/deactivation/form.php +1 -1
  22. includes/helper-functions.php +132 -83
  23. includes/widgets/lsow-accordion-widget/lsow-accordion-widget.php +4 -2
  24. includes/widgets/lsow-accordion-widget/tpl/default.php +16 -40
  25. includes/widgets/lsow-button-widget/lsow-button-widget.php +8 -13
  26. includes/widgets/lsow-button-widget/tpl/default.php +26 -36
  27. includes/widgets/lsow-carousel-widget/lsow-carousel-widget.php +11 -12
  28. includes/widgets/lsow-carousel-widget/tpl/default.php +14 -17
  29. includes/widgets/lsow-clients-widget/lsow-clients-widget.php +7 -3
  30. includes/widgets/lsow-clients-widget/tpl/default.php +28 -27
  31. includes/widgets/lsow-heading-widget/lsow-heading-widget.php +19 -10
  32. includes/widgets/lsow-heading-widget/tpl/default.php +13 -16
  33. includes/widgets/lsow-hero-image-widget/lsow-hero-image-widget.php +7 -3
  34. includes/widgets/lsow-hero-image-widget/tpl/default.php +25 -27
  35. includes/widgets/lsow-icon-list-widget/lsow-icon-list-widget.php +7 -4
  36. includes/widgets/lsow-icon-list-widget/tpl/default.php +38 -36
  37. includes/widgets/lsow-odometers-widget/lsow-odometers-widget.php +6 -3
  38. includes/widgets/lsow-odometers-widget/tpl/default.php +33 -28
  39. includes/widgets/lsow-piecharts-widget/lsow-piecharts-widget.php +7 -4
  40. includes/widgets/lsow-piecharts-widget/tpl/default.php +17 -17
  41. includes/widgets/lsow-portfolio-widget/js/portfolio.js +6 -6
  42. includes/widgets/lsow-portfolio-widget/js/portfolio.min.js +1 -1
  43. includes/widgets/lsow-portfolio-widget/lsow-portfolio-widget.php +11 -2
  44. includes/widgets/lsow-portfolio-widget/tpl/default.php +123 -97
  45. includes/widgets/lsow-posts-carousel-widget/lsow-posts-carousel-widget.php +13 -11
  46. includes/widgets/lsow-posts-carousel-widget/tpl/default.php +97 -69
  47. includes/widgets/lsow-pricing-table-widget/lsow-pricing-table-widget.php +7 -4
  48. includes/widgets/lsow-pricing-table-widget/tpl/default.php +58 -74
  49. includes/widgets/lsow-services-widget/lsow-services-widget.php +7 -4
  50. includes/widgets/lsow-services-widget/tpl/default.php +57 -50
  51. includes/widgets/lsow-stats-bar-widget/lsow-stats-bar-widget.php +3 -1
  52. includes/widgets/lsow-stats-bar-widget/tpl/default.php +27 -24
  53. includes/widgets/lsow-tabs-widget/css/style.css +3 -6
  54. includes/widgets/lsow-tabs-widget/css/style.css.map +1 -1
  55. includes/widgets/lsow-tabs-widget/css/style.scss +2 -5
  56. includes/widgets/lsow-tabs-widget/lsow-tabs-widget.php +4 -1
  57. includes/widgets/lsow-tabs-widget/tpl/default.php +32 -43
  58. includes/widgets/lsow-team-members-widget/lsow-team-members-widget.php +48 -3
  59. includes/widgets/lsow-team-members-widget/tpl/default.php +46 -38
  60. includes/widgets/lsow-testimonials-slider-widget/js/testimonials.js +9 -19
  61. includes/widgets/lsow-testimonials-slider-widget/js/testimonials.min.js +1 -1
  62. includes/widgets/lsow-testimonials-slider-widget/lsow-testimonials-slider-widget.php +16 -4
  63. includes/widgets/lsow-testimonials-slider-widget/tpl/default.php +52 -31
  64. includes/widgets/lsow-testimonials-widget/lsow-testimonials-widget.php +5 -3
  65. includes/widgets/lsow-testimonials-widget/tpl/default.php +39 -23
  66. livemesh-siteorigin-widgets.php +2 -2
  67. plugin.php +42 -2
  68. readme.txt +16 -2
admin/admin-init.php CHANGED
@@ -22,6 +22,16 @@ class LSOW_Admin {
22
  // load class admin ajax function
23
  require_once(LSOW_PLUGIN_DIR . '/admin/admin-ajax.php');
24
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  public function init_hooks() {
@@ -34,6 +44,18 @@ class LSOW_Admin {
34
 
35
  add_action('current_screen', array($this, 'remove_admin_notices'));
36
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  public function remove_admin_notices($screen) {
22
  // load class admin ajax function
23
  require_once(LSOW_PLUGIN_DIR . '/admin/admin-ajax.php');
24
 
25
+ /**
26
+ * Classes responsible for displaying admin notices.
27
+ */
28
+ if (lsow_fs()->is_not_paying()) {
29
+
30
+ require_once LSOW_PLUGIN_DIR . 'admin/notices/admin-notice.php';
31
+
32
+ require_once LSOW_PLUGIN_DIR . 'admin/notices/admin-notice-rate.php';
33
+ }
34
+
35
  }
36
 
37
  public function init_hooks() {
44
 
45
  add_action('current_screen', array($this, 'remove_admin_notices'));
46
 
47
+
48
+ /**
49
+ * Notice: Rate plugin
50
+ */
51
+ if (lsow_fs()->is_not_paying()) {
52
+ $rate = new LSOW_Notice_Rate('rate', LSOW_PLUGIN_DIR . 'admin/notices/templates/rate.php');
53
+
54
+ add_action('load-plugins.php', array($rate, 'defer_first_time'));
55
+ add_action('admin_notices', array($rate, 'display_notice'));
56
+ add_action('admin_post_lsow_dismiss_notice', array($rate, 'dismiss_notice'));
57
+ }
58
+
59
  }
60
 
61
  public function remove_admin_notices($screen) {
admin/views/documentation.php CHANGED
@@ -70,6 +70,7 @@ else {
70
  <li><a href="#install-plugins">Installing Recommended/Required Plugins</a></li>
71
  <li><a href="#demo-data">Installing Demo Data</a></li>
72
  <li><a href="#plugin-widgets">Working with plugin widgets</a></li>
 
73
 
74
  <li><a href="#heading-widget">Heading Widget</a></li>
75
  <li><a href="#services-widget">Services Widget</a></li>
@@ -284,6 +285,48 @@ else {
284
  </ul>
285
 
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  <p>The below sections provide help on each of the widgets built as part of Livemesh SiteOrigin Widgets
288
  plugin.</p>
289
 
@@ -1146,7 +1189,7 @@ else {
1146
 
1147
  <hr>
1148
  <h3 id="plugin-support">Plugin Support</span><a class="back-to-top" href="#panel"> Back to top</a></h3>
1149
- <p>If you have queries or issues to report related to the plugin, feel free to contact us via our dedicated support forum.</p>
1150
 
1151
  </div>
1152
 
@@ -1279,10 +1322,28 @@ else {
1279
 
1280
  <h2>Change Log for the Premium Version</h2>
1281
  <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1282
  <h3>2.3</h3>
1283
  <ul>
1284
  <li>Fixed - Incompatibility with certain themes due to different versions of waypoints scripts being used.</li>
1285
  <li>Fixed - Leaving tags empty in the gallery lead to addition of an empty filter in the filter list</li>
 
1286
  </ul>
1287
  <h3>2.2.1</h3>
1288
  <ul>
@@ -1317,7 +1378,7 @@ else {
1317
  <li>Added – Advanced features like touch/swipe controls, pinch out/in, double tap, keyboard navigation, full screen, thumbnails, social media sharing, hardware accelerated animations, direct linking now supported with lightbox.</li>
1318
  <li>Added - Support for creating stunning masonry gallery layouts using flexible widths and heights for images.</li>
1319
  <li>Added - Ability to specify wide width for images in masonry layout of gallery.</li>
1320
- <li>Added - Options to enable/disable display of image/video titles and image/video tags in gallery and gallery carousel addons.</li>
1321
  <li>Added – HTML5 video support in video gallery and video carousel modules. Support for MP4 and WebM formats.</li>
1322
  <li>Fixed - Posts Grid excerpt would not display shortcodes or HTML content</li>
1323
  <li>Fixed - Livemesh Gallery styling controls not taking effect for thumbnail hover and titles</li>
@@ -1357,9 +1418,9 @@ else {
1357
 
1358
  <h3>1.7.5</h3>
1359
  <ul>
1360
- <li>Added – Image size option for all major addons including grid, gallery and carousels.</li>
1361
  <li>Added - The lightbox now opens on clicking anywhere on the image if no destination URL is specified for gallery item</li>
1362
- <li>Added - The link target option for all major addons like grid, gallery and carousels</li>
1363
  <li>Fixed – The gallery image was not clickable to the link specified</li>
1364
  <li>Fixed – The gallery filters would not center when a heading was not specified.</li>
1365
  <li>Fixed – The gallery filters will not display multi-line on devices of lower resolutions like mobile devices.</li>
@@ -1548,7 +1609,7 @@ else {
1548
  <!-- Knowledge base -->
1549
  <div class="panel-aside">
1550
  <h4><?php _e('Why upgrade to Premium version?', 'livemesh-so-widgets'); ?></h4>
1551
- <p><?php _e('Premium version offers multiple benefits - more widgets, advanced features for widgets including those part of the free plugin and priority support through a dedicated support forum.', 'livemesh-so-widgets'); ?></p>
1552
 
1553
  <a class="button button-primary"
1554
  href="https://www.livemeshthemes.com/siteorigin-widgets/widgets-demo/#why-upgrade"
@@ -1560,11 +1621,12 @@ else {
1560
  <!-- Knowledge base -->
1561
  <div class="panel-aside">
1562
  <h4>Need support for the plugin?</h4>
1563
- <p>Support for premium version is provided through our <a href="https://support.livemeshthemes.com/forums/forum/livemesh-siteorigin-widgets-support/" title="Livemesh SiteOrigin Widgets Support forum">dedicated support forum</a>.</p>
1564
- <p>To register with support, pls send us your purchase details along with desired forum username through our <a href="https://www.livemeshthemes.com/contact-us/" title="Livemesh Contact form">contact form</a> and we will create a support account and email you the forum access details.</p>
 
1565
 
1566
  <a class="button button-primary"
1567
- href="https://www.livemeshthemes.com/contact-us/"
1568
  title="<?php esc_attr_e('Contact Us', 'livemesh-so-widgets'); ?>"><?php _e('Contact Us', 'livemesh-so-widgets'); ?></a>
1569
  </div><!-- .panel-aside knowledge base -->
1570
 
70
  <li><a href="#install-plugins">Installing Recommended/Required Plugins</a></li>
71
  <li><a href="#demo-data">Installing Demo Data</a></li>
72
  <li><a href="#plugin-widgets">Working with plugin widgets</a></li>
73
+ <li><a href="#customization">How to customize widgets output</a></li>
74
 
75
  <li><a href="#heading-widget">Heading Widget</a></li>
76
  <li><a href="#services-widget">Services Widget</a></li>
285
  </ul>
286
 
287
 
288
+ <hr>
289
+ <h3 id="customization">How to customize output generated by widgets<a class="back-to-top" href="#panel"><span
290
+ class="dashicons dashicons-arrow-up-alt2"></span> Back to top</a></h3>
291
+ <p>The strength of this plugin over many others is that this plugin lets you customize almost any piece of HTML
292
+ generated by an widget part of the plugin. You can move around or modify the output elements to suit your
293
+ needs - change HTML tags, change sequence of information (e.g., place image at the bottom of the post in a
294
+ grid), add new CSS classes of your own, add branding material, delete unneeded output element (e.g. remove
295
+ post meta information), modify information (e.g., truncate description or excerpt generated) etc. with the
296
+ help of templates and filters provided by the plugin. </p>
297
+ <p>Following are the two ways to customize the output of an widget part of the plugin.</p>
298
+ <ul>
299
+ <li><p><strong>Filters</strong> are hooks that are provided at almost every customization opportunity that presents itself
300
+ as the widget renders the widgets by parsing the settings input by the user in the SiteOrigin editor. <strong>About 200+ filters have been
301
+ provided</strong> to help users customize almost any information output by the widgets of this plugin.</p>
302
+ <p>To locate the filters, the users are encouraged to have a look at the PHP code located in the <code>tpl/default.php</code> file of
303
+ the respective widget folder located in <code>includes/widgets/</code> folder.</p>
304
+
305
+ <p><a href="https://docs.presscustomizr.com/article/26-wordpress-actions-filters-and-hooks-a-guide-for-non-developers"
306
+ target="_blank">More about Filters - a guide for non-developers →</a></p>
307
+ </li>
308
+ <li><p><strong>Templates</strong> let you modify the HTML generated by an widget by placing an appropriately
309
+ named PHP file in a folder named 'siteorigin-widgets' in your child theme (or parent theme).</p>
310
+ <p>Following are the names of the files that plugin looks for to customize the <i>respective</i> widget
311
+ rendering - <code> clients.php, carousel.php, heading.php, odometers.php, piecharts.php, posts-grid.php,
312
+ posts-carousel.php, pricing-table.php, services.php, stats-bars.php, team-members.php, testimonials.php,
313
+ testimonials-slider.php, accordion.php, button.php, faq.php, features.php, gallery.php, gallery-carousel.php,
314
+ icon-list.php, image-slider.php, posts-block.php, services-carousel.php, slider.php, tabs.php. </code></p>
315
+ <p>Once a particular template file is found in the theme folder, the corresponding widget rendering code is
316
+ replaced with that in the template PHP file. The template files are provided with <code>$settings</code> variable to
317
+ help read the widget settings and then display the output. The current output generated by the plugin widget can
318
+ be seen in the <code>tpl/default.php</code> file of the widgets folder located in <code>includes/widgets/</code> folder.<strong> In
319
+ most cases, it is recommended to copy over the rendering code from the <code>tpl/default.php</code> file to the template
320
+ file and modify the same to achieve the desired customization</strong>. A basic knowledge of PHP and HTML is all that is
321
+ required to customize an widget.</p>
322
+ <li><strong>Module Templates </strong>(<span class="pro-feature">Pro Feature</span>) are PHP files which can be placed in the <code>siteorigin-widgets/modules/</code> of
323
+ the child theme to customize the posts grid item information part of posts grid/block widgets output by module files located in <code>includes/blocks/modules/</code> folder
324
+ of the premium version of the plugin. The template files should be named as <code>module-1.php, module-2.php .... , module-12.php, module-13.php</code> to
325
+ match the corresponding files located in the <code>includes/blocks/modules</code> folder. Only HTML part of <code>render()</code> function needs to
326
+ be customized in the module template files. The users are recommended to copy over the rendering code part of this function to the corresponding
327
+ template file and then customize it to their needs. </code>
328
+ </li>
329
+ </ul>
330
  <p>The below sections provide help on each of the widgets built as part of Livemesh SiteOrigin Widgets
331
  plugin.</p>
332
 
1189
 
1190
  <hr>
1191
  <h3 id="plugin-support">Plugin Support</span><a class="back-to-top" href="#panel"> Back to top</a></h3>
1192
+ <p>If you have queries or issues to report related to the plugin, feel free to contact us via our dedicated support portal.</p>
1193
 
1194
  </div>
1195
 
1322
 
1323
  <h2>Change Log for the Premium Version</h2>
1324
  <br>
1325
+ <h3>2.5.1</h3>
1326
+ <ul>
1327
+ <li>Fixed - The posts grid widget won't show up with the free version of the plugin.</li>
1328
+ </ul>
1329
+ <h3>2.5</h3>
1330
+ <ul>
1331
+
1332
+ <li>Added - Major release of the plugin with extensive support for filters and templates to enable users to customize the output generated by the widgets. You can now create a template file in siteorigin-widgets folder in your child theme to customize the widgets html or use filters to customize output generated by the widgets. </li>
1333
+ <li>Updated - Documentation providing information on how to use templates and filters to customize the plugin widgets.</li>
1334
+ <li>Added - Filters for settings object employed for rendering the widgets.</li>
1335
+ <li>Fixed - Gallery pagination would break when number of items crosses 140.</li>
1336
+ <li>Added - Pagination with dotted navigation for galleries when number of pages exceeds 5.</li>
1337
+ <li>Added - Responsive pagination controls for gallery.</li>
1338
+ <li>Fixed - The fancybox lightbox would not display share, thumbnail, slideshow options for image/video gallery, posts grid and posts blocks.</li>
1339
+ <li>Added - Read More link/button options for posts blocks.</li>
1340
+ <li>Added - Block style 8 in Posts Block now much more responsive.</li>
1341
+ </ul>
1342
  <h3>2.3</h3>
1343
  <ul>
1344
  <li>Fixed - Incompatibility with certain themes due to different versions of waypoints scripts being used.</li>
1345
  <li>Fixed - Leaving tags empty in the gallery lead to addition of an empty filter in the filter list</li>
1346
+ <li>Fixed - Misplaced HTML5 video background hero header video tags information</li>
1347
  </ul>
1348
  <h3>2.2.1</h3>
1349
  <ul>
1378
  <li>Added – Advanced features like touch/swipe controls, pinch out/in, double tap, keyboard navigation, full screen, thumbnails, social media sharing, hardware accelerated animations, direct linking now supported with lightbox.</li>
1379
  <li>Added - Support for creating stunning masonry gallery layouts using flexible widths and heights for images.</li>
1380
  <li>Added - Ability to specify wide width for images in masonry layout of gallery.</li>
1381
+ <li>Added - Options to enable/disable display of image/video titles and image/video tags in gallery and gallery carousel widgets.</li>
1382
  <li>Added – HTML5 video support in video gallery and video carousel modules. Support for MP4 and WebM formats.</li>
1383
  <li>Fixed - Posts Grid excerpt would not display shortcodes or HTML content</li>
1384
  <li>Fixed - Livemesh Gallery styling controls not taking effect for thumbnail hover and titles</li>
1418
 
1419
  <h3>1.7.5</h3>
1420
  <ul>
1421
+ <li>Added – Image size option for all major widgets including grid, gallery and carousels.</li>
1422
  <li>Added - The lightbox now opens on clicking anywhere on the image if no destination URL is specified for gallery item</li>
1423
+ <li>Added - The link target option for all major widgets like grid, gallery and carousels</li>
1424
  <li>Fixed – The gallery image was not clickable to the link specified</li>
1425
  <li>Fixed – The gallery filters would not center when a heading was not specified.</li>
1426
  <li>Fixed – The gallery filters will not display multi-line on devices of lower resolutions like mobile devices.</li>
1609
  <!-- Knowledge base -->
1610
  <div class="panel-aside">
1611
  <h4><?php _e('Why upgrade to Premium version?', 'livemesh-so-widgets'); ?></h4>
1612
+ <p><?php _e('Premium version offers multiple benefits - more widgets, advanced features for widgets including those part of the free plugin and priority support through a dedicated support portal.', 'livemesh-so-widgets'); ?></p>
1613
 
1614
  <a class="button button-primary"
1615
  href="https://www.livemeshthemes.com/siteorigin-widgets/widgets-demo/#why-upgrade"
1621
  <!-- Knowledge base -->
1622
  <div class="panel-aside">
1623
  <h4>Need support for the plugin?</h4>
1624
+ <p>The premium version of the plugin entitles you to quick support with replies posted within 24 hours (on week days). </p>
1625
+
1626
+ <p>Please submit your support query through our <a href="https://www.livemeshthemes.com/siteorigin-widgets/contact-us/" title="Livemesh Contact form">website contact form</a>. This will create a support ticket in our support portal.</p>
1627
 
1628
  <a class="button button-primary"
1629
+ href="https://www.livemeshthemes.com/siteorigin-widgets/contact-us/"
1630
  title="<?php esc_attr_e('Contact Us', 'livemesh-so-widgets'); ?>"><?php _e('Contact Us', 'livemesh-so-widgets'); ?></a>
1631
  </div><!-- .panel-aside knowledge base -->
1632
 
admin/views/settings.php CHANGED
@@ -288,25 +288,21 @@ $custom_css = lsow_get_option('lsow_custom_css', '');
288
  <p>We offer premium support for our paid customers with following benefits - </p>
289
 
290
  <ul>
291
- <li><strong>Dedicated Forum</strong> - The customers will be provided access to a
292
- dedicated support forum.
293
  </li>
294
- <li><strong>Public and Private Tickets</strong> - Private tickets help you work with us
295
  directly regarding the issues you are facing in your site by sharing the details of
296
  your site securely.
297
  </li>
298
- <li><strong>Searchable Topics</strong> - The support forum is searchable for public
299
- topics helping you look for resolution of similar issues reported by other
300
- customers.
301
- </li>
302
  </li>
303
  <li><strong>Faster turnaround</strong> - The threads opened by paid customers will be
304
  attended to within 24 hours of opening a ticket.
305
  </li>
306
  <li><strong>Bug fixes and Enhancements</strong> - Any fixes and enhancements made to the
307
- widgets will be prioritized to arrive quicker on the premium version.
308
  </li>
309
- <li><strong>Proven Expertize</strong> - Having served over <strong>11,000+
310
  customers</strong> of our themes over past 3 years, the support provided by us
311
  is proven in competence and commitment.
312
  </li>
288
  <p>We offer premium support for our paid customers with following benefits - </p>
289
 
290
  <ul>
291
+ <li><strong>Dedicated Support Portal</strong> - The customers will be provided access to a
292
+ dedicated support portal powered by Freshdesk.
293
  </li>
294
+ <li><strong>Private Tickets</strong> - Private tickets help you work with us
295
  directly regarding the issues you are facing in your site by sharing the details of
296
  your site securely.
297
  </li>
 
 
 
 
298
  </li>
299
  <li><strong>Faster turnaround</strong> - The threads opened by paid customers will be
300
  attended to within 24 hours of opening a ticket.
301
  </li>
302
  <li><strong>Bug fixes and Enhancements</strong> - Any fixes and enhancements made to the
303
+ elements will be prioritized to arrive quicker on the premium version.
304
  </li>
305
+ <li><strong>Proven Expertize</strong> - Having served over <strong>12,280+
306
  customers</strong> of our themes over past 3 years, the support provided by us
307
  is proven in competence and commitment.
308
  </li>
assets/js/lsow-frontend.js CHANGED
@@ -83,37 +83,37 @@ if (typeof (jQuery) != 'undefined') {
83
 
84
  var carousel_elem = $(this);
85
 
86
- var arrows = carousel_elem.data('arrows') ? true : false;
87
 
88
- var dots = carousel_elem.data('dots') ? true : false;
89
 
90
- var autoplay = carousel_elem.data('autoplay') ? true : false;
91
 
92
- var autoplay_speed = carousel_elem.data('autoplay_speed') || 3000;
93
 
94
- var animation_speed = carousel_elem.data('animation_speed') || 300;
95
 
96
- var fade = carousel_elem.data('fade') ? true : false;
97
 
98
- var pause_on_hover = carousel_elem.data('pause_on_hover') ? true : false;
99
 
100
- var display_columns = carousel_elem.data('display_columns') || 4;
101
 
102
- var scroll_columns = carousel_elem.data('scroll_columns') || 4;
103
 
104
- var gutter = carousel_elem.data('gutter') || 10;
105
 
106
- var tablet_width = carousel_elem.data('tablet_width') || 800;
107
 
108
- var tablet_display_columns = carousel_elem.data('tablet_display_columns') || 2;
109
 
110
- var tablet_scroll_columns = carousel_elem.data('tablet_scroll_columns') || 2;
111
 
112
- var mobile_width = carousel_elem.data('mobile_width') || 480;
113
 
114
- var mobile_display_columns = carousel_elem.data('mobile_display_columns') || 1;
115
 
116
- var mobile_scroll_columns = carousel_elem.data('mobile_scroll_columns') || 1;
117
 
118
  carousel_elem.slick({
119
  arrows: arrows,
83
 
84
  var carousel_elem = $(this);
85
 
86
+ var settings = carousel_elem.data('settings');
87
 
88
+ var arrows = settings['arrows'];
89
 
90
+ var dots = settings['dots'];
91
 
92
+ var autoplay = settings['autoplay'];
93
 
94
+ var autoplay_speed = parseInt(settings['autoplay_speed']) || 3000;
95
 
96
+ var animation_speed = parseInt(settings['animation_speed']) || 300;
97
 
98
+ var fade = settings['fade'];
99
 
100
+ var pause_on_hover = settings['pause_on_hover'];
101
 
102
+ var display_columns = parseInt(settings['display_columns']) || 4;
103
 
104
+ var scroll_columns = parseInt(settings['scroll_columns']) || 4;
105
 
106
+ var tablet_width = parseInt(settings['tablet_width']) || 800;
107
 
108
+ var tablet_display_columns = parseInt(settings['tablet_display_columns']) || 2;
109
 
110
+ var tablet_scroll_columns = parseInt(settings['tablet_scroll_columns']) || 2;
111
 
112
+ var mobile_width = parseInt(settings['mobile_width']) || 480;
113
 
114
+ var mobile_display_columns = parseInt(settings['mobile_display_columns']) || 1;
115
 
116
+ var mobile_scroll_columns = parseInt(settings['mobile_scroll_columns']) || 1;
117
 
118
  carousel_elem.slick({
119
  arrows: arrows,
assets/js/lsow-frontend.min.js CHANGED
@@ -1 +1 @@
1
- if(typeof jQuery!="undefined"){jQuery.noConflict();(function($){"use strict";$(function(){var LSOW_Frontend={init:function(){this.output_custom_css();this.carousel();this.setup_parallax();this.setup_ytp();this.setup_animations()},setup_animations:function(){$(".lsow-visible-on-scroll:not(.animated)").css("opacity",0);"function"!=typeof window.lsow_animate_widgets&&(window.lsow_animate_widgets=function(){"undefined"!=typeof $.fn.livemeshWaypoint&&$(".lsow-animate-on-scroll:not(.animated)").livemeshWaypoint(function(){var animateClass=$(this.element).data("animation");$(this.element).addClass("animated "+animateClass).css("opacity",1)},{offset:"85%"})});window.setTimeout(lsow_animate_widgets,500)},output_custom_css:function(){var custom_css=lsow_settings["custom_css"];if(custom_css!==undefined&&custom_css!=""){custom_css='<style type="text/css">'+custom_css+"</style>";$("head").append(custom_css)}},isMobile:function(){"use strict";if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){return true}return false},vendor_prefix:function(){var prefix;function prefix(){var styles=window.getComputedStyle(document.documentElement,"");prefix=(Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/)||styles.OLink===""&&["","o"])[1];return prefix}prefix();return prefix},carousel:function(){if($().slick===undefined){return}var carousel_elements=$(".lsow-carousel, .lsow-posts-carousel, .lsow-gallery-carousel");carousel_elements.each(function(){var carousel_elem=$(this);var arrows=carousel_elem.data("arrows")?true:false;var dots=carousel_elem.data("dots")?true:false;var autoplay=carousel_elem.data("autoplay")?true:false;var autoplay_speed=carousel_elem.data("autoplay_speed")||3e3;var animation_speed=carousel_elem.data("animation_speed")||300;var fade=carousel_elem.data("fade")?true:false;var pause_on_hover=carousel_elem.data("pause_on_hover")?true:false;var display_columns=carousel_elem.data("display_columns")||4;var scroll_columns=carousel_elem.data("scroll_columns")||4;var gutter=carousel_elem.data("gutter")||10;var tablet_width=carousel_elem.data("tablet_width")||800;var tablet_display_columns=carousel_elem.data("tablet_display_columns")||2;var tablet_scroll_columns=carousel_elem.data("tablet_scroll_columns")||2;var mobile_width=carousel_elem.data("mobile_width")||480;var mobile_display_columns=carousel_elem.data("mobile_display_columns")||1;var mobile_scroll_columns=carousel_elem.data("mobile_scroll_columns")||1;carousel_elem.slick({arrows:arrows,dots:dots,infinite:true,autoplay:autoplay,autoplaySpeed:autoplay_speed,speed:animation_speed,fade:false,pauseOnHover:pause_on_hover,slidesToShow:display_columns,slidesToScroll:scroll_columns,responsive:[{breakpoint:tablet_width,settings:{slidesToShow:tablet_display_columns,slidesToScroll:tablet_scroll_columns}},{breakpoint:mobile_width,settings:{slidesToShow:mobile_display_columns,slidesToScroll:mobile_scroll_columns}}]})})},setup_parallax:function(){var scroll=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/600)};function init_parallax(){if(LSOW_Frontend.isMobile()===false){var windowHeight=$(window).height();$(".lsow-section-bg-parallax").each(function(){var segment=$(this);var elementHeight=segment.outerHeight(true);var boundingRect=segment[0].getBoundingClientRect();if(boundingRect.bottom>=0&&boundingRect.top<=windowHeight){var distanceToCover=windowHeight+elementHeight;var pixelsMoved=windowHeight-boundingRect.top;var toTransform=50;var transformPercent=toTransform*Math.abs(pixelsMoved/distanceToCover);transformPercent=-transformPercent.toFixed(2);segment.find(".lsow-parallax-bg").css("-"+LSOW_Frontend.vendor_prefix()+"-transform","translate3d(0px, "+transformPercent+"%, 0px)")}})}}if(this.isMobile()===false){scroll(init_parallax);$(window).on("scroll",function(){scroll(init_parallax)})}},setup_ytp:function(){if(this.isMobile()||$().mb_YTPlayer===undefined){return}$(".lsow-section-bg-youtube").mb_YTPlayer({startAt:0,showYTLogo:false,showControls:false,autoPlay:true,mute:true,containment:"self"})}};LSOW_Frontend.init()})})(jQuery)}
1
+ if(typeof jQuery!="undefined"){jQuery.noConflict();(function($){"use strict";$(function(){var LSOW_Frontend={init:function(){this.output_custom_css();this.carousel();this.setup_parallax();this.setup_ytp();this.setup_animations()},setup_animations:function(){$(".lsow-visible-on-scroll:not(.animated)").css("opacity",0);"function"!=typeof window.lsow_animate_widgets&&(window.lsow_animate_widgets=function(){"undefined"!=typeof $.fn.livemeshWaypoint&&$(".lsow-animate-on-scroll:not(.animated)").livemeshWaypoint(function(){var animateClass=$(this.element).data("animation");$(this.element).addClass("animated "+animateClass).css("opacity",1)},{offset:"85%"})});window.setTimeout(lsow_animate_widgets,500)},output_custom_css:function(){var custom_css=lsow_settings["custom_css"];if(custom_css!==undefined&&custom_css!=""){custom_css='<style type="text/css">'+custom_css+"</style>";$("head").append(custom_css)}},isMobile:function(){"use strict";if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){return true}return false},vendor_prefix:function(){var prefix;function prefix(){var styles=window.getComputedStyle(document.documentElement,"");prefix=(Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/)||styles.OLink===""&&["","o"])[1];return prefix}prefix();return prefix},carousel:function(){if($().slick===undefined){return}var carousel_elements=$(".lsow-carousel, .lsow-posts-carousel, .lsow-gallery-carousel");carousel_elements.each(function(){var carousel_elem=$(this);var settings=carousel_elem.data("settings");var arrows=settings["arrows"];var dots=settings["dots"];var autoplay=settings["autoplay"];var autoplay_speed=parseInt(settings["autoplay_speed"])||3e3;var animation_speed=parseInt(settings["animation_speed"])||300;var fade=settings["fade"];var pause_on_hover=settings["pause_on_hover"];var display_columns=parseInt(settings["display_columns"])||4;var scroll_columns=parseInt(settings["scroll_columns"])||4;var tablet_width=parseInt(settings["tablet_width"])||800;var tablet_display_columns=parseInt(settings["tablet_display_columns"])||2;var tablet_scroll_columns=parseInt(settings["tablet_scroll_columns"])||2;var mobile_width=parseInt(settings["mobile_width"])||480;var mobile_display_columns=parseInt(settings["mobile_display_columns"])||1;var mobile_scroll_columns=parseInt(settings["mobile_scroll_columns"])||1;carousel_elem.slick({arrows:arrows,dots:dots,infinite:true,autoplay:autoplay,autoplaySpeed:autoplay_speed,speed:animation_speed,fade:false,pauseOnHover:pause_on_hover,slidesToShow:display_columns,slidesToScroll:scroll_columns,responsive:[{breakpoint:tablet_width,settings:{slidesToShow:tablet_display_columns,slidesToScroll:tablet_scroll_columns}},{breakpoint:mobile_width,settings:{slidesToShow:mobile_display_columns,slidesToScroll:mobile_scroll_columns}}]})})},setup_parallax:function(){var scroll=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/600)};function init_parallax(){if(LSOW_Frontend.isMobile()===false){var windowHeight=$(window).height();$(".lsow-section-bg-parallax").each(function(){var segment=$(this);var elementHeight=segment.outerHeight(true);var boundingRect=segment[0].getBoundingClientRect();if(boundingRect.bottom>=0&&boundingRect.top<=windowHeight){var distanceToCover=windowHeight+elementHeight;var pixelsMoved=windowHeight-boundingRect.top;var toTransform=50;var transformPercent=toTransform*Math.abs(pixelsMoved/distanceToCover);transformPercent=-transformPercent.toFixed(2);segment.find(".lsow-parallax-bg").css("-"+LSOW_Frontend.vendor_prefix()+"-transform","translate3d(0px, "+transformPercent+"%, 0px)")}})}}if(this.isMobile()===false){scroll(init_parallax);$(window).on("scroll",function(){scroll(init_parallax)})}},setup_ytp:function(){if(this.isMobile()||$().mb_YTPlayer===undefined){return}$(".lsow-section-bg-youtube").mb_YTPlayer({startAt:0,showYTLogo:false,showControls:false,autoPlay:true,mute:true,containment:"self"})}};LSOW_Frontend.init()})})(jQuery)}
freemius/.codeclimate.yml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ engines:
2
+ phpcodesniffer:
3
+ enabled: true
4
+ config:
5
+ standard: "WordPress"
6
+ checks:
7
+ Squiz Commenting InlineComment InvalidEndChar:
8
+ enabled: false
9
+ Squiz Commenting InlineComment SpacingBefore:
10
+ enabled: false
11
+ Squiz Commenting InlineComment WrongStyle:
12
+ enabled: false
13
+ Generic Commenting DocComment MissingShort:
14
+ enabled: false
15
+ Generic WhiteSpace ScopeIndent IncorrectExact:
16
+ enabled: false
17
+ ratings:
18
+ paths:
19
+ - "**.php"
freemius/.travis.yml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ sudo: false
2
+
3
+ language: php
4
+
5
+ php:
6
+ - 5.3
7
+ - 5.4
8
+ - 5.5
9
+ - 5.6
10
+ - 7.0
11
+ - hhvm
freemius/assets/img/addons-for-beaver-builder.png ADDED
Binary file
freemius/assets/js/postmessage.min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function($,undef){var global=this;global.FS=global.FS||{};global.FS.PostMessage=function(){var _is_child=false,_postman=new NoJQueryPostMessageMixin("postMessage","receiveMessage"),_callbacks={},_base_url,_parent_url=decodeURIComponent(document.location.hash.replace(/^#/,"")),_parent_subdomain=_parent_url.substring(0,_parent_url.indexOf("/","https://"===_parent_url.substring(0,"https://".length)?8:7)),_init=function(){_postman.receiveMessage(function(e){var data=JSON.parse(e.data);if(_callbacks[data.type]){for(var i=0;i<_callbacks[data.type].length;i++){_callbacks[data.type][i](data.data)}}},_base_url)},_hasParent=""!==_parent_url,$window=$(window),$html=$("html");return{init:function(url,iframes){_base_url=url;_init();FS.PostMessage.receiveOnce("forward",function(data){window.location=data.url});iframes=iframes||[];if(iframes.length>0){$window.on("scroll",function(){for(var i=0;i<iframes.length;i++){FS.PostMessage.postScroll(iframes[i])}})}},init_child:function(){this.init(_parent_subdomain);_is_child=true;$(window).bind("load",function(){FS.PostMessage.postHeight();FS.PostMessage.post("loaded")})},hasParent:function(){return _hasParent},postHeight:function(diff,wrapper){diff=diff||0;wrapper=wrapper||"#wrap_section";this.post("height",{height:diff+$(wrapper).outerHeight(true)})},postScroll:function(iframe){this.post("scroll",{top:$window.scrollTop(),height:$window.height()-parseFloat($html.css("paddingTop"))-parseFloat($html.css("marginTop"))},iframe)},post:function(type,data,iframe){console.debug("PostMessage.post",type);if(iframe){_postman.postMessage(JSON.stringify({type:type,data:data}),iframe.src,iframe.contentWindow)}else{_postman.postMessage(JSON.stringify({type:type,data:data}),_parent_url,window.parent)}},receive:function(type,callback){console.debug("PostMessage.receive",type);if(undef===_callbacks[type])_callbacks[type]=[];_callbacks[type].push(callback)},receiveOnce:function(type,callback){if(this.is_set(type))return;this.receive(type,callback)},is_set:function(type){return undef!=_callbacks[type]},parent_url:function(){return _parent_url},parent_subdomain:function(){return _parent_subdomain}}}()})(jQuery);
freemius/composer.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "freemius/wordpress-sdk",
3
+ "description": "Freemius WordPress SDK",
4
+ "keywords": ["freemius", "wordpress", "plugin", "sdk"],
5
+ "homepage": "https://freemius.com",
6
+ "license": "GPL-3.0-only",
7
+ "require": {
8
+ "php": ">=5.2"
9
+ }
10
+ }
freemius/gulpfile.js ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var gulp = require('gulp');
2
+ var path = require('path');
3
+ var filesystem = require('fs');
4
+ var wpPot = require('gulp-wp-pot');
5
+ var gettext = require('gulp-gettext');
6
+ var sort = require('gulp-sort');
7
+ var pofill = require('gulp-pofill');
8
+ var rename = require('gulp-rename');
9
+ var clean = require('gulp-clean');
10
+
11
+ var languagesFolder = './languages/';
12
+
13
+ var options = require('./transifex-config.json');
14
+
15
+ function getFolders(dir) {
16
+ return filesystem.readdirSync(dir)
17
+ .filter(function (file) {
18
+ return filesystem.statSync(path.join(dir, file)).isDirectory();
19
+ });
20
+ }
21
+
22
+ var transifex = require('gulp-transifex').createClient(options);
23
+
24
+ // Create POT out of i18n.php.
25
+ gulp.task('prepare-source', function () {
26
+ gulp.src('**/*.php')
27
+ .pipe(sort())
28
+ .pipe(wpPot({
29
+ destFile : 'freemius.pot',
30
+ package : 'freemius',
31
+ bugReport : 'https://github.com/Freemius/wordpress-sdk/issues',
32
+ lastTranslator : 'Vova Feldman <vova@freemius.com>',
33
+ team : 'Freemius Team <admin@freemius.com>',
34
+ /*gettextMethods: {
35
+ instances: ['this', '_fs'],
36
+ methods: [
37
+ 'get_text_inline'
38
+ ]
39
+ },*/
40
+ gettextFunctions: [
41
+ {name: 'get_text_inline'},
42
+
43
+ {name: 'fs_text_inline'},
44
+ {name: 'fs_echo_inline'},
45
+ {name: 'fs_esc_js_inline'},
46
+ {name: 'fs_esc_attr_inline'},
47
+ {name: 'fs_esc_attr_echo_inline'},
48
+ {name: 'fs_esc_html_inline'},
49
+ {name: 'fs_esc_html_echo_inline'},
50
+
51
+ {name: 'get_text_x_inline', context: 2},
52
+ {name: 'fs_text_x_inline', context: 2},
53
+ {name: 'fs_echo_x_inline', context: 2},
54
+ {name: 'fs_esc_attr_x_inline', context: 2},
55
+ {name: 'fs_esc_js_x_inline', context: 2},
56
+ {name: 'fs_esc_js_echo_x_inline', context: 2},
57
+ {name: 'fs_esc_html_x_inline', context: 2},
58
+ {name: 'fs_esc_html_echo_x_inline', context: 2}
59
+ /*,
60
+
61
+
62
+ {name: '_fs_text'},
63
+ {name: '_fs_x', context: 2},
64
+ {name: '_fs_echo'},
65
+ {name: '_fs_esc_attr'},
66
+ {name: '_fs_esc_attr_echo'},
67
+ {name: '_fs_esc_html'},
68
+ {name: '_fs_esc_html_echo'},
69
+ {name: '_fs_ex', context: 2},
70
+ {name: '_fs_esc_attr_x', context: 2},
71
+ {name: '_fs_esc_html_x', context: 2},
72
+
73
+ {name: '_fs_n', plural: 2},
74
+ {name: '_fs_n_noop', plural: 2},
75
+ {name: '_fs_nx', plural: 2, context: 4},
76
+ {name: '_fs_nx_noop', plural: 2, context: 3}*/
77
+ ]
78
+ }))
79
+ .pipe(gulp.dest(languagesFolder + 'freemius.pot'));
80
+
81
+ // Create English PO out of the POT.
82
+ return gulp.src(languagesFolder + 'freemius.pot')
83
+ .pipe(pofill({
84
+ items: function (item) {
85
+ // If msgstr is empty, use identity translation
86
+ if (!item.msgstr.length) {
87
+ item.msgstr = [''];
88
+ }
89
+ if (!item.msgstr[0]) {
90
+ item.msgstr[0] = item.msgid;
91
+ }
92
+ return item;
93
+ }
94
+ }))
95
+ .pipe(rename('freemius-en.po'))
96
+ .pipe(gulp.dest(languagesFolder));
97
+ });
98
+
99
+ // Push updated po resource to transifex.
100
+ gulp.task('update-transifex', ['prepare-source'], function () {
101
+ return gulp.src(languagesFolder + 'freemius-en.po')
102
+ .pipe(transifex.pushResource());
103
+ });
104
+
105
+ // Download latest *.po translations.
106
+ gulp.task('download-translations', ['update-transifex'], function () {
107
+ return gulp.src(languagesFolder + 'freemius-en.po')
108
+ .pipe(transifex.pullResource());
109
+ });
110
+
111
+ // Move translations to languages root.
112
+ gulp.task('prepare-translations', ['download-translations'], function () {
113
+ var folders = getFolders(languagesFolder);
114
+
115
+ return folders.map(function (folder) {
116
+ return gulp.src(path.join(languagesFolder, folder, 'freemius-en.po'))
117
+ .pipe(rename('freemius-' + folder + '.po'))
118
+ .pipe(gulp.dest(languagesFolder));
119
+ });
120
+ });
121
+
122
+ // Feel up empty translations with English.
123
+ gulp.task('translations-feelup', ['prepare-translations'], function () {
124
+ return gulp.src(languagesFolder + '*.po')
125
+ .pipe(pofill({
126
+ items: function (item) {
127
+ // If msgstr is empty, use identity translation
128
+ if (0 == item.msgstr.length) {
129
+ item.msgstr = [''];
130
+ }
131
+ if (0 == item.msgstr[0].length) {
132
+ // item.msgid[0] = item.msgid;
133
+ item.msgstr[0] = item.msgid;
134
+ }
135
+ return item;
136
+ }
137
+ }))
138
+ .pipe(gulp.dest(languagesFolder));
139
+ });
140
+
141
+ // Cleanup temporary translation folders.
142
+ gulp.task('cleanup', ['prepare-translations'], function () {
143
+ var folders = getFolders(languagesFolder);
144
+
145
+ return folders.map(function (folder) {
146
+ return gulp.src(path.join(languagesFolder, folder), {read: false})
147
+ .pipe(clean());
148
+ });
149
+ });
150
+
151
+ // Compile *.po to *.mo binaries for usage.
152
+ gulp.task('compile-translations', ['translations-feelup'], function () {
153
+ // Compile POs to MOs.
154
+ return gulp.src(languagesFolder + '*.po')
155
+ .pipe(gettext())
156
+ .pipe(gulp.dest(languagesFolder))
157
+ });
158
+
159
+ gulp.task('default', [], function () {
160
+ gulp.run('prepare-source');
161
+ gulp.run('update-transifex');
162
+ gulp.run('download-translations');
163
+ gulp.run('prepare-translations');
164
+ gulp.run('translations-feelup');
165
+ gulp.run('cleanup');
166
+ gulp.run('compile-translations');
167
+ });
freemius/gulpfile.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var gulp=require("gulp");var path=require("path");var filesystem=require("fs");var wpPot=require("gulp-wp-pot");var gettext=require("gulp-gettext");var sort=require("gulp-sort");var pofill=require("gulp-pofill");var rename=require("gulp-rename");var clean=require("gulp-clean");var languagesFolder="./languages/";var options=require("./transifex-config.json");function getFolders(dir){return filesystem.readdirSync(dir).filter(function(file){return filesystem.statSync(path.join(dir,file)).isDirectory()})}var transifex=require("gulp-transifex").createClient(options);gulp.task("prepare-source",function(){gulp.src("**/*.php").pipe(sort()).pipe(wpPot({destFile:"freemius.pot",package:"freemius",bugReport:"https://github.com/Freemius/wordpress-sdk/issues",lastTranslator:"Vova Feldman <vova@freemius.com>",team:"Freemius Team <admin@freemius.com>",gettextFunctions:[{name:"get_text_inline"},{name:"fs_text_inline"},{name:"fs_echo_inline"},{name:"fs_esc_js_inline"},{name:"fs_esc_attr_inline"},{name:"fs_esc_attr_echo_inline"},{name:"fs_esc_html_inline"},{name:"fs_esc_html_echo_inline"},{name:"get_text_x_inline",context:2},{name:"fs_text_x_inline",context:2},{name:"fs_echo_x_inline",context:2},{name:"fs_esc_attr_x_inline",context:2},{name:"fs_esc_js_x_inline",context:2},{name:"fs_esc_js_echo_x_inline",context:2},{name:"fs_esc_html_x_inline",context:2},{name:"fs_esc_html_echo_x_inline",context:2}]})).pipe(gulp.dest(languagesFolder+"freemius.pot"));return gulp.src(languagesFolder+"freemius.pot").pipe(pofill({items:function(item){if(!item.msgstr.length){item.msgstr=[""]}if(!item.msgstr[0]){item.msgstr[0]=item.msgid}return item}})).pipe(rename("freemius-en.po")).pipe(gulp.dest(languagesFolder))});gulp.task("update-transifex",["prepare-source"],function(){return gulp.src(languagesFolder+"freemius-en.po").pipe(transifex.pushResource())});gulp.task("download-translations",["update-transifex"],function(){return gulp.src(languagesFolder+"freemius-en.po").pipe(transifex.pullResource())});gulp.task("prepare-translations",["download-translations"],function(){var folders=getFolders(languagesFolder);return folders.map(function(folder){return gulp.src(path.join(languagesFolder,folder,"freemius-en.po")).pipe(rename("freemius-"+folder+".po")).pipe(gulp.dest(languagesFolder))})});gulp.task("translations-feelup",["prepare-translations"],function(){return gulp.src(languagesFolder+"*.po").pipe(pofill({items:function(item){if(0==item.msgstr.length){item.msgstr=[""]}if(0==item.msgstr[0].length){item.msgstr[0]=item.msgid}return item}})).pipe(gulp.dest(languagesFolder))});gulp.task("cleanup",["prepare-translations"],function(){var folders=getFolders(languagesFolder);return folders.map(function(folder){return gulp.src(path.join(languagesFolder,folder),{read:false}).pipe(clean())})});gulp.task("compile-translations",["translations-feelup"],function(){return gulp.src(languagesFolder+"*.po").pipe(gettext()).pipe(gulp.dest(languagesFolder))});gulp.task("default",[],function(){gulp.run("prepare-source");gulp.run("update-transifex");gulp.run("download-translations");gulp.run("prepare-translations");gulp.run("translations-feelup");gulp.run("cleanup");gulp.run("compile-translations")});
freemius/includes/class-freemius.php CHANGED
@@ -2630,26 +2630,28 @@
2630
  self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
2631
 
2632
  if ( is_multisite() ) {
 
 
 
 
 
 
 
2633
  /**
2634
- * If the id_slug_type_path_map exists on the site level but doesn't exist on the
2635
  * network level storage, it means that we need to process the storage with migration.
2636
  *
2637
- * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, id_slug_type_path_map will be already set in the network level storage.
2638
  *
2639
  * @author Vova Feldman (@svovaf)
2640
  * @since 2.0.0
2641
  */
2642
- if ( null === self::$_accounts->get_option( 'id_slug_type_path_map', null, true ) &&
2643
- null !== self::$_accounts->get_option( 'id_slug_type_path_map', null, false )
 
 
2644
  ) {
2645
- self::migrate_accounts_to_network();
2646
-
2647
- // Migrate API options from site level to network level.
2648
- $api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
2649
- $api_network_options->migrate_to_network();
2650
-
2651
- // Migrate API cache to network level storage.
2652
- FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
2653
  }
2654
  }
2655
 
@@ -2679,6 +2681,24 @@
2679
  self::$_statics_loaded = true;
2680
  }
2681
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2682
  #----------------------------------------------------------------------------------
2683
  #region Localization
2684
  #----------------------------------------------------------------------------------
@@ -2905,6 +2925,10 @@
2905
  }
2906
 
2907
  fs_redirect( $download_url );
 
 
 
 
2908
  }
2909
  }
2910
 
@@ -5987,7 +6011,7 @@
5987
  * @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
5988
  */
5989
  private function schedule_install_sync( $except_blog_id = 0 ) {
5990
- $this->schedule_cron( 'install_sync', 'install_sync', 'single', 0, false, $except_blog_id );
5991
  }
5992
 
5993
  /**
@@ -10574,7 +10598,7 @@
10574
  return;
10575
  }
10576
 
10577
- if ( ! $this->is_premium() || $this->has_active_valid_license() ) {
10578
  // This is relevant only to the free versions and premium versions without an active license.
10579
  return;
10580
  }
@@ -15590,7 +15614,8 @@
15590
  return;
15591
  }
15592
 
15593
- $encrypted_site = clone ( is_object( $site ) ? $site : $this->_site );
 
15594
 
15595
  $sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
15596
 
@@ -16288,14 +16313,62 @@
16288
  * @since 1.2.1
16289
  */
16290
  function has_active_valid_license() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16291
  return (
16292
- is_object( $this->_license ) &&
16293
- is_numeric( $this->_license->id ) &&
16294
- $this->_license->is_active() &&
16295
- $this->_license->is_valid()
16296
  );
16297
  }
16298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16299
  /**
16300
  * Check if site assigned with license with enabled features.
16301
  *
@@ -17289,7 +17362,7 @@
17289
  * @return bool
17290
  */
17291
  private function _can_download_premium() {
17292
- return $this->has_active_valid_license() ||
17293
  ( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
17294
  }
17295
 
@@ -18442,7 +18515,15 @@
18442
  $this->_logger->entrance();
18443
 
18444
  $vars = array( 'id' => $this->_module_id );
18445
- fs_require_once_template( 'contact.php', $vars );
 
 
 
 
 
 
 
 
18446
  }
18447
 
18448
  #endregion ------------------------------------------------------------------------
@@ -18748,14 +18829,14 @@
18748
 
18749
  // Show promotion if never shown before and 24 hours after initial activation with FS.
18750
  if ( ! $was_promotion_shown_before &&
18751
- $this->_storage->install_timestamp > ( time() - WP_FS__TIME_24_HOURS_IN_SEC )
18752
  ) {
18753
  return false;
18754
  }
18755
 
18756
  // OR if promotion was shown before, try showing it every 30 days.
18757
  if ( $was_promotion_shown_before &&
18758
- 30 * WP_FS__TIME_24_HOURS_IN_SEC > time() - $last_time_trial_promotion_shown
18759
  ) {
18760
  return false;
18761
  }
2630
  self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
2631
 
2632
  if ( is_multisite() ) {
2633
+ $has_skipped_migration = (
2634
+ // 'id_slug_type_path_map' - was never stored on older versions, therefore, not exists on the site level.
2635
+ null === self::$_accounts->get_option( 'id_slug_type_path_map', null, false ) &&
2636
+ // 'file_slug_map' stored on the site level, so it was running an SDK version before it was integrated with MS-network.
2637
+ null !== self::$_accounts->get_option( 'file_slug_map', null, false )
2638
+ );
2639
+
2640
  /**
2641
+ * If the file_slug_map exists on the site level but doesn't exist on the
2642
  * network level storage, it means that we need to process the storage with migration.
2643
  *
2644
+ * The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, file_slug_map will be already set in the network level storage.
2645
  *
2646
  * @author Vova Feldman (@svovaf)
2647
  * @since 2.0.0
2648
  */
2649
+ if (
2650
+ ( $has_skipped_migration && true !== self::$_accounts->get_option( 'ms_migration_complete', false, true ) ) ||
2651
+ ( null === self::$_accounts->get_option( 'file_slug_map', null, true ) &&
2652
+ null !== self::$_accounts->get_option( 'file_slug_map', null, false ) )
2653
  ) {
2654
+ self::migrate_options_to_network();
 
 
 
 
 
 
 
2655
  }
2656
  }
2657
 
2681
  self::$_statics_loaded = true;
2682
  }
2683
 
2684
+ /**
2685
+ * @author Leo Fajardo (@leorw)
2686
+ *
2687
+ * @since 2.1.3
2688
+ */
2689
+ private static function migrate_options_to_network() {
2690
+ self::migrate_accounts_to_network();
2691
+
2692
+ // Migrate API options from site level to network level.
2693
+ $api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
2694
+ $api_network_options->migrate_to_network();
2695
+
2696
+ // Migrate API cache to network level storage.
2697
+ FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
2698
+
2699
+ self::$_accounts->set_option( 'ms_migration_complete', true, true );
2700
+ }
2701
+
2702
  #----------------------------------------------------------------------------------
2703
  #region Localization
2704
  #----------------------------------------------------------------------------------
2925
  }
2926
 
2927
  fs_redirect( $download_url );
2928
+ } else if ( fs_request_is_action( 'migrate_options_to_network' ) ) {
2929
+ check_admin_referer( 'migrate_options_to_network' );
2930
+
2931
+ self::migrate_options_to_network();
2932
  }
2933
  }
2934
 
6011
  * @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
6012
  */
6013
  private function schedule_install_sync( $except_blog_id = 0 ) {
6014
+ $this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
6015
  }
6016
 
6017
  /**
10598
  return;
10599
  }
10600
 
10601
+ if ( ! $this->is_premium() || $this->has_any_active_valid_license() ) {
10602
  // This is relevant only to the free versions and premium versions without an active license.
10603
  return;
10604
  }
15614
  return;
15615
  }
15616
 
15617
+ $site_clone = is_object( $site ) ? $site : $this->_site;
15618
+ $encrypted_site = clone $site_clone;
15619
 
15620
  $sites = self::get_all_sites( $this->_module_type, $network_level_or_blog_id );
15621
 
16313
  * @since 1.2.1
16314
  */
16315
  function has_active_valid_license() {
16316
+ return self::is_active_valid_license( $this->_license );
16317
+ }
16318
+
16319
+ /**
16320
+ * Check if a given license is active & valid (not expired).
16321
+ *
16322
+ * @author Vova Feldman (@svovaf)
16323
+ * @since 2.1.3
16324
+ *
16325
+ * @param FS_Plugin_License $license
16326
+ *
16327
+ * @return bool
16328
+ */
16329
+ private static function is_active_valid_license( $license ) {
16330
  return (
16331
+ is_object( $license ) &&
16332
+ FS_Plugin_License::is_valid_id( $license->id ) &&
16333
+ $license->is_active() &&
16334
+ $license->is_valid()
16335
  );
16336
  }
16337
 
16338
+ /**
16339
+ * Checks if there's any site that is associated with an active & valid license.
16340
+ * This logic is used to determine if the admin can download the premium code base from a network level admin.
16341
+ *
16342
+ * @author Vova Feldman (@svovaf)
16343
+ * @since 2.1.3
16344
+ *
16345
+ * @return bool
16346
+ */
16347
+ function has_any_active_valid_license() {
16348
+ if ( ! fs_is_network_admin() ) {
16349
+ return $this->has_active_valid_license();
16350
+ }
16351
+
16352
+ $installs = $this->get_blog_install_map();
16353
+ $all_plugin_licenses = self::get_all_licenses( $this->_module_id );
16354
+
16355
+ foreach ( $installs as $blog_id => $install ) {
16356
+ if ( ! FS_Plugin_License::is_valid_id( $install->license_id ) ) {
16357
+ continue;
16358
+ }
16359
+
16360
+ foreach ( $all_plugin_licenses as $license ) {
16361
+ if ( $license->id == $install->license_id ) {
16362
+ if ( self::is_active_valid_license( $license ) ) {
16363
+ return true;
16364
+ }
16365
+ }
16366
+ }
16367
+ }
16368
+
16369
+ return false;
16370
+ }
16371
+
16372
  /**
16373
  * Check if site assigned with license with enabled features.
16374
  *
17362
  * @return bool
17363
  */
17364
  private function _can_download_premium() {
17365
+ return $this->has_any_active_valid_license() ||
17366
  ( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
17367
  }
17368
 
18515
  $this->_logger->entrance();
18516
 
18517
  $vars = array( 'id' => $this->_module_id );
18518
+
18519
+ /**
18520
+ * Added filter to the template to allow developers wrapping the template
18521
+ * in custom HTML (e.g. within a wizard/tabs).
18522
+ *
18523
+ * @author Vova Feldman (@svovaf)
18524
+ * @since 2.1.3
18525
+ */
18526
+ echo $this->apply_filters( 'templates/contact.php', fs_get_template( 'contact.php', $vars ) );
18527
  }
18528
 
18529
  #endregion ------------------------------------------------------------------------
18829
 
18830
  // Show promotion if never shown before and 24 hours after initial activation with FS.
18831
  if ( ! $was_promotion_shown_before &&
18832
+ $this->_storage->install_timestamp > ( time() - $this->apply_filters( 'show_first_trial_after_n_sec', WP_FS__TIME_24_HOURS_IN_SEC ) )
18833
  ) {
18834
  return false;
18835
  }
18836
 
18837
  // OR if promotion was shown before, try showing it every 30 days.
18838
  if ( $was_promotion_shown_before &&
18839
+ $this->apply_filters( 'reshow_trial_after_every_n_sec', 30 * WP_FS__TIME_24_HOURS_IN_SEC ) > time() - $last_time_trial_promotion_shown
18840
  ) {
18841
  return false;
18842
  }
freemius/includes/class-fs-plugin-updater.php CHANGED
@@ -82,7 +82,7 @@
82
 
83
  $this->add_transient_filters();
84
 
85
- if ( ! $this->_fs->has_active_valid_license() ) {
86
  /**
87
  * If user has the premium plugin's code but do NOT have an active license,
88
  * encourage him to upgrade by showing that there's a new release, but instead
@@ -114,7 +114,7 @@
114
  add_filter( 'upgrader_post_install', array( &$this, '_maybe_update_folder_name' ), 10, 3 );
115
  }
116
 
117
- if ( ! $this->_fs->has_active_valid_license() ) {
118
  add_filter( 'wp_prepare_themes_for_js', array( &$this, 'change_theme_update_info_html' ), 10, 1 );
119
  }
120
  }
82
 
83
  $this->add_transient_filters();
84
 
85
+ if ( ! $this->_fs->has_any_active_valid_license() ) {
86
  /**
87
  * If user has the premium plugin's code but do NOT have an active license,
88
  * encourage him to upgrade by showing that there's a new release, but instead
114
  add_filter( 'upgrader_post_install', array( &$this, '_maybe_update_folder_name' ), 10, 3 );
115
  }
116
 
117
+ if ( ! $this->_fs->has_any_active_valid_license() ) {
118
  add_filter( 'wp_prepare_themes_for_js', array( &$this, 'change_theme_update_info_html' ), 10, 1 );
119
  }
120
  }
freemius/includes/entities/class-fs-site.php CHANGED
@@ -150,6 +150,7 @@
150
  fs_starts_with( $subdomain, 'local.' ) ||
151
  fs_starts_with( $subdomain, 'dev.' ) ||
152
  fs_starts_with( $subdomain, 'test.' ) ||
 
153
  fs_starts_with( $subdomain, 'staging.' ) ||
154
 
155
  // Ends with.
@@ -171,7 +172,9 @@
171
  ( fs_ends_with($subdomain, 'pantheonsite.io') &&
172
  (fs_starts_with($subdomain, 'test-') || fs_starts_with($subdomain, 'dev-'))) ||
173
  // Cloudways
174
- fs_ends_with( $subdomain, '.cloudwaysapps.com' )
 
 
175
  );
176
  }
177
 
150
  fs_starts_with( $subdomain, 'local.' ) ||
151
  fs_starts_with( $subdomain, 'dev.' ) ||
152
  fs_starts_with( $subdomain, 'test.' ) ||
153
+ fs_starts_with( $subdomain, 'stage.' ) ||
154
  fs_starts_with( $subdomain, 'staging.' ) ||
155
 
156
  // Ends with.
172
  ( fs_ends_with($subdomain, 'pantheonsite.io') &&
173
  (fs_starts_with($subdomain, 'test-') || fs_starts_with($subdomain, 'dev-'))) ||
174
  // Cloudways
175
+ fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
176
+ // Kinsta
177
+ (fs_ends_with($subdomain, '.kinsta.com') && fs_starts_with($subdomain, 'staging-'))
178
  );
179
  }
180
 
freemius/includes/fs-plugin-info-dialog.php CHANGED
@@ -203,7 +203,7 @@
203
 
204
  if ( is_object( $latest ) ) {
205
  $data->version = $latest->version;
206
- $data->last_updated = ! is_null( $latest->updated ) ? $latest->updated : $latest->created;
207
  $data->requires = $latest->requires_platform_version;
208
  $data->tested = $latest->tested_up_to_version;
209
  } else {
203
 
204
  if ( is_object( $latest ) ) {
205
  $data->version = $latest->version;
206
+ $data->last_updated = $latest->created;
207
  $data->requires = $latest->requires_platform_version;
208
  $data->tested = $latest->tested_up_to_version;
209
  } else {
freemius/package.json CHANGED
@@ -4,7 +4,7 @@
4
  "author": "Freemius, Inc.",
5
  "license": "GPL-3.0",
6
  "homepage": "https://freemius.com",
7
- "version": "1.2.3",
8
  "main": "gulpfile.js",
9
  "dependencies": {},
10
  "scripts": {
4
  "author": "Freemius, Inc.",
5
  "license": "GPL-3.0",
6
  "homepage": "https://freemius.com",
7
+ "version": "2.1.2",
8
  "main": "gulpfile.js",
9
  "dependencies": {},
10
  "scripts": {
freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '2.1.1';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '2.1.3';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
freemius/templates/connect.php CHANGED
@@ -253,6 +253,17 @@
253
  <a class="show-license-resend-modal show-license-resend-modal-<?php echo $fs->get_unique_affix() ?>"
254
  href="#"><?php fs_esc_html_echo_inline( "Can't find your license key?", 'cant-find-license-key', $slug ); ?></a>
255
  </div>
 
 
 
 
 
 
 
 
 
 
 
256
  <?php
257
  $send_updates_text = sprintf(
258
  '%s<span class="action-description"> - %s</span>',
253
  <a class="show-license-resend-modal show-license-resend-modal-<?php echo $fs->get_unique_affix() ?>"
254
  href="#"><?php fs_esc_html_echo_inline( "Can't find your license key?", 'cant-find-license-key', $slug ); ?></a>
255
  </div>
256
+
257
+ <?php
258
+ /**
259
+ * Allows developers to include custom HTML after the license input container.
260
+ *
261
+ * @author Vova Feldman
262
+ * @since 2.1.2
263
+ */
264
+ $fs->do_action( 'connect/after_license_input' );
265
+ ?>
266
+
267
  <?php
268
  $send_updates_text = sprintf(
269
  '%s<span class="action-description"> - %s</span>',
freemius/templates/debug.php CHANGED
@@ -86,6 +86,16 @@
86
  <button class="button button-primary"><?php fs_esc_html_echo_inline( 'Sync Data From Server' ) ?></button>
87
  </form>
88
  </td>
 
 
 
 
 
 
 
 
 
 
89
  <td>
90
  <button id="fs_load_db_option" class="button"><?php fs_esc_html_echo_inline( 'Load DB Option' ) ?></button>
91
  </td>
86
  <button class="button button-primary"><?php fs_esc_html_echo_inline( 'Sync Data From Server' ) ?></button>
87
  </form>
88
  </td>
89
+ <?php if ( fs_is_network_admin() && true !== $fs_options->get_option( 'ms_migration_complete', false, true ) ) : ?>
90
+ <td>
91
+ <!-- Migrate Options to Network -->
92
+ <form action="" method="POST">
93
+ <input type="hidden" name="fs_action" value="migrate_options_to_network">
94
+ <?php wp_nonce_field( 'migrate_options_to_network' ) ?>
95
+ <button class="button button-primary"><?php fs_esc_html_echo_inline( 'Migrate Options to Network' ) ?></button>
96
+ </form>
97
+ </td>
98
+ <?php endif ?>
99
  <td>
100
  <button id="fs_load_db_option" class="button"><?php fs_esc_html_echo_inline( 'Load DB Option' ) ?></button>
101
  </td>
freemius/templates/forms/deactivation/form.php CHANGED
@@ -94,7 +94,7 @@ HTML;
94
  isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
95
  otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
96
  dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
97
- deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_active_valid_license() ? 'true' : 'false' ?>;
98
 
99
  $modal.appendTo($('body'));
100
 
94
  isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
95
  otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
96
  dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
97
+ deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>;
98
 
99
  $modal.appendTo($('body'));
100
 
includes/helper-functions.php CHANGED
@@ -30,6 +30,26 @@ function lsow_get_terms( $taxonomy )
30
  return $term_coll;
31
  }
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  function lsow_get_chosen_terms( $query_args )
34
  {
35
  $chosen_terms = array();
@@ -64,27 +84,8 @@ function lsow_get_chosen_terms( $query_args )
64
 
65
  // Remove duplicates
66
  $taxonomies = array_unique( $taxonomies );
67
- return array( $chosen_terms, $taxonomies );
68
- }
69
-
70
- function lsow_entry_terms_list(
71
- $taxonomy = 'category',
72
- $separator = ', ',
73
- $before = ' ',
74
- $after = ' '
75
- )
76
- {
77
- global $post ;
78
- $output = '<span class="lsow-' . $taxonomy . '-list">';
79
- $output .= get_the_term_list(
80
- $post->ID,
81
- $taxonomy,
82
- $before,
83
- $separator,
84
- $after
85
- );
86
- $output .= '</span>';
87
- return $output;
88
  }
89
 
90
  function lsow_get_taxonomy_info( $taxonomy )
@@ -105,7 +106,7 @@ function lsow_get_taxonomy_info( $taxonomy )
105
  $output .= '</span>';
106
  }
107
 
108
- return $output;
109
  }
110
 
111
  function lsow_get_info_for_taxonomies( $taxonomies )
@@ -114,7 +115,18 @@ function lsow_get_info_for_taxonomies( $taxonomies )
114
  foreach ( $taxonomies as $taxonomy ) {
115
  $output .= lsow_get_taxonomy_info( $taxonomy );
116
  }
117
- return $output;
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
  function lsow_entry_published( $format = null )
@@ -123,56 +135,15 @@ function lsow_entry_published( $format = null )
123
  $format = get_option( 'date_format' );
124
  }
125
  $published = '<span class="published"><abbr title="' . sprintf( get_the_time( esc_html__( 'l, F, Y, g:i a', 'livemesh-so-widgets' ) ) ) . '">' . sprintf( get_the_time( $format ) ) . '</abbr></span>';
126
- return $published;
127
  $link = '<span class="published">' . '<a href="' . get_day_link( get_the_time( esc_html__( 'Y', 'livemesh-so-widgets' ) ), get_the_time( esc_html__( 'm', 'livemesh-so-widgets' ) ), get_the_time( esc_html__( 'd', 'livemesh-so-widgets' ) ) ) . '" title="' . sprintf( get_the_time( esc_html__( 'l, F, Y, g:i a', 'livemesh-so-widgets' ) ) ) . '">' . '<span class="updated">' . get_the_time( $format ) . '</span>' . '</a></span>';
128
- return $link;
129
  }
130
 
131
  function lsow_entry_author()
132
  {
133
  $author = '<span class="author vcard">' . esc_html__( 'By ', 'livemesh-so-widgets' ) . '<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a></span>';
134
- return $author;
135
- }
136
-
137
- function lsow_read_more()
138
- {
139
- $output = '<div class="lsow-read-more">';
140
- $output .= '<a href="' . get_the_permalink() . '">' . esc_html__( 'Read more', 'livemesh-so-widgets' ) . '</a>';
141
- $output .= '</div>';
142
- return $output;
143
- }
144
-
145
- /** Isotope filtering support for Portfolio pages * */
146
- function lsow_get_taxonomy_terms_filter( $taxonomies, $chosen_terms = array() )
147
- {
148
- $output = '';
149
-
150
- if ( empty($chosen_terms) ) {
151
- global $wp_version ;
152
-
153
- if ( version_compare( $wp_version, '4.5', '>=' ) ) {
154
- $terms = get_terms( $taxonomies );
155
- } else {
156
- $terms = get_terms( $taxonomies[0] );
157
- }
158
-
159
- } else {
160
- $terms = $chosen_terms;
161
- }
162
-
163
-
164
- if ( !empty($terms) && !is_wp_error( $terms ) ) {
165
- $output .= '<div class="lsow-taxonomy-filter">';
166
- $output .= '<div class="lsow-filter-item segment-0 lsow-active"><a data-value="*" href="#">' . esc_html__( 'All', 'livemesh-so-widgets' ) . '</a></div>';
167
- $segment_count = 1;
168
- foreach ( $terms as $term ) {
169
- $output .= '<div class="lsow-filter-item segment-' . intval( $segment_count ) . '"><a href="#" data-value=".term-' . intval( $term->term_id ) . '" title="' . esc_html__( 'View all items filed under ', 'livemesh-so-widgets' ) . esc_attr( $term->name ) . '">' . esc_html( $term->name ) . '</a></div>';
170
- $segment_count++;
171
- }
172
- $output .= '</div>';
173
- }
174
-
175
- return $output;
176
  }
177
 
178
  /* Return the css class name to help achieve the number of columns specified for mobile resolution */
@@ -184,7 +155,12 @@ function lsow_get_grid_classes( $settings, $columns_field = 'per_line' )
184
  $grid_classes .= $settings[$columns_field . '_tablet'];
185
  $grid_classes .= ' lsow-grid-mobile-';
186
  $grid_classes .= $settings[$columns_field . '_mobile'];
187
- return $grid_classes;
 
 
 
 
 
188
  }
189
 
190
  /*
@@ -206,17 +182,6 @@ function lsow_to_boolean( $value )
206
  // Make sure you do not touch the value if the value is not a string
207
  }
208
 
209
- // get all registered taxonomies
210
- function lsow_get_taxonomies_map()
211
- {
212
- $map = array();
213
- $taxonomies = get_taxonomies();
214
- foreach ( $taxonomies as $taxonomy ) {
215
- $map[$taxonomy] = $taxonomy;
216
- }
217
- return $map;
218
- }
219
-
220
  /**
221
  * Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7
222
  * @param str $hex Colour as hexadecimal (with or without hash);
@@ -255,7 +220,12 @@ function lsow_get_option( $option_name, $default = null )
255
  $option_value = $default;
256
  }
257
 
258
- return $option_value;
 
 
 
 
 
259
  }
260
 
261
  function lsow_update_option( $option_name, $option_value )
@@ -392,6 +362,52 @@ function lsow_get_sysinfo()
392
  return $return;
393
  }
394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  function lsow_get_animation_atts( $animation )
396
  {
397
  $animate_class = "";
@@ -438,15 +454,48 @@ function lsow_get_animation_atts( $animation )
438
  $animation_attr = ' data-animation="' . esc_attr( $animation ) . '"';
439
  }
440
 
441
- return array( $animate_class, $animation_attr );
 
442
  }
443
 
444
  function lsow_get_animation_options()
445
  {
446
- return array(
447
  'none' => __( 'None', 'livemesh-so-widgets' ),
448
  'fadeIn' => __( 'Fade In', 'livemesh-so-widgets' ),
449
  'fadeInLeft' => __( 'Fade In Left', 'livemesh-so-widgets' ),
450
  'fadeInRight' => __( 'Fade In Right', 'livemesh-so-widgets' ),
451
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
452
  }
30
  return $term_coll;
31
  }
32
 
33
+ function lsow_entry_terms_list(
34
+ $taxonomy = 'category',
35
+ $separator = ', ',
36
+ $before = ' ',
37
+ $after = ' '
38
+ )
39
+ {
40
+ global $post ;
41
+ $output = '<span class="lsow-' . $taxonomy . '-list">';
42
+ $output .= get_the_term_list(
43
+ $post->ID,
44
+ $taxonomy,
45
+ $before,
46
+ $separator,
47
+ $after
48
+ );
49
+ $output .= '</span>';
50
+ return $output;
51
+ }
52
+
53
  function lsow_get_chosen_terms( $query_args )
54
  {
55
  $chosen_terms = array();
84
 
85
  // Remove duplicates
86
  $taxonomies = array_unique( $taxonomies );
87
+ $return = array( $chosen_terms, $taxonomies );
88
+ return apply_filters( 'lsow_chosen_taxonomy_terms', $return, $query_args );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  }
90
 
91
  function lsow_get_taxonomy_info( $taxonomy )
106
  $output .= '</span>';
107
  }
108
 
109
+ return apply_filters( 'lsow_taxonomy_info', $output, $taxonomy );
110
  }
111
 
112
  function lsow_get_info_for_taxonomies( $taxonomies )
115
  foreach ( $taxonomies as $taxonomy ) {
116
  $output .= lsow_get_taxonomy_info( $taxonomy );
117
  }
118
+ return apply_filters( 'lsow_taxonomies_info', $output, $taxonomies );
119
+ }
120
+
121
+ // get all registered taxonomies
122
+ function lsow_get_taxonomies_map()
123
+ {
124
+ $map = array();
125
+ $taxonomies = get_taxonomies();
126
+ foreach ( $taxonomies as $taxonomy ) {
127
+ $map[$taxonomy] = $taxonomy;
128
+ }
129
+ return apply_filters( 'lsow_taxonomies_map', $map );
130
  }
131
 
132
  function lsow_entry_published( $format = null )
135
  $format = get_option( 'date_format' );
136
  }
137
  $published = '<span class="published"><abbr title="' . sprintf( get_the_time( esc_html__( 'l, F, Y, g:i a', 'livemesh-so-widgets' ) ) ) . '">' . sprintf( get_the_time( $format ) ) . '</abbr></span>';
138
+ return apply_filters( 'lsow_entry_published', $published, $format );
139
  $link = '<span class="published">' . '<a href="' . get_day_link( get_the_time( esc_html__( 'Y', 'livemesh-so-widgets' ) ), get_the_time( esc_html__( 'm', 'livemesh-so-widgets' ) ), get_the_time( esc_html__( 'd', 'livemesh-so-widgets' ) ) ) . '" title="' . sprintf( get_the_time( esc_html__( 'l, F, Y, g:i a', 'livemesh-so-widgets' ) ) ) . '">' . '<span class="updated">' . get_the_time( $format ) . '</span>' . '</a></span>';
140
+ return apply_filters( 'lsow_entry_published_link', $link, $format );
141
  }
142
 
143
  function lsow_entry_author()
144
  {
145
  $author = '<span class="author vcard">' . esc_html__( 'By ', 'livemesh-so-widgets' ) . '<a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author_meta( 'display_name' ) ) . '">' . esc_html( get_the_author_meta( 'display_name' ) ) . '</a></span>';
146
+ return apply_filters( 'lsow_entry_author', $author );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
  }
148
 
149
  /* Return the css class name to help achieve the number of columns specified for mobile resolution */
155
  $grid_classes .= $settings[$columns_field . '_tablet'];
156
  $grid_classes .= ' lsow-grid-mobile-';
157
  $grid_classes .= $settings[$columns_field . '_mobile'];
158
+ return apply_filters(
159
+ 'lsow_grid_classes',
160
+ $grid_classes,
161
+ $settings,
162
+ $columns_field
163
+ );
164
  }
165
 
166
  /*
182
  // Make sure you do not touch the value if the value is not a string
183
  }
184
 
 
 
 
 
 
 
 
 
 
 
 
185
  /**
186
  * Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7
187
  * @param str $hex Colour as hexadecimal (with or without hash);
220
  $option_value = $default;
221
  }
222
 
223
+ return apply_filters(
224
+ 'lsow_get_option',
225
+ $option_value,
226
+ $option_name,
227
+ $default
228
+ );
229
  }
230
 
231
  function lsow_update_option( $option_name, $option_value )
362
  return $return;
363
  }
364
 
365
+ /** Isotope filtering support for Portfolio pages **/
366
+ function lsow_get_taxonomy_terms_filter( $taxonomies, $chosen_terms = array() )
367
+ {
368
+ $output = '';
369
+ $terms = array();
370
+
371
+ if ( empty($chosen_terms) ) {
372
+ foreach ( $taxonomies as $taxonomy ) {
373
+ global $wp_version ;
374
+
375
+ if ( version_compare( $wp_version, '4.5', '>=' ) ) {
376
+ $taxonomy_terms = get_terms( array(
377
+ 'taxonomy' => $taxonomy,
378
+ ) );
379
+ } else {
380
+ $taxonomy_terms = get_terms( $taxonomy );
381
+ }
382
+
383
+ if ( !empty($taxonomy_terms) && !is_wp_error( $taxonomy_terms ) ) {
384
+ $terms = array_merge( $terms, $taxonomy_terms );
385
+ }
386
+ }
387
+ } else {
388
+ $terms = $chosen_terms;
389
+ }
390
+
391
+
392
+ if ( !empty($terms) ) {
393
+ $output .= '<div class="lsow-taxonomy-filter">';
394
+ $output .= '<div class="lsow-filter-item segment-0 lsow-active"><a data-value="*" href="#">' . esc_html__( 'All', 'livemesh-so-widgets' ) . '</a></div>';
395
+ $segment_count = 1;
396
+ foreach ( $terms as $term ) {
397
+ $output .= '<div class="lsow-filter-item segment-' . intval( $segment_count ) . '"><a href="#" data-value=".term-' . intval( $term->term_id ) . '" title="' . esc_html__( 'View all items filed under ', 'livemesh-so-widgets' ) . esc_attr( $term->name ) . '">' . esc_html( $term->name ) . '</a></div>';
398
+ $segment_count++;
399
+ }
400
+ $output .= '</div>';
401
+ }
402
+
403
+ return apply_filters(
404
+ 'lsow_taxonomy_terms_filter',
405
+ $output,
406
+ $taxonomies,
407
+ $chosen_terms
408
+ );
409
+ }
410
+
411
  function lsow_get_animation_atts( $animation )
412
  {
413
  $animate_class = "";
454
  $animation_attr = ' data-animation="' . esc_attr( $animation ) . '"';
455
  }
456
 
457
+ $return = array( $animate_class, $animation_attr );
458
+ return apply_filters( 'lsow_animation_attributes', $return, $animation );
459
  }
460
 
461
  function lsow_get_animation_options()
462
  {
463
+ return apply_filters( 'lsow_animation_options', array(
464
  'none' => __( 'None', 'livemesh-so-widgets' ),
465
  'fadeIn' => __( 'Fade In', 'livemesh-so-widgets' ),
466
  'fadeInLeft' => __( 'Fade In Left', 'livemesh-so-widgets' ),
467
  'fadeInRight' => __( 'Fade In Right', 'livemesh-so-widgets' ),
468
+ ) );
469
+ }
470
+
471
+ function lsow_get_template_part( $template_name, $settings )
472
+ {
473
+ // Allow the user to place the templates in a different folder
474
+ $templates_folder = apply_filters( 'lsow_templates_folder', 'siteorigin-widgets' );
475
+ $template = locate_template( $templates_folder . '/' . $template_name . '.php' );
476
+ /* If template is found */
477
+
478
+ if ( '' !== $template ) {
479
+ ob_start();
480
+ include $template;
481
+ return ob_get_clean();
482
+ }
483
+
484
+ return null;
485
+ }
486
+
487
+ function lsow_get_module_template_part( $template_name, $module )
488
+ {
489
+ // Allow the user to place the templates in a different folder
490
+ $templates_folder = apply_filters( 'lsow_templates_folder', 'siteorigin-widgets/modules' );
491
+ $template = locate_template( $templates_folder . '/' . $template_name . '.php' );
492
+ /* If template is found */
493
+
494
+ if ( '' !== $template ) {
495
+ ob_start();
496
+ include $template;
497
+ return ob_get_clean();
498
+ }
499
+
500
+ return null;
501
  }
includes/widgets/lsow-accordion-widget/lsow-accordion-widget.php CHANGED
@@ -67,7 +67,6 @@ class LSOW_Accordion_Widget extends SiteOrigin_Widget
67
  'type' => 'text',
68
  'label' => __( 'Panel ID', 'livemesh-so-widgets' ),
69
  'description' => __( 'The Panel ID is required to link to a panel. It must be unique across the page, must begin with a letter and may be followed by any number of letters, digits, hyphens or underscores.', 'livemesh-so-widgets' ),
70
- 'connections' => array( 'string', 'html' ),
71
  ),
72
  'panel_content' => array(
73
  'type' => 'tinymce',
@@ -88,12 +87,15 @@ class LSOW_Accordion_Widget extends SiteOrigin_Widget
88
 
89
  function get_template_variables( $instance, $args )
90
  {
91
- return array(
92
  'style' => $instance['style'],
93
  'toggle' => $instance['toggle'],
94
  'expanded' => $instance['expanded'],
95
  'accordion' => ( !empty($instance['accordion']) ? $instance['accordion'] : array() ),
96
  );
 
 
 
97
  }
98
 
99
  }
67
  'type' => 'text',
68
  'label' => __( 'Panel ID', 'livemesh-so-widgets' ),
69
  'description' => __( 'The Panel ID is required to link to a panel. It must be unique across the page, must begin with a letter and may be followed by any number of letters, digits, hyphens or underscores.', 'livemesh-so-widgets' ),
 
70
  ),
71
  'panel_content' => array(
72
  'type' => 'tinymce',
87
 
88
  function get_template_variables( $instance, $args )
89
  {
90
+ $settings = array(
91
  'style' => $instance['style'],
92
  'toggle' => $instance['toggle'],
93
  'expanded' => $instance['expanded'],
94
  'accordion' => ( !empty($instance['accordion']) ? $instance['accordion'] : array() ),
95
  );
96
+ return array(
97
+ 'settings' => $settings,
98
+ );
99
  }
100
 
101
  }
includes/widgets/lsow-accordion-widget/tpl/default.php CHANGED
@@ -1,10 +1,7 @@
1
  <?php
2
 
3
  /**
4
- * @var $accordion
5
- * @var $toggle
6
- * @var $expanded
7
- * @var $style
8
  */
9
  ?>
10
 
@@ -12,41 +9,20 @@
12
  if ( !empty($instance['title']) ) {
13
  echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] ;
14
  }
15
- ?>
16
-
17
- <div class="lsow-accordion <?php
18
- echo $style ;
19
- ?>" data-toggle="<?php
20
- echo ( $toggle ? "true" : "false" ) ;
21
- ?>"
22
- data-expanded="<?php
23
- echo ( $expanded ? "true" : "false" ) ;
24
- ?>">
25
-
26
- <?php
27
- foreach ( $accordion as $panel ) {
28
- ?>
29
-
30
- <?php
31
  $panel_id = '';
32
- ?>
33
-
34
- <div class="lsow-panel" id="<?php
35
- echo $panel_id ;
36
- ?>">
37
-
38
- <div class="lsow-panel-title"><?php
39
- echo htmlspecialchars_decode( esc_html( $panel['title'] ) ) ;
40
- ?></div>
41
-
42
- <div class="lsow-panel-content"><?php
43
- echo do_shortcode( $panel['panel_content'] ) ;
44
- ?></div>
45
-
46
- </div>
47
-
48
- <?php
49
  }
50
- ?>
51
-
52
- </div>
1
  <?php
2
 
3
  /**
4
+ * @var $settings
 
 
 
5
  */
6
  ?>
7
 
9
  if ( !empty($instance['title']) ) {
10
  echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] ;
11
  }
12
+ $settings = apply_filters( 'lsow_accordion_' . $this->id . '_settings', $settings );
13
+ $output = '<div class="lsow-accordion ' . $settings['style'] . '" data-toggle="' . (( $settings['toggle'] ? "true" : "false" )) . '" data-expanded="' . (( $settings['expanded'] ? "true" : "false" )) . '">';
14
+ foreach ( $settings['accordion'] as $panel ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  $panel_id = '';
16
+ $child_output = '<div class="lsow-panel" id="' . $panel_id . '">';
17
+ $child_output .= '<div class="lsow-panel-title">' . htmlspecialchars_decode( esc_html( $panel['title'] ) ) . '</div>';
18
+ $child_output .= '<div class="lsow-panel-content">' . do_shortcode( $panel['panel_content'] ) . '</div>';
19
+ $child_output .= '</div><!-- .lsow-panel -->';
20
+ $output .= apply_filters(
21
+ 'lsow_accordion_item_output',
22
+ $child_output,
23
+ $panel,
24
+ $settings
25
+ );
 
 
 
 
 
 
 
26
  }
27
+ $output .= '</div><!-- .lsow-accordion -->';
28
+ echo apply_filters( 'lsow_accordion_output', $output, $settings ) ;
 
includes/widgets/lsow-button-widget/lsow-button-widget.php CHANGED
@@ -198,24 +198,19 @@ class LSOW_Button_Widget extends SiteOrigin_Widget {
198
  }
199
 
200
  function get_template_variables($instance, $args) {
201
- return array(
 
 
 
202
  "id" => $this->element_id,
203
- "style" => $instance['settings']["style"],
204
- "class" => $instance['settings']["class"],
205
- "color" => $instance['settings']["color"],
206
- "custom_color" => $instance['settings']["custom_color"],
207
- "hover_color" => $instance['settings']["hover_color"],
208
- "type" => $instance['settings']["type"],
209
- "align" => $instance['settings']["align"],
210
- "target" => $instance['settings']["target"],
211
- "rounded" => $instance['settings']["rounded"],
212
  "href" => (!empty($instance['href'])) ? sow_esc_url($instance['href']) : '',
213
  "text" => $instance["text"],
214
  'icon_type' => $instance['icon_type'],
215
  'icon_image' => $instance['icon_image'],
216
- 'icon' => $instance['icon'],
217
- 'settings' => $instance['settings']
218
- );
 
219
  }
220
 
221
  }
198
  }
199
 
200
  function get_template_variables($instance, $args) {
201
+
202
+ $settings = $instance['settings'];
203
+
204
+ $settings = array_merge($settings, array(
205
  "id" => $this->element_id,
 
 
 
 
 
 
 
 
 
206
  "href" => (!empty($instance['href'])) ? sow_esc_url($instance['href']) : '',
207
  "text" => $instance["text"],
208
  'icon_type' => $instance['icon_type'],
209
  'icon_image' => $instance['icon_image'],
210
+ 'icon' => $instance['icon']
211
+ ));
212
+
213
+ return array('settings' => $settings);
214
  }
215
 
216
  }
includes/widgets/lsow-button-widget/tpl/default.php CHANGED
@@ -1,68 +1,58 @@
1
  <?php
2
  /**
3
- * @var $id
4
- * @var $style
5
- * @var $class
6
- * @var $color
7
- * @var $custom_color
8
- * @var $hover_color
9
- * @var $type
10
- * @var $rounded
11
- * @var $href
12
- * @var $align
13
- * @var $target
14
- * @var $text
15
- * @var $icon_type
16
- * @var $icon_image
17
- * @var $icon
18
  * @var $settings
19
  */
20
 
 
 
 
21
  list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']);
22
 
23
  $icon_html = '';
24
 
25
- $id = (!empty($id)) ? ' id="' . $id . '"' : '';
26
 
27
- $class = (!empty($class)) ? ' ' . $class : '';
28
 
29
- $color_class = ' lsow-' . esc_attr($color);
30
- if (!empty($type))
31
- $type = ' lsow-' . esc_attr($type);
32
 
33
- $rounded = (!empty($rounded)) ? ' lsow-rounded' : '';
34
 
35
- if (!empty($target))
36
  $target = ' target="_blank"';
37
  else
38
  $target = '';
39
 
40
- if ($color == 'default' || ($color == 'custom' && empty($custom_color))) {
41
  $options = get_option('lsow_settings');
42
 
43
  if ($options && isset($options['lsow_theme_color'])) {
44
- $custom_color = $options['lsow_theme_color'];
45
  }
46
  else {
47
- $custom_color = '#f94213'; // default button color if none set in theme options
48
  }
49
  }
50
 
51
- $style = ($style) ? ' style="' . esc_attr($style) . '"' : '';
52
 
53
  // Use the custom color only if user wants to use the custom color set
54
- $color_attr = ($color == 'custom') ? ' data-color=' . esc_html($custom_color) : '';
 
 
55
 
56
- $hover_color_attr = ($hover_color) ? ' data-hover-color=' . esc_html($hover_color) : '';
 
 
 
57
 
58
- if ($icon_type == 'icon_image')
59
- $icon_html = wp_get_attachment_image($icon_image, 'thumbnail', false, array('class' => 'lsow-image lsow-thumbnail'));
60
- elseif ($icon_type == 'icon')
61
- $icon_html = siteorigin_widget_get_icon($icon);
62
 
63
- $button_content = '<a' . $id . ' class= "lsow-button ' . ((!empty($icon_html)) ? ' lsow-with-icon' : '') . esc_attr($class) . $color_class . $type . $rounded . $animate_class . '"' . $style . $color_attr . $hover_color_attr . $animation_attr . ' href="' . sow_esc_url($href) . '"' . esc_html($target) . '>' . $icon_html . esc_html($text) . '</a>';
 
64
 
65
- if ($align != 'none')
66
- $button_content = '<div class="lsow-button-wrap" style="clear: both; text-align:' . esc_attr($align) . ';">' . $button_content . '</div>';
67
 
68
- echo $button_content;
1
  <?php
2
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * @var $settings
4
  */
5
 
6
+
7
+ $settings = apply_filters('lsow_button_' . $this->id . '_settings', $settings);
8
+
9
  list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']);
10
 
11
  $icon_html = '';
12
 
13
+ $id = (!empty($settings['id'])) ? ' id="' . $settings['id'] . '"' : '';
14
 
15
+ $class = (!empty($settings['class'])) ? ' ' . $settings['class'] : '';
16
 
17
+ $color_class = ' lsow-' . esc_attr($settings['color']);
18
+ if (!empty($settings['type']))
19
+ $settings['type'] = ' lsow-' . esc_attr($settings['type']);
20
 
21
+ $rounded = (!empty($settings['rounded'])) ? ' lsow-rounded' : '';
22
 
23
+ if (!empty($settings['target']))
24
  $target = ' target="_blank"';
25
  else
26
  $target = '';
27
 
28
+ if ($settings['color'] == 'default' || ($settings['color'] == 'custom' && empty($settings['custom_color']))) {
29
  $options = get_option('lsow_settings');
30
 
31
  if ($options && isset($options['lsow_theme_color'])) {
32
+ $settings['custom_color'] = $options['lsow_theme_color'];
33
  }
34
  else {
35
+ $settings['custom_color'] = '#f94213'; // default button color if none set in theme options
36
  }
37
  }
38
 
39
+ $style = ($settings['style']) ? ' style="' . esc_attr($settings['style']) . '"' : '';
40
 
41
  // Use the custom color only if user wants to use the custom color set
42
+ $color_attr = ($settings['color'] == 'custom') ? ' data-color=' . esc_html($settings['custom_color']) : '';
43
+
44
+ $hover_color_attr = ($settings['hover_color']) ? ' data-hover-color=' . esc_html($settings['hover_color']) : '';
45
 
46
+ if ($settings['icon_type'] == 'icon_image')
47
+ $icon_html = wp_get_attachment_image($settings['icon_image'], 'thumbnail', false, array('class' => 'lsow-image lsow-thumbnail'));
48
+ elseif ($settings['icon_type'] == 'icon')
49
+ $icon_html = siteorigin_widget_get_icon($settings['icon']);
50
 
51
+ $button_content = '<a' . $id . ' class= "lsow-button ' . ((!empty($icon_html)) ? ' lsow-with-icon' : '') . esc_attr($class) . $color_class . $settings['type'] . $rounded . $animate_class . '"' . $style . $color_attr . $hover_color_attr . $animation_attr . ' href="' . sow_esc_url($settings['href']) . '"' . esc_html($target) . '>' . $icon_html . esc_html($settings['text']) . '</a>';
 
 
 
52
 
53
+ if ($settings['align'] != 'none')
54
+ $button_content = '<div class="lsow-button-wrap" style="clear: both; text-align:' . esc_attr($settings['align']) . ';">' . $button_content . '</div>';
55
 
56
+ $output = $button_content;
 
57
 
58
+ echo apply_filters('lsow_button_output', $output, $settings);
includes/widgets/lsow-carousel-widget/lsow-carousel-widget.php CHANGED
@@ -293,24 +293,23 @@ class LSOW_Carousel_Widget extends SiteOrigin_Widget {
293
  }
294
 
295
  function get_template_variables($instance, $args) {
 
296
 
297
-
298
- $return = array(
299
  'elements' => !empty($instance['elements']) ? $instance['elements'] : array(),
300
- 'settings' => $instance['settings'],
301
  'carousel_settings' => $instance['carousel_settings']
302
- );
303
 
304
- unset($return['carousel_settings']['responsive']);
305
 
306
- $return['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
307
- $return['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
308
- $return['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
309
- $return['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
310
- $return['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
311
- $return['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
312
 
313
- return $return;
314
  }
315
 
316
  }
293
  }
294
 
295
  function get_template_variables($instance, $args) {
296
+ $settings = $instance['settings'];
297
 
298
+ $settings = array_merge($settings, array(
 
299
  'elements' => !empty($instance['elements']) ? $instance['elements'] : array(),
 
300
  'carousel_settings' => $instance['carousel_settings']
301
+ ));
302
 
303
+ unset($settings['carousel_settings']['responsive']);
304
 
305
+ $settings['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
306
+ $settings['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
307
+ $settings['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
308
+ $settings['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
309
+ $settings['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
310
+ $settings['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
311
 
312
+ return array('settings' => $settings);
313
  }
314
 
315
  }
includes/widgets/lsow-carousel-widget/tpl/default.php CHANGED
@@ -1,35 +1,32 @@
1
  <?php
2
  /**
3
- * @var $carousel_settings
4
  * @var $settings
5
- * @var $elements
6
  */
7
 
8
  if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
9
 
10
- // Loop through the elements and do something with them.
11
 
12
- if (!empty($elements)) : ?>
13
 
14
- <div
15
- class="lsow-carousel lsow-container" <?php foreach ($carousel_settings as $key => $val) : ?>
16
 
17
- <?php if (!empty($val)) : ?>
18
- data-<?php echo $key . '="' . esc_attr($val) . '"' ?>
19
- <?php endif ?>
20
 
21
- <?php endforeach; ?>>
22
 
23
- <?php foreach ($elements as $element) : ?>
24
 
25
- <div class="lsow-carousel-item">
26
 
27
- <?php echo do_shortcode(wp_kses_post($element['text'])); ?>
28
 
29
- </div><!--.lsow-carousel-item -->
30
 
31
- <?php endforeach; ?>
32
 
33
- </div> <!-- .lsow-carousel -->
34
 
35
- <?php endif; ?>
 
 
1
  <?php
2
  /**
 
3
  * @var $settings
 
4
  */
5
 
6
  if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
7
 
8
+ $settings = apply_filters('lsow_carousel_' . $this->id . '_settings', $settings);
9
 
10
+ $carousel_settings = $settings['carousel_settings'];
11
 
12
+ if (!empty($settings['elements'])) :
 
13
 
14
+ $output = '<div id="lsow-carousel-' . $this->id . '" class="lsow-carousel lsow-container" data-settings=\'' . wp_json_encode($carousel_settings) . '\'>';
 
 
15
 
16
+ foreach ($settings['elements'] as $element) :
17
 
18
+ $child_output = '<div class="lsow-carousel-item">';
19
 
20
+ $child_output .= do_shortcode(wp_kses_post($element['text']));
21
 
22
+ $child_output .= '</div><!-- .lsow-carousel-item -->';
23
 
24
+ $output .= apply_filters('lsow_carousel_item_output', $child_output, $element, $settings);
25
 
26
+ endforeach;
27
 
28
+ $output .= '</div><!-- .lsow-carousel -->';
29
 
30
+ echo apply_filters('lsow_carousel_output', $output, $settings);
31
+
32
+ endif;
includes/widgets/lsow-clients-widget/lsow-clients-widget.php CHANGED
@@ -119,10 +119,14 @@ class LSOW_Client_Widget extends SiteOrigin_Widget {
119
  }
120
 
121
  function get_template_variables($instance, $args) {
122
- return array(
 
 
 
123
  'clients' => !empty($instance['clients']) ? $instance['clients'] : array(),
124
- 'settings' => $instance['settings']
125
- );
 
126
  }
127
 
128
  }
119
  }
120
 
121
  function get_template_variables($instance, $args) {
122
+
123
+ $settings = $instance['settings'];
124
+
125
+ $settings = array_merge($settings, array(
126
  'clients' => !empty($instance['clients']) ? $instance['clients'] : array(),
127
+ ));
128
+
129
+ return array('settings' => $settings);
130
  }
131
 
132
  }
includes/widgets/lsow-clients-widget/tpl/default.php CHANGED
@@ -1,54 +1,55 @@
1
  <?php
2
  /**
3
- * @var $clients
4
  * @var $settings
5
  */
6
 
7
- ?>
 
8
 
9
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']); ?>
10
 
11
- <?php if (!empty($instance['title']))
12
- echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
13
 
14
- <div class="lsow-clients lsow-gapless-grid">
15
 
16
- <div class="lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?> ">
17
 
18
- <?php $column_count = 0; ?>
19
 
20
- <?php foreach ($clients as $client): ?>
21
 
22
- <div class="lsow-grid-item lsow-client <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>
23
 
24
- <?php echo wp_get_attachment_image($client['image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $client['name'])); ?>
25
 
26
- <div class="lsow-client-name">
27
 
28
- <?php if (!empty($client['link'])): ?>
29
 
30
- <a href="<?php echo sow_esc_url($client['link']); ?>"
31
- title="<?php echo esc_html($client['name']); ?>"
32
- target="_blank"><?php echo esc_html($client['name']); ?></a>
33
 
34
- <?php else: ?>
 
 
35
 
36
- <?php echo esc_html($client['name']); ?>
37
 
38
- <?php endif; ?>
39
 
40
- </div>
41
 
42
- <div class="lsow-image-overlay"></div>
43
 
44
- </div>
45
 
46
- <?php
47
 
48
- endforeach;
49
 
50
- ?>
51
 
52
- </div>
53
 
54
- </div>
 
 
1
  <?php
2
  /**
 
3
  * @var $settings
4
  */
5
 
6
+ if (!empty($instance['title']))
7
+ echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+ $settings = apply_filters('lsow_clients_' . $this->id . '_settings', $settings);
10
 
11
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']);
 
12
 
13
+ $output = '<div class="lsow-clients lsow-gapless-grid">';
14
 
15
+ $output .= '<div class="lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
16
 
17
+ foreach ($settings['clients'] as $client):
18
 
19
+ $child_output = '<div class="lsow-grid-item lsow-client ' . $animate_class . '" ' . $animation_attr . '>';
20
 
21
+ if (!empty($client['image'])):
22
 
23
+ $child_output .= wp_get_attachment_image($client['image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $client['name']));
24
 
25
+ endif;
26
 
27
+ if (!empty($client['link'])):
28
 
29
+ $child_output .= '<div class="lsow-client-name">';
 
 
30
 
31
+ $child_output .= '<a href="' . sow_esc_url($client['link'])
32
+ . ' " title="' . esc_html($client['name'])
33
+ . '" target="_blank">' . wp_kses_post($client['name']) . '</a>';
34
 
35
+ $child_output .= '</div>';
36
 
37
+ else:
38
 
39
+ $child_output .= '<div class="lsow-client-name">' . wp_kses_post($client['name']) . '</div>';
40
 
41
+ endif;
42
 
43
+ $child_output .= '<div class="lsow-image-overlay"></div>';
44
 
45
+ $child_output .= '</div><!-- .lsow-client -->';
46
 
47
+ $output .= apply_filters('lsow_client_item_output', $child_output, $client, $settings);
48
 
49
+ endforeach;
50
 
51
+ $output .= '</div>';
52
 
53
+ $output .= '</div><!-- .lsow-clients -->';
54
+
55
+ echo apply_filters('lsow_clients_output', $output, $settings);
includes/widgets/lsow-heading-widget/lsow-heading-widget.php CHANGED
@@ -113,24 +113,32 @@ class LSOW_Heading_Widget extends SiteOrigin_Widget {
113
  }
114
 
115
  function get_template_variables($instance, $args) {
116
- return array(
 
 
 
117
  'style' => $instance['style'],
118
  'align' => $instance['align'],
119
  'heading' => $instance['heading'],
120
  'short_text' => !empty($instance['short_text']) ? $instance['short_text'] : '',
121
  'subtitle' => !empty($instance['subtitle']) ? $instance['subtitle'] : '',
122
 
123
- 'heading' => $instance['heading'],
124
- 'settings' => $instance['settings']
125
- );
 
126
  }
127
 
128
  function get_less_variables($instance) {
 
 
 
 
129
  $less = array();
130
 
131
- $font = siteorigin_widget_get_font( $instance['heading_font'] );
132
  $less['heading_font'] = $font['family'];
133
- if ( ! empty( $font['weight'] ) ) {
134
  $less['heading_font_weight'] = $font['weight'];
135
  }
136
 
@@ -141,11 +149,12 @@ class LSOW_Heading_Widget extends SiteOrigin_Widget {
141
  * Less function for importing Google web fonts.
142
  */
143
  function less_import_google_font($instance, $args) {
144
- if( empty( $instance ) ) return;
 
145
 
146
- $font_import = siteorigin_widget_get_font( $instance['heading_font'] );
147
- if( !empty( $font_import['css_import'] ) ) {
148
- return $font_import['css_import'];
149
  }
150
  }
151
 
113
  }
114
 
115
  function get_template_variables($instance, $args) {
116
+
117
+ $settings = $instance['settings'];
118
+
119
+ $settings = array_merge($settings, array(
120
  'style' => $instance['style'],
121
  'align' => $instance['align'],
122
  'heading' => $instance['heading'],
123
  'short_text' => !empty($instance['short_text']) ? $instance['short_text'] : '',
124
  'subtitle' => !empty($instance['subtitle']) ? $instance['subtitle'] : '',
125
 
126
+ 'heading' => $instance['heading']
127
+ ));
128
+
129
+ return array('settings' => $settings);
130
  }
131
 
132
  function get_less_variables($instance) {
133
+
134
+ if (empty($instance) || !isset($instance['heading_font']))
135
+ return;
136
+
137
  $less = array();
138
 
139
+ $font = siteorigin_widget_get_font($instance['heading_font']);
140
  $less['heading_font'] = $font['family'];
141
+ if (!empty($font['weight'])) {
142
  $less['heading_font_weight'] = $font['weight'];
143
  }
144
 
149
  * Less function for importing Google web fonts.
150
  */
151
  function less_import_google_font($instance, $args) {
152
+ if (empty($instance) || !isset($instance['heading_font']))
153
+ return;
154
 
155
+ $font_import = siteorigin_widget_get_font($instance['heading_font']);
156
+ if (!empty($font_import['css_import'])) {
157
+ return $font_import['css_import'];
158
  }
159
  }
160
 
includes/widgets/lsow-heading-widget/tpl/default.php CHANGED
@@ -1,31 +1,28 @@
1
  <?php
2
  /**
3
- * @var $style
4
- * @var $align
5
- * @var $heading
6
- * @var $subtitle
7
- * @var $short_text
8
  * @var $settings
9
  */
10
 
11
- ?>
12
 
13
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']); ?>
14
 
15
- <div class="lsow-heading lsow-<?php echo $style; ?> lsow-align<?php echo $align; ?><?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>
16
 
17
- <?php if ($style == 'style2' && !empty($subtitle)): ?>
18
 
19
- <div class="lsow-subtitle"><?php echo esc_html($subtitle); ?></div>
20
 
21
- <?php endif; ?>
22
 
23
- <h3 class="lsow-title"><?php echo wp_kses_post($heading); ?></h3>
24
 
25
- <?php if ($style != 'style3' && !empty($short_text)): ?>
26
 
27
- <p class="lsow-text"><?php echo wp_kses_post($short_text); ?></p>
28
 
29
- <?php endif; ?>
30
 
31
- </div>
 
 
1
  <?php
2
  /**
 
 
 
 
 
3
  * @var $settings
4
  */
5
 
6
+ $settings = apply_filters('lsow_heading_' . $this->id . '_settings', $settings);
7
 
8
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']);
9
 
10
+ $output = '<div class="lsow-heading lsow-' . $settings['style'] . ' lsow-align' . $settings['align'] . ' ' . $animate_class . '" ' . $animation_attr . '>';
11
 
12
+ if ($settings['style'] == 'style2' && !empty($settings['subtitle'])):
13
 
14
+ $output .= '<div class="lsow-subtitle">' . esc_html($settings['subtitle']) . '</div>';
15
 
16
+ endif;
17
 
18
+ $output .= '<h3 class="lsow-title">' . wp_kses_post($settings['heading']) . '</h3>';
19
 
20
+ if ($settings['style'] != 'style3' && !empty($settings['short_text'])):
21
 
22
+ $output .= '<p class="lsow-text">' . wp_kses_post($settings['short_text']) . '</p>';
23
 
24
+ endif;
25
 
26
+ $output .= '</div><!-- .lsow-heading -->';
27
+
28
+ echo apply_filters('lsow_heading_output', $output, $settings);
includes/widgets/lsow-hero-image-widget/lsow-hero-image-widget.php CHANGED
@@ -414,14 +414,18 @@ class LSOW_Hero_Image_Widget extends SiteOrigin_Widget {
414
  }
415
 
416
  function get_template_variables($instance, $args) {
417
- return array(
 
 
 
418
  'header_type' => $instance['header_type'],
419
  'custom_header' => $instance['custom_header'],
420
  'standard_header' => $instance['standard_header'],
421
  'pointer_down_url' => $instance['pointer_down_url'],
422
  'background' => $instance['background'],
423
- 'settings' => $instance['settings']
424
- );
 
425
  }
426
 
427
  }
414
  }
415
 
416
  function get_template_variables($instance, $args) {
417
+
418
+ $settings = $instance['settings'];
419
+
420
+ $settings = array_merge($settings, array(
421
  'header_type' => $instance['header_type'],
422
  'custom_header' => $instance['custom_header'],
423
  'standard_header' => $instance['standard_header'],
424
  'pointer_down_url' => $instance['pointer_down_url'],
425
  'background' => $instance['background'],
426
+ ));
427
+
428
+ return array('settings' => $settings);
429
  }
430
 
431
  }
includes/widgets/lsow-hero-image-widget/tpl/default.php CHANGED
@@ -1,38 +1,36 @@
1
  <?php
2
  /**
3
- * @var $header_type
4
- * @var $custom_header
5
- * @var $standard_header
6
- * @var $pointer_down_url
7
- * @var $background
8
  * @var $settings
9
  */
10
 
11
  $youtube_markup = '';
12
- if ($background['bg_type'] == 'youtube') {
13
- $youtube_markup = ' data-property="{mute:true,autoPlay:true,opacity:1,loop:true, ' . 'videoURL:\'' . esc_url($background['youtube_video']['youtube_url']) . '\',' . 'quality:\'' . esc_attr($background['youtube_video']['quality']) . '\',' . 'ratio:\'' . esc_attr($background['youtube_video']['ratio']) . '\'}"';
 
 
 
14
  }
15
 
16
  ?>
17
 
18
  <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
19
 
20
- <div class="lsow-hero-header lsow-section-bg-<?php echo $background['bg_type']; ?>" <?php echo $youtube_markup; ?>>
21
 
22
  <div class="lsow-background">
23
 
24
- <?php if ($background['bg_type'] == 'html5video'): ?>
25
 
26
  <div class="lsow-html5-video-bg">
27
 
28
- <video poster="<?php echo wp_get_attachment_url($background['bg_image']['image']); ?>" preload="auto"
29
  autoplay loop muted>
30
 
31
- <source src="<?php echo wp_get_attachment_url($background['html5_videos']['mp4_file']); ?>"
32
  type="video/mp4">
33
- <source src="<?php echo wp_get_attachment_url($background['html5_videos']['ogg_file']); ?>"
34
  type="video/ogg">
35
- <source src="<?php echo wp_get_attachment_url($background['html5_videos']['webm_file']); ?>"
36
  type="video/webm">
37
 
38
  </video>
@@ -41,16 +39,16 @@ if ($background['bg_type'] == 'youtube') {
41
 
42
  <?php else: ?>
43
 
44
- <?php $attachment = wp_get_attachment_image_src(intval($background['bg_image']['image']), 'full'); ?>
45
 
46
  <?php if (!empty($attachment)): ?>
47
 
48
- <?php if ($background['bg_type'] == 'parallax'): ?>
49
 
50
  <div class="lsow-parallax-bg"
51
  style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
52
 
53
- <?php elseif ($background['bg_type'] == 'cover' || $background['bg_type'] == 'youtube'): ?>
54
 
55
  <div class="lsow-image-bg"
56
  style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
@@ -65,7 +63,7 @@ if ($background['bg_type'] == 'youtube') {
65
 
66
  <?php
67
 
68
- $overlay = $background['overlay'];
69
 
70
  if (!empty($overlay['overlay_color'])) :
71
 
@@ -86,29 +84,29 @@ if ($background['bg_type'] == 'youtube') {
86
 
87
  <div class="lsow-header-content">
88
 
89
- <?php if ($header_type == 'standard') : ?>
90
 
91
  <div class="lsow-standard-header">
92
 
93
- <?php echo empty($standard_header['subheading']) ? '' : '<div class="lsow-subheading">' . htmlspecialchars_decode($standard_header['subheading']) . '</div>'; ?>
94
 
95
- <?php echo empty($standard_header['heading']) ? '' : '<h3 class="lsow-heading">' . $standard_header['heading'] . '</h3>'; ?>
96
 
97
- <?php if (!empty($standard_header['button_url'])) : ?>
98
 
99
  <a class="lsow-button lsow-trans"
100
- href="<?php echo sow_esc_url($standard_header['button_url']); ?>"
101
- <?php echo (empty($standard_header['new_window'])) ? '' : 'target="_blank"'; ?>><?php echo $standard_header['button_text']; ?></a>
102
 
103
  <?php endif; ?>
104
 
105
  </div>
106
 
107
- <?php elseif ($header_type == 'custom'): ?>
108
 
109
  <div class="lsow-custom-header">
110
 
111
- <?php echo do_shortcode($custom_header['custom']); ?>
112
 
113
  </div>
114
 
@@ -117,9 +115,9 @@ if ($background['bg_type'] == 'youtube') {
117
 
118
  </div>
119
 
120
- <?php if (!empty($pointer_down_url)): ?>
121
 
122
- <a href="<?php echo $pointer_down_url; ?>" class="icon-angle-down lsow-pointer-down"></a>
123
 
124
  <?php endif; ?>
125
 
1
  <?php
2
  /**
 
 
 
 
 
3
  * @var $settings
4
  */
5
 
6
  $youtube_markup = '';
7
+ if ($settings['background']['bg_type'] == 'youtube') {
8
+ $youtube_markup = ' data-property="{mute:true,autoPlay:true,opacity:1,loop:true, '
9
+ . 'videoURL:\'' . esc_url($settings['background']['youtube_video']['youtube_url']) . '\','
10
+ . 'quality:\'' . esc_attr($settings['background']['youtube_video']['quality']) . '\','
11
+ . 'ratio:\'' . esc_attr($settings['background']['youtube_video']['ratio']) . '\'}"';
12
  }
13
 
14
  ?>
15
 
16
  <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
17
 
18
+ <div class="lsow-hero-header lsow-section-bg-<?php echo $settings['background']['bg_type']; ?>" <?php echo $youtube_markup; ?>>
19
 
20
  <div class="lsow-background">
21
 
22
+ <?php if ($settings['background']['bg_type'] == 'html5video'): ?>
23
 
24
  <div class="lsow-html5-video-bg">
25
 
26
+ <video poster="<?php echo wp_get_attachment_url($settings['background']['bg_image']['image']); ?>" preload="auto"
27
  autoplay loop muted>
28
 
29
+ <source src="<?php echo wp_get_attachment_url($settings['background']['html5_videos']['mp4_file']); ?>"
30
  type="video/mp4">
31
+ <source src="<?php echo wp_get_attachment_url($settings['background']['html5_videos']['ogg_file']); ?>"
32
  type="video/ogg">
33
+ <source src="<?php echo wp_get_attachment_url($settings['background']['html5_videos']['webm_file']); ?>"
34
  type="video/webm">
35
 
36
  </video>
39
 
40
  <?php else: ?>
41
 
42
+ <?php $attachment = wp_get_attachment_image_src(intval($settings['background']['bg_image']['image']), 'full'); ?>
43
 
44
  <?php if (!empty($attachment)): ?>
45
 
46
+ <?php if ($settings['background']['bg_type'] == 'parallax'): ?>
47
 
48
  <div class="lsow-parallax-bg"
49
  style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
50
 
51
+ <?php elseif ($settings['background']['bg_type'] == 'cover' || $settings['background']['bg_type'] == 'youtube'): ?>
52
 
53
  <div class="lsow-image-bg"
54
  style="background-image: url(<?php echo $attachment[0]; ?>);"></div>
63
 
64
  <?php
65
 
66
+ $overlay = $settings['background']['overlay'];
67
 
68
  if (!empty($overlay['overlay_color'])) :
69
 
84
 
85
  <div class="lsow-header-content">
86
 
87
+ <?php if ($settings['header_type'] == 'standard') : ?>
88
 
89
  <div class="lsow-standard-header">
90
 
91
+ <?php echo empty($settings['standard_header']['subheading']) ? '' : '<div class="lsow-subheading">' . htmlspecialchars_decode($settings['standard_header']['subheading']) . '</div>'; ?>
92
 
93
+ <?php echo empty($settings['standard_header']['heading']) ? '' : '<h3 class="lsow-heading">' . $settings['standard_header']['heading'] . '</h3>'; ?>
94
 
95
+ <?php if (!empty($settings['standard_header']['button_url'])) : ?>
96
 
97
  <a class="lsow-button lsow-trans"
98
+ href="<?php echo sow_esc_url($settings['standard_header']['button_url']); ?>"
99
+ <?php echo (empty($settings['standard_header']['new_window'])) ? '' : 'target="_blank"'; ?>><?php echo $settings['standard_header']['button_text']; ?></a>
100
 
101
  <?php endif; ?>
102
 
103
  </div>
104
 
105
+ <?php elseif ($settings['header_type'] == 'custom'): ?>
106
 
107
  <div class="lsow-custom-header">
108
 
109
+ <?php echo do_shortcode($settings['custom_header']['custom']); ?>
110
 
111
  </div>
112
 
115
 
116
  </div>
117
 
118
+ <?php if (!empty($settings['pointer_down_url'])): ?>
119
 
120
+ <a href="<?php echo $settings['pointer_down_url']; ?>" class="icon-angle-down lsow-pointer-down"></a>
121
 
122
  <?php endif; ?>
123
 
includes/widgets/lsow-icon-list-widget/lsow-icon-list-widget.php CHANGED
@@ -186,11 +186,14 @@ class LSOW_Icon_List_Widget extends SiteOrigin_Widget {
186
  }
187
 
188
  function get_template_variables($instance, $args) {
189
- return array(
 
 
190
  'icon_type' => $instance['icon_type'],
191
- 'icon_list' => !empty($instance['icon_list']) ? $instance['icon_list'] : array(),
192
- 'settings' => $instance['settings']
193
- );
 
194
  }
195
 
196
  }
186
  }
187
 
188
  function get_template_variables($instance, $args) {
189
+ $settings = $instance['settings'];
190
+
191
+ $settings = array_merge($settings, array(
192
  'icon_type' => $instance['icon_type'],
193
+ 'icon_list' => !empty($instance['icon_list']) ? $instance['icon_list'] : array()
194
+ ));
195
+
196
+ return array('settings' => $settings);
197
  }
198
 
199
  }
includes/widgets/lsow-icon-list-widget/tpl/default.php CHANGED
@@ -1,7 +1,5 @@
1
  <?php
2
  /**
3
- * @var $icon_type
4
- * @var $icon_list
5
  * @var $settings
6
  */
7
 
@@ -12,70 +10,74 @@ else
12
 
13
  ?>
14
 
15
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
16
 
17
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']); ?>
18
 
19
- <div class="lsow-icon-list lsow-align<?php echo $settings['align']; ?>">
20
 
21
- <?php foreach ($icon_list as $icon_item): ?>
22
 
23
- <?php $icon_type = esc_html($icon_type); ?>
24
 
25
- <?php $icon_title = esc_html($icon_item['title']); ?>
26
 
27
- <?php $icon_url = sow_esc_url($icon_item['href']); ?>
28
 
29
- <div class="lsow-icon-list-item<?php echo $animate_class; ?>" <?php echo $animation_attr; ?> title="<?php echo $icon_title; ?>">
30
 
31
- <?php if ($icon_type == 'icon_image') : ?>
32
 
33
- <?php if (empty($icon_url)) : ?>
34
 
35
- <div class="lsow-image-wrapper">
36
 
37
- <?php echo wp_get_attachment_image($icon_item['icon_image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $icon_title)); ?>
38
 
39
- </div>
40
 
41
- <?php else : ?>
42
 
43
- <a class="lsow-image-wrapper" href="<?php echo $icon_url; ?>" <?php echo $target; ?>>
44
 
45
- <?php echo wp_get_attachment_image($icon_item['icon_image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $icon_title)); ?>
46
 
47
- </a>
48
 
49
- <?php endif; ?>
50
 
51
- <?php else : ?>
52
 
53
- <?php if (empty($icon_url)) : ?>
54
 
55
- <div class="lsow-icon-wrapper">
56
 
57
- <?php echo siteorigin_widget_get_icon($icon_item['icon']); ?>
58
 
59
- </div>
60
 
61
- <?php else : ?>
62
 
63
- <a class="lsow-icon-wrapper" href="<?php echo $icon_url; ?>" <?php echo $target; ?>>
64
 
65
- <?php echo siteorigin_widget_get_icon($icon_item['icon']); ?>
66
 
67
- </a>
68
 
69
- <?php endif; ?>
70
 
71
- <?php endif; ?>
72
 
73
- </div>
74
 
75
- <?php
76
 
77
- endforeach;
78
 
79
- ?>
80
 
81
- </div>
 
 
 
 
1
  <?php
2
  /**
 
 
3
  * @var $settings
4
  */
5
 
10
 
11
  ?>
12
 
13
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
14
 
15
+ $settings = apply_filters('lsow_icon_list_' . $this->id . '_settings', $settings);
16
 
17
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']);
18
 
19
+ $output = '<div class="lsow-icon-list lsow-align' . $settings['align'] . '">';
20
 
21
+ foreach ($settings['icon_list'] as $icon_item):
22
 
23
+ $icon_type = esc_html($settings['icon_type']);
24
 
25
+ $icon_title = esc_html($icon_item['title']);
26
 
27
+ $icon_url = !empty($icon_item['href']) ? $icon_item['href'] : null;
28
 
29
+ $target = $icon_item['href']['is_external'] ? 'target="_blank"' : '';
30
 
31
+ $child_output = '<div class="lsow-icon-list-item ' . $animate_class . '" ' . $animation_attr . ' title="' . $icon_title . '">';
32
 
33
+ if (($icon_type == 'icon_image') && !empty($icon_item['icon_image'])) :
34
 
35
+ if (empty($icon_url)) :
36
 
37
+ $child_output .= '<div class="lsow-image-wrapper">';
38
 
39
+ $child_output .= wp_get_attachment_image($icon_item['icon_image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $icon_title));
40
 
41
+ $child_output .= '</div>';
42
 
43
+ else :
44
 
45
+ $child_output .= '<a class="lsow-image-wrapper" href="' . $icon_url . '" ' . $target . '>';
46
 
47
+ $child_output .= wp_get_attachment_image($icon_item['icon_image'], 'full', false, array('class' => 'lsow-image full', 'alt' => $icon_title));
48
 
49
+ $child_output .= '</a>';
50
 
51
+ endif;
52
 
53
+ else :
54
 
55
+ if (empty($icon_url)) :
56
 
57
+ $child_output .= '<div class="lsow-icon-wrapper">';
58
 
59
+ $child_output .= siteorigin_widget_get_icon($icon_item['icon']);
60
 
61
+ $child_output .= '</div>';
62
 
63
+ else :
64
 
65
+ $child_output .= '<a class="lsow-icon-wrapper" href="' . $icon_url . '" ' . $target . '>';
66
 
67
+ $child_output .= siteorigin_widget_get_icon($icon_item['icon']);
68
 
69
+ $child_output .= '</a>';
70
 
71
+ endif;
72
 
73
+ endif;
74
 
75
+ $child_output .= '</div><!-- .lsow-icon-list-item -->';
76
 
77
+ $output .= apply_filters('lsow_icon_list_item_output', $child_output, $icon_item, $settings);
78
 
79
+ endforeach;
80
+
81
+ $output .= '</div><!-- .lsow-icon-list -->';
82
+
83
+ echo apply_filters('lsow_icon_list_output', $output, $settings);
includes/widgets/lsow-odometers-widget/lsow-odometers-widget.php CHANGED
@@ -177,10 +177,13 @@ class LSOW_Odometer_Widget extends SiteOrigin_Widget {
177
  }
178
 
179
  function get_template_variables($instance, $args) {
180
- return array(
 
 
181
  'odometers' => !empty($instance['odometers']) ? $instance['odometers'] : array(),
182
- 'settings' => $instance['settings']
183
- );
 
184
  }
185
 
186
  }
177
  }
178
 
179
  function get_template_variables($instance, $args) {
180
+ $settings = $instance['settings'];
181
+
182
+ $settings = array_merge($settings, array(
183
  'odometers' => !empty($instance['odometers']) ? $instance['odometers'] : array(),
184
+ ));
185
+
186
+ return array('settings' => $settings);
187
  }
188
 
189
  }
includes/widgets/lsow-odometers-widget/tpl/default.php CHANGED
@@ -1,60 +1,65 @@
1
  <?php
2
  /**
3
- * @var $odometers
4
  * @var $settings
5
  */
6
 
7
  ?>
8
 
9
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
10
 
11
- <div class="lsow-odometers lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>">
12
 
13
- <?php foreach ($odometers as $odometer): ?>
14
 
15
- <?php
16
 
17
- $prefix = (!empty ($odometer['prefix'])) ? '<span class="prefix">' . $odometer['prefix'] . '</span>' : '';
18
- $suffix = (!empty ($odometer['suffix'])) ? '<span class="suffix">' . $odometer['suffix'] . '</span>' : '';
19
 
20
- ?>
21
 
22
- <div class="lsow-grid-item lsow-odometer">
23
 
24
- <?php echo (!empty ($odometer['prefix'])) ? '<span class="lsow-prefix">' . $odometer['prefix'] . '</span>' : ''; ?>
25
 
26
- <div class="lsow-number odometer" data-stop="<?php echo intval($odometer['stop_value']); ?>">
27
 
28
- <?php echo intval($odometer['start_value']); ?>
29
 
30
- </div>
31
 
32
- <?php echo (!empty ($odometer['suffix'])) ? '<span class="lsow-suffix">' . $odometer['suffix'] . '</span>' : ''; ?>
33
 
34
- <?php $icon_type = esc_html($odometer['icon_type']); ?>
35
 
36
- <?php if ($icon_type == 'icon_image') : ?>
37
 
38
- <?php $icon_html = '<span class="lsow-image-wrapper">' . wp_get_attachment_image($odometer['icon_image'], 'full', false, array('class' => 'lsow-image full')) . '</span>'; ?>
39
 
40
- <?php else : ?>
41
 
42
- <?php $icon_html = '<span class="lsow-icon-wrapper">' . siteorigin_widget_get_icon($odometer['icon']) . '</span>'; ?>
43
 
44
- <?php endif; ?>
45
 
46
- <div class="lsow-stats-title-wrap">
47
 
48
- <div class="lsow-stats-title"><?php echo $icon_html . esc_html($odometer['stats_title']); ?></div>
49
 
50
- </div>
51
 
52
- </div>
53
 
54
- <?php
55
 
56
- endforeach;
57
 
58
- ?>
59
 
60
- </div>
 
 
 
 
 
 
1
  <?php
2
  /**
 
3
  * @var $settings
4
  */
5
 
6
  ?>
7
 
8
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
9
 
10
+ $settings = apply_filters('lsow_odometers_' . $this->id . '_settings', $settings);
11
 
12
+ $output = '<div class="lsow-odometers lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
13
 
14
+ foreach ($settings['odometers'] as $odometer):
15
 
16
+ $prefix = (!empty ($odometer['prefix'])) ? '<span class="prefix">' . $odometer['prefix'] . '</span>' : '';
17
+ $suffix = (!empty ($odometer['suffix'])) ? '<span class="suffix">' . $odometer['suffix'] . '</span>' : '';
18
 
19
+ $child_output = '<div class="lsow-grid-item lsow-odometer">';
20
 
21
+ $child_output .= (!empty ($odometer['prefix'])) ? '<span class="lsow-prefix">' . $odometer['prefix'] . '</span>' : '';
22
 
23
+ $child_output .= '<div class="lsow-number odometer" data-stop="' . intval($odometer['stop_value']) . '">';
24
 
25
+ $child_output .= intval($odometer['start_value']);
26
 
27
+ $child_output .= '</div><!-- .lsow-number -->';
28
 
29
+ $child_output .= (!empty ($odometer['suffix'])) ? '<span class="lsow-suffix">' . $odometer['suffix'] . '</span>' : '';
30
 
31
+ $icon_type = esc_html($odometer['icon_type']);
32
 
33
+ if ($icon_type == 'icon_image') :
34
 
35
+ $icon_image = $odometer['icon_image'];
36
 
37
+ if (!empty($icon_image)):
38
 
39
+ $icon_html = '<span class="lsow-image-wrapper">' . wp_get_attachment_image($icon_image, 'full', false, array('class' => 'lsow-image full')) . '</span>';
40
 
41
+ endif;
42
 
43
+ else :
44
 
45
+ $icon_html = '<span class="lsow-icon-wrapper">' . siteorigin_widget_get_icon($odometer['icon']) . '</span>';
46
 
47
+ endif;
48
 
49
+ $child_output .= '<div class="lsow-stats-title-wrap">';
50
 
51
+ $child_output .= '<div class="lsow-stats-title">' . $icon_html . esc_html($odometer['stats_title']) . '</div>';
52
 
53
+ $child_output .= '</div>';
54
 
55
+ $child_output .= '</div><!-- .lsow-odometer -->';
56
 
57
+ $output .= apply_filters('lsow_odometer_output', $child_output, $odometer, $settings);
58
 
59
+ endforeach;
60
+
61
+ $output .= '</div><!-- .lsow-odometers -->';
62
+
63
+ $output .= '<div class="lsow-clear"></div>';
64
+
65
+ echo apply_filters('lsow_odometers_output', $output, $settings);
includes/widgets/lsow-piecharts-widget/lsow-piecharts-widget.php CHANGED
@@ -139,10 +139,13 @@ class LSOW_Piechart_Widget extends SiteOrigin_Widget {
139
  }
140
 
141
  function get_template_variables($instance, $args) {
142
- return array(
143
- 'piecharts' => !empty($instance['piecharts']) ? $instance['piecharts'] : array(),
144
- 'settings' => $instance['settings']
145
- );
 
 
 
146
  }
147
 
148
  }
139
  }
140
 
141
  function get_template_variables($instance, $args) {
142
+ $settings = $instance['settings'];
143
+
144
+ $settings = array_merge($settings, array(
145
+ 'piecharts' => !empty($instance['piecharts']) ? $instance['piecharts'] : array()
146
+ ));
147
+
148
+ return array('settings' => $settings);
149
  }
150
 
151
  }
includes/widgets/lsow-piecharts-widget/tpl/default.php CHANGED
@@ -1,41 +1,41 @@
1
  <?php
2
  /**
3
- * @var $piecharts
4
  * @var $settings
5
  */
6
 
7
  ?>
8
 
9
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
10
 
11
- <?php
12
 
13
  $bar_color = ' data-bar-color="' . esc_attr($settings['bar_color']) . '"';
14
  $track_color = ' data-track-color="' . esc_attr($settings['track_color']) . '"';
15
 
16
- ?>
17
 
18
- <div class="lsow-piecharts lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>">
19
 
20
- <?php foreach ($piecharts as $piechart): ?>
21
 
22
- <div class="lsow-grid-item lsow-piechart">
 
 
23
 
24
- <div class="lsow-percentage" <?php echo $bar_color; ?> <?php echo $track_color; ?>
25
- data-percent="<?php echo round($piechart['percentage']); ?>">
26
 
27
- <span><?php echo round($piechart['percentage']); ?><sup>%</sup></span>
28
 
29
- </div>
30
 
31
- <div class="lsow-label"><?php echo esc_html($piechart['stats_title']); ?></div>
32
 
33
- </div>
34
 
35
- <?php
36
 
37
- endforeach;
38
 
39
- ?>
40
 
41
- </div>
1
  <?php
2
  /**
 
3
  * @var $settings
4
  */
5
 
6
  ?>
7
 
8
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
9
 
10
+ $settings = apply_filters('lsow_piecharts_' . $this->id . '_settings', $settings);
11
 
12
  $bar_color = ' data-bar-color="' . esc_attr($settings['bar_color']) . '"';
13
  $track_color = ' data-track-color="' . esc_attr($settings['track_color']) . '"';
14
 
15
+ $output = '<div class="lsow-piecharts lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
16
 
17
+ foreach ($settings['piecharts'] as $piechart):
18
 
19
+ $child_output = '<div class="lsow-grid-item lsow-piechart">';
20
 
21
+ $child_output .= '<div class="lsow-percentage"'
22
+ . $bar_color . $track_color
23
+ . ' data-percent="' . round($piechart['percentage']) . '">';
24
 
25
+ $child_output .= '<span>' . round($piechart['percentage']) . '<sup>%</sup>' . '</span>';
 
26
 
27
+ $child_output .= '</div>';
28
 
29
+ $child_output .= '<div class="lsow-label">' . esc_html($piechart['stats_title']) . '</div>';
30
 
31
+ $child_output .= '</div><!-- .lsow-piechart -->';
32
 
33
+ $output .= apply_filters('lsow_piechart_output', $child_output, $piechart, $settings);
34
 
35
+ endforeach;
36
 
37
+ $output .= '</div><!-- .lsow-piecharts -->';
38
 
39
+ $output .= '<div class="lsow-clear"></div>';
40
 
41
+ echo apply_filters('lsow_piecharts_output', $output, $settings);
includes/widgets/lsow-portfolio-widget/js/portfolio.js CHANGED
@@ -6,10 +6,15 @@ jQuery(function ($) {
6
 
7
  $('.lsow-portfolio-wrap').each(function () {
8
 
 
 
 
 
 
9
  // layout Isotope after all images have loaded
10
  var html_content = $(this).find('.js-isotope');
11
 
12
- var options = html_content.data('settings');
13
 
14
  html_content.imagesLoaded(function () {
15
 
@@ -20,11 +25,6 @@ jQuery(function ($) {
20
  });
21
  });
22
 
23
- var container = $(this).find('.lsow-portfolio');
24
- if (container.length === 0) {
25
- return; // no items to filter or load and hence don't continue
26
- }
27
-
28
  /* -------------- Taxonomy Filter --------------- */
29
 
30
  $(this).find('.lsow-taxonomy-filter .lsow-filter-item a').on('click', function (e) {
6
 
7
  $('.lsow-portfolio-wrap').each(function () {
8
 
9
+ var container = $(this).find('.lsow-portfolio');
10
+ if (container.length === 0) {
11
+ return; // no items to filter or load and hence don't continue
12
+ }
13
+
14
  // layout Isotope after all images have loaded
15
  var html_content = $(this).find('.js-isotope');
16
 
17
+ var options = html_content.data('isotope-options');
18
 
19
  html_content.imagesLoaded(function () {
20
 
25
  });
26
  });
27
 
 
 
 
 
 
28
  /* -------------- Taxonomy Filter --------------- */
29
 
30
  $(this).find('.lsow-taxonomy-filter .lsow-filter-item a').on('click', function (e) {
includes/widgets/lsow-portfolio-widget/js/portfolio.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function($){if($().isotope===undefined){return}$(".lsow-portfolio-wrap").each(function(){var html_content=$(this).find(".js-isotope");var options=html_content.data("settings");html_content.imagesLoaded(function(){html_content.isotope({itemSelector:options.itemSelector,layoutMode:options.layoutMode,transitionDuration:"0.8s"})});var container=$(this).find(".lsow-portfolio");if(container.length===0){return}$(this).find(".lsow-taxonomy-filter .lsow-filter-item a").on("click",function(e){e.preventDefault();var selector=$(this).attr("data-value");container.isotope({filter:selector});$(this).closest(".lsow-taxonomy-filter").children().removeClass("lsow-active");$(this).closest(".lsow-filter-item").addClass("lsow-active");return false})})});
1
+ jQuery(function($){if($().isotope===undefined){return}$(".lsow-portfolio-wrap").each(function(){var container=$(this).find(".lsow-portfolio");if(container.length===0){return}var html_content=$(this).find(".js-isotope");var options=html_content.data("isotope-options");html_content.imagesLoaded(function(){html_content.isotope({itemSelector:options.itemSelector,layoutMode:options.layoutMode,transitionDuration:"0.8s"})});$(this).find(".lsow-taxonomy-filter .lsow-filter-item a").on("click",function(e){e.preventDefault();var selector=$(this).attr("data-value");container.isotope({filter:selector});$(this).closest(".lsow-taxonomy-filter").children().removeClass("lsow-active");$(this).closest(".lsow-filter-item").addClass("lsow-active");return false})})});
includes/widgets/lsow-portfolio-widget/lsow-portfolio-widget.php CHANGED
@@ -1,5 +1,11 @@
1
  <?php
2
 
 
 
 
 
 
 
3
  class LSOW_Portfolio_Widget extends SiteOrigin_Widget
4
  {
5
  function __construct()
@@ -240,11 +246,14 @@ class LSOW_Portfolio_Widget extends SiteOrigin_Widget
240
 
241
  function get_template_variables( $instance, $args )
242
  {
243
- return array(
 
244
  'posts' => $instance['posts'],
245
  'taxonomy_filter' => $instance['taxonomy_filter'],
246
  'heading' => $instance['heading'],
247
- 'settings' => $instance['settings'],
 
 
248
  );
249
  }
250
 
1
  <?php
2
 
3
+ /*
4
+ Widget Name: Posts Grid
5
+ Description: Display posts or custom post types in a multi-column grid.
6
+ Author: LiveMesh
7
+ Author URI: https://www.livemeshthemes.com
8
+ */
9
  class LSOW_Portfolio_Widget extends SiteOrigin_Widget
10
  {
11
  function __construct()
246
 
247
  function get_template_variables( $instance, $args )
248
  {
249
+ $settings = $instance['settings'];
250
+ $settings = array_merge( $settings, array(
251
  'posts' => $instance['posts'],
252
  'taxonomy_filter' => $instance['taxonomy_filter'],
253
  'heading' => $instance['heading'],
254
+ ) );
255
+ return array(
256
+ 'settings' => $settings,
257
  );
258
  }
259
 
includes/widgets/lsow-portfolio-widget/tpl/default.php CHANGED
@@ -1,186 +1,212 @@
1
  <?php
2
  /**
3
  * @var $settings
4
- * @var $heading
5
- * @var $taxonomy_filter
6
- * @var $posts
7
  */
8
 
9
  if (!empty($instance['title']))
10
  echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
11
 
 
 
12
  $taxonomies = array();
13
 
14
- $current_page = get_queried_object_id();
15
 
16
- $query_args = siteorigin_widget_post_selector_process_query($posts);
17
 
18
  // Use the processed post selector query to find posts.
19
  $loop = new WP_Query($query_args);
20
 
21
  // Loop through the posts and do something with them.
22
- if ($loop->have_posts()) : ?>
23
 
24
- <div class="lsow-portfolio-wrap lsow-gapless-grid">
 
25
 
26
- <?php
27
- // Check if any taxonomy filter has been applied
28
- list($chosen_terms, $taxonomies) = lsow_get_chosen_terms($query_args);
29
- if (empty($chosen_terms))
30
- $taxonomies[] = $taxonomy_filter;
31
 
32
- ?>
33
 
34
- <?php if (!empty($heading) || $settings['filterable']): ?>
35
 
36
- <?php $header_class = (trim($heading) === '') ? ' lsow-no-heading' : ''; ?>
37
 
38
- <div class="lsow-portfolio-header <?php echo $header_class; ?>">
39
 
40
- <?php if (!empty($heading)) : ?>
41
 
42
- <h3 class="lsow-heading"><?php echo wp_kses_post($heading); ?></h3>
43
 
44
- <?php endif; ?>
45
 
46
- <?php
 
47
 
48
- if ($settings['filterable'])
49
- echo lsow_get_taxonomy_terms_filter($taxonomies, $chosen_terms);
50
 
51
- ?>
52
 
53
- </div>
54
 
55
- <?php endif; ?>
 
 
56
 
57
- <div class="lsow-portfolio js-isotope lsow-<?php echo $settings['layout_mode']; ?> lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>"
58
- data-settings='{ "itemSelector": ".lsow-portfolio-item", "layoutMode": "<?php echo esc_attr($settings['layout_mode']); ?>" }'>
59
 
60
- <?php while ($loop->have_posts()) : $loop->the_post(); ?>
61
 
62
- <?php
63
- if (get_the_ID() === $current_page)
64
- continue; // skip the current page since they can run into infinite loop when users choose All option in build query
65
- ?>
66
 
67
- <?php
 
68
 
69
- $style = '';
70
 
71
- foreach ($taxonomies as $taxonomy) {
72
 
73
- $terms = get_the_terms(get_the_ID(), $taxonomy);
74
 
75
- if (!empty($terms) && !is_wp_error($terms)) {
76
 
77
- foreach ($terms as $term) {
78
- $style .= ' term-' . $term->term_id;
79
- }
80
- }
81
  }
82
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
- <div data-id="id-<?php the_ID(); ?>"
85
- class="lsow-grid-item lsow-portfolio-item <?php echo $style; ?>">
 
 
 
86
 
87
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
88
 
89
- <?php if ($thumbnail_exists = has_post_thumbnail()): ?>
90
 
91
- <div class="lsow-project-image">
92
 
93
- <?php if ($settings['image_linkable']): ?>
94
 
95
- <a href="<?php the_permalink(); ?>"
96
- target="<?php echo $settings['link_target']; ?>"><?php the_post_thumbnail($settings['image_size']); ?></a>
97
 
98
- <?php else: ?>
99
 
100
- <?php the_post_thumbnail($settings['image_size']); ?>
101
 
102
- <?php endif; ?>
103
 
104
- <div class="lsow-image-info">
105
 
106
- <div class="lsow-entry-info">
107
 
108
- <?php the_title('<h3 class="lsow-post-title"><a target="' . $settings["link_target"] . '" href="' . get_permalink() . '" title="' . get_the_title() . '"
109
- rel="bookmark">', '</a></h3>'); ?>
110
 
111
- <?php echo lsow_get_info_for_taxonomies($taxonomies); ?>
112
 
113
- </div>
 
 
 
 
114
 
115
- </div>
116
 
117
- </div>
118
 
119
- <?php endif; ?>
120
 
121
- <?php if ($settings['display_title'] || $settings['display_summary']) : ?>
122
 
123
- <div class="lsow-entry-text-wrap <?php echo($thumbnail_exists ? '' : ' nothumbnail'); ?>">
124
 
125
- <?php if ($settings['display_title']) : ?>
126
 
127
- <?php the_title('<h3 class="entry-title"><a target="' . $settings["link_target"] . '" href="' . get_permalink() . '" title="' . get_the_title() . '"
128
- rel="bookmark">', '</a></h3>'); ?>
129
 
130
- <?php endif; ?>
131
 
132
- <?php if ($settings['post_meta']['display_post_date'] || $settings['post_meta']['display_author'] || $settings['post_meta']['display_taxonomy']) : ?>
133
 
134
- <div class="lsow-entry-meta">
135
 
136
- <?php if ($settings['post_meta']['display_author']): ?>
137
 
138
- <?php echo lsow_entry_author(); ?>
139
 
140
- <?php endif; ?>
141
 
142
- <?php if ($settings['post_meta']['display_post_date']): ?>
143
 
144
- <?php echo lsow_entry_published(); ?>
145
 
146
- <?php endif; ?>
147
 
148
- <?php if ($settings['post_meta']['display_taxonomy']): ?>
149
 
150
- <?php echo lsow_get_info_for_taxonomies($taxonomies); ?>
151
 
152
- <?php endif; ?>
153
 
154
- </div>
155
 
156
- <?php endif; ?>
157
 
158
- <?php if ($settings['display_summary']) : ?>
159
 
160
- <div class="entry-summary">
161
 
162
- <?php the_excerpt(); ?>
163
 
164
- </div>
165
 
166
- <?php endif; ?>
167
 
168
- </div>
169
 
170
- <?php endif; ?>
171
 
172
- </article>
173
- <!-- .hentry -->
174
 
175
- </div><!--Isotope element -->
176
 
177
- <?php endwhile; ?>
178
 
179
- <?php wp_reset_postdata(); ?>
180
 
181
- </div>
182
- <!-- Isotope items -->
183
 
184
- </div>
185
 
186
- <?php endif; ?>
1
  <?php
2
  /**
3
  * @var $settings
 
 
 
4
  */
5
 
6
  if (!empty($instance['title']))
7
  echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+ $settings = apply_filters('lsow_posts_grid_' . $this->id . '_settings', $settings);
10
+
11
  $taxonomies = array();
12
 
13
+ $query_args = siteorigin_widget_post_selector_process_query($settings['posts']);
14
 
15
+ $query_args = apply_filters('lsow_posts_grid_' . $this->id . '_query_args', $query_args, $settings);
16
 
17
  // Use the processed post selector query to find posts.
18
  $loop = new WP_Query($query_args);
19
 
20
  // Loop through the posts and do something with them.
21
+ if ($loop->have_posts()) :
22
 
23
+ // Check if any taxonomy filter has been applied
24
+ list($chosen_terms, $taxonomies) = lsow_get_chosen_terms($query_args);
25
 
26
+ if (empty($chosen_terms))
27
+ $taxonomies[] = $settings['taxonomy_filter'];
 
 
 
28
 
29
+ $output = '<div class="lsow-portfolio-wrap lsow-gapless-grid">';
30
 
31
+ if (!empty($settings['heading']) || $settings['filterable']):
32
 
33
+ $header_class = (trim($settings['heading']) === '') ? ' lsow-no-heading' : '';
34
 
35
+ $grid_header = '<div class="lsow-portfolio-header ' . $header_class . '">';
36
 
37
+ if (!empty($settings['heading'])) :
38
 
39
+ $grid_header .= '<h3 class="lsow-heading">' . wp_kses_post($settings['heading']) . '</h3>';
40
 
41
+ endif;
42
 
43
+ if ($settings['filterable'])
44
+ $grid_header .= lsow_get_taxonomy_terms_filter($taxonomies, $chosen_terms);
45
 
46
+ $grid_header .= '</div>';
 
47
 
48
+ $output .= apply_filters('lsow_posts_grid_header', $grid_header, $settings);
49
 
50
+ endif;
51
 
52
+ $output .= '<div id="lsow-portfolio-' . uniqid()
53
+ . '" class="lsow-portfolio js-isotope lsow-' . esc_attr($settings['layout_mode']) . ' lsow-grid-container ' . lsow_get_grid_classes($settings)
54
+ . '" data-isotope-options=\'{ "itemSelector": ".lsow-portfolio-item", "layoutMode": "' . esc_attr($settings['layout_mode']) . '"}\'>';
55
 
56
+ $current_page = get_queried_object_id();
 
57
 
58
+ while ($loop->have_posts()) : $loop->the_post();
59
 
60
+ $post_id = get_the_ID();
 
 
 
61
 
62
+ if ($post_id === $current_page)
63
+ continue; // skip current page since we can run into infinite loop when users choose All option in build query
64
 
65
+ $style = '';
66
 
67
+ foreach ($taxonomies as $taxonomy) {
68
 
69
+ $terms = get_the_terms($post_id, $taxonomy);
70
 
71
+ if (!empty($terms) && !is_wp_error($terms)) {
72
 
73
+ foreach ($terms as $term) {
74
+ $style .= ' term-' . $term->term_id;
 
 
75
  }
76
+ }
77
+ }
78
+
79
+ $entry_output = '<div data-id="id-' . $post_id . '" class="lsow-grid-item lsow-portfolio-item ' . $style . '">';
80
+
81
+ $entry_output .= '<article id="post-' . $post_id . '" class="' . join(' ', get_post_class('', $post_id)) . '">';
82
+
83
+ if ($thumbnail_exists = has_post_thumbnail()):
84
+
85
+ $entry_image = '<div class="lsow-project-image">';
86
+
87
+ if ($settings['image_linkable']):
88
+
89
+ $thumbnail_html = '<a href="' . get_the_permalink()
90
+ . '" target="' . $settings['link_target']
91
+ . '">' . get_the_post_thumbnail($post_id, $settings['image_size'])
92
+ . '</a>';
93
+
94
+ else:
95
+
96
+ $thumbnail_html = get_the_post_thumbnail($post_id, $settings['image_size']);
97
+
98
+ endif;
99
+
100
+ $entry_image .= apply_filters('lsow_posts_grid_thumbnail_html', $thumbnail_html, $post_id, $settings);
101
+
102
+ $image_info = '<div class="lsow-image-info">';
103
+
104
+ $image_info .= '<div class="lsow-entry-info">';
105
+
106
+ $image_info .= '<h3 class="lsow-post-title">';
107
 
108
+ $image_info .= '<a href="' . get_permalink()
109
+ . '" title="' . get_the_title()
110
+ . '" target="' . $settings["link_target"]
111
+ . '" rel="bookmark">' . get_the_title()
112
+ . '</a>';
113
 
114
+ $image_info .= '</h3>';
115
 
116
+ $image_info .= lsow_get_info_for_taxonomies($taxonomies);
117
 
118
+ $image_info .= '</div>';
119
 
120
+ $image_info .= '</div><!-- .lsow-image-info -->';
121
 
122
+ $entry_image .= apply_filters('lsow_posts_grid_image_info', $image_info, $post_id, $settings);
 
123
 
124
+ $entry_image .= '</div>';
125
 
126
+ $entry_output .= apply_filters('lsow_posts_grid_entry_image', $entry_image, $post_id, $settings);
127
 
128
+ endif;
129
 
130
+ if (($settings['display_title']) || ($settings['display_summary'])) :
131
 
132
+ $entry_text = '<div class="lsow-entry-text-wrap ' . ($thumbnail_exists ? '' : ' nothumbnail') . '">';
133
 
134
+ if ($settings['display_title']) :
 
135
 
136
+ $entry_title = '<h3 class="entry-title">';
137
 
138
+ $entry_title .= '<a href="' . get_permalink()
139
+ . '" title="' . get_the_title()
140
+ . '" target="' . $settings["link_target"]
141
+ . '" rel="bookmark">' . get_the_title()
142
+ . '</a>';
143
 
144
+ $entry_title .= '</h3>';
145
 
146
+ $entry_text .= apply_filters('lsow_posts_grid_entry_title', $entry_title, $post_id, $settings);
147
 
148
+ endif;
149
 
150
+ if (($settings['post_meta']['display_post_date']) || ($settings['post_meta']['display_author']) || ($settings['post_meta']['display_taxonomy'])) :
151
 
152
+ $entry_meta = '<div class="lsow-entry-meta">';
153
 
154
+ if ($settings['post_meta']['display_author']):
155
 
156
+ $entry_meta .= lsow_entry_author();
 
157
 
158
+ endif;
159
 
160
+ if ($settings['post_meta']['display_post_date']):
161
 
162
+ $entry_meta .= lsow_entry_published();
163
 
164
+ endif;
165
 
166
+ if ($settings['post_meta']['display_taxonomy']):
167
 
168
+ $entry_meta .= lsow_get_info_for_taxonomies($taxonomies);
169
 
170
+ endif;
171
 
172
+ $entry_meta .= '</div>';
173
 
174
+ $entry_text .= apply_filters('lsow_posts_grid_entry_meta', $entry_meta, $post_id, $settings);
175
 
176
+ endif;
177
 
178
+ if ($settings['display_summary']) :
179
 
180
+ $excerpt = '<div class="entry-summary">';
181
 
182
+ $excerpt .= get_the_excerpt();
183
 
184
+ $excerpt .= '</div>';
185
 
186
+ $entry_text .= apply_filters('lsow_posts_grid_entry_excerpt', $excerpt, $post_id, $settings);
187
 
188
+ endif;
189
 
190
+ $entry_text .= '</div>';
191
 
192
+ $entry_output .= apply_filters('lsow_posts_grid_entry_text', $entry_text, $post_id, $settings);
193
 
194
+ endif;
195
 
196
+ $entry_output .= '</article><!-- .hentry -->';
197
 
198
+ $entry_output .= '</div>';
199
 
200
+ $output .= apply_filters('lsow_posts_grid_entry_output', $entry_output, $post_id, $settings);
 
201
 
202
+ endwhile;
203
 
204
+ wp_reset_postdata();
205
 
206
+ $output .= '</div><!-- .lsow-portfolio -->';
207
 
208
+ $output .= '</div><!-- .lsow-portfolio-wrap -->';
 
209
 
210
+ echo apply_filters('lsow_posts_grid_output', $output, $settings);
211
 
212
+ endif;
includes/widgets/lsow-posts-carousel-widget/lsow-posts-carousel-widget.php CHANGED
@@ -318,22 +318,24 @@ class LSOW_Posts_Carousel_Widget extends SiteOrigin_Widget {
318
 
319
  function get_template_variables($instance, $args) {
320
 
321
- $return = array(
 
 
322
  'posts' => $instance['posts'],
323
- 'settings' => $instance['settings'],
324
  'carousel_settings' => $instance['carousel_settings']
325
- );
 
 
326
 
327
- unset($return['carousel_settings']['responsive']);
 
 
 
 
 
328
 
329
- $return['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
330
- $return['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
331
- $return['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
332
- $return['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
333
- $return['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
334
- $return['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
335
 
336
- return $return;
337
  }
338
 
339
  }
318
 
319
  function get_template_variables($instance, $args) {
320
 
321
+ $settings = $instance['settings'];
322
+
323
+ $settings = array_merge($settings, array(
324
  'posts' => $instance['posts'],
 
325
  'carousel_settings' => $instance['carousel_settings']
326
+ ));
327
+
328
+ unset($settings['carousel_settings']['responsive']);
329
 
330
+ $settings['carousel_settings']['tablet_width'] = $instance['carousel_settings']['responsive']['tablet']['width'];
331
+ $settings['carousel_settings']['tablet_display_columns'] = $instance['carousel_settings']['responsive']['tablet']['display_columns'];
332
+ $settings['carousel_settings']['tablet_scroll_columns'] = $instance['carousel_settings']['responsive']['tablet']['scroll_columns'];
333
+ $settings['carousel_settings']['mobile_width'] = $instance['carousel_settings']['responsive']['mobile']['width'];
334
+ $settings['carousel_settings']['mobile_display_columns'] = intval($instance['carousel_settings']['responsive']['mobile']['display_columns']);
335
+ $settings['carousel_settings']['mobile_scroll_columns'] = $instance['carousel_settings']['responsive']['mobile']['scroll_columns'];
336
 
337
+ return array('settings' => $settings);
 
 
 
 
 
338
 
 
339
  }
340
 
341
  }
includes/widgets/lsow-posts-carousel-widget/tpl/default.php CHANGED
@@ -1,137 +1,165 @@
1
  <?php
2
  /**
3
- * @var $carousel_settings
4
  * @var $settings
5
- * @var $posts
6
  */
7
 
8
  if (!empty($instance['title']))
9
  echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
10
 
 
 
 
11
  $taxonomies = array();
12
 
13
- $query_args = siteorigin_widget_post_selector_process_query($posts);
 
 
14
 
15
  // Use the processed post selector query to find posts.
16
  $loop = new WP_Query($query_args);
17
 
18
  // Loop through the posts and do something with them.
19
- if ($loop->have_posts()) : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
- <div class="lsow-posts-carousel lsow-container" <?php foreach ($carousel_settings as $key => $val) : ?>
22
- <?php if (!empty($val)) : ?>
23
- data-<?php echo $key . '="' . esc_attr($val) . '"' ?>
24
- <?php endif ?>
25
- <?php endforeach; ?>>
26
 
27
- <?php
28
- // Check if any taxonomy filter has been applied
29
- list($chosen_terms, $taxonomies) = lsow_get_chosen_terms($query_args);
30
- if (empty($chosen_terms))
31
- $taxonomies[] = $settings['taxonomy_chosen'];
32
 
33
- ?>
34
 
35
- <?php while ($loop->have_posts()) : $loop->the_post(); ?>
36
 
37
- <div data-id="id-<?php the_ID(); ?>" class="lsow-posts-carousel-item">
38
 
39
- <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
40
 
41
- <?php if ($thumbnail_exists = has_post_thumbnail()): ?>
 
 
 
 
42
 
43
- <div class="lsow-project-image">
44
 
45
- <?php if ($settings['image_linkable']): ?>
46
 
47
- <a href="<?php the_permalink(); ?>"
48
- target="<?php echo $settings['link_target']; ?>"><?php the_post_thumbnail($settings['image_size']); ?></a>
49
 
50
- <?php else: ?>
51
 
52
- <?php the_post_thumbnail($settings['image_size']); ?>
53
 
54
- <?php endif; ?>
55
 
56
- <div class="lsow-image-info">
57
 
58
- <div class="lsow-entry-info">
59
 
60
- <?php the_title('<h3 class="lsow-post-title"><a target="' . $settings["link_target"] . '" href="' . get_permalink() . '" title="' . get_the_title() . '"
61
- rel="bookmark">', '</a></h3>'); ?>
62
 
63
- <?php echo lsow_get_info_for_taxonomies($taxonomies); ?>
64
 
65
- </div>
66
 
67
- </div>
68
 
69
- <div class="lsow-image-overlay"></div>
 
 
 
 
70
 
71
- </div>
72
 
73
- <?php endif; ?>
74
 
75
- <?php if ($settings['display_title'] || $settings['display_summary']) : ?>
76
 
77
- <div class="lsow-entry-text-wrap <?php echo($thumbnail_exists ? '' : ' nothumbnail'); ?>">
78
 
79
- <?php if ($settings['display_title']) : ?>
80
 
81
- <?php the_title('<h3 class="entry-title"><a target="' . $settings["link_target"] . '" href="' . get_permalink() . '" title="' . get_the_title() . '"
82
- rel="bookmark">', '</a></h3>'); ?>
83
 
84
- <?php endif; ?>
85
 
86
- <?php if ($settings['post_meta']['display_post_date'] || $settings['post_meta']['display_author'] || $settings['post_meta']['display_taxonomy']) : ?>
87
 
88
- <div class="lsow-entry-meta">
89
 
90
- <?php if ($settings['post_meta']['display_author']): ?>
91
 
92
- <?php echo lsow_entry_author(); ?>
93
 
94
- <?php endif; ?>
95
 
96
- <?php if ($settings['post_meta']['display_post_date']): ?>
97
 
98
- <?php echo lsow_entry_published(); ?>
99
 
100
- <?php endif; ?>
101
 
102
- <?php if ($settings['post_meta']['display_taxonomy']): ?>
103
 
104
- <?php echo lsow_get_info_for_taxonomies($taxonomies); ?>
105
 
106
- <?php endif; ?>
107
 
108
- </div>
109
 
110
- <?php endif; ?>
111
 
112
- <?php if ($settings['display_summary']) : ?>
113
 
114
- <div class="entry-summary">
115
 
116
- <?php the_excerpt(); ?>
117
 
118
- </div>
119
 
120
- <?php endif; ?>
121
 
122
- </div>
123
 
124
- <?php endif; ?>
125
 
126
- </article>
127
- <!-- .hentry -->
128
 
129
- </div><!--.lsow-posts-carousel-item -->
130
 
131
- <?php endwhile; ?>
132
 
133
- <?php wp_reset_postdata(); ?>
134
 
135
- </div> <!-- .lsow-posts-carousel -->
136
 
137
- <?php endif; ?>
1
  <?php
2
  /**
 
3
  * @var $settings
 
4
  */
5
 
6
  if (!empty($instance['title']))
7
  echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+
10
+ $settings = apply_filters('lsow_posts_carousel_' . $this->id . '_settings', $settings);
11
+
12
  $taxonomies = array();
13
 
14
+ $query_args = siteorigin_widget_post_selector_process_query($settings['posts']);
15
+
16
+ $query_args = apply_filters('lsow_posts_carousel_'. $this->id . '_query_args', $query_args, $settings);
17
 
18
  // Use the processed post selector query to find posts.
19
  $loop = new WP_Query($query_args);
20
 
21
  // Loop through the posts and do something with them.
22
+ if ($loop->have_posts()) :
23
+
24
+ $output = '<div id="lsow-posts-carousel-' . uniqid()
25
+ . '" class="lsow-posts-carousel lsow-container" data-settings=\'' . wp_json_encode($settings['carousel_settings']) . '\'>';
26
+
27
+ // Check if any taxonomy filter has been applied
28
+ list($chosen_terms, $taxonomies) = lsow_get_chosen_terms($query_args);
29
+ if (empty($chosen_terms))
30
+ $taxonomies[] = $settings['taxonomy_chosen'];
31
+
32
+ while ($loop->have_posts()) : $loop->the_post();
33
+
34
+ $post_id = get_the_ID();
35
+
36
+ $entry_output = '<div data-id="id-' . $post_id . '" class="lsow-posts-carousel-item">';
37
+
38
+ $entry_output .= '<article id="post-' . $post_id . '" class="' . join(' ', get_post_class('', $post_id)) . '">';
39
+
40
+ if ($thumbnail_exists = has_post_thumbnail()):
41
+
42
+ $entry_image = '<div class="lsow-project-image">';
43
+
44
+ if ($settings['image_linkable']):
45
+
46
+ $thumbnail_html = '<a href="' . get_the_permalink()
47
+ . '" target="' . $settings['link_target']
48
+ . '">' . get_the_post_thumbnail($post_id, $settings['image_size'])
49
+ . '</a>';
50
+
51
+ else:
52
 
53
+ $thumbnail_html = get_the_post_thumbnail($post_id, $settings['image_size']);
 
 
 
 
54
 
55
+ endif;
 
 
 
 
56
 
57
+ $entry_image .= apply_filters('lsow_posts_carousel_thumbnail_html', $thumbnail_html, $post_id, $settings);
58
 
59
+ $image_info = '<div class="lsow-image-info">';
60
 
61
+ $image_info .= '<div class="lsow-entry-info">';
62
 
63
+ $image_info .= '<h3 class="lsow-post-title">';
64
 
65
+ $image_info .= '<a href="' . get_permalink()
66
+ . '" title="' . get_the_title()
67
+ . '" target="' . $settings["link_target"]
68
+ . '" rel="bookmark">' . get_the_title()
69
+ . '</a>';
70
 
71
+ $image_info .= '</h3>';
72
 
73
+ $image_info .= lsow_get_info_for_taxonomies($taxonomies);
74
 
75
+ $image_info .= '</div>';
 
76
 
77
+ $image_info .= '</div><!-- .lsow-image-info -->';
78
 
79
+ $entry_image .= apply_filters('lsow_posts_carousel_image_info', $image_info, $post_id, $settings);
80
 
81
+ $entry_image .= '</div>';
82
 
83
+ $entry_output .= apply_filters('lsow_posts_carousel_entry_image', $entry_image, $post_id, $settings);
84
 
85
+ endif;
86
 
87
+ if (($settings['display_title']) || ($settings['display_summary'])) :
 
88
 
89
+ $entry_output .= '<div class="lsow-entry-text-wrap ' . ($thumbnail_exists ? '' : ' nothumbnail') . '">';
90
 
91
+ if ($settings['display_title']) :
92
 
93
+ $entry_title = '<h3 class="entry-title">';
94
 
95
+ $entry_title .= '<a href="' . get_permalink()
96
+ . '" title="' . get_the_title()
97
+ . '" target="' . $settings["link_target"]
98
+ . '" rel="bookmark">' . get_the_title()
99
+ . '</a>';
100
 
101
+ $entry_title .= '</h3>';
102
 
103
+ $entry_output .= apply_filters('lsow_posts_carousel_entry_title', $entry_title, $post_id, $settings);
104
 
105
+ endif;
106
 
107
+ if (($settings['post_meta']['display_post_date']) || ($settings['post_meta']['display_author']) || ($settings['post_meta']['display_taxonomy'])) :
108
 
109
+ $entry_meta = '<div class="lsow-entry-meta">';
110
 
111
+ if ($settings['post_meta']['display_author']):
 
112
 
113
+ $entry_meta .= lsow_entry_author();
114
 
115
+ endif;
116
 
117
+ if ($settings['post_meta']['display_post_date']):
118
 
119
+ $entry_meta .= lsow_entry_published();
120
 
121
+ endif;
122
 
123
+ if ($settings['post_meta']['display_taxonomy']):
124
 
125
+ $entry_meta .= lsow_get_info_for_taxonomies($taxonomies);
126
 
127
+ endif;
128
 
129
+ $entry_meta .= '</div>';
130
 
131
+ $entry_output .= apply_filters('lsow_posts_carousel_entry_meta', $entry_meta, $post_id, $settings);
132
 
133
+ endif;
134
 
135
+ if ($settings['display_summary']) :
136
 
137
+ $excerpt = '<div class="entry-summary">';
138
 
139
+ $excerpt .= get_the_excerpt();
140
 
141
+ $excerpt .= '</div>';
142
 
143
+ $entry_output .= apply_filters('lsow_posts_carousel_entry_excerpt', $excerpt, $post_id, $settings);
144
 
145
+ endif;
146
 
147
+ $entry_output .= '</div>';
148
 
149
+ endif;
150
 
151
+ $entry_output .= '</article><!-- .hentry -->';
152
 
153
+ $entry_output .= '</div><!-- .lsow-posts-carousel-item -->';
154
 
155
+ $output .= apply_filters('lsow_posts_carousel_entry_output', $entry_output, $post_id, $settings);
 
156
 
157
+ endwhile;
158
 
159
+ wp_reset_postdata();
160
 
161
+ $output .= '</div><!-- .lsow-posts-carousel -->';
162
 
163
+ echo apply_filters('lsow_posts_carousel_output', $output, $settings);
164
 
165
+ endif;
includes/widgets/lsow-pricing-table-widget/lsow-pricing-table-widget.php CHANGED
@@ -166,10 +166,13 @@ class LSOW_Pricing_Table_Widget extends SiteOrigin_Widget {
166
  }
167
 
168
  function get_template_variables($instance, $args) {
169
- return array(
170
- 'pricing_plans' => !empty($instance['pricing-plans']) ? $instance['pricing-plans'] : array(),
171
- 'settings' => $instance['settings']
172
- );
 
 
 
173
  }
174
 
175
  }
166
  }
167
 
168
  function get_template_variables($instance, $args) {
169
+ $settings = $instance['settings'];
170
+
171
+ $settings = array_merge($settings, array(
172
+ 'pricing_plans' => !empty($instance['pricing-plans']) ? $instance['pricing-plans'] : array()
173
+ ));
174
+
175
+ return array('settings' => $settings);
176
  }
177
 
178
  }
includes/widgets/lsow-pricing-table-widget/tpl/default.php CHANGED
@@ -1,120 +1,104 @@
1
  <?php
2
  /**
3
- * @var $pricing_plans
4
  * @var $settings
5
  */
6
 
7
- ?>
 
8
 
9
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
10
 
11
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($settings['animation']); ?>
 
12
 
13
- <div class="lsow-pricing-table lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>">
14
 
15
- <?php
16
 
17
- foreach ($pricing_plans as $pricing_plan) :
 
 
 
 
 
 
 
18
 
19
- $pricing_title = esc_html($pricing_plan['pricing_title']);
20
- $tagline = esc_html($pricing_plan['tagline']);
21
- $price_tag = htmlspecialchars_decode(wp_kses_post($pricing_plan['price_tag']));
22
- $pricing_img = $pricing_plan['image'];
23
- $pricing_url = (empty($pricing_plan['url'])) ? '#' : sow_esc_url($pricing_plan['url']);
24
- $pricing_button_text = esc_html($pricing_plan['button_text']);
25
- $button_new_window = esc_html($pricing_plan['button_new_window']);
26
- $highlight = esc_html($pricing_plan['highlight']);
27
-
28
- $price_tag = (empty($price_tag)) ? '' : $price_tag;
29
 
30
- ?>
31
 
32
- <div
33
- class="lsow-grid-item lsow-pricing-plan <?php echo(!empty($highlight) ? ' lsow-highlight' : ''); ?> <?php echo $animate_class; ?>"<?php echo $animation_attr; ?>>
34
 
35
- <div class="lsow-top-header">
36
 
37
- <?php if (!empty($tagline))
38
- echo '<p class="lsow-tagline center">' . $tagline . '</p>'; ?>
39
 
40
- <h3 class="lsow-center"><?php echo $pricing_title; ?></h3>
41
 
42
- <?php
 
43
 
44
- if (!empty($pricing_img)) :
45
- echo wp_get_attachment_image($pricing_img, 'full', false, array('class' => 'lsow-image full', 'alt' => $pricing_title));
46
- endif;
47
 
48
- ?>
49
 
50
- </div>
51
 
52
- <h4 class="lsow-plan-price lsow-plan-header lsow-center">
53
 
54
- <span class="lsow-text">
55
 
56
- <?php echo wp_kses_post($price_tag); ?>
57
 
58
- </span>
59
 
60
- </h4>
61
 
62
- <div class="lsow-plan-details">
63
 
64
- <?php
65
 
66
- foreach ($pricing_plan['items'] as $pricing_item) : ?>
67
 
68
- <div class="lsow-pricing-item">
69
 
70
- <div class="lsow-title">
 
 
71
 
72
- <?php echo htmlspecialchars_decode(wp_kses_post($pricing_item['title'])); ?>
73
 
74
- </div>
75
 
76
- <div class="lsow-value-wrap">
77
 
78
- <?php
79
 
80
- if (!empty($pricing_item['icon_new'])) {
81
- echo siteorigin_widget_get_icon($pricing_item['icon_new']);
82
- }
83
 
84
- ?>
85
-
86
- <div class="lsow-value">
87
-
88
- <?php echo htmlspecialchars_decode(wp_kses_post($pricing_item['value'])); ?>
89
-
90
- </div>
91
-
92
- </div>
93
-
94
- </div>
95
-
96
- <?php endforeach; ?>
97
 
98
- </div>
99
- <!-- .lsow-plan-details -->
100
 
101
- <div class="lsow-purchase">
102
 
103
- <a class="lsow-button default" href="<?php echo esc_url($pricing_url); ?>"
104
- <?php if (!empty($button_new_window))
105
- echo 'target="_blank"'; ?>><?php echo esc_html($pricing_button_text); ?></a>
 
106
 
107
- </div>
108
 
109
- </div>
110
- <!-- .lsow-pricing-plan -->
111
 
112
- <?php
113
 
114
- endforeach;
115
 
116
- ?>
117
 
118
- </div><!-- .lsow-pricing-table -->
119
 
120
- <div class="lsow-clear"></div>
1
  <?php
2
  /**
 
3
  * @var $settings
4
  */
5
 
6
+ if (!empty($instance['title']))
7
+ echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+ $settings = apply_filters('lsow_pricing_table_' . $this->id . '_settings', $settings);
10
 
11
+ if (empty($settings['pricing_plans']))
12
+ return;
13
 
14
+ $output = '<div class="lsow-pricing-table lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
15
 
16
+ foreach ($settings['pricing_plans'] as $pricing_plan) :
17
 
18
+ $pricing_title = esc_html($pricing_plan['pricing_title']);
19
+ $tagline = esc_html($pricing_plan['tagline']);
20
+ $price_tag = htmlspecialchars_decode(wp_kses_post($pricing_plan['price_tag']));
21
+ $pricing_img = $pricing_plan['image'];
22
+ $pricing_url = (empty($pricing_plan['url'])) ? '#' : sow_esc_url($pricing_plan['url']);
23
+ $pricing_button_text = esc_html($pricing_plan['button_text']);
24
+ $button_new_window = esc_html($pricing_plan['button_new_window']);
25
+ $highlight = esc_html($pricing_plan['highlight']);
26
 
27
+ $price_tag = (empty($price_tag)) ? '' : $price_tag;
 
 
 
 
 
 
 
 
 
28
 
29
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($pricing_plan['animation']);
30
 
31
+ $child_output = '<div class="lsow-grid-item lsow-pricing-plan ' . ($highlight ? ' lsow-highlight' : '') . ' ' . $animate_class . '" ' . $animation_attr . '>';
 
32
 
33
+ $child_output .= '<div class="lsow-top-header">';
34
 
35
+ if (!empty($tagline))
36
+ $child_output .= '<p class="lsow-tagline center">' . $tagline . '</p>';
37
 
38
+ $child_output .= '<h3 class="lsow-plan-name lsow-center">' . $pricing_title . '</h3>';
39
 
40
+ if (!empty($pricing_img)) :
41
+ $child_output .= wp_get_attachment_image($pricing_img, 'full', false, array('class' => 'lsow-image full', 'alt' => $pricing_title));
42
 
43
+ endif;
 
 
44
 
45
+ $child_output .= '</div>';
46
 
47
+ $child_output .= '<h4 class="lsow-plan-price lsow-plan-header lsow-center">';
48
 
49
+ $child_output .= '<span class="lsow-text">' . wp_kses_post($price_tag) . '</span>';
50
 
51
+ $child_output .= '</h4>';
52
 
53
+ $child_output .= '<div class="lsow-plan-details">';
54
 
55
+ foreach ($pricing_plan['items'] as $pricing_item) :
56
 
57
+ $child_output .= '<div class="lsow-pricing-item">';
58
 
59
+ $child_output .= '<div class="lsow-title">';
60
 
61
+ $child_output .= htmlspecialchars_decode(wp_kses_post($pricing_item['title']));
62
 
63
+ $child_output .= '</div>';
64
 
65
+ $child_output .= '<div class="lsow-value-wrap">';
66
 
67
+ if (!empty($pricing_item['icon_new'])) {
68
+ $child_output .= siteorigin_widget_get_icon($pricing_item['icon_new']);
69
+ }
70
 
71
+ $child_output .= '<div class="lsow-value">';
72
 
73
+ $child_output .= htmlspecialchars_decode(wp_kses_post($pricing_item['value']));
74
 
75
+ $child_output .= '</div>';
76
 
77
+ $child_output .= '</div>';
78
 
79
+ $child_output .= '</div>';
 
 
80
 
81
+ endforeach;
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
+ $child_output .= '</div><!-- .lsow-plan-details -->';
 
84
 
85
+ $child_output .= '<div class="lsow-purchase">';
86
 
87
+ $child_output .= '<a class="lsow-button default" href="' . esc_url($pricing_url)
88
+ . '"' . (!empty($button_new_window) ? ' target="_blank"' : '')
89
+ . '>' . esc_html($pricing_button_text)
90
+ . '</a>';
91
 
92
+ $child_output .= '</div>';
93
 
94
+ $child_output .= '</div><!-- .lsow-pricing-plan -->';
 
95
 
96
+ $output .= apply_filters('lsow_pricing_plan_output', $child_output, $pricing_plan, $settings);
97
 
98
+ endforeach;
99
 
100
+ $output .= '</div><!-- .lsow-pricing-table -->';
101
 
102
+ $output .= '<div class="lsow-clear"></div>';
103
 
104
+ echo apply_filters('lsow_pricing_table_output', $output, $settings);
includes/widgets/lsow-services-widget/lsow-services-widget.php CHANGED
@@ -211,12 +211,15 @@ class LSOW_Services_Widget extends SiteOrigin_Widget {
211
  }
212
 
213
  function get_template_variables($instance, $args) {
214
- return array(
 
 
215
  'style' => $instance['style'],
216
  'icon_type' => $instance['icon_type'],
217
- 'services' => !empty($instance['services']) ? $instance['services'] : array(),
218
- 'settings' => $instance['settings']
219
- );
 
220
  }
221
 
222
  }
211
  }
212
 
213
  function get_template_variables($instance, $args) {
214
+ $settings = $instance['settings'];
215
+
216
+ $settings = array_merge($settings, array(
217
  'style' => $instance['style'],
218
  'icon_type' => $instance['icon_type'],
219
+ 'services' => !empty($instance['services']) ? $instance['services'] : array()
220
+ ));
221
+
222
+ return array('settings' => $settings);
223
  }
224
 
225
  }
includes/widgets/lsow-services-widget/tpl/default.php CHANGED
@@ -1,105 +1,112 @@
1
  <?php
2
  /**
3
  * @var $settings
4
- * @var $style
5
- * @var $icon_type
6
- * @var $services
7
  */
8
 
 
 
 
 
 
9
  if (!empty($settings['target']))
10
  $target = 'target="_blank"';
11
  else
12
  $target = '';
13
 
14
- ?>
 
 
 
 
 
 
15
 
16
- <?php if (!empty($instance['title']))
17
- echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
18
 
19
- <?php $id = 'id="' . $this->id . '"'; ?>
20
 
21
- <div <?php echo $id; ?> class="lsow-services lsow-<?php echo $style; ?> lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>">
22
 
23
- <?php foreach ($services as $service): ?>
24
 
25
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($service['animation']); ?>
26
 
27
- <?php $service_url = sow_esc_url($service['href']); ?>
28
 
29
- <div class="lsow-grid-item lsow-service-wrapper">
30
 
31
- <div class="lsow-service <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>
32
 
33
- <?php if ($icon_type == 'icon_image') : ?>
34
 
35
- <?php if (empty($service_url)) : ?>
36
 
37
- <div class="lsow-image-wrapper">
38
 
39
- <?php echo wp_get_attachment_image($service['icon_image'], 'full', false, array('class' => 'lsow-image full')); ?>
40
 
41
- </div>
42
 
43
- <?php else : ?>
44
 
45
- <a class="lsow-image-wrapper" href="<?php echo $service_url; ?>" <?php echo $target; ?>>
46
 
47
- <?php echo wp_get_attachment_image($service['icon_image'], 'full', false, array('class' => 'lsow-image full')); ?>
48
 
49
- </a>
50
 
51
- <?php endif; ?>
52
 
53
- <?php else : ?>
54
 
55
- <?php if (empty($service_url)) : ?>
56
 
57
- <div class="lsow-icon-wrapper">
58
 
59
- <?php echo siteorigin_widget_get_icon($service['icon']); ?>
60
 
61
- </div>
62
 
63
- <?php else : ?>
64
 
65
- <a class="lsow-icon-wrapper" href="<?php echo $service_url; ?>" <?php echo $target; ?>>
66
 
67
- <?php echo siteorigin_widget_get_icon($service['icon']); ?>
68
 
69
- </a>
70
 
71
- <?php endif; ?>
72
 
73
- <?php endif; ?>
74
 
75
- <div class="lsow-service-text">
76
 
77
- <?php if (empty($service_url)) : ?>
78
 
79
- <h3 class="lsow-title"><?php echo esc_html($service['title']) ?></h3>
80
 
81
- <?php else : ?>
82
 
83
- <a class="lsow-title-link" href="<?php echo $service_url; ?>" <?php echo $target; ?>>
84
 
85
- <h3 class="lsow-title"><?php echo esc_html($service['title']) ?></h3>
86
 
87
- </a>
88
 
89
- <?php endif; ?>
90
 
91
- <div class="lsow-service-details"><?php echo wp_kses_post($service['excerpt']) ?></div>
92
 
93
- </div>
94
 
95
- </div>
96
 
97
- </div>
98
 
99
- <?php
100
 
101
- endforeach;
102
 
103
- ?>
104
 
105
- </div>
1
  <?php
2
  /**
3
  * @var $settings
 
 
 
4
  */
5
 
6
+ if (!empty($instance['title']))
7
+ echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
+
9
+ $settings = apply_filters('lsow_services_' . $this->id . '_settings', $settings);
10
+
11
  if (!empty($settings['target']))
12
  $target = 'target="_blank"';
13
  else
14
  $target = '';
15
 
16
+ $id = 'id="' . $this->id . '"';
17
+
18
+ $output = '<div ' . $id . ' class="lsow-services lsow-' . $settings['style'] . ' lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
19
+
20
+ foreach ($settings['services'] as $service):
21
+
22
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($service['animation']);
23
 
24
+ $service_url = sow_esc_url($service['href']);
 
25
 
26
+ $child_output = '<div class="lsow-grid-item lsow-service-wrapper">';
27
 
28
+ $child_output .= '<div class="lsow-service ' . $animate_class . '" ' . $animation_attr . '>';
29
 
30
+ if ($settings['icon_type'] == 'icon_image') :
31
 
32
+ if (!empty($service['icon_image'])):
33
 
34
+ if (empty($service_url)) :
35
 
36
+ $child_output .= '<div class="lsow-image-wrapper">';
37
 
38
+ $image_html = wp_get_attachment_image($service['icon_image'], 'full', false, array('class' => 'lsow-image full'));
39
 
40
+ $child_output .= $image_html;
41
 
42
+ $child_output .= '</div>';
43
 
44
+ else :
45
 
46
+ $child_output .= '<a class="lsow-image-wrapper" href="' . $service_url . '" ' . $target . '>';
47
 
48
+ $image_html = wp_get_attachment_image($service['icon_image'], 'full', false, array('class' => 'lsow-image full'));
49
 
50
+ $child_output .= $image_html;
51
 
52
+ $child_output .= '</a>';
53
 
54
+ endif;
55
 
56
+ endif;
57
 
58
+ elseif ($settings['icon_type'] == 'icon') :
59
 
60
+ if (empty($service_url)) :
61
 
62
+ $child_output .= '<div class="lsow-icon-wrapper">';
63
 
64
+ $child_output .= siteorigin_widget_get_icon($service['icon']);;
65
 
66
+ $child_output .= '</div>';
67
 
68
+ else :
69
 
70
+ $child_output .= '<a class="lsow-icon-wrapper" href="' . $service_url . '" ' . $target . '>';
71
 
72
+ $child_output .= siteorigin_widget_get_icon($service['icon']);;
73
 
74
+ $child_output .= '</a>';
75
 
76
+ endif;
77
 
78
+ endif;
79
 
80
+ $child_output .= '<div class="lsow-service-text">';
81
 
82
+ if (empty($service_url)) :
83
 
84
+ $child_output .= '<h3 class="lsow-title">' . esc_html($service['title']) . '</h3>';
85
 
86
+ else:
87
 
88
+ $child_output .= '<a class="lsow-title-link" href="' . $service_url . '" ' . $target . '>';
89
 
90
+ $child_output .= '<h3 class="lsow-title">' . esc_html($service['title']) . '</h3>';
91
 
92
+ $child_output .= '</a>';
93
 
94
+ endif;
95
 
96
+ $child_output .= '<div class="lsow-service-details">' . do_shortcode(wp_kses_post($service['excerpt'])) . '</div>';
97
 
98
+ $child_output .= '</div><!-- .lsow-service-text -->';
99
 
100
+ $child_output .= '</div><!-- .lsow-service -->';
101
 
102
+ $child_output .= '</div><!-- .lsow-service-wrapper -->';
103
 
104
+ $output .= apply_filters('lsow_service_item_output', $child_output, $service, $settings);
105
 
106
+ endforeach;
107
 
108
+ $output .= '</div><!-- .lsow-services -->';
109
 
110
+ $output .= '<div class="lsow-clear"></div>';
111
 
112
+ echo apply_filters('lsow_services_output', $output, $settings);
includes/widgets/lsow-stats-bar-widget/lsow-stats-bar-widget.php CHANGED
@@ -89,9 +89,11 @@ class LSOW_Stats_Bars_Widget extends SiteOrigin_Widget {
89
  }
90
 
91
  function get_template_variables($instance, $args) {
92
- return array(
93
  'stats_bars' => !empty($instance['stats-bars']) ? $instance['stats-bars'] : array()
94
  );
 
 
95
  }
96
 
97
  }
89
  }
90
 
91
  function get_template_variables($instance, $args) {
92
+ $settings = array(
93
  'stats_bars' => !empty($instance['stats-bars']) ? $instance['stats-bars'] : array()
94
  );
95
+
96
+ return array('settings' => $settings);
97
  }
98
 
99
  }
includes/widgets/lsow-stats-bar-widget/tpl/default.php CHANGED
@@ -1,43 +1,46 @@
1
  <?php
2
  /**
3
- * @var $stats_bars
4
  */
5
- ?>
6
 
7
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
 
8
 
9
- <div class="lsow-stats-bars">
10
 
11
- <?php foreach ($stats_bars as $stats_bar) :
12
 
13
- $color_style = '';
14
- $color = $stats_bar['color'];
15
- if ($color)
16
- $color_style = ' style="background:' . esc_attr($color) . ';"';
17
 
18
- ?>
 
 
 
19
 
20
- <div class="lsow-stats-bar">
21
 
22
- <div class="lsow-stats-title">
23
- <?php echo esc_html($stats_bar['title']) ?><span><?php echo esc_attr($stats_bar['value']); ?>%</span>
24
- </div>
25
 
26
- <div class="lsow-stats-bar-wrap">
27
 
28
- <div <?php echo $color_style; ?> class="lsow-stats-bar-content"
29
- data-perc="<?php echo esc_attr($stats_bar['value']); ?>"></div>
30
 
31
- <div class="lsow-stats-bar-bg"></div>
32
 
33
- </div>
34
 
35
- </div>
36
 
37
- <?php
38
 
39
- endforeach;
40
 
41
- ?>
42
 
43
- </div>
 
 
 
 
 
 
1
  <?php
2
  /**
3
+ * @var $settings
4
  */
 
5
 
6
+ if (!empty($instance['title']))
7
+ echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+ $settings = apply_filters('lsow_stats_bars_' . $this->id . '_settings', $settings);
10
 
11
+ $output = '<div class="lsow-stats-bars">';
12
 
13
+ foreach ($settings['stats_bars'] as $stats_bar) :
 
 
 
14
 
15
+ $color_style = '';
16
+ $color = $stats_bar['color'];
17
+ if ($color)
18
+ $color_style = ' style="background:' . esc_attr($color) . ';"';
19
 
20
+ $child_output = '<div class="lsow-stats-bar">';
21
 
22
+ $child_output .= '<div class="lsow-stats-title">';
 
 
23
 
24
+ $child_output .= esc_html($stats_bar['title']);
25
 
26
+ $child_output .= '<span>' . esc_attr($stats_bar['value']) . '%</span>';
 
27
 
28
+ $child_output .= '</div>';
29
 
30
+ $child_output .= '<div class="lsow-stats-bar-wrap">';
31
 
32
+ $child_output .= '<div ' . $color_style . ' class="lsow-stats-bar-content" data-perc="' . esc_attr($stats_bar['value']) . '"></div>';
33
 
34
+ $child_output .= '<div class="lsow-stats-bar-bg"></div>';
35
 
36
+ $child_output .= '</div>';
37
 
38
+ $child_output .= '</div><!-- .lsow-stats-bar -->';
39
 
40
+ $output .= apply_filters('lsow_stats_bar_output', $child_output, $stats_bar, $settings);
41
+
42
+ endforeach;
43
+
44
+ $output .= '</div><!-- .lsow-stats-bars -->';
45
+
46
+ echo apply_filters('lsow_stats_bars_output', $output, $settings);
includes/widgets/lsow-tabs-widget/css/style.css CHANGED
@@ -68,13 +68,10 @@
68
  position: relative; }
69
  .lsow-tabs .lsow-tab-panes .lsow-tab-pane {
70
  padding: 40px;
71
- display: block;
72
- overflow: hidden;
73
- position: absolute;
74
- left: -9999px; }
75
  .lsow-tabs .lsow-tab-panes .lsow-tab-pane.lsow-active {
76
- position: static;
77
- left: 0;
78
  -webkit-animation: lsow-fade 0.3s ease-in-out;
79
  animation: lsow-fade 0.3s ease-in-out; }
80
 
68
  position: relative; }
69
  .lsow-tabs .lsow-tab-panes .lsow-tab-pane {
70
  padding: 40px;
71
+ display: none;
72
+ overflow: hidden; }
 
 
73
  .lsow-tabs .lsow-tab-panes .lsow-tab-pane.lsow-active {
74
+ display: block;
 
75
  -webkit-animation: lsow-fade 0.3s ease-in-out;
76
  animation: lsow-fade 0.3s ease-in-out; }
77
 
includes/widgets/lsow-tabs-widget/css/style.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["style.scss","../../../../../../bower_components/bourbon/app/assets/stylesheets/addons/_prefixer.scss","../../../../../../bower_components/bourbon/app/assets/stylesheets/css3/_flex-box.scss","../../../../assets/css/_lsow-lib.scss"],"names":[],"mappings":"AAGA;EACE;IACE,WAAU,EAAA;EAEZ;IACE,WAAU,EAAA,EAAA;AALd;EACE;IACE,WAAU,EAAA;EAEZ;IACE,WAAU,EAAA,EAAA;AAGd,8CAA8C;AAE9C;EACE,mBAAkB;EAClB,iBAAgB,EAAA;EAChB;IACE,qBAAa;IAAb,qBAAa;IAAb,cAAa;IACb,+BAAmB;IAAnB,8BAAmB;QAAnB,wBAAmB;YAAnB,oBAAmB;IACnB,wBAA2B;QAA3B,qBAA2B;YAA3B,4BAA2B,EAAA;IAC3B;MACE,mBAAkB;MCchB,oBCsFoB;MDtEpB,YCsEoB;MDl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;MACR,YAAW;MACX,eAAc;MACd,kCAAiC;MACjC,gCAA+B;MAC/B,qCAAoC,EAAA;IAEtC;MACE,eAAc,EAAA;IAEhB;MACE,cAAa,EAAA;IAEf;MACE,YAAW,EAAA;AAIjB;EACE,oBAAmB;EACnB,2BAA0B,EAAA;;AAG9B;EC1yBQ,+BC4GmB;ED5FnB,uBC4FmB;ED5GnB,8BCyGY;EDzFZ,sBCyFY;EDrGZ,yBCoGa;EDxFb,oBCwFa;EAuBnB,wBAvBmB,EAAA;EFosBnB;IACE,cAAa,EAAA;EAGb;IACE,eAAc,EAAA;;AAKlB;EACE,iBAAgB,EAAA;EAChB;IACE,iCAAgC,EAAA;IAChC;MACE,oBAAmB,EAAA;IAErB;MACE,eAAc,EAAA;MACd;QACE,YAAW,EAAA;IAGf;MACE,YAAW,EAAA;IAEb;MACE,gCAA+B,EAAA;AAIrC;EACE,oBAAmB,EAAA;EACnB;IACE,YAAW,EAAA;IACX;MACE,YAAW,EAAA","file":"style.css"}
1
+ {"version":3,"sources":["style.scss","../../../../../../bower_components/bourbon/app/assets/stylesheets/addons/_prefixer.scss","../../../../../../bower_components/bourbon/app/assets/stylesheets/css3/_flex-box.scss","../../../../assets/css/_lsow-lib.scss"],"names":[],"mappings":"AAGA;EACE;IACE,WAAU,EAAA;EAEZ;IACE,WAAU,EAAA,EAAA;AALd;EACE;IACE,WAAU,EAAA;EAEZ;IACE,WAAU,EAAA,EAAA;AAGd,8CAA8C;AAE9C;EACE,mBAAkB;EAClB,iBAAgB,EAAA;EAChB;IACE,qBAAa;IAAb,qBAAa;IAAb,cAAa;IACb,+BAAmB;IAAnB,8BAAmB;QAAnB,wBAAmB;YAAnB,oBAAmB;IACnB,wBAA2B;QAA3B,qBAA2B;YAA3B,4BAA2B,EAAA;IAC3B;MACE,mBAAkB;MCchB,oBCsFoB;MDtEpB,YCsEoB;MDlFpB,oBDjBoB;MCqBpB,mBDrBoB;MC6BpB,eD7BoB,EAAA;MACtB;QACE,eAAc;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,EAAA;IAEf;MACE,YAAW,EAAA;AAIjB;EACE,oBAAmB;EACnB,2BAA0B,EAAA;;AAG9B;ECvyBQ,+BC4GmB;ED5FnB,uBC4FmB;ED5GnB,8BCyGY;EDzFZ,sBCyFY;EDrGZ,yBCoGa;EDxFb,oBCwFa;EAuBnB,wBAvBmB,EAAA;EFisBnB;IACE,cAAa,EAAA;EAGb;IACE,eAAc,EAAA;;AAKlB;EACE,iBAAgB,EAAA;EAChB;IACE,iCAAgC,EAAA;IAChC;MACE,oBAAmB,EAAA;IAErB;MACE,eAAc,EAAA;MACd;QACE,YAAW,EAAA;IAGf;MACE,YAAW,EAAA;IAEb;MACE,gCAA+B,EAAA;AAIrC;EACE,oBAAmB,EAAA;EACnB;IACE,YAAW,EAAA;IACX;MACE,YAAW,EAAA","file":"style.css"}
includes/widgets/lsow-tabs-widget/css/style.scss CHANGED
@@ -64,13 +64,10 @@ $theme_color: #f94213;
64
  position: relative;
65
  .lsow-tab-pane {
66
  padding: 40px;
67
- display: block;
68
  overflow: hidden;
69
- position: absolute;
70
- left: -9999px;
71
  &.lsow-active {
72
- position: static;
73
- left: 0;
74
  animation: lsow-fade 0.3s ease-in-out;
75
  }
76
  }
64
  position: relative;
65
  .lsow-tab-pane {
66
  padding: 40px;
67
+ display: none;
68
  overflow: hidden;
 
 
69
  &.lsow-active {
70
+ display: block;
 
71
  animation: lsow-fade 0.3s ease-in-out;
72
  }
73
  }
includes/widgets/lsow-tabs-widget/lsow-tabs-widget.php CHANGED
@@ -143,12 +143,15 @@ class LSOW_Tabs_Widget extends SiteOrigin_Widget
143
 
144
  function get_template_variables( $instance, $args )
145
  {
146
- return array(
147
  'style' => $instance['style'],
148
  'icon_type' => $instance['icon_type'],
149
  'mobile_width' => intval( $instance['mobile_width'] ),
150
  'tabs' => ( !empty($instance['tabs']) ? $instance['tabs'] : array() ),
151
  );
 
 
 
152
  }
153
 
154
  }
143
 
144
  function get_template_variables( $instance, $args )
145
  {
146
+ $settings = array(
147
  'style' => $instance['style'],
148
  'icon_type' => $instance['icon_type'],
149
  'mobile_width' => intval( $instance['mobile_width'] ),
150
  'tabs' => ( !empty($instance['tabs']) ? $instance['tabs'] : array() ),
151
  );
152
+ return array(
153
+ 'settings' => $settings,
154
+ );
155
  }
156
 
157
  }
includes/widgets/lsow-tabs-widget/tpl/default.php CHANGED
@@ -1,18 +1,16 @@
1
  <?php
2
 
3
  /**
4
- * @var $tabs
5
- * @var $style
6
- * @var $mobile_width
7
- * @var $icon_type
8
  */
9
  if ( !empty($instance['title']) ) {
10
  echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] ;
11
  }
 
12
  $plain_styles = array( 'style2', 'style6', 'style7' );
13
 
14
- if ( in_array( $style, $plain_styles, true ) ) {
15
- $icon_type = 'none';
16
  // do not display icons for plain styles even if chosen by the user
17
  }
18
 
@@ -23,17 +21,18 @@ $vertical_styles = array(
23
  'style9',
24
  'style10'
25
  );
26
- if ( in_array( $style, $vertical_styles, true ) ) {
27
  $vertical_class = 'lsow-vertical';
28
  }
29
- foreach ( $tabs as $tab ) {
30
  $tab_id = '';
31
  $tab_element = '<a class="lsow-tab-label" href="#' . $tab_id . '">';
32
 
33
- if ( $icon_type == 'icon_image' ) {
34
  $tab_element .= '<span class="lsow-image-wrapper">';
 
35
  $tab_element .= wp_get_attachment_image(
36
- $tab['icon_image'],
37
  'thumbnail',
38
  false,
39
  array(
@@ -41,7 +40,7 @@ foreach ( $tabs as $tab ) {
41
  )
42
  );
43
  $tab_element .= '</span>';
44
- } elseif ( $icon_type == 'icon' ) {
45
  $tab_element .= '<span class="lsow-icon-wrapper">';
46
  $tab_element .= siteorigin_widget_get_icon( $tab['icon'] );
47
  $tab_element .= '</span>';
@@ -53,40 +52,30 @@ foreach ( $tabs as $tab ) {
53
  $tab_element .= '</a>';
54
  $tab_nav = '<div class="lsow-tab">' . $tab_element . '</div>';
55
  $tab_content = '<div id="' . $tab_id . '" class="lsow-tab-pane">' . do_shortcode( $tab['tab_content'] ) . '</div>';
56
- $tab_elements[] = $tab_nav;
57
- $tab_panes[] = $tab_content;
 
 
 
 
 
 
 
 
 
 
58
  }
59
- ?>
60
-
61
- <div class="lsow-tabs <?php
62
- echo $vertical_class ;
63
- ?> <?php
64
- echo esc_attr( $style ) ;
65
- ?>"
66
- data-mobile-width="<?php
67
- echo intval( $mobile_width ) ;
68
- ?>">
69
-
70
- <a href="#" class="lsow-tab-mobile-menu"><i class="lsow-icon-menu"></i>&nbsp;</a>
71
-
72
- <div class="lsow-tab-nav">
73
-
74
- <?php
75
  foreach ( $tab_elements as $tab_nav ) {
76
- echo $tab_nav ;
77
  }
78
- ?>
79
-
80
- </div>
81
-
82
- <div class="lsow-tab-panes">
83
-
84
- <?php
85
  foreach ( $tab_panes as $tab_pane ) {
86
- echo $tab_pane ;
87
  }
88
- ?>
89
-
90
- </div>
91
-
92
- </div>
1
  <?php
2
 
3
  /**
4
+ * @var $settings
 
 
 
5
  */
6
  if ( !empty($instance['title']) ) {
7
  echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'] ;
8
  }
9
+ $settings = apply_filters( 'lsow_tabs_' . $this->id . '_settings', $settings );
10
  $plain_styles = array( 'style2', 'style6', 'style7' );
11
 
12
+ if ( in_array( $settings['style'], $plain_styles, true ) ) {
13
+ $settings['icon_type'] = 'none';
14
  // do not display icons for plain styles even if chosen by the user
15
  }
16
 
21
  'style9',
22
  'style10'
23
  );
24
+ if ( in_array( $settings['style'], $vertical_styles, true ) ) {
25
  $vertical_class = 'lsow-vertical';
26
  }
27
+ foreach ( $settings['tabs'] as $tab ) {
28
  $tab_id = '';
29
  $tab_element = '<a class="lsow-tab-label" href="#' . $tab_id . '">';
30
 
31
+ if ( $settings['icon_type'] == 'icon_image' ) {
32
  $tab_element .= '<span class="lsow-image-wrapper">';
33
+ $icon_image = $tab['icon_image'];
34
  $tab_element .= wp_get_attachment_image(
35
+ $icon_image,
36
  'thumbnail',
37
  false,
38
  array(
40
  )
41
  );
42
  $tab_element .= '</span>';
43
+ } elseif ( $settings['icon_type'] == 'icon' ) {
44
  $tab_element .= '<span class="lsow-icon-wrapper">';
45
  $tab_element .= siteorigin_widget_get_icon( $tab['icon'] );
46
  $tab_element .= '</span>';
52
  $tab_element .= '</a>';
53
  $tab_nav = '<div class="lsow-tab">' . $tab_element . '</div>';
54
  $tab_content = '<div id="' . $tab_id . '" class="lsow-tab-pane">' . do_shortcode( $tab['tab_content'] ) . '</div>';
55
+ $tab_elements[] = apply_filters(
56
+ 'lsow_tab_nav_output',
57
+ $tab_nav,
58
+ $tab,
59
+ $settings
60
+ );
61
+ $tab_panes[] = apply_filters(
62
+ 'lsow_tab_content_output',
63
+ $tab_content,
64
+ $tab,
65
+ $settings
66
+ );
67
  }
68
+ $output = '<div class="lsow-tabs ' . $vertical_class . ' ' . esc_attr( $settings['style'] ) . '" data-mobile-width="' . intval( $settings['mobile_width'] ) . '">';
69
+ $output .= '<a href="#" class="lsow-tab-mobile-menu"><i class="lsow-icon-menu"></i>&nbsp;</a>';
70
+ $output .= '<div class="lsow-tab-nav">';
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  foreach ( $tab_elements as $tab_nav ) {
72
+ $output .= $tab_nav;
73
  }
74
+ $output .= '</div><!-- .lsow-tab-nav -->';
75
+ $output .= '<div class="lsow-tab-panes">';
 
 
 
 
 
76
  foreach ( $tab_panes as $tab_pane ) {
77
+ $output .= $tab_pane;
78
  }
79
+ $output .= '</div><!-- .lsow-tab-panes -->';
80
+ $output .= '</div><!-- .lsow-tabs -->';
81
+ echo apply_filters( 'lsow_tabs_output', $output, $settings ) ;
 
 
includes/widgets/lsow-team-members-widget/lsow-team-members-widget.php CHANGED
@@ -211,11 +211,56 @@ class LSOW_Team_Widget extends SiteOrigin_Widget {
211
  }
212
 
213
  function get_template_variables($instance, $args) {
214
- return array(
 
 
215
  'style' => $instance['style'],
216
  'team_members' => !empty($instance['team-members']) ? $instance['team-members'] : array(),
217
- 'settings' => $instance['settings']
218
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  }
220
 
221
  }
211
  }
212
 
213
  function get_template_variables($instance, $args) {
214
+ $settings = $instance['settings'];
215
+
216
+ $settings = array_merge($settings, array(
217
  'style' => $instance['style'],
218
  'team_members' => !empty($instance['team-members']) ? $instance['team-members'] : array(),
219
+ ));
220
+
221
+ return array('settings' => $settings);
222
+ }
223
+
224
+ public static function social_profile($team_member, $settings) {
225
+
226
+ $output = '<div class="lsow-social-wrap">';
227
+
228
+ $output .= '<div class="lsow-social-list">';
229
+
230
+ $social_profile = $team_member['social_profile'];
231
+
232
+ $email = $social_profile['email_address'];
233
+ $facebook_url = $social_profile['facebook'];
234
+ $twitter_url = $social_profile['twitter'];
235
+ $linkedin_url = $social_profile['linkedin'];
236
+ $dribbble_url = $social_profile['dribbble'];
237
+ $pinterest_url = $social_profile['pinterest'];
238
+ $googleplus_url = $social_profile['google_plus'];
239
+ $instagram_url = $social_profile['instagram'];
240
+
241
+ if ($email)
242
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-email" href="mailto:' . $email . '" title="' . __("Send an email", 'livemesh-so-widgets') . '"><i class="lsow-icon-email"></i></a></div>';
243
+ if ($facebook_url)
244
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-facebook" href="' . $facebook_url . '" target="_blank" title="' . __("Follow on Facebook", 'livemesh-so-widgets') . '"><i class="lsow-icon-facebook"></i></a></div>';
245
+ if ($twitter_url)
246
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-twitter" href="' . $twitter_url . '" target="_blank" title="' . __("Subscribe to Twitter Feed", 'livemesh-so-widgets') . '"><i class="lsow-icon-twitter"></i></a></div>';
247
+ if ($linkedin_url)
248
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-linkedin" href="' . $linkedin_url . '" target="_blank" title="' . __("View LinkedIn Profile", 'livemesh-so-widgets') . '"><i class="lsow-icon-linkedin"></i></a></div>';
249
+ if ($googleplus_url)
250
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-googleplus" href="' . $googleplus_url . '" target="_blank" title="' . __("Follow on Google Plus", 'livemesh-so-widgets') . '"><i class="lsow-icon-googleplus"></i></a></div>';
251
+ if ($instagram_url)
252
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-instagram" href="' . $instagram_url . '" target="_blank" title="' . __("View Instagram Feed", 'livemesh-so-widgets') . '"><i class="lsow-icon-instagram"></i></a></div>';
253
+ if ($pinterest_url)
254
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-pinterest" href="' . $pinterest_url . '" target="_blank" title="' . __("Subscribe to Pinterest Feed", 'livemesh-so-widgets') . '"><i class="lsow-icon-pinterest"></i></a></div>';
255
+ if ($dribbble_url)
256
+ $output .= '<div class="lsow-social-list-item"><a class="lsow-dribbble" href="' . $dribbble_url . '" target="_blank" title="' . __("View Dribbble Portfolio", 'livemesh-so-widgets') . '"><i class="lsow-icon-dribbble"></i></a></div>';
257
+
258
+ $output .= '</div><!-- .lsow-social-list -->';
259
+
260
+ $output .= '</div><!-- .lsow-social-wrap -->';
261
+
262
+ return apply_filters('lsow_team_member_social_links', $output, $team_member, $settings);
263
+
264
  }
265
 
266
  }
includes/widgets/lsow-team-members-widget/tpl/default.php CHANGED
@@ -1,80 +1,88 @@
1
  <?php
2
  /**
3
- * @var $style
4
  * @var $settings
5
- * @var $team_members
6
  */
7
 
8
  ?>
9
 
10
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
11
 
12
- <?php $item_style = ''; ?>
13
 
14
- <?php $container_style = 'lsow-container'; ?>
15
 
16
- <?php if ($style == 'style1'): ?>
17
 
18
- <?php $item_style = 'lsow-grid-item'; ?>
19
 
20
- <?php $container_style = 'lsow-grid-container ' . lsow_get_grid_classes($settings); ?>
21
 
22
- <?php endif; ?>
23
 
24
- <div class="lsow-team-members lsow-<?php echo $style; ?> <?php echo $container_style; ?>">
25
 
26
- <?php foreach ($team_members as $team_member): ?>
27
 
28
- <div class="<?php echo $item_style; ?> lsow-team-member-wrapper">
29
 
30
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($team_member['animation']); ?>
31
 
32
- <div class="lsow-team-member <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>
33
 
34
- <div class="lsow-image-wrapper">
35
 
36
- <?php echo wp_get_attachment_image($team_member['image'], $settings['image_size'], false, array('class' => 'lsow-image')); ?>
37
 
38
- <?php if ($style == 'style1'): ?>
39
 
40
- <?php include 'social-profile.php'; ?>
41
 
42
- <?php endif; ?>
43
 
44
- </div>
45
 
46
- <div class="lsow-team-member-text">
47
 
48
- <h3 class="lsow-title"><?php echo esc_html($team_member['name']) ?></h3>
49
 
50
- <div class="lsow-team-member-position">
51
 
52
- <?php echo do_shortcode($team_member['position']) ?>
53
 
54
- </div>
55
 
56
- <div class="lsow-team-member-details">
57
 
58
- <?php echo do_shortcode($team_member['details']) ?>
59
 
60
- </div>
61
 
62
- <?php if ($style == 'style2'): ?>
63
 
64
- <?php include 'social-profile.php'; ?>
65
 
66
- <?php endif; ?>
67
 
68
- </div>
69
 
70
- </div>
71
 
72
- </div>
73
 
74
- <?php
75
 
76
- endforeach;
77
 
78
- ?>
79
 
80
- </div>
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
 
3
  * @var $settings
 
4
  */
5
 
6
  ?>
7
 
8
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
9
 
10
+ $settings = apply_filters('lsow_team_members_' . $this->id . '_settings', $settings);
11
 
12
+ $item_style = '';
13
 
14
+ $container_style = 'lsow-container';
15
 
16
+ if ($settings['style'] == 'style1'):
17
 
18
+ $item_style = 'lsow-grid-item';
19
 
20
+ $container_style = 'lsow-grid-container ' . lsow_get_grid_classes($settings);
21
 
22
+ endif;
23
 
24
+ $output = '<div class="lsow-team-members lsow-' . $settings['style'] . ' ' . $container_style . '">';
25
 
26
+ foreach ($settings['team_members'] as $team_member):
27
 
28
+ $child_output = '<div class="' . $item_style . ' lsow-team-member-wrapper">';
29
 
30
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($team_member['animation']);
31
 
32
+ $child_output .= '<div class="lsow-team-member ' . $animate_class . '" ' . $animation_attr . '>';
33
 
34
+ $child_output .= '<div class="lsow-image-wrapper">';
35
 
36
+ if (!empty($team_member['image'])):
37
 
38
+ $image_html = wp_get_attachment_image($team_member['image'], $settings['image_size'], false, array('class' => 'lsow-image'));;
39
 
40
+ $child_output .= $image_html;
41
 
42
+ endif;
43
 
44
+ if ($settings['style'] == 'style1'):
45
 
46
+ $child_output .= $this->social_profile($team_member, $settings);
47
 
48
+ endif;
49
 
50
+ $child_output .= '</div><!-- .lsow-image-wrapper -->';
51
 
52
+ $child_output .= '<div class="lsow-team-member-text">';
53
 
54
+ $child_output .= '<h3 class="lsow-title">' . esc_html($team_member['name']) . '</h3>';
55
 
56
+ $child_output .= '<div class="lsow-team-member-position">';
57
 
58
+ $child_output .= do_shortcode($team_member['position']);
59
 
60
+ $child_output .= '</div>';
61
 
62
+ $child_output .= '<div class="lsow-team-member-details">';
63
 
64
+ $child_output .= do_shortcode($team_member['details']);
65
 
66
+ $child_output .= '</div>';
67
 
68
+ if ($settings['style'] == 'style2'):
69
 
70
+ $child_output .= $this->social_profile($team_member, $settings);
71
 
72
+ endif;
73
 
74
+ $child_output .= '</div><!-- .lsow-team-member-text -->';
75
 
76
+ $child_output .= '</div><!-- .lsow-team-member -->';
77
 
78
+ $child_output .= '</div><!-- .lsow-team-member-wrapper -->';
79
+
80
+ $output .= apply_filters('lsow_team_member_output', $child_output, $team_member, $settings);
81
+
82
+ endforeach;
83
+
84
+ $output .= '</div><!-- .lsow-team-members -->';
85
+
86
+ $output .= '<div class="lsow-clear"></div>';
87
+
88
+ echo apply_filters('lsow_team_members_output', $output, $settings);
includes/widgets/lsow-testimonials-slider-widget/js/testimonials.js CHANGED
@@ -4,29 +4,19 @@ jQuery(function ($) {
4
 
5
  var slider_elem = $(this);
6
 
7
- var slideshow_speed = slider_elem.data('slideshow_speed') || 5000;
8
-
9
- var animation_speed = slider_elem.data('animation_speed') || 600;
10
-
11
- var pause_on_action = slider_elem.data('pause_on_action') ? true : false;
12
-
13
- var pause_on_hover = slider_elem.data('pause_on_hover') ? true : false;
14
-
15
- var direction_nav = slider_elem.data('direction_nav') ? true : false;
16
-
17
- var control_nav = slider_elem.data('control_nav') ? true : false;
18
-
19
 
20
  slider_elem.flexslider({
21
  selector: ".lsow-slides > .lsow-slide",
22
- animation: "slide",
23
- slideshowSpeed: slideshow_speed,
24
- animationSpeed: animation_speed,
 
25
  namespace: "lsow-flex-",
26
- pauseOnAction: pause_on_action,
27
- pauseOnHover: pause_on_hover,
28
- controlNav: control_nav,
29
- directionNav: direction_nav,
30
  prevText: "Previous<span></span>",
31
  nextText: "Next<span></span>",
32
  smoothHeight: false,
4
 
5
  var slider_elem = $(this);
6
 
7
+ var settings = slider_elem.data('settings');
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  slider_elem.flexslider({
10
  selector: ".lsow-slides > .lsow-slide",
11
+ animation: settings['slide_animation'],
12
+ direction: settings['direction'],
13
+ slideshowSpeed: settings['slideshow_speed'],
14
+ animationSpeed: settings['animation_speed'],
15
  namespace: "lsow-flex-",
16
+ pauseOnAction: settings['pause_on_action'],
17
+ pauseOnHover: settings['pause_on_hover'],
18
+ controlNav: settings['control_nav'],
19
+ directionNav: settings['direction_nav'],
20
  prevText: "Previous<span></span>",
21
  nextText: "Next<span></span>",
22
  smoothHeight: false,
includes/widgets/lsow-testimonials-slider-widget/js/testimonials.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){e(".lsow-testimonials-slider").each(function(){var a=e(this),s=a.data("slideshow_speed")||5e3,n=a.data("animation_speed")||600,o=a.data("pause_on_action")?!0:!1,i=a.data("pause_on_hover")?!0:!1,t=a.data("direction_nav")?!0:!1,l=a.data("control_nav")?!0:!1;a.flexslider({selector:".lsow-slides > .lsow-slide",animation:"slide",slideshowSpeed:s,animationSpeed:n,namespace:"lsow-flex-",pauseOnAction:o,pauseOnHover:i,controlNav:l,directionNav:t,prevText:"Previous<span></span>",nextText:"Next<span></span>",smoothHeight:!1,animationLoop:!0,slideshow:!0,easing:"swing",controlsContainer:"lsow-testimonials-slider"})})});
1
+ jQuery(function($){$(".lsow-testimonials-slider").each(function(){var slider_elem=$(this);var settings=slider_elem.data("settings");slider_elem.flexslider({selector:".lsow-slides > .lsow-slide",animation:settings["slide_animation"],direction:settings["direction"],slideshowSpeed:settings["slideshow_speed"],animationSpeed:settings["animation_speed"],namespace:"lsow-flex-",pauseOnAction:settings["pause_on_action"],pauseOnHover:settings["pause_on_hover"],controlNav:settings["control_nav"],directionNav:settings["direction_nav"],prevText:"Previous<span></span>",nextText:"Next<span></span>",smoothHeight:false,animationLoop:true,slideshow:true,easing:"swing",controlsContainer:"lsow-testimonials-slider"})})});
includes/widgets/lsow-testimonials-slider-widget/lsow-testimonials-slider-widget.php CHANGED
@@ -63,7 +63,16 @@ class LSOW_Testimonials_Slider_Widget extends SiteOrigin_Widget {
63
  'type' => 'section',
64
  'label' => __('Settings', 'livemesh-so-widgets'),
65
  'fields' => array(
66
-
 
 
 
 
 
 
 
 
 
67
  'slideshow_speed' => array(
68
  'type' => 'number',
69
  'label' => __('Slideshow speed', 'livemesh-so-widgets'),
@@ -150,10 +159,13 @@ class LSOW_Testimonials_Slider_Widget extends SiteOrigin_Widget {
150
  }
151
 
152
  function get_template_variables($instance, $args) {
153
- return array(
 
 
 
154
  'testimonials' => !empty($instance['testimonials']) ? $instance['testimonials'] : array(),
155
- 'settings' => $instance['settings']
156
- );
157
  }
158
 
159
  }
63
  'type' => 'section',
64
  'label' => __('Settings', 'livemesh-so-widgets'),
65
  'fields' => array(
66
+ "slide_animation" => array(
67
+ "type" => "select",
68
+ "description" => __("Select your animation type.", "livemesh-so-widgets"),
69
+ "label" => __("Animation", "livemesh-so-widgets"),
70
+ "options" => array(
71
+ "slide" => __("Slide", "livemesh-so-widgets"),
72
+ "fade" => __("Fade", "livemesh-so-widgets"),
73
+ ),
74
+ "default" => "slide",
75
+ ),
76
  'slideshow_speed' => array(
77
  'type' => 'number',
78
  'label' => __('Slideshow speed', 'livemesh-so-widgets'),
159
  }
160
 
161
  function get_template_variables($instance, $args) {
162
+
163
+ $settings = $instance['settings'];
164
+
165
+ $settings = array_merge($settings,array(
166
  'testimonials' => !empty($instance['testimonials']) ? $instance['testimonials'] : array(),
167
+ ));
168
+ return array('settings' => $settings);
169
  }
170
 
171
  }
includes/widgets/lsow-testimonials-slider-widget/tpl/default.php CHANGED
@@ -1,58 +1,79 @@
1
  <?php
2
  /**
3
  * @var $settings
4
- * @var $testimonials
5
  */
6
 
7
  ?>
8
 
9
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
10
 
11
- <div class="lsow-testimonials-slider lsow-flexslider lsow-container" <?php foreach ($settings as $key => $val) : ?>
12
- <?php if (!empty($val)) : ?>
13
- data-<?php echo $key . '="' . esc_attr($val) . '"' ?>
14
- <?php endif ?>
15
- <?php endforeach; ?>>
16
 
17
- <div class="lsow-slides">
 
 
 
 
 
 
 
 
 
18
 
19
- <?php foreach ($testimonials as $testimonial) : ?>
20
 
21
- <div class="lsow-slide lsow-testimonial-wrapper">
22
 
23
- <div class="lsow-testimonial">
24
 
25
- <div class="lsow-testimonial-text">
26
 
27
- <i class="lsow-icon-quote"></i>
28
 
29
- <?php echo wp_kses_post($testimonial['text']) ?>
30
 
31
- </div>
32
 
33
- <div class="lsow-testimonial-user">
34
 
35
- <div class="lsow-image-wrapper">
36
- <?php echo wp_get_attachment_image($testimonial['image'], 'thumbnail', false, array('class' => 'lsow-image full')); ?>
37
- </div>
38
 
39
- <div class="lsow-text">
40
- <h4 class="lsow-author-name"><?php echo esc_html($testimonial['name']) ?></h4>
41
- <div class="lsow-author-credentials"><?php echo wp_kses_post($testimonial['credentials']); ?></div>
42
- </div>
43
 
44
- </div>
45
 
46
- </div>
47
 
48
- </div>
49
 
50
- <?php
51
 
52
- endforeach;
53
 
54
- ?>
55
 
56
- </div>
57
 
58
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
  * @var $settings
 
4
  */
5
 
6
  ?>
7
 
8
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
9
 
10
+ $settings = apply_filters('lsow_testimonials_slider_' . $this->id . '_settings', $settings);
 
 
 
 
11
 
12
+ $slider_options = [
13
+ 'slide_animation' => $settings['slide_animation'],
14
+ 'direction' => 'horizontal',
15
+ 'slideshow_speed' => absint($settings['slideshow_speed']),
16
+ 'animation_speed' => absint($settings['animation_speed']),
17
+ 'control_nav' => ($settings['control_nav']),
18
+ 'direction_nav' => ($settings['direction_nav']),
19
+ 'pause_on_hover' => ($settings['pause_on_hover']),
20
+ 'pause_on_action' => ($settings['pause_on_action'])
21
+ ];
22
 
23
+ $slider_options = apply_filters('lsow_testimonials_slider_options', $slider_options, $settings);
24
 
25
+ $output = '<div class="lsow-testimonials-slider lsow-flexslider lsow-container" data-settings=\'' . wp_json_encode($slider_options) . '\'>';
26
 
27
+ $output .= '<div class="lsow-slides">';
28
 
29
+ foreach ($settings['testimonials'] as $testimonial) :
30
 
31
+ $child_output = '<div class="lsow-slide lsow-testimonial-wrapper">';
32
 
33
+ $child_output .= '<div class="lsow-testimonial">';
34
 
35
+ $child_output .= '<div class="lsow-testimonial-text">';
36
 
37
+ $child_output .= '<i class="lsow-icon-quote"></i>';
38
 
39
+ $child_output .= do_shortcode($testimonial['text']);
 
 
40
 
41
+ $child_output .= '</div>';
 
 
 
42
 
43
+ $child_output .= '<div class="lsow-testimonial-user">';
44
 
45
+ $child_output .= '<div class="lsow-image-wrapper">';
46
 
47
+ $client_image = $testimonial['image'];
48
 
49
+ if (!empty($client_image)):
50
 
51
+ $child_output .= wp_get_attachment_image($client_image, 'thumbnail', false, array('class' => 'lsow-image full'));
52
 
53
+ endif;
54
 
55
+ $child_output .= '</div><!-- .lsow-image-wrapper -->';
56
 
57
+ $child_output .= '<div class="lsow-text">';
58
+
59
+ $child_output .= '<h3 class="lsow-author-name">' . esc_html($testimonial['name']) . '</h3>';
60
+
61
+ $child_output .= '<div class="lsow-author-credentials">' . wp_kses_post($testimonial['credentials']) . '</div>';
62
+
63
+ $child_output .= '</div>';
64
+
65
+ $child_output .= '</div><!-- .lsow-testimonial-user -->';
66
+
67
+ $child_output .= '</div><!-- .lsow-testimonial -->';
68
+
69
+ $child_output .= '</div><!-- .lsow-testimonial-wrapper.lsow-slide -->';
70
+
71
+ $output .= apply_filters('lsow_testimonials_slide_output', $child_output, $testimonial, $settings);
72
+
73
+ endforeach;
74
+
75
+ $output .= '</div><!-- .lsow-slides -->';
76
+
77
+ $output .= '</div><!-- .lsow-testimonials-slider -->';
78
+
79
+ echo apply_filters('lsow_testimonials_slider_output', $output, $settings);
includes/widgets/lsow-testimonials-widget/lsow-testimonials-widget.php CHANGED
@@ -115,10 +115,12 @@ class LSOW_Testimonials_Widget extends SiteOrigin_Widget {
115
  }
116
 
117
  function get_template_variables($instance, $args) {
118
- return array(
 
 
119
  'testimonials' => !empty($instance['testimonials']) ? $instance['testimonials'] : array(),
120
- 'settings' => $instance['settings']
121
- );
122
  }
123
 
124
  }
115
  }
116
 
117
  function get_template_variables($instance, $args) {
118
+ $settings = $instance['settings'];
119
+
120
+ $settings = array_merge($settings, array(
121
  'testimonials' => !empty($instance['testimonials']) ? $instance['testimonials'] : array(),
122
+ ));
123
+ return array('settings' => $settings);
124
  }
125
 
126
  }
includes/widgets/lsow-testimonials-widget/tpl/default.php CHANGED
@@ -1,43 +1,59 @@
1
  <?php
2
  /**
3
  * @var $settings
4
- * @var $testimonials
5
  */
6
  ?>
7
 
8
- <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'] ?>
9
 
10
- <div class="lsow-testimonials lsow-grid-container <?php echo lsow_get_grid_classes($settings); ?>">
11
 
12
- <?php foreach ($testimonials as $testimonial) : ?>
13
 
14
- <?php list($animate_class, $animation_attr) = lsow_get_animation_atts($testimonial['animation']); ?>
15
 
16
- <div class="lsow-grid-item lsow-testimonial <?php echo $animate_class; ?>" <?php echo $animation_attr; ?>>
17
 
18
- <div class="lsow-testimonial-text">
19
- <?php echo wp_kses_post($testimonial['text']) ?>
20
- </div>
21
 
22
- <div class="lsow-testimonial-user">
23
 
24
- <div class="lsow-image-wrapper">
25
- <?php echo wp_get_attachment_image($testimonial['image'], 'thumbnail', false, array('class' => 'lsow-image full')); ?>
26
- </div>
27
 
28
- <div class="lsow-text">
29
- <h4 class="lsow-author-name"><?php echo esc_html($testimonial['name']) ?></h4>
30
- <div class="lsow-author-credentials"><?php echo wp_kses_post($testimonial['credentials']); ?></div>
31
- </div>
32
 
33
- </div>
34
 
35
- </div>
36
 
37
- <?php
38
 
39
- endforeach;
40
 
41
- ?>
42
 
43
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
  * @var $settings
 
4
  */
5
  ?>
6
 
7
+ <?php if( !empty( $instance['title'] ) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
8
 
9
+ $settings = apply_filters('lsow_testimonials_' . $this->id . '_settings', $settings);
10
 
11
+ $output = '<div class="lsow-testimonials lsow-grid-container ' . lsow_get_grid_classes($settings) . '">';
12
 
13
+ foreach ($settings['testimonials'] as $testimonial) :
14
 
15
+ list($animate_class, $animation_attr) = lsow_get_animation_atts($testimonial['animation']);
16
 
17
+ $child_output = '<div class="lsow-grid-item lsow-testimonial ' . $animate_class . '" ' . $animation_attr . '>';
 
 
18
 
19
+ $child_output .= '<div class="lsow-testimonial-text">';
20
 
21
+ $child_output .= do_shortcode($testimonial['text']);
 
 
22
 
23
+ $child_output .= '</div>';
 
 
 
24
 
25
+ $child_output .= '<div class="lsow-testimonial-user">';
26
 
27
+ $child_output .= '<div class="lsow-image-wrapper">';
28
 
29
+ $client_image = $testimonial['image'];
30
 
31
+ if (!empty($client_image)):
32
 
33
+ $child_output .= wp_get_attachment_image($client_image, 'thumbnail', false, array('class' => 'lsow-image full'));
34
 
35
+ endif;
36
+
37
+ $child_output .= '</div>';
38
+
39
+ $child_output .= '<div class="lsow-text">';
40
+
41
+ $child_output .= '<h3 class="lsow-author-name">' . esc_html($testimonial['name']) . '</h3>';
42
+
43
+ $child_output .= '<div class="lsow-author-credentials">' . wp_kses_post($testimonial['credentials']) . '</div>';
44
+
45
+ $child_output .= '</div><!-- .lsow-text -->';
46
+
47
+ $child_output .= '</div><!-- .lsow-testimonial-user -->';
48
+
49
+ $child_output .= '</div><!-- .lsow-testimonial -->';
50
+
51
+ $output .= apply_filters('lsow_testimonial_output', $child_output, $testimonial, $settings);
52
+
53
+ endforeach;
54
+
55
+ $output .= '</div><!-- .lsow-testimonials -->';
56
+
57
+ $output .= '<div class="lsow-clear"></div>';
58
+
59
+ echo apply_filters('lsow_testimonials_output', $output, $settings);
livemesh-siteorigin-widgets.php CHANGED
@@ -8,7 +8,7 @@
8
  * Author URI: https://www.livemeshthemes.com/
9
  * License: GPL3
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
- * Version: 2.3
12
  * Text Domain: livemesh-so-widgets
13
  * Domain Path: languages
14
  *
@@ -35,7 +35,7 @@ if ( !defined( 'ABSPATH' ) ) {
35
  // Ensure the free version is deactivated if premium is running
36
 
37
  if ( !function_exists( 'lsow_fs' ) ) {
38
- define( 'LSOW_VERSION', '2.3' );
39
  // Plugin Folder Path
40
  define( 'LSOW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
41
  // Plugin Folder URL
8
  * Author URI: https://www.livemeshthemes.com/
9
  * License: GPL3
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
11
+ * Version: 2.5.1
12
  * Text Domain: livemesh-so-widgets
13
  * Domain Path: languages
14
  *
35
  // Ensure the free version is deactivated if premium is running
36
 
37
  if ( !function_exists( 'lsow_fs' ) ) {
38
+ define( 'LSOW_VERSION', '2.5.1' );
39
  // Plugin Folder Path
40
  define( 'LSOW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
41
  // Plugin Folder URL
plugin.php CHANGED
@@ -28,6 +28,7 @@ if ( !class_exists( 'Livemesh_SiteOrigin_Widgets' ) ) {
28
  add_action( 'plugins_loaded', array( self::$instance, 'load_plugin_textdomain' ) );
29
  self::$instance->includes();
30
  self::$instance->hooks();
 
31
  }
32
 
33
  return self::$instance;
@@ -42,7 +43,7 @@ if ( !class_exists( 'Livemesh_SiteOrigin_Widgets' ) ) {
42
  public function __clone()
43
  {
44
  // Cloning instances of the class is forbidden
45
- _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'livemesh-so-widgets' ), '2.3' );
46
  }
47
 
48
  /**
@@ -52,7 +53,7 @@ if ( !class_exists( 'Livemesh_SiteOrigin_Widgets' ) ) {
52
  public function __wakeup()
53
  {
54
  // Unserializing instances of the class is forbidden
55
- _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'livemesh-so-widgets' ), '2.3' );
56
  }
57
 
58
  private function setup_debug_constants()
@@ -126,6 +127,45 @@ if ( !class_exists( 'Livemesh_SiteOrigin_Widgets' ) ) {
126
  add_action( 'wp_enqueue_scripts', array( $this, 'localize_scripts' ), 999999 );
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  /**
130
  * Load Frontend Scripts/Styles
131
  *
28
  add_action( 'plugins_loaded', array( self::$instance, 'load_plugin_textdomain' ) );
29
  self::$instance->includes();
30
  self::$instance->hooks();
31
+ self::$instance->template_hooks();
32
  }
33
 
34
  return self::$instance;
43
  public function __clone()
44
  {
45
  // Cloning instances of the class is forbidden
46
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'livemesh-so-widgets' ), '2.5.1' );
47
  }
48
 
49
  /**
53
  public function __wakeup()
54
  {
55
  // Unserializing instances of the class is forbidden
56
+ _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'livemesh-so-widgets' ), '2.5.1' );
57
  }
58
 
59
  private function setup_debug_constants()
127
  add_action( 'wp_enqueue_scripts', array( $this, 'localize_scripts' ), 999999 );
128
  }
129
 
130
+ private function template_hooks()
131
+ {
132
+ $addons = array(
133
+ 'clients',
134
+ 'carousel',
135
+ 'heading',
136
+ 'odometers',
137
+ 'piecharts',
138
+ 'posts_grid',
139
+ 'posts_carousel',
140
+ 'pricing_table',
141
+ 'services',
142
+ 'stats_bars',
143
+ 'team_members',
144
+ 'testimonials',
145
+ 'testimonials_slider',
146
+ 'tabs',
147
+ 'accordion',
148
+ 'button',
149
+ 'icon_list'
150
+ );
151
+ foreach ( $addons as $addon ) {
152
+ add_filter(
153
+ 'lsow_' . $addon . '_output',
154
+ function ( $default_output, $settings ) use( $addon ) {
155
+ // Replace underscores with dashes for template file names
156
+ $template_name = str_replace( '_', '-', $addon );
157
+ $output = lsow_get_template_part( $template_name, $settings );
158
+ if ( $output !== null ) {
159
+ return $output;
160
+ }
161
+ return $default_output;
162
+ },
163
+ 10,
164
+ 2
165
+ );
166
+ }
167
+ }
168
+
169
  /**
170
  * Load Frontend Scripts/Styles
171
  *
readme.txt CHANGED
@@ -5,7 +5,7 @@ Contributors: livemesh, freemius
5
  Tags: widget, siteorigin, siteorigin widgets bundle, siteorigin page builder, siteorigin widgets, grid, gallery, video background, portfolio, carousel, shortcode, tabs, admin, plugin, page
6
  Requires at least: 4.5
7
  Tested up to: 4.9
8
- Stable Tag: 2.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -67,7 +67,7 @@ The <strong><a href="https://www.livemeshthemes.com/siteorigin-widgets/" title="
67
  <li>Custom Fonts - Ability to choose custom fonts from Google Fonts library for headings in heading widget and the hero header widget.</li>
68
  <li>Custom Animations - Choose from over <strong>40+ animations</strong> for most widgets (excludes sliders, carousels and grid). The animations display on user scrolling to the element or when the element becomes visible in the browser window.</li>
69
  <li>Sample Data - Sample data that you can import into your site to get started quickly on the widgets and some sample layouts.</li>
70
- <li>Premium Support - The customers will be provided access to a dedicated support forum with searchable content, private tickets, with threads attended to within 24 hours.</li>
71
  </ul>
72
 
73
  <strong>Important: You must activate widgets you need to use from Plugins &gt; SiteOrigin Widgets so that they can be available to use.</strong>.
@@ -85,6 +85,12 @@ http://twitter.com/live_mesh
85
 
86
  Optionally, if you have <a href="https://www.livemeshthemes.com/siteorigin-widgets/" title="Livemesh SiteOrigin Widgets Pro" target="_blank">premium version</a> installed, you can import the sample data that replicates the demo site for you by importing the file sample-data.xml file located in the plugin directory. The import option is available under Tools &gt; Import in WordPress admin.
87
 
 
 
 
 
 
 
88
  == Frequently Asked Questions ==
89
 
90
  = Does it work with the theme that I am using? =
@@ -116,6 +122,14 @@ Pls install and activate the <a href="https://wordpress.org/plugins/portfolio-po
116
 
117
  == Changelog ==
118
 
 
 
 
 
 
 
 
 
119
  = 2.3 =
120
  * Fixed - Incompatibility with certain themes due to different versions of waypoints scripts being used.
121
  * Fixed - Misplaced HTML5 video background hero header video tags information
5
  Tags: widget, siteorigin, siteorigin widgets bundle, siteorigin page builder, siteorigin widgets, grid, gallery, video background, portfolio, carousel, shortcode, tabs, admin, plugin, page
6
  Requires at least: 4.5
7
  Tested up to: 4.9
8
+ Stable Tag: 2.5.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
67
  <li>Custom Fonts - Ability to choose custom fonts from Google Fonts library for headings in heading widget and the hero header widget.</li>
68
  <li>Custom Animations - Choose from over <strong>40+ animations</strong> for most widgets (excludes sliders, carousels and grid). The animations display on user scrolling to the element or when the element becomes visible in the browser window.</li>
69
  <li>Sample Data - Sample data that you can import into your site to get started quickly on the widgets and some sample layouts.</li>
70
+ <li>Premium Support - The customers will have access to a support portal with queries attended to within 24 hours.</li>
71
  </ul>
72
 
73
  <strong>Important: You must activate widgets you need to use from Plugins &gt; SiteOrigin Widgets so that they can be available to use.</strong>.
85
 
86
  Optionally, if you have <a href="https://www.livemeshthemes.com/siteorigin-widgets/" title="Livemesh SiteOrigin Widgets Pro" target="_blank">premium version</a> installed, you can import the sample data that replicates the demo site for you by importing the file sample-data.xml file located in the plugin directory. The import option is available under Tools &gt; Import in WordPress admin.
87
 
88
+ == Support ==
89
+
90
+ The premium version of the plugin entitles you to quick support with replies posted within 24 hours (on week days).
91
+
92
+ Please submit your support query through our <a href="https://www.livemeshthemes.com/siteorigin-widgets/contact-us/" title="Livemesh Contact form">website contact form</a>. This will create a support ticket in our support portal.
93
+
94
  == Frequently Asked Questions ==
95
 
96
  = Does it work with the theme that I am using? =
122
 
123
  == Changelog ==
124
 
125
+ = 2.5.1 =
126
+ * Fixed - The posts grid widget won't show up with the free version of the plugin
127
+
128
+ = 2.5 =
129
+ * Added - Major release of the plugin with extensive support for filters and templates to enable users to customize the output generated by the widgets. You can now create a template file in siteorigin-widgets folder in your child theme to customize the widgets html or use filters to customize output generated by the widgets.
130
+ * Updated - Documentation providing information on how to use templates and filters to customize the plugin widgets
131
+ * Added - Filters for settings object employed for rendering the widgets
132
+
133
  = 2.3 =
134
  * Fixed - Incompatibility with certain themes due to different versions of waypoints scripts being used.
135
  * Fixed - Misplaced HTML5 video background hero header video tags information