SiteOrigin Widgets Bundle - Version 1.9.3

Version Description

  • 3 July 2017 =
  • Editor: Fix settings form label.
  • Don't select the external fallback field as value input.
  • Social media buttons: Don't output calls when missing network name.
  • Use gettext for widget global settings dialog title.
  • Image: Added link attributes to template variables.
  • Image grid: Use get_template_variables.
  • Image grid: Template code structure a bit more readable.
  • Simple masonry: Assign link attributes in get_template_variables.
  • Slider widget: Output link attributes.
  • Features: Remove redundant paragraph from template.
  • Google Maps: Fix issue when no matches found in maps API error string.
  • Google Maps: Mention required Google Maps APIs in field descriptions.
  • Google Maps: Localized strings used in JS.
  • Elementor 1.5: Ensure widgets' setup scripts are run after editing.
Download this release

Release Info

Developer gpriday
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.9.3
Comparing to
See all releases

Code changes from version 1.9.2 to 1.9.3

admin/tpl/admin.php CHANGED
@@ -105,7 +105,7 @@
105
  <div class="so-overlay"></div>
106
 
107
  <div class="so-title-bar">
108
- <h3 class="so-title">Widget Settings</h3>
109
  <a class="so-close">
110
  <span class="so-dialog-icon"></span>
111
  </a>
105
  <div class="so-overlay"></div>
106
 
107
  <div class="so-title-bar">
108
+ <h3 class="so-title"><?php _e( 'Widget Settings', 'so-widgets-bundle' ) ?></h3>
109
  <a class="so-close">
110
  <span class="so-dialog-icon"></span>
111
  </a>
base/inc/fields/checkbox.class.php CHANGED
@@ -10,7 +10,7 @@ class SiteOrigin_Widget_Field_Checkbox extends SiteOrigin_Widget_Field_Base {
10
  <label for="<?php echo esc_attr( $this->element_id ) ?>" class="so-checkbox-label">
11
  <input type="checkbox" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
12
  class="siteorigin-widget-input" <?php checked( !empty( $value ) ) ?> />
13
- <?php echo esc_attr( $this->label ) ?>
14
  </label>
15
  <?php
16
  }
10
  <label for="<?php echo esc_attr( $this->element_id ) ?>" class="so-checkbox-label">
11
  <input type="checkbox" name="<?php echo esc_attr( $this->element_name ) ?>" id="<?php echo esc_attr( $this->element_id ) ?>"
12
  class="siteorigin-widget-input" <?php checked( !empty( $value ) ) ?> />
13
+ <?php echo esc_html( $this->label ) ?>
14
  </label>
15
  <?php
16
  }
