WP Socializer - Version 4.1.3

Version Description

  • Fix: Location rules template was not populated in PHP 7.3.
  • Fix: Line icon incorrect for fontawesome 4.
  • Fix: Revert back to normal URL for twitter.
  • Fix: Couple of PHP notices for undefined keys are handled.
  • Fix: Updated to latest FontAwesome icons v5.7.2.
Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 WP Socializer
Version 4.1.3
Comparing to
See all releases

Code changes from version 4.1.2 to 4.1.3

admin/admin.php CHANGED
@@ -320,6 +320,14 @@ class WPSR_Admin{
320
  unset( $buttons[ $id ] );
321
  }
322
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
  update_option( 'wpsr_buttons', $buttons );
320
  unset( $buttons[ $id ] );
321
  }
322
 
323
+ // Add feature property to the button config for older settings
324
+ if( !array_key_exists( 'feature', $config ) && array_key_exists( 'flags', $config ) ){
325
+ $flags = $config[ 'flags' ];
326
+ $feature = ( $flags == 1 ) ? 'buttons' : 'sharebar';
327
+ $buttons[ $id ][ 'feature' ] = $feature;
328
+ unset( $buttons[ $id ][ 'flags' ] );
329
+ }
330
+
331
  }
332
 
333
  update_option( 'wpsr_buttons', $buttons );
admin/buttons_picker.php CHANGED
@@ -39,7 +39,7 @@ class WPSR_Buttons_Picker{
39
  }
40
 
41
  $tmpl_props = $buttons_tmpl[$btn_tmpl_id];
42
- $btn_id = WPSR_Buttons::generate_button_id( $service );
43
  $btn_settings = ($btn_tmpl_id == 'default') ? array() : $tmpl_props['settings'];
44
  $btn_settings['title'] = isset($_GET['title']) ? wp_kses_post($_GET[ 'title' ]) : '';
45
 
@@ -88,11 +88,19 @@ class WPSR_Buttons_Picker{
88
 
89
  $buttons = WPSR_Buttons::list_all();
90
  $buttons_list = array(); // Holds all the button ids
91
-
92
  $feature = self::validate_feature( $feature );
93
- foreach( $buttons as $id => $config )
94
- if( $config[ 'feature' ] == $feature[ 'name' ] && $config['service'] == $service )
 
 
 
 
 
 
95
  $buttons_list[$id] = $config;
 
 
 
96
 
97
  return $buttons_list;
98
 
39
  }
40
 
41
  $tmpl_props = $buttons_tmpl[$btn_tmpl_id];
42
+ $btn_id = WPSR_Buttons::generate_button_id( $service_id );
43
  $btn_settings = ($btn_tmpl_id == 'default') ? array() : $tmpl_props['settings'];
44
  $btn_settings['title'] = isset($_GET['title']) ? wp_kses_post($_GET[ 'title' ]) : '';
45
 
88
 
89
  $buttons = WPSR_Buttons::list_all();
90
  $buttons_list = array(); // Holds all the button ids
 
91
  $feature = self::validate_feature( $feature );
92
+
93
+ foreach( $buttons as $id => $config ){
94
+
95
+ if( !array_key_exists( 'feature', $config ) ){
96
+ $config[ 'feature' ] = $feature[ 'name' ];
97
+ }
98
+
99
+ if( $config[ 'feature' ] == $feature[ 'name' ] && $config['service'] == $service ){
100
  $buttons_list[$id] = $config;
101
+ }
102
+
103
+ }
104
 
105
  return $buttons_list;
106
 
