Contact Widgets - Version 1.6.2

Version Description

  • February 20th, 2018 =
  • Tweak: Adjust the contact block dependencies.
Download this release

Release Info

Developer Godaddy
Plugin Icon 128x128 Contact Widgets
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

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.6.1
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.6.2
6
  * Author: GoDaddy
7
  * Author URI: https://godaddy.com
8
  * Text Domain: contact-widgets
includes/blocks/contact/contact-block.php CHANGED
@@ -26,9 +26,10 @@ class Contact_Block {
26
  */
27
  public function contact_block_scripts() {
28
 
29
- $suffix = SCRIPT_DEBUG ? '' : '.min';
 
30
 
31
- wp_enqueue_style( 'contact-widgets-contact-block', plugins_url( "css/contact-block{$suffix}.css", __FILE__ ), array( 'wp-edit-blocks' ), Plugin::$version );
32
 
33
  }
34
  }
26
  */
27
  public function contact_block_scripts() {
28
 
29
+ $dependency = is_admin() ? 'wp-edit-blocks' : '';
30
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
31
 
32
+ wp_enqueue_style( 'contact-widgets-contact-block', plugins_url( "css/contact-block{$suffix}.css", __FILE__ ), array( $dependency ), Plugin::$version );
33
 
34
  }
35
  }
includes/blocks/social/social-block.php CHANGED
@@ -25,11 +25,12 @@ class Social_Block {
25
  */
26
  public function social_block_styles() {
27
 
28
- $suffix = SCRIPT_DEBUG ? '' : '.min';
 
29
 
30
  wp_enqueue_style( 'font-awesome', \Contact_Widgets::$fa_url, [], '4.7.0' );
31
 
32
- wp_enqueue_style( 'contact-widgets-social-block', plugins_url( "css/social-block{$suffix}.css", __FILE__ ), array( 'wp-edit-blocks' ), Plugin::$version );
33
 
34
  }
35
  }
25
  */
26
  public function social_block_styles() {
27
 
28
+ $dependency = is_admin() ? 'wp-edit-blocks' : '';
29
+ $suffix = SCRIPT_DEBUG ? '' : '.min';
30
 
31
  wp_enqueue_style( 'font-awesome', \Contact_Widgets::$fa_url, [], '4.7.0' );
32
 
33
+ wp_enqueue_style( 'contact-widgets-social-block', plugins_url( "css/social-block{$suffix}.css", __FILE__ ), array( $dependency ), Plugin::$version );
34
 
35
  }
36
  }
includes/class-base-widget.php CHANGED
@@ -298,9 +298,9 @@ abstract class Base_Widget extends \WP_Widget {
298
 
299
  }
300
 
301
- printf( // xss ok.
302
  '<p class="%s">',
303
- implode( ' ', $classes )
304
  );
305
 