base/inc/fields/js/media-field.js CHANGED
@@ -5,7 +5,7 @@
5
  $(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-media', function(e) {
6
  var $field = $( this );
7
  var $media = $field.find('> .media-field-wrapper');
8
- var $inputField = $field.find( '.siteorigin-widget-input' );
9
 
10
  // Handle the media uploader
11
  $media.find( '.media-upload-button' ).click(function(e){
5
  $(document).on( 'sowsetupformfield', '.siteorigin-widget-field-type-media', function(e) {
6
  var $field = $( this );
7
  var $media = $field.find('> .media-field-wrapper');
8
+ var $inputField = $field.find( '.siteorigin-widget-input' ).not('.media-fallback-external');
9
 
10
  // Handle the media uploader
11
  $media.find( '.media-upload-button' ).click(function(e){
base/inc/fields/js/media-field.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-media",function(t){var i=e(this),s=i.find("> .media-field-wrapper"),n=i.find(".siteorigin-widget-input");s.find(".media-upload-button").click(function(t){if(t.preventDefault(),"undefined"!=typeof wp.media){var s=e(this),a=e(this).data("frame");if(a)return a.open(),!1;a=wp.media({title:s.data("choose"),library:{type:s.data("library").split(",").map(function(e){return e.trim()})},button:{text:s.data("update"),close:!1}}),s.data("frame",a),a.on("select",function(){var e=a.state().get("selection").first().attributes;i.find(".current .title").html(e.title),n.val(e.id),n.trigger("change",{silent:!0});var t=i.find(".current .thumbnail");"undefined"!=typeof e.sizes?"undefined"!=typeof e.sizes.thumbnail?t.attr("src",e.sizes.thumbnail.url).fadeIn():t.attr("src",e.sizes.full.url).fadeIn():t.attr("src",e.icon).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide"),a.close()}),a.open()}}),s.find(".current").mouseenter(function(){var t=e(this).find(".title");""!==t.html()&&t.fadeIn("fast")}).mouseleave(function(){e(this).find(".title").clearQueue().fadeOut("fast")}),i.find("a.media-remove-button").click(function(t){t.preventDefault(),i.find(".current .title").html(""),n.val(""),i.find(".current .thumbnail").fadeOut("fast"),e(this).addClass("remove-hide")});var a=!1,r=function(){if(a){var e=a.find(".so-widgets-image-results");if(0!==e.length){var t=e.width(),i=Math.floor(t/276),s=t-276*i,n=s/i+260;e.find(".so-widgets-result-image").css({width:n,height:n/1.4})}}};e(window).resize(r);var o=function(){if(!a){a=e(e("#so-widgets-bundle-tpl-image-search-dialog").html().trim()).appendTo("body"),a.find(".close").click(function(){a.hide()});var t=a.find(".so-widgets-image-results"),s=function(i,s){a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("loading")),a.find(".so-widgets-results-more").hide(),e.get(ajaxurl,{action:"so_widgets_image_search",q:i,page:s,_sononce:a.find('input[name="_sononce"]').val()},function(n){return n.error?void alert(n.message):(t.removeClass("so-loading"),e.each(n.items,function(i,s){var n=e(e("#so-widgets-bundle-tpl-image-search-result").html().trim()).appendTo(t).addClass("source-"+s.source),a=n.find(".so-widgets-result-image");a.css("background-image","url("+s.thumbnail+")"),a.data("thumbnail",s.thumbnail),a.data("preview",s.preview),s.url&&a.attr({href:s.url,target:"_blank"}),s.full_url&&(a.data({full_url:s.full_url,import_signature:s.import_signature}),a.attr("href",s.full_url)),"shutterstock"===s.source&&a.append(e("#so-widgets-bundle-tpl-image-search-result-sponsored").html())}),1===s&&(a.find("#so-widgets-image-search-suggestions ul").empty(),e.each(n.keywords,function(t,i){a.find("#so-widgets-image-search-suggestions").show(),a.find("#so-widgets-image-search-suggestions ul").append(e("<li></li>").append(e('<a href="#"></a>').html(i).data("keyword",i)))})),a.find(".so-widgets-results-loading").fadeOut("fast"),r(),void a.find(".so-widgets-results-more").show().find("button").data({query:i,page:s+1}))})};a.find("#so-widgets-image-search-form").submit(function(e){e.preventDefault();var i=a.find(".so-widgets-search-input").val();t.empty(),""!==i&&s(i,1)}),a.on("click",".so-keywords-list a",function(t){t.preventDefault();var i=e(this).blur();a.find(".so-widgets-search-input").val(i.data("keyword")),a.find("#so-widgets-image-search-form").submit()}),a.find(".so-widgets-results-more button").click(function(){var t=e(this);s(t.data("query"),t.data("page"))});var o;a.on("click",".so-widgets-result-image",function(t){var s=e(this);if(s.data("full_url")&&(t.preventDefault(),confirm(a.data("confirm-import")))){a.addClass("so-widgets-importing");var r=e("#post_ID").val();null===r&&(r=""),e.get(ajaxurl,{action:"so_widgets_image_import",full_url:s.data("full_url"),import_signature:s.data("import_signature"),post_id:r,_sononce:a.find('input[name="_sononce"]').val()},function(e){a.find("#so-widgets-image-search-frame").removeClass("so-widgets-importing"),e.error===!1?(a.hide(),a.find(".so-widgets-results-loading").hide(),n.val(e.attachment_id).trigger("change",{silent:!0}),i.find(".current .thumbnail").attr("src",e.thumb).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide")):(alert(e.message),a.find(".so-widgets-results-loading").hide())}),a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("importing")),a.find(".so-widgets-results-more").hide(),a.find("#so-widgets-image-search-frame").addClass("so-widgets-importing")}});var d=a.find(".so-widgets-preview-window");a.on("mouseenter",".so-widgets-result-image",function(){var t=e(this),i=t.data("preview");clearTimeout(o),o=setTimeout(function(){var s=1,n=1;i[1]>.33*e(window).outerWidth()&&(s=.33*e(window).outerWidth()/i[1]),i[2]>.5*e(window).outerHeight()&&(n=.5*e(window).outerHeight()/i[2]);var r=Math.min(s,n);r>1&&(r=1),d.show().find(".so-widgets-preview-window-inside").css({"background-image":"url("+t.data("thumbnail")+")",width:i[1]*r,height:i[2]*r}).append(e("<img />").attr("src",i[0])),a.trigger("mousemove")},1e3)}).on("mouseleave",".so-widgets-result-image",function(){d.hide().find("img").remove(),clearTimeout(o)});var u,l;a.on("mousemove",function(t){if(t.clientX&&(u=t.clientX),t.clientY&&(l=t.clientY),d.is(":visible")){var i=d.outerHeight(),s=d.outerWidth(),n=e(window).outerHeight(),a=e(window).outerWidth(),r=l-i/2;r=Math.max(r,10),r=Math.min(r,n-10-i);var o=u<a/2?u+15:u-15-s;d.css({top:r,left:o})}})}a.show(),a.find(".so-widgets-search-input").focus()};s.find(".find-image-button").click(function(e){e.preventDefault(),o()}),n.change(function(e,t){if(!t||!t.silent){var s=n.val();if(s){var a=i.find(".current .thumbnail"),r=wp.media.attachment(s);r.fetch().done(function(){if(r.has("sizes")){var e=r.get("sizes");"undefined"!=typeof e.thumbnail?a.attr("src",e.thumbnail.url).fadeIn():a.attr("src",e.full.url).fadeIn()}else a.attr("src",r.get("icon")).fadeIn();i.find(".media-remove-button").removeClass("remove-hide")})}else i.find("a.media-remove-button").click()}})})}(jQuery);
1
+ !function(e){e(document).on("sowsetupformfield",".siteorigin-widget-field-type-media",function(t){var i=e(this),s=i.find("> .media-field-wrapper"),n=i.find(".siteorigin-widget-input").not(".media-fallback-external");s.find(".media-upload-button").click(function(t){if(t.preventDefault(),"undefined"!=typeof wp.media){var s=e(this),a=e(this).data("frame");if(a)return a.open(),!1;a=wp.media({title:s.data("choose"),library:{type:s.data("library").split(",").map(function(e){return e.trim()})},button:{text:s.data("update"),close:!1}}),s.data("frame",a),a.on("select",function(){var e=a.state().get("selection").first().attributes;i.find(".current .title").html(e.title),n.val(e.id),n.trigger("change",{silent:!0});var t=i.find(".current .thumbnail");"undefined"!=typeof e.sizes?"undefined"!=typeof e.sizes.thumbnail?t.attr("src",e.sizes.thumbnail.url).fadeIn():t.attr("src",e.sizes.full.url).fadeIn():t.attr("src",e.icon).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide"),a.close()}),a.open()}}),s.find(".current").mouseenter(function(){var t=e(this).find(".title");""!==t.html()&&t.fadeIn("fast")}).mouseleave(function(){e(this).find(".title").clearQueue().fadeOut("fast")}),i.find("a.media-remove-button").click(function(t){t.preventDefault(),i.find(".current .title").html(""),n.val(""),i.find(".current .thumbnail").fadeOut("fast"),e(this).addClass("remove-hide")});var a=!1,r=function(){if(a){var e=a.find(".so-widgets-image-results");if(0!==e.length){var t=e.width(),i=Math.floor(t/276),s=t-276*i,n=s/i+260;e.find(".so-widgets-result-image").css({width:n,height:n/1.4})}}};e(window).resize(r);var o=function(){if(!a){a=e(e("#so-widgets-bundle-tpl-image-search-dialog").html().trim()).appendTo("body"),a.find(".close").click(function(){a.hide()});var t=a.find(".so-widgets-image-results"),s=function(i,s){a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("loading")),a.find(".so-widgets-results-more").hide(),e.get(ajaxurl,{action:"so_widgets_image_search",q:i,page:s,_sononce:a.find('input[name="_sononce"]').val()},function(n){return n.error?void alert(n.message):(t.removeClass("so-loading"),e.each(n.items,function(i,s){var n=e(e("#so-widgets-bundle-tpl-image-search-result").html().trim()).appendTo(t).addClass("source-"+s.source),a=n.find(".so-widgets-result-image");a.css("background-image","url("+s.thumbnail+")"),a.data("thumbnail",s.thumbnail),a.data("preview",s.preview),s.url&&a.attr({href:s.url,target:"_blank"}),s.full_url&&(a.data({full_url:s.full_url,import_signature:s.import_signature}),a.attr("href",s.full_url)),"shutterstock"===s.source&&a.append(e("#so-widgets-bundle-tpl-image-search-result-sponsored").html())}),1===s&&(a.find("#so-widgets-image-search-suggestions ul").empty(),e.each(n.keywords,function(t,i){a.find("#so-widgets-image-search-suggestions").show(),a.find("#so-widgets-image-search-suggestions ul").append(e("<li></li>").append(e('<a href="#"></a>').html(i).data("keyword",i)))})),a.find(".so-widgets-results-loading").fadeOut("fast"),r(),void a.find(".so-widgets-results-more").show().find("button").data({query:i,page:s+1}))})};a.find("#so-widgets-image-search-form").submit(function(e){e.preventDefault();var i=a.find(".so-widgets-search-input").val();t.empty(),""!==i&&s(i,1)}),a.on("click",".so-keywords-list a",function(t){t.preventDefault();var i=e(this).blur();a.find(".so-widgets-search-input").val(i.data("keyword")),a.find("#so-widgets-image-search-form").submit()}),a.find(".so-widgets-results-more button").click(function(){var t=e(this);s(t.data("query"),t.data("page"))});var o;a.on("click",".so-widgets-result-image",function(t){var s=e(this);if(s.data("full_url")&&(t.preventDefault(),confirm(a.data("confirm-import")))){a.addClass("so-widgets-importing");var r=e("#post_ID").val();null===r&&(r=""),e.get(ajaxurl,{action:"so_widgets_image_import",full_url:s.data("full_url"),import_signature:s.data("import_signature"),post_id:r,_sononce:a.find('input[name="_sononce"]').val()},function(e){a.find("#so-widgets-image-search-frame").removeClass("so-widgets-importing"),e.error===!1?(a.hide(),a.find(".so-widgets-results-loading").hide(),n.val(e.attachment_id).trigger("change",{silent:!0}),i.find(".current .thumbnail").attr("src",e.thumb).fadeIn(),i.find(".media-remove-button").removeClass("remove-hide")):(alert(e.message),a.find(".so-widgets-results-loading").hide())}),a.find(".so-widgets-results-loading").fadeIn("fast"),a.find(".so-widgets-results-loading strong").html(a.find(".so-widgets-results-loading strong").data("importing")),a.find(".so-widgets-results-more").hide(),a.find("#so-widgets-image-search-frame").addClass("so-widgets-importing")}});var d=a.find(".so-widgets-preview-window");a.on("mouseenter",".so-widgets-result-image",function(){var t=e(this),i=t.data("preview");clearTimeout(o),o=setTimeout(function(){var s=1,n=1;i[1]>.33*e(window).outerWidth()&&(s=.33*e(window).outerWidth()/i[1]),i[2]>.5*e(window).outerHeight()&&(n=.5*e(window).outerHeight()/i[2]);var r=Math.min(s,n);r>1&&(r=1),d.show().find(".so-widgets-preview-window-inside").css({"background-image":"url("+t.data("thumbnail")+")",width:i[1]*r,height:i[2]*r}).append(e("<img />").attr("src",i[0])),a.trigger("mousemove")},1e3)}).on("mouseleave",".so-widgets-result-image",function(){d.hide().find("img").remove(),clearTimeout(o)});var l,u;a.on("mousemove",function(t){if(t.clientX&&(l=t.clientX),t.clientY&&(u=t.clientY),d.is(":visible")){var i=d.outerHeight(),s=d.outerWidth(),n=e(window).outerHeight(),a=e(window).outerWidth(),r=u-i/2;r=Math.max(r,10),r=Math.min(r,n-10-i);var o=l<a/2?l+15:l-15-s;d.css({top:r,left:o})}})}a.show(),a.find(".so-widgets-search-input").focus()};s.find(".find-image-button").click(function(e){e.preventDefault(),o()}),n.change(function(e,t){if(!t||!t.silent){var s=n.val();if(s){var a=i.find(".current .thumbnail"),r=wp.media.attachment(s);r.fetch().done(function(){if(r.has("sizes")){var e=r.get("sizes");"undefined"!=typeof e.thumbnail?a.attr("src",e.thumbnail.url).fadeIn():a.attr("src",e.full.url).fadeIn()}else a.attr("src",r.get("icon")).fadeIn();i.find(".media-remove-button").removeClass("remove-hide")})}else i.find("a.media-remove-button").click()}})})}(jQuery);
compat/elementor/elementor.php CHANGED
@@ -16,16 +16,17 @@ class SiteOrigin_Widgets_Bundle_Elementor {
16
  private $plugin;
17
 
18
  function __construct() {
19
- add_action( 'template_redirect', [ $this, 'init' ] );
20
 
21
- add_action( 'wp_ajax_elementor_render_widget', [ $this, 'ajax_render_widget_preview' ] );
22
- add_action( 'wp_ajax_elementor_editor_get_wp_widget_form', [ $this, 'ajax_render_widget_form' ] );
23
  }
24
 
25
  function init() {
26
  $this->plugin = Elementor\Plugin::instance();
27
  if ( !empty( $this->plugin->preview ) && method_exists( $this->plugin->preview, 'is_preview_mode' ) && $this->plugin->preview->is_preview_mode() ) {
28
- add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_frontend_scripts' ] );
 
29
  }
30
 
31
  add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
@@ -41,6 +42,21 @@ class SiteOrigin_Widgets_Bundle_Elementor {
41
  $this->plugin->db->get_builder( $post_id, Elementor\DB::STATUS_DRAFT );
42
  }
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  function enqueue_active_widgets_scripts() {
46
 
@@ -59,6 +75,12 @@ class SiteOrigin_Widgets_Bundle_Elementor {
59
  }
60
 
61
  wp_enqueue_style( 'sowb-styles-for-elementor', plugin_dir_url( __FILE__ ) . 'styles.css' );
 
 
 
 
 
 
62
 
63
  }
64
 
@@ -80,12 +102,10 @@ class SiteOrigin_Widgets_Bundle_Elementor {
80
  }
81
 
82
  function render_widget_preview( $widget_output ) {
83
-
84
- $wp_scripts = wp_scripts();
85
  $wp_styles = wp_styles();
86
 
87
- // Print any scripts and styles we may have enqueued for live preview.
88
- wp_print_scripts( $wp_scripts->queue );
89
  wp_print_styles( $wp_styles->queue );
90
 
91
  return $widget_output;
16
  private $plugin;
17
 
18
  function __construct() {
19
+ add_action( 'template_redirect', array( $this, 'init' ) );
20
 
21
+ add_action( 'wp_ajax_elementor_render_widget', array( $this, 'ajax_render_widget_preview' ) );
22
+ add_action( 'wp_ajax_elementor_editor_get_wp_widget_form', array( $this, 'ajax_render_widget_form' ) );
23
  }
24
 
25
  function init() {
26
  $this->plugin = Elementor\Plugin::instance();
27
  if ( !empty( $this->plugin->preview ) && method_exists( $this->plugin->preview, 'is_preview_mode' ) && $this->plugin->preview->is_preview_mode() ) {
28
+ add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) );
29
+ add_action( 'elementor/preview/enqueue_styles', array( $this, 'enqueue_preview_scripts' ) );
30
  }
31
 
32
  add_action( 'elementor/editor/before_enqueue_scripts', array( $this, 'enqueue_active_widgets_scripts' ) );
42
  $this->plugin->db->get_builder( $post_id, Elementor\DB::STATUS_DRAFT );
43
  }
44
  }
45
+
46
+ function enqueue_preview_scripts() {
47
+
48
+ global $wp_widget_factory;
49
+
50
+ foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
51
+ if ( ! empty( $widget_obj ) && is_object( $widget_obj ) && is_subclass_of( $widget_obj, 'SiteOrigin_Widget' ) ) {
52
+ /* @var $widget_obj SiteOrigin_Widget */
53
+ ob_start();
54
+ $widget_obj->widget( array(), array() );
55
+ ob_clean();
56
+ }
57
+ }
58
+
59
+ }
60
 
61
  function enqueue_active_widgets_scripts() {
62
 
75
  }
76
 
77
  wp_enqueue_style( 'sowb-styles-for-elementor', plugin_dir_url( __FILE__ ) . 'styles.css' );
78
+
79
+ wp_enqueue_script(
80
+ 'sowb-js-for-elementor',
81
+ plugin_dir_url( __FILE__ ) . 'sowb-elementor' . SOW_BUNDLE_JS_SUFFIX . '.js',
82
+ array( 'jquery' )
83
+ );
84
 
85
  }
86
 
102
  }
103
 
104
  function render_widget_preview( $widget_output ) {
105
+
 
106
  $wp_styles = wp_styles();
107
 
108
+ // Print any styles we may have enqueued for live preview.
 
109
  wp_print_styles( $wp_styles->queue );
110
 
111
  return $widget_output;
compat/elementor/sowb-elementor.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var sowb = window.sowb || {};
2
+
3
+ ( function($){
4
+
5
+ // To ensure necessary scripts are executed again when settings are changed
6
+ $( window ).on( 'elementor:init', function() {
7
+ elementor.on( 'preview:loaded', function () {
8
+ var preview_window = elementor.$preview.get( 0 ).contentWindow;
9
+ var $sowb = preview_window.jQuery( preview_window.sowb );
10
+ var timeoutId;
11
+ elementorFrontend.hooks.addAction( 'frontend/element_ready/widget', function(){
12
+ // Debounce
13
+ if ( timeoutId ) {
14
+ clearTimeout( timeoutId );
15
+ }
16
+ timeoutId = setTimeout( function () {
17
+ // Trigger Widgets Bundle widgets to setup
18
+ $sowb.trigger( 'setup_widgets' );
19
+ timeoutId = null;
20
+ }, 300 );
21
+ } );
22
+ } );
23
+ } );
24
+
25
+ })(jQuery);
compat/elementor/sowb-elementor.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var sowb=window.sowb||{};!function(e){e(window).on("elementor:init",function(){elementor.on("preview:loaded",function(){var e,n=elementor.$preview.get(0).contentWindow,o=n.jQuery(n.sowb);elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(){e&&clearTimeout(e),e=setTimeout(function(){o.trigger("setup_widgets"),e=null},300)})})})}(jQuery);
lang/so-widgets-bundle.pot CHANGED
@@ -25,7 +25,7 @@ msgstr ""
25
  msgid "Filter Widgets"
26
  msgstr ""
27
 
28
- #: tmp/admin/tpl/admin.php:17, tmp/base/inc/fields/posts.class.php:12, tmp/widgets/google-map/google-map.php:340
29
  msgid "All"
30
  msgstr ""
31
 
@@ -49,7 +49,7 @@ msgstr ""
49
  msgid "Deactivate"
50
  msgstr ""
51
 
52
- #: tmp/admin/tpl/admin.php:86, tmp/widgets/contact/contact.php:58, tmp/widgets/google-map/google-map.php:66, tmp/widgets/testimonial/testimonial.php:99
53
  msgid "Settings"
54
  msgstr ""
55
 
@@ -61,6 +61,10 @@ msgstr ""
61
  msgid "Read More"
62
  msgstr ""
63
 
 
 
 
 
64
  #: tmp/admin/tpl/admin.php:119
65
  msgid "Save"
66
  msgstr ""
@@ -329,7 +333,7 @@ msgstr ""
329
  msgid "Sticky posts"
330
  msgstr ""
331
 
332
- #: tmp/base/inc/fields/posts.class.php:115, tmp/compat/beaver-builder/beaver-builder.php:60, tmp/widgets/google-map/google-map.php:272, tmp/widgets/image/image.php:46
333
  msgid "Default"
334
  msgstr ""
335
 
@@ -601,11 +605,11 @@ msgstr ""
601
  msgid "Button text"
602
  msgstr ""
603
 
604
- #: tmp/widgets/button/button.php:50, tmp/widgets/google-map/google-map.php:100, tmp/widgets/headline/headline.php:44, tmp/widgets/headline/headline.php:115, tmp/widgets/hero/hero.php:119, tmp/widgets/icon/icon.php:56, tmp/widgets/image/image.php:76, tmp/widgets/layout-slider/layout-slider.php:86, tmp/widgets/simple-masonry/simple-masonry.php:78, tmp/widgets/slider/slider.php:84
605
  msgid "Destination URL"
606
  msgstr ""
607
 
608
- #: tmp/widgets/button/button.php:56, tmp/widgets/google-map/google-map.php:111, tmp/widgets/headline/headline.php:49, tmp/widgets/headline/headline.php:120, tmp/widgets/icon/icon.php:62, tmp/widgets/simple-masonry/simple-masonry.php:83, tmp/widgets/social-media-buttons/social-media-buttons.php:85, tmp/widgets/taxonomy/taxonomy.php:64
609
  msgid "Open in a new window"
610
  msgstr ""
611
 
@@ -629,7 +633,7 @@ msgstr ""
629
  msgid "Design and layout"
630
  msgstr ""
631
 
632
- #: tmp/widgets/button/button.php:89, tmp/widgets/contact/contact.php:351, tmp/widgets/contact/contact.php:609, tmp/widgets/google-map/google-map.php:91
633
  msgid "Width"
634
  msgstr ""
635
 
@@ -1081,7 +1085,7 @@ msgstr ""
1081
  msgid "Field labels"
1082
  msgstr ""
1083
 
1084
- #: tmp/widgets/contact/contact.php:334, tmp/widgets/contact/contact.php:449, tmp/widgets/contact/contact.php:604, tmp/widgets/features/features.php:146, tmp/widgets/features/features.php:167, tmp/widgets/features/features.php:188, tmp/widgets/google-map/google-map.php:350, tmp/widgets/headline/headline.php:67, tmp/widgets/headline/headline.php:138, tmp/widgets/headline/headline.php:198, tmp/widgets/icon/icon.php:35, tmp/widgets/taxonomy/taxonomy.php:55
1085
  msgid "Color"
1086
  msgstr ""
1087
 
@@ -1113,7 +1117,7 @@ msgstr ""
1113
  msgid "Margin"
1114
  msgstr ""
1115
 
1116
- #: tmp/widgets/contact/contact.php:395, tmp/widgets/google-map/google-map.php:96, tmp/widgets/hero/hero.php:156, tmp/widgets/layout-slider/layout-slider.php:123
1117
  msgid "Height"
1118
  msgstr ""
1119
 
@@ -1133,7 +1137,7 @@ msgstr ""
1133
  msgid "Field descriptions"
1134
  msgstr ""
1135
 
1136
- #: tmp/widgets/contact/contact.php:454, tmp/widgets/contact/contact.php:587, tmp/widgets/google-map/google-map.php:303, tmp/widgets/headline/headline.php:182
1137
  msgid "Style"
1138
  msgstr ""
1139
 
@@ -1310,7 +1314,7 @@ msgid "Automatically add paragraphs"
1310
  msgstr ""
1311
 
1312
  #: tmp/widgets/editor/editor.php:51
1313
- msgid "Enable the <em>Automatically add paragraphs</em> setting by default."
1314
  msgstr ""
1315
 
1316
  #: tmp/widgets/features/features.php:13
@@ -1429,363 +1433,367 @@ msgstr ""
1429
  msgid "Map center"
1430
  msgstr ""
1431
 
1432
- #: tmp/widgets/google-map/google-map.php:45
1433
- msgid "The name of a place, town, city, or even a country. Can be an exact address too."
1434
  msgstr ""
1435
 
1436
- #: tmp/widgets/google-map/google-map.php:49, tmp/widgets/google-map/google-map.php:54, tmp/widgets/google-map/google-map.php:431
1437
  msgid "API key"
1438
  msgstr ""
1439
 
1440
- #: tmp/widgets/google-map/google-map.php:57
1441
  msgid "Enter your %sAPI key%s. Your map may not function correctly without one."
1442
  msgstr ""
1443
 
1444
- #: tmp/widgets/google-map/google-map.php:68
1445
  msgid "Set map display options."
1446
  msgstr ""
1447
 
1448
- #: tmp/widgets/google-map/google-map.php:73
1449
  msgid "Map type"
1450
  msgstr ""
1451
 
1452
- #: tmp/widgets/google-map/google-map.php:79
1453
  msgid "Interactive"
1454
  msgstr ""
1455
 
1456
- #: tmp/widgets/google-map/google-map.php:80
1457
  msgid "Static image"
1458
  msgstr ""
1459
 
1460
- #: tmp/widgets/google-map/google-map.php:120
1461
  msgid "Zoom level"
1462
  msgstr ""
1463
 
1464
- #: tmp/widgets/google-map/google-map.php:121
1465
  msgid "A value from 0 (the world) to 21 (street level)."
1466
  msgstr ""
1467
 
1468
- #: tmp/widgets/google-map/google-map.php:135
1469
  msgid "Scroll to zoom"
1470
  msgstr ""
1471
 
1472
- #: tmp/widgets/google-map/google-map.php:136
1473
  msgid "Allow scrolling over the map to zoom in or out."
1474
  msgstr ""
1475
 
1476
- #: tmp/widgets/google-map/google-map.php:145
1477
  msgid "Draggable"
1478
  msgstr ""
1479
 
1480
- #: tmp/widgets/google-map/google-map.php:146
1481
  msgid "Allow dragging the map to move it around."
1482
  msgstr ""
1483
 
1484
- #: tmp/widgets/google-map/google-map.php:155
1485
  msgid "Disable default UI"
1486
  msgstr ""
1487
 
1488
- #: tmp/widgets/google-map/google-map.php:156
1489
  msgid "Hides the default Google Maps controls."
1490
  msgstr ""
1491
 
1492
- #: tmp/widgets/google-map/google-map.php:165
1493
  msgid "Keep map centered"
1494
  msgstr ""
1495
 
1496
- #: tmp/widgets/google-map/google-map.php:166
1497
  msgid "Keeps the map centered when it's container is resized."
1498
  msgstr ""
1499
 
1500
- #: tmp/widgets/google-map/google-map.php:170
1501
  msgid "Fallback Image"
1502
  msgstr ""
1503
 
1504
- #: tmp/widgets/google-map/google-map.php:171
1505
  msgid "This image will be displayed if there are any problems with displaying the specified map."
1506
  msgstr ""
1507
 
1508
- #: tmp/widgets/google-map/google-map.php:176
1509
  msgid "Fallback Image Size"
1510
  msgstr ""
1511
 
1512
- #: tmp/widgets/google-map/google-map.php:182
1513
  msgid "Markers"
1514
  msgstr ""
1515
 
1516
- #: tmp/widgets/google-map/google-map.php:184
1517
  msgid "Use markers to identify points of interest on the map."
1518
  msgstr ""
1519
 
1520
- #: tmp/widgets/google-map/google-map.php:189
1521
  msgid "Show marker at map center"
1522
  msgstr ""
1523
 
1524
- #: tmp/widgets/google-map/google-map.php:194
1525
  msgid "Marker icon"
1526
  msgstr ""
1527
 
1528
- #: tmp/widgets/google-map/google-map.php:195
1529
  msgid "Replaces the default map marker with your own image."
1530
  msgstr ""
1531
 
1532
- #: tmp/widgets/google-map/google-map.php:204
1533
  msgid "Draggable markers"
1534
  msgstr ""
1535
 
1536
- #: tmp/widgets/google-map/google-map.php:208
1537
  msgid "Marker positions"
1538
  msgstr ""
1539
 
1540
- #: tmp/widgets/google-map/google-map.php:209
1541
  msgid "Please be aware that adding more than 10 markers may cause a slight delay before they appear, due to Google Geocoding API rate limits."
1542
  msgstr ""
1543
 
1544
- #: tmp/widgets/google-map/google-map.php:210
1545
  msgid "Marker"
1546
  msgstr ""
1547
 
1548
- #: tmp/widgets/google-map/google-map.php:220
1549
  msgid "Place"
1550
  msgstr ""
1551
 
1552
- #: tmp/widgets/google-map/google-map.php:225
1553
  msgid "Info Window Content"
1554
  msgstr ""
1555
 
1556
- #: tmp/widgets/google-map/google-map.php:229
1557
  msgid "Info Window max width"
1558
  msgstr ""
1559
 
1560
- #: tmp/widgets/google-map/google-map.php:234
1561
  msgid "Custom Marker icon"
1562
  msgstr ""
1563
 
1564
- #: tmp/widgets/google-map/google-map.php:235
1565
  msgid "Replace the default map marker with your own image for each marker."
1566
  msgstr ""
1567
 
1568
- #: tmp/widgets/google-map/google-map.php:241
1569
  msgid "When should Info Windows be displayed?"
1570
  msgstr ""
1571
 
1572
- #: tmp/widgets/google-map/google-map.php:244
1573
  msgid "Click"
1574
  msgstr ""
1575
 
1576
- #: tmp/widgets/google-map/google-map.php:245
1577
  msgid "Mouse over"
1578
  msgstr ""
1579
 
1580
- #: tmp/widgets/google-map/google-map.php:246
1581
  msgid "Always"
1582
  msgstr ""
1583
 
1584
- #: tmp/widgets/google-map/google-map.php:251
1585
  msgid "Allow multiple simultaneous Info Windows?"
1586
  msgstr ""
1587
 
1588
- #: tmp/widgets/google-map/google-map.php:259
1589
  msgid "Styles"
1590
  msgstr ""
1591
 
1592
- #: tmp/widgets/google-map/google-map.php:261
1593
  msgid "Apply custom colors to map features, or hide them completely."
1594
  msgstr ""
1595
 
1596
- #: tmp/widgets/google-map/google-map.php:266
1597
  msgid "Map styles"
1598
  msgstr ""
1599
 
1600
- #: tmp/widgets/google-map/google-map.php:273
1601
  msgid "Custom"
1602
  msgstr ""
1603
 
1604
- #: tmp/widgets/google-map/google-map.php:274
1605
  msgid "Predefined Styles"
1606
  msgstr ""
1607
 
1608
- #: tmp/widgets/google-map/google-map.php:283
1609
  msgid "Styled map name"
1610
  msgstr ""
1611
 
1612
- #: tmp/widgets/google-map/google-map.php:293
1613
  msgid "Raw JSON styles"
1614
  msgstr ""
1615
 
1616
- #: tmp/widgets/google-map/google-map.php:294
1617
  msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\">Snazzy Maps</a>."
1618
  msgstr ""
1619
 
1620
- #: tmp/widgets/google-map/google-map.php:302
1621
  msgid "Custom map styles"
1622
  msgstr ""
1623
 
1624
- #: tmp/widgets/google-map/google-map.php:313
1625
  msgid "Select map feature to style"
1626
  msgstr ""
1627
 
1628
- #: tmp/widgets/google-map/google-map.php:315
1629
  msgid "Water"
1630
  msgstr ""
1631
 
1632
- #: tmp/widgets/google-map/google-map.php:316
1633
  msgid "Highways"
1634
  msgstr ""
1635
 
1636
- #: tmp/widgets/google-map/google-map.php:317
1637
  msgid "Arterial roads"
1638
  msgstr ""
1639
 
1640
- #: tmp/widgets/google-map/google-map.php:318
1641
  msgid "Local roads"
1642
  msgstr ""
1643
 
1644
- #: tmp/widgets/google-map/google-map.php:319
1645
  msgid "Transit lines"
1646
  msgstr ""
1647
 
1648
- #: tmp/widgets/google-map/google-map.php:320
1649
  msgid "Transit stations"
1650
  msgstr ""
1651
 
1652
- #: tmp/widgets/google-map/google-map.php:321
1653
  msgid "Man-made landscape"
1654
  msgstr ""
1655
 
1656
- #: tmp/widgets/google-map/google-map.php:322
1657
  msgid "Natural landscape landcover"
1658
  msgstr ""
1659
 
1660
- #: tmp/widgets/google-map/google-map.php:323
1661
  msgid "Natural landscape terrain"
1662
  msgstr ""
1663
 
1664
- #: tmp/widgets/google-map/google-map.php:324
1665
  msgid "Point of interest - Attractions"
1666
  msgstr ""
1667
 
1668
- #: tmp/widgets/google-map/google-map.php:325
1669
  msgid "Point of interest - Business"
1670
  msgstr ""
1671
 
1672
- #: tmp/widgets/google-map/google-map.php:326
1673
  msgid "Point of interest - Government"
1674
  msgstr ""
1675
 
1676
- #: tmp/widgets/google-map/google-map.php:327
1677
  msgid "Point of interest - Medical"
1678
  msgstr ""
1679
 
1680
- #: tmp/widgets/google-map/google-map.php:328
1681
  msgid "Point of interest - Parks"
1682
  msgstr ""
1683
 
1684
- #: tmp/widgets/google-map/google-map.php:329
1685
  msgid "Point of interest - Places of worship"
1686
  msgstr ""
1687
 
1688
- #: tmp/widgets/google-map/google-map.php:330
1689
  msgid "Point of interest - Schools"
1690
  msgstr ""
1691
 
1692
- #: tmp/widgets/google-map/google-map.php:331
1693
  msgid "Point of interest - Sports complexes"
1694
  msgstr ""
1695
 
1696
- #: tmp/widgets/google-map/google-map.php:336
1697
  msgid "Select element type to style"
1698
  msgstr ""
1699
 
1700
- #: tmp/widgets/google-map/google-map.php:338
1701
  msgid "Geometry"
1702
  msgstr ""
1703
 
1704
- #: tmp/widgets/google-map/google-map.php:339
1705
  msgid "Labels"
1706
  msgstr ""
1707
 
1708
- #: tmp/widgets/google-map/google-map.php:346
1709
  msgid "Visible"
1710
  msgstr ""
1711
 
1712
- #: tmp/widgets/google-map/google-map.php:358
1713
  msgid "Directions"
1714
  msgstr ""
1715
 
1716
- #: tmp/widgets/google-map/google-map.php:364
1717
- msgid "Display a route on your map, with waypoints between your starting point and destination."
1718
  msgstr ""
1719
 
1720
- #: tmp/widgets/google-map/google-map.php:368
1721
  msgid "Starting point"
1722
  msgstr ""
1723
 
1724
- #: tmp/widgets/google-map/google-map.php:372
1725
  msgid "Destination"
1726
  msgstr ""
1727
 
1728
- #: tmp/widgets/google-map/google-map.php:376
1729
  msgid "Travel mode"
1730
  msgstr ""
1731
 
1732
- #: tmp/widgets/google-map/google-map.php:379
1733
  msgid "Driving"
1734
  msgstr ""
1735
 
1736
- #: tmp/widgets/google-map/google-map.php:380
1737
  msgid "Walking"
1738
  msgstr ""
1739
 
1740
- #: tmp/widgets/google-map/google-map.php:381
1741
  msgid "Bicycling"
1742
  msgstr ""
1743
 
1744
- #: tmp/widgets/google-map/google-map.php:382
1745
  msgid "Transit"
1746
  msgstr ""
1747
 
1748
- #: tmp/widgets/google-map/google-map.php:387
1749
  msgid "Avoid highways"
1750
  msgstr ""
1751
 
1752
- #: tmp/widgets/google-map/google-map.php:391
1753
  msgid "Avoid tolls"
1754
  msgstr ""
1755
 
1756
- #: tmp/widgets/google-map/google-map.php:395
1757
  msgid "Waypoints"
1758
  msgstr ""
1759
 
1760
- #: tmp/widgets/google-map/google-map.php:396
1761
  msgid "Waypoint"
1762
  msgstr ""
1763
 
1764
- #: tmp/widgets/google-map/google-map.php:406, tmp/widgets/testimonial/testimonial.php:65
1765
  msgid "Location"
1766
  msgstr ""
1767
 
1768
- #: tmp/widgets/google-map/google-map.php:411
1769
  msgid "Stopover"
1770
  msgstr ""
1771
 
1772
- #: tmp/widgets/google-map/google-map.php:412
1773
  msgid "Whether or not this is a stop on the route or just a route preference."
1774
  msgstr ""
1775
 
1776
- #: tmp/widgets/google-map/google-map.php:418
1777
  msgid "Optimize waypoints"
1778
  msgstr ""
1779
 
1780
- #: tmp/widgets/google-map/google-map.php:420
1781
  msgid "Allow the Google Maps service to reorder waypoints for the shortest travelling distance."
1782
  msgstr ""
1783
 
1784
- #: tmp/widgets/google-map/google-map.php:434
1785
  msgid "Enter your %sAPI key%s. Your map won't function correctly without one."
1786
  msgstr ""
1787
 
1788
- #: tmp/widgets/google-map/google-map.php:589
 
 
 
 
1789
  msgid "Custom Map"
1790
  msgstr ""
1791
 
@@ -2021,27 +2029,31 @@ msgstr ""
2021
  msgid "URL"
2022
  msgstr ""
2023
 
2024
- #: tmp/widgets/image-grid/image-grid.php:78
 
 
 
 
2025
  msgid "Display"
2026
  msgstr ""
2027
 
2028
- #: tmp/widgets/image-grid/image-grid.php:81, tmp/widgets/image/image.php:38, tmp/widgets/testimonial/testimonial.php:130, tmp/widgets/testimonial/testimonial.php:159, tmp/widgets/testimonial/testimonial.php:201
2029
  msgid "Image size"
2030
  msgstr ""
2031
 
2032
- #: tmp/widgets/image-grid/image-grid.php:87
2033
  msgid "Maximum image height"
2034
  msgstr ""
2035
 
2036
- #: tmp/widgets/image-grid/image-grid.php:92
2037
  msgid "Maximum image width"
2038
  msgstr ""
2039
 
2040
- #: tmp/widgets/image-grid/image-grid.php:97
2041
  msgid "Spacing"
2042
  msgstr ""
2043
 
2044
- #: tmp/widgets/image-grid/image-grid.php:98
2045
  msgid "Amount of spacing between images."
2046
  msgstr ""
2047
 
@@ -2069,10 +2081,6 @@ msgstr ""
2069
  msgid "Alt text"
2070
  msgstr ""
2071
 
2072
- #: tmp/widgets/image/image.php:81, tmp/widgets/slider/slider.php:89
2073
- msgid "Open in new window"
2074
- msgstr ""
2075
-
2076
  #: tmp/widgets/image/image.php:87
2077
  msgid "Bound"
2078
  msgstr ""
25
  msgid "Filter Widgets"
26
  msgstr ""
27
 
28
+ #: tmp/admin/tpl/admin.php:17, tmp/base/inc/fields/posts.class.php:12, tmp/widgets/google-map/google-map.php:344
29
  msgid "All"
30
  msgstr ""
31
 
49
  msgid "Deactivate"
50
  msgstr ""
51
 
52
+ #: tmp/admin/tpl/admin.php:86, tmp/widgets/contact/contact.php:58, tmp/widgets/google-map/google-map.php:70, tmp/widgets/testimonial/testimonial.php:99
53
  msgid "Settings"
54
  msgstr ""
55
 
61
  msgid "Read More"
62
  msgstr ""
63
 
64
+ #: tmp/admin/tpl/admin.php:108
65
+ msgid "Widget Settings"
66
+ msgstr ""
67
+
68
  #: tmp/admin/tpl/admin.php:119
69
  msgid "Save"
70
  msgstr ""
333
  msgid "Sticky posts"
334
  msgstr ""
335
 
336
+ #: tmp/base/inc/fields/posts.class.php:115, tmp/compat/beaver-builder/beaver-builder.php:60, tmp/widgets/google-map/google-map.php:276, tmp/widgets/image/image.php:46
337
  msgid "Default"
338
  msgstr ""
339
 
605
  msgid "Button text"
606
  msgstr ""
607
 
608
+ #: tmp/widgets/button/button.php:50, tmp/widgets/google-map/google-map.php:104, tmp/widgets/headline/headline.php:44, tmp/widgets/headline/headline.php:115, tmp/widgets/hero/hero.php:119, tmp/widgets/icon/icon.php:56, tmp/widgets/image/image.php:76, tmp/widgets/layout-slider/layout-slider.php:86, tmp/widgets/simple-masonry/simple-masonry.php:78, tmp/widgets/slider/slider.php:84
609
  msgid "Destination URL"
610
  msgstr ""
611
 
612
+ #: tmp/widgets/button/button.php:56, tmp/widgets/google-map/google-map.php:115, tmp/widgets/headline/headline.php:49, tmp/widgets/headline/headline.php:120, tmp/widgets/icon/icon.php:62, tmp/widgets/simple-masonry/simple-masonry.php:83, tmp/widgets/social-media-buttons/social-media-buttons.php:85, tmp/widgets/taxonomy/taxonomy.php:64
613
  msgid "Open in a new window"
614
  msgstr ""
615
 
633
  msgid "Design and layout"
634
  msgstr ""
635
 
636
+ #: tmp/widgets/button/button.php:89, tmp/widgets/contact/contact.php:351, tmp/widgets/contact/contact.php:609, tmp/widgets/google-map/google-map.php:95
637
  msgid "Width"
638
  msgstr ""
639
 
1085
  msgid "Field labels"
1086
  msgstr ""
1087
 
1088
+ #: tmp/widgets/contact/contact.php:334, tmp/widgets/contact/contact.php:449, tmp/widgets/contact/contact.php:604, tmp/widgets/features/features.php:146, tmp/widgets/features/features.php:167, tmp/widgets/features/features.php:188, tmp/widgets/google-map/google-map.php:354, tmp/widgets/headline/headline.php:67, tmp/widgets/headline/headline.php:138, tmp/widgets/headline/headline.php:198, tmp/widgets/icon/icon.php:35, tmp/widgets/taxonomy/taxonomy.php:55
1089
  msgid "Color"
1090
  msgstr ""
1091
 
1117
  msgid "Margin"
1118
  msgstr ""
1119
 
1120
+ #: tmp/widgets/contact/contact.php:395, tmp/widgets/google-map/google-map.php:100, tmp/widgets/hero/hero.php:156, tmp/widgets/layout-slider/layout-slider.php:123
1121
  msgid "Height"
1122
  msgstr ""
1123
 
1137
  msgid "Field descriptions"
1138
  msgstr ""
1139
 
1140
+ #: tmp/widgets/contact/contact.php:454, tmp/widgets/contact/contact.php:587, tmp/widgets/google-map/google-map.php:307, tmp/widgets/headline/headline.php:182
1141
  msgid "Style"
1142
  msgstr ""
1143
 
1314
  msgstr ""
1315
 
1316
  #: tmp/widgets/editor/editor.php:51
1317
+ msgid "Enable the \"Automatically add paragraphs\" setting by default."
1318
  msgstr ""
1319
 
1320
  #: tmp/widgets/features/features.php:13
1433
  msgid "Map center"
1434
  msgstr ""
1435
 
1436
+ #: tmp/widgets/google-map/google-map.php:46
1437
+ msgid "The name of a place, town, city, or even a country. Can be an exact address too. Please ensure you have enabled the <strong>Geocoding API</strong> in the %sGoogle APIs Dashboard%s."
1438
  msgstr ""
1439
 
1440
+ #: tmp/widgets/google-map/google-map.php:53, tmp/widgets/google-map/google-map.php:58, tmp/widgets/google-map/google-map.php:439
1441
  msgid "API key"
1442
  msgstr ""
1443
 
1444
+ #: tmp/widgets/google-map/google-map.php:61
1445
  msgid "Enter your %sAPI key%s. Your map may not function correctly without one."
1446
  msgstr ""
1447
 
1448
+ #: tmp/widgets/google-map/google-map.php:72
1449
  msgid "Set map display options."
1450
  msgstr ""
1451
 
1452
+ #: tmp/widgets/google-map/google-map.php:77
1453
  msgid "Map type"
1454
  msgstr ""
1455
 
1456
+ #: tmp/widgets/google-map/google-map.php:83
1457
  msgid "Interactive"
1458
  msgstr ""
1459
 
1460
+ #: tmp/widgets/google-map/google-map.php:84
1461
  msgid "Static image"
1462
  msgstr ""
1463
 
1464
+ #: tmp/widgets/google-map/google-map.php:124
1465
  msgid "Zoom level"
1466
  msgstr ""
1467
 
1468
+ #: tmp/widgets/google-map/google-map.php:125
1469
  msgid "A value from 0 (the world) to 21 (street level)."
1470
  msgstr ""
1471
 
1472
+ #: tmp/widgets/google-map/google-map.php:139
1473
  msgid "Scroll to zoom"
1474
  msgstr ""
1475
 
1476
+ #: tmp/widgets/google-map/google-map.php:140
1477
  msgid "Allow scrolling over the map to zoom in or out."
1478
  msgstr ""
1479
 
1480
+ #: tmp/widgets/google-map/google-map.php:149
1481
  msgid "Draggable"
1482
  msgstr ""
1483
 
1484
+ #: tmp/widgets/google-map/google-map.php:150
1485
  msgid "Allow dragging the map to move it around."
1486
  msgstr ""
1487
 
1488
+ #: tmp/widgets/google-map/google-map.php:159
1489
  msgid "Disable default UI"
1490
  msgstr ""
1491
 
1492
+ #: tmp/widgets/google-map/google-map.php:160
1493
  msgid "Hides the default Google Maps controls."
1494
  msgstr ""
1495
 
1496
+ #: tmp/widgets/google-map/google-map.php:169
1497
  msgid "Keep map centered"
1498
  msgstr ""
1499
 
1500
+ #: tmp/widgets/google-map/google-map.php:170
1501
  msgid "Keeps the map centered when it's container is resized."
1502
  msgstr ""
1503
 
1504
+ #: tmp/widgets/google-map/google-map.php:174
1505
  msgid "Fallback Image"
1506
  msgstr ""
1507
 
1508
+ #: tmp/widgets/google-map/google-map.php:175
1509
  msgid "This image will be displayed if there are any problems with displaying the specified map."
1510
  msgstr ""
1511
 
1512
+ #: tmp/widgets/google-map/google-map.php:180
1513
  msgid "Fallback Image Size"
1514
  msgstr ""
1515
 
1516
+ #: tmp/widgets/google-map/google-map.php:186
1517
  msgid "Markers"
1518
  msgstr ""
1519
 
1520
+ #: tmp/widgets/google-map/google-map.php:188
1521
  msgid "Use markers to identify points of interest on the map."
1522
  msgstr ""
1523
 
1524
+ #: tmp/widgets/google-map/google-map.php:193
1525
  msgid "Show marker at map center"
1526
  msgstr ""
1527
 
1528
+ #: tmp/widgets/google-map/google-map.php:198
1529
  msgid "Marker icon"
1530
  msgstr ""
1531
 
1532
+ #: tmp/widgets/google-map/google-map.php:199
1533
  msgid "Replaces the default map marker with your own image."
1534
  msgstr ""
1535
 
1536
+ #: tmp/widgets/google-map/google-map.php:208
1537
  msgid "Draggable markers"
1538
  msgstr ""
1539
 
1540
+ #: tmp/widgets/google-map/google-map.php:212
1541
  msgid "Marker positions"
1542
  msgstr ""
1543
 
1544
+ #: tmp/widgets/google-map/google-map.php:213
1545
  msgid "Please be aware that adding more than 10 markers may cause a slight delay before they appear, due to Google Geocoding API rate limits."
1546
  msgstr ""
1547
 
1548
+ #: tmp/widgets/google-map/google-map.php:214
1549
  msgid "Marker"
1550
  msgstr ""
1551
 
1552
+ #: tmp/widgets/google-map/google-map.php:224
1553
  msgid "Place"
1554
  msgstr ""
1555
 
1556
+ #: tmp/widgets/google-map/google-map.php:229
1557
  msgid "Info Window Content"
1558
  msgstr ""
1559
 
1560
+ #: tmp/widgets/google-map/google-map.php:233
1561
  msgid "Info Window max width"
1562
  msgstr ""
1563
 
1564
+ #: tmp/widgets/google-map/google-map.php:238
1565
  msgid "Custom Marker icon"
1566
  msgstr ""
1567
 
1568
+ #: tmp/widgets/google-map/google-map.php:239
1569
  msgid "Replace the default map marker with your own image for each marker."
1570
  msgstr ""
1571
 
1572
+ #: tmp/widgets/google-map/google-map.php:245
1573
  msgid "When should Info Windows be displayed?"
1574
  msgstr ""
1575
 
1576
+ #: tmp/widgets/google-map/google-map.php:248
1577
  msgid "Click"
1578
  msgstr ""
1579
 
1580
+ #: tmp/widgets/google-map/google-map.php:249
1581
  msgid "Mouse over"
1582
  msgstr ""
1583
 
1584
+ #: tmp/widgets/google-map/google-map.php:250
1585
  msgid "Always"
1586
  msgstr ""
1587
 
1588
+ #: tmp/widgets/google-map/google-map.php:255
1589
  msgid "Allow multiple simultaneous Info Windows?"
1590
  msgstr ""
1591
 
1592
+ #: tmp/widgets/google-map/google-map.php:263
1593
  msgid "Styles"
1594
  msgstr ""
1595
 
1596
+ #: tmp/widgets/google-map/google-map.php:265
1597
  msgid "Apply custom colors to map features, or hide them completely."
1598
  msgstr ""
1599
 
1600
+ #: tmp/widgets/google-map/google-map.php:270
1601
  msgid "Map styles"
1602
  msgstr ""
1603
 
1604
+ #: tmp/widgets/google-map/google-map.php:277
1605
  msgid "Custom"
1606
  msgstr ""
1607
 
1608
+ #: tmp/widgets/google-map/google-map.php:278
1609
  msgid "Predefined Styles"
1610
  msgstr ""
1611
 
1612
+ #: tmp/widgets/google-map/google-map.php:287
1613
  msgid "Styled map name"
1614
  msgstr ""
1615
 
1616
+ #: tmp/widgets/google-map/google-map.php:297
1617
  msgid "Raw JSON styles"
1618
  msgstr ""
1619
 
1620
+ #: tmp/widgets/google-map/google-map.php:298
1621
  msgid "Copy and paste predefined styles here from <a href=\"http://snazzymaps.com/\" target=\"_blank\">Snazzy Maps</a>."
1622
  msgstr ""
1623
 
1624
+ #: tmp/widgets/google-map/google-map.php:306
1625
  msgid "Custom map styles"
1626
  msgstr ""
1627
 
1628
+ #: tmp/widgets/google-map/google-map.php:317
1629
  msgid "Select map feature to style"
1630
  msgstr ""
1631
 
1632
+ #: tmp/widgets/google-map/google-map.php:319
1633
  msgid "Water"
1634
  msgstr ""
1635
 
1636
+ #: tmp/widgets/google-map/google-map.php:320
1637
  msgid "Highways"
1638
  msgstr ""
1639
 
1640
+ #: tmp/widgets/google-map/google-map.php:321
1641
  msgid "Arterial roads"
1642
  msgstr ""
1643
 
1644
+ #: tmp/widgets/google-map/google-map.php:322
1645
  msgid "Local roads"
1646
  msgstr ""
1647
 
1648
+ #: tmp/widgets/google-map/google-map.php:323
1649
  msgid "Transit lines"
1650
  msgstr ""
1651
 
1652
+ #: tmp/widgets/google-map/google-map.php:324
1653
  msgid "Transit stations"
1654
  msgstr ""
1655
 
1656
+ #: tmp/widgets/google-map/google-map.php:325
1657
  msgid "Man-made landscape"
1658
  msgstr ""
1659
 
1660
+ #: tmp/widgets/google-map/google-map.php:326
1661
  msgid "Natural landscape landcover"
1662
  msgstr ""
1663
 
1664
+ #: tmp/widgets/google-map/google-map.php:327
1665
  msgid "Natural landscape terrain"
1666
  msgstr ""
1667
 
1668
+ #: tmp/widgets/google-map/google-map.php:328
1669
  msgid "Point of interest - Attractions"
1670
  msgstr ""
1671
 
1672
+ #: tmp/widgets/google-map/google-map.php:329
1673
  msgid "Point of interest - Business"
1674
  msgstr ""
1675
 
1676
+ #: tmp/widgets/google-map/google-map.php:330
1677
  msgid "Point of interest - Government"
1678
  msgstr ""
1679
 
1680
+ #: tmp/widgets/google-map/google-map.php:331
1681
  msgid "Point of interest - Medical"
1682
  msgstr ""
1683
 
1684
+ #: tmp/widgets/google-map/google-map.php:332
1685
  msgid "Point of interest - Parks"
1686
  msgstr ""
1687
 
1688
+ #: tmp/widgets/google-map/google-map.php:333
1689
  msgid "Point of interest - Places of worship"
1690
  msgstr ""
1691
 
1692
+ #: tmp/widgets/google-map/google-map.php:334
1693
  msgid "Point of interest - Schools"
1694
  msgstr ""
1695
 
1696
+ #: tmp/widgets/google-map/google-map.php:335
1697
  msgid "Point of interest - Sports complexes"
1698
  msgstr ""
1699
 
1700
+ #: tmp/widgets/google-map/google-map.php:340
1701
  msgid "Select element type to style"
1702
  msgstr ""
1703
 
1704
+ #: tmp/widgets/google-map/google-map.php:342
1705
  msgid "Geometry"
1706
  msgstr ""
1707
 
1708
+ #: tmp/widgets/google-map/google-map.php:343
1709
  msgid "Labels"
1710
  msgstr ""
1711
 
1712
+ #: tmp/widgets/google-map/google-map.php:350
1713
  msgid "Visible"
1714
  msgstr ""
1715
 
1716
+ #: tmp/widgets/google-map/google-map.php:362
1717
  msgid "Directions"
1718
  msgstr ""
1719
 
1720
+ #: tmp/widgets/google-map/google-map.php:369
1721
+ msgid "Display a route on your map, with waypoints between your starting point and destination. Please ensure you have enabled the <strong>Directions API</strong> in the %sGoogle APIs Dashboard%s."
1722
  msgstr ""
1723
 
1724
+ #: tmp/widgets/google-map/google-map.php:376
1725
  msgid "Starting point"
1726
  msgstr ""
1727
 
1728
+ #: tmp/widgets/google-map/google-map.php:380
1729
  msgid "Destination"
1730
  msgstr ""
1731
 
1732
+ #: tmp/widgets/google-map/google-map.php:384
1733
  msgid "Travel mode"
1734
  msgstr ""
1735
 
1736
+ #: tmp/widgets/google-map/google-map.php:387
1737
  msgid "Driving"
1738
  msgstr ""
1739
 
1740
+ #: tmp/widgets/google-map/google-map.php:388
1741
  msgid "Walking"
1742
  msgstr ""
1743
 
1744
+ #: tmp/widgets/google-map/google-map.php:389
1745
  msgid "Bicycling"
1746
  msgstr ""
1747
 
1748
+ #: tmp/widgets/google-map/google-map.php:390
1749
  msgid "Transit"
1750
  msgstr ""
1751
 
1752
+ #: tmp/widgets/google-map/google-map.php:395
1753
  msgid "Avoid highways"
1754
  msgstr ""
1755
 
1756
+ #: tmp/widgets/google-map/google-map.php:399
1757
  msgid "Avoid tolls"
1758
  msgstr ""
1759
 
1760
+ #: tmp/widgets/google-map/google-map.php:403
1761
  msgid "Waypoints"
1762
  msgstr ""
1763
 
1764
+ #: tmp/widgets/google-map/google-map.php:404
1765
  msgid "Waypoint"
1766
  msgstr ""
1767
 
1768
+ #: tmp/widgets/google-map/google-map.php:414, tmp/widgets/testimonial/testimonial.php:65
1769
  msgid "Location"
1770
  msgstr ""
1771
 
1772
+ #: tmp/widgets/google-map/google-map.php:419
1773
  msgid "Stopover"
1774
  msgstr ""
1775
 
1776
+ #: tmp/widgets/google-map/google-map.php:420
1777
  msgid "Whether or not this is a stop on the route or just a route preference."
1778
  msgstr ""
1779
 
1780
+ #: tmp/widgets/google-map/google-map.php:426
1781
  msgid "Optimize waypoints"
1782
  msgstr ""
1783
 
1784
+ #: tmp/widgets/google-map/google-map.php:428
1785
  msgid "Allow the Google Maps service to reorder waypoints for the shortest travelling distance."
1786
  msgstr ""
1787
 
1788
+ #: tmp/widgets/google-map/google-map.php:442
1789
  msgid "Enter your %sAPI key%s. Your map won't function correctly without one."
1790
  msgstr ""
1791
 
1792
+ #: tmp/widgets/google-map/google-map.php:554
1793
+ msgid "There were no results for the place you entered. Please try another."
1794
+ msgstr ""
1795
+
1796
+ #: tmp/widgets/google-map/google-map.php:607
1797
  msgid "Custom Map"
1798
  msgstr ""
1799
 
2029
  msgid "URL"
2030
  msgstr ""
2031
 
2032
+ #: tmp/widgets/image-grid/image-grid.php:76, tmp/widgets/image/image.php:81, tmp/widgets/slider/slider.php:89
2033
+ msgid "Open in new window"
2034
+ msgstr ""
2035
+
2036
+ #: tmp/widgets/image-grid/image-grid.php:83
2037
  msgid "Display"
2038
  msgstr ""
2039
 
2040
+ #: tmp/widgets/image-grid/image-grid.php:86, tmp/widgets/image/image.php:38, tmp/widgets/testimonial/testimonial.php:130, tmp/widgets/testimonial/testimonial.php:159, tmp/widgets/testimonial/testimonial.php:201
2041
  msgid "Image size"
2042
  msgstr ""
2043
 
2044
+ #: tmp/widgets/image-grid/image-grid.php:92
2045
  msgid "Maximum image height"
2046
  msgstr ""
2047
 
2048
+ #: tmp/widgets/image-grid/image-grid.php:97
2049
  msgid "Maximum image width"
2050
  msgstr ""
2051
 
2052
+ #: tmp/widgets/image-grid/image-grid.php:102
2053
  msgid "Spacing"
2054
  msgstr ""
2055
 
2056
+ #: tmp/widgets/image-grid/image-grid.php:103
2057
  msgid "Amount of spacing between images."
2058
  msgstr ""
2059
 
2081
  msgid "Alt text"
2082
  msgstr ""
2083
 
 
 
 
 
2084
  #: tmp/widgets/image/image.php:87
2085
  msgid "Bound"
2086
  msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 4.8
5
- Stable tag: 1.9.1
6
- Build time: 2017-06-08T19:51:00+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
@@ -54,6 +54,22 @@ The SiteOrigin Widgets Bundle is the perfect platform to build widgets for your
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  = 1.9.2 - 8 June 2017 =
58
  * Post Carousel: default image for posts without featured images.
59
  * Social Media Buttons: allow empty colors.
2
  Tags: bundle, widget, button, slider, image, carousel, price table, google maps, tinymce, social links
3
  Requires at least: 4.2
4
  Tested up to: 4.8
5
+ Stable tag: 1.9.2
6
+ Build time: 2017-07-04T16:52:10+02:00
7
  License: GPLv3 or later
8
  Contributors: gpriday, braam-genis
9
  Donate link: https://siteorigin.com/downloads/contribution/
54
 
55
  == Changelog ==
56
 
57
+ = 1.9.3 - 3 July 2017 =
58
+ * Editor: Fix settings form label.
59
+ * Don't select the external fallback field as value input.
60
+ * Social media buttons: Don't output calls when missing network name.
61
+ * Use gettext for widget global settings dialog title.
62
+ * Image: Added link attributes to template variables.
63
+ * Image grid: Use `get_template_variables`.
64
+ * Image grid: Template code structure a bit more readable.
65
+ * Simple masonry: Assign link attributes in `get_template_variables`.
66
+ * Slider widget: Output link attributes.
67
+ * Features: Remove redundant paragraph from template.
68
+ * Google Maps: Fix issue when no matches found in maps API error string.
69
+ * Google Maps: Mention required Google Maps APIs in field descriptions.
70
+ * Google Maps: Localized strings used in JS.
71
+ * Elementor 1.5: Ensure widgets' setup scripts are run after editing.
72
+
73
  = 1.9.2 - 8 June 2017 =
74
  * Post Carousel: default image for posts without featured images.
75
  * Social Media Buttons: allow empty colors.
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
- Version: 1.9.2
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define('SOW_BUNDLE_VERSION', '1.9.2');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A collection of all widgets, neatly bundled into a single plugin. It's also a framework to code your own widgets on top of.
5
+ Version: 1.9.3
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define('SOW_BUNDLE_VERSION', '1.9.3');
16
  define('SOW_BUNDLE_BASE_FILE', __FILE__);
17
 
18
  // Allow JS suffix to be pre-set
widgets/editor/editor.php CHANGED
@@ -38,7 +38,7 @@ class SiteOrigin_Widget_Editor_Widget extends SiteOrigin_Widget {
38
  'autop' => array(
39
  'type' => 'checkbox',
40
  'default' => $global_settings['autop_default'],
41
- 'label' => __('Automatically add paragraphs', 'so-widgets-bundle'),
42
  ),
43
  );
44
  }
@@ -48,7 +48,7 @@ class SiteOrigin_Widget_Editor_Widget extends SiteOrigin_Widget {
48
  'autop_default' => array(
49
  'type' => 'checkbox',
50
  'default' => true,
51
- 'label' => __( 'Enable the <em>Automatically add paragraphs</em> setting by default.', 'so-widgets-bundle' ),
52
  ),
53
  );
54
  }
38
  'autop' => array(
39
  'type' => 'checkbox',
40
  'default' => $global_settings['autop_default'],
41
+ 'label' => __( 'Automatically add paragraphs', 'so-widgets-bundle' ),
42
  ),
43
  );
44
  }
48
  'autop_default' => array(
49
  'type' => 'checkbox',
50
  'default' => true,
51
+ 'label' => __( 'Enable the "Automatically add paragraphs" setting by default.', 'so-widgets-bundle' ),
52
  ),
53
  );
54
  }
widgets/features/tpl/default.php CHANGED
@@ -50,7 +50,7 @@ $last_row = floor( ( count($instance['features']) - 1 ) / $instance['per_row'] )
50
  <?php endif; ?>
51
 
52
  <?php if(!empty($feature['text'])) : ?>
53
- <p><?php echo wp_kses_post( $feature['text'] ) ?></p>
54
  <?php endif; ?>
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
50
  <?php endif; ?>
51
 
52
  <?php if(!empty($feature['text'])) : ?>
53
+ <?php echo wp_kses_post( $feature['text'] ) ?>
54
  <?php endif; ?>
55
 
56
  <?php if(!empty($feature['more_text'])) : ?>
widgets/google-map/google-map.php CHANGED
@@ -42,7 +42,11 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
42
  'type' => 'textarea',
43
  'rows' => 2,
44
  'label' => __( 'Map center', 'so-widgets-bundle' ),
45
- 'description' => __( 'The name of a place, town, city, or even a country. Can be an exact address too.', 'so-widgets-bundle' )
 
 
 
 
46
  ),
47
  'api_key_section' => array(
48
  'type' => 'section',
@@ -361,7 +365,11 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
361
  '_else[map_type]' => array('hide'),
362
  ),
363
  'hide' => true,
364
- 'description' => __( 'Display a route on your map, with waypoints between your starting point and destination.', 'so-widgets-bundle' ),
 
 
 
 
365
  'fields' => array(
366
  'origin' => array(
367
  'type' => 'text',
@@ -537,6 +545,16 @@ class SiteOrigin_Widget_GoogleMap_Widget extends SiteOrigin_Widget {
537
  array(),
538
  SOW_BUNDLE_VERSION
539
  );
 
 
 
 
 
 
 
 
 
 
540
  } else {
541
  wp_enqueue_script(
542
  'sow-google-map-static',
42
  'type' => 'textarea',
43
  'rows' => 2,
44
  'label' => __( 'Map center', 'so-widgets-bundle' ),
45
+ 'description' => sprintf(
46
+ __( 'The name of a place, town, city, or even a country. Can be an exact address too. Please ensure you have enabled the <strong>Geocoding API</strong> in the %sGoogle APIs Dashboard%s.', 'so-widgets-bundle' ),
47
+ '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank">',
48
+ '</a>'
49
+ ),
50
  ),
51
  'api_key_section' => array(
52
  'type' => 'section',
365
  '_else[map_type]' => array('hide'),
366
  ),
367
  'hide' => true,
368
+ 'description' => sprintf(
369
+ __( 'Display a route on your map, with waypoints between your starting point and destination. Please ensure you have enabled the <strong>Directions API</strong> in the %sGoogle APIs Dashboard%s.', 'so-widgets-bundle' ),
370
+ '<a href="https://console.developers.google.com/apis/dashboard?project=_" target="_blank">',
371
+ '</a>'
372
+ ),
373
  'fields' => array(
374
  'origin' => array(
375
  'type' => 'text',
545
  array(),
546
  SOW_BUNDLE_VERSION
547
  );
548
+
549
+ wp_localize_script(
550
+ 'sow-google-map',
551
+ 'soWidgetsGoogleMap',
552
+ array(
553
+ 'geocode' => array(
554
+ 'noResults' => __( 'There were no results for the place you entered. Please try another.', 'so-widgets-bundle' ),
555
+ ),
556
+ )
557
+ );
558
  } else {
559
  wp_enqueue_script(
560
  'sow-google-map-static',
widgets/google-map/js/js-map.js CHANGED
@@ -291,7 +291,7 @@ sowb.SiteOriginGoogleMap = function($) {
291
  autoCompleteInit.resolve();
292
  }.bind(this)
293
  ).fail(function () {
294
- $mapField.append('<div><p><strong>There were no results for the place you entered. Please try another.</strong></p></div>');
295
  autoCompleteInit.reject();
296
  });
297
  }
@@ -323,7 +323,7 @@ sowb.SiteOriginGoogleMap = function($) {
323
  $$.data( 'initialized' );
324
  }.bind( this )
325
  ).fail( function () {
326
- $$.append( '<div><p><strong>There were no results for the place you entered. Please try another.</strong></p></div>' );
327
  } );
328
 
329
  }.bind(this));
@@ -389,7 +389,7 @@ sowb.SiteOriginGoogleMap = function($) {
389
 
390
  // Called by Google Maps API when it has loaded.
391
  function soGoogleMapInitialize() {
392
- new sowb.SiteOriginGoogleMap(window.jQuery).initMaps();
393
  }
394
 
395
  jQuery(function ($) {
@@ -431,7 +431,7 @@ jQuery(function ($) {
431
 
432
  sowb.onLoadMapsApiError = function ( error ) {
433
  var matchError = error.match( /^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/ );
434
- if ( matchError[0] ) {
435
  $( '.sow-google-map-canvas' ).each( function ( index, element ) {
436
  var $this = $( element );
437
  if ( $this.data( 'fallbackImage' ) ) {
291
  autoCompleteInit.resolve();
292
  }.bind(this)
293
  ).fail(function () {
294
+ $mapField.append('<div><p><strong>' + soWidgetsGoogleMap.geocode.noResults + '</strong></p></div>');
295
  autoCompleteInit.reject();
296
  });
297
  }
323
  $$.data( 'initialized' );
324
  }.bind( this )
325
  ).fail( function () {
326
+ $$.append( '<div><p><strong>' + soWidgetsGoogleMap.geocode.noResults + '</strong></p></div>' );
327
  } );
328
 
329
  }.bind(this));
389
 
390
  // Called by Google Maps API when it has loaded.
391
  function soGoogleMapInitialize() {
392
+ new sowb.SiteOriginGoogleMap(jQuery).initMaps();
393
  }
394
 
395
  jQuery(function ($) {
431
 
432
  sowb.onLoadMapsApiError = function ( error ) {
433
  var matchError = error.match( /^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/ );
434
+ if ( matchError && matchError.length && matchError[0] ) {
435
  $( '.sow-google-map-canvas' ).each( function ( index, element ) {
436
  var $this = $( element );
437
  if ( $this.data( 'fallbackImage' ) ) {
widgets/google-map/js/js-map.min.js CHANGED
@@ -1 +1 @@
1
- function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(window.jQuery).initMaps()}var sowb=window.sowb||{};sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14);var n="user_map_style",a={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,n]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var d=new google.maps.StyledMapType(l,r);s.mapTypes.set(n,d),s.setMapTypeId(n)}if(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered){var c;google.maps.event.addDomListener(s,"idle",function(){c=s.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){s.setCenter(c)})}this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",function(e){var o=e.keyCode||e.which;"13"===o&&e.preventDefault()}),s.focusin(function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)});var t={attributes:!0,childList:!0,characterData:!0};this.resultsObserver.observe(o,t)}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",function(e){r(e.latLng)}),this.centerMarker.addListener("dragend",function(e){r(e.latLng)})}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],n=10,a=0;a<e.length;a++){var s=parseInt(a/n);i.length===s&&(i[s]=[]),i[s][a%n]=e[a]}var r=function(e,i){var n=0;e.forEach(function(a){this.getLocation(a.place).done(function(s){var l=t.markerIcon;a.custom_marker_icon&&(l=a.custom_marker_icon);var d=new google.maps.Marker({position:s,map:o,draggable:t.markersDraggable,icon:l,title:""});if(a.hasOwnProperty("info")&&a.info){var c={content:a.info};a.hasOwnProperty("info_max_width")&&a.info_max_width&&(c.maxWidth=a.info_max_width);var p=t.markerInfoDisplay;c.disableAutoPan="always"===p;var g=new google.maps.InfoWindow(c);this.infoWindows.push(g);var h=p;"always"===p&&(h="click",g.open(o,d)),d.addListener(h,function(){g.open(o,d),"always"===p||t.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==g&&e.close()})}.bind(this)),"mouseover"===p&&d.addListener("mouseout",function(){setTimeout(function(){g.close()},100)})}++n===e.length&&i.length&&r(i.shift(),i)}.bind(this))}.bind(this))}.bind(this);r(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var t=new google.maps.DirectionsRenderer;t.setMap(o);var i=new google.maps.DirectionsService;i.route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&t.setDirections(e)})}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if("undefined"==typeof google.maps.places)return void t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.');var n=new google.maps.places.Autocomplete(i,{types:["address"]}),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail(function(){a.append("<div><p><strong>There were no results for the place you entered. Please try another.</strong></p></div>"),t.reject()})}}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized")}.bind(this)).fail(function(){i.append("<div><p><strong>There were no results for the place you entered. Please try another.</strong></p></div>")})}.bind(this))}.bind(this)).fail(function(e){console.log(e)})},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}var r=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?setTimeout(function(){this.getGeocoder().geocode.call(this,n,r)}.bind(this),100):o===google.maps.GeocoderStatus.ZERO_RESULTS&&i.reject(o)}.bind(this);this.getGeocoder().geocode(n,r)}return i}}},jQuery(function(e){sowb.setupGoogleMaps=function(){var o,t=[];e(".sow-google-map-canvas").each(function(i,n){var a=e(n),s=a.data("options");s&&("undefined"!=typeof s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey))});var i="undefined"!=typeof window.google&&"undefined"!=typeof window.google.maps;if(i)soGoogleMapInitialize();else{var n="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";if(t&&t.length&&(n+="&libraries="+t.join(",")),o&&(n+="&key="+o),window.console&&window.console.error){var a=window.console.error;sowb.onLoadMapsApiError=function(o){var t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/);t[0]&&e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("fallbackImage")){var n=i.data("fallbackImage");n.hasOwnProperty("img")&&i.append(n.img)}}),a.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}e("body").append('<script async type="text/javascript" src="'+n+'">')}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}),window.sowb=sowb;
1
+ function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(jQuery).initMaps()}var sowb=window.sowb||{};sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14);var n="user_map_style",a={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,n]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var d=new google.maps.StyledMapType(l,r);s.mapTypes.set(n,d),s.setMapTypeId(n)}if(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered){var c;google.maps.event.addDomListener(s,"idle",function(){c=s.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){s.setCenter(c)})}this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!==e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",function(e){var o=e.keyCode||e.which;"13"===o&&e.preventDefault()}),s.focusin(function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)});var t={attributes:!0,childList:!0,characterData:!0};this.resultsObserver.observe(o,t)}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t===google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",function(e){r(e.latLng)}),this.centerMarker.addListener("dragend",function(e){r(e.latLng)})}},showMarkers:function(e,o,t){if(e&&e.length){this.infoWindows=[];for(var i=[],n=10,a=0;a<e.length;a++){var s=parseInt(a/n);i.length===s&&(i[s]=[]),i[s][a%n]=e[a]}var r=function(e,i){var n=0;e.forEach(function(a){this.getLocation(a.place).done(function(s){var l=t.markerIcon;a.custom_marker_icon&&(l=a.custom_marker_icon);var d=new google.maps.Marker({position:s,map:o,draggable:t.markersDraggable,icon:l,title:""});if(a.hasOwnProperty("info")&&a.info){var c={content:a.info};a.hasOwnProperty("info_max_width")&&a.info_max_width&&(c.maxWidth=a.info_max_width);var p=t.markerInfoDisplay;c.disableAutoPan="always"===p;var g=new google.maps.InfoWindow(c);this.infoWindows.push(g);var h=p;"always"===p&&(h="click",g.open(o,d)),d.addListener(h,function(){g.open(o,d),"always"===p||t.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==g&&e.close()})}.bind(this)),"mouseover"===p&&d.addListener("mouseout",function(){setTimeout(function(){g.close()},100)})}++n===e.length&&i.length&&r(i.shift(),i)}.bind(this))}.bind(this))}.bind(this);r(i.shift(),i)}},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var t=new google.maps.DirectionsRenderer;t.setMap(o);var i=new google.maps.DirectionsService;i.route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&t.setDirections(e)})}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if("undefined"==typeof google.maps.places)return void t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.');var n=new google.maps.places.Autocomplete(i,{types:["address"]}),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail(function(){a.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>"),t.reject()})}}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized")}.bind(this)).fail(function(){i.append("<div><p><strong>"+soWidgetsGoogleMap.geocode.noResults+"</strong></p></div>")})}.bind(this))}.bind(this)).fail(function(e){console.log(e)})},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}var r=function(e,o){o===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):o===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?setTimeout(function(){this.getGeocoder().geocode.call(this,n,r)}.bind(this),100):o===google.maps.GeocoderStatus.ZERO_RESULTS&&i.reject(o)}.bind(this);this.getGeocoder().geocode(n,r)}return i}}},jQuery(function(e){sowb.setupGoogleMaps=function(){var o,t=[];e(".sow-google-map-canvas").each(function(i,n){var a=e(n),s=a.data("options");s&&("undefined"!=typeof s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey))});var i="undefined"!=typeof window.google&&"undefined"!=typeof window.google.maps;if(i)soGoogleMapInitialize();else{var n="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";if(t&&t.length&&(n+="&libraries="+t.join(",")),o&&(n+="&key="+o),window.console&&window.console.error){var a=window.console.error;sowb.onLoadMapsApiError=function(o){var t=o.match(/^Google Maps API (error|warning): ([^\s]*)\s([^\s]*)(?:\s(.*))?/);t&&t.length&&t[0]&&e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("fallbackImage")){var n=i.data("fallbackImage");n.hasOwnProperty("img")&&i.append(n.img)}}),a.apply(window.console,arguments)},window.console.error=sowb.onLoadMapsApiError}e("body").append('<script async type="text/javascript" src="'+n+'">')}},sowb.setupGoogleMaps(),e(sowb).on("setup_widgets",sowb.setupGoogleMaps)}),window.sowb=sowb;
widgets/image-grid/image-grid.php CHANGED
@@ -70,6 +70,11 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
70
  'type' => 'link',
71
  'label' => __('URL', 'so-widgets-bundle')
72
  ),
 
 
 
 
 
73
  )
74
  ),
75
 
@@ -103,7 +108,26 @@ class SiteOrigin_Widgets_ImageGrid_Widget extends SiteOrigin_Widget {
103
  )
104
  );
105
  }
106
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  /**
108
  * Get the less variables for the image grid
109
  *
70
  'type' => 'link',
71
  'label' => __('URL', 'so-widgets-bundle')
72
  ),
73
+ 'new_window' => array(
74
+ 'type' => 'checkbox',
75
+ 'default' => false,
76
+ 'label' => __( 'Open in new window', 'so-widgets-bundle' ),
77
+ ),
78
  )
79
  ),
80
 
108
  )
109
  );
110
  }
111
+
112
+ function get_template_variables( $instance, $args ) {
113
+ $images = isset( $instance['images'] ) ? $instance['images'] : array();
114
+
115
+ foreach ( $images as &$image ) {
116
+ $link_atts = empty( $image['link_attributes'] ) ? array() : $image['link_attributes'];
117
+ if ( ! empty( $image['new_window'] ) ) {
118
+ $link_atts['target'] = '_blank';
119
+ }
120
+ $image['link_attributes'] = $link_atts;
121
+ }
122
+
123
+ return array(
124
+ 'images' => $images,
125
+ 'max_height' => $instance['display']['max_height'],
126
+ 'max_width' => $instance['display']['max_width'],
127
+ 'attachment_size' => $instance['display']['attachment_size'],
128
+ );
129
+ }
130
+
131
  /**
132
  * Get the less variables for the image grid
133
  *
widgets/image-grid/tpl/default.php CHANGED
@@ -1,18 +1,32 @@
1
- <?php if( !empty($instance['images']) ) : ?>
 
 
 
 
 
 
 
 
2
  <div class="sow-image-grid-wrapper"
3
- <?php if( !empty( $instance['display']['max_width'] ) ) echo 'data-max-width="' . intval( $instance['display']['max_width'] ) . '"' ?>
4
- <?php if( !empty( $instance['display']['max_height'] ) ) echo 'data-max-height="' . intval( $instance['display']['max_height'] ) . '"' ?>
5
- >
6
- <?php
7
- foreach( $instance['images'] as $image ) {
8
- echo '<div class="sow-image-grid-image">';
9
- if ( ! empty( $image['url'] ) ) echo '<a href="' . sow_esc_url( $image['url'] ) . '">';
10
- echo wp_get_attachment_image( $image['image'], $instance['display']['attachment_size'], false, array(
11
- 'title' => $image['title']
12
- ) );
13
- if ( ! empty( $image['url'] ) ) echo '</a>';
14
- echo '</div>';
15
- }
16
- ?>
 
 
 
 
 
 
17
  </div>
18
  <?php endif; ?>
1
+ <?php
2
+ /**
3
+ * @var $images array
4
+ * @var $max_height int
5
+ * @var $max_width int
6
+ * @var $attachment_size string
7
+ */
8
+ ?>
9
+ <?php if( ! empty( $images ) ) : ?>
10
  <div class="sow-image-grid-wrapper"
11
+ <?php if( !empty( $max_width ) ) echo 'data-max-width="' . intval( $max_width ) . '"' ?>
12
+ <?php if( !empty( $max_height ) ) echo 'data-max-height="' . intval( $max_height ) . '"' ?>>
13
+ <?php foreach( $images as $image ) : ?>
14
+ <div class="sow-image-grid-image">
15
+ <?php if ( ! empty( $image['url'] ) ) : ?>
16
+ <a href="<?php echo sow_esc_url( $image['url'] ) ?>"
17
+ <?php foreach( $image['link_attributes'] as $att => $val ) : ?>
18
+ <?php if ( ! empty( $val ) ) : ?>
19
+ <?php echo $att.'="' . esc_attr( $val ) . '" '; ?>
20
+ <?php endif; ?>
21
+ <?php endforeach; ?>>
22
+ <?php endif; ?>
23
+ <?php echo wp_get_attachment_image( $image['image'], $attachment_size, false, array(
24
+ 'title' => $image['title']
25
+ ) );?>
26
+ <?php if ( ! empty( $image['url'] ) ) : ?>
27
+ </a>
28
+ <?php endif; ?>
29
+ </div>
30
+ <?php endforeach; ?>
31
  </div>
32
  <?php endif; ?>
widgets/image/image.php CHANGED
@@ -152,12 +152,18 @@ class SiteOrigin_Widget_Image_Widget extends SiteOrigin_Widget {
152
  } else {
153
  $attr['alt'] = get_post_meta( $instance['image'], '_wp_attachment_image_alt', true );
154
  }
 
 
 
 
 
155
 
156
  return array(
157
  'title' => $title,
158
  'title_position' => $instance['title_position'],
159
  'url' => $instance['url'],
160
  'new_window' => $instance['new_window'],
 
161
  'attributes' => $attr,
162
  'classes' => array( 'so-widget-image' ),
163
  );
152
  } else {
153
  $attr['alt'] = get_post_meta( $instance['image'], '_wp_attachment_image_alt', true );
154
  }
155
+
156
+ $link_atts = array();
157
+ if ( ! empty( $instance['new_window'] ) ) {
158
+ $link_atts['target'] = '_blank';
159
+ }
160
 
161
  return array(
162
  'title' => $title,
163
  'title_position' => $instance['title_position'],
164
  'url' => $instance['url'],
165
  'new_window' => $instance['new_window'],
166
+ 'link_attributes' => $link_atts,
167
  'attributes' => $attr,
168
  'classes' => array( 'so-widget-image' ),
169
  );
widgets/image/tpl/default.php CHANGED
@@ -3,6 +3,7 @@
3
  * @var $title
4
  * @var $title_position
5
  * @var $url
 
6
  * @var $new_window
7
  * @var $attributes
8
  * @var $classes
@@ -17,7 +18,7 @@
17
 
18
  ?>
19
  <div class="sow-image-container">
20
- <?php if ( ! empty( $url ) ) : ?><a href="<?php echo sow_esc_url( $url ) ?>" <?php if($new_window) echo 'target="_blank"' ?>><?php endif; ?>
21
  <img <?php foreach( $attributes as $n => $v ) if ( ! empty( $v ) ) : echo $n.'="' . esc_attr( $v ) . '" '; endif; ?>
22
  class="<?php echo esc_attr( implode(' ', $classes ) ) ?>"/>
23
  <?php if ( ! empty( $url ) ) : ?></a><?php endif; ?>
3
  * @var $title
4
  * @var $title_position
5
  * @var $url
6
+ * @var $link_attributes
7
  * @var $new_window
8
  * @var $attributes
9
  * @var $classes
18
 
19
  ?>
20
  <div class="sow-image-container">
21
+ <?php if ( ! empty( $url ) ) : ?><a href="<?php echo sow_esc_url( $url ) ?>" <?php foreach( $link_attributes as $att => $val ) if ( ! empty( $val ) ) : echo $att.'="' . esc_attr( $val ) . '" '; endif; ?>><?php endif; ?>
22
  <img <?php foreach( $attributes as $n => $v ) if ( ! empty( $v ) ) : echo $n.'="' . esc_attr( $v ) . '" '; endif; ?>
