Contact Widgets - Version 1.2.0

Version Description

  • April 12, 2016 = WordPress 4.5 compatibility
Download this release

Release Info

Developer jonathanbardo
Plugin Icon 128x128 Contact Widgets
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.0 to 1.2.0

contact-widgets.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Contact Widgets
4
  * Description: Beautifully display social media and contact information on your website with these simple widgets.
5
- * Version: 1.1.0
6
  * Author: GoDaddy
7
  * Author URI: https://godaddy.com
8
  * Text Domain: contact-widgets
2
  /**
3
  * Plugin Name: Contact Widgets
4
  * Description: Beautifully display social media and contact information on your website with these simple widgets.
5
+ * Version: 1.2.0
6
  * Author: GoDaddy
7
  * Author URI: https://godaddy.com
8
  * Text Domain: contact-widgets
includes/class-contact.php CHANGED
@@ -16,16 +16,24 @@ final class Contact extends Base_Widget {
16
  public function __construct() {
17
 
18
  $widget_options = [
19
- 'classname' => 'wpcw-widget-contact',
20
- 'description' => __( 'Display custom contact information.', 'contact-widgets' ),
 
21
  ];
22
 
23
  parent::__construct(
24
  'wpcw_contact',
25
- __( 'Contact', 'contact-widgets' ),
26
  $widget_options
27
  );
28
 
 
 
 
 
 
 
 
29
  }
30
 
31
  /**
@@ -89,10 +97,6 @@ final class Contact extends Base_Widget {
89
 
90
  }
91
 
92
- $suffix = SCRIPT_DEBUG ? '' : '.min';
93
-
94
- wp_enqueue_style( 'wpcw', \Contact_Widgets::$assets_url . "css/style{$suffix}.css", [], Plugin::$version );
95
-
96
  $this->before_widget( $args, $fields );
97
 
98
  $display_labels = ( 'yes' === $instance['labels']['value'] );
@@ -131,6 +135,19 @@ final class Contact extends Base_Widget {
131
 
132
  }
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  /**
135
  * Initialize fields for use on front-end of forms
136
  *
16
  public function __construct() {
17
 
18
  $widget_options = [
19
+ 'classname' => 'wpcw-widget-contact',
20
+ 'description' => __( 'Display your contact information.', 'contact-widgets' ),
21
+ 'customize_selective_refresh' => true,
22
  ];
23
 
24
  parent::__construct(
25
  'wpcw_contact',
26
+ __( 'Contact Details', 'contact-widgets' ),
27
  $widget_options
28
  );
29
 
30
+ // Enqueue style if widget is active (appears in a sidebar) or if in Customizer preview.
31
+ if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
32
+
33
+ add_action( 'wp_enqueue_scripts', [ $this, 'front_end_enqueue_scripts' ] );
34
+
35
+ }
36
+
37
  }
38
 
39
  /**
97
 
98
  }
99
 
 
 
 
 
100
  $this->before_widget( $args, $fields );
101
 
102
  $display_labels = ( 'yes' === $instance['labels']['value'] );
135
 
136
  }
137
 
138
+ /**
139
+ * Enqueue scripts and styles for front-end use
140
+ *
141
+ * @action wp_enqueue_scripts
142
+ */
143
+ public function front_end_enqueue_scripts() {
144
+
145
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
146
+
147
+ wp_enqueue_style( 'wpcw', \Contact_Widgets::$assets_url . "css/style{$suffix}.css", [], Plugin::$version );
148
+
149
+ }
150
+
151
  /**
152
  * Initialize fields for use on front-end of forms
153
  *
includes/class-social.php CHANGED
@@ -16,16 +16,24 @@ final class Social extends Base_Widget {
16
  public function __construct() {
17
 
18
  $widget_options = [
19
- 'classname' => 'wpcw-widget-social',
20
- 'description' => __( 'Display custom social media profile links.', 'contact-widgets' ),
 
21
  ];
22
 
23
  parent::__construct(
24
  'wpcw_social',
25
- __( 'Social', 'contact-widgets' ),
26
  $widget_options
27
  );
28
 
 
 
 
 
 
 
 
29
  }
30
 
31
  /**
@@ -140,11 +148,6 @@ final class Social extends Base_Widget {
140
 
141
  }
142
 
143
- $suffix = SCRIPT_DEBUG ? '' : '.min';
144
-
145
- wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', [], '4.5.0' );
146
- wp_enqueue_style( 'wpcw', \Contact_Widgets::$assets_url . "css/style{$suffix}.css", [], Plugin::$version );
147
-
148
  $this->before_widget( $args, $fields );
149
 
150
  $display_labels = ( 'yes' === $instance['labels']['value'] );
@@ -176,6 +179,20 @@ final class Social extends Base_Widget {
176
 
177
  }
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  /**
180
  * Initialize fields for use on front-end of forms
181
  *
16
  public function __construct() {
17
 
18
  $widget_options = [
19
+ 'classname' => 'wpcw-widget-social',
20
+ 'description' => __( 'Display links to your social media profiles.', 'contact-widgets' ),
21
+ 'customize_selective_refresh' => true,
22
  ];
23
 
24
  parent::__construct(
25
  'wpcw_social',
26
+ __( 'Social Profiles', 'contact-widgets' ),
27
  $widget_options
28
  );
29
 
30
+ // Enqueue style if widget is active (appears in a sidebar) or if in Customizer preview.
31
+ if ( is_active_widget( false, false, $this->id_base ) || is_customize_preview() ) {
32
+
33
+ add_action( 'wp_enqueue_scripts', [ $this, 'front_end_enqueue_scripts' ] );
34
+
35
+ }
36
+
37
  }
38
 
39
  /**
148
 
149
  }
150
 
 
 
 
 
 
151
  $this->before_widget( $args, $fields );
152
 
153
  $display_labels = ( 'yes' === $instance['labels']['value'] );
179
 
180
  }
181
 
182
+ /**
183
+ * Enqueue scripts and styles for front-end use
184
+ *
185
+ * @action wp_enqueue_scripts
186
+ */
187
+ public function front_end_enqueue_scripts() {
188
+
189
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
190
+
191
+ wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', [], '4.5.0' );
192
+ wp_enqueue_style( 'wpcw', \Contact_Widgets::$assets_url . "css/style{$suffix}.css", [], Plugin::$version );
193
+
194
+ }
195
+
196
  /**
197
  * Initialize fields for use on front-end of forms
198
  *
languages/contact-widgets-da_DK.mo CHANGED
Binary file
languages/contact-widgets-de_DE.mo CHANGED
Binary file
languages/contact-widgets-el.mo CHANGED
Binary file
languages/contact-widgets-es_ES.mo CHANGED
Binary file
languages/contact-widgets-es_MX.mo CHANGED
Binary file
languages/contact-widgets-fi.mo CHANGED
Binary file
languages/contact-widgets-fr_FR.mo CHANGED
Binary file
languages/contact-widgets-id_ID.mo CHANGED
Binary file
languages/contact-widgets-it_IT.mo CHANGED
Binary file
languages/contact-widgets-ja.mo CHANGED
Binary file
languages/contact-widgets-ko_KR.mo CHANGED
Binary file
languages/contact-widgets-ms_MY.mo CHANGED
Binary file
languages/contact-widgets-nb_NO.mo CHANGED
Binary file
languages/contact-widgets-nl_NL.mo CHANGED
Binary file
languages/contact-widgets-pl_PL.mo CHANGED
Binary file
languages/contact-widgets-pt_BR.mo CHANGED
Binary file
languages/contact-widgets-pt_PT.mo CHANGED
Binary file
languages/contact-widgets-ru_RU.mo CHANGED
Binary file
languages/contact-widgets-sv_SE.mo CHANGED
Binary file
languages/contact-widgets-th.mo CHANGED
Binary file
languages/contact-widgets-tl.mo CHANGED
Binary file
languages/contact-widgets-tr_TR.mo CHANGED
Binary file
languages/contact-widgets-uk.mo CHANGED
Binary file
languages/contact-widgets-vi.mo CHANGED
Binary file
languages/contact-widgets-zh_CN.mo CHANGED
Binary file
languages/contact-widgets-zh_HK.mo CHANGED
Binary file
languages/contact-widgets-zh_TW.mo CHANGED
Binary file
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: godaddy, jonathanbardo, fjarrett
3
  Tags: widget, contact, social, sharing, share button, share buttons, share links, social icons, social media, facebook, twitter, google plus, instagram
4
  Requires at least: 4.4.2
5
- Tested up to: 4.4.2
6
- Stable tag: 1.1.0
7
 
8
  Beautifully display social media and contact information on your website with these simple widgets.
9
 
@@ -105,8 +105,11 @@ add_filter( 'wpcw_widget_social_custom_fields', function( $fields, $instance ) {
105
  </pre>
106
 
107
  == Changelog ==
 
 
 
108
  = 1.1.0 - March 9, 2016 =
109
- Add i10n to Google Map embed
110
 
111
  = 1.0.3 - March 9, 2016 =
112
  Update locale ms_MY
2
  Contributors: godaddy, jonathanbardo, fjarrett
3
  Tags: widget, contact, social, sharing, share button, share buttons, share links, social icons, social media, facebook, twitter, google plus, instagram
4
  Requires at least: 4.4.2
5
+ Tested up to: 4.5
6
+ Stable tag: 1.2.0
7
 
8
  Beautifully display social media and contact information on your website with these simple widgets.
9
 
105
  </pre>
106
 
107
  == Changelog ==
108
+ = 1.2.0 - April 12, 2016 =
109
+ WordPress 4.5 compatibility
110
+
111
  = 1.1.0 - March 9, 2016 =
112
+ Add l10n to Google Map embed
113
 
114
  = 1.0.3 - March 9, 2016 =
115
  Update locale ms_MY