306
  if ( ! $field['label_after'] ) {
@@ -365,11 +365,11 @@ abstract class Base_Widget extends \WP_Widget {
365
 
366
  foreach ( $field['select_options'] as $value => $name ) {
367
 
368
- printf( // xss ok.
369
  '<option value="%s" %s>%s</option>',
370
- $value,
371
  $field['value'] === $value ? 'selected' : '',
372
- $name
373
  );
374
 
375
  }
@@ -435,7 +435,7 @@ abstract class Base_Widget extends \WP_Widget {
435
 
436
  $title = array_shift( $fields );
437
 
438
- echo $args['before_widget']; // xss ok.
439
 
440
  if ( ! empty( $title['value'] ) ) {
441
 
@@ -448,7 +448,7 @@ abstract class Base_Widget extends \WP_Widget {
448
  */
449
  $title = (string) apply_filters( 'widget_title', $title['value'] );
450
 
451
- echo $args['before_title'] . $title . $args['after_title']; // xss ok.
452
 
453
  }
454
 
@@ -496,7 +496,7 @@ abstract class Base_Widget extends \WP_Widget {
496
 
497
  }
498
 
499
- echo $args['after_widget']; // xss ok.
500
 
501
  }
502
 
@@ -515,7 +515,7 @@ abstract class Base_Widget extends \WP_Widget {
515
 
516
  if ( $echo ) {
517
 
518
- echo $result; // xss ok.
519
 
520
  }
521
 
298
 
299
  }
300
 
301
+ printf(
302
  '<p class="%s">',
303
+ implode( ' ', $classes ) // @codingStandardsIgnoreLine
304
  );
305
 
306
  if ( ! $field['label_after'] ) {
365
 
366
  foreach ( $field['select_options'] as $value => $name ) {
367
 
368
+ printf(
369
  '<option value="%s" %s>%s</option>',
370
+ esc_attr( $value ),
371
  $field['value'] === $value ? 'selected' : '',
372
+ esc_html( $name )
373
  );
374
 
375
  }
435
 
436
  $title = array_shift( $fields );
437
 
438
+ echo $args['before_widget']; // @codingStandardsIgnoreLine
439
 
440
  if ( ! empty( $title['value'] ) ) {
441
 
448
  */
449
  $title = (string) apply_filters( 'widget_title', $title['value'] );
450
 
451
+ echo $args['before_title'] . $title . $args['after_title']; // @codingStandardsIgnoreLine
452
 
453
  }
454
 
496
 
497
  }
498
 
499
+ echo $args['after_widget']; // @codingStandardsIgnoreLine
500
 
501
  }
502
 
515
 
516
  if ( $echo ) {
517
 
518
+ echo $result; // @codingStandardsIgnoreLine
519
 
520
  }
521
 
includes/class-contact.php CHANGED
@@ -126,11 +126,11 @@ final class Contact extends Base_Widget {
126
  $escape_callback = $field['escaper'];
127
  $label = str_replace( ':', '', $field['label'] );
128
 
129
- printf( // xss ok.
130
  '<li class="%s">%s<div>%s</div></li>',
131
  ( $display_labels ) ? 'has-label' : 'no-label',
132
- ( $display_labels ) ? sprintf( '<strong>%s</strong><br>', esc_html( $label ) ) : '',
133
- $escape_callback( $field['value'] )
134
  );
135
 
136
  }
126
  $escape_callback = $field['escaper'];
127
  $label = str_replace( ':', '', $field['label'] );
128
 
129
+ printf(
130
  '<li class="%s">%s<div>%s</div></li>',
131
  ( $display_labels ) ? 'has-label' : 'no-label',
132
+ ( $display_labels ) ? sprintf( '<strong>%s</strong><br>', esc_html( $label ) ) : '', // @codingStandardsIgnoreLine
133
+ $escape_callback( $field['value'] ) // @codingStandardsIgnoreLine
134
  );
135
 
136
  }
includes/class-social.php CHANGED
@@ -160,21 +160,21 @@ final class Social extends Base_Widget {
160
 
161
  $escape_callback = $field['escaper'];
162
 
163
- printf( // xss ok.
164
  '<li class="%s"><a href="%s" target="%s" title="%s"><span class="%s fa-%s fa-%s"></span>%s</a></li>',
165
  ( $display_labels ) ? 'has-label' : 'no-label',
166
- $escape_callback( $field['value'] ),
167
  esc_attr( $field['target'] ),
168
  sprintf(
169
  /* translators: 1. Title of website (e.g. My Cat Blog), 2. Name of social network (e.g. Facebook) */
170
  esc_attr__( 'Visit %1$s on %2$s', 'contact-widgets' ),
171
- get_bloginfo( 'name' ),
172
- $field['label']
173
  ),
174
  esc_attr( $this->get_icon_prefix( $field ) ),
175
- isset( $fields['icon_size']['value'] ) ? esc_attr( $fields['icon_size']['value'] ) : '2x',
176
  esc_attr( $field['icon'] ),
177
- ( $display_labels ) ? esc_html( $field['label'] ) : ''
178
  );
179
 
180
  }
160
 
161
  $escape_callback = $field['escaper'];
162
 
163
+ printf(
164
  '<li class="%s"><a href="%s" target="%s" title="%s"><span class="%s fa-%s fa-%s"></span>%s</a></li>',
165
  ( $display_labels ) ? 'has-label' : 'no-label',
166
+ $escape_callback( $field['value'] ), // @codingStandardsIgnoreLine
167
  esc_attr( $field['target'] ),
168
  sprintf(
169
  /* translators: 1. Title of website (e.g. My Cat Blog), 2. Name of social network (e.g. Facebook) */
170
  esc_attr__( 'Visit %1$s on %2$s', 'contact-widgets' ),
171
+ esc_html( get_bloginfo( 'name' ) ),
172
+ esc_html( $field['label'] )
173
  ),
174
  esc_attr( $this->get_icon_prefix( $field ) ),
175
+ isset( $fields['icon_size']['value'] ) ? esc_attr( $fields['icon_size']['value'] ) : '2x', // @codingStandardsIgnoreLine
176
  esc_attr( $field['icon'] ),
177
+ ( $display_labels ) ? esc_html( $field['label'] ) : '' // @codingStandardsIgnoreLine
178
  );
179
 
180
  }
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: godaddy, jonathanbardo, fjarrett, eherman24
3
  Tags: widget, contact, social, social icons, social media, facebook, twitter, instagram, linkedin, pinterest
4
  Requires at least: 4.4
5
  Tested up to: 5.0
6
- Stable tag: 1.6.1
7
  License: GPL-2.0
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -135,6 +135,9 @@ add_filter( 'wpcw_social_icons_use_cdn', '__return_true' );
135
 
136
  == Changelog ==
137
 
 
 
 
138
  = 1.6.1 - December 9th, 2018 =
139
  * Tweak: URI Encode the contact map address.
140
 
3
  Tags: widget, contact, social, social icons, social media, facebook, twitter, instagram, linkedin, pinterest
4
  Requires at least: 4.4
5
  Tested up to: 5.0
6
+ Stable tag: 1.6.2
7
  License: GPL-2.0
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
135
 
136
  == Changelog ==
137
 
138
+ = 1.6.2 - February 20th, 2018 =
139
+ * Tweak: Adjust the contact block dependencies.
140
+
141
  = 1.6.1 - December 9th, 2018 =
142
  * Tweak: URI Encode the contact map address.
143