23
  class="<?php echo esc_attr( implode(' ', $classes ) ) ?>"/>
24
  <?php if ( ! empty( $url ) ) : ?></a><?php endif; ?>
widgets/simple-masonry/js/simple-masonry.js CHANGED
@@ -4,7 +4,6 @@ var sowb = window.sowb || {};
4
 
5
  jQuery( function($){
6
  sowb.setupSimpleMasonries = function() {
7
- var $ = jQuery;
8
  var $grid = $('.sow-masonry-grid');
9
 
10
  var resizeMasonry = function(){
4
 
5
  jQuery( function($){
6
  sowb.setupSimpleMasonries = function() {
 
7
  var $grid = $('.sow-masonry-grid');
8
 
9
  var resizeMasonry = function(){
widgets/simple-masonry/js/simple-masonry.min.js CHANGED
@@ -1 +1 @@
1
- var sowb=window.sowb||{};jQuery(function(t){sowb.setupSimpleMasonries=function(){var t=jQuery,i=t(".sow-masonry-grid"),a=function(){i.each(function(){var i=t(this),a=i.data("layouts"),e=window.matchMedia("(max-width: "+a.tablet.breakPoint+"px)"),s=window.matchMedia("(max-width: "+a.mobile.breakPoint+"px)"),o=a.desktop;s.matches?o=a.mobile:e.matches&&(o=a.tablet);var n=o.numColumns;i.css("width","auto");var h=o.gutter*(n-1),r=Math.floor((i.width()-h)/n);i.width(r*n+h),i.imagesLoaded(function(){i.find("> .sow-masonry-grid-item").each(function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,o.numColumns),1),i.width(r*a+o.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,o.numColumns),1);var s=o.rowHeight||r;i.css("height",s*e+o.gutter*(e-1));var n=i.find("> img,> a > img"),h=n.attr("height")>0?n.attr("width")/n.attr("height"):1,w=i.height()>0?i.width()/i.height():1;if(h=parseFloat(h.toFixed(3)),w=parseFloat(w.toFixed(3)),h>w){n.css("width","auto"),n.css("height","100%"),n.css("margin-top","");var m=(n.width()-i.width())*-.5;n.css("margin-left",m+"px")}else{n.css("height","auto"),n.css("width","100%"),n.css("margin-left","");var d=(n.height()-i.height())*-.5;n.css("margin-top",d+"px")}}),i.packery({itemSelector:".sow-masonry-grid-item",columnWidth:r,gutter:o.gutter})})})};t(window).on("resize panelsStretchRows",a),setTimeout(function(){a()},100)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)}),window.sowb=sowb;
1
+ var sowb=window.sowb||{};jQuery(function(t){sowb.setupSimpleMasonries=function(){var i=t(".sow-masonry-grid"),a=function(){i.each(function(){var i=t(this),a=i.data("layouts"),e=window.matchMedia("(max-width: "+a.tablet.breakPoint+"px)"),s=window.matchMedia("(max-width: "+a.mobile.breakPoint+"px)"),o=a.desktop;s.matches?o=a.mobile:e.matches&&(o=a.tablet);var n=o.numColumns;i.css("width","auto");var h=o.gutter*(n-1),r=Math.floor((i.width()-h)/n);i.width(r*n+h),i.imagesLoaded(function(){i.find("> .sow-masonry-grid-item").each(function(){var i=t(this),a=i.data("colSpan");a=Math.max(Math.min(a,o.numColumns),1),i.width(r*a+o.gutter*(a-1));var e=i.data("rowSpan");e=Math.max(Math.min(e,o.numColumns),1);var s=o.rowHeight||r;i.css("height",s*e+o.gutter*(e-1));var n=i.find("> img,> a > img"),h=n.attr("height")>0?n.attr("width")/n.attr("height"):1,w=i.height()>0?i.width()/i.height():1;if(h=parseFloat(h.toFixed(3)),w=parseFloat(w.toFixed(3)),h>w){n.css("width","auto"),n.css("height","100%"),n.css("margin-top","");var m=(n.width()-i.width())*-.5;n.css("margin-left",m+"px")}else{n.css("height","auto"),n.css("width","100%"),n.css("margin-left","");var d=(n.height()-i.height())*-.5;n.css("margin-top",d+"px")}}),i.packery({itemSelector:".sow-masonry-grid-item",columnWidth:r,gutter:o.gutter})})})};t(window).on("resize panelsStretchRows",a),setTimeout(function(){a()},100)},sowb.setupSimpleMasonries(),t(sowb).on("setup_widgets",sowb.setupSimpleMasonries)}),window.sowb=sowb;
widgets/simple-masonry/simple-masonry.php CHANGED
@@ -175,8 +175,19 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
175
  }
176
 
177
  public function get_template_variables( $instance, $args ) {
 
 
 
 
 
 
 
 
 
 
178
  return array(
179
- 'items' => isset( $instance['items'] ) ? $instance['items'] : array(),
 
180
  'layouts' => array(
181
  'desktop' => siteorigin_widgets_underscores_to_camel_case(
182
  array(
175
  }
176
 
177
  public function get_template_variables( $instance, $args ) {
178
+ $items = isset( $instance['items'] ) ? $instance['items'] : array();
179
+
180
+ foreach ( $items as &$item ) {
181
+ $link_atts = empty( $item['link_attributes'] ) ? array() : $item['link_attributes'];
182
+ if ( ! empty( $item['new_window'] ) ) {
183
+ $link_atts['target'] = '_blank';
184
+ }
185
+ $item['link_attributes'] = $link_atts;
186
+ }
187
+
188
  return array(
189
+ 'args' => $args,
190
+ 'items' => $items,
191
  'layouts' => array(
192
  'desktop' => siteorigin_widgets_underscores_to_camel_case(
193
  array(
widgets/simple-masonry/tpl/default.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /**
3
- * @var $args
4
- * @var $items
5
- * @var $layouts
6
  */
7
  ?>
8
 
@@ -17,19 +17,23 @@
17
  $src = empty( $src ) ? '' : $src[0];
18
  $title = empty( $item['title'] ) ? '' : $item['title'];
19
  $url = empty( $item['url'] ) ? '' : $item['url'];
20
- $new_window = ! empty( $item['new_window'] );
21
  ?>
22
  <div class="sow-masonry-grid-item" data-col-span="<?php echo esc_attr( $item['column_span'] ) ?>"
23
  data-row-span="<?php echo esc_attr( $item['row_span'] ) ?>">
24
  <?php if ( ! empty( $url ) ) : ?>
25
- <a href="<?php echo sow_esc_url( $url ) ?>" <?php if ( $new_window ) { ?>target="_blank" <?php } ?>>
26
- <?php endif; ?>
 
 
 
 
 
27
 
28
- <?php echo wp_get_attachment_image( $item['image'], 'full', false, array( 'title' => esc_attr( $title ) ) ); ?>
29
 
30
- <?php if ( ! empty( $url ) ) : ?>
31
- </a>
32
- <?php endif; ?>
33
  </div>
34
  <?php
35
  }
1
  <?php
2
  /**
3
+ * @var $args array
4
+ * @var $items array
5
+ * @var $layouts array
6
  */
7
  ?>
8
 
17
  $src = empty( $src ) ? '' : $src[0];
18
  $title = empty( $item['title'] ) ? '' : $item['title'];
19
  $url = empty( $item['url'] ) ? '' : $item['url'];
 
20
  ?>
21
  <div class="sow-masonry-grid-item" data-col-span="<?php echo esc_attr( $item['column_span'] ) ?>"
22
  data-row-span="<?php echo esc_attr( $item['row_span'] ) ?>">
23
  <?php if ( ! empty( $url ) ) : ?>
24
+ <a href="<?php echo sow_esc_url( $url ) ?>"
25
+ <?php foreach( $item['link_attributes'] as $att => $val ) : ?>
26
+ <?php if ( ! empty( $val ) ) : ?>
27
+ <?php echo $att.'="' . esc_attr( $val ) . '" '; ?>
28
+ <?php endif; ?>
29
+ <?php endforeach; ?>>
30
+ <?php endif; ?>
31
 
32
+ <?php echo wp_get_attachment_image( $item['image'], 'full', false, array( 'title' => esc_attr( $title ) ) ); ?>
33
 
34
+ <?php if ( ! empty( $url ) ) : ?>
35
+ </a>
36
+ <?php endif; ?>
37
  </div>
38
  <?php
39
  }
widgets/slider/slider.php CHANGED
@@ -141,22 +141,39 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
141
  ?>
142
  <div class="sow-slider-image-container">
143
  <div class="sow-slider-image-wrapper" style="<?php if(!empty($foreground_src[1])) echo 'max-width: ' . intval($foreground_src[1]) . 'px' ?>">
 
 
 
 
 
 
 
 
144
  <?php
145
- if(!empty($frame['url'])) echo '<a href="' . sow_esc_url($frame['url']) . '" ' . ( !empty($frame['new_window']) ? 'target="_blank"' : '' ) . '>';
146
  echo siteorigin_widgets_get_attachment_image(
147
  $frame['foreground_image'],
148
  'full',
149
  !empty( $frame['foreground_image_fallback'] ) ? $frame['foreground_image_fallback'] : ''
150
  );
151
- if(!empty($frame['url'])) echo '</a>';
152
  ?>
 
 
 
153
  </div>
154
  </div>
155
  <?php
156
  }
157
  else if( empty($frame['background_videos']) ) {
158
- // We need to find another background
159
- if(!empty($frame['url'])) echo '<a href="' . sow_esc_url($frame['url']) . '" ' . ( !empty($frame['new_window']) ? 'target="_blank"' : '' ) . '>';
 
 
 
 
 
 
 
 
160
 
161
  // Lets use the background image
162
  echo siteorigin_widgets_get_attachment_image(
@@ -165,11 +182,30 @@ class SiteOrigin_Widget_Slider_Widget extends SiteOrigin_Widget_Base_Slider {
165
  !empty( $frame['background_image_fallback'] ) ? $frame['background_image_fallback'] : ''
166
  );
167
 
168
- if( !empty($frame['url']) ) echo '</a>';
 
 
 
 
169
  }
170
 
171
  }
172
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  /**
174
  * The less variables to control the design of the slider
175
  *
141
  ?>
142
  <div class="sow-slider-image-container">
143
  <div class="sow-slider-image-wrapper" style="<?php if(!empty($foreground_src[1])) echo 'max-width: ' . intval($foreground_src[1]) . 'px' ?>">
144
+ <?php if ( ! empty( $frame['url'] ) ) : ?>
145
+ <a href="<?php echo sow_esc_url( $frame['url'] ) ?>"
146
+ <?php foreach( $frame['link_attributes'] as $att => $val ) : ?>
147
+ <?php if ( ! empty( $val ) ) : ?>
148
+ <?php echo $att . '="' . esc_attr( $val ) . '" '; ?>
149
+ <?php endif; ?>
150
+ <?php endforeach; ?>>
151
+ <?php endif; ?>
152
  <?php
 
153
  echo siteorigin_widgets_get_attachment_image(
154
  $frame['foreground_image'],
155
  'full',
156
  !empty( $frame['foreground_image_fallback'] ) ? $frame['foreground_image_fallback'] : ''
157
  );
 
158
  ?>
159
+ <?php if ( ! empty( $frame['url'] ) ) : ?>
160
+ </a>
161
+ <?php endif; ?>
162
  </div>
163
  </div>
164
  <?php
165
  }
166
  else if( empty($frame['background_videos']) ) {
167
+ ?>
168
+ <?php if ( ! empty( $frame['url'] ) ) : ?>
169
+ <a href="<?php echo sow_esc_url( $frame['url'] ) ?>"
170
+ <?php foreach( $frame['link_attributes'] as $att => $val ) : ?>
171
+ <?php if ( ! empty( $val ) ) : ?>
172
+ <?php echo $att . '="' . esc_attr( $val ) . '" '; ?>
173
+ <?php endif; ?>
174
+ <?php endforeach; ?>>
175
+ <?php endif; ?>
176
+ <?php
177
 
178
  // Lets use the background image
179
  echo siteorigin_widgets_get_attachment_image(
182
  !empty( $frame['background_image_fallback'] ) ? $frame['background_image_fallback'] : ''
183
  );
184
 
185
+ ?>
186
+ <?php if ( ! empty( $frame['url'] ) ) : ?>
187
+ </a>
188
+ <?php endif; ?>
189
+ <?php
190
  }
191
 
192
  }
193
+
194
+ function get_template_variables( $instance, $args ) {
195
+ $frames = $instance['frames'];
196
+ foreach ( $frames as &$frame ) {
197
+ $link_atts = array();
198
+ if ( ! empty( $frame['new_window'] ) ) {
199
+ $link_atts['target'] = '_blank';
200
+ }
201
+ $frame['link_attributes'] = $link_atts;
202
+ }
203
+ return array(
204
+ 'controls' => $instance['controls'],
205
+ 'frames' => $frames,
206
+ );
207
+ }
208
+
209
  /**
210
  * The less variables to control the design of the slider
211
  *
widgets/slider/tpl/default.php CHANGED
@@ -1,3 +1,7 @@
1
  <?php
 
 
 
 
2
 
3
- $this->render_template($instance['controls'], $instance['frames']);
1
  <?php
2
+ /**
3
+ * @var $controls array
4
+ * @var $frames array
5
+ */
6
 
7
+ $this->render_template( $controls, $frames );
widgets/social-media-buttons/social-media-buttons.php CHANGED
@@ -229,11 +229,13 @@ class SiteOrigin_Widget_SocialMediaButtons_Widget extends SiteOrigin_Widget {
229
  $networks = $this->get_instance_networks( $instance );
230
  $calls = array();
231
  foreach ( $networks as $network ) {
232
- $call = $args[0] . '(' . $network['name'];
233
- $call .= ! empty( $network['icon_color'] ) ? ', @icon_color:' . $network['icon_color'] : '';
234
- $call .= ! empty( $network['button_color'] ) ? ', @button_color:' . $network['button_color'] : '';
235
- $call .= ');';
236
- $calls[] = $call;
 
 
237
  }
238
 
239
  return implode( "\n", $calls );
229
  $networks = $this->get_instance_networks( $instance );
230
  $calls = array();
231
  foreach ( $networks as $network ) {
232
+ if ( ! empty( $network['name'] ) ) {
233
+ $call = $args[0] . '( @name:' . $network['name'];
234
+ $call .= ! empty( $network['icon_color'] ) ? ', @icon_color:' . $network['icon_color'] : '';
235
+ $call .= ! empty( $network['button_color'] ) ? ', @button_color:' . $network['button_color'] : '';
236
+ $call .= ');';
237
+ $calls[] = $call;
238
+ }
239
  }
240
 
241
  return implode( "\n", $calls );