core/lists.php CHANGED
@@ -29,7 +29,7 @@ class WPSR_Lists{
29
  public static function ext_res( $name = 'all' ){
30
 
31
  $res = apply_filters( 'wpsr_mod_ext_res', array(
32
- 'font-awesome-adm' => 'https://use.fontawesome.com/releases/v5.6.1/css/all.css',
33
  'wp-socializer-cl' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/changelog/',
34
  'jquery' => 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js',
35
  'help' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/help.html'
@@ -58,12 +58,12 @@ class WPSR_Lists{
58
  'fa5' => array(
59
  'name' => 'Font awesome 5',
60
  'type' => 'css',
61
- 'link' => 'https://use.fontawesome.com/releases/v5.6.1/css/all.css',
62
  'deps' => array(),
63
  'version' => WPSR_VERSION,
64
  'data' => array(
65
  'key' => array( 'integrity', 'crossorigin' ),
66
- 'value' => array( 'sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP', 'anonymous' )
67
  )
68
  )
69
  ));
@@ -314,7 +314,7 @@ class WPSR_Lists{
314
  'line' => array(
315
  'name' => 'Line',
316
  'title' => __('', 'wpsr') . 'Line',
317
- 'icon' => array('fa4'=> 'fa fa-line', 'fa5' => 'fab fa-line'),
318
  'link' => 'https://social-plugins.line.me/lineit/share?url={url}',
319
  'options' => array(),
320
  'features' => array( 'for_share', 'mobile_only' ),
@@ -546,8 +546,8 @@ class WPSR_Lists{
546
  'name' => 'Twitter',
547
  'title' => __('Tweet this !', 'wpsr') . '',
548
  'icon' => array('fa4'=> 'fa fa-twitter', 'fa5' => 'fab fa-twitter'),
549
- 'link' => 'https://twitter.com/home?status={title}%20-%20{s-url}%20{twitter-username}',
550
- 'link_tsb' => 'https://twitter.com/home?status={excerpt}%20-%20{s-url}%20{twitter-username}',
551
  'options' => array(),
552
  'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
553
  'colors' => array( '#4da7de' ),
29
  public static function ext_res( $name = 'all' ){
30
 
31
  $res = apply_filters( 'wpsr_mod_ext_res', array(
32
+ 'font-awesome-adm' => 'https://use.fontawesome.com/releases/v5.7.2/css/all.css',
33
  'wp-socializer-cl' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/changelog/',
34
  'jquery' => 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js',
35
  'help' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/help.html'
58
  'fa5' => array(
59
  'name' => 'Font awesome 5',
60
  'type' => 'css',
61
+ 'link' => 'https://use.fontawesome.com/releases/v5.7.2/css/all.css',
62
  'deps' => array(),
63
  'version' => WPSR_VERSION,
64
  'data' => array(
65
  'key' => array( 'integrity', 'crossorigin' ),
66
+ 'value' => array( 'sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr', 'anonymous' )
67
  )
68
  )
69
  ));
314
  'line' => array(
315
  'name' => 'Line',
316
  'title' => __('', 'wpsr') . 'Line',
317
+ 'icon' => array('fa4'=> 'fa fa-commenting', 'fa5' => 'fab fa-line'),
318
  'link' => 'https://social-plugins.line.me/lineit/share?url={url}',
319
  'options' => array(),
320
  'features' => array( 'for_share', 'mobile_only' ),
546
  'name' => 'Twitter',
547
  'title' => __('Tweet this !', 'wpsr') . '',
548
  'icon' => array('fa4'=> 'fa fa-twitter', 'fa5' => 'fab fa-twitter'),
549
+ 'link' => 'https://twitter.com/home?status={title}%20-%20{url}%20{twitter-username}',
550
+ 'link_tsb' => 'https://twitter.com/home?status={excerpt}%20-%20{url}%20{twitter-username}',
551
  'options' => array(),
552
  'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
553
  'colors' => array( '#4da7de' ),
core/location_rules.php CHANGED
@@ -311,7 +311,8 @@ class WPSR_Location_Rules{
311
  array( 'not-equal', 'is not' )
312
  );
313
 
314
- $select = array( '', '');
 
315
 
316
  foreach( $rules as $k => $v ){
317
  $s = selected( $k, $val[ 0 ], false );
@@ -321,15 +322,15 @@ class WPSR_Location_Rules{
321
  }
322
 
323
  $p = isset( $v[ 'placeholder' ] ) ? ' data-placeholder="' . $v[ 'placeholder' ] . '"' : '';
324
- $select[0] .= '<option value="' . $k . '" ' . $s . $h . $p . '>' . $v[ 'name' ] . '</option>';
325
  }
326
 
327
  foreach( $operators as $k => $v ){
328
  $s = selected( $v[0], $val[1], false );
329
- $select[1] .= '<option value="' . $v[0] . '" ' . $s . '>' . $v[1] . '</option>';
330
  }
331
 
332
- $rule = '<div class="loc_rule_wrap"><select class="loc_page">' . $select[0] . '</select><select class="loc_operator">' . $select[1] . '</select><input type="text" class="loc_value" value="' . $val[2] . '" placeholder="" title="' . __( 'Leave empty to show in all', 'wpsr' ) . '"/><a href="#" class="button loc_rule_add" title="' . __( 'Add another criteria to match', 'wpsr' ) . '">+</a><a href="#" class="button loc_rule_remove" title="' . __( 'Remove criteria', 'wpsr' ) . '">-</a></div>';
333
 
334
  if( $grp ) return '<div class="loc_group_wrap">' . $rule . '</div>';
335
  else return $rule;
311
  array( 'not-equal', 'is not' )
312
  );
313
 
314
+ $loc_pages = '';
315
+ $loc_operators = '';
316
 
317
  foreach( $rules as $k => $v ){
318
  $s = selected( $k, $val[ 0 ], false );
322
  }
323
 
324
  $p = isset( $v[ 'placeholder' ] ) ? ' data-placeholder="' . $v[ 'placeholder' ] . '"' : '';
325
+ $loc_pages .= '<option value="' . $k . '" ' . $s . $h . $p . '>' . $v[ 'name' ] . '</option>';
326
  }
327
 
328
  foreach( $operators as $k => $v ){
329
  $s = selected( $v[0], $val[1], false );
330
+ $loc_operators .= '<option value="' . $v[0] . '" ' . $s . '>' . $v[1] . '</option>';
331
  }
332
 
333
+ $rule = '<div class="loc_rule_wrap"><select class="loc_page">' . $loc_pages . '</select><select class="loc_operator">' . $loc_operators . '</select><input type="text" class="loc_value" value="' . $val[2] . '" placeholder="" title="' . __( 'Leave empty to show in all', 'wpsr' ) . '"/><a href="#" class="button loc_rule_add" title="' . __( 'Add another criteria to match', 'wpsr' ) . '">+</a><a href="#" class="button loc_rule_remove" title="' . __( 'Remove criteria', 'wpsr' ) . '">-</a></div>';
334
 
335
  if( $grp ) return '<div class="loc_group_wrap">' . $rule . '</div>';
336
  else return $rule;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: vaakash
3
  Donate link: https://goo.gl/qMF3iE
4
  Tags: sharing, social media icons, share icons, share buttons, follow buttons, widgets, floating share buttons, profile buttons, mobile sharebar, profile icons, social bar, share counter, excerpt, shortcode, linkedin, pinterest, pocket, reddit, sharethis, addthis, whatsapp, tweet, vkontakte, socializer, wp socializer, weibo, line, mix, odnoklassniki, renren, skype
5
  Requires at least: 4.6
6
- Tested up to: 5.0.1
7
- Stable tag: 4.1.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -225,6 +225,13 @@ Please refer [this page](https://goo.gl/Ge7riC) for the full list of FAQs.
225
 
226
  == Changelog ==
227
 
 
 
 
 
 
 
 
228
  = 4.1.2 =
229
  * Fix: Updated LinkedIn share URL to latest.
230
  * Fix: Updated to latest FontAwesome icons v5.6.1.
3
  Donate link: https://goo.gl/qMF3iE
4
  Tags: sharing, social media icons, share icons, share buttons, follow buttons, widgets, floating share buttons, profile buttons, mobile sharebar, profile icons, social bar, share counter, excerpt, shortcode, linkedin, pinterest, pocket, reddit, sharethis, addthis, whatsapp, tweet, vkontakte, socializer, wp socializer, weibo, line, mix, odnoklassniki, renren, skype
5
  Requires at least: 4.6
6
+ Tested up to: 5.0.3
7
+ Stable tag: 4.1.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
225
 
226
  == Changelog ==
227
 
228
+ = 4.1.3 =
229
+ * Fix: Location rules template was not populated in PHP 7.3.
230
+ * Fix: Line icon incorrect for fontawesome 4.
231
+ * Fix: Revert back to normal URL for twitter.
232
+ * Fix: Couple of PHP notices for undefined keys are handled.
233
+ * Fix: Updated to latest FontAwesome icons v5.7.2.
234
+
235
  = 4.1.2 =
236
  * Fix: Updated LinkedIn share URL to latest.
237
  * Fix: Updated to latest FontAwesome icons v5.6.1.
services/social_icons.php CHANGED
@@ -547,6 +547,15 @@ echo json_encode( $a );
547
  $g_settings = WPSR_Lists::set_defaults( $g_settings, WPSR_Lists::defaults( 'gsettings_twitter' ) );
548
  $t_username = ( $g_settings[ 'twitter_username' ] != '' ) ? '@' . $g_settings[ 'twitter_username' ] : '';
549
 
 
 
 
 
 
 
 
 
 
550
  $search = array(
551
  '{url}',
552
  '{title}',
547
  $g_settings = WPSR_Lists::set_defaults( $g_settings, WPSR_Lists::defaults( 'gsettings_twitter' ) );
548
  $t_username = ( $g_settings[ 'twitter_username' ] != '' ) ? '@' . $g_settings[ 'twitter_username' ] : '';
549
 
550
+ $pinfo = wp_parse_args( $pinfo, array(
551
+ 'url' => '',
552
+ 'title' => '',
553
+ 'excerpt' => '',
554
+ 'short_url' => '',
555
+ 'rss_url' => '',
556
+ 'post_image' => ''
557
+ ));
558
+
559
  $search = array(
560
  '{url}',
561
  '{title}',
wpsr.php CHANGED
@@ -3,14 +3,14 @@
3
  * Plugin Name: WP Socializer
4
  * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
  * Description: WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization.
6
- * Version: 4.1.2
7
  * Author: Aakash Chakravarthy
8
  * Author URI: https://www.aakashweb.com
9
  * Text Domain: wpsr
10
  * Domain Path: /languages
11
  */
12
 
13
- define( 'WPSR_VERSION', '4.1.2' );
14
  define( 'WPSR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'WPSR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'WPSR_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
3
  * Plugin Name: WP Socializer
4
  * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
  * Description: WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization.
6
+ * Version: 4.1.3
7
  * Author: Aakash Chakravarthy
8
  * Author URI: https://www.aakashweb.com
9
  * Text Domain: wpsr
10
  * Domain Path: /languages
11
  */
12
 
13
+ define( 'WPSR_VERSION', '4.1.3' );
14
  define( 'WPSR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
  define( 'WPSR_URL', plugin_dir_url( __FILE__ ) );
16
  define( 'WPSR_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );