WP Socializer - Version 7.3

Version Description

Download this release

Release Info

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

Code changes from version 7.2 to 7.3

Files changed (43) hide show
  1. admin/admin.php +35 -59
  2. admin/css/style.css +1 -0
  3. admin/form.php +11 -11
  4. admin/icons-editor.php +28 -28
  5. admin/images/banners/facebook-widget.svg +0 -1
  6. admin/images/banners/floating-sharebar.svg +0 -1
  7. admin/images/banners/follow-icons-widget.svg +0 -1
  8. admin/images/banners/follow-icons.svg +0 -1
  9. admin/images/banners/import-export.svg +0 -1
  10. admin/images/banners/settings.svg +0 -1
  11. admin/images/banners/share-icons.svg +0 -1
  12. admin/images/banners/shortcodes.svg +0 -1
  13. admin/images/banners/text-sharebar.svg +0 -1
  14. admin/images/banners/twitter-widget.svg +0 -1
  15. admin/js/script.js +71 -23
  16. admin/js/script_widgets.js +9 -1
  17. admin/pages/floating-sharebar.php +45 -41
  18. admin/pages/follow-icons.php +61 -54
  19. admin/pages/general-settings.php +38 -27
  20. admin/pages/import-export.php +11 -16
  21. admin/pages/share-icons.php +61 -49
  22. admin/pages/shortcodes.php +72 -73
  23. admin/pages/text-sharebar.php +27 -23
  24. admin/post-settings.php +14 -14
  25. admin/widgets.php +7 -7
  26. core/html-tag.php +2 -2
  27. core/import-export.php +4 -0
  28. core/includes.php +5 -42
  29. core/lists.php +234 -0
  30. core/location-rules.php +34 -33
  31. core/metadata.php +1 -1
  32. core/options.php +77 -77
  33. core/share-counter.php +22 -13
  34. core/templates/floating-sharebar.php +4 -4
  35. core/templates/follow-icons.php +9 -10
  36. core/templates/popups.php +5 -11
  37. core/templates/share-icons.php +5 -5
  38. core/templates/text-sharebar.php +3 -4
  39. core/widgets/facebook.php +14 -9
  40. core/widgets/follow-icons.php +16 -11
  41. core/widgets/twitter.php +10 -5
  42. readme.txt +9 -3
  43. wpsr.php +3 -9
admin/admin.php CHANGED
@@ -32,9 +32,6 @@ class WPSR_Admin{
32
  // Register the action links in plugin list page
33
  add_filter( 'plugin_action_links_' . WPSR_BASE_NAME, array( __CLASS__, 'action_links' ) );
34
 
35
- // Register the admin notice to inform new version features
36
- add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
37
-
38
  add_action( 'plugins_loaded', array( __CLASS__, 'on_activate' ) );
39
 
40
  add_filter( 'admin_footer_text', array( __class__, 'footer_text' ) );
@@ -89,7 +86,7 @@ class WPSR_Admin{
89
 
90
  foreach( $pages as $id => $config ){
91
  if( empty( $config[ 'link' ] ) ){
92
- add_submenu_page( 'wp_socializer', 'WP Socializer - ' . $config[ 'name' ], $config[ 'name' ], 'manage_options', 'wp_socializer&tab="' . $id . '"', array( __CLASS__, 'admin_page' ) );
93
  }
94
  }
95
 
@@ -104,14 +101,14 @@ class WPSR_Admin{
104
  }
105
 
106
  $pages = self::get_pages();
107
- self::$current_page = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
108
 
109
  // Set default page
110
  if( empty( self::$current_page ) || !array_key_exists( self::$current_page, $pages ) ){
111
  self::$current_page = 'home';
112
  }
113
 
114
- echo '<div class="wrap page_' . self::$current_page . '">';
115
 
116
  self::admin_header();
117
 
@@ -159,8 +156,8 @@ class WPSR_Admin{
159
 
160
  $page = $pages[ self::$current_page ];
161
  echo '<div class="page_head">';
162
- echo '<h1>' . $page[ 'name' ] . '</h1>';
163
- if( !empty( $page[ 'description' ] ) ) echo '<p>' . $page[ 'description' ] . '</p>';
164
  echo '</div>';
165
 
166
  call_user_func( $pages[ self::$current_page ][ 'callbacks' ][ 'page' ] );
@@ -183,18 +180,18 @@ class WPSR_Admin{
183
  }
184
 
185
  $is_feature_active = false;
186
- $action_text = __( 'Open', 'wpsr' );
187
  $link = empty( $config['link'] ) ? ( 'admin.php?page=wp_socializer&tab=' . $id ) : $config[ 'link' ];
188
 
189
  if( $config[ 'type' ] == 'feature' ){
190
  $feat_settings = get_option( 'wpsr_' . $config['form_name'], array() );
191
  $feat_settings = WPSR_Lists::set_defaults( $feat_settings, WPSR_Options::default_values( $id ) );
192
  $is_feature_active = ( isset( $feat_settings[ 'ft_status' ] ) && $feat_settings[ 'ft_status' ] == 'enable' ) ? true : false;
193
- $action_text = $is_feature_active ? '<i class="fa fa-check"></i>' . __( 'Active', 'wpsr' ) : __( 'Inactive', 'wpsr' );
194
  }
195
 
196
  if( $config[ 'type' ] == 'widget' ){
197
- $action_text = __( 'Add widget', 'wpsr' );
198
  }
199
 
200
  $card_class = array(
@@ -203,13 +200,12 @@ class WPSR_Admin{
203
  ( $is_feature_active ? 'active' : '' )
204
  );
205
 
206
- echo '<a class="' . implode( ' ', $card_class ) . '" href="' . $link . '">';
207
  echo '<div class="card_info">';
208
- echo '<h3>' . $config[ 'name' ] . '</h3>';
209
- echo '<div class="card_banner" style="background-image: url(' . $config[ 'banner' ] . '?v=' . WPSR_VERSION . ')"></div>';
210
- if( !empty( $config[ 'description' ] ) ) echo '<p>' . $config[ 'description' ] . '</p>';
211
  echo '</div>';
212
- echo '<div class="page_feat_status">' . $action_text . '</div>';
213
  echo '</a>';
214
 
215
  }
@@ -237,13 +233,13 @@ class WPSR_Admin{
237
  if( $_POST && check_admin_referer( $nonce ) ){
238
 
239
  $post = self::clean_post();
240
- $post_value = apply_filters( $validation_filter, $post );
241
-
242
- update_option( $option, $post_value );
243
 
244
  echo '<div class="notice notice-success inline is-dismissible save_notice">';
245
- echo '<p>' . __( 'Settings saved successfully ! ', 'wpsr' );
246
- echo '<a href="' . get_site_url() . '" target="_blank">' . __( 'Visit site', 'wpsr' ) . ' <i class="fas fa-arrow-right"></i></a></p>';
247
  echo '<p class="pro_msg">' . self::pro_msg() . '</p>';
248
  echo '</div>';
249
  }
@@ -251,7 +247,7 @@ class WPSR_Admin{
251
  // Get saved details
252
  $saved_settings = get_option( $option );
253
 
254
- echo '<form method="post" id="' . $form_name . '" class="main_form">';
255
 
256
  // Execute all hooked form fields from services
257
  if( is_callable( $form_callback ) ){
@@ -262,7 +258,7 @@ class WPSR_Admin{
262
 
263
  wp_nonce_field( $nonce );
264
 
265
- echo '<div class="main_form_footer postbox"><input type="submit" value="' . __( 'Save settings', 'wpsr' ) . '" class="button button-primary" /></div>';
266
 
267
  echo '</form>';
268
 
@@ -297,10 +293,10 @@ class WPSR_Admin{
297
  $loc_rules = WPSR_Location_Rules::rules_list();
298
 
299
  $js_texts = array(
300
- 'sel_btn' => __( 'Please select a service to create button for !', 'wpsr' ),
301
- 'del_btn' => __( 'Are you sure want to delete this button ?', 'wpsr' ),
302
- 'close' => __( 'Close', 'wpsr' ),
303
- 'fb_empty' => __( 'No buttons are added. Open the editor to add buttons.', 'wpsr' )
304
  );
305
 
306
  echo '<script>
@@ -350,9 +346,7 @@ class WPSR_Admin{
350
  }
351
 
352
  public static function clean_post(){
353
-
354
- return stripslashes_deep( $_POST );
355
-
356
  }
357
 
358
  public static function clean_attr( $a ){
@@ -362,10 +356,12 @@ class WPSR_Admin{
362
  $a[ $k ] = self::clean_attr( $v );
363
  }else{
364
 
365
- if( in_array( $k, array( 'custom', 'tip', 'helper' ) ) )
366
- continue;
 
 
 
367
 
368
- $a[ $k ] = esc_attr( $v );
369
  }
370
  }
371
 
@@ -373,36 +369,16 @@ class WPSR_Admin{
373
  }
374
 
375
  public static function clean_get(){
376
-
377
- foreach( $_GET as $k=>$v ){
378
- $_GET[$k] = sanitize_text_field( $v );
379
- }
380
-
381
- return $_GET;
382
  }
383
 
384
  public static function action_links( $links ){
385
  array_unshift( $links, '<a href="'. esc_url( admin_url( 'admin.php?page=wp_socializer') ) .'">Settings</a>' );
386
- array_unshift( $links, '<a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=action_link&utm_campaign=wpsr-pro" target="_blank"><b>' . __( 'Upgrade to PRO', 'wp-socializer' ) . '</b></a>' );
387
 
388
  return $links;
389
  }
390
 
391
- public static function admin_notices(){
392
-
393
- $pages_display = array( 'plugins', 'update-core', 'dashboard' );
394
-
395
- if( in_array( get_current_screen()->id, $pages_display ) ){
396
- if( version_compare( WPSR_VERSION, get_option( 'wpsr_last_changelog' ), '>' ) ){
397
- echo '<div class="notice notice-success is-dismissible">
398
- <p>✨ ' . __( '<b>WP Socializer</b> plugin is updated to the latest version', 'wpsr') . ' <code>' . WPSR_VERSION . '</code></p>
399
- <p>' . __( 'Please read the changelog in the settings page.', 'wpsr') . '</p>
400
- <p><a href="' . esc_url( admin_url( 'admin.php?page=wp_socializer') ) . '" class="button button-primary">' . __( 'View change log', 'wpsr' ) . '</a></p>
401
- </div>';
402
- }
403
- }
404
- }
405
-
406
  public static function admin_links(){
407
  echo '<ul class="admin_links">';
408
  echo '<li><a href="https://wordpress.org/support/plugin/wp-socializer/reviews/?rate=5#new-post" class="button" target="_blank">⭐ Rate &amp; Review</a></li>';
@@ -416,7 +392,7 @@ class WPSR_Admin{
416
  $screen = get_current_screen();
417
 
418
  if( self::$pagehook == $screen->id ){
419
- return '<img src="' . WPSR_ADMIN_URL . '/images/icons/aakash-web.png" alt="Aakash Web" /> Thank you for using WP Socializer. Created by <a href="https://www.aakashweb.com" target="_blank">Aakash Chakravarthy</a>. More <a href="https://www.aakashweb.com/wordpress-plugins/" target="_blank">WordPress plugins</a>';
420
  }
421
 
422
  return $text;
@@ -451,7 +427,7 @@ class WPSR_Admin{
451
  echo '<p>Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.</p>';
452
 
453
  echo '<form class="subscribe_form" action="https://aakashweb.us19.list-manage.com/subscribe/post?u=b7023581458d048107298247e&amp;id=ef5ab3c5c4" method="post" name="mc-embedded-subscribe-form" target="_blank" novalidate>
454
- <input type="text" value="' . get_option( 'admin_email' ) . '" name="EMAIL" class="required subscribe_email_box" id="mce-EMAIL" placeholder="Your email address">
455
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_b7023581458d048107298247e_ef5ab3c5c4" tabindex="-1" value=""></div>
456
  <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button subscribe_btn">
457
  </form>';
@@ -465,7 +441,7 @@ class WPSR_Admin{
465
 
466
  echo '<div class="welcome_wrap intro_popup style_ele">
467
  <section></section>
468
- <footer><button class="button button-primary close_changelog_btn">' . __( 'Start using WP Socializer', 'wpsr' ) . '</button> <a href="https://twitter.com/intent/tweet?hashtags=wordpress,plugin,facebook,twitter,addtoany,addthis&ref_src=twsrc%5Etfw&related=aakashweb&text=Check%20out%20WP%20Socializer%20⚡%20a%20free%20all%20in%20one%20plugin%20to%20add%20social%20sharing%20buttons%2C%20profile%20links%2C%20sticky%20share%20bar%20and%20widgets%20to%20your%20WordPress%20site&tw_p=tweetbutton&url=https%3A%2F%2Fwww.aakashweb.com%2Fwordpress-plugins%2Fwp-socializer%2F&via=aakashweb" class="button" target="_blank">Share on Twitter</a></footer>
469
  </div>';
470
 
471
  }
@@ -483,7 +459,7 @@ class WPSR_Admin{
483
  $rand_feature_id = array_rand( $features );
484
  $feature = $features[ $rand_feature_id ];
485
 
486
- return '<span class="pro_tag">PRO Feature</span> In WP Socializer PRO, ' . $feature . ' <a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=save_msg&utm_campaign=wpsr-pro" target="_blank">Get this feature <i class="fas fa-arrow-right"></i></a>';
487
 
488
  }
489
 
32
  // Register the action links in plugin list page
33
  add_filter( 'plugin_action_links_' . WPSR_BASE_NAME, array( __CLASS__, 'action_links' ) );
34
 
 
 
 
35
  add_action( 'plugins_loaded', array( __CLASS__, 'on_activate' ) );
36
 
37
  add_filter( 'admin_footer_text', array( __class__, 'footer_text' ) );
86
 
87
  foreach( $pages as $id => $config ){
88
  if( empty( $config[ 'link' ] ) ){
89
+ add_submenu_page( 'wp_socializer', 'WP Socializer - ' . $config[ 'name' ], $config[ 'name' ], 'manage_options', 'wp_socializer&tab="' . sanitize_key( $id ) . '"', array( __CLASS__, 'admin_page' ) );
90
  }
91
  }
92
 
101
  }
102
 
103
  $pages = self::get_pages();
104
+ self::$current_page = isset( $_GET['tab'] ) ? sanitize_text_field( $_GET['tab'] ) : '';
105
 
106
  // Set default page
107
  if( empty( self::$current_page ) || !array_key_exists( self::$current_page, $pages ) ){
108
  self::$current_page = 'home';
109
  }
110
 
111
+ echo '<div class="wrap page_' . esc_attr( self::$current_page ) . '">';
112
 
113
  self::admin_header();
114
 
156
 
157
  $page = $pages[ self::$current_page ];
158
  echo '<div class="page_head">';
159
+ echo '<h1>' . esc_html( $page[ 'name' ] ) . '</h1>';
160
+ if( !empty( $page[ 'description' ] ) ) echo '<p>' . esc_html( $page[ 'description' ] ) . '</p>';
161
  echo '</div>';
162
 
163
  call_user_func( $pages[ self::$current_page ][ 'callbacks' ][ 'page' ] );
180
  }
181
 
182
  $is_feature_active = false;
183
+ $action_text = __( 'Open', 'wp-socializer' );
184
  $link = empty( $config['link'] ) ? ( 'admin.php?page=wp_socializer&tab=' . $id ) : $config[ 'link' ];
185
 
186
  if( $config[ 'type' ] == 'feature' ){
187
  $feat_settings = get_option( 'wpsr_' . $config['form_name'], array() );
188
  $feat_settings = WPSR_Lists::set_defaults( $feat_settings, WPSR_Options::default_values( $id ) );
189
  $is_feature_active = ( isset( $feat_settings[ 'ft_status' ] ) && $feat_settings[ 'ft_status' ] == 'enable' ) ? true : false;
190
+ $action_text = $is_feature_active ? esc_html__( 'Active', 'wp-socializer' ) : esc_html__( 'Inactive', 'wp-socializer' );
191
  }
192
 
193
  if( $config[ 'type' ] == 'widget' ){
194
+ $action_text = __( 'Add widget', 'wp-socializer' );
195
  }
196
 
197
  $card_class = array(
200
  ( $is_feature_active ? 'active' : '' )
201
  );
202
 
203
+ echo '<a class="' . esc_attr( implode( ' ', $card_class ) ) . '" href="' . esc_attr( $link ) . '">';
204
  echo '<div class="card_info">';
205
+ echo '<h3>' . esc_html( $config[ 'name' ] ) . '</h3>';
206
+ if( !empty( $config[ 'description' ] ) ) echo '<p>' . esc_html( $config[ 'description' ] ) . '</p>';
 
207
  echo '</div>';
208
+ echo '<div class="page_feat_status">' . esc_html( $action_text ) . '</div>';
209
  echo '</a>';
210
 
211
  }
233
  if( $_POST && check_admin_referer( $nonce ) ){
234
 
235
  $post = self::clean_post();
236
+ $post_sanitized = apply_filters( $validation_filter, $post ); // Sanitize the options
237
+
238
+ update_option( $option, $post_sanitized );
239
 
240
  echo '<div class="notice notice-success inline is-dismissible save_notice">';
241
+ echo '<p>' . esc_html__( 'Settings saved successfully ! ', 'wp-socializer' );
242
+ echo '<a href="' . esc_url( get_site_url() ) . '" target="_blank">' . esc_html__( 'Visit site', 'wp-socializer' ) . ' <i class="fas fa-arrow-right"></i></a></p>';
243
  echo '<p class="pro_msg">' . self::pro_msg() . '</p>';
244
  echo '</div>';
245
  }
247
  // Get saved details
248
  $saved_settings = get_option( $option );
249
 
250
+ echo '<form method="post" id="' . esc_attr( $form_name ) . '" class="main_form">';
251
 
252
  // Execute all hooked form fields from services
253
  if( is_callable( $form_callback ) ){
258
 
259
  wp_nonce_field( $nonce );
260
 
261
+ echo '<div class="main_form_footer postbox"><input type="submit" value="' . esc_html__( 'Save settings', 'wp-socializer' ) . '" class="button button-primary" /></div>';
262
 
263
  echo '</form>';
264
 
293
  $loc_rules = WPSR_Location_Rules::rules_list();
294
 
295
  $js_texts = array(
296
+ 'sel_btn' => __( 'Please select a service to create button for !', 'wp-socializer' ),
297
+ 'del_btn' => __( 'Are you sure want to delete this button ?', 'wp-socializer' ),
298
+ 'close' => __( 'Close', 'wp-socializer' ),
299
+ 'fb_empty' => __( 'No buttons are added. Open the editor to add buttons.', 'wp-socializer' )
300
  );
301
 
302
  echo '<script>
346
  }
347
 
348
  public static function clean_post(){
349
+ return wp_unslash( $_POST );
 
 
350
  }
351
 
352
  public static function clean_attr( $a ){
356
  $a[ $k ] = self::clean_attr( $v );
357
  }else{
358
 
359
+ if( in_array( $k, array( 'custom', 'tip', 'helper', 'before_text', 'after_text' ) ) ){
360
+ $a[ $k ] = wp_kses_post( $v );
361
+ }else{
362
+ $a[ $k ] = esc_attr( $v );
363
+ }
364
 
 
365
  }
366
  }
367
 
369
  }
370
 
371
  public static function clean_get(){
372
+ return wp_kses_post_deep( $_GET );
 
 
 
 
 
373
  }
374
 
375
  public static function action_links( $links ){
376
  array_unshift( $links, '<a href="'. esc_url( admin_url( 'admin.php?page=wp_socializer') ) .'">Settings</a>' );
377
+ array_unshift( $links, '<a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=action_link&utm_campaign=wpsr-pro" target="_blank"><span style="font-weight: bold">' . esc_html__( 'Upgrade to PRO', 'wp-socializer' ) . '</span></a>' );
378
 
379
  return $links;
380
  }
381
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  public static function admin_links(){
383
  echo '<ul class="admin_links">';
384
  echo '<li><a href="https://wordpress.org/support/plugin/wp-socializer/reviews/?rate=5#new-post" class="button" target="_blank">⭐ Rate &amp; Review</a></li>';
392
  $screen = get_current_screen();
393
 
394
  if( self::$pagehook == $screen->id ){
395
+ return '<img src="' . esc_url( WPSR_ADMIN_URL ) . '/images/icons/aakash-web.png" alt="Aakash Web" /> Thank you for using WP Socializer. Created by <a href="https://www.aakashweb.com" target="_blank">Aakash Chakravarthy</a>. More <a href="https://www.aakashweb.com/wordpress-plugins/" target="_blank">WordPress plugins</a>';
396
  }
397
 
398
  return $text;
427
  echo '<p>Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam.</p>';
428
 
429
  echo '<form class="subscribe_form" action="https://aakashweb.us19.list-manage.com/subscribe/post?u=b7023581458d048107298247e&amp;id=ef5ab3c5c4" method="post" name="mc-embedded-subscribe-form" target="_blank" novalidate>
430
+ <input type="text" value="' . esc_attr( wp_get_current_user()->user_email ) . '" name="EMAIL" class="required subscribe_email_box" id="mce-EMAIL" placeholder="Your email address">
431
  <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_b7023581458d048107298247e_ef5ab3c5c4" tabindex="-1" value=""></div>
432
  <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button subscribe_btn">
433
  </form>';
441
 
442
  echo '<div class="welcome_wrap intro_popup style_ele">
443
  <section></section>
444
+ <footer><button class="button button-primary close_changelog_btn">' . esc_html__( 'Start using WP Socializer', 'wp-socializer' ) . '</button> <a href="https://twitter.com/intent/tweet?hashtags=wordpress,plugin,facebook,twitter,addtoany,addthis&ref_src=twsrc%5Etfw&related=aakashweb&text=Check%20out%20WP%20Socializer%20⚡%20a%20free%20all%20in%20one%20plugin%20to%20add%20social%20sharing%20buttons%2C%20profile%20links%2C%20sticky%20share%20bar%20and%20widgets%20to%20your%20WordPress%20site&tw_p=tweetbutton&url=https%3A%2F%2Fwww.aakashweb.com%2Fwordpress-plugins%2Fwp-socializer%2F&via=aakashweb" class="button" target="_blank">Share on Twitter</a></footer>
445
  </div>';
446
 
447
  }
459
  $rand_feature_id = array_rand( $features );
460
  $feature = $features[ $rand_feature_id ];
461
 
462
+ return '<span class="pro_tag">PRO Feature</span> In WP Socializer PRO, ' . wp_kses( $feature, array( 'strong' => array() ) ) . ' <a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=save_msg&utm_campaign=wpsr-pro" target="_blank">Get this feature <i class="fas fa-arrow-right"></i></a>';
463
 
464
  }
465
 
admin/css/style.css CHANGED
@@ -139,6 +139,7 @@ h1.wpsr_title a i{
139
  margin: 20px 0;
140
  color: #000000;
141
  line-height: 1.25;
 
142
  }
143
  .page_card:hover{
144
  border-color: #888 !important;
139
  margin: 20px 0;
140
  color: #000000;
141
  line-height: 1.25;
142
+ text-transform: capitalize;
143
  }
144
  .page_card:hover{
145
  border-color: #888 !important;
admin/form.php CHANGED
@@ -57,16 +57,16 @@ class WPSR_Form{
57
  $pc = !empty( $prefix_class ) ? $prefix_class . '_' : '';
58
 
59
  foreach( $this->fields as $field_wrap ){
60
- $class = !isset( $field_wrap[ 'wrap_class' ] ) ? ( 'class="' . $pc . 'field_wrap"' ) : ( ' class="' . $pc . 'field_wrap ' . $field_wrap[ 'wrap_class' ] . '" ' );
61
  $attr = !isset( $field_wrap[ 'wrap_attr' ] ) ? '' : $field_wrap[ 'wrap_attr' ];
62
 
63
- echo '<div ' . $class . ' ' . $attr . '>';
64
- echo '<label class="' . $pc . 'field_label">' . $field_wrap[ 'label' ] . '</label>';
65
  echo '<div>';
66
- echo '<div class="' . $pc . 'field_val_wrap">';
67
  if( isset($field_wrap[ 'fields' ] ) ){
68
  foreach( $field_wrap[ 'fields' ] as $field ){
69
- echo '<div class="' . $pc . 'field_val">';
70
  echo self::field_html( $field[ 'field_type' ], $field[ 'field_prop' ] );
71
  echo '</div>';
72
  }
@@ -74,7 +74,7 @@ class WPSR_Form{
74
  echo '</div>';
75
 
76
  if( isset( $field_wrap[ 'description' ] ) ){
77
- echo '<p class="description">' . $field_wrap[ 'description' ] . '</p>';
78
  }
79
 
80
  echo '</div>';
@@ -86,7 +86,7 @@ class WPSR_Form{
86
 
87
  function section_start( $heading = false, $step = false ){
88
 
89
- if( $heading ) echo '<h3 class="section_head" data-step="' . $step . '">' . $heading . '</h3>';
90
  echo '<section class="form_section">';
91
 
92
  }
@@ -97,7 +97,7 @@ class WPSR_Form{
97
 
98
  function section_description( $description = false ){
99
  if( $description ){
100
- echo '<p class="section_desc">' . $description . '</p>';
101
  }
102
  }
103
 
@@ -105,7 +105,7 @@ class WPSR_Form{
105
 
106
  echo '<ul class="tab_list">';
107
  foreach( $tabs as $id => $label ){
108
- echo '<li><a href="#' . $id . '">' . $label . '</a></li>';
109
  }
110
  echo '</ul>';
111
 
@@ -145,7 +145,7 @@ class WPSR_Form{
145
  $props = WPSR_Admin::clean_attr( $props );
146
  extract( $props, EXTR_SKIP );
147
 
148
- $id_attr = empty( $id ) ? '' : 'id="' . $id . '"';
149
  $class_attr = empty( $class ) ? '' : 'class="' . $class . '"';
150
 
151
  if( !empty( $before_text ) ){
@@ -185,7 +185,7 @@ class WPSR_Form{
185
  }
186
  $img = ( substr( $img, 0, 4 ) !== 'http' ) ? ( WPSR_ADMIN_URL . 'images/select_images/' . $img ) : $img;
187
  $width = ( is_array( $v ) && isset( $v[2] ) ) ? "style='width:" . $v[2] . "'" : "";
188
- $field_html .= "<li data-value='$k' data-init='false' class='" . $is_selected . "' $width><img src='" . $img . "' /><span>" . $opt_name . "</span></li>";
189
  }
190
  $field_html .= "</ul>";
191
  }
57
  $pc = !empty( $prefix_class ) ? $prefix_class . '_' : '';
58
 
59
  foreach( $this->fields as $field_wrap ){
60
+ $class = !isset( $field_wrap[ 'wrap_class' ] ) ? ( $pc . 'field_wrap' ) : ( $pc . 'field_wrap ' . $field_wrap[ 'wrap_class' ] );
61
  $attr = !isset( $field_wrap[ 'wrap_attr' ] ) ? '' : $field_wrap[ 'wrap_attr' ];
62
 
63
+ echo '<div class="' . esc_attr( $class ) . '" ' . wp_kses( $attr, array() ) . '>';
64
+ echo '<label class="' . esc_attr( $pc ) . 'field_label">' . esc_html( $field_wrap[ 'label' ] ) . '</label>';
65
  echo '<div>';
66
+ echo '<div class="' . esc_attr( $pc ) . 'field_val_wrap">';
67
  if( isset($field_wrap[ 'fields' ] ) ){
68
  foreach( $field_wrap[ 'fields' ] as $field ){
69
+ echo '<div class="' . esc_attr( $pc ) . 'field_val">';
70
  echo self::field_html( $field[ 'field_type' ], $field[ 'field_prop' ] );
71
  echo '</div>';
72
  }
74
  echo '</div>';
75
 
76
  if( isset( $field_wrap[ 'description' ] ) ){
77
+ echo '<p class="description">' . wp_kses_post( $field_wrap[ 'description' ] ) . '</p>';
78
  }
79
 
80
  echo '</div>';
86
 
87
  function section_start( $heading = false, $step = false ){
88
 
89
+ if( $heading ) echo '<h3 class="section_head" data-step="' . esc_attr( $step ) . '">' . esc_html( $heading ) . '</h3>';
90
  echo '<section class="form_section">';
91
 
92
  }
97
 
98
  function section_description( $description = false ){
99
  if( $description ){
100
+ echo '<p class="section_desc">' . wp_kses_post( $description ) . '</p>';
101
  }
102
  }
103
 
105
 
106
  echo '<ul class="tab_list">';
107
  foreach( $tabs as $id => $label ){
108
+ echo '<li><a href="' . esc_url( '#' . $id ) . '">' . wp_kses_post( $label ) . '</a></li>';
109
  }
110
  echo '</ul>';
111
 
145
  $props = WPSR_Admin::clean_attr( $props );
146
  extract( $props, EXTR_SKIP );
147
 
148
+ $id_attr = empty( $id ) ? '' : 'id="' . $id . '"'; // Attribute is already escaped above using clean_attr
149
  $class_attr = empty( $class ) ? '' : 'class="' . $class . '"';
150
 
151
  if( !empty( $before_text ) ){
185
  }
186
  $img = ( substr( $img, 0, 4 ) !== 'http' ) ? ( WPSR_ADMIN_URL . 'images/select_images/' . $img ) : $img;
187
  $width = ( is_array( $v ) && isset( $v[2] ) ) ? "style='width:" . $v[2] . "'" : "";
188
+ $field_html .= "<li data-value='$k' data-init='false' class='" . $is_selected . "' $width><img src='" . esc_url( $img ) . "' /><span>" . esc_html( $opt_name ) . "</span></li>";
189
  }
190
  $field_html .= "</ul>";
191
  }
admin/icons-editor.php CHANGED
@@ -14,11 +14,11 @@ class WPSR_Icons_Editor{
14
  echo '<ul class="sic_list sie_selected">';
15
 
16
  $si_selected = array();
17
- $si_saved = json_decode( base64_decode( $selected_icons ) );
18
 
19
  foreach( $si_saved as $icon ){
20
  $id = key( $icon );
21
- $settings = (array) $icon->$id;
22
  array_push( $si_selected, array( $id => $settings ) );
23
  }
24
 
@@ -31,18 +31,18 @@ class WPSR_Icons_Editor{
31
 
32
  $datas = array();
33
  $props = $social_icons[ $id ];
34
- array_push( $datas, 'data-id="' . $id . '"' );
35
 
36
  foreach( $settings as $ics_id => $ics_value ){
37
- array_push( $datas, 'data-icns_' . $ics_id . '="' . esc_attr( $ics_value ) . '"' );
38
  }
39
 
40
  $datas = implode( ' ', $datas );
41
- echo '<li ' . $datas . ' style="background-color: ' . $props[ 'colors' ][ 0 ] . '" title="' . esc_attr( $props[ 'name' ] ) . '">';
42
- echo '<i class="' . $props[ 'icon' ] . ' item_icon" ></i> ';
43
- echo '<span>' . $props[ 'name' ] . '</span>';
44
- echo '<i class="fa fa-times sic_action_btn sie_delete_btn" title="' . __( 'Delete icon', 'wpsr' ) . '"></i> ';
45
- echo '<i class="fa fa-cog sic_action_btn sie_settings_btn" title="' . __( 'Icon settings', 'wpsr' ) . '"></i> ';
46
  echo '</li>';
47
 
48
  }
@@ -52,10 +52,10 @@ class WPSR_Icons_Editor{
52
  echo '</div>';
53
 
54
  echo '<div class="sie_toolbar">';
55
- echo '<button class="button button-primary sie_open_picker_btn"><i class="fas fa-plus" title="Add icon"></i> ' . __( 'Add social icon', 'wpsr' ) . '</button>';
56
  echo '</div>';
57
 
58
- echo '<input type="hidden" name="' . $form_name . '" class="sie_selected_icons" value="' . $selected_icons . '"/>';
59
 
60
  echo '</div>';
61
 
@@ -74,7 +74,7 @@ class WPSR_Icons_Editor{
74
  <i class="fa fa-times sic_close_btn"></i>
75
  </header>';
76
  echo '<section></section>';
77
- echo '<footer><button class="button button-primary sie_save_settings_btn">' . __( 'Save icon settings', 'wpsr' ) . '</button></footer>';
78
  echo '</div>
79
  </div>';
80
 
@@ -88,12 +88,12 @@ class WPSR_Icons_Editor{
88
 
89
  echo '<section>';
90
  echo '<input type="search" class="widefat sip_filter" placeholder="Search icon"/>';
91
- echo '<p class="description">' . __( 'Note: Only services to which a link can be shared are listed below.', 'wpsr' ) . '</p>';
92
  echo '<ul class="sic_list sip_selector">';
93
 
94
  foreach( $social_icons as $id => $props ){
95
  $datas = array();
96
- array_push( $datas, 'data-id="' . $id . '"' );
97
 
98
  if( !in_array( 'for_share', $props[ 'features' ] ) ){
99
  continue;
@@ -113,12 +113,12 @@ class WPSR_Icons_Editor{
113
  }
114
 
115
  $datas = implode( ' ', $datas );
116
- echo '<li ' . $datas . ' style="background-color: ' . $props[ 'colors' ][ 0 ] . '" title="' . esc_attr( $props[ 'name' ] ) . '">';
117
- echo '<i class="' . $props[ 'icon' ] . ' item_icon" ></i> ';
118
- echo '<span>' . $props[ 'name' ] . '</span>';
119
- echo '<i class="fas fa-plus sic_action_btn sip_add_btn" title="' . __( 'Add icon', 'wpsr' ) . '"></i>';
120
- echo '<i class="fa fa-times sic_action_btn sie_delete_btn" title="' . __( 'Delete icon', 'wpsr' ) . '"></i> ';
121
- echo '<i class="fa fa-cog sic_action_btn sie_settings_btn" title="' . __( 'Icon settings', 'wpsr' ) . '"></i> ';
122
  echo '</li>';
123
  }
124
 
@@ -142,23 +142,23 @@ class WPSR_Icons_Editor{
142
  $all_icon_settings = array(
143
  'icon' => array(
144
  'type' => 'text',
145
- 'helper' => __( 'Custom icon', 'wpsr' ),
146
- 'placeholder' => __( 'Enter a custom icon URL for this site, starting with <code>http://</code>. You can also use class name of the icon font Example: <code>fa fa-star</code> Leave blank to use default icon', 'wpsr' )
147
  ),
148
  'text' => array(
149
  'type' => 'text',
150
- 'helper' => __( 'Text to show next to icon', 'wpsr' ),
151
- 'placeholder' => __( 'Enter custom text to appear to next to the icon. Leave blank to show no text.', 'wpsr' )
152
  ),
153
  'hover_text' => array(
154
  'type' => 'text',
155
- 'helper' => __( 'Text to show on hovering the icon', 'wpsr' ),
156
- 'placeholder' => __( 'Enter custom text to appear when the icon is hovered.', 'wpsr' )
157
  ),
158
  'html' => array(
159
  'type' => 'textarea',
160
- 'helper' => __( 'Custom HTML', 'wpsr' ),
161
- 'placeholder' => __( 'Enter custom HTML to occur. You can use the parameters <code>{url}</code> and <code>{title}</code> to replace them with the current page URL and title respectively. Shortcodes can also be used here.<br/><strong>Note:</strong> For any formatting issues, please use custom CSS to adjust the output as required.', 'wpsr' )
162
  )
163
  );
164
 
14
  echo '<ul class="sic_list sie_selected">';
15
 
16
  $si_selected = array();
17
+ $si_saved = WPSR_Lists::parse_template( $selected_icons );
18
 
19
  foreach( $si_saved as $icon ){
20
  $id = key( $icon );
21
+ $settings = $icon[ $id ];
22
  array_push( $si_selected, array( $id => $settings ) );
23
  }
24
 
31
 
32
  $datas = array();
33
  $props = $social_icons[ $id ];
34
+ array_push( $datas, 'data-id="' . esc_attr( $id ) . '"' );
35
 
36
  foreach( $settings as $ics_id => $ics_value ){
37
+ array_push( $datas, 'data-icns_' . esc_attr( $ics_id ) . '="' . esc_attr( $ics_value ) . '"' );
38
  }
39
 
40
  $datas = implode( ' ', $datas );
41
+ echo '<li ' . wp_kses( $datas, array() ) . ' style="background-color: ' . esc_attr( $props[ 'colors' ][ 0 ] ) . '" title="' . esc_attr( $props[ 'name' ] ) . '">';
42
+ echo '<i class="' . esc_attr( $props[ 'icon' ] ) . ' item_icon" ></i> ';
43
+ echo '<span>' . esc_html( $props[ 'name' ] ) . '</span>';
44
+ echo '<i class="fa fa-times sic_action_btn sie_delete_btn" title="' . esc_attr__( 'Delete icon', 'wp-socializer' ) . '"></i> ';
45
+ echo '<i class="fa fa-cog sic_action_btn sie_settings_btn" title="' . esc_attr__( 'Icon settings', 'wp-socializer' ) . '"></i> ';
46
  echo '</li>';
47
 
48
  }
52
  echo '</div>';
53
 
54
  echo '<div class="sie_toolbar">';
55
+ echo '<button class="button button-primary sie_open_picker_btn"><i class="fas fa-plus" title="Add icon"></i> ' . esc_html__( 'Add social icon', 'wp-socializer' ) . '</button>';
56
  echo '</div>';
57
 
58
+ echo '<input type="hidden" name="' . esc_attr( $form_name ) . '" class="sie_selected_icons" value="' . esc_attr( $selected_icons ) . '"/>';
59
 
60
  echo '</div>';
61
 
74
  <i class="fa fa-times sic_close_btn"></i>
75
  </header>';
76
  echo '<section></section>';
77
+ echo '<footer><button class="button button-primary sie_save_settings_btn">' . esc_html__( 'Save icon settings', 'wp-socializer' ) . '</button></footer>';
78
  echo '</div>
79
  </div>';
80
 
88
 
89
  echo '<section>';
90
  echo '<input type="search" class="widefat sip_filter" placeholder="Search icon"/>';
91
+ echo '<p class="description">' . esc_html__( 'Note: Only services to which a link can be shared are listed below.', 'wp-socializer' ) . '</p>';
92
  echo '<ul class="sic_list sip_selector">';
93
 
94
  foreach( $social_icons as $id => $props ){
95
  $datas = array();
96
+ array_push( $datas, 'data-id="' . esc_attr( $id ) . '"' );
97
 
98
  if( !in_array( 'for_share', $props[ 'features' ] ) ){
99
  continue;
113
  }
114
 
115
  $datas = implode( ' ', $datas );
116
+ echo '<li ' . wp_kses( $datas, array() ) . ' style="background-color: ' . esc_attr( $props[ 'colors' ][ 0 ] ) . '" title="' . esc_attr( $props[ 'name' ] ) . '">';
117
+ echo '<i class="' . esc_attr( $props[ 'icon' ] ) . ' item_icon" ></i> ';
118
+ echo '<span>' . esc_html( $props[ 'name' ] ) . '</span>';
119
+ echo '<i class="fas fa-plus sic_action_btn sip_add_btn" title="' . esc_attr__( 'Add icon', 'wp-socializer' ) . '"></i>';
120
+ echo '<i class="fa fa-times sic_action_btn sie_delete_btn" title="' . esc_attr__( 'Delete icon', 'wp-socializer' ) . '"></i> ';
121
+ echo '<i class="fa fa-cog sic_action_btn sie_settings_btn" title="' . esc_attr__( 'Icon settings', 'wp-socializer' ) . '"></i> ';
122
  echo '</li>';
123
  }
124
 
142
  $all_icon_settings = array(
143
  'icon' => array(
144
  'type' => 'text',
145
+ 'helper' => __( 'Custom icon', 'wp-socializer' ),
146
+ 'placeholder' => __( 'Enter a custom icon URL for this site, starting with <code>http://</code>. You can also use class name of the icon font Example: <code>fa fa-star</code> Leave blank to use default icon', 'wp-socializer' )
147
  ),
148
  'text' => array(
149
  'type' => 'text',
150
+ 'helper' => __( 'Text to show next to icon', 'wp-socializer' ),
151
+ 'placeholder' => __( 'Enter custom text to appear to next to the icon. Leave blank to show no text.', 'wp-socializer' )
152
  ),
153
  'hover_text' => array(
154
  'type' => 'text',
155
+ 'helper' => __( 'Text to show on hovering the icon', 'wp-socializer' ),
156
+ 'placeholder' => __( 'Enter custom text to appear when the icon is hovered.', 'wp-socializer' )
157
  ),
158
  'html' => array(
159
  'type' => 'textarea',
160
+ 'helper' => __( 'Custom HTML', 'wp-socializer' ),
161
+ 'placeholder' => __( 'Enter custom HTML to occur. You can use the parameters <code>{url}</code> and <code>{title}</code> to replace them with the current page URL and title respectively. Shortcodes can also be used here.<br/><strong>Note:</strong> For any formatting issues, please use custom CSS to adjust the output as required.', 'wp-socializer' )
162
  )
163
  );
164
 
admin/images/banners/facebook-widget.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" width="250" height="100" viewBox="0 0 66.145832 26.458334"><g><rect width="66.145836" height="26.458334" fill="#e6f3ff" stroke-width="2.74788" stroke-linejoin="round"/></g><g/><g transform="translate(0,-249.37498)"><g transform="translate(-2.817172,-0.19034617)"><g transform="translate(-1.0768462)"><g transform="translate(0,-0.08334101)"><rect y="258.6445" x="17.328281" height="8.4666662" width="8.4666662" ry="4.2333331" fill="#1977f3" stroke-width=".23472" stroke-linecap="round" stroke-linejoin="round"/><path d="m 22.544718,262.13265 h -0.669621 v -0.43917 c 0,-0.16487 0.109312,-0.20334 0.186304,-0.20334 0.07682,0 0.472545,0 0.472545,0 v -0.72504 l -0.65079,-0.003 c -0.722437,0 -0.886842,0.5408 -0.886842,0.88685 v 0.48331 h -0.417802 v 0.74715 h 0.417802 c 0,0.95884 0,2.11414 0,2.11414 h 0.878783 c 0,0 0,-1.16669 0,-2.11414 h 0.59298 z" fill="#fff" stroke-width=".0875895"/></g><rect ry=".39289305" y="262.40161" x="28.66321" height=".78578609" width="2.7857862" fill="#e1e1e1" stroke-width=".214214" stroke-linejoin="round"/><g transform="matrix(1.1488646,0,0,1.1488646,-5.0162137,-43.035767)"><g transform="translate(18.804315,2.6647451)"><g transform="translate(-0.26070196,0.70067699)"><g transform="matrix(0.86102719,0,0,0.86102719,4.476847,32.057087)"><rect width="21.870955" height="14.5202" x="13.564557" y="260.76822" ry=".47837946" fill="#fff" stroke="#1977f3" stroke-width=".243329" stroke-linecap="round" stroke-linejoin="round"/><path d="m 13.441758,263.45172 h 21.782465 v 0.13364 -0.0668" fill="none" stroke="#3e5b98" stroke-width=".264583"/><path d="m 13.592096,261.1769 c 0.124351,-0.20316 0.293379,-0.29482 0.668174,-0.39788 h 10.30658 l 10.473626,0.0256 0.400903,0.40302 0.116931,3.06264 H 24.566851 13.575392 Z" fill="#1977f3" stroke-width=".0815901" stroke-linecap="round" stroke-linejoin="round"/><rect ry="0" y="266.58337" x="15.288326" height="1.3275393" width="12.289192" fill="#e1e1e1" stroke-width=".0747098" stroke-linecap="round" stroke-linejoin="round"/><rect ry="0" y="268.90109" x="15.290036" height=".713328" width="9.8323469" fill="#e1e1e1" stroke-width=".0489853" stroke-linecap="round" stroke-linejoin="round"/><rect ry="0" y="270.60788" x="15.307755" height=".713328" width="9.8323469" fill="#e1e1e1" stroke-width=".0489853" stroke-linecap="round" stroke-linejoin="round"/></g></g></g></g></g></g></g></svg>
 
admin/images/banners/floating-sharebar.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145831 26.458334"><g><rect width="7.302536" height="29.455061" x="9.6622086" y="2.2172925" ry="1.3942424" fill="#fff" stroke="#aaa" stroke-width=".0943827" stroke-linecap="round" stroke-linejoin="round"/><text style="line-height:3.23681px" x="11.368866" y="6.7070475" font-size="2.22357" font-family="sans-serif" letter-spacing="0" word-spacing="0" stroke-width=".151606"><tspan x="11.368866" y="6.7070475" style="-inkscape-font-specification:'Arial Bold'" font-weight="bold" font-size="3.43643" font-family="Arial">52</tspan></text><text style="line-height:2.20691px" x="10.450423" y="9.2824392" font-size="1.51606" font-family="sans-serif" letter-spacing="0" word-spacing="0" fill="#b8b8b8" stroke-width=".151606"><tspan x="10.450423" y="9.2824392" letter-spacing="-.109157">SHARES</tspan></text><g transform="matrix(0.57300257,0,0,0.57300257,4.5896392,-0.67832826)"><path d="m 11.358729,31.201099 v 1.887738 0.33383 3.214791 c -0.0097,0.07138 -0.01654,0.143949 -0.01654,0.218075 v 0.618051 c 0,0.883777 0.711474,1.595252 1.595251,1.595252 h 1.135848 c 0.111964,0 0.221259,-0.01185 0.326596,-0.03359 h 2.413288 0.626319 1.887223 v -1.887738 -0.45062 -3.608049 c 0,-1.045723 -0.841497,-1.887738 -1.887223,-1.887738 h -3.683496 -0.509529 z" fill="#1da1f2" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 17.342651,34.16554 c -0.146882,0.06531 -0.304957,0.109328 -0.470818,0.129037 0.169349,-0.101379 0.299198,-0.261971 0.360433,-0.453539 -0.158399,0.094 -0.333749,0.162209 -0.520535,0.199031 -0.149478,-0.15929 -0.362542,-0.25889 -0.598315,-0.25889 -0.45265,0 -0.819652,0.367001 -0.819652,0.819732 0,0.06416 0.0072,0.126688 0.02125,0.186793 -0.681285,-0.03427 -1.285359,-0.360516 -1.68967,-0.856477 -0.07056,0.121004 -0.110952,0.261809 -0.110952,0.412172 0,0.284361 0.144692,0.535303 0.36465,0.682262 -0.134311,-0.0046 -0.260754,-0.04121 -0.371302,-0.102596 -8e-5,0.0031 -8e-5,0.0069 -8e-5,0.0104 0,0.397093 0.282572,0.728326 0.657604,0.803758 -0.06878,0.01872 -0.141206,0.02873 -0.215984,0.02873 -0.05288,0 -0.104221,-0.0054 -0.154263,-0.01479 0.104382,0.325642 0.407068,0.562713 0.765716,0.569291 -0.280543,0.219873 -0.63392,0.350935 -1.018036,0.350935 -0.0661,0 -0.131391,-0.0039 -0.195545,-0.01155 0.362866,0.232697 0.793698,0.368303 1.256568,0.368303 1.507832,0 2.332269,-1.249025 2.332269,-2.332269 0,-0.03551 -7.13e-4,-0.07093 -0.0023,-0.10617 0.160101,-0.115335 0.299116,-0.259776 0.408934,-0.42418 z" fill="#fff" stroke-width=".0811055"/></g><g transform="matrix(0.57300257,0,0,0.57300257,4.6087059,-0.37511445)"><path d="m 11.325454,41.293426 v 1.887739 0.33383 3.214791 c -0.0097,0.07138 -0.01654,0.143949 -0.01654,0.218075 v 0.61805 c 0,0.883777 0.711474,1.595253 1.595251,1.595253 h 1.135848 c 0.111964,0 0.221258,-0.01185 0.326595,-0.03359 h 2.413289 0.626319 1.887223 v -1.887739 -0.45062 -3.608049 c 0,-1.045723 -0.841497,-1.887739 -1.887223,-1.887739 H 13.72272 13.21319 Z" fill="#cb2027" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 17.368577,45.144413 c 0,1.096206 -0.888167,1.984373 -1.984373,1.984373 -0.204838,0 -0.401676,-0.03121 -0.58731,-0.08882 0.08081,-0.132025 0.201637,-0.348065 0.246446,-0.520098 0.02401,-0.09282 0.123223,-0.472088 0.123223,-0.472088 0.06481,0.123222 0.253648,0.228043 0.454485,0.228043 0.598513,0 1.029794,-0.550504 1.029794,-1.234633 0,-0.655323 -0.5353,-1.145816 -1.22343,-1.145816 -0.856161,0 -1.311447,0.574509 -1.311447,1.201026 0,0.291255 0.155229,0.653724 0.402476,0.768945 0.0376,0.0176 0.05761,0.0096 0.06641,-0.02641 0.0064,-0.0272 0.04001,-0.162431 0.05521,-0.224843 0.0048,-0.02 0.0024,-0.0376 -0.0136,-0.05681 -0.08082,-0.100019 -0.146428,-0.282453 -0.146428,-0.452886 0,-0.437682 0.331262,-0.860961 0.896168,-0.860961 0.487292,0 0.828956,0.332062 0.828956,0.807351 0,0.536902 -0.271251,0.908971 -0.624117,0.908971 -0.194436,0 -0.340864,-0.16083 -0.293655,-0.358467 0.05601,-0.236045 0.164031,-0.490492 0.164031,-0.660924 0,-0.152029 -0.08162,-0.279253 -0.251248,-0.279253 -0.199237,0 -0.359268,0.205639 -0.359268,0.481691 0,0.176033 0.05921,0.294455 0.05921,0.294455 0,0 -0.196037,0.830557 -0.232044,0.985786 -0.04001,0.171232 -0.02401,0.412877 -0.0072,0.569707 -0.737738,-0.288854 -1.261037,-1.00739 -1.261037,-1.848348 0,-1.096206 0.888167,-1.984373 1.984373,-1.984373 1.096207,0 1.984374,0.888167 1.984374,1.984373 z" fill="#fff" stroke-width=".0080015"/></g><g transform="matrix(0.57300257,0,0,0.57300257,4.5321303,-0.37511445)"><path d="m 11.459093,19.917237 v 1.887739 0.33383 3.214791 c -0.0097,0.07138 -0.01654,0.143949 -0.01654,0.218075 v 0.61805 c 0,0.883777 0.711474,1.595253 1.595251,1.595253 h 1.135848 c 0.111964,0 0.221258,-0.01185 0.326595,-0.03359 h 2.413289 0.626319 1.887223 v -1.887739 -0.45062 -3.608049 c 0,-1.045723 -0.841498,-1.887739 -1.887223,-1.887739 h -3.683496 -0.50953 z" fill="#1977f3" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="M 16.330206,23.439423 H 15.72033 v -0.399992 c 0,-0.150216 0.09956,-0.18524 0.16968,-0.18524 0.06996,0 0.430385,0 0.430385,0 v -0.660376 l -0.592727,-0.0024 c -0.657983,0 -0.80772,0.492536 -0.80772,0.807728 v 0.440184 h -0.380525 v 0.680488 h 0.380525 c 0,0.873296 0,1.925519 0,1.925519 h 0.800382 c 0,0 0,-1.0626 0,-1.925519 h 0.540074 z" fill="#fff" stroke-width=".0797748"/></g><g transform="translate(0,-0.43296254)"><rect width="40.207054" height="3.8639438" x="20.78871" y="6.7749071" fill="#efefef" stroke-width=".33238" stroke-linecap="round" stroke-linejoin="round"/><rect width="34.893513" height="2.1166666" x="20.78871" y="14.155029" fill="#efefef" stroke-width=".229175" stroke-linecap="round" stroke-linejoin="round"/><rect width="23.743216" height="2.1166666" x="20.78871" y="19.56723" fill="#efefef" stroke-width=".189045" stroke-linecap="round" stroke-linejoin="round"/></g></g></svg>
 
admin/images/banners/follow-icons-widget.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66.145832 26.458334" height="100" width="250"><g><rect height="26.458334" width="66.145836" fill="#f5ffe3" stroke-width="2.74788" stroke-linejoin="round"/></g><g><rect ry="2.6458333" y="3.8742559" x="11.43378" height="18.709822" width="43.278275" fill="#fff" stroke="#d3f693" stroke-width=".26458333" stroke-linejoin="round"/><path d="M 7.6166032,9.864467 7.1603774,10.127869 6.8969754,9.6716435 C 6.8607554,9.6089086 6.7797999,9.5872195 6.7170679,9.6234378 L 6.4889554,9.7551387 c -0.062731,0.036218 -0.084426,0.1171711 -0.048206,0.1799068 l 0.263402,0.4562255 -0.4562257,0.263402 c -0.062731,0.03622 -0.084426,0.117171 -0.048206,0.179907 l 0.1317005,0.228112 c 0.03622,0.06273 0.117176,0.08442 0.1799073,0.04821 l 0.4562257,-0.263402 0.2634015,0.456225 c 0.03622,0.06273 0.117176,0.08442 0.1799073,0.04821 l 0.2281125,-0.1317 c 0.062731,-0.03622 0.084427,-0.117172 0.048206,-0.179908 L 7.4237794,10.584095 7.8800052,10.320693 c 0.062731,-0.03622 0.084426,-0.117171 0.048205,-0.179908 L 7.7965099,9.912673 C 7.7602899,9.8499381 7.6793344,9.8282491 7.6166032,9.864467 Z M 4.9627433,11.852898 C 5.4667302,11.561921 5.6393678,10.91763 5.3483913,10.413644 5.0574144,9.9096569 4.4131227,9.7370194 3.9091357,10.027996 c -0.5039869,0.290977 -0.6766244,0.935269 -0.3856475,1.439256 0.2909765,0.503986 0.9352681,0.676623 1.4392551,0.385646 z m 0.7704176,-0.140649 -0.1190466,0.06873 C 5.4978409,11.94506 5.345637,12.088061 5.1602953,12.195068 4.9749535,12.302075 4.775722,12.361976 4.5747752,12.381043 l -0.1190467,0.06873 c -0.5289361,0.305381 -0.7103116,0.98228 -0.4049296,1.511217 l 0.1712115,0.296547 c 0.109065,0.188907 0.3508146,0.253683 0.539721,0.144618 l 2.5092407,-1.448711 c 0.1889065,-0.109065 0.253683,-0.350814 0.144618,-0.539721 L 7.2443786,12.117178 C 6.9389966,11.588241 6.2620978,11.406867 5.7331609,11.712249 Z" fill="#d2f593" stroke-width=".00823133"/><path fill="#d2f593" d="m 63.417162,18.308187 -0.456226,-0.263402 0.263402,-0.456226 c 0.03622,-0.06273 0.01452,-0.143687 -0.04821,-0.179904 l -0.228113,-0.131701 c -0.06273,-0.03622 -0.143688,-0.01453 -0.179908,0.0482 l -0.263402,0.456225 -0.456226,-0.263402 c -0.06273,-0.03622 -0.143688,-0.01453 -0.179909,0.0482 l -0.1317,0.228112 c -0.03622,0.06273 -0.01452,0.143687 0.0482,0.179909 l 0.456226,0.263402 -0.263402,0.456225 c -0.03622,0.06273 -0.01452,0.143687 0.0482,0.17991 l 0.228112,0.1317 c 0.06273,0.03622 0.143688,0.01453 0.179909,-0.0482 l 0.263408,-0.456228 0.456226,0.263402 c 0.06273,0.03622 0.143688,0.01453 0.179905,-0.04821 l 0.131701,-0.228111 c 0.03622,-0.06273 0.01452,-0.143688 -0.0482,-0.179909 z M 60.3682,17.004092 c 0.503987,0.290977 1.148278,0.118341 1.439255,-0.385646 0.290977,-0.503987 0.11834,-1.148279 -0.385647,-1.439256 -0.503987,-0.290976 -1.148279,-0.118339 -1.439256,0.385648 -0.290977,0.503986 -0.118339,1.148277 0.385648,1.439254 z m 0.507015,0.596877 -0.119046,-0.06873 c -0.200234,-0.01865 -0.400179,-0.07897 -0.585521,-0.185975 -0.185342,-0.107007 -0.336833,-0.249596 -0.453819,-0.414087 l -0.119045,-0.06873 c -0.528936,-0.305382 -1.205835,-0.124007 -1.511217,0.40493 l -0.171212,0.296546 c -0.109066,0.188907 -0.04429,0.430656 0.144618,0.539721 l 2.509241,1.448711 c 0.188906,0.109065 0.430655,0.04429 0.539721,-0.144617 l 0.171209,-0.296547 c 0.305382,-0.528937 0.124008,-1.205835 -0.404929,-1.511217 z" stroke-width=".00823132"/></g><g transform="translate(0,-249.37498)"><g transform="translate(0.13363476,-3.4076865)"><g transform="translate(18.804315,2.6647451)"><g transform="translate(-0.26070196,0.70067699)"><rect y="261.29364" x="-.76233125" height="6.9610958" width="6.9610958" fill="#1977f3" stroke-width=".192981" stroke-linecap="round" stroke-linejoin="round"/><rect y="261.29364" x="7.0226383" height="6.9610958" width="6.9610958" fill="#1da1f2" stroke-width=".192981" stroke-linecap="round" stroke-linejoin="round"/><rect y="261.29364" x="14.807609" height="6.9610958" width="6.9610958" fill="#cb2027" stroke-width=".192981" stroke-linecap="round" stroke-linejoin="round"/><rect y="261.29364" x="22.592573" height="6.9610958" width="6.9610958" stroke-width=".192981" stroke-linecap="round" stroke-linejoin="round"/><path d="m 3.4978759,264.49262 h -0.505132 v -0.33129 c 0,-0.12437 0.08246,-0.15339 0.140539,-0.15339 0.05795,0 0.356467,0 0.356467,0 V 263.461 l -0.490927,-0.002 c -0.544974,0 -0.668994,0.40796 -0.668994,0.669 v 0.36459 h -0.315171 v 0.56362 h 0.315171 c 0,0.7233 0,1.59481 0,1.59481 h 0.662915 c 0,0 0,-0.8801 0,-1.59481 h 0.447317 z" fill="#fff" stroke-width=".0660735"/><path d="m 12.110213,264.12525 c -0.113986,0.0505 -0.236647,0.0849 -0.365357,0.10009 0.131427,-0.0786 0.232179,-0.2033 0.279699,-0.35195 -0.122919,0.073 -0.258991,0.12583 -0.403941,0.15452 -0.115991,-0.12355 -0.281335,-0.2009 -0.464298,-0.2009 -0.351259,0 -0.636057,0.2848 -0.636057,0.63611 0,0.0499 0.0055,0.0983 0.01648,0.14491 -0.528685,-0.0266 -0.9974508,-0.27977 -1.3112008,-0.66463 -0.05475,0.0939 -0.0861,0.20316 -0.0861,0.31985 0,0.22065 0.112291,0.41539 0.282972,0.52944 -0.104238,-0.005 -0.202347,-0.0319 -0.288135,-0.0795 -6.2e-5,0.002 -6.2e-5,0.005 -6.2e-5,0.008 0,0.30813 0.219279,0.56517 0.510308,0.62372 -0.05337,0.0147 -0.109569,0.0223 -0.167605,0.0223 -0.04103,0 -0.08088,-0.003 -0.119708,-0.0114 0.08101,0.2527 0.31589,0.43668 0.594203,0.44176 -0.217704,0.17065 -0.491926,0.27234 -0.790005,0.27234 -0.0513,0 -0.101957,-0.003 -0.151737,-0.01 0.281588,0.18058 0.615918,0.28581 0.975109,0.28581 1.1700908,0 1.8098618,-0.96925 1.8098618,-1.80988 0,-0.0275 -5.41e-4,-0.0551 -0.0016,-0.0823 0.124239,-0.0895 0.232119,-0.20158 0.317337,-0.32916 z" fill="#fff" stroke-width=".0629387"/><path d="m 26.400268,265.29584 c -0.255664,0 -1.57286,-0.98062 -1.57286,-0.98062 v -0.10775 c 0,-0.13333 0.117295,-0.24184 0.262078,-0.24184 h 2.621565 c 0.144924,0 0.262206,0.10839 0.262206,0.24184 l -0.002,0.12095 c 0,0 -1.302929,0.96745 -1.570898,0.96745 z m 0,0.33257 c 0.280274,0 1.570897,-0.93722 1.570897,-0.93722 l 0.002,1.45119 c 0,0.13334 -0.117295,0.24186 -0.262208,0.24186 h -2.621578 c -0.144647,0 -0.262077,-0.10839 -0.262077,-0.24186 l 0.002,-1.45119 c -1.3e-4,0 1.315101,0.93722 1.570765,0.93722 z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd" stroke-width=".125821"/><path d="m 20.0955,265.00612 c 0,0.85453 -0.692367,1.54691 -1.546909,1.54691 -0.159675,0 -0.313125,-0.0243 -0.457835,-0.0693 0.063,-0.10285 0.157181,-0.27134 0.192115,-0.40544 0.01871,-0.0724 0.09606,-0.36801 0.09606,-0.36801 0.05053,0.096 0.197731,0.17775 0.354291,0.17775 0.466569,0 0.802772,-0.42913 0.802772,-0.96245 0,-0.51086 -0.417291,-0.89321 -0.95372,-0.89321 -0.667416,0 -1.022331,0.44786 -1.022331,0.93626 0,0.22704 0.120995,0.5096 0.313748,0.59942 0.02932,0.0147 0.04492,0.008 0.05177,-0.0205 0.0051,-0.0212 0.03118,-0.12665 0.04303,-0.17527 0.0037,-0.0163 0.0018,-0.0292 -0.01059,-0.0443 -0.06302,-0.0779 -0.114149,-0.22018 -0.114149,-0.35304 0,-0.34119 0.258233,-0.67117 0.698603,-0.67117 0.379865,0 0.646209,0.25887 0.646209,0.62937 0,0.41854 -0.211452,0.7086 -0.486528,0.7086 -0.151574,0 -0.265718,-0.12535 -0.228916,-0.27947 0.04365,-0.18399 0.127874,-0.38234 0.127874,-0.51519 0,-0.1185 -0.06364,-0.2177 -0.19586,-0.2177 -0.155323,0 -0.280067,0.16023 -0.280067,0.3755 0,0.13725 0.04616,0.22954 0.04616,0.22954 0,0 -0.152813,0.64745 -0.180888,0.76848 -0.03118,0.1335 -0.01871,0.32184 -0.0055,0.44409 -0.575101,-0.22517 -0.983035,-0.7853 -0.983035,-1.44085 0,-0.85455 0.692366,-1.54693 1.546908,-1.54693 0.854544,0 1.546911,0.69238 1.546911,1.54693 z" fill="#fff" stroke-width=".00623753"/><text y="259.18231" x="-.99702764" style="line-height:5.64885px" font-size="2.82222" font-family="sans-serif" letter-spacing="0" word-spacing="0" stroke-width=".264583"><tspan y="259.18231" x="-.99702764">Follow me</tspan></text></g></g></g></g></svg>
 
admin/images/banners/follow-icons.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145831 26.458334"><defs><linearGradient gradientTransform="matrix(0.40787959,0,0,0.40787959,222.89883,60.054912)" gradientUnits="userSpaceOnUse" y2="136.7173" x2="103.37641" y1="202.65385" x1="103.37641" id="b" xlink:href="#a"/><linearGradient id="a"><stop offset="0" stop-color="#fea"/><stop offset="1" stop-color="#fff"/><stop offset="1" stop-color="#fff"/></linearGradient></defs><g><g transform="matrix(0.52889495,0,0,0.52889495,20.111462,-537.22485)"><g transform="matrix(1.8907346,0,0,1.8907346,-72.523505,515.64983)"><g transform="matrix(0.17124911,0,0,0.17124911,-1.8015174,256.22838)"><g transform="translate(1.5332369,1.2635392e-4)"><g transform="matrix(3.0884537,0,0,3.0884537,238.504,-3087.4737)"><g transform="matrix(1.0014274,0,0,1.0014274,8.9638086,1015.6704)"/><g transform="translate(-98.086079,-6.0745477)"/></g><g transform="translate(-3.0900424)"><circle transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" cx="29.826674" cy="9.6100454" r="6.283854" fill="#1977f3" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><circle transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" cx="30.062912" cy="24.606249" r="6.283854" fill="#1da1f2" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><circle transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" cx="29.779428" cy="39.6497" r="6.283854" fill="#cb2027" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" d="M 31.177932,8.987794 H 30.302656 V 8.4137374 c 0,-0.2155857 0.142882,-0.2658511 0.24352,-0.2658511 0.100404,0 0.617675,0 0.617675,0 V 7.2001345 l -0.850663,-0.00344 c -0.944319,0 -1.159217,0.706873 -1.159217,1.1592271 v 0.631739 h -0.546119 v 0.9766166 h 0.546119 c 0,1.2533288 0,2.7634498 0,2.7634498 h 1.148685 c 0,0 0,-1.525013 0,-2.7634498 h 0.775099 z" fill="#fff" stroke-width=".11449"/><path transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" d="m 33.029869,23.135836 c -0.19071,0.0848 -0.395953,0.14195 -0.611304,0.16754 0.21988,-0.13163 0.388475,-0.34014 0.467981,-0.58887 -0.205663,0.12205 -0.433335,0.21061 -0.675856,0.25842 -0.19408,-0.20682 -0.47072,-0.33614 -0.776845,-0.33614 -0.587715,0 -1.064226,0.47651 -1.064226,1.06433 0,0.0833 0.0094,0.16449 0.02759,0.24253 -0.884573,-0.0445 -1.668895,-0.46809 -2.193847,-1.11204 -0.09162,0.15711 -0.144059,0.33993 -0.144059,0.53516 0,0.36921 0.187866,0.69503 0.473457,0.88584 -0.174388,-0.006 -0.33856,-0.0535 -0.482093,-0.13321 -1.05e-4,0.004 -1.05e-4,0.009 -1.05e-4,0.0135 0,0.51558 0.366888,0.94565 0.853825,1.04359 -0.0893,0.0243 -0.183339,0.0373 -0.280431,0.0373 -0.06866,0 -0.135319,-0.007 -0.200293,-0.0192 0.135529,0.42281 0.528533,0.73062 0.994197,0.73916 -0.364254,0.28548 -0.823074,0.45565 -1.321806,0.45565 -0.08582,0 -0.170596,-0.005 -0.253893,-0.015 0.471141,0.30213 1.030528,0.4782 1.631512,0.4782 1.957751,0 3.02819,-1.62172 3.02819,-3.02819 0,-0.0461 -9.26e-4,-0.0921 -0.003,-0.13785 0.207874,-0.14975 0.388369,-0.33729 0.530955,-0.55075 z" fill="#fff" stroke-width=".105306"/><path transform="matrix(3.0928621,0,0,3.0928621,266.18831,49.377305)" d="m 32.481959,40.008779 c 0,1.461609 -1.184224,2.645833 -2.645833,2.645833 -0.273118,0 -0.535568,-0.04161 -0.783081,-0.118423 0.107753,-0.176033 0.26885,-0.464087 0.328595,-0.693464 0.03201,-0.123757 0.164298,-0.629452 0.164298,-0.629452 0.08642,0.164297 0.338197,0.304058 0.605981,0.304058 0.798017,0 1.373059,-0.734006 1.373059,-1.646178 0,-0.873765 -0.713734,-1.527756 -1.631241,-1.527756 -1.141549,0 -1.748597,0.766012 -1.748597,1.601369 0,0.38834 0.206972,0.871632 0.536634,1.025261 0.05014,0.02347 0.07681,0.0128 0.08855,-0.03521 0.0085,-0.03627 0.05334,-0.216574 0.07361,-0.29979 0.0064,-0.02667 0.0032,-0.05014 -0.01814,-0.07575 -0.107754,-0.133359 -0.195237,-0.376605 -0.195237,-0.603848 0,-0.583577 0.441683,-1.14795 1.194892,-1.14795 0.649723,0 1.105276,0.44275 1.105276,1.07647 0,0.715869 -0.361669,1.211962 -0.832157,1.211962 -0.259249,0 -0.454486,-0.21444 -0.391541,-0.477957 0.07468,-0.314726 0.218708,-0.65399 0.218708,-0.881233 0,-0.202705 -0.108821,-0.372337 -0.334997,-0.372337 -0.26565,0 -0.479024,0.274185 -0.479024,0.642255 0,0.234711 0.07895,0.392607 0.07895,0.392607 0,0 -0.261383,1.10741 -0.309392,1.314382 -0.05334,0.22831 -0.03201,0.550504 -0.0096,0.75961 -0.983652,-0.385139 -1.681384,-1.343187 -1.681384,-2.464465 0,-1.46161 1.184224,-2.645834 2.645833,-2.645834 1.46161,0 2.645834,1.184224 2.645834,2.645834 z" fill="#fff" stroke-width=".0106687"/><g transform="matrix(3.0884537,0,0,3.0884537,238.504,-3087.4736)"><rect width=".35240957" height="3.8542066" x="24.022905" y="1037.0552" ry=".34485009" fill="#d8d9d9" stroke="#d8d9d9" stroke-width="1.14836" stroke-linejoin="round"/><rect width="3.7135348" height=".21173811" x="22.38773" y="1039.0204" ry=".10586905" fill="#d8d9d9" stroke="#d8d9d9" stroke-width="1.28903" stroke-linejoin="round"/></g><path d="m 265.06397,99.794091 a 10.02097,10.175139 0 0 0 -10.02101,10.175079 10.02097,10.175139 0 0 0 1.80363,5.80292 c -12.83373,6.15447 -10.74544,28.34559 -10.74544,28.34559 l 39.23604,-0.15429 c 0,0 1.57538,-21.56084 -12.20698,-27.97567 a 10.02097,10.175139 0 0 0 1.95476,-6.01855 10.02097,10.175139 0 0 0 -10.021,-10.175079 z" fill="url(#b)" stroke="#ffb200" stroke-width="2.15836" stroke-linecap="round" stroke-linejoin="round"/></g></g></g></g></g></g></svg>
 
admin/images/banners/import-export.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 66.145832 26.458334" height="100" width="250"><defs><linearGradient id="a"><stop offset="0" stop-color="#ff7b00"/><stop offset="1" stop-color="#ffbf00" stop-opacity="0"/></linearGradient><linearGradient gradientTransform="matrix(1.3016428,0,0,1.3016428,-11.538954,-4.7165963)" gradientUnits="userSpaceOnUse" y2="8.8477116" x2="35.979694" y1="28" x1="16" id="b" xlink:href="#a"/></defs><g><rect width="66.145836" height="26.458334" fill="#fff0e0" stroke-width="2.25865" stroke-linejoin="round"/><g transform="matrix(0.26458333,0,0,0.26458333,27.8605,6.2116679)"><path d="M 11.890616,3.0932604 1.477474,13.480369 H 9.2873311 V 31.729401 H 14.493902 V 13.480369 h 7.809856 z M 30.113615,39.565291 V 21.316259 H 24.907044 V 39.565291 H 17.097187 L 27.51033,49.9524 37.923472,39.565291 Z" fill="url(#b)" stroke-width="1.30164"/><path d="M 0,0 H 48 V 48 H 0 Z" fill="none"/></g></g><g/></svg>
 
admin/images/banners/settings.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145832 26.458334"><defs><linearGradient id="a"><stop offset="0" stop-color="#ff9a00"/><stop offset="1" stop-color="#ffde00" stop-opacity="0"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" y2="12.594259" x2="40.057613" y1="23.996321" x1="21.299368" id="b" xlink:href="#a"/></defs><g><rect height="26.458334" width="66.145836" fill="#fff0e0" stroke-width="2.25865" stroke-linejoin="round"/><g transform="matrix(0.26458333,0,0,0.26458333,27.8605,6.2116679)"><path fill="none" d="M 0,0 H 48 V 48 H 0 Z"/><path fill="url(#b)" d="m 39.189559,31.329263 -3.588722,-1.983862 c 0.362242,-1.870961 0.362242,-3.790309 0,-5.66127 l 3.588722,-1.983865 c 0.412787,-0.225804 0.59812,-0.693544 0.463333,-1.129028 -0.93509,-2.870955 -2.527269,-5.467721 -4.608054,-7.629002 -0.32012,-0.330645 -0.842423,-0.41129 -1.246786,-0.185483 l -3.588721,1.983863 c -1.507937,-1.24193 -3.243328,-2.201605 -5.121932,-2.830634 V 7.9503199 c 0,-0.451612 -0.328544,-0.846772 -0.791877,-0.943545 -3.091692,-0.661288 -6.259204,-0.629029 -9.199254,0 -0.46334,0.09677 -0.79188,0.491933 -0.79188,0.943545 v 3.9677271 c -1.87018,0.637093 -3.60557,1.596767 -5.1219297,2.830634 l -3.5803,-1.983865 c -0.41279,-0.225805 -0.92667,-0.153225 -1.24679,0.185484 -2.0807801,2.153217 -3.67296007,4.749983 -4.60805007,7.629004 -0.14321,0.435483 0.0506,0.903223 0.46333,1.129027 l 3.58872007,1.983865 c -0.36224,1.870959 -0.36224,3.790307 0,5.661268 l -3.58872007,1.983864 c -0.41278,0.225805 -0.59812,0.693547 -0.46333,1.129028 0.93509,2.870957 2.52726997,5.467721 4.60805007,7.629004 0.32012,0.330643 0.84243,0.411288 1.24679,0.185483 l 3.58872,-1.983864 c 1.5079397,1.241931 3.2433297,2.201606 5.1219297,2.830636 v 3.967727 c 0,0.451611 0.32855,0.846771 0.79188,0.943544 3.09169,0.661288 6.259202,0.62903 9.199258,0 0.463333,-0.09677 0.791878,-0.491933 0.791878,-0.943544 v -3.967727 c 1.870179,-0.637095 3.60557,-1.596768 5.121931,-2.830636 l 3.588721,1.983864 c 0.412788,0.225805 0.926666,0.153225 1.246786,-0.185483 2.080785,-2.153217 3.672964,-4.749981 4.608054,-7.629004 0.126363,-0.443546 -0.05897,-0.911286 -0.471757,-1.137093 z m -19.493671,1.637091 c -3.71508,0 -6.73938,-2.89515 -6.73938,-6.451589 0,-3.556437 3.0243,-6.451588 6.73938,-6.451588 3.71509,0 6.739388,2.895151 6.739388,6.451588 0,3.556439 -3.024298,6.451589 -6.739388,6.451589 z" stroke-width=".0824237"/></g></g><g/></svg>
 
admin/images/banners/share-icons.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145831 26.458334"><g><g><g transform="translate(0,-1.0583333)"><g transform="matrix(0.75954056,0,0,0.75954056,7.4789999,3.3810534)"><g transform="translate(7.2949405,-27.403276)"><g transform="matrix(0.80000002,0,0,0.80000002,-12.794494,28.068511)"><circle r="6.283854" cy="11.216444" cx="27.261532" fill="#1977f3" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 28.714757,10.665253 h -0.910002 v -0.596832 c 0,-0.2241387 0.148551,-0.2763983 0.253181,-0.2763983 0.104388,0 0.642182,0 0.642182,0 V 8.80667 L 27.815705,8.80309 c -0.981783,0 -1.205207,0.7349174 -1.205207,1.205218 v 0.656802 h -0.567786 v 1.015363 h 0.567786 c 0,1.303053 0,2.873087 0,2.873087 h 1.194257 c 0,0 0,-1.585516 0,-2.873087 h 0.80585 z" fill="#fff" stroke-width=".119033"/></g><g transform="matrix(0.80000002,0,0,0.80000002,-1.2945684,16.071547)"><circle r="6.283854" cy="26.212648" cx="27.49777" fill="#1da1f2" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 30.464729,24.742235 c -0.19071,0.0848 -0.395953,0.14195 -0.611304,0.16754 0.21988,-0.13163 0.388475,-0.34014 0.467981,-0.58887 -0.205663,0.12205 -0.433335,0.21061 -0.675856,0.25842 -0.19408,-0.20682 -0.47072,-0.33614 -0.776845,-0.33614 -0.587715,0 -1.064226,0.47651 -1.064226,1.06433 0,0.0833 0.0094,0.16449 0.02759,0.24253 -0.884573,-0.0445 -1.668895,-0.46809 -2.193847,-1.11204 -0.09162,0.15711 -0.144059,0.33993 -0.144059,0.53516 0,0.36921 0.187866,0.69503 0.473457,0.88584 -0.174388,-0.006 -0.33856,-0.0535 -0.482093,-0.13321 -1.05e-4,0.004 -1.05e-4,0.009 -1.05e-4,0.0135 0,0.51558 0.366888,0.94565 0.853825,1.04359 -0.0893,0.0243 -0.183339,0.0373 -0.280431,0.0373 -0.06866,0 -0.135319,-0.007 -0.200293,-0.0192 0.135529,0.42281 0.528533,0.73062 0.994197,0.73916 -0.364254,0.28548 -0.823074,0.45565 -1.321806,0.45565 -0.08582,0 -0.170596,-0.005 -0.253893,-0.015 0.471141,0.30213 1.030528,0.4782 1.631512,0.4782 1.957751,0 3.02819,-1.62172 3.02819,-3.02819 0,-0.0461 -9.26e-4,-0.0921 -0.003,-0.13785 0.207874,-0.14975 0.388369,-0.33729 0.530955,-0.55075 z" fill="#fff" stroke-width=".105306"/></g><g transform="matrix(0.80000002,0,0,0.80000002,10.479387,4.0367859)"><circle r="6.283854" cy="41.2561" cx="27.214287" fill="#cb2027" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 29.916819,41.615178 c 0,1.461609 -1.184224,2.645833 -2.645833,2.645833 -0.273118,0 -0.535568,-0.04161 -0.783081,-0.118423 0.107753,-0.176033 0.26885,-0.464087 0.328595,-0.693464 0.03201,-0.123757 0.164298,-0.629452 0.164298,-0.629452 0.08642,0.164297 0.338197,0.304058 0.605981,0.304058 0.798017,0 1.373059,-0.734006 1.373059,-1.646178 0,-0.873765 -0.713734,-1.527756 -1.631241,-1.527756 -1.141549,0 -1.748597,0.766012 -1.748597,1.601369 0,0.38834 0.206972,0.871632 0.536634,1.025261 0.05014,0.02347 0.07681,0.0128 0.08855,-0.03521 0.0085,-0.03627 0.05334,-0.216574 0.07361,-0.29979 0.0064,-0.02667 0.0032,-0.05014 -0.01814,-0.07575 -0.107754,-0.133359 -0.195237,-0.376605 -0.195237,-0.603848 0,-0.583577 0.441683,-1.14795 1.194892,-1.14795 0.649723,0 1.105276,0.44275 1.105276,1.07647 0,0.715869 -0.361669,1.211962 -0.832157,1.211962 -0.259249,0 -0.454486,-0.21444 -0.391541,-0.477957 0.07468,-0.314726 0.218708,-0.65399 0.218708,-0.881233 0,-0.202705 -0.108821,-0.372337 -0.334997,-0.372337 -0.26565,0 -0.479024,0.274185 -0.479024,0.642255 0,0.234711 0.07895,0.392607 0.07895,0.392607 0,0 -0.261383,1.10741 -0.309392,1.314382 -0.05334,0.22831 -0.03201,0.550504 -0.0096,0.75961 -0.983652,-0.385139 -1.681384,-1.343187 -1.681384,-2.464465 0,-1.46161 1.184224,-2.645834 2.645833,-2.645834 1.46161,0 2.645834,1.184224 2.645834,2.645834 z" fill="#fff" stroke-width=".0106687"/></g><g transform="translate(-1.5875,7.1059523)"><g transform="matrix(0.80000002,0,0,0.80000002,23.60461,-3.0691664)"><circle cx="27.214287" cy="41.2561" r="6.283854" fill="#60b82d" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0.05879629,0,0,0.05879629,24.975961,38.557113)" fill="#fffdfd"><g><path d="M 90,43.8 C 90,68 70.2,87.6 45.8,87.6 c -7.7,0 -15,-2 -21.4,-5.5 L 0,90 8,66.5 C 4,59.9 1.7,52.1 1.7,43.9 1.6,19.6 21.4,0 45.8,0 70.2,0 90,19.6 90,43.8 Z M 45.8,7 C 25.3,7 8.7,23.5 8.7,43.8 c 0,8.1 2.6,15.5 7.1,21.6 l -4.6,13.7 14.3,-4.5 c 5.9,3.9 12.9,6.1 20.4,6.1 C 66.3,80.7 83,64.2 83,43.8 83,23.4 66.3,7 45.8,7 Z m 22.3,46.9 c -0.3,-0.4 -1,-0.7 -2.1,-1.3 -1.1,-0.5 -6.4,-3.1 -7.4,-3.5 -1,-0.4 -1.7,-0.5 -2.4,0.5 -0.7,1.1 -2.8,3.5 -3.4,4.2 -0.6,0.7 -1.3,0.8 -2.3,0.3 -1.1,-0.5 -4.6,-1.7 -8.7,-5.3 -3.2,-2.8 -5.4,-6.4 -6,-7.4 -0.6,-1.1 -0.1,-1.7 0.5,-2.2 0.5,-0.5 1.1,-1.3 1.6,-1.9 0.5,-0.6 0.7,-1.1 1.1,-1.8 0.4,-0.7 0.2,-1.3 -0.1,-1.9 -0.3,-0.5 -2.4,-5.8 -3.3,-8 -0.9,-2.1 -1.8,-1.8 -2.4,-1.8 -0.6,0 -1.4,-0.1 -2.1,-0.1 -0.7,0 -1.9,0.3 -2.9,1.3 -1,1.1 -3.8,3.7 -3.8,9 0,5.3 3.9,10.4 4.4,11.1 0.5,0.7 7.5,11.9 18.5,16.2 11,4.3 11,2.9 13,2.7 2,-0.2 6.4,-2.6 7.3,-5.1 0.8,-2.4 0.8,-4.5 0.5,-5 z"/></g></g></g></g></g><circle r="2.5557649" cy="4.929359" cx="19.205139" fill="#ff0e00" stroke-width=".264583" stroke-linejoin="round"/><text y="6.1821856" x="18.119358" style="line-height:1.25" font-size="7.76111" font-family="sans-serif" letter-spacing="0" word-spacing="0" fill="#fff" stroke-width=".264583"><tspan y="6.1821856" x="18.119358" font-size="3.52778">5</tspan></text><g transform="matrix(1.1851851,0,0,1.1851851,7.1514505,-19.796147)"><rect width="7.1437507" height="7.1437507" x="4.3467236" y="31.787796" fill="#0274b3" stroke-width=".198045" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0.19020233,0,0,0.19020233,5.7092139,33.137945)" fill="#fff"><g><path d="m 5.366,2.973 c 0,1.376 -1.035,2.479 -2.699,2.479 H 2.636 C 1.034,5.453 0,4.348 0,2.973 0,1.564 1.067,0.491 2.698,0.491 4.331,0.49 5.336,1.564 5.366,2.973 Z M 0.28,21.766 H 5.052 V 7.413 H 0.28 Z M 16.764,7.077 c -2.531,0 -3.664,1.39 -4.301,2.37 v 0.046 h -0.031 c 0.012,-0.014 0.023,-0.03 0.031,-0.046 V 7.414 H 7.692 c 0.062,1.345 0,14.353 0,14.353 h 4.771 v -8.016 c 0,-0.432 0.029,-0.855 0.157,-1.164 0.346,-0.854 1.132,-1.747 2.446,-1.747 1.729,0 2.42,1.319 2.42,3.247 v 7.68 h 4.771 V 13.538 C 22.258,9.126 19.902,7.077 16.764,7.077 Z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></g></g><g transform="matrix(1.1851851,0,0,1.1851851,10.326448,-19.796147)"><rect width="7.1437507" height="7.1437507" x="11.490477" y="31.787796" fill="#ef4056" stroke-width=".198045" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0.00826823,0,0,0.00826823,12.897852,33.520265)" fill="#fffbfb"><g><g><path d="M 480,32 H 32 C 14.368,32 0,46.368 0,64 v 176 c 0,132.352 107.648,240 240,240 h 32 C 404.352,480 512,372.352 512,240 V 64 C 512,46.368 497.664,32 480,32 Z m -73.376,182.624 -128,128 C 272.384,348.864 264.192,352 256,352 c -8.192,0 -16.384,-3.136 -22.624,-9.376 l -128,-128 c -12.512,-12.512 -12.512,-32.736 0,-45.248 12.512,-12.512 32.736,-12.512 45.248,0 L 256,274.752 361.376,169.376 c 12.512,-12.512 32.736,-12.512 45.248,0 12.512,12.512 12.512,32.736 0,45.248 z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></g></g><path d="m 47.384593,18.181847 v 1.887739 0.33383 3.214791 c -0.0097,0.07138 -0.01654,0.143949 -0.01654,0.218075 v 0.61805 c 0,0.883777 0.711474,1.595253 1.595251,1.595253 h 1.135848 c 0.111964,0 0.221258,-0.01185 0.326595,-0.03359 h 2.413289 0.626319 1.887223 v -1.887739 -0.45062 -3.608049 c 0,-1.045723 -0.841498,-1.887739 -1.887223,-1.887739 h -3.683496 -0.50953 z" fill="#e61b2e" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0.00803905,0,0,0.00803905,36.785334,20.198548)" fill="#f9ffed"><g><g><path d="M 329.956,399.834 H 182.044 c -9.425,0 -17.067,7.641 -17.067,17.067 0,9.426 7.641,17.067 17.067,17.067 h 147.911 c 9.425,0 17.067,-7.641 17.067,-17.067 0,-9.426 -7.641,-17.067 -17.066,-17.067 z"/></g></g><g><g><path d="M 329.956,346.006 H 182.044 c -9.425,0 -17.067,7.641 -17.067,17.067 0,9.426 7.641,17.067 17.067,17.067 h 147.911 c 9.425,0 17.067,-7.641 17.067,-17.067 0,-9.426 -7.641,-17.067 -17.066,-17.067 z"/></g></g><g><g><g transform="translate(131.64905)"><path transform="matrix(124.39281,0,0,124.39281,-3670.7438,-4759.9914)" d="m 27.257814,35.832563 v 2.001728 0.353988 3.408914 c -0.01029,0.07569 -0.01754,0.152642 -0.01754,0.231244 v 0.655371 c 0,0.937144 0.754436,1.691581 1.691581,1.691581 h 1.204435 c 0.118724,0 0.234619,-0.01257 0.346316,-0.03562 h 2.559014 0.66414 2.001181 v -2.00173 -0.47783 -3.825919 c 0,-1.108869 -0.892311,-2.001728 -2.001181,-2.001728 h -3.90592 -0.540297 z" fill="#6d9f00" stroke-width=".28056" stroke-linecap="round" stroke-linejoin="round"/><path d="M 472.178,133.907 H 417.875 V 35.132 c 0,-9.425 -7.641,-17.067 -17.067,-17.067 H 111.192 c -9.425,0 -17.067,7.641 -17.067,17.067 v 98.775 H 39.822 C 17.864,133.907 0,151.772 0,173.73 v 171.702 c 0,21.958 17.864,39.822 39.822,39.822 h 54.306 v 91.614 c 0,9.425 7.641,17.067 17.067,17.067 h 289.61 c 9.425,0 17.067,-7.641 17.067,-17.067 v -91.614 h 54.306 C 494.136,385.254 512,367.39 512,345.432 V 173.73 c 0,-21.957 -17.864,-39.823 -39.822,-39.823 z M 128.258,52.199 h 255.483 v 81.708 H 128.258 Z m 255.48,407.602 H 128.262 c 0,-3.335 0,-135.503 0,-139.628 h 255.477 c -10e-4,4.229 -10e-4,136.421 -10e-4,139.628 z m 17.07,-225.679 h -43.443 c -9.425,0 -17.067,-7.641 -17.067,-17.067 0,-9.426 7.641,-17.067 17.067,-17.067 h 43.443 c 9.425,0 17.067,7.641 17.067,17.067 0,9.426 -7.641,17.067 -17.067,17.067 z"/></g></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></g><path d="m 51.606158,22.08464 c -0.0397,-0.127033 -0.03891,-0.372365 -0.01588,-0.372365 0.0667,0 0.06035,0.292969 0.01588,0.372365 z m -0.01349,0.374746 c -0.06114,0.160378 -0.137354,0.343782 -0.225483,0.497808 0.145293,-0.05557 0.309641,-0.136559 0.499396,-0.173875 -0.100832,-0.07622 -0.197694,-0.185786 -0.273913,-0.323933 z m -0.747111,0.990852 c 0,0.0064 0.104798,-0.04287 0.277091,-0.319166 -0.0532,0.05003 -0.231041,0.194517 -0.277091,0.319166 z m 1.285411,-2.128588 h 1.079777 v 2.604169 c 0,0.105595 -0.08495,0.190548 -0.190548,0.190548 h -2.667691 c -0.105595,0 -0.190548,-0.08495 -0.190548,-0.190548 v -3.683946 c 0,-0.105595 0.08495,-0.190548 0.190548,-0.190548 h 1.587909 v 1.079776 c 0,0.104798 0.08575,0.190549 0.190548,0.190549 z m -0.06352,1.364012 c -0.158792,-0.09687 -0.264387,-0.230247 -0.339019,-0.427147 0.03573,-0.146881 0.0921,-0.369982 0.04923,-0.509718 -0.03732,-0.233422 -0.336637,-0.210398 -0.37951,-0.05399 -0.0397,0.145293 -0.0032,0.350132 0.06431,0.611343 -0.0921,0.219133 -0.227864,0.512894 -0.323934,0.681213 -7.91e-4,0 -7.91e-4,6.89e-4 -0.0016,6.89e-4 -0.215162,0.110362 -0.58435,0.353313 -0.432705,0.539889 0.04446,0.05478 0.127032,0.07939 0.1707,0.07939 0.142118,0 0.283442,-0.142913 0.485106,-0.490663 0.204839,-0.06749 0.429528,-0.151647 0.627223,-0.184197 0.172288,0.09368 0.373952,0.154819 0.508131,0.154819 0.231834,0 0.247713,-0.254064 0.156408,-0.344574 -0.11036,-0.107979 -0.431117,-0.07702 -0.58435,-0.05717 z M 53.155163,20.884975 52.377089,20.1069 c -0.03573,-0.03572 -0.08416,-0.05557 -0.134972,-0.05557 h -0.04764 v 1.01626 h 1.016261 v -0.04843 c 0,-0.05002 -0.01985,-0.09846 -0.05557,-0.134177 z m -0.58832,2.026965 c 0.03256,-0.02144 -0.01985,-0.09448 -0.339811,-0.07145 0.294557,0.125445 0.339811,0.07145 0.339811,0.07145 z" fill="#fff" stroke-width=".00793954"/></g></g></g></g></svg>
 
admin/images/banners/shortcodes.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145832 26.458334"><defs><linearGradient xlink:href="#a" id="b" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient id="a"><stop offset="0" stop-color="#00bfff"/><stop offset="1" stop-color="#70f7f9"/></linearGradient><linearGradient xlink:href="#a" id="f" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="e" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="d" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="c" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="g" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="m" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="l" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="k" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient xlink:href="#a" id="n" gradientUnits="userSpaceOnUse" x1="31.456219" y1="279.36444" x2="42.209198" y2="265.73569"/><linearGradient y2="265.73569" x2="42.209198" y1="279.36444" x1="31.456219" gradientUnits="userSpaceOnUse" id="j" xlink:href="#a"/><linearGradient y2="265.73569" x2="42.209198" y1="279.36444" x1="31.456219" gradientUnits="userSpaceOnUse" id="i" xlink:href="#a"/><linearGradient y2="265.73569" x2="42.209198" y1="279.36444" x1="31.456219" gradientUnits="userSpaceOnUse" id="h" xlink:href="#a"/><linearGradient y2="265.73569" x2="42.209198" y1="279.36444" x1="31.456219" gradientUnits="userSpaceOnUse" id="o" xlink:href="#a"/></defs><g><rect height="26.458334" width="66.145836" fill="#e0f9ff" stroke-width="2.25865" stroke-linejoin="round"/><path fill="#99ebff" d="m 9.0378478,8.3263469 c -0.2569985,0 -0.4932063,0.08888 -0.6796691,0.237526 L 7.1931586,7.8357319 a 1.0975531,1.0975531 0 0 0 0,-0.473835 l 1.1650201,-0.72814 c 0.1864628,0.148654 0.4226706,0.237537 0.6796691,0.237537 0.6026989,0 1.0912902,-0.488591 1.0912902,-1.09129 0,-0.602698 -0.4885913,-1.091289 -1.0912902,-1.091289 -0.6026988,0 -1.0912899,0.488591 -1.0912899,1.091289 0,0.08137 0.00898,0.160625 0.025875,0.236913 l -1.1650223,0.72814 c -0.186463,-0.148643 -0.4226703,-0.237526 -0.6796691,-0.237526 -0.6026986,0 -1.0912895,0.488591 -1.0912895,1.091289 0,0.602699 0.4885909,1.09129 1.0912895,1.09129 0.2569988,0 0.4932061,-0.08888 0.6796687,-0.237526 l 1.1650203,0.72814 a 1.0947112,1.0947112 0 0 0 -0.025875,0.236913 c 0,0.6026981 0.4885911,1.0912891 1.0912899,1.0912891 0.6026993,0 1.0912906,-0.488591 1.0912906,-1.0912891 0,-0.6027 -0.4885913,-1.09129 -1.0912906,-1.09129 z" stroke-width=".0113676"/><path d="m 59.643106,20.822489 c -0.256998,0 -0.493206,0.08888 -0.679669,0.237526 l -1.16502,-0.728141 a 1.0975531,1.0975531 0 0 0 0,-0.473835 l 1.16502,-0.72814 c 0.186463,0.148654 0.422671,0.237537 0.679669,0.237537 0.602699,0 1.09129,-0.488591 1.09129,-1.09129 0,-0.602698 -0.488591,-1.091289 -1.09129,-1.091289 -0.602698,0 -1.09129,0.488591 -1.09129,1.091289 0,0.08137 0.009,0.160625 0.02588,0.236913 l -1.165023,0.72814 c -0.186463,-0.148643 -0.42267,-0.237526 -0.679669,-0.237526 -0.602699,0 -1.091289,0.488591 -1.091289,1.091289 0,0.602699 0.48859,1.09129 1.091289,1.09129 0.256999,0 0.493206,-0.08888 0.679669,-0.237526 l 1.16502,0.72814 a 1.0947112,1.0947112 0 0 0 -0.02587,0.236913 c 0,0.602698 0.488592,1.091289 1.09129,1.091289 0.6027,0 1.09129,-0.488591 1.09129,-1.091289 0,-0.6027 -0.48859,-1.09129 -1.09129,-1.09129 z" fill="#99ebff" stroke-width=".0113676"/><path fill="#99ebff" d="m 17.395054,19.593734 h -0.680357 v -0.680357 c 0,-0.09355 -0.07654,-0.170089 -0.17009,-0.170089 h -0.340178 c -0.09355,0 -0.170089,0.07654 -0.170089,0.170089 v 0.680357 h -0.680357 c -0.09355,0 -0.170089,0.07654 -0.170089,0.170089 v 0.340178 c 0,0.09355 0.07654,0.17009 0.170089,0.17009 h 0.680357 v 0.680356 c 0,0.09355 0.07654,0.17009 0.170089,0.17009 h 0.340178 c 0.09355,0 0.17009,-0.07654 0.17009,-0.17009 v -0.680356 h 0.680357 c 0.09355,0 0.170089,-0.07654 0.170089,-0.17009 v -0.340178 c 0,-0.09355 -0.07654,-0.170089 -0.170089,-0.170089 z m -4.252231,0.510267 c 0.751582,0 1.360714,-0.609132 1.360714,-1.360713 0,-0.751582 -0.609132,-1.360714 -1.360714,-1.360714 -0.751582,0 -1.360714,0.609132 -1.360714,1.360714 0,0.751581 0.609132,1.360713 1.360714,1.360713 z m 0.9525,0.340179 h -0.177531 c -0.235999,0.108432 -0.498574,0.170089 -0.774969,0.170089 -0.276395,0 -0.537907,-0.06166 -0.774969,-0.170089 h -0.177531 c -0.788788,0 -1.428749,0.63996 -1.428749,1.428749 v 0.442232 c 0,0.281711 0.228557,0.510268 0.510268,0.510268 h 3.741962 c 0.281711,0 0.510268,-0.228557 0.510268,-0.510268 v -0.442232 c 0,-0.788789 -0.63996,-1.428749 -1.428749,-1.428749 z" stroke-width=".0106306"/><path fill="#99ebff" d="m 51.47464,5.7542239 c 0.759573,0.7603618 0.749148,1.9794135 0.0046,2.7281171 -0.0014,0.00155 -0.003,0.00318 -0.0046,0.00473 l -0.854324,0.8543241 c -0.753509,0.7535099 -1.979426,0.7534079 -2.732821,0 -0.753508,-0.7533821 -0.753508,-1.9794389 0,-2.7328209 L 48.35923,6.1368415 c 0.125097,-0.1250979 0.340534,-0.041955 0.346993,0.1348357 0.0082,0.2253025 0.04864,0.4516605 0.123191,0.6702508 0.02525,0.074015 0.0072,0.1558884 -0.0481,0.2111904 l -0.166378,0.1663775 c -0.356299,0.3562992 -0.367474,0.9364512 -0.01468,1.2962337 0.356274,0.3633295 0.941867,0.3654904 1.300875,0.00644 l 0.854324,-0.8541968 c 0.358396,-0.3583965 0.356896,-0.9376846 0,-1.2945809 -0.04705,-0.046964 -0.09445,-0.08345 -0.131467,-0.1089399 a 0.20388094,0.20388094 0 0 1 -0.08832,-0.1602625 c -0.0051,-0.1343398 0.04257,-0.2727731 0.148719,-0.3789279 L 50.95205,5.5575855 c 0.07019,-0.070189 0.180298,-0.078812 0.261688,-0.022009 a 1.938528,1.938528 0 0 1 0.260899,0.2186278 z m 1.79173,-1.7918186 c -0.753395,-0.7534068 -1.979312,-0.7535086 -2.732821,0 l -0.854324,0.8543249 c -0.0016,0.00155 -0.0032,0.00318 -0.0046,0.00473 -0.744558,0.7487027 -0.754996,1.9677553 0.0046,2.7281163 a 1.938172,1.938172 0 0 0 0.260886,0.2186156 c 0.08139,0.056802 0.191511,0.048171 0.261688,-0.02201 l 0.267663,-0.267675 C 50.575617,7.3723523 50.623214,7.2339182 50.61818,7.0995784 A 0.20388094,0.20388094 0 0 0 50.52986,6.9393167 c -0.03702,-0.025493 -0.08442,-0.061974 -0.131467,-0.1089391 -0.356896,-0.3568971 -0.358397,-0.9361843 0,-1.2945817 L 51.25272,4.6815991 c 0.359007,-0.3590067 0.944587,-0.3568457 1.300874,0.00644 0.35279,0.3597825 0.341628,0.9399345 -0.01468,1.2962337 l -0.166378,0.1663767 c -0.0553,0.055301 -0.07335,0.1371754 -0.0481,0.2111912 0.07455,0.2185903 0.114952,0.4449475 0.123191,0.6702508 0.0064,0.1767893 0.221896,0.2599328 0.346993,0.1348357 l 0.471735,-0.471735 c 0.753521,-0.7533681 0.753521,-1.9794258 1.2e-5,-2.7328078 z" stroke-width=".0127132"/></g><g><g transform="matrix(0.635169,0,0,0.635169,12.219301,-154.84314)" fill="url(#b)"><g transform="translate(0.28314298)" fill="url(#c)"><g transform="translate(8.1655862e-7,0.23004952)" fill="url(#d)"><g transform="translate(0,-0.26543832)" fill="url(#e)"><g transform="translate(0,-0.28314209)" fill="url(#f)"/></g></g></g><g transform="translate(-1.1783727e-6,0.04044381)" fill="url(#g)"/><g transform="matrix(-1,0,0,1,65.380059,8.5831701e-6)" fill="url(#h)"><g transform="translate(8.1655862e-7,0.23004952)" fill="url(#i)"><g transform="translate(0,-0.26543832)" fill="url(#j)"/></g></g><g transform="matrix(-1,0,0,1,65.380059,8.5831701e-6)" fill="url(#k)"><g transform="translate(8.1655862e-7,0.23004952)" fill="url(#l)"><g transform="translate(0,-0.26543832)" fill="url(#m)"><g transform="translate(0,-0.28314209)" fill="url(#n)"><path d="m -271.22993,23.771025 h 0.99325 c 0.27388,0 0.49438,0.220492 0.49438,0.494376 v 3.541535 c 0,0.273884 -0.2205,0.494376 -0.49438,0.494376 h -0.99325 c -0.27388,0 -0.49437,-0.220492 -0.49437,-0.494376 v -3.541535 c 0,-0.273884 0.22049,-0.494376 0.49437,-0.494376 z m 11.60886,0 h 0.99325 c 0.27388,0 0.49437,0.220492 0.49437,0.494376 v 3.541535 c 0,0.273884 -0.22049,0.494376 -0.49437,0.494376 h -0.99325 c -0.27389,0 -0.49438,-0.220492 -0.49438,-0.494376 v -3.541535 c 0,-0.273884 0.22049,-0.494376 0.49438,-0.494376 z m 1.48762,0.74855 v 0.4849 c 0,0.414697 -0.33386,0.748551 -0.74855,0.748551 h -12.09377 c -0.41469,0 -0.74855,-0.333854 -0.74855,-0.748551 v -0.4849 c 0,-0.414697 0.33386,-0.74855 0.74855,-0.74855 h 12.09377 c 0.41469,0 0.74855,0.333853 0.74855,0.74855 z m 1.98199,6.502596 v -1.43294 c 0,-0.28558 -0.22156,-0.454082 -0.49677,-0.377802 l -16.56132,4.590223 c -0.27522,0.07628 -0.49678,0.367598 -0.49678,0.653178 v 1.43294 c 0,0.28558 0.22156,0.454082 0.49678,0.377802 l 16.56132,-4.590223 c 0.27521,-0.07628 0.49677,-0.367598 0.49677,-0.653178 z m -15.07846,10.303718 h 0.99325 c 0.27388,0 0.49438,-0.220492 0.49438,-0.494376 v -3.541535 c 0,-0.273884 -0.2205,-0.494376 -0.49438,-0.494376 h -0.99325 c -0.27388,0 -0.49437,0.220492 -0.49437,0.494376 v 3.541535 c 0,0.273884 0.22049,0.494376 0.49437,0.494376 z m 11.60886,0 h 0.99325 c 0.27388,0 0.49437,-0.220492 0.49437,-0.494376 v -3.541535 c 0,-0.273884 -0.22049,-0.494376 -0.49437,-0.494376 h -0.99325 c -0.27389,0 -0.49438,0.220492 -0.49438,0.494376 v 3.541535 c 0,0.273884 0.22049,0.494376 0.49438,0.494376 z m 1.48762,-0.74855 v -0.4849 c 0,-0.414697 -0.33386,-0.748551 -0.74855,-0.748551 h -12.09377 c -0.41469,0 -0.74855,0.333854 -0.74855,0.748551 v 0.4849 c 0,0.414697 0.33386,0.74855 0.74855,0.74855 h 12.09377 c 0.41469,0 0.74855,-0.333853 0.74855,-0.74855 z" transform="rotate(-90)" fill="url(#o)" stroke-width=".764145"/></g></g></g></g></g></g></svg>
 
admin/images/banners/text-sharebar.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="250" height="100" viewBox="0 0 66.145831 26.458334"><g><g transform="translate(-0.93544334)"><text y="30.661106" x="1.6704345" style="line-height:5.64885px" font-size="3.88056" font-family="sans-serif" letter-spacing="0" word-spacing="0" fill="#d6d6d6" stroke-width=".264583"/><text y="42.354149" x="28.063299" style="line-height:5.64885px" font-size="3.88056" font-family="sans-serif" letter-spacing="0" word-spacing="0" fill="#d6d6d6" stroke-width=".264583"/><g transform="translate(-0.8597052,0.11204452)"><g transform="translate(1.6509641,0.85044609)"><rect y="13.382335" x="15.322048" height="3.5390246" width="33.068405" fill="#e7e7e7" stroke-width=".28848" stroke-linecap="round" stroke-linejoin="round"/><g transform="matrix(0.91590993,0,0,0.91590993,-0.23147659,3.3465564)"><rect width="36.415474" height="7.416729" x="19.737314" y="-.3744382" ry="1.2027129" fill="#4f0000" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 25.038674,2.7763008 h -0.615583 v -0.403734 c 0,-0.151622 0.100485,-0.186973 0.171268,-0.186973 0.07062,0 0.434412,0 0.434412,0 v -0.666555 l -0.598273,-0.0024 c -0.664139,0 -0.815277,0.497145 -0.815277,0.815286 v 0.444302 h -0.384086 v 0.686856 h 0.384086 c 0,0.881466 0,1.943535 0,1.943535 h 0.80787 c 0,0 0,-1.072542 0,-1.943535 h 0.545127 z" fill="#fff" stroke-width=".0805212"/><path d="m 34.112449,2.1537358 c -0.153307,0.06817 -0.318297,0.11411 -0.491412,0.134681 0.176756,-0.105814 0.312285,-0.27343 0.376198,-0.473378 -0.165327,0.09811 -0.348347,0.169304 -0.543304,0.207738 -0.156016,-0.166258 -0.3784,-0.270215 -0.624487,-0.270215 -0.472449,0 -0.855505,0.383055 -0.855505,0.855589 0,0.06696 0.0076,0.132229 0.02218,0.194964 -0.711087,-0.03577 -1.341584,-0.376286 -1.76358,-0.893942 -0.07365,0.126297 -0.115806,0.273261 -0.115806,0.430202 0,0.296799 0.151021,0.558718 0.380601,0.712105 -0.140187,-0.0048 -0.27216,-0.04301 -0.387543,-0.107084 -8.5e-5,0.0032 -8.5e-5,0.0072 -8.5e-5,0.01085 0,0.414463 0.294933,0.760185 0.68637,0.838917 -0.07179,0.01953 -0.147382,0.02998 -0.225432,0.02998 -0.05519,0 -0.10878,-0.0056 -0.161011,-0.01544 0.108949,0.339887 0.424875,0.587328 0.799211,0.594193 -0.292815,0.22949 -0.661649,0.366286 -1.062568,0.366286 -0.06899,0 -0.137138,-0.004 -0.204098,-0.01206 0.378739,0.242875 0.828416,0.384413 1.311533,0.384413 1.573788,0 2.434288,-1.303661 2.434288,-2.434288 0,-0.03706 -7.44e-4,-0.07404 -0.0024,-0.110815 0.167105,-0.12038 0.312201,-0.271139 0.426822,-0.442734 z" fill="#fff" stroke-width=".0846532"/><path d="m 49.599325,3.4820308 c -0.332293,0 -2.044282,-1.274556 -2.044282,-1.274556 v -0.140045 c 0,-0.173526 0.152449,-0.314357 0.340629,-0.314357 h 3.407305 c 0.188349,0 0.340798,0.140831 0.340798,0.314357 l -0.0027,0.157177 c 0,0 -1.693445,1.257424 -2.041729,1.257424 z m 0,0.432239 c 0.364277,0 2.041729,-1.218129 2.041729,-1.218129 l 0.0027,1.886136 c 0,0.173524 -0.152449,0.314356 -0.340798,0.314356 H 47.89565 c -0.188009,0 -0.340628,-0.140832 -0.340628,-0.314356 l 0.0027,-1.886136 c -1.7e-4,0 1.709266,1.218129 2.041559,1.218129 z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd" stroke-width=".163533"/><rect width="2.1497395" height="2.1497395" x="30.493004" y="-22.67025" ry="0" transform="rotate(45)" fill="#4f0000" stroke-width=".264583" stroke-linecap="round" stroke-linejoin="round"/><path d="m 39.532408,4.9349508 h -0.8228 v -2.649672 h 0.8228 z m -0.411843,-3.011112 c -0.263048,0 -0.476498,-0.217927 -0.476498,-0.481034 0,-0.263107 0.21345,-0.47660399 0.476498,-0.47660399 0.263049,0 0.476499,0.21349699 0.476499,0.47660399 0,0.263107 -0.21345,0.481034 -0.476499,0.481034 z m 3.491369,3.011112 h -0.82103 v -1.289844 c 0,-0.307401 -0.0062,-0.701618 -0.427785,-0.701618 -0.427786,0 -0.493327,0.333977 -0.493327,0.679471 v 1.311991 h -0.821915 v -2.649672 h 0.789145 v 0.361439 h 0.01151 c 0.109825,-0.208182 0.378188,-0.42788 0.778517,-0.42788 0.832544,0 0.985767,0.54836 0.985767,1.260609 v 1.455504 z" fill="#fff" stroke-width=".00885783"/></g><rect y="18.969902" x="15.234782" height="2.5598452" width="25.540966" fill="#e7e7e7" stroke-width=".215623" stroke-linecap="round" stroke-linejoin="round"/><rect width="13.724923" height="3.5390248" x="27.629179" y="13.382335" fill="#bcbcbc" stroke-width=".28848" stroke-linecap="round" stroke-linejoin="round"/></g></g></g></g></svg>
 
admin/images/banners/twitter-widget.svg DELETED
@@ -1 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 66.145832 26.458334" height="100" width="250"><g><rect height="26.458334" width="66.145836" fill="#e5f7ff" stroke-width="2.74788" stroke-linejoin="round"/></g><g/><g transform="translate(0,-249.37498)"><g transform="translate(-2.817172,-0.19034617)"><g transform="translate(-1.0768462)"><g transform="translate(-0.10161051)"><g transform="translate(0,-0.08334101)"><rect y="258.6445" x="17.328281" height="8.4666662" width="8.4666662" ry="4.2333331" fill="#1da1f2" stroke-width=".23472" stroke-linecap="round" stroke-linejoin="round"/><path d="m 23.585,261.78445 c -0.134067,0.0594 -0.278337,0.0999 -0.429722,0.11772 0.154581,-0.0924 0.273083,-0.23911 0.328974,-0.41396 -0.144574,0.0859 -0.304618,0.14801 -0.475104,0.18175 -0.136425,-0.14532 -0.330898,-0.23629 -0.546094,-0.23629 -0.413141,0 -0.748112,0.33497 -0.748112,0.74817 0,0.0587 0.0065,0.11561 0.01938,0.17044 -0.621824,-0.0312 -1.173173,-0.32906 -1.542196,-0.78172 -0.0644,0.11042 -0.101265,0.23895 -0.101265,0.3762 0,0.25953 0.132073,0.48857 0.332823,0.62271 -0.122602,-0.006 -0.237994,-0.0376 -0.338896,-0.0935 -7.3e-5,0.002 -7.3e-5,0.006 -7.3e-5,0.01 0,0.36242 0.25791,0.66474 0.60021,0.7336 -0.06277,0.0173 -0.128872,0.0263 -0.197133,0.0263 -0.04826,0 -0.09513,-0.004 -0.140796,-0.0134 0.09528,0.29722 0.37154,0.51361 0.698884,0.51959 -0.256058,0.20071 -0.57859,0.32032 -0.929181,0.32032 -0.06033,0 -0.119919,-0.004 -0.178469,-0.0115 0.331196,0.21238 0.724425,0.33615 1.146895,0.33615 1.376227,0 2.128708,-1.14 2.128708,-2.12872 0,-0.0324 -6.35e-4,-0.0648 -0.0019,-0.0968 0.146126,-0.10525 0.273011,-0.23709 0.373242,-0.38715 z" fill="#fff" stroke-width=".0740264"/></g><rect ry=".39289305" y="262.40161" x="28.66321" height=".78578609" width="2.7857862" fill="#e1e1e1" stroke-width=".214214" stroke-linejoin="round"/><g transform="matrix(0.99162562,0,0,0.99162562,21.33184,-20.442387)"><rect ry=".47837946" y="278.36874" x="13.782822" height="14.520201" width="21.870955" fill="#fff" stroke="#1da1f2" stroke-width=".243344" stroke-linecap="round" stroke-linejoin="round"/><path d="m 13.660023,281.05225 h 21.782466 v 0.13364 -0.0668" fill="none" stroke="#3e5b98" stroke-width=".264583"/><path d="m 13.810361,278.77743 c 0.124351,-0.20316 0.293379,-0.29482 0.668174,-0.39788 h 10.30658 l 10.473627,0.0256 0.400903,0.40302 0.116931,3.06264 H 24.785116 13.793657 c -0.304578,-0.90133 -0.0061,-2.05506 0.0167,-3.09338 z" fill="#1da1f2" stroke-width=".0815901" stroke-linecap="round" stroke-linejoin="round"/><rect width="12.289192" height=".81697166" x="19.80607" y="283.41849" ry="0" fill="#e1e1e1" stroke-width=".0586081" stroke-linecap="round" stroke-linejoin="round"/><rect width="7.6428947" height=".36531568" x="19.830486" y="284.76871" ry="0" fill="#e1e1e1" stroke-width=".0309069" stroke-linecap="round" stroke-linejoin="round"/><rect width="7.6428947" height=".36531568" x="19.816807" y="285.7211" ry="0" fill="#e1e1e1" stroke-width=".0309069" stroke-linecap="round" stroke-linejoin="round"/><circle r="1.5111734" cy="284.79425" cx="16.951778" fill="#e1e1e1" stroke-width=".0999239" stroke-linecap="round" stroke-linejoin="round"/><rect width="12.289192" height=".81697166" x="19.794212" y="287.90561" ry="0" fill="#e1e1e1" stroke-width=".0586081" stroke-linecap="round" stroke-linejoin="round"/><rect width="7.6428947" height=".36531568" x="19.818628" y="289.25583" ry="0" fill="#e1e1e1" stroke-width=".0309069" stroke-linecap="round" stroke-linejoin="round"/><rect width="7.6428947" height=".36531568" x="19.804949" y="290.20822" ry="0" fill="#e1e1e1" stroke-width=".0309069" stroke-linecap="round" stroke-linejoin="round"/><circle r="1.5111734" cy="289.28137" cx="16.93992" fill="#e1e1e1" stroke-width=".0999239" stroke-linecap="round" stroke-linejoin="round"/></g></g></g></g></g></svg>
 
admin/js/script.js CHANGED
@@ -347,23 +347,9 @@ jQuery(document).ready(function(){
347
  $( document ).on( 'click', '.fb_add', function(){
348
  $sel_list = $( '.fb_selected' );
349
  sel_val = $( '.fb_list' ).val();
350
- props = social_icons[ sel_val ];
351
- li_tmpl = window.li_template;
352
-
353
- li_tmpl = li_tmpl.replace( /%id%/g, sel_val );
354
- li_tmpl = li_tmpl.replace( /%color%/g, props[ 'colors' ][0] );
355
- li_tmpl = li_tmpl.replace( /%name%/g, props[ 'name' ] );
356
- li_tmpl = li_tmpl.replace( /%icon%/g, props[ 'icon' ] );
357
- li_tmpl = li_tmpl.replace( /%url%/g, '' );
358
- li_tmpl = li_tmpl.replace( /%iurl%/g, '' );
359
- li_tmpl = li_tmpl.replace( /%text%/g, '' );
360
- $li_tmpl = $( li_tmpl );
361
-
362
- $sel_list.append( $li_tmpl );
363
-
364
  $sel_list.find( 'div' ).slideUp();
365
  $li_tmpl.find( 'div' ).slideDown();
366
-
367
  });
368
 
369
  $( document ).on( 'click', '.fb_selected h4', function(e){
@@ -372,7 +358,62 @@ jQuery(document).ready(function(){
372
  $( '.fb_selected li > div' ).not($to_open).hide();
373
  $to_open.slideToggle();
374
  });
375
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  var process_fb_editor = function(){
377
 
378
  cnt = [];
@@ -388,7 +429,7 @@ jQuery(document).ready(function(){
388
  btn[ sid ] = {
389
  'url': burl,
390
  'icon': iurl,
391
- 'text': encodeURIComponent( text )
392
  };
393
 
394
  cnt.push( btn );
@@ -402,7 +443,7 @@ jQuery(document).ready(function(){
402
 
403
  });
404
 
405
- template = btoa( JSON.stringify( cnt ) );
406
  $( '.fb_template' ).val( template );
407
 
408
  if( prev == '' && window.wpsr ){
@@ -424,7 +465,7 @@ jQuery(document).ready(function(){
424
  selected.push( $(this).data( 'id' ) );
425
  });
426
 
427
- $( '.ssb_template' ).val( btoa( JSON.stringify( selected ) ) );
428
 
429
  }
430
 
@@ -550,12 +591,20 @@ jQuery(document).ready(function(){
550
  if( wpsr.ajaxurl ){
551
 
552
  cnt_id = $( this ).attr( 'data-cnt-id' );
553
- cnt = encodeURIComponent($( '#' + cnt_id ).val());
554
  prev_id = $( this ).attr( 'data-prev-id' );
555
- qstring = 'action=wpsr_follow_icons_editor&template=' + cnt + '&cnt_id=' + cnt_id + '&prev_id=' + prev_id;
556
 
557
  wpsr_ipopup_show( wpsr.ajaxurl + '?' + qstring, '800px', '80%' );
558
 
 
 
 
 
 
 
 
 
559
  }
560
  });
561
 
@@ -757,8 +806,7 @@ jQuery(document).ready(function(){
757
  selected_icons.push( icon );
758
  });
759
 
760
- console.log( selected_icons );
761
- $selected_icons_input.val( btoa( JSON.stringify( selected_icons ) ) );
762
 
763
  });
764
 
347
  $( document ).on( 'click', '.fb_add', function(){
348
  $sel_list = $( '.fb_selected' );
349
  sel_val = $( '.fb_list' ).val();
350
+ $li_tmpl = add_fb_editor(sel_val, '', '', '');
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  $sel_list.find( 'div' ).slideUp();
352
  $li_tmpl.find( 'div' ).slideDown();
 
353
  });
354
 
355
  $( document ).on( 'click', '.fb_selected h4', function(e){
358
  $( '.fb_selected li > div' ).not($to_open).hide();
359
  $to_open.slideToggle();
360
  });
361
+
362
+ window.addEventListener('message', function(e){
363
+ var key = e.message ? 'message' : 'data';
364
+ var data = e[key];
365
+
366
+ if(data == false){
367
+ return false;
368
+ }
369
+
370
+ if(!data.hasOwnProperty('type') || data['type'] != 'fb_editor_msg'){
371
+ return false;
372
+ }
373
+
374
+ $('.fb_template').val(data['content']);
375
+ var template = data['content'];
376
+
377
+ try{
378
+ template = atob(template);
379
+ }catch{
380
+
381
+ }
382
+
383
+ try{
384
+ var btns = JSON.parse(template);
385
+ } catch(e) {
386
+ return;
387
+ }
388
+
389
+ for(var i = 0; i < btns.length; i++){
390
+ var btn_group = btns[i];
391
+ for(btn in btn_group){
392
+ var btn_props = btns[i][btn];
393
+ add_fb_editor(btn, btn_props['url'], btn_props['icon'], btn_props['text']);
394
+ }
395
+ }
396
+
397
+ }, false);
398
+
399
+ var add_fb_editor = function(id, url, iurl, text){
400
+ $sel_list = $( '.fb_selected' );
401
+ props = social_icons[ id ];
402
+ li_tmpl = window.li_template;
403
+
404
+ li_tmpl = li_tmpl.replace( /%id%/g, id );
405
+ li_tmpl = li_tmpl.replace( /%color%/g, props[ 'colors' ][0] );
406
+ li_tmpl = li_tmpl.replace( /%name%/g, props[ 'name' ] );
407
+ li_tmpl = li_tmpl.replace( /%icon%/g, props[ 'icon' ] );
408
+ li_tmpl = li_tmpl.replace( /%url%/g, url );
409
+ li_tmpl = li_tmpl.replace( /%iurl%/g, iurl );
410
+ li_tmpl = li_tmpl.replace( /%text%/g, text );
411
+ $li_tmpl = $( li_tmpl );
412
+
413
+ $sel_list.append( $li_tmpl );
414
+ return $li_tmpl;
415
+ }
416
+
417
  var process_fb_editor = function(){
418
 
419
  cnt = [];
429
  btn[ sid ] = {
430
  'url': burl,
431
  'icon': iurl,
432
+ 'text': text
433
  };
434
 
435
  cnt.push( btn );
443
 
444
  });
445
 
446
+ template = JSON.stringify( cnt );
447
  $( '.fb_template' ).val( template );
448
 
449
  if( prev == '' && window.wpsr ){
465
  selected.push( $(this).data( 'id' ) );
466
  });
467
 
468
+ $( '.ssb_template' ).val( JSON.stringify( selected ) );
469
 
470
  }
471
 
591
  if( wpsr.ajaxurl ){
592
 
593
  cnt_id = $( this ).attr( 'data-cnt-id' );
594
+ cnt = $( '#' + cnt_id ).val();
595
  prev_id = $( this ).attr( 'data-prev-id' );
596
+ qstring = 'action=wpsr_follow_icons_editor&cnt_id=' + cnt_id + '&prev_id=' + prev_id;
597
 
598
  wpsr_ipopup_show( wpsr.ajaxurl + '?' + qstring, '800px', '80%' );
599
 
600
+ $('#wpsr_ipopup_wrap iframe').on('load', function(){
601
+ var content_window = $('#wpsr_ipopup_wrap iframe')[0].contentWindow;
602
+ content_window.postMessage({
603
+ 'type': 'fb_editor_msg',
604
+ 'content': cnt
605
+ });
606
+ });
607
+
608
  }
609
  });
610
 
806
  selected_icons.push( icon );
807
  });
808
 
809
+ $selected_icons_input.val( JSON.stringify( selected_icons ) );
 
810
 
811
  });
812
 
admin/js/script_widgets.js CHANGED
@@ -34,10 +34,18 @@ jQuery(document).ready(function(){
34
  wtmpl_cnt_id = $( this ).attr( 'data-wtmpl-cnt-id' );
35
  wtmpl_cnt = $( '#' + wtmpl_cnt_id ).val();
36
  wtmpl_prev_id = $( this ).attr( 'data-wtmpl-prev-id' );
37
- qstring = 'action=wpsr_follow_icons_editor&template=' + wtmpl_cnt + '&cnt_id=' + wtmpl_cnt_id + '&prev_id=' + wtmpl_prev_id;
38
 
39
  wpsr_ipopup_show( wpsr_ppe_ajax + '?' + qstring, '800px', '80%' );
40
 
 
 
 
 
 
 
 
 
41
  }
42
  });
43
 
34
  wtmpl_cnt_id = $( this ).attr( 'data-wtmpl-cnt-id' );
35
  wtmpl_cnt = $( '#' + wtmpl_cnt_id ).val();
36
  wtmpl_prev_id = $( this ).attr( 'data-wtmpl-prev-id' );
37
+ qstring = 'action=wpsr_follow_icons_editor&cnt_id=' + wtmpl_cnt_id + '&prev_id=' + wtmpl_prev_id;
38
 
39
  wpsr_ipopup_show( wpsr_ppe_ajax + '?' + qstring, '800px', '80%' );
40
 
41
+ $('#wpsr_ipopup_wrap iframe').on('load', function(){
42
+ var content_window = $('#wpsr_ipopup_wrap iframe')[0].contentWindow;
43
+ content_window.postMessage({
44
+ 'type': 'fb_editor_msg',
45
+ 'content': wtmpl_cnt
46
+ });
47
+ });
48
+
49
  }
50
  });
51
 
admin/pages/floating-sharebar.php CHANGED
@@ -17,9 +17,8 @@ class WPSR_Admin_Floating_Sharebar{
17
  function register( $pages ){
18
 
19
  $pages[ 'floating_sharebar' ] = array(
20
- 'name' => __( 'Floating sharebar', 'wpsr' ),
21
- 'banner' => WPSR_ADMIN_URL . '/images/banners/floating-sharebar.svg',
22
- 'description' => __( 'Add floating/sticky share icons to share the content on social media sites.', 'wpsr' ),
23
  'category' => 'feature',
24
  'type' => 'feature',
25
  'form_name' => 'floating_sharebar_settings',
@@ -47,8 +46,8 @@ class WPSR_Admin_Floating_Sharebar{
47
  $form = new WPSR_Form( $values, $options );
48
 
49
  // Section 0
50
- $form->section_start( __( 'Enable/disable floating sharebar', 'wpsr' ), '1' );
51
- $form->label( __( 'Select to enable or disable floating sharebar feature', 'wpsr' ) );
52
  $form->field( 'select', array(
53
  'name' => 'ft_status',
54
  'value' => $form->values[ 'ft_status' ],
@@ -63,20 +62,20 @@ class WPSR_Admin_Floating_Sharebar{
63
  echo '<div class="feature_wrap">';
64
 
65
  // Section 1
66
- $form->section_start( __( 'Choose the social icons', 'wpsr' ), '2' );
67
- $form->section_description( __( 'Add social icons to the template, re-arrange them and configure individual icon settings.', 'wpsr' ) );
68
  WPSR_Icons_Editor::editor( $values[ 'selected_icons' ], 'selected_icons' );
69
  $form->section_end();
70
 
71
  // Settings
72
- $form->section_start( __( 'Settings', 'wpsr' ), '3' );
73
 
74
  $form->tab_list(array(
75
- 'style' => '<i class="fas fa-paint-brush"></i>' . __( 'Style', 'wpsr' ),
76
- 'position' => '<i class="fas fa-arrows-alt"></i>' . __( 'Position', 'wpsr' ),
77
- 'share_counter' => '<i class="fab fa-creative-commons-zero"></i>' . __( 'Share counter', 'wpsr' ),
78
- 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . __( 'Responsiveness', 'wpsr' ),
79
- 'misc' => '<i class="fas fa-cog"></i>' . __( 'Miscellaneous', 'wpsr' )
80
  ));
81
 
82
  echo '<div class="tab_wrap">';
@@ -90,8 +89,8 @@ class WPSR_Admin_Floating_Sharebar{
90
  $form->section_end();
91
 
92
  // Location rules
93
- $form->section_start( __( 'Conditions to display the sharebar', 'wpsr' ), '4' );
94
- $form->section_description( __( 'Choose the below options to select the pages which will display the sharebar.', 'wpsr' ) );
95
  WPSR_Location_Rules::display_rules( 'loc_rules', $values['loc_rules'] );
96
  $form->section_end();
97
 
@@ -103,7 +102,7 @@ class WPSR_Admin_Floating_Sharebar{
103
 
104
  echo '<div data-tab="style">';
105
 
106
- $form->label( __( 'Sharebar style', 'wpsr' ) );
107
  $form->field( 'image_select', array(
108
  'name' => 'style',
109
  'value' => $form->values['style'],
@@ -113,7 +112,7 @@ class WPSR_Admin_Floating_Sharebar{
113
  $form->end();
114
 
115
  $form->start( '', 'data-conditioner data-condr-input=".setting_sb_style" data-condr-value="enclosed" data-condr-action="simple?show:hide" data-condr-events="change"' );
116
- $form->label( __( 'Sharebar background color', 'wpsr' ) );
117
  $form->field( 'text', array(
118
  'name' => 'sb_bg_color',
119
  'value' => $form->values['sb_bg_color'],
@@ -121,7 +120,7 @@ class WPSR_Admin_Floating_Sharebar{
121
  ));
122
  $form->end();
123
 
124
- $form->label( __( 'Icon size', 'wpsr' ) );
125
  $form->field( 'image_select', array(
126
  'name' => 'icon_size',
127
  'value' => $form->values[ 'icon_size' ],
@@ -129,7 +128,7 @@ class WPSR_Admin_Floating_Sharebar{
129
  ));
130
  $form->end();
131
 
132
- $form->label( __( 'Icon shape', 'wpsr' ) );
133
  $form->field( 'image_select', array(
134
  'name' => 'icon_shape',
135
  'value' => $form->values['icon_shape'],
@@ -139,25 +138,25 @@ class WPSR_Admin_Floating_Sharebar{
139
  ));
140
  $form->end();
141
 
142
- $form->label( __( 'Icon color', 'wpsr' ) );
143
  $form->field( 'text', array(
144
  'name' => 'icon_color',
145
  'value' => $form->values['icon_color'],
146
  'class' => 'color_picker',
147
- 'helper' => __( 'Set empty value to use brand color', 'wpsr' )
148
  ));
149
  $form->end();
150
 
151
- $form->label( __( 'Icon background color', 'wpsr' ) );
152
  $form->field( 'text', array(
153
  'name' => 'icon_bg_color',
154
  'value' => $form->values['icon_bg_color'],
155
  'class' => 'color_picker',
156
- 'helper' => __( 'Set empty value to use brand color', 'wpsr' )
157
  ));
158
  $form->end();
159
 
160
- $form->label( __( 'Hover effect', 'wpsr' ) );
161
  $form->field( 'select', array(
162
  'name' => 'hover_effect',
163
  'value' => $form->values['hover_effect'],
@@ -166,12 +165,12 @@ class WPSR_Admin_Floating_Sharebar{
166
  $form->end();
167
 
168
  $form->start( '', 'data-conditioner data-condr-input=".setting_shape" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
169
- $form->label( __( 'Space between the icons', 'wpsr' ) );
170
  $form->field( 'select', array(
171
  'name' => 'padding',
172
  'value' => $form->values['padding'],
173
  'list' => $form->options[ 'padding' ],
174
- 'helper' => __( 'Select to add space between the icons', 'wpsr' ),
175
  ));
176
  $form->end();
177
 
@@ -185,7 +184,7 @@ class WPSR_Admin_Floating_Sharebar{
185
 
186
  echo '<div data-tab="position">';
187
 
188
- $form->label( __( 'Position of the sharebar', 'wpsr' ) );
189
  $form->field( 'select', array(
190
  'name' => 'sb_position',
191
  'value' => $form->values['sb_position'],
@@ -195,7 +194,7 @@ class WPSR_Admin_Floating_Sharebar{
195
  $form->end();
196
 
197
  $form->start( '', 'data-conditioner data-condr-input=".setting_sb_position" data-condr-value="scontent" data-condr-action="simple?show:hide" data-condr-events="change"' );
198
- $form->label( __( 'ID or CSS class name of the content to stick with', 'wpsr' ) );
199
  $form->field( 'text', array(
200
  'name' => 'stick_element',
201
  'value' => $form->values['stick_element'],
@@ -204,7 +203,7 @@ class WPSR_Admin_Floating_Sharebar{
204
  ));
205
  $form->end();
206
 
207
- $form->label( __( 'Offset from the window', 'wpsr' ) );
208
  $form->field( 'text', array(
209
  'name' => 'offset',
210
  'value' => $form->values[ 'offset' ],
@@ -213,7 +212,7 @@ class WPSR_Admin_Floating_Sharebar{
213
  ));
214
  $form->end();
215
 
216
- $form->label( __( 'Sharebar movement', 'wpsr' ) );
217
  $form->field( 'select', array(
218
  'name' => 'movement',
219
  'value' => $form->values['movement'],
@@ -231,7 +230,7 @@ class WPSR_Admin_Floating_Sharebar{
231
 
232
  echo '<div data-tab="share_counter">';
233
 
234
- $form->label( __( 'Share counter', 'wpsr' ) );
235
  $form->field( 'select', array(
236
  'name' => 'share_counter',
237
  'value' => $form->values['share_counter'],
@@ -241,17 +240,17 @@ class WPSR_Admin_Floating_Sharebar{
241
  $form->end();
242
 
243
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="individual" data-condr-action="pattern?show:hide" data-condr-events="change"' );
244
- $form->label( __( 'Share counter style', 'wpsr' ) );
245
  $form->field( 'image_select', array(
246
  'name' => 'sc_style',
247
  'value' => $form->values['sc_style'],
248
  'list' => $form->options[ 'sc_style' ],
249
- 'helper' => __( 'To show count, in the same page under icons list, select an icon and enable gear icon &gt; show count', 'wpsr' )
250
  ));
251
  $form->end();
252
 
253
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
254
- $form->label( __( 'Total share count position', 'wpsr' ) );
255
  $form->field( 'select', array(
256
  'name' => 'sc_total_position',
257
  'value' => $form->values['sc_total_position'],
@@ -260,12 +259,12 @@ class WPSR_Admin_Floating_Sharebar{
260
  $form->end();
261
 
262
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
263
- $form->label( __( 'Total share count color', 'wpsr' ) );
264
  $form->field( 'text', array(
265
  'name' => 'sc_total_color',
266
  'value' => $form->values['sc_total_color'],
267
  'class' => 'color_picker',
268
- 'helper' => __( 'Leave blank to use default color', 'wpsr' )
269
  ));
270
  $form->end();
271
 
@@ -281,7 +280,7 @@ class WPSR_Admin_Floating_Sharebar{
281
 
282
  echo '<div data-tab="responsiveness">';
283
 
284
- $form->label( __( 'On desktop (or) large screen', 'wpsr' ) );
285
  $form->field( 'select', array(
286
  'name' => 'lg_screen_action',
287
  'value' => $form->values['lg_screen_action'],
@@ -289,7 +288,7 @@ class WPSR_Admin_Floating_Sharebar{
289
  ));
290
  $form->end();
291
 
292
- $form->label( __( 'On mobile (or) small screen', 'wpsr' ) );
293
  $form->field( 'select', array(
294
  'name' => 'sm_screen_action',
295
  'value' => $form->values['sm_screen_action'],
@@ -297,7 +296,7 @@ class WPSR_Admin_Floating_Sharebar{
297
  ));
298
  $form->end();
299
 
300
- $form->label( __( 'Responsive width', 'wpsr' ) );
301
  $form->field( 'text', array(
302
  'name' => 'sm_screen_width',
303
  'value' => $form->values[ 'sm_screen_width' ],
@@ -317,12 +316,12 @@ class WPSR_Admin_Floating_Sharebar{
317
 
318
  echo '<div data-tab="misc">';
319
 
320
- $form->label( __( 'Number of icons to group into one single icon', 'wpsr' ) );
321
  $form->field( 'select', array(
322
  'name' => 'more_icons',
323
  'value' => $form->values['more_icons'],
324
  'list' => $form->options[ 'more_icons' ],
325
- 'helper' => __( 'Select the number of icons from the end which will should be grouped into one single icon called "More"', 'wpsr' )
326
  ));
327
  $form->end();
328
 
@@ -340,7 +339,12 @@ class WPSR_Admin_Floating_Sharebar{
340
  update_option( 'wpsr_sharebar_settings', $sb_settings );
341
  }
342
 
 
 
 
 
343
  return $input;
 
344
  }
345
 
346
  }
17
  function register( $pages ){
18
 
19
  $pages[ 'floating_sharebar' ] = array(
20
+ 'name' => __( 'Floating sharebar', 'wp-socializer' ),
21
+ 'description' => __( 'Add floating/sticky share icons to share the content on social media sites.', 'wp-socializer' ),
 
22
  'category' => 'feature',
23
  'type' => 'feature',
24
  'form_name' => 'floating_sharebar_settings',
46
  $form = new WPSR_Form( $values, $options );
47
 
48
  // Section 0
49
+ $form->section_start( __( 'Enable/disable floating sharebar', 'wp-socializer' ), '1' );
50
+ $form->label( __( 'Select to enable or disable floating sharebar feature', 'wp-socializer' ) );
51
  $form->field( 'select', array(
52
  'name' => 'ft_status',
53
  'value' => $form->values[ 'ft_status' ],
62
  echo '<div class="feature_wrap">';
63
 
64
  // Section 1
65
+ $form->section_start( __( 'Choose the social icons', 'wp-socializer' ), '2' );
66
+ $form->section_description( __( 'Add social icons to the template, re-arrange them and configure individual icon settings.', 'wp-socializer' ) );
67
  WPSR_Icons_Editor::editor( $values[ 'selected_icons' ], 'selected_icons' );
68
  $form->section_end();
69
 
70
  // Settings
71
+ $form->section_start( __( 'Settings', 'wp-socializer' ), '3' );
72
 
73
  $form->tab_list(array(
74
+ 'style' => '<i class="fas fa-paint-brush"></i>' . esc_html__( 'Style', 'wp-socializer' ),
75
+ 'position' => '<i class="fas fa-arrows-alt"></i>' . esc_html__( 'Position', 'wp-socializer' ),
76
+ 'share_counter' => '<i class="fab fa-creative-commons-zero"></i>' . esc_html__( 'Share counter', 'wp-socializer' ),
77
+ 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . esc_html__( 'Responsiveness', 'wp-socializer' ),
78
+ 'misc' => '<i class="fas fa-cog"></i>' . esc_html__( 'Miscellaneous', 'wp-socializer' )
79
  ));
80
 
81
  echo '<div class="tab_wrap">';
89
  $form->section_end();
90
 
91
  // Location rules
92
+ $form->section_start( __( 'Conditions to display the sharebar', 'wp-socializer' ), '4' );
93
+ $form->section_description( __( 'Choose the below options to select the pages which will display the sharebar.', 'wp-socializer' ) );
94
  WPSR_Location_Rules::display_rules( 'loc_rules', $values['loc_rules'] );
95
  $form->section_end();
96
 
102
 
103
  echo '<div data-tab="style">';
104
 
105
+ $form->label( __( 'Sharebar style', 'wp-socializer' ) );
106
  $form->field( 'image_select', array(
107
  'name' => 'style',
108
  'value' => $form->values['style'],
112
  $form->end();
113
 
114
  $form->start( '', 'data-conditioner data-condr-input=".setting_sb_style" data-condr-value="enclosed" data-condr-action="simple?show:hide" data-condr-events="change"' );
115
+ $form->label( __( 'Sharebar background color', 'wp-socializer' ) );
116
  $form->field( 'text', array(
117
  'name' => 'sb_bg_color',
118
  'value' => $form->values['sb_bg_color'],
120
  ));
121
  $form->end();
122
 
123
+ $form->label( __( 'Icon size', 'wp-socializer' ) );
124
  $form->field( 'image_select', array(
125
  'name' => 'icon_size',
126
  'value' => $form->values[ 'icon_size' ],
128
  ));
129
  $form->end();
130
 
131
+ $form->label( __( 'Icon shape', 'wp-socializer' ) );
132
  $form->field( 'image_select', array(
133
  'name' => 'icon_shape',
134
  'value' => $form->values['icon_shape'],
138
  ));
139
  $form->end();
140
 
141
+ $form->label( __( 'Icon color', 'wp-socializer' ) );
142
  $form->field( 'text', array(
143
  'name' => 'icon_color',
144
  'value' => $form->values['icon_color'],
145
  'class' => 'color_picker',
146
+ 'helper' => __( 'Set empty value to use brand color', 'wp-socializer' )
147
  ));
148
  $form->end();
149
 
150
+ $form->label( __( 'Icon background color', 'wp-socializer' ) );
151
  $form->field( 'text', array(
152
  'name' => 'icon_bg_color',
153
  'value' => $form->values['icon_bg_color'],
154
  'class' => 'color_picker',
155
+ 'helper' => __( 'Set empty value to use brand color', 'wp-socializer' )
156
  ));
157
  $form->end();
158
 
159
+ $form->label( __( 'Hover effect', 'wp-socializer' ) );
160
  $form->field( 'select', array(
161
  'name' => 'hover_effect',
162
  'value' => $form->values['hover_effect'],
165
  $form->end();
166
 
167
  $form->start( '', 'data-conditioner data-condr-input=".setting_shape" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
168
+ $form->label( __( 'Space between the icons', 'wp-socializer' ) );
169
  $form->field( 'select', array(
170
  'name' => 'padding',
171
  'value' => $form->values['padding'],
172
  'list' => $form->options[ 'padding' ],
173
+ 'helper' => __( 'Select to add space between the icons', 'wp-socializer' ),
174
  ));
175
  $form->end();
176
 
184
 
185
  echo '<div data-tab="position">';
186
 
187
+ $form->label( __( 'Position of the sharebar', 'wp-socializer' ) );
188
  $form->field( 'select', array(
189
  'name' => 'sb_position',
190
  'value' => $form->values['sb_position'],
194
  $form->end();
195
 
196
  $form->start( '', 'data-conditioner data-condr-input=".setting_sb_position" data-condr-value="scontent" data-condr-action="simple?show:hide" data-condr-events="change"' );
197
+ $form->label( __( 'ID or CSS class name of the content to stick with', 'wp-socializer' ) );
198
  $form->field( 'text', array(
199
  'name' => 'stick_element',
200
  'value' => $form->values['stick_element'],
203
  ));
204
  $form->end();
205
 
206
+ $form->label( __( 'Offset from the window', 'wp-socializer' ) );
207
  $form->field( 'text', array(
208
  'name' => 'offset',
209
  'value' => $form->values[ 'offset' ],
212
  ));
213
  $form->end();
214
 
215
+ $form->label( __( 'Sharebar movement', 'wp-socializer' ) );
216
  $form->field( 'select', array(
217
  'name' => 'movement',
218
  'value' => $form->values['movement'],
230
 
231
  echo '<div data-tab="share_counter">';
232
 
233
+ $form->label( __( 'Share counter', 'wp-socializer' ) );
234
  $form->field( 'select', array(
235
  'name' => 'share_counter',
236
  'value' => $form->values['share_counter'],
240
  $form->end();
241
 
242
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="individual" data-condr-action="pattern?show:hide" data-condr-events="change"' );
243
+ $form->label( __( 'Share counter style', 'wp-socializer' ) );
244
  $form->field( 'image_select', array(
245
  'name' => 'sc_style',
246
  'value' => $form->values['sc_style'],
247
  'list' => $form->options[ 'sc_style' ],
248
+ 'helper' => __( 'To show count, in the same page under icons list, select an icon and enable gear icon &gt; show count', 'wp-socializer' )
249
  ));
250
  $form->end();
251
 
252
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
253
+ $form->label( __( 'Total share count position', 'wp-socializer' ) );
254
  $form->field( 'select', array(
255
  'name' => 'sc_total_position',
256
  'value' => $form->values['sc_total_position'],
259
  $form->end();
260
 
261
  $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
262
+ $form->label( __( 'Total share count color', 'wp-socializer' ) );
263
  $form->field( 'text', array(
264
  'name' => 'sc_total_color',
265
  'value' => $form->values['sc_total_color'],
266
  'class' => 'color_picker',
267
+ 'helper' => __( 'Leave blank to use default color', 'wp-socializer' )
268
  ));
269
  $form->end();
270
 
280
 
281
  echo '<div data-tab="responsiveness">';
282
 
283
+ $form->label( __( 'On desktop (or) large screen', 'wp-socializer' ) );
284
  $form->field( 'select', array(
285
  'name' => 'lg_screen_action',
286
  'value' => $form->values['lg_screen_action'],
288
  ));
289
  $form->end();
290
 
291
+ $form->label( __( 'On mobile (or) small screen', 'wp-socializer' ) );
292
  $form->field( 'select', array(
293
  'name' => 'sm_screen_action',
294
  'value' => $form->values['sm_screen_action'],
296
  ));
297
  $form->end();
298
 
299
+ $form->label( __( 'Responsive width', 'wp-socializer' ) );
300
  $form->field( 'text', array(
301
  'name' => 'sm_screen_width',
302
  'value' => $form->values[ 'sm_screen_width' ],
316
 
317
  echo '<div data-tab="misc">';
318
 
319
+ $form->label( __( 'Number of icons to group into one single icon', 'wp-socializer' ) );
320
  $form->field( 'select', array(
321
  'name' => 'more_icons',
322
  'value' => $form->values['more_icons'],
323
  'list' => $form->options[ 'more_icons' ],
324
+ 'helper' => __( 'Select the number of icons from the end which will should be grouped into one single icon called "More"', 'wp-socializer' )
325
  ));
326
  $form->end();
327
 
339
  update_option( 'wpsr_sharebar_settings', $sb_settings );
340
  }
341
 
342
+ array_walk_recursive( $input, function ( &$value, $key ){
343
+ $value = WPSR_Lists::sanitize_data( $key, $value, array() );
344
+ });
345
+
346
  return $input;
347
+
348
  }
349
 
350
  }
admin/pages/follow-icons.php CHANGED
@@ -19,9 +19,8 @@ class WPSR_Admin_Follow_Icons{
19
  public static function register( $pages ){
20
 
21
  $pages[ 'follow_icons' ] = array(
22
- 'name' => __( 'Follow icons', 'wpsr' ),
23
- 'banner' => WPSR_ADMIN_URL . '/images/banners/follow-icons.svg',
24
- 'description' => __( 'Add floating/sticky follow icons with links to your social media profiles.', 'wpsr' ),
25
  'category' => 'feature',
26
  'type' => 'feature',
27
  'form_name' => 'followbar_settings',
@@ -47,8 +46,8 @@ class WPSR_Admin_Follow_Icons{
47
  $form = new WPSR_Form( $values, $options );
48
 
49
  // Section 0
50
- $form->section_start( __( 'Enable/disable follow icons', 'wpsr' ), '1' );
51
- $form->label( __( 'Select to enable or disable follow icons feature', 'wpsr' ) );
52
  $form->field( 'select', array(
53
  'name' => 'ft_status',
54
  'value' => $values[ 'ft_status' ],
@@ -60,25 +59,25 @@ class WPSR_Admin_Follow_Icons{
60
  echo '<div class="feature_wrap">';
61
 
62
  // Section 1
63
- $form->section_start( __( 'Add and edit follow icons', 'wpsr' ), '2' );
64
- $form->section_description( __( 'Below are the icons added to follow bar. Open editor to add and rearrange the icons.', 'wpsr' ) );
65
 
66
- echo '<h4>' . __( 'Selected icons', 'wpsr' ) . '</h4>';
67
  $template = self::read_template( $values[ 'template' ] );
68
- echo '<div id="fb_prev_wrap">' . $template[ 'prev' ] . '</div>';
69
 
70
- echo '<input type="hidden" id="fb_template_val" name="template" value="' . $values[ 'template' ] . '" />';
71
- echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-cnt-id="fb_template_val" data-prev-id="fb_prev_wrap"><i class="fa fa-pencil-alt"></i> ' . __( 'Open editor', 'wpsr' ) . '</button></p>';
72
  $form->section_end();
73
 
74
  // Settings
75
- $form->section_start( __( 'Settings', 'wpsr' ), '3' );
76
 
77
  $form->tab_list(array(
78
- 'style' => '<i class="fas fa-paint-brush"></i>' . __( 'Style', 'wpsr' ),
79
- 'position' => '<i class="fas fa-arrows-alt"></i>' . __( 'Position', 'wpsr' ),
80
- 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . __( 'Responsiveness', 'wpsr' ),
81
- 'misc' => '<i class="fas fa-cog"></i>' . __( 'Miscellaneous', 'wpsr' ),
82
  ));
83
 
84
  echo '<div class="tab_wrap">';
@@ -91,8 +90,8 @@ class WPSR_Admin_Follow_Icons{
91
  $form->section_end();
92
 
93
  // Location rules
94
- $form->section_start( __( 'Conditions to display the follow icons', 'wpsr' ), '4' );
95
- $form->section_description( __( 'Choose the below options to select the pages which will display the follow icons.', 'wpsr' ) );
96
  WPSR_Location_Rules::display_rules( 'loc_rules', $values[ 'loc_rules' ] );
97
  $form->section_end();
98
 
@@ -103,7 +102,7 @@ class WPSR_Admin_Follow_Icons{
103
 
104
  echo '<div data-tab="style">';
105
 
106
- $form->label( __( 'Icon shape', 'wpsr' ) );
107
  $form->field( 'image_select', array(
108
  'name' => 'shape',
109
  'value' => $form->values[ 'shape' ],
@@ -111,7 +110,7 @@ class WPSR_Admin_Follow_Icons{
111
  ));
112
  $form->end();
113
 
114
- $form->label( __( 'Icon size', 'wpsr' ) );
115
  $form->field( 'image_select', array(
116
  'name' => 'size',
117
  'value' => $form->values[ 'size' ],
@@ -119,16 +118,16 @@ class WPSR_Admin_Follow_Icons{
119
  ));
120
  $form->end();
121
 
122
- $form->label( __( 'Icon background color', 'wpsr' ) );
123
  $form->field( 'text', array(
124
  'name' => 'bg_color',
125
  'value' => $form->values['bg_color'],
126
  'class' => 'color_picker',
127
- 'helper' => __( 'Set empty value to use brand color', 'wpsr' )
128
  ));
129
  $form->end();
130
 
131
- $form->label( __( 'Icon color', 'wpsr' ) );
132
  $form->field( 'text', array(
133
  'name' => 'icon_color',
134
  'value' => $form->values['icon_color'],
@@ -136,7 +135,7 @@ class WPSR_Admin_Follow_Icons{
136
  ));
137
  $form->end();
138
 
139
- $form->label( __( 'Hover effect', 'wpsr' ) );
140
  $form->field( 'select', array(
141
  'name' => 'hover',
142
  'value' => $form->values[ 'hover' ],
@@ -144,12 +143,12 @@ class WPSR_Admin_Follow_Icons{
144
  ));
145
  $form->end();
146
 
147
- $form->label( __ ( 'Space between icons', 'wpsr' ) );
148
  $form->field( 'select', array(
149
  'name' => 'pad',
150
  'value' => $form->values[ 'pad' ],
151
  'list' => $form->options[ 'pad' ],
152
- 'helper' => __( 'Select to add space between buttons', 'wpsr' )
153
  ));
154
  $form->end();
155
 
@@ -163,7 +162,7 @@ class WPSR_Admin_Follow_Icons{
163
 
164
  echo '<div data-tab="position">';
165
 
166
- $form->label( __( 'Orientation', 'wpsr' ) );
167
  $form->field( 'image_select', array(
168
  'name' => 'orientation',
169
  'value' => $form->values[ 'orientation' ],
@@ -171,7 +170,7 @@ class WPSR_Admin_Follow_Icons{
171
  ));
172
  $form->end();
173
 
174
- $form->label( __( 'Position', 'wpsr' ) );
175
  $form->field( 'image_select', array(
176
  'name' => 'position',
177
  'value' => $form->values[ 'position' ],
@@ -181,7 +180,7 @@ class WPSR_Admin_Follow_Icons{
181
 
182
  $form->build();
183
 
184
- WPSR_Admin_Shortcodes::note( __( 'Follow icons', 'wpsr' ), 'wpsr_follow_icons' );
185
 
186
  echo '</div>';
187
 
@@ -191,7 +190,7 @@ class WPSR_Admin_Follow_Icons{
191
 
192
  echo '<div data-tab="responsiveness">';
193
 
194
- $form->label( __( 'On desktop (or) large screen', 'wpsr' ) );
195
  $form->field( 'select', array(
196
  'name' => 'lg_screen_action',
197
  'value' => $form->values[ 'lg_screen_action' ],
@@ -199,7 +198,7 @@ class WPSR_Admin_Follow_Icons{
199
  ));
200
  $form->end();
201
 
202
- $form->label( __( 'On mobile (or) small screen', 'wpsr' ) );
203
  $form->field( 'select', array(
204
  'name' => 'sm_screen_action',
205
  'value' => $form->values[ 'sm_screen_action' ],
@@ -207,7 +206,7 @@ class WPSR_Admin_Follow_Icons{
207
  ));
208
  $form->end();
209
 
210
- $form->label( __( 'Responsive width', 'wpsr' ) );
211
  $form->field( 'text', array(
212
  'name' => 'sm_screen_width',
213
  'value' => $form->values[ 'sm_screen_width' ],
@@ -227,15 +226,15 @@ class WPSR_Admin_Follow_Icons{
227
 
228
  echo '<div data-tab="misc">';
229
 
230
- $form->label( __( 'Text above the icons', 'wpsr' ) );
231
  $form->field( 'text', array(
232
  'name' => 'title',
233
  'value' => $form->values['title'],
234
- 'helper' => __( 'Text to show above the follow icons', 'wpsr' ),
235
  ));
236
  $form->end();
237
 
238
- $form->label( __( 'Open links in popup', 'wpsr' ) );
239
  $form->field( 'select', array(
240
  'name' => 'open_popup',
241
  'value' => $form->values[ 'open_popup' ],
@@ -250,9 +249,17 @@ class WPSR_Admin_Follow_Icons{
250
  }
251
 
252
  public static function validation( $input ){
 
 
 
 
 
 
 
253
  return $input;
 
254
  }
255
-
256
  public static function popup_editor(){
257
 
258
  global $hook_suffix;
@@ -261,8 +268,9 @@ class WPSR_Admin_Follow_Icons{
261
 
262
  iframe_header( 'WP Socializer follow icons editor' );
263
 
264
- if( !isset( $_GET[ 'template' ] ) || !isset( $_GET[ 'cnt_id' ] ) || !isset( $_GET[ 'prev_id' ] ) ){
265
  echo '<p align="center">Incomplete info to load editor !</p></body></html>';
 
266
  }
267
 
268
  $sb_sites = WPSR_Lists::social_icons();
@@ -272,7 +280,7 @@ class WPSR_Admin_Follow_Icons{
272
 
273
  echo '<div id="wpsr_pp_editor">';
274
  echo '<h2>WP Socializer - Follow icons editor</h2>';
275
- echo '<p>' . __( 'Select the follow icon below and add it to follow icons list. Drag and drop to rearrange the icons.', 'wpsr' ) . '</p>';
276
 
277
  echo '<table class="form-table follow_bar_tbl"><tr><td width="80%">';
278
  echo '<select class="fb_list widefat">';
@@ -280,16 +288,16 @@ class WPSR_Admin_Follow_Icons{
280
  if( !in_array( 'for_profile', $prop[ 'features' ] ) ){
281
  continue;
282
  }
283
- echo '<option value="' . $id . '">' . $prop[ 'name' ] . '</option>';
284
  }
285
  echo '</select>';
286
  echo '</td><td>';
287
- echo '<button class="fb_add button button-primary widefat">' . __( 'Add to follow icons', 'wpsr' ) . '</button>';
288
  echo '</td></tr></table>';
289
 
290
- $template = self::read_template( esc_attr( $_GET[ 'template' ] ) );
291
  echo '<ul class="fb_selected">';
292
- echo $template[ 'editor' ];
293
  echo '</ul>';
294
 
295
  echo '<input type="hidden" class="fb_template" />';
@@ -307,15 +315,14 @@ class WPSR_Admin_Follow_Icons{
307
  echo '</div>';
308
 
309
  iframe_footer();
310
- die( 0 );
311
 
312
  }
313
 
314
  public static function read_template( $template = '' ){
315
 
316
- $decoded = base64_decode( $template );
317
- $btns = json_decode( $decoded );
318
-
319
  if( !is_array( $btns ) ){
320
  return array(
321
  'prev' => '',
@@ -329,7 +336,7 @@ class WPSR_Admin_Follow_Icons{
329
 
330
  foreach( $btns as $btn_obj ){
331
 
332
- $id = key( (array) $btn_obj );
333
 
334
  if(!array_key_exists($id, $sb_sites)){
335
  continue;
@@ -337,12 +344,12 @@ class WPSR_Admin_Follow_Icons{
337
 
338
  $prop = $sb_sites[ $id ];
339
 
340
- $editor .= self::li_template( $id, $prop[ 'name' ], $prop[ 'icon' ], $prop[ 'colors' ][0], $btn_obj->$id->url, $btn_obj->$id->icon, $btn_obj->$id->text );
341
  $prev .= '<li title="' . esc_attr( $prop[ 'name' ] ) . '" style="background-color:' . esc_attr( $prop[ 'colors' ][0] ) . '"><i class="' . esc_attr( $prop[ 'icon' ] ) . '"></i></li>';
342
  }
343
 
344
  if( $prev == '' )
345
- $prev = '<span>' . __( 'No buttons are added. Open the editor to add buttons.', 'wpsr' ) . '</span>';
346
 
347
  $prev = '<ul class="fb_preview">' . $prev . '</ul>';
348
 
@@ -355,12 +362,12 @@ class WPSR_Admin_Follow_Icons{
355
 
356
  public static function li_template( $id = '%id%', $name = '%name%', $icon = '%icon%', $color = '%color%', $url = '%url%', $iurl = '%iurl%', $text = '%text%' ){
357
 
358
- $title = __( 'Leave blank to use default', 'wpsr' );
359
- $label_url = __( 'Your profile URL (start with https://)', 'wpsr' );
360
- $label_hover_text = __( 'Button hover text', 'wpsr' );
361
- $label_icon_url = __( 'Icon image URL (optional)', 'wpsr' );
362
 
363
- return '<li data-id="' . $id . '"><h4 style="background-color: ' . $color . '" title="' . esc_attr( $name ) . '"><i class="' . $icon . ' item_icon"></i>' . $name . '<a href="#" class="fb_item_control fb_item_remove">' . __( 'Delete', 'wpsr' ) . '</a></h4><div><label><span>' . $label_url . '</span><input type="text" class="widefat fb_item_url" placeholder="Enter profile URL" value="' . $url . '" /></label><label><span>' . $label_hover_text . '</span><input type="text" class="widefat fb_btn_text" placeholder="Enter custom text to show for button" title="' . $title . '" value="' . urldecode( $text ) . '"/></label><label><span>' . $label_icon_url . '</span><input type="text" class="widefat fb_icon_url" placeholder="Enter custom Icon URL." title="' . $title . '" value="' . $iurl . '"/></label></div></li>';
364
 
365
  }
366
 
19
  public static function register( $pages ){
20
 
21
  $pages[ 'follow_icons' ] = array(
22
+ 'name' => __( 'Follow icons', 'wp-socializer' ),
23
+ 'description' => __( 'Add floating/sticky follow icons with links to your social media profiles.', 'wp-socializer' ),
 
24
  'category' => 'feature',
25
  'type' => 'feature',
26
  'form_name' => 'followbar_settings',
46
  $form = new WPSR_Form( $values, $options );
47
 
48
  // Section 0
49
+ $form->section_start( __( 'Enable/disable follow icons', 'wp-socializer' ), '1' );
50
+ $form->label( __( 'Select to enable or disable follow icons feature', 'wp-socializer' ) );
51
  $form->field( 'select', array(
52
  'name' => 'ft_status',
53
  'value' => $values[ 'ft_status' ],
59
  echo '<div class="feature_wrap">';
60
 
61
  // Section 1
62
+ $form->section_start( __( 'Add and edit follow icons', 'wp-socializer' ), '2' );
63
+ $form->section_description( __( 'Below are the icons added to follow bar. Open editor to add and rearrange the icons.', 'wp-socializer' ) );
64
 
65
+ echo '<h4>' . esc_html__( 'Selected icons', 'wp-socializer' ) . '</h4>';
66
  $template = self::read_template( $values[ 'template' ] );
67
+ echo '<div id="fb_prev_wrap">' . wp_kses( $template[ 'prev' ], WPSR_Lists::allowed_tags() ) . '</div>';
68
 
69
+ echo '<input type="hidden" id="fb_template_val" name="template" value="' . esc_attr( $values[ 'template' ] ) . '" />';
70
+ echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-cnt-id="fb_template_val" data-prev-id="fb_prev_wrap"><i class="fa fa-pencil-alt"></i> ' . esc_html__( 'Open editor', 'wp-socializer' ) . '</button></p>';
71
  $form->section_end();
72
 
73
  // Settings
74
+ $form->section_start( __( 'Settings', 'wp-socializer' ), '3' );
75
 
76
  $form->tab_list(array(
77
+ 'style' => '<i class="fas fa-paint-brush"></i>' . esc_html__( 'Style', 'wp-socializer' ),
78
+ 'position' => '<i class="fas fa-arrows-alt"></i>' . esc_html__( 'Position', 'wp-socializer' ),
79
+ 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . esc_html__( 'Responsiveness', 'wp-socializer' ),
80
+ 'misc' => '<i class="fas fa-cog"></i>' . esc_html__( 'Miscellaneous', 'wp-socializer' ),
81
  ));
82
 
83
  echo '<div class="tab_wrap">';
90
  $form->section_end();
91
 
92
  // Location rules
93
+ $form->section_start( __( 'Conditions to display the follow icons', 'wp-socializer' ), '4' );
94
+ $form->section_description( __( 'Choose the below options to select the pages which will display the follow icons.', 'wp-socializer' ) );
95
  WPSR_Location_Rules::display_rules( 'loc_rules', $values[ 'loc_rules' ] );
96
  $form->section_end();
97
 
102
 
103
  echo '<div data-tab="style">';
104
 
105
+ $form->label( __( 'Icon shape', 'wp-socializer' ) );
106
  $form->field( 'image_select', array(
107
  'name' => 'shape',
108
  'value' => $form->values[ 'shape' ],
110
  ));
111
  $form->end();
112
 
113
+ $form->label( __( 'Icon size', 'wp-socializer' ) );
114
  $form->field( 'image_select', array(
115
  'name' => 'size',
116
  'value' => $form->values[ 'size' ],
118
  ));
119
  $form->end();
120
 
121
+ $form->label( __( 'Icon background color', 'wp-socializer' ) );
122
  $form->field( 'text', array(
123
  'name' => 'bg_color',
124
  'value' => $form->values['bg_color'],
125
  'class' => 'color_picker',
126
+ 'helper' => __( 'Set empty value to use brand color', 'wp-socializer' )
127
  ));
128
  $form->end();
129
 
130
+ $form->label( __( 'Icon color', 'wp-socializer' ) );
131
  $form->field( 'text', array(
132
  'name' => 'icon_color',
133
  'value' => $form->values['icon_color'],
135
  ));
136
  $form->end();
137
 
138
+ $form->label( __( 'Hover effect', 'wp-socializer' ) );
139
  $form->field( 'select', array(
140
  'name' => 'hover',
141
  'value' => $form->values[ 'hover' ],
143
  ));
144
  $form->end();
145
 
146
+ $form->label( __ ( 'Space between icons', 'wp-socializer' ) );
147
  $form->field( 'select', array(
148
  'name' => 'pad',
149
  'value' => $form->values[ 'pad' ],
150
  'list' => $form->options[ 'pad' ],
151
+ 'helper' => __( 'Select to add space between buttons', 'wp-socializer' )
152
  ));
153
  $form->end();
154
 
162
 
163
  echo '<div data-tab="position">';
164
 
165
+ $form->label( __( 'Orientation', 'wp-socializer' ) );
166
  $form->field( 'image_select', array(
167
  'name' => 'orientation',
168
  'value' => $form->values[ 'orientation' ],
170
  ));
171
  $form->end();
172
 
173
+ $form->label( __( 'Position', 'wp-socializer' ) );
174
  $form->field( 'image_select', array(
175
  'name' => 'position',
176
  'value' => $form->values[ 'position' ],
180
 
181
  $form->build();
182
 
183
+ WPSR_Admin_Shortcodes::note( __( 'Follow icons', 'wp-socializer' ), 'wpsr_follow_icons' );
184
 
185
  echo '</div>';
186
 
190
 
191
  echo '<div data-tab="responsiveness">';
192
 
193
+ $form->label( __( 'On desktop (or) large screen', 'wp-socializer' ) );
194
  $form->field( 'select', array(
195
  'name' => 'lg_screen_action',
196
  'value' => $form->values[ 'lg_screen_action' ],
198
  ));
199
  $form->end();
200
 
201
+ $form->label( __( 'On mobile (or) small screen', 'wp-socializer' ) );
202
  $form->field( 'select', array(
203
  'name' => 'sm_screen_action',
204
  'value' => $form->values[ 'sm_screen_action' ],
206
  ));
207
  $form->end();
208
 
209
+ $form->label( __( 'Responsive width', 'wp-socializer' ) );
210
  $form->field( 'text', array(
211
  'name' => 'sm_screen_width',
212
  'value' => $form->values[ 'sm_screen_width' ],
226
 
227
  echo '<div data-tab="misc">';
228
 
229
+ $form->label( __( 'Text above the icons', 'wp-socializer' ) );
230
  $form->field( 'text', array(
231
  'name' => 'title',
232
  'value' => $form->values['title'],
233
+ 'helper' => __( 'Text to show above the follow icons', 'wp-socializer' ),
234
  ));
235
  $form->end();
236
 
237
+ $form->label( __( 'Open links in popup', 'wp-socializer' ) );
238
  $form->field( 'select', array(
239
  'name' => 'open_popup',
240
  'value' => $form->values[ 'open_popup' ],
249
  }
250
 
251
  public static function validation( $input ){
252
+
253
+ array_walk_recursive( $input, function ( &$value, $key ){
254
+ $value = WPSR_Lists::sanitize_data( $key, $value, array(
255
+ 'title'
256
+ ));
257
+ });
258
+
259
  return $input;
260
+
261
  }
262
+
263
  public static function popup_editor(){
264
 
265
  global $hook_suffix;
268
 
269
  iframe_header( 'WP Socializer follow icons editor' );
270
 
271
+ if( !isset( $_GET[ 'cnt_id' ] ) || !isset( $_GET[ 'prev_id' ] ) ){
272
  echo '<p align="center">Incomplete info to load editor !</p></body></html>';
273
+ wp_die();
274
  }
275
 
276
  $sb_sites = WPSR_Lists::social_icons();
280
 
281
  echo '<div id="wpsr_pp_editor">';
282
  echo '<h2>WP Socializer - Follow icons editor</h2>';
283
+ echo '<p>' . esc_html__( 'Select the follow icon below and add it to follow icons list. Drag and drop to rearrange the icons.', 'wp-socializer' ) . '</p>';
284
 
285
  echo '<table class="form-table follow_bar_tbl"><tr><td width="80%">';
286
  echo '<select class="fb_list widefat">';
288
  if( !in_array( 'for_profile', $prop[ 'features' ] ) ){
289
  continue;
290
  }
291
+ echo '<option value="' . esc_attr( $id ) . '">' . esc_html( $prop[ 'name' ] ) . '</option>';
292
  }
293
  echo '</select>';
294
  echo '</td><td>';
295
+ echo '<button class="fb_add button button-primary widefat">' . esc_html__( 'Add to follow icons', 'wp-socializer' ) . '</button>';
296
  echo '</td></tr></table>';
297
 
298
+ $template = self::read_template();
299
  echo '<ul class="fb_selected">';
300
+ echo wp_kses( $template[ 'editor' ], WPSR_Lists::allowed_tags() );
301
  echo '</ul>';
302
 
303
  echo '<input type="hidden" class="fb_template" />';
315
  echo '</div>';
316
 
317
  iframe_footer();
318
+ wp_die();
319
 
320
  }
321
 
322
  public static function read_template( $template = '' ){
323
 
324
+ $btns = WPSR_Lists::parse_template( $template );
325
+
 
326
  if( !is_array( $btns ) ){
327
  return array(
328
  'prev' => '',
336
 
337
  foreach( $btns as $btn_obj ){
338
 
339
+ $id = key( $btn_obj );
340
 
341
  if(!array_key_exists($id, $sb_sites)){
342
  continue;
344
 
345
  $prop = $sb_sites[ $id ];
346
 
347
+ $editor .= self::li_template( $id, $prop[ 'name' ], $prop[ 'icon' ], $prop[ 'colors' ][0], $btn_obj[ $id ][ 'url' ], $btn_obj[ $id ][ 'icon' ], $btn_obj[ $id ][ 'text' ] );
348
  $prev .= '<li title="' . esc_attr( $prop[ 'name' ] ) . '" style="background-color:' . esc_attr( $prop[ 'colors' ][0] ) . '"><i class="' . esc_attr( $prop[ 'icon' ] ) . '"></i></li>';
349
  }
350
 
351
  if( $prev == '' )
352
+ $prev = '<span>' . esc_html__( 'No buttons are added. Open the editor to add buttons.', 'wp-socializer' ) . '</span>';
353
 
354
  $prev = '<ul class="fb_preview">' . $prev . '</ul>';
355
 
362
 
363
  public static function li_template( $id = '%id%', $name = '%name%', $icon = '%icon%', $color = '%color%', $url = '%url%', $iurl = '%iurl%', $text = '%text%' ){
364
 
365
+ $title = __( 'Leave blank to use default', 'wp-socializer' );
366
+ $label_url = __( 'Your profile URL (start with https://)', 'wp-socializer' );
367
+ $label_hover_text = __( 'Button hover text', 'wp-socializer' );
368
+ $label_icon_url = __( 'Icon image URL (optional)', 'wp-socializer' );
369
 
370
+ return '<li data-id="' . esc_attr( $id ) . '"><h4 style="background-color: ' . esc_attr( $color ) . '" title="' . esc_attr( $name ) . '"><i class="' . esc_attr( $icon ) . ' item_icon"></i>' . esc_html( $name ) . '<a href="#" class="fb_item_control fb_item_remove">' . __( 'Delete', 'wp-socializer' ) . '</a></h4><div><label><span>' . esc_html( $label_url ) . '</span><input type="text" class="widefat fb_item_url" placeholder="Enter profile URL" value="' . esc_attr( $url ) . '" /></label><label><span>' . esc_html( $label_hover_text ) . '</span><input type="text" class="widefat fb_btn_text" placeholder="Enter custom text to show for button" title="' . esc_attr( $title ) . '" value="' . esc_attr( $text ) . '"/></label><label><span>' . esc_html( $label_icon_url ) . '</span><input type="text" class="widefat fb_icon_url" placeholder="Enter custom Icon URL." title="' . esc_attr( $title ) . '" value="' . esc_attr( $iurl ) . '"/></label></div></li>';
371
 
372
  }
373
 
admin/pages/general-settings.php CHANGED
@@ -19,8 +19,7 @@ class WPSR_Admin_Settings{
19
  function register( $pages ){
20
 
21
  $pages[ 'general_settings' ] = array(
22
- 'name' => __( 'Settings', 'wpsr' ),
23
- 'banner' => WPSR_ADMIN_URL . '/images/banners/settings.svg',
24
  'category' => 'other',
25
  'type' => 'settings',
26
  'form_name' => 'general_settings',
@@ -39,15 +38,27 @@ class WPSR_Admin_Settings{
39
  WPSR_Admin::settings_form( 'general_settings' );
40
  }
41
 
42
- function validation( $values ){
43
 
44
- if( intval( $values[ 'counter_expiration' ] ) < 1800 ){
45
- $values[ 'counter_expiration' ] = 1800;
46
  }
47
 
48
- return $values;
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
-
51
  function general_settings( $values ){
52
 
53
  $form = new WPSR_Form();
@@ -55,9 +66,9 @@ class WPSR_Admin_Settings{
55
  $options = WPSR_Options::options( 'general_settings' );
56
 
57
  // Share icons settings
58
- $form->section_start( __( 'Share icons settings', 'wpsr' ) );
59
 
60
- $form->label( __( 'Show share menu', 'wpsr' ) );
61
  $form->field( 'select', array(
62
  'type' => 'number',
63
  'name' => 'share_menu',
@@ -66,14 +77,14 @@ class WPSR_Admin_Settings{
66
  ));
67
  $form->end();
68
 
69
- $form->label( __( 'Facebook App ID', 'wpsr' ) );
70
  $form->field( 'text', array(
71
  'name' => 'facebook_app_id',
72
  'value' => $values[ 'facebook_app_id' ]
73
  ));
74
  $form->end();
75
 
76
- $form->label( __( 'Facebook App secret', 'wpsr' ) );
77
  $form->field( 'text', array(
78
  'name' => 'facebook_app_secret',
79
  'value' => $values[ 'facebook_app_secret' ],
@@ -81,7 +92,7 @@ class WPSR_Admin_Settings{
81
  ));
82
  $form->end();
83
 
84
- $form->label( __( 'Facebook SDK language', 'wpsr' ) );
85
  $form->field( 'select', array(
86
  'name' => 'facebook_lang',
87
  'value' => $values[ 'facebook_lang' ],
@@ -89,19 +100,19 @@ class WPSR_Admin_Settings{
89
  ));
90
  $form->end();
91
 
92
- $form->label( __( 'Twitter username', 'wpsr' ) );
93
  $form->field( 'text', array(
94
  'name' => 'twitter_username',
95
  'value' => $values[ 'twitter_username' ],
96
- 'helper' => __( 'Your twitter username without @ sign', 'wpsr' )
97
  ));
98
  $form->end();
99
 
100
- $form->label( __( 'Comments section ID', 'wpsr' ) );
101
  $form->field( 'text', array(
102
  'name' => 'comments_section',
103
  'value' => $values[ 'comments_section' ],
104
- 'helper' => __( 'The ID of the comments section. This is used by the comments button to navigate.', 'wpsr' )
105
  ));
106
  $form->end();
107
 
@@ -109,24 +120,24 @@ class WPSR_Admin_Settings{
109
  $form->section_end();
110
 
111
  // Share counter
112
- $form->section_start( __( 'Share counter settings', 'wpsr' ) );
113
 
114
- $form->label( __( 'Share count cache duration', 'wpsr' ) );
115
  $form->field( 'text', array(
116
  'type' => 'number',
117
  'name' => 'counter_expiration',
118
  'value' => $values[ 'counter_expiration' ],
119
  'after_text' => 'seconds',
120
- 'helper' => __( 'Enter the number of seconds to cache the share count for every URL in the database. Default is 43200 seconds i.e 1/2 day. Minimum value required is 1800 seconds i.e 30 minutes', 'wpsr' )
121
  ));
122
  $form->end();
123
 
124
- $form->label( __( 'Include share count of both http and https URL ?', 'wpsr' ) );
125
  $form->field( 'select', array(
126
  'name' => 'counter_both_protocols',
127
  'value' => $values[ 'counter_both_protocols' ],
128
  'list' => $options[ 'counter_both_protocols' ],
129
- 'helper' => __( 'If your site was migrated from http to https and lost your share counts then please enable this option to include the old URL for the count.', 'wpsr' )
130
  ));
131
  $form->end();
132
 
@@ -134,7 +145,7 @@ class WPSR_Admin_Settings{
134
  $form->section_end();
135
 
136
  // Misc settings
137
- $form->section_start( __( 'Miscellaneous settings', 'wpsr' ) );
138
 
139
  $font_icons = WPSR_Lists::font_icons();
140
  $font_icons_list = array();
@@ -146,7 +157,7 @@ class WPSR_Admin_Settings{
146
  $inc_list = WPSR_Includes::list_all();
147
  $inc_text = '<code>' . implode('</code>, <code>', array_keys($inc_list) ) . '</code>';
148
 
149
- $form->label( __( 'Font icon', 'wpsr' ) );
150
  $form->field( 'select', array(
151
  'name' => 'font_icon',
152
  'value' => $values['font_icon'],
@@ -154,21 +165,21 @@ class WPSR_Admin_Settings{
154
  ));
155
  $form->end();
156
 
157
- $form->label( __( 'Additional CSS rules', 'wpsr' ) );
158
  $form->field( 'textarea', array(
159
  'name' => 'misc_additional_css',
160
  'value' => $values['misc_additional_css'],
161
- 'helper' => __( 'Enter custom CSS rules to customize without the style tag', 'wpsr' ),
162
  'rows' => '3',
163
  'class' => 'widefat'
164
  ));
165
  $form->end();
166
 
167
- $form->label( __( 'CSS/JS to not to load in any page', 'wpsr' ) );
168
  $form->field( 'text', array(
169
  'name' => 'skip_res_load',
170
  'value' => $values['skip_res_load'],
171
- 'helper' => __( 'Enter the ID of the CSS/JS resources to not to load in any page. <a href="#" class="tblr_btn" data-id="res_info_box">Click here</a> to see the list of resources. <div class="hidden" data-tglr="res_info_box"><p>' . $inc_text . '</p> <p>Enter the IDs separated by comma. <b>Note: Many of the resources are intelligently loaded based on buttons used in the page. Please use this field only after discussion with the developer.</b></p></div>', 'wpsr' )
172
  ));
173
  $form->end();
174
 
19
  function register( $pages ){
20
 
21
  $pages[ 'general_settings' ] = array(
22
+ 'name' => __( 'Settings', 'wp-socializer' ),
 
23
  'category' => 'other',
24
  'type' => 'settings',
25
  'form_name' => 'general_settings',
38
  WPSR_Admin::settings_form( 'general_settings' );
39
  }
40
 
41
+ function validation( $input ){
42
 
43
+ if( intval( $input[ 'counter_expiration' ] ) < 1800 ){
44
+ $input[ 'counter_expiration' ] = 1800;
45
  }
46
 
47
+ array_walk_recursive( $input, function ( &$value, $key ){
48
+
49
+ if( $key == 'misc_additional_css' ){
50
+ $value = sanitize_textarea_field( $value );
51
+ return;
52
+ }
53
+
54
+ $value = WPSR_Lists::sanitize_data( $key, $value, array());
55
+
56
+ });
57
+
58
+ return $input;
59
+
60
  }
61
+
62
  function general_settings( $values ){
63
 
64
  $form = new WPSR_Form();
66
  $options = WPSR_Options::options( 'general_settings' );
67
 
68
  // Share icons settings
69
+ $form->section_start( __( 'Share icons settings', 'wp-socializer' ) );
70
 
71
+ $form->label( __( 'Show share menu', 'wp-socializer' ) );
72
  $form->field( 'select', array(
73
  'type' => 'number',
74
  'name' => 'share_menu',
77
  ));
78
  $form->end();
79
 
80
+ $form->label( __( 'Facebook App ID', 'wp-socializer' ) );
81
  $form->field( 'text', array(
82
  'name' => 'facebook_app_id',
83
  'value' => $values[ 'facebook_app_id' ]
84
  ));
85
  $form->end();
86
 
87
+ $form->label( __( 'Facebook App secret', 'wp-socializer' ) );
88
  $form->field( 'text', array(
89
  'name' => 'facebook_app_secret',
90
  'value' => $values[ 'facebook_app_secret' ],
92
  ));
93
  $form->end();
94
 
95
+ $form->label( __( 'Facebook SDK language', 'wp-socializer' ) );
96
  $form->field( 'select', array(
97
  'name' => 'facebook_lang',
98
  'value' => $values[ 'facebook_lang' ],
100
  ));
101
  $form->end();
102
 
103
+ $form->label( __( 'Twitter username', 'wp-socializer' ) );
104
  $form->field( 'text', array(
105
  'name' => 'twitter_username',
106
  'value' => $values[ 'twitter_username' ],
107
+ 'helper' => __( 'Your twitter username without @ sign', 'wp-socializer' )
108
  ));
109
  $form->end();
110
 
111
+ $form->label( __( 'Comments section ID', 'wp-socializer' ) );
112
  $form->field( 'text', array(
113
  'name' => 'comments_section',
114
  'value' => $values[ 'comments_section' ],
115
+ 'helper' => __( 'The ID of the comments section. This is used by the comments button to navigate.', 'wp-socializer' )
116
  ));
117
  $form->end();
118
 
120
  $form->section_end();
121
 
122
  // Share counter
123
+ $form->section_start( __( 'Share counter settings', 'wp-socializer' ) );
124
 
125
+ $form->label( __( 'Share count cache duration', 'wp-socializer' ) );
126
  $form->field( 'text', array(
127
  'type' => 'number',
128
  'name' => 'counter_expiration',
129
  'value' => $values[ 'counter_expiration' ],
130
  'after_text' => 'seconds',
131
+ 'helper' => __( 'Enter the number of seconds to cache the share count for every URL in the database. Default is 43200 seconds i.e 1/2 day. Minimum value required is 1800 seconds i.e 30 minutes', 'wp-socializer' )
132
  ));
133
  $form->end();
134
 
135
+ $form->label( __( 'Include share count of both http and https URL ?', 'wp-socializer' ) );
136
  $form->field( 'select', array(
137
  'name' => 'counter_both_protocols',
138
  'value' => $values[ 'counter_both_protocols' ],
139
  'list' => $options[ 'counter_both_protocols' ],
140
+ 'helper' => __( 'If your site was migrated from http to https and lost your share counts then please enable this option to include the old URL for the count.', 'wp-socializer' )
141
  ));
142
  $form->end();
143
 
145
  $form->section_end();
146
 
147
  // Misc settings
148
+ $form->section_start( __( 'Miscellaneous settings', 'wp-socializer' ) );
149
 
150
  $font_icons = WPSR_Lists::font_icons();
151
  $font_icons_list = array();
157
  $inc_list = WPSR_Includes::list_all();
158
  $inc_text = '<code>' . implode('</code>, <code>', array_keys($inc_list) ) . '</code>';
159
 
160
+ $form->label( __( 'Font icon', 'wp-socializer' ) );
161
  $form->field( 'select', array(
162
  'name' => 'font_icon',
163
  'value' => $values['font_icon'],
165
  ));
166
  $form->end();
167
 
168
+ $form->label( __( 'Additional CSS rules', 'wp-socializer' ) );
169
  $form->field( 'textarea', array(
170
  'name' => 'misc_additional_css',
171
  'value' => $values['misc_additional_css'],
172
+ 'helper' => __( 'Enter custom CSS rules to customize without the style tag', 'wp-socializer' ),
173
  'rows' => '3',
174
  'class' => 'widefat'
175
  ));
176
  $form->end();
177
 
178
+ $form->label( __( 'CSS/JS to not to load in any page', 'wp-socializer' ) );
179
  $form->field( 'text', array(
180
  'name' => 'skip_res_load',
181
  'value' => $values['skip_res_load'],
182
+ 'helper' => __( 'Enter the ID of the CSS/JS resources to not to load in any page. <a href="#" class="tblr_btn" data-id="res_info_box">Click here</a> to see the list of resources. <div class="hidden" data-tglr="res_info_box"><p>' . $inc_text . '</p> <p>Enter the IDs separated by comma. <b>Note: Many of the resources are intelligently loaded based on buttons used in the page. Please use this field only after discussion with the developer.</b></p></div>', 'wp-socializer' )
183
  ));
184
  $form->end();
185
 
admin/pages/import-export.php CHANGED
@@ -17,8 +17,7 @@ class WPSR_Admin_Import_Export{
17
  function register( $pages ){
18
 
19
  $pages[ 'import_export' ] = array(
20
- 'name' => __( 'Import/Export', 'wpsr' ),
21
- 'banner' => WPSR_ADMIN_URL . '/images/banners/import-export.svg',
22
  'category' => 'other',
23
  'type' => 'settings',
24
  'callbacks' => array(
@@ -34,18 +33,18 @@ class WPSR_Admin_Import_Export{
34
 
35
  $form = new WPSR_Form();
36
 
37
- echo '<div class="notice notice-success inline hidden"><p>' . __( 'Successful imported data !', 'wpsr' ) . '</p></div>';
38
- echo '<div class="notice notice-error inline hidden"><p>' . __( 'Failed to import data, please re-import the data !', 'wpsr' ) . '</p></div>';
39
 
40
  echo '<form id="import_form">';
41
 
42
- $form->section_start( __( 'Import data', 'wpsr' ) );
43
- $form->section_description( __( 'Import the already exported WP Socializer data using the field below. Please note that importing will <b>overwrite</b> all the existing buttons created and the settings.', 'wpsr' ) );
44
- $form->label( __( 'Import data', 'wpsr' ) );
45
  $form->field( 'textarea', array(
46
  'name' => 'import_data',
47
  'value' => '',
48
- 'helper' => __( 'Paste the exported data into the text box above.', 'wpsr' ),
49
  'rows' => '3',
50
  'class' => 'widefat'
51
  ));
@@ -54,15 +53,15 @@ class WPSR_Admin_Import_Export{
54
 
55
  wp_nonce_field( 'wpsr_import_nonce' );
56
 
57
- echo '<p align="center"><input type="submit" class="import_form_submit button button-primary" value="' . __( 'Import settings', 'wpsr' ) . '" /></p>';
58
  echo '</form>';
59
 
60
- $form->section_start( __( 'Export', 'wpsr' ) );
61
- $form->label( __( 'Export data', 'wpsr' ) );
62
  $form->field( 'textarea', array(
63
  'name' => 'export_data',
64
  'value' => WPSR_Import_Export::export(),
65
- 'helper' => __( 'Copy the data above, save it and import it later', 'wpsr' ),
66
  'rows' => '3',
67
  'class' => 'widefat',
68
  'custom' => 'onClick="this.select();"'
@@ -72,10 +71,6 @@ class WPSR_Admin_Import_Export{
72
 
73
  }
74
 
75
- function validation( $input ){
76
- return $input;
77
- }
78
-
79
  }
80
 
81
  new WPSR_Admin_Import_Export();
17
  function register( $pages ){
18
 
19
  $pages[ 'import_export' ] = array(
20
+ 'name' => __( 'Import/Export', 'wp-socializer' ),
 
21
  'category' => 'other',
22
  'type' => 'settings',
23
  'callbacks' => array(
33
 
34
  $form = new WPSR_Form();
35
 
36
+ echo '<div class="notice notice-success inline hidden"><p>' . esc_html__( 'Successful imported data !', 'wp-socializer' ) . '</p></div>';
37
+ echo '<div class="notice notice-error inline hidden"><p>' . esc_html__( 'Failed to import data, please re-import the data !', 'wp-socializer' ) . '</p></div>';
38
 
39
  echo '<form id="import_form">';
40
 
41
+ $form->section_start( __( 'Import data', 'wp-socializer' ) );
42
+ $form->section_description( __( 'Import the already exported WP Socializer data using the field below. Please note that importing will <b>overwrite</b> all the existing buttons created and the settings.', 'wp-socializer' ) );
43
+ $form->label( __( 'Import data', 'wp-socializer' ) );
44
  $form->field( 'textarea', array(
45
  'name' => 'import_data',
46
  'value' => '',
47
+ 'helper' => __( 'Paste the exported data into the text box above.', 'wp-socializer' ),
48
  'rows' => '3',
49
  'class' => 'widefat'
50
  ));
53
 
54
  wp_nonce_field( 'wpsr_import_nonce' );
55
 
56
+ echo '<p align="center"><input type="submit" class="import_form_submit button button-primary" value="' . __( 'Import settings', 'wp-socializer' ) . '" /></p>';
57
  echo '</form>';
58
 
59
+ $form->section_start( __( 'Export', 'wp-socializer' ) );
60
+ $form->label( __( 'Export data', 'wp-socializer' ) );
61
  $form->field( 'textarea', array(
62
  'name' => 'export_data',
63
  'value' => WPSR_Import_Export::export(),
64
+ 'helper' => __( 'Copy the data above, save it and import it later', 'wp-socializer' ),
65
  'rows' => '3',
66
  'class' => 'widefat',
67
  'custom' => 'onClick="this.select();"'
71
 
72
  }
73
 
 
 
 
 
74
  }
75
 
76
  new WPSR_Admin_Import_Export();
admin/pages/share-icons.php CHANGED
@@ -17,9 +17,8 @@ class WPSR_Admin_Share_Icons{
17
  function register( $pages ){
18
 
19
  $pages[ 'share_icons' ] = array(
20
- 'name' => __( 'Share icons', 'wpsr' ),
21
- 'banner' => WPSR_ADMIN_URL . '/images/banners/share-icons.svg',
22
- 'description' => __( 'Add icons above and below posts to share the content on social media sites.', 'wpsr' ),
23
  'category' => 'feature',
24
  'type' => 'feature',
25
  'form_name' => 'social_icons_settings',
@@ -54,22 +53,22 @@ class WPSR_Admin_Share_Icons{
54
  $options = WPSR_Options::options( 'share_icons' );
55
  $form = new WPSR_Form( $values, $options );
56
 
57
- echo '<div class="template_wrap" data-id="' . $i . '">';
58
 
59
- $form->section_start( __( 'Choose the share icons', 'wpsr' ), '2' );
60
- $form->section_description( __( 'Add share icons to the template, re-arrange them and configure individual icon settings.', 'wpsr' ) );
61
  WPSR_Icons_Editor::editor( $values[ 'tmpl' ][ $i ][ 'selected_icons' ], 'tmpl[' . $i . '][selected_icons]' );
62
  $form->section_end();
63
 
64
  // Customization
65
- $form->section_start( __( 'Customization', 'wpsr' ), '3' );
66
 
67
  $form->tab_list(array(
68
- 'style' => '<i class="fas fa-paint-brush"></i>' . __( 'Style', 'wpsr' ),
69
- 'position' => '<i class="fas fa-arrows-alt"></i>' . __( 'Position', 'wpsr' ),
70
- 'share_counter' => '<i class="fab fa-creative-commons-zero"></i>' . __( 'Share counter', 'wpsr' ),
71
- 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . __( 'Responsiveness', 'wpsr' ),
72
- 'misc' => '<i class="fas fa-cog"></i>' . __( 'Miscellaneous', 'wpsr' ),
73
  ));
74
 
75
  echo '<div class="tab_wrap">';
@@ -83,8 +82,8 @@ class WPSR_Admin_Share_Icons{
83
  $form->section_end();
84
 
85
  // Location rules
86
- $form->section_start( __( 'Conditions to display the template', 'wpsr' ), '5' );
87
- $form->section_description( __( 'Choose the below options to select the pages which will display the template.', 'wpsr' ) );
88
  WPSR_Location_Rules::display_rules( "tmpl[$i][loc_rules]", $values['tmpl'][$i]['loc_rules'] );
89
  $form->section_end();
90
 
@@ -100,14 +99,14 @@ class WPSR_Admin_Share_Icons{
100
  'tmpl' => array()
101
  ));
102
 
103
- $form->section_start( __( 'Enable/disable share icons', 'wpsr' ), '1' );
104
- $form->label( __( 'Select to enable or disable share icons feature', 'wpsr' ) );
105
  $form->field( 'select', array(
106
  'name' => 'ft_status',
107
  'value' => $values[ 'ft_status' ],
108
  'list' => array(
109
- 'enable' => __( 'Enable share icons', 'wpsr' ),
110
- 'disable' => __( 'Disable share icons', 'wpsr' )
111
  ),
112
  ));
113
  $form->build();
@@ -122,7 +121,7 @@ class WPSR_Admin_Share_Icons{
122
 
123
  echo '<ul class="template_tab">';
124
  for( $i = 1; $i <= $template_count; $i++ ){
125
- echo '<li>Template ' . $i . '</li>';
126
  }
127
  echo '</ul>';
128
 
@@ -138,7 +137,7 @@ class WPSR_Admin_Share_Icons{
138
 
139
  echo '<div data-tab="style">';
140
 
141
- $form->label( __( 'Icon layout', 'wpsr' ) );
142
  $form->field( 'image_select', array(
143
  'name' => 'tmpl[' . $i . '][layout]',
144
  'value' => $form->values[ 'tmpl' ][ $i ]['layout'],
@@ -147,7 +146,7 @@ class WPSR_Admin_Share_Icons{
147
  ));
148
  $form->end();
149
 
150
- $form->label( __( 'Icon size', 'wpsr' ) );
151
  $form->field( 'image_select', array(
152
  'name' => 'tmpl[' . $i . '][icon_size]',
153
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_size'],
@@ -155,8 +154,8 @@ class WPSR_Admin_Share_Icons{
155
  ));
156
  $form->end();
157
 
158
- $form->start( '', 'data-conditioner data-condr-input=".setting_btn_layout' . $i . '" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
159
- $form->label( __( 'Icon shape', 'wpsr' ) );
160
  $form->field( 'image_select', array(
161
  'name' => 'tmpl[' . $i . '][icon_shape]',
162
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_shape'],
@@ -165,25 +164,25 @@ class WPSR_Admin_Share_Icons{
165
  ));
166
  $form->end();
167
 
168
- $form->label( __( 'Icon color', 'wpsr' ) );
169
  $form->field( 'text', array(
170
  'name' => 'tmpl[' . $i . '][icon_color]',
171
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_color'],
172
  'class' => 'color_picker',
173
- 'helper' => __( 'Set empty value to use brand color', 'wpsr' )
174
  ));
175
  $form->end();
176
 
177
- $form->label( __( 'Icon background color', 'wpsr' ) );
178
  $form->field( 'text', array(
179
  'name' => 'tmpl[' . $i . '][icon_bg_color]',
180
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_bg_color'],
181
  'class' => 'color_picker',
182
- 'helper' => __( 'Set empty value to use brand color', 'wpsr' )
183
  ));
184
  $form->end();
185
 
186
- $form->label( __( 'Hover effect', 'wpsr' ) );
187
  $form->field( 'select', array(
188
  'name' => 'tmpl[' . $i . '][hover_effect]',
189
  'value' => $form->values[ 'tmpl' ][ $i ]['hover_effect'],
@@ -191,12 +190,12 @@ class WPSR_Admin_Share_Icons{
191
  ));
192
  $form->end();
193
 
194
- $form->label( __( 'Space between icons', 'wpsr' ) );
195
  $form->field( 'select', array(
196
  'name' => 'tmpl[' . $i . '][padding]',
197
  'value' => $form->values[ 'tmpl' ][ $i ]['padding'],
198
  'list' => $form->options[ 'padding' ],
199
- 'helper' => __( 'Select to add space between icons', 'wpsr' ),
200
  ));
201
  $form->end();
202
 
@@ -210,7 +209,7 @@ class WPSR_Admin_Share_Icons{
210
 
211
  echo '<div data-tab="share_counter">';
212
 
213
- $form->label( __( 'Share counter', 'wpsr' ) );
214
  $form->field( 'select', array(
215
  'name' => 'tmpl[' . $i . '][share_counter]',
216
  'value' => $form->values[ 'tmpl' ][ $i ]['share_counter'],
@@ -219,8 +218,8 @@ class WPSR_Admin_Share_Icons{
219
  ));
220
  $form->end();
221
 
222
- $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter' . $i . '" data-condr-value="individual" data-condr-action="pattern?show:hide" data-condr-events="change"' );
223
- $form->label( __( 'Share counter style', 'wpsr' ) );
224
  $form->field( 'image_select', array(
225
  'name' => 'tmpl[' . $i . '][sc_style]',
226
  'value' => $form->values[ 'tmpl' ][ $i ]['sc_style'],
@@ -228,8 +227,8 @@ class WPSR_Admin_Share_Icons{
228
  ));
229
  $form->end();
230
 
231
- $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter' . $i . '" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
232
- $form->label( __( 'Total share count position', 'wpsr' ) );
233
  $form->field( 'select', array(
234
  'name' => 'tmpl[' . $i . '][sc_total_position]',
235
  'value' => $form->values[ 'tmpl' ][ $i ]['sc_total_position'],
@@ -249,7 +248,7 @@ class WPSR_Admin_Share_Icons{
249
 
250
  echo '<div data-tab="position">';
251
 
252
- $form->label( __( 'Position of the share icons on the page', 'wpsr' ) );
253
  $form->field( 'select', array(
254
  'name' => 'tmpl[' . $i . '][position]',
255
  'list' => $form->options[ 'position' ],
@@ -257,7 +256,7 @@ class WPSR_Admin_Share_Icons{
257
  ));
258
  $form->end();
259
 
260
- $form->label( __( 'Share icons in post excerpts', 'wpsr' ) );
261
  $form->field( 'select', array(
262
  'name' => 'tmpl[' . $i . '][in_excerpt]',
263
  'list' => $form->options[ 'in_excerpt' ],
@@ -267,7 +266,7 @@ class WPSR_Admin_Share_Icons{
267
 
268
  $form->build();
269
 
270
- WPSR_Admin_Shortcodes::note( __( 'Share icons', 'wpsr' ), 'wpsr_share_icons' );
271
 
272
  echo '</div>';
273
 
@@ -277,7 +276,7 @@ class WPSR_Admin_Share_Icons{
277
 
278
  echo '<div data-tab="responsiveness">';
279
 
280
- $form->label( __( 'On desktop (or) large screen', 'wpsr' ) );
281
  $form->field( 'select', array(
282
  'name' => 'tmpl[' . $i . '][lg_screen_action]',
283
  'value' => $form->values[ 'tmpl' ][ $i ]['lg_screen_action'],
@@ -285,7 +284,7 @@ class WPSR_Admin_Share_Icons{
285
  ));
286
  $form->end();
287
 
288
- $form->label( __( 'On mobile (or) small screen', 'wpsr' ) );
289
  $form->field( 'select', array(
290
  'name' => 'tmpl[' . $i . '][sm_screen_action]',
291
  'value' => $form->values[ 'tmpl' ][ $i ]['sm_screen_action'],
@@ -293,7 +292,7 @@ class WPSR_Admin_Share_Icons{
293
  ));
294
  $form->end();
295
 
296
- $form->label( __( 'Responsive width', 'wpsr' ) );
297
  $form->field( 'text', array(
298
  'name' => 'tmpl[' . $i . '][sm_screen_width]',
299
  'value' => $form->values[ 'tmpl' ][ $i ]['sm_screen_width'],
@@ -313,8 +312,8 @@ class WPSR_Admin_Share_Icons{
313
 
314
  echo '<div data-tab="misc">';
315
 
316
- $form->start( '', 'data-conditioner data-condr-input=".setting_btn_layout' . $i . '" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
317
- $form->label( __( 'Center the icons', 'wpsr' ) );
318
  $form->field( 'select', array(
319
  'name' => 'tmpl[' . $i . '][center_icons]',
320
  'value' => $form->values[ 'tmpl' ][ $i ]['center_icons'],
@@ -322,7 +321,7 @@ class WPSR_Admin_Share_Icons{
322
  ));
323
  $form->end();
324
 
325
- $form->label( __( 'Heading text', 'wpsr' ) );
326
  $form->field( 'text', array(
327
  'name' => 'tmpl[' . $i . '][heading]',
328
  'value' => $form->values[ 'tmpl' ][ $i ][ 'heading' ],
@@ -331,16 +330,16 @@ class WPSR_Admin_Share_Icons{
331
  ));
332
  $form->end();
333
 
334
- $form->label( __( 'Number of icons to group into one single icon', 'wpsr' ) );
335
  $form->field( 'select', array(
336
  'name' => 'tmpl[' . $i . '][more_icons]',
337
  'value' => $form->values[ 'tmpl' ][ $i ]['more_icons'],
338
  'list' => $form->options[ 'more_icons' ],
339
- 'helper' => __( 'Select the number of icons from the end which will should be grouped into one single icon called "More"', 'wpsr' )
340
  ));
341
  $form->end();
342
 
343
- $form->label( __( 'Custom HTML above and below icons', 'wpsr' ) );
344
  $form->field( 'textarea', array(
345
  'name' => 'tmpl[' . $i . '][custom_html_above]',
346
  'value' => $form->values[ 'tmpl' ][ $i ][ 'custom_html_above' ],
@@ -353,7 +352,7 @@ class WPSR_Admin_Share_Icons{
353
  'class' => '',
354
  'placeholder' => 'Below'
355
  ));
356
- $form->description( __( 'Supports any HTML and shortcodes', 'wpsr' ) );
357
  $form->end();
358
 
359
  $form->build();
@@ -370,9 +369,22 @@ class WPSR_Admin_Share_Icons{
370
  update_option( 'wpsr_button_settings', $btn_settings );
371
  }
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  return $input;
374
  }
375
-
376
  }
377
 
378
  new WPSR_Admin_Share_Icons();
17
  function register( $pages ){
18
 
19
  $pages[ 'share_icons' ] = array(
20
+ 'name' => __( 'Share icons', 'wp-socializer' ),
21
+ 'description' => __( 'Add icons above and below posts to share the content on social media sites.', 'wp-socializer' ),
 
22
  'category' => 'feature',
23
  'type' => 'feature',
24
  'form_name' => 'social_icons_settings',
53
  $options = WPSR_Options::options( 'share_icons' );
54
  $form = new WPSR_Form( $values, $options );
55
 
56
+ echo '<div class="template_wrap" data-id="' . esc_attr( $i ) . '">';
57
 
58
+ $form->section_start( __( 'Choose the share icons', 'wp-socializer' ), '2' );
59
+ $form->section_description( __( 'Add share icons to the template, re-arrange them and configure individual icon settings.', 'wp-socializer' ) );
60
  WPSR_Icons_Editor::editor( $values[ 'tmpl' ][ $i ][ 'selected_icons' ], 'tmpl[' . $i . '][selected_icons]' );
61
  $form->section_end();
62
 
63
  // Customization
64
+ $form->section_start( __( 'Customization', 'wp-socializer' ), '3' );
65
 
66
  $form->tab_list(array(
67
+ 'style' => '<i class="fas fa-paint-brush"></i>' . esc_html__( 'Style', 'wp-socializer' ),
68
+ 'position' => '<i class="fas fa-arrows-alt"></i>' . esc_html__( 'Position', 'wp-socializer' ),
69
+ 'share_counter' => '<i class="fab fa-creative-commons-zero"></i>' . esc_html__( 'Share counter', 'wp-socializer' ),
70
+ 'responsiveness' => '<i class="fas fa-mobile-alt"></i>' . esc_html__( 'Responsiveness', 'wp-socializer' ),
71
+ 'misc' => '<i class="fas fa-cog"></i>' . esc_html__( 'Miscellaneous', 'wp-socializer' ),
72
  ));
73
 
74
  echo '<div class="tab_wrap">';
82
  $form->section_end();
83
 
84
  // Location rules
85
+ $form->section_start( __( 'Conditions to display the template', 'wp-socializer' ), '5' );
86
+ $form->section_description( __( 'Choose the below options to select the pages which will display the template.', 'wp-socializer' ) );
87
  WPSR_Location_Rules::display_rules( "tmpl[$i][loc_rules]", $values['tmpl'][$i]['loc_rules'] );
88
  $form->section_end();
89
 
99
  'tmpl' => array()
100
  ));
101
 
102
+ $form->section_start( __( 'Enable/disable share icons', 'wp-socializer' ), '1' );
103
+ $form->label( __( 'Select to enable or disable share icons feature', 'wp-socializer' ) );
104
  $form->field( 'select', array(
105
  'name' => 'ft_status',
106
  'value' => $values[ 'ft_status' ],
107
  'list' => array(
108
+ 'enable' => __( 'Enable share icons', 'wp-socializer' ),
109
+ 'disable' => __( 'Disable share icons', 'wp-socializer' )
110
  ),
111
  ));
112
  $form->build();
121
 
122
  echo '<ul class="template_tab">';
123
  for( $i = 1; $i <= $template_count; $i++ ){
124
+ echo '<li>Template ' . esc_html( $i ) . '</li>';
125
  }
126
  echo '</ul>';
127
 
137
 
138
  echo '<div data-tab="style">';
139
 
140
+ $form->label( __( 'Icon layout', 'wp-socializer' ) );
141
  $form->field( 'image_select', array(
142
  'name' => 'tmpl[' . $i . '][layout]',
143
  'value' => $form->values[ 'tmpl' ][ $i ]['layout'],
146
  ));
147
  $form->end();
148
 
149
+ $form->label( __( 'Icon size', 'wp-socializer' ) );
150
  $form->field( 'image_select', array(
151
  'name' => 'tmpl[' . $i . '][icon_size]',
152
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_size'],
154
  ));
155
  $form->end();
156
 
157
+ $form->start( '', 'data-conditioner data-condr-input=".setting_btn_layout' . esc_attr( $i ) . '" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
158
+ $form->label( __( 'Icon shape', 'wp-socializer' ) );
159
  $form->field( 'image_select', array(
160
  'name' => 'tmpl[' . $i . '][icon_shape]',
161
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_shape'],
164
  ));
165
  $form->end();
166
 
167
+ $form->label( __( 'Icon color', 'wp-socializer' ) );
168
  $form->field( 'text', array(
169
  'name' => 'tmpl[' . $i . '][icon_color]',
170
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_color'],
171
  'class' => 'color_picker',
172
+ 'helper' => __( 'Set empty value to use brand color', 'wp-socializer' )
173
  ));
174
  $form->end();
175
 
176
+ $form->label( __( 'Icon background color', 'wp-socializer' ) );
177
  $form->field( 'text', array(
178
  'name' => 'tmpl[' . $i . '][icon_bg_color]',
179
  'value' => $form->values[ 'tmpl' ][ $i ]['icon_bg_color'],
180
  'class' => 'color_picker',
181
+ 'helper' => __( 'Set empty value to use brand color', 'wp-socializer' )
182
  ));
183
  $form->end();
184
 
185
+ $form->label( __( 'Hover effect', 'wp-socializer' ) );
186
  $form->field( 'select', array(
187
  'name' => 'tmpl[' . $i . '][hover_effect]',
188
  'value' => $form->values[ 'tmpl' ][ $i ]['hover_effect'],
190
  ));
191
  $form->end();
192
 
193
+ $form->label( __( 'Space between icons', 'wp-socializer' ) );
194
  $form->field( 'select', array(
195
  'name' => 'tmpl[' . $i . '][padding]',
196
  'value' => $form->values[ 'tmpl' ][ $i ]['padding'],
197
  'list' => $form->options[ 'padding' ],
198
+ 'helper' => __( 'Select to add space between icons', 'wp-socializer' ),
199
  ));
200
  $form->end();
201
 
209
 
210
  echo '<div data-tab="share_counter">';
211
 
212
+ $form->label( __( 'Share counter', 'wp-socializer' ) );
213
  $form->field( 'select', array(
214
  'name' => 'tmpl[' . $i . '][share_counter]',
215
  'value' => $form->values[ 'tmpl' ][ $i ]['share_counter'],
218
  ));
219
  $form->end();
220
 
221
+ $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter' . esc_attr( $i ) . '" data-condr-value="individual" data-condr-action="pattern?show:hide" data-condr-events="change"' );
222
+ $form->label( __( 'Share counter style', 'wp-socializer' ) );
223
  $form->field( 'image_select', array(
224
  'name' => 'tmpl[' . $i . '][sc_style]',
225
  'value' => $form->values[ 'tmpl' ][ $i ]['sc_style'],
227
  ));
228
  $form->end();
229
 
230
+ $form->start( '', 'data-conditioner data-condr-input=".setting_share_counter' . esc_attr( $i ) . '" data-condr-value="total" data-condr-action="pattern?show:hide" data-condr-events="change"' );
231
+ $form->label( __( 'Total share count position', 'wp-socializer' ) );
232
  $form->field( 'select', array(
233
  'name' => 'tmpl[' . $i . '][sc_total_position]',
234
  'value' => $form->values[ 'tmpl' ][ $i ]['sc_total_position'],
248
 
249
  echo '<div data-tab="position">';
250
 
251
+ $form->label( __( 'Position of the share icons on the page', 'wp-socializer' ) );
252
  $form->field( 'select', array(
253
  'name' => 'tmpl[' . $i . '][position]',
254
  'list' => $form->options[ 'position' ],
256
  ));
257
  $form->end();
258
 
259
+ $form->label( __( 'Share icons in post excerpts', 'wp-socializer' ) );
260
  $form->field( 'select', array(
261
  'name' => 'tmpl[' . $i . '][in_excerpt]',
262
  'list' => $form->options[ 'in_excerpt' ],
266
 
267
  $form->build();
268
 
269
+ WPSR_Admin_Shortcodes::note( __( 'Share icons', 'wp-socializer' ), 'wpsr_share_icons' );
270
 
271
  echo '</div>';
272
 
276
 
277
  echo '<div data-tab="responsiveness">';
278
 
279
+ $form->label( __( 'On desktop (or) large screen', 'wp-socializer' ) );
280
  $form->field( 'select', array(
281
  'name' => 'tmpl[' . $i . '][lg_screen_action]',
282
  'value' => $form->values[ 'tmpl' ][ $i ]['lg_screen_action'],
284
  ));
285
  $form->end();
286
 
287
+ $form->label( __( 'On mobile (or) small screen', 'wp-socializer' ) );
288
  $form->field( 'select', array(
289
  'name' => 'tmpl[' . $i . '][sm_screen_action]',
290
  'value' => $form->values[ 'tmpl' ][ $i ]['sm_screen_action'],
292
  ));
293
  $form->end();
294
 
295
+ $form->label( __( 'Responsive width', 'wp-socializer' ) );
296
  $form->field( 'text', array(
297
  'name' => 'tmpl[' . $i . '][sm_screen_width]',
298
  'value' => $form->values[ 'tmpl' ][ $i ]['sm_screen_width'],
312
 
313
  echo '<div data-tab="misc">';
314
 
315
+ $form->start( '', 'data-conditioner data-condr-input=".setting_btn_layout' . esc_attr( $i ) . '" data-condr-value="" data-condr-action="simple?show:hide" data-condr-events="change"' );
316
+ $form->label( __( 'Center the icons', 'wp-socializer' ) );
317
  $form->field( 'select', array(
318
  'name' => 'tmpl[' . $i . '][center_icons]',
319
  'value' => $form->values[ 'tmpl' ][ $i ]['center_icons'],
321
  ));
322
  $form->end();
323
 
324
+ $form->label( __( 'Heading text', 'wp-socializer' ) );
325
  $form->field( 'text', array(
326
  'name' => 'tmpl[' . $i . '][heading]',
327
  'value' => $form->values[ 'tmpl' ][ $i ][ 'heading' ],
330
  ));
331
  $form->end();
332
 
333
+ $form->label( __( 'Number of icons to group into one single icon', 'wp-socializer' ) );
334
  $form->field( 'select', array(
335
  'name' => 'tmpl[' . $i . '][more_icons]',
336
  'value' => $form->values[ 'tmpl' ][ $i ]['more_icons'],
337
  'list' => $form->options[ 'more_icons' ],
338
+ 'helper' => __( 'Select the number of icons from the end which will should be grouped into one single icon called "More"', 'wp-socializer' )
339
  ));
340
  $form->end();
341
 
342
+ $form->label( __( 'Custom HTML above and below icons', 'wp-socializer' ) );
343
  $form->field( 'textarea', array(
344
  'name' => 'tmpl[' . $i . '][custom_html_above]',
345
  'value' => $form->values[ 'tmpl' ][ $i ][ 'custom_html_above' ],
352
  'class' => '',
353
  'placeholder' => 'Below'
354
  ));
355
+ $form->description( __( 'Supports any HTML and shortcodes', 'wp-socializer' ) );
356
  $form->end();
357
 
358
  $form->build();
369
  update_option( 'wpsr_button_settings', $btn_settings );
370
  }
371
 
372
+ array_walk_recursive( $input, function( &$value, $key ){
373
+
374
+ if( $key == 'selected_icons' ){
375
+ $value = WPSR_Lists::sanitize_template( $value );
376
+ return;
377
+ }
378
+
379
+ $value = WPSR_Lists::sanitize_data( $key, $value, array(
380
+ 'heading', 'custom_html_above', 'custom_html_below'
381
+ ));
382
+
383
+ });
384
+
385
  return $input;
386
  }
387
+
388
  }
389
 
390
  new WPSR_Admin_Share_Icons();
admin/pages/shortcodes.php CHANGED
@@ -17,9 +17,8 @@ class WPSR_Admin_Shortcodes{
17
  function register( $pages ){
18
 
19
  $pages[ 'shortcodes' ] = array(
20
- 'name' => __( 'Shortcodes', 'wpsr' ),
21
- 'banner' => WPSR_ADMIN_URL . '/images/banners/shortcodes.svg',
22
- 'description' => __( 'Create shortcodes for social sharing icons and follow icons to use them in any custom location.', 'wpsr' ),
23
  'category' => 'feature',
24
  'type' => 'shortcodes',
25
  'callbacks' => array(
@@ -38,9 +37,9 @@ class WPSR_Admin_Shortcodes{
38
  $form->section_start();
39
 
40
  $form->tab_list(array(
41
- 'share_icons' => '<i class="fas fa-share-alt"></i>' . __( 'Share Icons', 'wpsr' ),
42
- 'follow_icons' => '<i class="fas fa-user-plus"></i>' . __( 'Follow Icons', 'wpsr' ),
43
- 'share_link' => '<i class="fas fa-link"></i></i>' . __( 'Share link', 'wpsr' )
44
  ));
45
 
46
  echo '<div class="tab_wrap">';
@@ -49,19 +48,19 @@ class WPSR_Admin_Shortcodes{
49
  $this->tab_share_link();
50
  echo '</div>';
51
 
52
- echo '<h3>' . __( 'Save your shortcodes', 'wpsr' ) . '</h3>';
53
- echo '<p>' . __( 'Save the shortcodes you created with a shortcode creation and management plugin like "Shortcoder" and insert them easily in posts whenever needed.' ) . '</p>';
54
  if( class_exists( 'Shortcoder' ) && is_plugin_active( 'shortcoder/shortcoder.php' ) ){
55
- echo '<p><a href="' . admin_url( 'post-new.php?post_type=shortcoder' ) . '" target="_blank" class="button button-primary">' . __( 'Open shortcoder', 'wpsr' ) . '</a></p>';
56
  }else{
57
  if( function_exists( 'add_thickbox' ) ){
58
  add_thickbox();
59
  }
60
- echo '<p><a href="' . admin_url( 'plugin-install.php?tab=plugin-information&plugin=shortcoder&TB_iframe=true&width=700&height=550' ) . '" class="button button-primary thickbox">' . __( 'Learn more', 'wpsr' ) . '</a></p>';
61
  }
62
 
63
- echo '<h3>' . __( 'Using in theme', 'wpsr' ) . '</h3>';
64
- echo '<p>' . __( 'To use the shortcode anywhere in your theme, use the below PHP snippet and replace the shortcode with the plugin shortcode.', 'wpsr' ) . '</p>';
65
  echo '<pre>&lt;?php echo do_shortcode( \'THE_SHORTCODE\' ); ?&gt;</pre>';
66
 
67
  $form->section_end();
@@ -72,13 +71,13 @@ class WPSR_Admin_Shortcodes{
72
 
73
  echo '<div data-tab="share_icons">';
74
 
75
- echo '<h3>' . __( 'Syntax', 'wpsr' ) . '</h3>';
76
  echo '<pre>[wpsr_share_icons parameter1="value" parameter2="value" ...]</pre>';
77
 
78
- echo '<h3>' . __( 'Example', 'wpsr' ) . '</h3>';
79
  echo '<pre>[wpsr_share_icons icons="facebook,twitter,pinterest,email" icon_size="40px" icon_bg_color="red" icon_shape="drop"]</pre>';
80
 
81
- echo '<h3>' . __( 'Parameter reference', 'wpsr' ) . '</h3>';
82
  $options = WPSR_Options::share_icons();
83
 
84
  unset( $options[ 'selected_icons' ] );
@@ -92,10 +91,10 @@ class WPSR_Admin_Shortcodes{
92
  echo '<table class="widefat">
93
  <thead>
94
  <tr>
95
- <th>' . __( 'Parameter', 'wpsr' ) . '</th>
96
- <th>' . __( 'Default value', 'wpsr' ) . '</th>
97
- <th>' . __( 'Description', 'wpsr' ) . '</th>
98
- <th>' . __( 'Supported values', 'wpsr' ) . '</th>
99
  </tr>
100
  </thead>
101
  <tbody>
@@ -106,29 +105,29 @@ class WPSR_Admin_Shortcodes{
106
  'icons' => array(
107
  'default' => 'facebook,twitter,linkedin,pinterest,email',
108
  'options' => false,
109
- 'description' => __( 'The ID share icons to display separated by comma. See list below for icon IDs.', 'wpsr' )
110
  ),
111
  'template' => array(
112
  'default' => '<empty>',
113
  'options' => array( '1' => '1', '2' => '2' ),
114
- 'description' => __( 'The ID of the template which is configured in the share icons feature settings page. When this is provided, other configurations are NOT considered. Use this parameter only to use the saved configuration in a custom location.', 'wpsr' )
115
  )
116
  );
117
  $options = $icons_param + $options;
118
 
119
  $options[ 'page_url' ] = array(
120
- 'default' => __( 'The current post URL', 'wpsr' ),
121
- 'description' => __( 'The URL to share', 'wpsr' ),
122
  'options' => false
123
  );
124
  $options[ 'page_title' ] = array(
125
- 'default' => __( 'The current post URL', 'wpsr' ),
126
- 'description' => __( 'The title of the URL', 'wpsr' ),
127
  'options' => false
128
  );
129
  $options[ 'page_excerpt' ] = array(
130
- 'default' => __( 'The current post\'s excerpt', 'wpsr' ),
131
- 'description' => __( 'A short description of the page. Honored by some social sharing sites.', 'wpsr' ),
132
  'options' => false
133
  );
134
 
@@ -140,23 +139,23 @@ class WPSR_Admin_Shortcodes{
140
  if( $val[ 'options' ] && is_array( $val[ 'options' ] ) ){
141
  $supported_values = array_keys( $val[ 'options' ] );
142
  $supported_values = array_map(function( $value ){
143
- return empty( $value ) ? htmlspecialchars( '<empty>' ) : $value;
144
  }, $supported_values );
145
  $supported_values = implode( ', ', $supported_values );
146
  }
147
 
148
  echo '<tr>';
149
- echo '<td><code>' . $key . '</code></td>';
150
- echo '<td><code>' . htmlspecialchars( $default ) . '</code></td>';
151
- echo '<td>' . $description . '</td>';
152
- echo '<td>' . $supported_values . '</td>';
153
  echo '</tr>';
154
  }
155
 
156
  echo '</tbody>
157
  </table>';
158
 
159
- echo '<h3>' . __( 'Supported share icons', 'wpsr' ) . '</h3>';
160
  $social_icons = WPSR_Lists::social_icons();
161
  $social_icons = array_filter( $social_icons, function( $props ){
162
  if( in_array( 'for_share', $props[ 'features' ] ) ){
@@ -165,7 +164,7 @@ class WPSR_Admin_Shortcodes{
165
  return false;
166
  }
167
  });
168
- echo '<p>' . implode( ', ', array_keys( $social_icons ) ) . '</p>';
169
 
170
  echo '</div>';
171
 
@@ -175,13 +174,13 @@ class WPSR_Admin_Shortcodes{
175
 
176
  echo '<div data-tab="follow_icons">';
177
 
178
- echo '<h3>' . __( 'Syntax', 'wpsr' ) . '</h3>';
179
  echo '<pre>[wpsr_follow_icons parameter1="value" parameter2="value" ...]</pre>';
180
 
181
- echo '<h3>' . __( 'Example', 'wpsr' ) . '</h3>';
182
  echo '<pre>[wpsr_follow_icons facebook="https://facebook.com/aakashweb" twitter="https://twitter.com/aakashweb" instagram="https://instagram.com/aakashweb" bg_color="green" shape="circle"]</pre>';
183
 
184
- echo '<h3>' . __( 'Parameter reference', 'wpsr' ) . '</h3>';
185
  $options = WPSR_Options::follow_icons();
186
 
187
  unset( $options[ 'ft_status' ] );
@@ -194,10 +193,10 @@ class WPSR_Admin_Shortcodes{
194
  echo '<table class="widefat">
195
  <thead>
196
  <tr>
197
- <th>' . __( 'Parameter', 'wpsr' ) . '</th>
198
- <th>' . __( 'Default value', 'wpsr' ) . '</th>
199
- <th>' . __( 'Description', 'wpsr' ) . '</th>
200
- <th>' . __( 'Supported values', 'wpsr' ) . '</th>
201
  </tr>
202
  </thead>
203
  <tbody>
@@ -207,7 +206,7 @@ class WPSR_Admin_Shortcodes{
207
  $icons_param = array( '&lt;icon_id&gt;' => array(
208
  'default' => '',
209
  'options' => false,
210
- 'description' => __( 'The profile URL of the site. See list below for follow icons ID.', 'wpsr' )
211
  ));
212
  $options = $icons_param + $options;
213
 
@@ -219,23 +218,23 @@ class WPSR_Admin_Shortcodes{
219
  if( $val[ 'options' ] ){
220
  $supported_values = array_keys( $val[ 'options' ] );
221
  $supported_values = array_map(function( $value ){
222
- return empty( $value ) ? htmlspecialchars( '<empty>' ) : $value;
223
  }, $supported_values );
224
  $supported_values = implode( ', ', $supported_values );
225
  }
226
 
227
  echo '<tr>';
228
- echo '<td><code>' . $key . '</code></td>';
229
- echo '<td><code>' . htmlspecialchars( $default ) . '</code></td>';
230
- echo '<td>' . $description . '</td>';
231
- echo '<td>' . $supported_values . '</td>';
232
  echo '</tr>';
233
  }
234
 
235
  echo '</tbody>
236
  </table>';
237
 
238
- echo '<h3>' . __( 'Supported icons', 'wpsr' ) . '</h3>';
239
  $social_icons = WPSR_Lists::social_icons();
240
  $social_icons = array_filter( $social_icons, function( $props ){
241
  if( in_array( 'for_profile', $props[ 'features' ] ) ){
@@ -244,7 +243,7 @@ class WPSR_Admin_Shortcodes{
244
  return false;
245
  }
246
  });
247
- echo '<p>' . implode( ', ', array_keys( $social_icons ) ) . '</p>';
248
 
249
  echo '</div>';
250
 
@@ -254,24 +253,24 @@ class WPSR_Admin_Shortcodes{
254
 
255
  echo '<div data-tab="share_link">';
256
 
257
- echo '<h3>' . __( 'Syntax', 'wpsr' ) . '</h3>';
258
  echo '<pre>[wpsr_share_link parameter1="value" parameter2="value" ...]</pre>';
259
 
260
- echo '<h3>' . __( 'Example', 'wpsr' ) . '</h3>';
261
  echo '<pre>[wpsr_share_link for="twitter"]Tweet about this page[/wpsr_share_link]</pre>';
262
 
263
- echo '<h3>' . __( 'Output', 'wpsr' ) . '</h3>';
264
  echo '<pre><a href="https://twitter.com/intent/tweet?text=Post+by+author%20-%20http://example.com/post-by-author/%20@vaakash" target="_blank" rel="nofollow">Tweet about this page</a></pre>';
265
 
266
- echo '<h3>' . __( 'Parameter reference', 'wpsr' ) . '</h3>';
267
 
268
  echo '<table class="widefat">
269
  <thead>
270
  <tr>
271
- <th>' . __( 'Parameter', 'wpsr' ) . '</th>
272
- <th>' . __( 'Default value', 'wpsr' ) . '</th>
273
- <th>' . __( 'Description', 'wpsr' ) . '</th>
274
- <th>' . __( 'Supported values', 'wpsr' ) . '</th>
275
  </tr>
276
  </thead>
277
  <tbody>
@@ -281,54 +280,54 @@ class WPSR_Admin_Shortcodes{
281
  array(
282
  'parameter' => 'for',
283
  'default_value' => '&lt;empty&gt;',
284
- 'description' => __( 'The ID of the social media service to generate share link for.', 'wpsr' ),
285
- 'supported_values' => __( 'Refer list below for the supported IDs', 'wpsr' )
286
  ),
287
  array(
288
  'parameter' => 'class',
289
  'default_value' => '&lt;empty&gt;',
290
- 'description' => __( 'Sets the CSS class value for the a tag.', 'wpsr' ),
291
  'supported_values' => ''
292
  ),
293
  array(
294
  'parameter' => 'target',
295
  'default_value' => '_blank',
296
- 'description' => __( 'Sets the target attribute for the link.', 'wpsr' ),
297
  'supported_values' => ''
298
  ),
299
  array(
300
  'parameter' => 'page_url',
301
  'default_value' => 'The URL of the current post/page where the shortcode is used.',
302
- 'description' => __( 'Sets the URL to share.', 'wpsr' ),
303
  'supported_values' => ''
304
  ),
305
  array(
306
  'parameter' => 'page_title',
307
  'default_value' => 'The title of the current post/page where the shortcode is used.',
308
- 'description' => __( 'The title of the page to share', 'wpsr' ),
309
  'supported_values' => ''
310
  ),
311
  array(
312
  'parameter' => 'page_excerpt',
313
  'default_value' => 'The description of the current post/page where the shortcode is used.',
314
- 'description' => __( 'The description of the page to share', 'wpsr' ),
315
  'supported_values' => ''
316
  )
317
  );
318
 
319
  foreach( $rows as $row ){
320
  echo '<tr>';
321
- echo '<td>' . $row['parameter'] . '</td>';
322
- echo '<td>' . $row['default_value'] . '</td>';
323
- echo '<td>' . $row['description'] . '</td>';
324
- echo '<td>' . $row['supported_values'] . '</td>';
325
  echo '</tr>';
326
  }
327
 
328
  echo '</tbody>
329
  </table>';
330
 
331
- echo '<h3>' . __( 'Supported icons', 'wpsr' ) . '</h3>';
332
  $social_icons = WPSR_Lists::social_icons();
333
  $social_icons = array_filter( $social_icons, function( $props ){
334
  if( in_array( 'for_share', $props[ 'features' ] ) ){
@@ -337,7 +336,7 @@ class WPSR_Admin_Shortcodes{
337
  return false;
338
  }
339
  });
340
- echo '<p>' . implode( ', ', array_keys( $social_icons ) ) . '</p>';
341
 
342
  echo '</div>';
343
 
@@ -345,9 +344,9 @@ class WPSR_Admin_Shortcodes{
345
 
346
  public static function note( $feature = '', $shortcode = '' ){
347
  echo '<div class="note">';
348
- echo '<h4><i class="fas fa-code"></i>' . __( 'Shortcode', 'wpsr' ) . '</h4>';
349
- echo '<p>' . sprintf( __( 'If you want to use %s anywhere in a custom position then you can use the shortcode <code>[%s]</code>. Please refer shortcodes page on how to customize this shortcode.', 'wpsr' ), $feature, $shortcode ) . '</p>';
350
- echo '<p><a href="' . admin_url( 'admin.php?page=wp_socializer&tab=shortcodes' ) . '" target="_blank" class="button button-primary">' . __( 'Create shortcode', 'wpsr' ) . '</a></p>';
351
  echo '</div>';
352
  }
353
 
17
  function register( $pages ){
18
 
19
  $pages[ 'shortcodes' ] = array(
20
+ 'name' => __( 'Shortcodes', 'wp-socializer' ),
21
+ 'description' => __( 'Create shortcodes for social sharing icons and follow icons to use them in any custom location.', 'wp-socializer' ),
 
22
  'category' => 'feature',
23
  'type' => 'shortcodes',
24
  'callbacks' => array(
37
  $form->section_start();
38
 
39
  $form->tab_list(array(
40
+ 'share_icons' => '<i class="fas fa-share-alt"></i>' . esc_html__( 'Share Icons', 'wp-socializer' ),
41
+ 'follow_icons' => '<i class="fas fa-user-plus"></i>' . esc_html__( 'Follow Icons', 'wp-socializer' ),
42
+ 'share_link' => '<i class="fas fa-link"></i></i>' . esc_html__( 'Share link', 'wp-socializer' )
43
  ));
44
 
45
  echo '<div class="tab_wrap">';
48
  $this->tab_share_link();
49
  echo '</div>';
50
 
51
+ echo '<h3>' . esc_html__( 'Save your shortcodes', 'wp-socializer' ) . '</h3>';
52
+ echo '<p>' . esc_html__( 'Save the shortcodes you created with a shortcode creation and management plugin like "Shortcoder" and insert them easily in posts whenever needed.' ) . '</p>';
53
  if( class_exists( 'Shortcoder' ) && is_plugin_active( 'shortcoder/shortcoder.php' ) ){
54
+ echo '<p><a href="' . esc_url( admin_url( 'post-new.php?post_type=shortcoder' ) ) . '" target="_blank" class="button button-primary">' . esc_html__( 'Open shortcoder', 'wp-socializer' ) . '</a></p>';
55
  }else{
56
  if( function_exists( 'add_thickbox' ) ){
57
  add_thickbox();
58
  }
59
+ echo '<p><a href="' . esc_url( admin_url( 'plugin-install.php?tab=plugin-information&plugin=shortcoder&TB_iframe=true&width=700&height=550' ) ) . '" class="button button-primary thickbox">' . esc_html__( 'Learn more', 'wp-socializer' ) . '</a></p>';
60
  }
61
 
62
+ echo '<h3>' . esc_html__( 'Using in theme', 'wp-socializer' ) . '</h3>';
63
+ echo '<p>' . esc_html__( 'To use the shortcode anywhere in your theme, use the below PHP snippet and replace the shortcode with the plugin shortcode.', 'wp-socializer' ) . '</p>';
64
  echo '<pre>&lt;?php echo do_shortcode( \'THE_SHORTCODE\' ); ?&gt;</pre>';
65
 
66
  $form->section_end();
71
 
72
  echo '<div data-tab="share_icons">';
73
 
74
+ echo '<h3>' . esc_html__( 'Syntax', 'wp-socializer' ) . '</h3>';
75
  echo '<pre>[wpsr_share_icons parameter1="value" parameter2="value" ...]</pre>';
76
 
77
+ echo '<h3>' . esc_html__( 'Example', 'wp-socializer' ) . '</h3>';
78
  echo '<pre>[wpsr_share_icons icons="facebook,twitter,pinterest,email" icon_size="40px" icon_bg_color="red" icon_shape="drop"]</pre>';
79
 
80
+ echo '<h3>' . esc_html__( 'Parameter reference', 'wp-socializer' ) . '</h3>';
81
  $options = WPSR_Options::share_icons();
82
 
83
  unset( $options[ 'selected_icons' ] );
91
  echo '<table class="widefat">
92
  <thead>
93
  <tr>
94
+ <th>' . esc_html__( 'Parameter', 'wp-socializer' ) . '</th>
95
+ <th>' . esc_html__( 'Default value', 'wp-socializer' ) . '</th>
96
+ <th>' . esc_html__( 'Description', 'wp-socializer' ) . '</th>
97
+ <th>' . esc_html__( 'Supported values', 'wp-socializer' ) . '</th>
98
  </tr>
99
  </thead>
100
  <tbody>
105
  'icons' => array(
106
  'default' => 'facebook,twitter,linkedin,pinterest,email',
107
  'options' => false,
108
+ 'description' => __( 'The ID share icons to display separated by comma. See list below for icon IDs.', 'wp-socializer' )
109
  ),
110
  'template' => array(
111
  'default' => '<empty>',
112
  'options' => array( '1' => '1', '2' => '2' ),
113
+ 'description' => __( 'The ID of the template which is configured in the share icons feature settings page. When this is provided, other configurations are NOT considered. Use this parameter only to use the saved configuration in a custom location.', 'wp-socializer' )
114
  )
115
  );
116
  $options = $icons_param + $options;
117
 
118
  $options[ 'page_url' ] = array(
119
+ 'default' => __( 'The current post URL', 'wp-socializer' ),
120
+ 'description' => __( 'The URL to share', 'wp-socializer' ),
121
  'options' => false
122
  );
123
  $options[ 'page_title' ] = array(
124
+ 'default' => __( 'The current post URL', 'wp-socializer' ),
125
+ 'description' => __( 'The title of the URL', 'wp-socializer' ),
126
  'options' => false
127
  );
128
  $options[ 'page_excerpt' ] = array(
129
+ 'default' => __( 'The current post\'s excerpt', 'wp-socializer' ),
130
+ 'description' => __( 'A short description of the page. Honored by some social sharing sites.', 'wp-socializer' ),
131
  'options' => false
132
  );
133
 
139
  if( $val[ 'options' ] && is_array( $val[ 'options' ] ) ){
140
  $supported_values = array_keys( $val[ 'options' ] );
141
  $supported_values = array_map(function( $value ){
142
+ return empty( $value ) ? esc_html( '<empty>' ) : $value;
143
  }, $supported_values );
144
  $supported_values = implode( ', ', $supported_values );
145
  }
146
 
147
  echo '<tr>';
148
+ echo '<td><code>' . esc_html( $key ) . '</code></td>';
149
+ echo '<td><code>' . esc_html( $default ) . '</code></td>';
150
+ echo '<td>' . wp_kses_post( $description ) . '</td>';
151
+ echo '<td>' . wp_kses_post( $supported_values ) . '</td>';
152
  echo '</tr>';
153
  }
154
 
155
  echo '</tbody>
156
  </table>';
157
 
158
+ echo '<h3>' . esc_html__( 'Supported share icons', 'wp-socializer' ) . '</h3>';
159
  $social_icons = WPSR_Lists::social_icons();
160
  $social_icons = array_filter( $social_icons, function( $props ){
161
  if( in_array( 'for_share', $props[ 'features' ] ) ){
164
  return false;
165
  }
166
  });
167
+ echo '<p>' . esc_html( implode( ', ', array_keys( $social_icons ) ) ) . '</p>';
168
 
169
  echo '</div>';
170
 
174
 
175
  echo '<div data-tab="follow_icons">';
176
 
177
+ echo '<h3>' . esc_html__( 'Syntax', 'wp-socializer' ) . '</h3>';
178
  echo '<pre>[wpsr_follow_icons parameter1="value" parameter2="value" ...]</pre>';
179
 
180
+ echo '<h3>' . esc_html__( 'Example', 'wp-socializer' ) . '</h3>';
181
  echo '<pre>[wpsr_follow_icons facebook="https://facebook.com/aakashweb" twitter="https://twitter.com/aakashweb" instagram="https://instagram.com/aakashweb" bg_color="green" shape="circle"]</pre>';
182
 
183
+ echo '<h3>' . esc_html__( 'Parameter reference', 'wp-socializer' ) . '</h3>';
184
  $options = WPSR_Options::follow_icons();
185
 
186
  unset( $options[ 'ft_status' ] );
193
  echo '<table class="widefat">
194
  <thead>
195
  <tr>
196
+ <th>' . esc_html__( 'Parameter', 'wp-socializer' ) . '</th>
197
+ <th>' . esc_html__( 'Default value', 'wp-socializer' ) . '</th>
198
+ <th>' . esc_html__( 'Description', 'wp-socializer' ) . '</th>
199
+ <th>' . esc_html__( 'Supported values', 'wp-socializer' ) . '</th>
200
  </tr>
201
  </thead>
202
  <tbody>
206
  $icons_param = array( '&lt;icon_id&gt;' => array(
207
  'default' => '',
208
  'options' => false,
209
+ 'description' => __( 'The profile URL of the site. See list below for follow icons ID.', 'wp-socializer' )
210
  ));
211
  $options = $icons_param + $options;
212
 
218
  if( $val[ 'options' ] ){
219
  $supported_values = array_keys( $val[ 'options' ] );
220
  $supported_values = array_map(function( $value ){
221
+ return empty( $value ) ? esc_html( '<empty>' ) : $value;
222
  }, $supported_values );
223
  $supported_values = implode( ', ', $supported_values );
224
  }
225
 
226
  echo '<tr>';
227
+ echo '<td><code>' . esc_html( $key ) . '</code></td>';
228
+ echo '<td><code>' . esc_html( $default ) . '</code></td>';
229
+ echo '<td>' . wp_kses_post( $description ) . '</td>';
230
+ echo '<td>' . wp_kses_post( $supported_values ) . '</td>';
231
  echo '</tr>';
232
  }
233
 
234
  echo '</tbody>
235
  </table>';
236
 
237
+ echo '<h3>' . esc_html__( 'Supported icons', 'wp-socializer' ) . '</h3>';
238
  $social_icons = WPSR_Lists::social_icons();
239
  $social_icons = array_filter( $social_icons, function( $props ){
240
  if( in_array( 'for_profile', $props[ 'features' ] ) ){
243
  return false;
244
  }
245
  });
246
+ echo '<p>' . esc_html( implode( ', ', array_keys( $social_icons ) ) ) . '</p>';
247
 
248
  echo '</div>';
249
 
253
 
254
  echo '<div data-tab="share_link">';
255
 
256
+ echo '<h3>' . esc_html__( 'Syntax', 'wp-socializer' ) . '</h3>';
257
  echo '<pre>[wpsr_share_link parameter1="value" parameter2="value" ...]</pre>';
258
 
259
+ echo '<h3>' . esc_html__( 'Example', 'wp-socializer' ) . '</h3>';
260
  echo '<pre>[wpsr_share_link for="twitter"]Tweet about this page[/wpsr_share_link]</pre>';
261
 
262
+ echo '<h3>' . esc_html__( 'Output', 'wp-socializer' ) . '</h3>';
263
  echo '<pre><a href="https://twitter.com/intent/tweet?text=Post+by+author%20-%20http://example.com/post-by-author/%20@vaakash" target="_blank" rel="nofollow">Tweet about this page</a></pre>';
264
 
265
+ echo '<h3>' . esc_html__( 'Parameter reference', 'wp-socializer' ) . '</h3>';
266
 
267
  echo '<table class="widefat">
268
  <thead>
269
  <tr>
270
+ <th>' . esc_html__( 'Parameter', 'wp-socializer' ) . '</th>
271
+ <th>' . esc_html__( 'Default value', 'wp-socializer' ) . '</th>
272
+ <th>' . esc_html__( 'Description', 'wp-socializer' ) . '</th>
273
+ <th>' . esc_html__( 'Supported values', 'wp-socializer' ) . '</th>
274
  </tr>
275
  </thead>
276
  <tbody>
280
  array(
281
  'parameter' => 'for',
282
  'default_value' => '&lt;empty&gt;',
283
+ 'description' => __( 'The ID of the social media service to generate share link for.', 'wp-socializer' ),
284
+ 'supported_values' => __( 'Refer list below for the supported IDs', 'wp-socializer' )
285
  ),
286
  array(
287
  'parameter' => 'class',
288
  'default_value' => '&lt;empty&gt;',
289
+ 'description' => __( 'Sets the CSS class value for the a tag.', 'wp-socializer' ),
290
  'supported_values' => ''
291
  ),
292
  array(
293
  'parameter' => 'target',
294
  'default_value' => '_blank',
295
+ 'description' => __( 'Sets the target attribute for the link.', 'wp-socializer' ),
296
  'supported_values' => ''
297
  ),
298
  array(
299
  'parameter' => 'page_url',
300
  'default_value' => 'The URL of the current post/page where the shortcode is used.',
301
+ 'description' => __( 'Sets the URL to share.', 'wp-socializer' ),
302
  'supported_values' => ''
303
  ),
304
  array(
305
  'parameter' => 'page_title',
306
  'default_value' => 'The title of the current post/page where the shortcode is used.',
307
+ 'description' => __( 'The title of the page to share', 'wp-socializer' ),
308
  'supported_values' => ''
309
  ),
310
  array(
311
  'parameter' => 'page_excerpt',
312
  'default_value' => 'The description of the current post/page where the shortcode is used.',
313
+ 'description' => __( 'The description of the page to share', 'wp-socializer' ),
314
  'supported_values' => ''
315
  )
316
  );
317
 
318
  foreach( $rows as $row ){
319
  echo '<tr>';
320
+ echo '<td>' . esc_html( $row['parameter'] ) . '</td>';
321
+ echo '<td>' . esc_html( $row['default_value'] ) . '</td>';
322
+ echo '<td>' . esc_html( $row['description'] ) . '</td>';
323
+ echo '<td>' . esc_html( $row['supported_values'] ) . '</td>';
324
  echo '</tr>';
325
  }
326
 
327
  echo '</tbody>
328
  </table>';
329
 
330
+ echo '<h3>' . esc_html__( 'Supported icons', 'wp-socializer' ) . '</h3>';
331
  $social_icons = WPSR_Lists::social_icons();
332
  $social_icons = array_filter( $social_icons, function( $props ){
333
  if( in_array( 'for_share', $props[ 'features' ] ) ){
336
  return false;
337
  }
338
  });
339
+ echo '<p>' . esc_html( implode( ', ', array_keys( $social_icons ) ) ) . '</p>';
340
 
341
  echo '</div>';
342
 
344
 
345
  public static function note( $feature = '', $shortcode = '' ){
346
  echo '<div class="note">';
347
+ echo '<h4><i class="fas fa-code"></i>' . esc_html__( 'Shortcode', 'wp-socializer' ) . '</h4>';
348
+ echo '<p>' . sprintf( wp_kses( __( 'If you want to use %s anywhere in a custom position then you can use the shortcode <code>[%s]</code>. Please refer shortcodes page on how to customize this shortcode.', 'wp-socializer' ), array( 'code' => array() ) ), $feature, $shortcode ) . '</p>';
349
+ echo '<p><a href="' . esc_url( admin_url( 'admin.php?page=wp_socializer&tab=shortcodes' ) ) . '" target="_blank" class="button button-primary">' . esc_html__( 'Create shortcode', 'wp-socializer' ) . '</a></p>';
350
  echo '</div>';
351
  }
352
 
admin/pages/text-sharebar.php CHANGED
@@ -17,9 +17,8 @@ class WPSR_Admin_Text_Sharebar{
17
  function register( $pages ){
18
 
19
  $pages[ 'text_sharebar' ] = array(
20
- 'name' => __( 'Text sharebar', 'wpsr' ),
21
- 'banner' => WPSR_ADMIN_URL . '/images/banners/text-sharebar.svg',
22
- 'description' => __( 'Add tooltip to share the text selected by the user on social media sites.', 'wpsr' ),
23
  'category' => 'feature',
24
  'type' => 'feature',
25
  'form_name' => 'text_sharebar_settings',
@@ -46,8 +45,8 @@ class WPSR_Admin_Text_Sharebar{
46
  $options = WPSR_Options::options( 'text_sharebar' );
47
  $form = new WPSR_Form();
48
 
49
- $form->section_start( __( 'Enable/disable text sharebar', 'wpsr' ), '1' );
50
- $form->label( __( 'Select to enable or disable text sharebar feature', 'wpsr' ) );
51
  $form->field( 'select', array(
52
  'name' => 'ft_status',
53
  'value' => $values[ 'ft_status' ],
@@ -60,29 +59,28 @@ class WPSR_Admin_Text_Sharebar{
60
 
61
  $sb_sites = WPSR_Lists::social_icons();
62
 
63
- $form->section_start( __( 'Add buttons to text sharebar', 'wpsr' ) );
64
- $form->section_description( __( 'Select buttons from the list below and add it to the selected list.', 'wpsr' ) );
65
 
66
  echo '<table class="form-table ssb_tbl"><tr><td width="90%">';
67
  echo '<select class="ssb_list widefat">';
68
  foreach( $sb_sites as $id=>$prop ){
69
  if( in_array( 'for_tsb', $prop[ 'features' ] ) ){
70
- echo '<option value="' . $id . '" data-color="' . $prop['colors'][0] . '">' . $prop[ 'name' ] . '</option>';
71
  }
72
  }
73
  echo '</select>';
74
  echo '</td><td>';
75
- echo '<button class="button button-primary ssb_add">' . __( 'Add button', 'wpsr' ) . '</button>';
76
  echo '</td></tr></table>';
77
 
78
- $decoded = base64_decode( $values[ 'template' ] );
79
- $tsb_btns = json_decode( $decoded );
80
 
81
  if( !is_array( $tsb_btns ) ){
82
  $tsb_btns = array();
83
  }
84
 
85
- echo '<h4>' . __( 'Selected buttons', 'wpsr' ) . '</h4>';
86
  echo '<ul class="ssb_selected_list clearfix">';
87
  if( count( $tsb_btns ) > 0 ){
88
  foreach( $tsb_btns as $tsb_item ){
@@ -92,20 +90,20 @@ class WPSR_Admin_Text_Sharebar{
92
  }
93
 
94
  $sb_info = $sb_sites[ $tsb_item ];
95
- echo '<li title="' . $sb_info[ 'name' ] . '" data-id="' . $tsb_item . '" style="background-color:' . $sb_info['colors'][0] . '"><i class="' . $sb_info[ 'icon' ] . '"></i> <span class="ssb_remove" title="' . __( 'Delete button', 'wpsr' ) . '">x</span></li>';
96
  }
97
  }else{
98
- echo '<span class="ssb_empty">' . __( 'No buttons are selected for text sharebar', 'wpsr' ) . '</span>';
99
  }
100
  echo '</ul>';
101
- echo '<input type="hidden" name="template" class="ssb_template" value="' . $values[ 'template' ] . '"/>';
102
 
103
  $form->section_end();
104
 
105
  // Settings form
106
  $form->section_start( __( 'Settings' ), '3' );
107
 
108
- $form->label( __( 'ID or CSS class name of the content to show text sharebar', 'wpsr' ) );
109
  $form->field( 'text', array(
110
  'name' => 'content',
111
  'value' => $values['content'],
@@ -114,7 +112,7 @@ class WPSR_Admin_Text_Sharebar{
114
  ));
115
  $form->end();
116
 
117
- $form->label( __( 'Button size', 'wpsr' ) );
118
  $form->field( 'image_select', array(
119
  'name' => 'size',
120
  'value' => $values['size'],
@@ -122,7 +120,7 @@ class WPSR_Admin_Text_Sharebar{
122
  ));
123
  $form->end();
124
 
125
- $form->label( __( 'Background color', 'wpsr' ) );
126
  $form->field( 'text', array(
127
  'name' => 'bg_color',
128
  'value' => $values['bg_color'],
@@ -130,7 +128,7 @@ class WPSR_Admin_Text_Sharebar{
130
  ));
131
  $form->end();
132
 
133
- $form->label( __( 'Icon color', 'wpsr' ) );
134
  $form->field( 'text', array(
135
  'name' => 'icon_color',
136
  'value' => $values['icon_color'],
@@ -138,12 +136,12 @@ class WPSR_Admin_Text_Sharebar{
138
  ));
139
  $form->end();
140
 
141
- $form->label( __( 'Maximum word count to quote', 'wpsr' ) );
142
  $form->field( 'text', array(
143
  'type' => 'number',
144
  'name' => 'text_count',
145
  'value' => $values['text_count'],
146
- 'helper' => __( 'Set value to 0 to include all the selected text', 'wpsr' )
147
  ));
148
  $form->end();
149
 
@@ -151,8 +149,8 @@ class WPSR_Admin_Text_Sharebar{
151
  $form->section_end();
152
 
153
  // Location rules
154
- $form->section_start( __( 'Conditions to display the text sharebar', 'wpsr' ), '4' );
155
- $form->section_description( __( 'Choose the below options to select the pages which will display the text sharebar.', 'wpsr' ) );
156
  WPSR_Location_Rules::display_rules( 'loc_rules', $values[ 'loc_rules' ] );
157
  $form->section_end();
158
 
@@ -165,7 +163,13 @@ class WPSR_Admin_Text_Sharebar{
165
  }
166
 
167
  function validation( $input ){
 
 
 
 
 
168
  return $input;
 
169
  }
170
 
171
  }
17
  function register( $pages ){
18
 
19
  $pages[ 'text_sharebar' ] = array(
20
+ 'name' => __( 'Text sharebar', 'wp-socializer' ),
21
+ 'description' => __( 'Add tooltip to share the text selected by the user on social media sites.', 'wp-socializer' ),
 
22
  'category' => 'feature',
23
  'type' => 'feature',
24
  'form_name' => 'text_sharebar_settings',
45
  $options = WPSR_Options::options( 'text_sharebar' );
46
  $form = new WPSR_Form();
47
 
48
+ $form->section_start( __( 'Enable/disable text sharebar', 'wp-socializer' ), '1' );
49
+ $form->label( __( 'Select to enable or disable text sharebar feature', 'wp-socializer' ) );
50
  $form->field( 'select', array(
51
  'name' => 'ft_status',
52
  'value' => $values[ 'ft_status' ],
59
 
60
  $sb_sites = WPSR_Lists::social_icons();
61
 
62
+ $form->section_start( __( 'Add buttons to text sharebar', 'wp-socializer' ) );
63
+ $form->section_description( __( 'Select buttons from the list below and add it to the selected list.', 'wp-socializer' ) );
64
 
65
  echo '<table class="form-table ssb_tbl"><tr><td width="90%">';
66
  echo '<select class="ssb_list widefat">';
67
  foreach( $sb_sites as $id=>$prop ){
68
  if( in_array( 'for_tsb', $prop[ 'features' ] ) ){
69
+ echo '<option value="' . esc_attr( $id ) . '" data-color="' . esc_attr( $prop['colors'][0] ) . '">' . esc_html( $prop[ 'name' ] ) . '</option>';
70
  }
71
  }
72
  echo '</select>';
73
  echo '</td><td>';
74
+ echo '<button class="button button-primary ssb_add">' . esc_html__( 'Add button', 'wp-socializer' ) . '</button>';
75
  echo '</td></tr></table>';
76
 
77
+ $tsb_btns = WPSR_Lists::parse_template( $values[ 'template' ] );
 
78
 
79
  if( !is_array( $tsb_btns ) ){
80
  $tsb_btns = array();
81
  }
82
 
83
+ echo '<h4>' . esc_html__( 'Selected buttons', 'wp-socializer' ) . '</h4>';
84
  echo '<ul class="ssb_selected_list clearfix">';
85
  if( count( $tsb_btns ) > 0 ){
86
  foreach( $tsb_btns as $tsb_item ){
90
  }
91
 
92
  $sb_info = $sb_sites[ $tsb_item ];
93
+ echo '<li title="' . esc_attr( $sb_info[ 'name' ] ) . '" data-id="' . esc_attr( $tsb_item ) . '" style="background-color:' . esc_attr( $sb_info['colors'][0] ) . '"><i class="' . esc_attr( $sb_info[ 'icon' ] ) . '"></i> <span class="ssb_remove" title="' . esc_attr__( 'Delete button', 'wp-socializer' ) . '">x</span></li>';
94
  }
95
  }else{
96
+ echo '<span class="ssb_empty">' . esc_html__( 'No buttons are selected for text sharebar', 'wp-socializer' ) . '</span>';
97
  }
98
  echo '</ul>';
99
+ echo '<input type="hidden" name="template" class="ssb_template" value="' . esc_attr( $values[ 'template' ] ) . '"/>';
100
 
101
  $form->section_end();
102
 
103
  // Settings form
104
  $form->section_start( __( 'Settings' ), '3' );
105
 
106
+ $form->label( __( 'ID or CSS class name of the content to show text sharebar', 'wp-socializer' ) );
107
  $form->field( 'text', array(
108
  'name' => 'content',
109
  'value' => $values['content'],
112
  ));
113
  $form->end();
114
 
115
+ $form->label( __( 'Button size', 'wp-socializer' ) );
116
  $form->field( 'image_select', array(
117
  'name' => 'size',
118
  'value' => $values['size'],
120
  ));
121
  $form->end();
122
 
123
+ $form->label( __( 'Background color', 'wp-socializer' ) );
124
  $form->field( 'text', array(
125
  'name' => 'bg_color',
126
  'value' => $values['bg_color'],
128
  ));
129
  $form->end();
130
 
131
+ $form->label( __( 'Icon color', 'wp-socializer' ) );
132
  $form->field( 'text', array(
133
  'name' => 'icon_color',
134
  'value' => $values['icon_color'],
136
  ));
137
  $form->end();
138
 
139
+ $form->label( __( 'Maximum word count to quote', 'wp-socializer' ) );
140
  $form->field( 'text', array(
141
  'type' => 'number',
142
  'name' => 'text_count',
143
  'value' => $values['text_count'],
144
+ 'helper' => __( 'Set value to 0 to include all the selected text', 'wp-socializer' )
145
  ));
146
  $form->end();
147
 
149
  $form->section_end();
150
 
151
  // Location rules
152
+ $form->section_start( __( 'Conditions to display the text sharebar', 'wp-socializer' ), '4' );
153
+ $form->section_description( __( 'Choose the below options to select the pages which will display the text sharebar.', 'wp-socializer' ) );
154
  WPSR_Location_Rules::display_rules( 'loc_rules', $values[ 'loc_rules' ] );
155
  $form->section_end();
156
 
163
  }
164
 
165
  function validation( $input ){
166
+
167
+ array_walk_recursive( $input, function ( &$value, $key ){
168
+ $value = WPSR_Lists::sanitize_data( $key, $value, array() );
169
+ });
170
+
171
  return $input;
172
+
173
  }
174
 
175
  }
admin/post-settings.php CHANGED
@@ -54,8 +54,8 @@ class WPSR_Post_Settings{
54
 
55
  echo '<div class="wpsr_ps_tab_list_wrap">';
56
  echo '<ul class="wpsr_ps_tab_list">';
57
- echo '<li><a href="#features" class="active" data-wpsr-tab-id="features"><span class="dashicons dashicons-share"></span> ' . __( 'Features', 'wp-socializer' ) . '</a></li>';
58
- echo '<li><a href="#sharing-information" data-wpsr-tab-id="sharing-information"><span class="dashicons dashicons-info"></span> ' . __( 'Sharing information', 'wp-socializer' ) . '</a></li>';
59
  echo '</ul>';
60
  echo '</div>';
61
 
@@ -74,9 +74,9 @@ class WPSR_Post_Settings{
74
 
75
  echo '<div data-wpsr-tab="features">';
76
 
77
- echo '<p class="wpsr_ps_head">' . __( 'Disable below social features on this post in specific if they are enabled.', 'wp-socializer' ) . '</p>';
78
 
79
- $form->label( __( 'Share icons', 'wpsr' ) );
80
  $form->field( 'select', array(
81
  'type' => 'number',
82
  'name' => 'wpsr_disable_share_icons',
@@ -85,7 +85,7 @@ class WPSR_Post_Settings{
85
  ));
86
  $form->end();
87
 
88
- $form->label( __( 'Floating sharebar', 'wpsr' ) );
89
  $form->field( 'select', array(
90
  'type' => 'number',
91
  'name' => 'wpsr_disable_floating_sharebar',
@@ -94,7 +94,7 @@ class WPSR_Post_Settings{
94
  ));
95
  $form->end();
96
 
97
- $form->label( __( 'Follow icons', 'wpsr' ) );
98
  $form->field( 'select', array(
99
  'type' => 'number',
100
  'name' => 'wpsr_disable_follow_icons',
@@ -103,7 +103,7 @@ class WPSR_Post_Settings{
103
  ));
104
  $form->end();
105
 
106
- $form->label( __( 'Text sharebar', 'wpsr' ) );
107
  $form->field( 'select', array(
108
  'type' => 'number',
109
  'name' => 'wpsr_disable_text_sharebar',
@@ -112,7 +112,7 @@ class WPSR_Post_Settings{
112
  ));
113
  $form->end();
114
 
115
- $form->build( 'wpsr' );
116
 
117
  echo '</div>';
118
 
@@ -128,7 +128,7 @@ class WPSR_Post_Settings{
128
  <p><a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=post_settings&utm_campaign=wpsr-pro" target="_blank" class="button button-primary">Upgrade to WP Socializer - PRO</a></p>
129
  </div>';
130
 
131
- $form->label( __( 'Twitter tweet text', 'wpsr' ) );
132
  $form->field( 'textarea', array(
133
  'value' => '{title} - {url} {twitter-username}',
134
  'class' => 'widefat',
@@ -136,7 +136,7 @@ class WPSR_Post_Settings{
136
  ));
137
  $form->end();
138
 
139
- $form->label( __( 'Share URL for this post', 'wpsr' ) );
140
  $form->field( 'text', array(
141
  'value' => get_the_permalink(),
142
  'class' => 'widefat',
@@ -145,7 +145,7 @@ class WPSR_Post_Settings{
145
  ));
146
  $form->end();
147
 
148
- $form->label( __( 'Share title for this post', 'wpsr' ) );
149
  $form->field( 'text', array(
150
  'value' => $post->post_title,
151
  'class' => 'widefat',
@@ -154,7 +154,7 @@ class WPSR_Post_Settings{
154
  ));
155
  $form->end();
156
 
157
- $form->label( __( 'Share short URL for this post', 'wpsr' ) );
158
  $form->field( 'text', array(
159
  'value' => wp_get_shortlink( $post->ID ),
160
  'class' => 'widefat',
@@ -163,7 +163,7 @@ class WPSR_Post_Settings{
163
  ));
164
  $form->end();
165
 
166
- $form->label( __( 'Always use Short URL to share this post instead of full URL', 'wpsr' ) );
167
  $form->field( 'select', array(
168
  'type' => 'number',
169
  'value' => 'no',
@@ -175,7 +175,7 @@ class WPSR_Post_Settings{
175
  ));
176
  $form->end();
177
 
178
- $form->build( 'wpsr' );
179
 
180
  echo '</div>';
181
 
54
 
55
  echo '<div class="wpsr_ps_tab_list_wrap">';
56
  echo '<ul class="wpsr_ps_tab_list">';
57
+ echo '<li><a href="#features" class="active" data-wpsr-tab-id="features"><span class="dashicons dashicons-share"></span> ' . esc_html__( 'Features', 'wp-socializer' ) . '</a></li>';
58
+ echo '<li><a href="#sharing-information" data-wpsr-tab-id="sharing-information"><span class="dashicons dashicons-info"></span> ' . esc_html__( 'Sharing information', 'wp-socializer' ) . '</a></li>';
59
  echo '</ul>';
60
  echo '</div>';
61
 
74
 
75
  echo '<div data-wpsr-tab="features">';
76
 
77
+ echo '<p class="wpsr_ps_head">' . esc_html__( 'Disable below social features on this post in specific if they are enabled.', 'wp-socializer' ) . '</p>';
78
 
79
+ $form->label( __( 'Share icons', 'wp-socializer' ) );
80
  $form->field( 'select', array(
81
  'type' => 'number',
82
  'name' => 'wpsr_disable_share_icons',
85
  ));
86
  $form->end();
87
 
88
+ $form->label( __( 'Floating sharebar', 'wp-socializer' ) );
89
  $form->field( 'select', array(
90
  'type' => 'number',
91
  'name' => 'wpsr_disable_floating_sharebar',
94
  ));
95
  $form->end();
96
 
97
+ $form->label( __( 'Follow icons', 'wp-socializer' ) );
98
  $form->field( 'select', array(
99
  'type' => 'number',
100
  'name' => 'wpsr_disable_follow_icons',
103
  ));
104
  $form->end();
105
 
106
+ $form->label( __( 'Text sharebar', 'wp-socializer' ) );
107
  $form->field( 'select', array(
108
  'type' => 'number',
109
  'name' => 'wpsr_disable_text_sharebar',
112
  ));
113
  $form->end();
114
 
115
+ $form->build( 'wp-socializer' );
116
 
117
  echo '</div>';
118
 
128
  <p><a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/?utm_source=admin&utm_medium=post_settings&utm_campaign=wpsr-pro" target="_blank" class="button button-primary">Upgrade to WP Socializer - PRO</a></p>
129
  </div>';
130
 
131
+ $form->label( __( 'Twitter tweet text', 'wp-socializer' ) );
132
  $form->field( 'textarea', array(
133
  'value' => '{title} - {url} {twitter-username}',
134
  'class' => 'widefat',
136
  ));
137
  $form->end();
138
 
139
+ $form->label( __( 'Share URL for this post', 'wp-socializer' ) );
140
  $form->field( 'text', array(
141
  'value' => get_the_permalink(),
142
  'class' => 'widefat',
145
  ));
146
  $form->end();
147
 
148
+ $form->label( __( 'Share title for this post', 'wp-socializer' ) );
149
  $form->field( 'text', array(
150
  'value' => $post->post_title,
151
  'class' => 'widefat',
154
  ));
155
  $form->end();
156
 
157
+ $form->label( __( 'Share short URL for this post', 'wp-socializer' ) );
158
  $form->field( 'text', array(
159
  'value' => wp_get_shortlink( $post->ID ),
160
  'class' => 'widefat',
163
  ));
164
  $form->end();
165
 
166
+ $form->label( __( 'Always use Short URL to share this post instead of full URL', 'wp-socializer' ) );
167
  $form->field( 'select', array(
168
  'type' => 'number',
169
  'value' => 'no',
175
  ));
176
  $form->end();
177
 
178
+ $form->build( 'wp-socializer' );
179
 
180
  echo '</div>';
181
 
admin/widgets.php CHANGED
@@ -14,7 +14,7 @@ class WPSR_Widget_Form_Fields{
14
  }
15
 
16
  function heading( $text ){
17
- echo '<h3>' . $text . '</h3>';
18
  }
19
 
20
  function text( $id, $name, $opts = array() ){
@@ -26,10 +26,10 @@ class WPSR_Widget_Form_Fields{
26
  'custom' => ''
27
  ));
28
 
29
- $class = ( $opts[ 'class' ] == 'widefat' ) ? 'class="full_width"' : '';
30
 
31
- echo '<p ' . $class . '>';
32
- echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
33
  echo WPSR_Form::field_html( 'text', array(
34
  'type' => 'text',
35
  'name' => $this->obj->get_field_name( $id ),
@@ -53,7 +53,7 @@ class WPSR_Widget_Form_Fields{
53
  ));
54
 
55
  echo '<p>';
56
- echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
57
  echo WPSR_Form::field_html( 'select', array(
58
  'name' => $this->obj->get_field_name( $id ),
59
  'id' => $this->obj->get_field_id( $id ),
@@ -77,7 +77,7 @@ class WPSR_Widget_Form_Fields{
77
  ));
78
 
79
  echo '<p>';
80
- echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
81
  echo WPSR_Form::field_html( 'text', array(
82
  'name' => $this->obj->get_field_name( $id ),
83
  'id' => $this->obj->get_field_id( $id ),
@@ -101,7 +101,7 @@ class WPSR_Widget_Form_Fields{
101
  ));
102
 
103
  echo '<p>';
104
- echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
105
  echo WPSR_Form::field_html( 'textarea', array(
106
  'name' => $this->obj->get_field_name( $id ),
107
  'id' => $this->obj->get_field_id( $id ),
14
  }
15
 
16
  function heading( $text ){
17
+ echo '<h3>' . esc_html( $text ) . '</h3>';
18
  }
19
 
20
  function text( $id, $name, $opts = array() ){
26
  'custom' => ''
27
  ));
28
 
29
+ $class = ( $opts[ 'class' ] == 'widefat' ) ? 'full_width' : '';
30
 
31
+ echo '<p class="' . esc_attr( $class ) . '">';
32
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . esc_html( $name ) . '</label>';
33
  echo WPSR_Form::field_html( 'text', array(
34
  'type' => 'text',
35
  'name' => $this->obj->get_field_name( $id ),
53
  ));
54
 
55
  echo '<p>';
56
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . esc_html( $name ) . '</label>';
57
  echo WPSR_Form::field_html( 'select', array(
58
  'name' => $this->obj->get_field_name( $id ),
59
  'id' => $this->obj->get_field_id( $id ),
77
  ));
78
 
79
  echo '<p>';
80
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . esc_html( $name ) . '</label>';
81
  echo WPSR_Form::field_html( 'text', array(
82
  'name' => $this->obj->get_field_name( $id ),
83
  'id' => $this->obj->get_field_id( $id ),
101
  ));
102
 
103
  echo '<p>';
104
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . esc_html( $name ) . '</label>';
105
  echo WPSR_Form::field_html( 'textarea', array(
106
  'name' => $this->obj->get_field_name( $id ),
107
  'id' => $this->obj->get_field_id( $id ),
core/html-tag.php CHANGED
@@ -66,10 +66,10 @@ class WPSR_HTML_Tag{
66
  if( empty( $val ) ){
67
  continue;
68
  }
69
- $attr_string .= $name . '="' . esc_attr( $val ) . '"';
70
  }
71
 
72
- return '<' . $this->tag . ' ' . $attr_string . '>';
73
  }
74
 
75
  public function close(){
66
  if( empty( $val ) ){
67
  continue;
68
  }
69
+ $attr_string .= esc_attr( $name ) . '="' . esc_attr( $val ) . '" ';
70
  }
71
 
72
+ return '<' . $this->tag . ' ' . trim( $attr_string ) . '>';
73
  }
74
 
75
  public function close(){
core/import-export.php CHANGED
@@ -52,6 +52,10 @@ class WPSR_Import_Export{
52
  if( trim( $data ) == '' )
53
  return false;
54
 
 
 
 
 
55
  try{
56
  $imports = json_decode( $data, true );
57
  }catch( Exception $e ){
52
  if( trim( $data ) == '' )
53
  return false;
54
 
55
+ if( !current_user_can( 'unfiltered_html' ) ){
56
+ $data = wp_kses_post( $data );
57
+ }
58
+
59
  try{
60
  $imports = json_decode( $data, true );
61
  }catch( Exception $e ){
core/includes.php CHANGED
@@ -40,6 +40,7 @@ class WPSR_Includes{
40
  public static function register_defaults(){
41
 
42
  $gsettings = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
 
43
 
44
  // The default includes for template
45
  self::register( array(
@@ -67,7 +68,7 @@ class WPSR_Includes{
67
  'facebook_js' => array(
68
  'type' => 'js',
69
  'code' => '<div id="fb-root"></div>
70
- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/' . $gsettings[ 'facebook_lang' ] . '/sdk.js#xfbml=1&version=v7.0&appId=' . $gsettings[ 'facebook_app_id' ] . '"></script>',
71
  'deps' => array(),
72
  'version' => WPSR_VERSION
73
  ),
@@ -174,7 +175,7 @@ class WPSR_Includes{
174
  }
175
  }
176
 
177
- echo $inc_info[ 'code' ];
178
  }
179
 
180
  }
@@ -186,7 +187,7 @@ class WPSR_Includes{
186
  $gs = WPSR_Lists::set_defaults( $gs, WPSR_Options::default_values( 'general_settings' ) );
187
 
188
  if( trim( $gs[ 'misc_additional_css' ] ) != '' ){
189
- echo "<!-- WP Socializer - Custom CSS rules - Start --><style>" . $gs[ 'misc_additional_css' ] . "</style><!-- WP Socializer - Custom CSS rules - End -->\n";
190
  }
191
 
192
  }
@@ -212,7 +213,7 @@ class WPSR_Includes{
212
  }
213
 
214
  if( isset( $inc_info[ 'code' ] ) ){
215
- echo '<style type="text/css">' . wp_strip_all_tags( $inc_info[ 'code' ] ) . '</style>';
216
  }
217
 
218
  }
@@ -226,44 +227,6 @@ class WPSR_Includes{
226
 
227
  }
228
 
229
- public static function preview_print_includes(){
230
-
231
- $includes = self::list_all();
232
- $active_includes = self::active_includes();
233
-
234
- // Include all CSS forcefully
235
- foreach( $includes as $inc_id => $inc_info ){
236
-
237
- if( $inc_info[ 'type' ] == 'css' ){
238
-
239
- if( isset( $inc_info[ 'link' ] ) ){
240
- echo '<link rel="stylesheet" id="' . $inc_id . '" href="' . $inc_info[ 'link' ] . '" type="text/css"/>'. "\n";
241
- }
242
-
243
- if( isset( $inc_info[ 'code' ] ) ){
244
- echo '<style type="text/css">' . wp_strip_all_tags( $inc_info[ 'code' ] ) . '</style>';
245
- }
246
-
247
- }
248
- }
249
-
250
- foreach( $active_includes as $a_inc ){
251
- if( array_key_exists( $a_inc, $includes ) ){
252
- $inc_info = $includes[ $a_inc ];
253
- if( $inc_info[ 'type' ] == 'js' ){
254
-
255
- if( array_key_exists( 'link', $inc_info ) ){
256
- echo '<script src="' . $inc_info[ 'link' ] . '"></script>' . "\n";
257
- }elseif( array_key_exists( 'code', $inc_info ) ){
258
- echo $inc_info[ 'code' ];
259
- }
260
-
261
- }
262
- }
263
- }
264
-
265
- }
266
-
267
  public static function skip_include( $id ){
268
 
269
  $gsettings = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
40
  public static function register_defaults(){
41
 
42
  $gsettings = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
43
+ $fb_src = 'https://connect.facebook.net/' . $gsettings[ 'facebook_lang' ] . '/sdk.js#xfbml=1&version=v7.0&appId=' . $gsettings[ 'facebook_app_id' ];
44
 
45
  // The default includes for template
46
  self::register( array(
68
  'facebook_js' => array(
69
  'type' => 'js',
70
  'code' => '<div id="fb-root"></div>
71
+ <script async defer crossorigin="anonymous" src="' . esc_attr( $fb_src ) . '"></script>',
72
  'deps' => array(),
73
  'version' => WPSR_VERSION
74
  ),
175
  }
176
  }
177
 
178
+ echo wp_kses( $inc_info[ 'code' ], WPSR_Lists::allowed_tags() );
179
  }
180
 
181
  }
187
  $gs = WPSR_Lists::set_defaults( $gs, WPSR_Options::default_values( 'general_settings' ) );
188
 
189
  if( trim( $gs[ 'misc_additional_css' ] ) != '' ){
190
+ echo "<!-- WP Socializer - Custom CSS rules - Start --><style>" . esc_textarea( $gs[ 'misc_additional_css' ] ) . "</style><!-- WP Socializer - Custom CSS rules - End -->\n";
191
  }
192
 
193
  }
213
  }
214
 
215
  if( isset( $inc_info[ 'code' ] ) ){
216
+ echo '<style type="text/css">' . esc_textarea( $inc_info[ 'code' ] ) . '</style>';
217
  }
218
 
219
  }
227
 
228
  }
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  public static function skip_include( $id ){
231
 
232
  $gsettings = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
core/lists.php CHANGED
@@ -746,6 +746,240 @@ class WPSR_Lists{
746
 
747
  }
748
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749
  }
750
 
751
  WPSR_Lists::init();
746
 
747
  }
748
 
749
+ public static function parse_template( $template ){
750
+
751
+ $json_string = $template;
752
+ if ( preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $template ) ) {
753
+ $json_string = base64_decode( $template );
754
+ }
755
+
756
+ $template_array = json_decode( $json_string, true );
757
+ if( $template_array === null && json_last_error() !== JSON_ERROR_NONE ){
758
+ return array();
759
+ }
760
+
761
+ return $template_array;
762
+
763
+ }
764
+
765
+ public static function sanitize_data( $key, $value, $kses_fields = array() ){
766
+
767
+ if( in_array( $key, $kses_fields ) ){
768
+ if( !current_user_can( 'unfiltered_html' ) ){
769
+ $value = wp_kses_post( $value );
770
+ }
771
+ }else{
772
+ $value = sanitize_text_field( $value );
773
+ }
774
+
775
+ return $value;
776
+
777
+ }
778
+
779
+ public static function sanitize_template( $template ){
780
+
781
+ $json_array = WPSR_Lists::parse_template( $template );
782
+
783
+ array_walk_recursive( $json_array, function( &$value, $key ){
784
+ $value = self::sanitize_data( $key, $value, array(
785
+ 'html'
786
+ ));
787
+ });
788
+
789
+ return json_encode( $json_array );
790
+
791
+ }
792
+
793
+ public static function allowed_tags(){
794
+
795
+ return array(
796
+ 'a' => array(
797
+ 'href' => true,
798
+ 'title' => true,
799
+ 'class' => true,
800
+ 'data' => true,
801
+ 'rel' => true,
802
+ 'rev' => true,
803
+ 'name' => true,
804
+ 'target' => true,
805
+ 'style' => true,
806
+ 'data-*' => true
807
+ ),
808
+ 'p' => array(
809
+ 'class' => true,
810
+ 'id' => true,
811
+ 'style' => true,
812
+ 'title' => true,
813
+ ),
814
+ 'img' => array(
815
+ 'alt' => true,
816
+ 'class' => true,
817
+ 'height' => true,
818
+ 'src' => true,
819
+ 'width' => true,
820
+ 'title' => true,
821
+ 'style' => true,
822
+ 'data-*' => true
823
+ ),
824
+ 'blockquote' => array(
825
+ 'cite' => true
826
+ ),
827
+ 'dl' => array(),
828
+ 'dt' => array(),
829
+ 'em' => array(),
830
+ 'h1' => array(
831
+ 'class' => true,
832
+ 'id' => true,
833
+ 'title' => true,
834
+ ),
835
+ 'h2' => array(
836
+ 'class' => true,
837
+ 'id' => true,
838
+ 'title' => true,
839
+ ),
840
+ 'h3' => array(
841
+ 'class' => true,
842
+ 'id' => true,
843
+ 'title' => true,
844
+ ),
845
+ 'h4' => array(
846
+ 'class' => true,
847
+ 'id' => true,
848
+ 'title' => true,
849
+ ),
850
+ 'h5' => array(
851
+ 'class' => true,
852
+ 'id' => true,
853
+ 'title' => true,
854
+ ),
855
+ 'h6' => array(
856
+ 'class' => true,
857
+ 'id' => true,
858
+ 'title' => true,
859
+ ),
860
+ 'script' => array(
861
+ 'async' => true,
862
+ 'defer' => true,
863
+ 'crossorigin' => true,
864
+ 'src' => true,
865
+ 'charset' => true
866
+ ),
867
+ 'i' => array(
868
+ 'class' => true,
869
+ 'data-*' => true,
870
+ 'id' => true,
871
+ 'style' => true,
872
+ 'title' => true,
873
+ 'aria-describedby' => true,
874
+ 'aria-details' => true,
875
+ 'aria-label' => true,
876
+ 'aria-labelledby' => true,
877
+ 'aria-hidden' => true,
878
+ ),
879
+ 'br' => array(),
880
+ 'em' => array(),
881
+ 'small' => array(
882
+ 'class' => true,
883
+ 'data-*' => true,
884
+ 'style' => true,
885
+ 'title' => true
886
+ ),
887
+ 'ul' => array(
888
+ 'class' => true,
889
+ 'style' => true,
890
+ 'id' => true,
891
+ 'data-*' => true
892
+ ),
893
+ 'ol' => array(
894
+ 'class' => true,
895
+ 'style' => true,
896
+ 'id' => true,
897
+ 'data-*' => true
898
+ ),
899
+ 'li' => array(
900
+ 'class' => true,
901
+ 'style' => true,
902
+ 'title' => true,
903
+ 'data-*' => true,
904
+ ),
905
+ 'strong' => array(),
906
+ 'div' => array(
907
+ 'id' => true,
908
+ 'class' => true,
909
+ 'style' => true,
910
+ 'data-*' => true,
911
+ 'title' => true
912
+ ),
913
+ 'span' => array(
914
+ 'class' => true,
915
+ 'style' => true,
916
+ 'data-*' => true
917
+ ),
918
+ 'select' => array(
919
+ 'id' => true,
920
+ 'class' => true,
921
+ 'name' => true,
922
+ ),
923
+ 'style' => array(
924
+ 'id' => true,
925
+ 'type' => true
926
+ ),
927
+ 'table' => array(
928
+ 'class' => true,
929
+ 'style' => true,
930
+ 'id' => true,
931
+ 'data-*' => true
932
+ ),
933
+ 'tr' => array(),
934
+ 'td' => array(
935
+ 'colspan' => true
936
+ ),
937
+ 'svg' => array(
938
+ 'class' => true,
939
+ 'width' => true,
940
+ 'height' => true,
941
+ 'viewBox' => true,
942
+ 'viewbox' => true,
943
+ 'aria-hidden' => true,
944
+ 'xmlns' => true,
945
+ 'xml:space' => true,
946
+ 'version' => true,
947
+ 'xmlns:xlink' => true,
948
+ ),
949
+ 'path' => array(
950
+ 'stroke-width' => true,
951
+ 'stroke' => true,
952
+ 'fill' => true,
953
+ 'd' => true
954
+ ),
955
+ 'circle' => array(
956
+ 'stroke-width' => true,
957
+ 'stroke' => true,
958
+ 'fill' => true,
959
+ 'cx' => true,
960
+ 'cy' => true,
961
+ 'r' => true
962
+ ),
963
+ 'polygon' => array(
964
+ 'stroke-width' => true,
965
+ 'stroke' => true,
966
+ 'fill' => true,
967
+ 'points' => true
968
+ ),
969
+ 'g' => array(
970
+ 'stroke-width' => true,
971
+ 'stroke' => true,
972
+ 'stroke-linecap' => true,
973
+ 'stroke-miterlimit' => true,
974
+ 'fill' => true,
975
+ 'fill' => true,
976
+ 'fill' => true,
977
+ 'fill' => true,
978
+ ),
979
+ );
980
+
981
+ }
982
+
983
  }
984
 
985
  WPSR_Lists::init();
core/location-rules.php CHANGED
@@ -22,7 +22,7 @@ class WPSR_Location_Rules{
22
  'single' => array(
23
  'name' => 'Single post',
24
  'callback' => array( __CLASS__, 'rule_is_single' ),
25
- 'placeholder' => __( 'Select specific posts', 'wpsr' ),
26
  'helper' => 1,
27
  'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
28
  ),
@@ -30,7 +30,7 @@ class WPSR_Location_Rules{
30
  'page' => array(
31
  'name' => 'Page',
32
  'callback' => array( __CLASS__, 'rule_is_page' ),
33
- 'placeholder' => __( 'Select specific pages', 'wpsr' ),
34
  'helper' => 1,
35
  'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
36
  ),
@@ -80,21 +80,21 @@ class WPSR_Location_Rules{
80
  'category' => array(
81
  'name' => 'Category archive page',
82
  'callback' => array( __CLASS__, 'rule_is_category' ),
83
- 'placeholder' => __( 'Select available category archive pages', 'wpsr' ),
84
  'helper' => 1
85
  ),
86
 
87
  'tag' => array(
88
  'name' => 'Tags archive page',
89
  'callback' => array( __CLASS__, 'rule_is_tag' ),
90
- 'placeholder' => __( 'Select available tag archive pages', 'wpsr' ),
91
  'helper' => 1
92
  ),
93
 
94
  'taxonomy' => array(
95
  'name' => 'Taxonomy archive page',
96
  'callback' => array( __CLASS__, 'rule_is_taxonomy' ),
97
- 'placeholder' => __( 'Select available taxonomy archive pages', 'wpsr' ),
98
  'children' => array( 'has-term' ),
99
  'helper' => 1
100
  ),
@@ -114,21 +114,21 @@ class WPSR_Location_Rules{
114
  'has-category' => array(
115
  'name' => 'Categories of post',
116
  'callback' => array( __CLASS__, 'rule_has_category' ),
117
- 'placeholder' => __( 'Select available categories', 'wpsr' ),
118
  'helper' => 1
119
  ),
120
 
121
  'has-tag' => array(
122
  'name' => 'Tags of post',
123
  'callback' => array( __CLASS__, 'rule_has_tag' ),
124
- 'placeholder' => __( 'Select available tags', 'wpsr' ),
125
  'helper' => 1
126
  ),
127
 
128
  'has-term' => array(
129
  'name' => 'Terms of post',
130
  'callback' => array( __CLASS__, 'rule_has_term' ),
131
- 'placeholder' => __( 'Select available terms', 'wpsr' ),
132
  'helper' => 1
133
  ),
134
 
@@ -212,11 +212,11 @@ class WPSR_Location_Rules{
212
  public static function selectors_ajax(){
213
 
214
  $rules = self::rules_list();
215
- $rule_id = $_GET[ 'rule_id' ];
216
- $selected = $_GET[ 'selected' ];
217
 
218
  if( !array_key_exists( $rule_id, $rules ) ){
219
- die( __( 'Invalid rule id !', 'wpsr' ) );
220
  }
221
 
222
  // Mode 1: Get selectors list
@@ -224,7 +224,7 @@ class WPSR_Location_Rules{
224
  if( isset( $rules[ $rule_id ][ 'callback' ] ) && is_callable( $rules[ $rule_id ][ 'callback' ] ) ){
225
  $list = call_user_func_array( $rules[ $rule_id ][ 'callback' ], array( 1, '' ) ); # Mode 1
226
  }else{
227
- die( __( 'No selections supported for this page !', 'wpsr' ) );
228
  }
229
 
230
  if( empty( $list ) )
@@ -235,7 +235,7 @@ class WPSR_Location_Rules{
235
  if( is_array( $selSplit ) ){
236
  foreach ( $list as $k => $v ){
237
  $isCheck = in_array( $k, $selSplit ) ? 'checked="selected"' : '';
238
- echo '<label><input type="checkbox" ' . $isCheck . ' value="' . $k . '"> ' . $v . '</label><br/>';
239
  }
240
  }
241
 
@@ -245,11 +245,12 @@ class WPSR_Location_Rules{
245
 
246
  public static function display_rules( $id, $values = array() ){
247
 
 
248
  $types = array(
249
- 'show_all' => array( __( 'Show in all pages', 'wpsr' ), 'lr-show-all.svg', '80px' ),
250
- 'hide_all' => array( __( 'Hide in all pages', 'wpsr' ), 'lr-hide-all.svg', '80px' ),
251
- 'show_selected' => array( __( 'Show in selected pages', 'wpsr' ), 'lr-show-sel.svg', '80px' ),
252
- 'hide_selected' => array( __( 'Hide in selected pages', 'wpsr' ), 'lr-hide-sel.svg', '80px' )
253
  );
254
 
255
  echo '<div class="loc_rules_wrap">';
@@ -271,7 +272,7 @@ class WPSR_Location_Rules{
271
  $values['rule'] = json_decode( base64_decode( $values['rule'] ) );
272
 
273
  echo '<div class="loc_rules_inner" data-conditioner data-condr-input="(prev::)(find::select)" data-condr-value="selected" data-condr-action="pattern?fadeIn:hide" data-condr-events="change">';
274
- echo '<p class="loc_rule_info">' . __( 'No page rules are added. Template will be hidden everywhere', 'wpsr' ) . '</p>';
275
 
276
  echo '<div class="loc_rules_box">';
277
  if( is_array( $values['rule'] ) ){
@@ -285,11 +286,11 @@ class WPSR_Location_Rules{
285
  }
286
  echo '</div>';
287
 
288
- echo '<a href="#" class="button-primary loc_group_add" title="' . __( 'Add another page', 'wpsr' ) . '"> AND </a>';
289
  echo '</div>';
290
 
291
  echo '<div class="hidden">';
292
- echo '<input type="hidden" name="' . $id . '[rule]" class="loc_rule_value" />';
293
  echo '<div class="loc_rules_temp">' . self::rules_template( array( '', '', '' ), 1 ) . '</div>';
294
  echo '</div>';
295
 
@@ -313,19 +314,19 @@ class WPSR_Location_Rules{
313
  $s = selected( $k, $val[ 0 ], false );
314
 
315
  if( isset( $v[ 'helper' ] ) ){
316
- $h = 'data-helper="' . $v[ 'helper' ] . '"';
317
  }
318
 
319
- $p = isset( $v[ 'placeholder' ] ) ? ' data-placeholder="' . $v[ 'placeholder' ] . '"' : '';
320
- $loc_pages .= '<option value="' . $k . '" ' . $s . $h . $p . '>' . $v[ 'name' ] . '</option>';
321
  }
322
 
323
  foreach( $operators as $k => $v ){
324
  $s = selected( $v[0], $val[1], false );
325
- $loc_operators .= '<option value="' . $v[0] . '" ' . $s . '>' . $v[1] . '</option>';
326
  }
327
 
328
- $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' ) . '">and</a><a href="#" class="button loc_rule_remove" title="' . __( 'Remove criteria', 'wpsr' ) . '"><i class="fas fa-minus"></i></a></div>';
329
 
330
  if( $grp ) return '<div class="loc_group_wrap">' . $rule . '</div>';
331
  else return $rule;
@@ -349,7 +350,7 @@ class WPSR_Location_Rules{
349
  }
350
  return $list;
351
  }else{
352
- die( __( 'No posts !', 'wpsr' ) );
353
  }
354
 
355
  }elseif( $mode == 2 ){ // Rule check
@@ -371,7 +372,7 @@ class WPSR_Location_Rules{
371
  }
372
  return $list;
373
  }else{
374
- die( __( 'No pages !', 'wpsr' ) );
375
  }
376
 
377
  return $list;
@@ -446,7 +447,7 @@ class WPSR_Location_Rules{
446
  }
447
  return $list;
448
  }else{
449
- die( __( 'No categories !', 'wpsr' ) );
450
  }
451
 
452
  }elseif( $mode == 2 ){ // Rule check
@@ -469,7 +470,7 @@ class WPSR_Location_Rules{
469
  }
470
  return $list;
471
  }else{
472
- die( __( 'No tags !', 'wpsr' ) );
473
  }
474
 
475
  }elseif( $mode == 2 ){ // Rule check
@@ -491,7 +492,7 @@ class WPSR_Location_Rules{
491
  }
492
  return $list;
493
  }else{
494
- die( __( 'No taxonomies !', 'wpsr' ) );
495
  }
496
 
497
  }elseif( $mode == 2 ){ // Rule check
@@ -522,7 +523,7 @@ class WPSR_Location_Rules{
522
  }
523
  return $list;
524
  }else{
525
- die( __( 'No categories !', 'wpsr' ) );
526
  }
527
 
528
  }elseif( $mode == 2 ){ // Rule check
@@ -544,7 +545,7 @@ class WPSR_Location_Rules{
544
  }
545
  return $list;
546
  }else{
547
- die( __( 'No tags !', 'wpsr' ) );
548
  }
549
 
550
  }elseif( $mode == 2 ){ // Rule check
@@ -566,7 +567,7 @@ class WPSR_Location_Rules{
566
  }
567
  return $list;
568
  }else{
569
- die( __( 'No terms !', 'wpsr' ) );
570
  }
571
 
572
  }elseif( $mode == 2 ){ // Rule check
22
  'single' => array(
23
  'name' => 'Single post',
24
  'callback' => array( __CLASS__, 'rule_is_single' ),
25
+ 'placeholder' => __( 'Select specific posts', 'wp-socializer' ),
26
  'helper' => 1,
27
  'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
28
  ),
30
  'page' => array(
31
  'name' => 'Page',
32
  'callback' => array( __CLASS__, 'rule_is_page' ),
33
+ 'placeholder' => __( 'Select specific pages', 'wp-socializer' ),
34
  'helper' => 1,
35
  'children' => array( 'has-category', 'has-tag', 'post-type', 'has-term' )
36
  ),
80
  'category' => array(
81
  'name' => 'Category archive page',
82
  'callback' => array( __CLASS__, 'rule_is_category' ),
83
+ 'placeholder' => __( 'Select available category archive pages', 'wp-socializer' ),
84
  'helper' => 1
85
  ),
86
 
87
  'tag' => array(
88
  'name' => 'Tags archive page',
89
  'callback' => array( __CLASS__, 'rule_is_tag' ),
90
+ 'placeholder' => __( 'Select available tag archive pages', 'wp-socializer' ),
91
  'helper' => 1
92
  ),
93
 
94
  'taxonomy' => array(
95
  'name' => 'Taxonomy archive page',
96
  'callback' => array( __CLASS__, 'rule_is_taxonomy' ),
97
+ 'placeholder' => __( 'Select available taxonomy archive pages', 'wp-socializer' ),
98
  'children' => array( 'has-term' ),
99
  'helper' => 1
100
  ),
114
  'has-category' => array(
115
  'name' => 'Categories of post',
116
  'callback' => array( __CLASS__, 'rule_has_category' ),
117
+ 'placeholder' => __( 'Select available categories', 'wp-socializer' ),
118
  'helper' => 1
119
  ),
120
 
121
  'has-tag' => array(
122
  'name' => 'Tags of post',
123
  'callback' => array( __CLASS__, 'rule_has_tag' ),
124
+ 'placeholder' => __( 'Select available tags', 'wp-socializer' ),
125
  'helper' => 1
126
  ),
127
 
128
  'has-term' => array(
129
  'name' => 'Terms of post',
130
  'callback' => array( __CLASS__, 'rule_has_term' ),
131
+ 'placeholder' => __( 'Select available terms', 'wp-socializer' ),
132
  'helper' => 1
133
  ),
134
 
212
  public static function selectors_ajax(){
213
 
214
  $rules = self::rules_list();
215
+ $rule_id = sanitize_text_field( $_GET[ 'rule_id' ] );
216
+ $selected = sanitize_text_field( $_GET[ 'selected' ] );
217
 
218
  if( !array_key_exists( $rule_id, $rules ) ){
219
+ die( __( 'Invalid rule id !', 'wp-socializer' ) );
220
  }
221
 
222
  // Mode 1: Get selectors list
224
  if( isset( $rules[ $rule_id ][ 'callback' ] ) && is_callable( $rules[ $rule_id ][ 'callback' ] ) ){
225
  $list = call_user_func_array( $rules[ $rule_id ][ 'callback' ], array( 1, '' ) ); # Mode 1
226
  }else{
227
+ die( __( 'No selections supported for this page !', 'wp-socializer' ) );
228
  }
229
 
230
  if( empty( $list ) )
235
  if( is_array( $selSplit ) ){
236
  foreach ( $list as $k => $v ){
237
  $isCheck = in_array( $k, $selSplit ) ? 'checked="selected"' : '';
238
+ echo '<label><input type="checkbox" ' . $isCheck . ' value="' . esc_attr( $k ) . '"> ' . esc_html( $v ) . '</label><br/>';
239
  }
240
  }
241
 
245
 
246
  public static function display_rules( $id, $values = array() ){
247
 
248
+ $values = (array) $values;
249
  $types = array(
250
+ 'show_all' => array( __( 'Show in all pages', 'wp-socializer' ), 'lr-show-all.svg', '80px' ),
251
+ 'hide_all' => array( __( 'Hide in all pages', 'wp-socializer' ), 'lr-hide-all.svg', '80px' ),
252
+ 'show_selected' => array( __( 'Show in selected pages', 'wp-socializer' ), 'lr-show-sel.svg', '80px' ),
253
+ 'hide_selected' => array( __( 'Hide in selected pages', 'wp-socializer' ), 'lr-hide-sel.svg', '80px' )
254
  );
255
 
256
  echo '<div class="loc_rules_wrap">';
272
  $values['rule'] = json_decode( base64_decode( $values['rule'] ) );
273
 
274
  echo '<div class="loc_rules_inner" data-conditioner data-condr-input="(prev::)(find::select)" data-condr-value="selected" data-condr-action="pattern?fadeIn:hide" data-condr-events="change">';
275
+ echo '<p class="loc_rule_info">' . esc_html__( 'No page rules are added. Template will be hidden everywhere', 'wp-socializer' ) . '</p>';
276
 
277
  echo '<div class="loc_rules_box">';
278
  if( is_array( $values['rule'] ) ){
286
  }
287
  echo '</div>';
288
 
289
+ echo '<a href="#" class="button-primary loc_group_add" title="' . esc_attr__( 'Add another page', 'wp-socializer' ) . '"> AND </a>';
290
  echo '</div>';
291
 
292
  echo '<div class="hidden">';
293
+ echo '<input type="hidden" name="' . esc_attr( $id ) . '[rule]" class="loc_rule_value" />';
294
  echo '<div class="loc_rules_temp">' . self::rules_template( array( '', '', '' ), 1 ) . '</div>';
295
  echo '</div>';
296
 
314
  $s = selected( $k, $val[ 0 ], false );
315
 
316
  if( isset( $v[ 'helper' ] ) ){
317
+ $h = 'data-helper="' . esc_attr( $v[ 'helper' ] ) . '"';
318
  }
319
 
320
+ $p = isset( $v[ 'placeholder' ] ) ? ' data-placeholder="' . esc_attr( $v[ 'placeholder' ] ) . '"' : '';
321
+ $loc_pages .= '<option value="' . esc_attr( $k ) . '" ' . $s . $h . $p . '>' . esc_html( $v[ 'name' ] ) . '</option>';
322
  }
323
 
324
  foreach( $operators as $k => $v ){
325
  $s = selected( $v[0], $val[1], false );
326
+ $loc_operators .= '<option value="' . esc_attr( $v[0] ) . '" ' . $s . '>' . esc_html( $v[1] ) . '</option>';
327
  }
328
 
329
+ $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="' . esc_attr( $val[2] ) . '" placeholder="" title="' . esc_attr__( 'Leave empty to show in all', 'wp-socializer' ) . '"/><a href="#" class="button loc_rule_add" title="' . esc_attr__( 'Add another criteria to match', 'wp-socializer' ) . '">and</a><a href="#" class="button loc_rule_remove" title="' . esc_attr__( 'Remove criteria', 'wp-socializer' ) . '"><i class="fas fa-minus"></i></a></div>';
330
 
331
  if( $grp ) return '<div class="loc_group_wrap">' . $rule . '</div>';
332
  else return $rule;
350
  }
351
  return $list;
352
  }else{
353
+ die( __( 'No posts !', 'wp-socializer' ) );
354
  }
355
 
356
  }elseif( $mode == 2 ){ // Rule check
372
  }
373
  return $list;
374
  }else{
375
+ die( __( 'No pages !', 'wp-socializer' ) );
376
  }
377
 
378
  return $list;
447
  }
448
  return $list;
449
  }else{
450
+ die( __( 'No categories !', 'wp-socializer' ) );
451
  }
452
 
453
  }elseif( $mode == 2 ){ // Rule check
470
  }
471
  return $list;
472
  }else{
473
+ die( __( 'No tags !', 'wp-socializer' ) );
474
  }
475
 
476
  }elseif( $mode == 2 ){ // Rule check
492
  }
493
  return $list;
494
  }else{
495
+ die( __( 'No taxonomies !', 'wp-socializer' ) );
496
  }
497
 
498
  }elseif( $mode == 2 ){ // Rule check
523
  }
524
  return $list;
525
  }else{
526
+ die( __( 'No categories !', 'wp-socializer' ) );
527
  }
528
 
529
  }elseif( $mode == 2 ){ // Rule check
545
  }
546
  return $list;
547
  }else{
548
+ die( __( 'No tags !', 'wp-socializer' ) );
549
  }
550
 
551
  }elseif( $mode == 2 ){ // Rule check
567
  }
568
  return $list;
569
  }else{
570
+ die( __( 'No terms !', 'wp-socializer' ) );
571
  }
572
 
573
  }elseif( $mode == 2 ){ // Rule check
core/metadata.php CHANGED
@@ -148,7 +148,7 @@ class WPSR_Metadata{
148
 
149
  $d = array(
150
  'title' => wp_title( '', false ),
151
- 'url' => home_url( esc_url( $_SERVER['REQUEST_URI'] ) )
152
  );
153
 
154
  }
148
 
149
  $d = array(
150
  'title' => wp_title( '', false ),
151
+ 'url' => home_url( esc_url_raw( $_SERVER['REQUEST_URI'] ) )
152
  );
153
 
154
  }
core/options.php CHANGED
@@ -27,7 +27,7 @@ class WPSR_Options{
27
  'ribbon' => array( 'Ribbon*', 'shape-ribbon.svg', '32px' )
28
  ),
29
  'hover_effect' => array(
30
- '' => __( 'None', 'wpsr' ),
31
  'opacity' => 'Fade',
32
  'rotate' => 'Rotate',
33
  'zoom' => 'Zoom',
@@ -92,9 +92,9 @@ class WPSR_Options{
92
 
93
  return array(
94
  'selected_icons' => array(
95
- 'default' => 'W3siZmFjZWJvb2siOnsiaG92ZXJfdGV4dCI6IiIsInRleHQiOiIiLCJpY29uIjoiIn19LHsidHdpdHRlciI6eyJpY29uIjoiIiwidGV4dCI6IiIsImhvdmVyX3RleHQiOiIifX0seyJsaW5rZWRpbiI6eyJpY29uIjoiIiwidGV4dCI6IiIsImhvdmVyX3RleHQiOiIifX0seyJwaW50ZXJlc3QiOnsiaWNvbiI6IiIsInRleHQiOiIiLCJob3Zlcl90ZXh0IjoiIn19LHsicHJpbnQiOnsiaWNvbiI6IiIsInRleHQiOiIiLCJob3Zlcl90ZXh0IjoiIn19LHsicGRmIjp7Imljb24iOiIiLCJ0ZXh0IjoiIiwiaG92ZXJfdGV4dCI6IiJ9fV0=',
96
  'options' => false,
97
- 'description' => __( 'The social media icons selected for sharing', 'wpsr' )
98
  ),
99
  'layout' => array(
100
  'default' => '',
@@ -102,32 +102,32 @@ class WPSR_Options{
102
  '' => array( 'Normal', 'layout-horizontal.svg', '64px' ),
103
  'fluid' => array( 'Full width', 'layout-fluid.svg', '64px' ),
104
  ),
105
- 'description' => __( 'The layout of the social icons. It decides whether the icons should be of normal width or full width. Select fluid for full width.', 'wpsr' )
106
  ),
107
  'icon_size' => array(
108
  'default' => '32px',
109
  'options' => self::common_options( 'icon_size' ),
110
- 'description' => __( 'The size of the icons.', 'wpsr' )
111
  ),
112
  'icon_shape' => array(
113
  'default' => 'circle',
114
  'options' => self::common_options( 'icon_shape' ),
115
- 'description' => __( 'The shape of the icons.', 'wpsr' )
116
  ),
117
  'hover_effect' => array(
118
  'default' => 'opacity',
119
  'options' => self::common_options( 'hover_effect' ),
120
- 'description' => __( 'The behavior of the icons when mouse is hovered over them.', 'wpsr' )
121
  ),
122
  'icon_color' => array(
123
  'default' => '#ffffff',
124
  'options' => false,
125
- 'description' => __( 'The color of the icons.', 'wpsr' )
126
  ),
127
  'icon_bg_color' => array(
128
  'default' => '',
129
  'options' => false,
130
- 'description' => __( 'The background color of the icons. Leave empty to take the social media site\'s own color.', 'wpsr' )
131
  ),
132
  'padding' => array(
133
  'default' => 'pad',
@@ -135,17 +135,17 @@ class WPSR_Options{
135
  '' => 'No',
136
  'pad' => 'Yes'
137
  ),
138
- 'description' => __( 'Decides whether to add a space between the icons.', 'wpsr' )
139
  ),
140
  'share_counter' => array(
141
  'default' => 'total-individual',
142
  'options' => self::common_options( 'share_counter' ),
143
- 'description' => __( 'The type of share counters to display in the share icons bar.', 'wpsr' )
144
  ),
145
  'sc_style' => array(
146
  'default' => 'count-1',
147
  'options' => self::common_options( 'sc_style' ),
148
- 'description' => __( 'The design style of the share count numbers and how they are displayed.', 'wpsr' )
149
  ),
150
  'sc_total_position' => array(
151
  'default' => 'left',
@@ -153,12 +153,12 @@ class WPSR_Options{
153
  'left' => 'Left to the icons',
154
  'right' => 'Right to the icons'
155
  ),
156
- 'description' => __( 'The position of the total count. This is effective only when share_counter includes total count.', 'wpsr' )
157
  ),
158
  'more_icons' => array(
159
  'default' => '0',
160
  'options' => self::common_options( 'more_icons' ),
161
- 'description' => __( 'The number of icons from the last to group into a single icon.', 'wpsr' )
162
  ),
163
  'center_icons' => array(
164
  'default' => '',
@@ -166,12 +166,12 @@ class WPSR_Options{
166
  '' => 'No',
167
  'yes' => 'Yes'
168
  ),
169
- 'description' => __( 'Centers the icon in the content.', 'wpsr' )
170
  ),
171
  'heading' => array(
172
  'default' => '<h3>Share and Enjoy !</h3>',
173
  'options' => false,
174
- 'description' => __( 'The heading to display above the icons. HTML is allowed.', 'wpsr' )
175
  ),
176
  'custom_html_above' => array(
177
  'default' => '',
@@ -185,23 +185,23 @@ class WPSR_Options{
185
  'sm_screen_width' => array(
186
  'default' => '768',
187
  'options' => false,
188
- 'description' => __( 'The screen width below which the icons will act in mobile/small screen mode. In pixels.', 'wpsr' )
189
  ),
190
  'lg_screen_action' => array(
191
  'default' => 'show',
192
  'options' => array(
193
- 'show' => __( 'Show', 'wpsr' ),
194
- 'hide' => __( 'Hide', 'wpsr' )
195
  ),
196
- 'description' => __( 'The behavior of the icons in desktop/large screens.', 'wpsr' )
197
  ),
198
  'sm_screen_action' => array(
199
  'default' => 'show',
200
  'options' => array(
201
- 'show' => __( 'Show', 'wpsr' ),
202
- 'hide' => __( 'Hide', 'wpsr' )
203
  ),
204
- 'description' => __( 'The behavior of the icons in mobile/small screens.', 'wpsr' )
205
  ),
206
 
207
  'loc_rules' => array(
@@ -215,19 +215,19 @@ class WPSR_Options{
215
  'position' => array(
216
  'default' => 'below_posts',
217
  'options' => array(
218
- 'above_posts' => __( 'Above posts', 'wpsr' ),
219
- 'below_posts' => __( 'Below posts', 'wpsr' ),
220
- 'above_below_posts' => __( 'Both above and below posts', 'wpsr' )
221
  ),
222
- 'description' => __( 'The position of the social icons in a post.', 'wpsr' )
223
  ),
224
  'in_excerpt' => array(
225
  'default' => 'hide',
226
  'options' => array(
227
- 'show' => __( 'Show in excerpt', 'wpsr' ),
228
- 'hide' => __( 'Hide in excerpt', 'wpsr' )
229
  ),
230
- 'description' => __( 'Decides whether to show the icons in the excerpts.', 'wpsr' )
231
  )
232
  );
233
 
@@ -239,12 +239,12 @@ class WPSR_Options{
239
  'ft_status' => array(
240
  'default' => 'disable',
241
  'options' => array(
242
- 'enable' => __( 'Enable floating sharebar', 'wpsr' ),
243
- 'disable' => __( 'Disable floating sharebar', 'wpsr' )
244
  )
245
  ),
246
  'selected_icons' => array(
247
- 'default' => 'W3siZmFjZWJvb2siOnsiaG92ZXJfdGV4dCI6IiIsImljb24iOiIifX0seyJ0d2l0dGVyIjp7ImhvdmVyX3RleHQiOiIiLCJpY29uIjoiIn19LHsibGlua2VkaW4iOnsiaG92ZXJfdGV4dCI6IiIsImljb24iOiIifX0seyJlbWFpbCI6eyJob3Zlcl90ZXh0IjoiIiwiaWNvbiI6IiJ9fSx7InBkZiI6eyJob3Zlcl90ZXh0IjoiIiwiaWNvbiI6IiJ9fSx7IndoYXRzYXBwIjp7ImhvdmVyX3RleHQiOiIiLCJpY29uIjoiIn19XQ==',
248
  'options' => false
249
  ),
250
  'icon_size' => array(
@@ -304,8 +304,8 @@ class WPSR_Options{
304
  'movement' => array(
305
  'default' => 'move',
306
  'options' => array(
307
- 'move' => __( 'Sticky, move when page is scrolled', 'wpsr' ),
308
- 'static' => __( 'Static, no movement', 'wpsr' )
309
  )
310
  ),
311
  'share_counter' => array(
@@ -335,16 +335,16 @@ class WPSR_Options{
335
  'lg_screen_action' => array(
336
  'default' => 'show',
337
  'options' => array(
338
- 'show' => __( 'Show', 'wpsr' ),
339
- 'hide' => __( 'Hide', 'wpsr' ),
340
- 'close' => __( 'Close', 'wpsr' )
341
  )
342
  ),
343
  'sm_screen_action' => array(
344
  'default' => 'bottom',
345
  'options' => array(
346
- 'bottom' => __( 'Show to bottom of the page', 'wpsr' ),
347
- 'hide' => __( 'Hide', 'wpsr' )
348
  )
349
  ),
350
 
@@ -369,33 +369,33 @@ class WPSR_Options{
369
  'ft_status' => array(
370
  'default' => 'disable',
371
  'options' => array(
372
- 'enable' => __( 'Enable follow icons', 'wpsr' ),
373
- 'disable' => __( 'Disable follow icons', 'wpsr' )
374
  )
375
  ),
376
  'template' => array(
377
- 'default' => 'W10=',
378
  'options' => false
379
  ),
380
  'shape' => array(
381
  'default' => '',
382
  'options' => self::common_options( 'icon_shape' ),
383
- 'description' => __( 'The shape of the icons.', 'wpsr' )
384
  ),
385
  'size' => array(
386
  'default' => '32px',
387
  'options' => self::common_options( 'icon_size' ),
388
- 'description' => __( 'The size of the icons.', 'wpsr' )
389
  ),
390
  'bg_color' => array(
391
  'default' => '',
392
  'options' => false,
393
- 'description' => __( 'The background color of the icons. Leave empty to take the default social media site\'s brand color', 'wpsr' )
394
  ),
395
  'icon_color' => array(
396
  'default' => '#ffffff',
397
  'options' => false,
398
- 'description' => __( 'The color of the icon.', 'wpsr' )
399
  ),
400
  'orientation' => array(
401
  'default' => 'vertical',
@@ -403,7 +403,7 @@ class WPSR_Options{
403
  'vertical' => array( 'Vertical', 'layout-vertical.svg', '75px' ),
404
  'horizontal' => array( 'Horizontal', 'layout-horizontal.svg', '75px' ),
405
  ),
406
- 'description' => __( 'The orientation of the icon bar.', 'wpsr' )
407
  ),
408
  'position' => array(
409
  'default' => 'rm',
@@ -421,15 +421,15 @@ class WPSR_Options{
421
  'hover' => array(
422
  'default' => 'zoom',
423
  'options' => self::common_options( 'hover_effect' ),
424
- 'description' => __( 'The behavior of the icons when mouse is hovered over them.', 'wpsr' )
425
  ),
426
  'pad' => array(
427
  'default' => 'pad',
428
  'options' => array(
429
- '' => __( 'No', 'wpsr' ),
430
- 'pad' => __( 'Yes', 'wpsr' )
431
  ),
432
- 'description' => __( 'Decides whether to add a space between the icons.', 'wpsr' )
433
  ),
434
  'title' => array(
435
  'default' => '',
@@ -441,30 +441,30 @@ class WPSR_Options{
441
  'no' => 'No',
442
  '' => 'Yes',
443
  ),
444
- 'description' => __( 'Decides whether to open the links in a popup or in a new tab.', 'wpsr' )
445
  ),
446
  'sm_screen_width' => array(
447
  'default' => '768',
448
  'options' => false,
449
- 'description' => __( 'The screen width below which the icons will act in mobile/small screen mode. In pixels.', 'wpsr' )
450
  ),
451
  'lg_screen_action' => array(
452
  'default' => 'show',
453
  'options' => array(
454
- 'show' => __( 'Show', 'wpsr' ),
455
- 'hide' => __( 'Hide', 'wpsr' ),
456
- 'close' => __( 'Close', 'wpsr' )
457
  ),
458
- 'description' => __( 'The behavior of the icons in desktop/large screens.', 'wpsr' )
459
  ),
460
  'sm_screen_action' => array(
461
  'default' => 'show',
462
  'options' => array(
463
- 'show' => __( 'Show', 'wpsr' ),
464
- 'hide' => __( 'Hide', 'wpsr' ),
465
- 'close' => __( 'Close', 'wpsr' )
466
  ),
467
- 'description' => __( 'The behavior of the icons in mobile/small screens.', 'wpsr' )
468
  ),
469
  'loc_rules' => array(
470
  'default' => array(
@@ -482,14 +482,14 @@ class WPSR_Options{
482
  return array(
483
  'ft_status' => array(
484
  'options' => array(
485
- 'enable' => __( 'Enable text sharebar', 'wpsr' ),
486
- 'disable' => __( 'Disable text sharebar', 'wpsr' )
487
  ),
488
  'default' => 'disable'
489
  ),
490
  'template' => array(
491
  'options' => false,
492
- 'default' => 'W10=',
493
  ),
494
  'content' => array(
495
  'options' => false,
@@ -530,8 +530,8 @@ class WPSR_Options{
530
  'share_menu' => array(
531
  'default' => 'yes',
532
  'options' => array(
533
- 'no' => __( 'No', 'wpsr' ),
534
- 'yes' => __( 'Yes', 'wpsr' )
535
  )
536
  ),
537
  'facebook_app_id' => array(
@@ -563,8 +563,8 @@ class WPSR_Options{
563
  'counter_both_protocols' => array(
564
  'default' => 'no',
565
  'options' => array(
566
- 'no' => __( 'No', 'wpsr' ),
567
- 'yes' => __( 'Yes', 'wpsr' )
568
  )
569
  ),
570
 
@@ -593,29 +593,29 @@ class WPSR_Options{
593
  'wpsr_disable_share_icons' => array(
594
  'default' => 'no',
595
  'options' => array(
596
- 'no' => __( 'No', 'wpsr' ),
597
- 'yes' => __( 'Yes', 'wpsr' )
598
  )
599
  ),
600
  'wpsr_disable_floating_sharebar' => array(
601
  'default' => 'no',
602
  'options' => array(
603
- 'no' => __( 'No', 'wpsr' ),
604
- 'yes' => __( 'Yes', 'wpsr' )
605
  )
606
  ),
607
  'wpsr_disable_follow_icons' => array(
608
  'default' => 'no',
609
  'options' => array(
610
- 'no' => __( 'No', 'wpsr' ),
611
- 'yes' => __( 'Yes', 'wpsr' )
612
  )
613
  ),
614
  'wpsr_disable_text_sharebar' => array(
615
  'default' => 'no',
616
  'options' => array(
617
- 'no' => __( 'No', 'wpsr' ),
618
- 'yes' => __( 'Yes', 'wpsr' )
619
  )
620
  ),
621
 
27
  'ribbon' => array( 'Ribbon*', 'shape-ribbon.svg', '32px' )
28
  ),
29
  'hover_effect' => array(
30
+ '' => __( 'None', 'wp-socializer' ),
31
  'opacity' => 'Fade',
32
  'rotate' => 'Rotate',
33
  'zoom' => 'Zoom',
92
 
93
  return array(
94
  'selected_icons' => array(
95
+ 'default' => '[{"facebook":{"hover_text":"","text":"","icon":""}},{"twitter":{"icon":"","text":"","hover_text":""}},{"linkedin":{"icon":"","text":"","hover_text":""}},{"pinterest":{"icon":"","text":"","hover_text":""}},{"print":{"icon":"","text":"","hover_text":""}},{"pdf":{"icon":"","text":"","hover_text":""}}]',
96
  'options' => false,
97
+ 'description' => __( 'The social media icons selected for sharing', 'wp-socializer' )
98
  ),
99
  'layout' => array(
100
  'default' => '',
102
  '' => array( 'Normal', 'layout-horizontal.svg', '64px' ),
103
  'fluid' => array( 'Full width', 'layout-fluid.svg', '64px' ),
104
  ),
105
+ 'description' => __( 'The layout of the social icons. It decides whether the icons should be of normal width or full width. Select fluid for full width.', 'wp-socializer' )
106
  ),
107
  'icon_size' => array(
108
  'default' => '32px',
109
  'options' => self::common_options( 'icon_size' ),
110
+ 'description' => __( 'The size of the icons.', 'wp-socializer' )
111
  ),
112
  'icon_shape' => array(
113
  'default' => 'circle',
114
  'options' => self::common_options( 'icon_shape' ),
115
+ 'description' => __( 'The shape of the icons.', 'wp-socializer' )
116
  ),
117
  'hover_effect' => array(
118
  'default' => 'opacity',
119
  'options' => self::common_options( 'hover_effect' ),
120
+ 'description' => __( 'The behavior of the icons when mouse is hovered over them.', 'wp-socializer' )
121
  ),
122
  'icon_color' => array(
123
  'default' => '#ffffff',
124
  'options' => false,
125
+ 'description' => __( 'The color of the icons.', 'wp-socializer' )
126
  ),
127
  'icon_bg_color' => array(
128
  'default' => '',
129
  'options' => false,
130
+ 'description' => __( 'The background color of the icons. Leave empty to take the social media site\'s own color.', 'wp-socializer' )
131
  ),
132
  'padding' => array(
133
  'default' => 'pad',
135
  '' => 'No',
136
  'pad' => 'Yes'
137
  ),
138
+ 'description' => __( 'Decides whether to add a space between the icons.', 'wp-socializer' )
139
  ),
140
  'share_counter' => array(
141
  'default' => 'total-individual',
142
  'options' => self::common_options( 'share_counter' ),
143
+ 'description' => __( 'The type of share counters to display in the share icons bar.', 'wp-socializer' )
144
  ),
145
  'sc_style' => array(
146
  'default' => 'count-1',
147
  'options' => self::common_options( 'sc_style' ),
148
+ 'description' => __( 'The design style of the share count numbers and how they are displayed.', 'wp-socializer' )
149
  ),
150
  'sc_total_position' => array(
151
  'default' => 'left',
153
  'left' => 'Left to the icons',
154
  'right' => 'Right to the icons'
155
  ),
156
+ 'description' => __( 'The position of the total count. This is effective only when share_counter includes total count.', 'wp-socializer' )
157
  ),
158
  'more_icons' => array(
159
  'default' => '0',
160
  'options' => self::common_options( 'more_icons' ),
161
+ 'description' => __( 'The number of icons from the last to group into a single icon.', 'wp-socializer' )
162
  ),
163
  'center_icons' => array(
164
  'default' => '',
166
  '' => 'No',
167
  'yes' => 'Yes'
168
  ),
169
+ 'description' => __( 'Centers the icon in the content.', 'wp-socializer' )
170
  ),
171
  'heading' => array(
172
  'default' => '<h3>Share and Enjoy !</h3>',
173
  'options' => false,
174
+ 'description' => __( 'The heading to display above the icons. HTML is allowed.', 'wp-socializer' )
175
  ),
176
  'custom_html_above' => array(
177
  'default' => '',
185
  'sm_screen_width' => array(
186
  'default' => '768',
187
  'options' => false,
188
+ 'description' => __( 'The screen width below which the icons will act in mobile/small screen mode. In pixels.', 'wp-socializer' )
189
  ),
190
  'lg_screen_action' => array(
191
  'default' => 'show',
192
  'options' => array(
193
+ 'show' => __( 'Show', 'wp-socializer' ),
194
+ 'hide' => __( 'Hide', 'wp-socializer' )
195
  ),
196
+ 'description' => __( 'The behavior of the icons in desktop/large screens.', 'wp-socializer' )
197
  ),
198
  'sm_screen_action' => array(
199
  'default' => 'show',
200
  'options' => array(
201
+ 'show' => __( 'Show', 'wp-socializer' ),
202
+ 'hide' => __( 'Hide', 'wp-socializer' )
203
  ),
204
+ 'description' => __( 'The behavior of the icons in mobile/small screens.', 'wp-socializer' )
205
  ),
206
 
207
  'loc_rules' => array(
215
  'position' => array(
216
  'default' => 'below_posts',
217
  'options' => array(
218
+ 'above_posts' => __( 'Above posts', 'wp-socializer' ),
219
+ 'below_posts' => __( 'Below posts', 'wp-socializer' ),
220
+ 'above_below_posts' => __( 'Both above and below posts', 'wp-socializer' )
221
  ),
222
+ 'description' => __( 'The position of the social icons in a post.', 'wp-socializer' )
223
  ),
224
  'in_excerpt' => array(
225
  'default' => 'hide',
226
  'options' => array(
227
+ 'show' => __( 'Show in excerpt', 'wp-socializer' ),
228
+ 'hide' => __( 'Hide in excerpt', 'wp-socializer' )
229
  ),
230
+ 'description' => __( 'Decides whether to show the icons in the excerpts.', 'wp-socializer' )
231
  )
232
  );
233
 
239
  'ft_status' => array(
240
  'default' => 'disable',
241
  'options' => array(
242
+ 'enable' => __( 'Enable floating sharebar', 'wp-socializer' ),
243
+ 'disable' => __( 'Disable floating sharebar', 'wp-socializer' )
244
  )
245
  ),
246
  'selected_icons' => array(
247
+ 'default' => '[{"facebook":{"hover_text":"","icon":""}},{"twitter":{"hover_text":"","icon":""}},{"linkedin":{"hover_text":"","icon":""}},{"email":{"hover_text":"","icon":""}},{"pdf":{"hover_text":"","icon":""}},{"whatsapp":{"hover_text":"","icon":""}}]',
248
  'options' => false
249
  ),
250
  'icon_size' => array(
304
  'movement' => array(
305
  'default' => 'move',
306
  'options' => array(
307
+ 'move' => __( 'Sticky, move when page is scrolled', 'wp-socializer' ),
308
+ 'static' => __( 'Static, no movement', 'wp-socializer' )
309
  )
310
  ),
311
  'share_counter' => array(
335
  'lg_screen_action' => array(
336
  'default' => 'show',
337
  'options' => array(
338
+ 'show' => __( 'Show', 'wp-socializer' ),
339
+ 'hide' => __( 'Hide', 'wp-socializer' ),
340
+ 'close' => __( 'Close', 'wp-socializer' )
341
  )
342
  ),
343
  'sm_screen_action' => array(
344
  'default' => 'bottom',
345
  'options' => array(
346
+ 'bottom' => __( 'Show to bottom of the page', 'wp-socializer' ),
347
+ 'hide' => __( 'Hide', 'wp-socializer' )
348
  )
349
  ),
350
 
369
  'ft_status' => array(
370
  'default' => 'disable',
371
  'options' => array(
372
+ 'enable' => __( 'Enable follow icons', 'wp-socializer' ),
373
+ 'disable' => __( 'Disable follow icons', 'wp-socializer' )
374
  )
375
  ),
376
  'template' => array(
377
+ 'default' => '[]',
378
  'options' => false
379
  ),
380
  'shape' => array(
381
  'default' => '',
382
  'options' => self::common_options( 'icon_shape' ),
383
+ 'description' => __( 'The shape of the icons.', 'wp-socializer' )
384
  ),
385
  'size' => array(
386
  'default' => '32px',
387
  'options' => self::common_options( 'icon_size' ),
388
+ 'description' => __( 'The size of the icons.', 'wp-socializer' )
389
  ),
390
  'bg_color' => array(
391
  'default' => '',
392
  'options' => false,
393
+ 'description' => __( 'The background color of the icons. Leave empty to take the default social media site\'s brand color', 'wp-socializer' )
394
  ),
395
  'icon_color' => array(
396
  'default' => '#ffffff',
397
  'options' => false,
398
+ 'description' => __( 'The color of the icon.', 'wp-socializer' )
399
  ),
400
  'orientation' => array(
401
  'default' => 'vertical',
403
  'vertical' => array( 'Vertical', 'layout-vertical.svg', '75px' ),
404
  'horizontal' => array( 'Horizontal', 'layout-horizontal.svg', '75px' ),
405
  ),
406
+ 'description' => __( 'The orientation of the icon bar.', 'wp-socializer' )
407
  ),
408
  'position' => array(
409
  'default' => 'rm',
421
  'hover' => array(
422
  'default' => 'zoom',
423
  'options' => self::common_options( 'hover_effect' ),
424
+ 'description' => __( 'The behavior of the icons when mouse is hovered over them.', 'wp-socializer' )
425
  ),
426
  'pad' => array(
427
  'default' => 'pad',
428
  'options' => array(
429
+ '' => __( 'No', 'wp-socializer' ),
430
+ 'pad' => __( 'Yes', 'wp-socializer' )
431
  ),
432
+ 'description' => __( 'Decides whether to add a space between the icons.', 'wp-socializer' )
433
  ),
434
  'title' => array(
435
  'default' => '',
441
  'no' => 'No',
442
  '' => 'Yes',
443
  ),
444
+ 'description' => __( 'Decides whether to open the links in a popup or in a new tab.', 'wp-socializer' )
445
  ),
446
  'sm_screen_width' => array(
447
  'default' => '768',
448
  'options' => false,
449
+ 'description' => __( 'The screen width below which the icons will act in mobile/small screen mode. In pixels.', 'wp-socializer' )
450
  ),
451
  'lg_screen_action' => array(
452
  'default' => 'show',
453
  'options' => array(
454
+ 'show' => __( 'Show', 'wp-socializer' ),
455
+ 'hide' => __( 'Hide', 'wp-socializer' ),
456
+ 'close' => __( 'Close', 'wp-socializer' )
457
  ),
458
+ 'description' => __( 'The behavior of the icons in desktop/large screens.', 'wp-socializer' )
459
  ),
460
  'sm_screen_action' => array(
461
  'default' => 'show',
462
  'options' => array(
463
+ 'show' => __( 'Show', 'wp-socializer' ),
464
+ 'hide' => __( 'Hide', 'wp-socializer' ),
465
+ 'close' => __( 'Close', 'wp-socializer' )
466
  ),
467
+ 'description' => __( 'The behavior of the icons in mobile/small screens.', 'wp-socializer' )
468
  ),
469
  'loc_rules' => array(
470
  'default' => array(
482
  return array(
483
  'ft_status' => array(
484
  'options' => array(
485
+ 'enable' => __( 'Enable text sharebar', 'wp-socializer' ),
486
+ 'disable' => __( 'Disable text sharebar', 'wp-socializer' )
487
  ),
488
  'default' => 'disable'
489
  ),
490
  'template' => array(
491
  'options' => false,
492
+ 'default' => '[]',
493
  ),
494
  'content' => array(
495
  'options' => false,
530
  'share_menu' => array(
531
  'default' => 'yes',
532
  'options' => array(
533
+ 'no' => __( 'No', 'wp-socializer' ),
534
+ 'yes' => __( 'Yes', 'wp-socializer' )
535
  )
536
  ),
537
  'facebook_app_id' => array(
563
  'counter_both_protocols' => array(
564
  'default' => 'no',
565
  'options' => array(
566
+ 'no' => __( 'No', 'wp-socializer' ),
567
+ 'yes' => __( 'Yes', 'wp-socializer' )
568
  )
569
  ),
570
 
593
  'wpsr_disable_share_icons' => array(
594
  'default' => 'no',
595
  'options' => array(
596
+ 'no' => __( 'No', 'wp-socializer' ),
597
+ 'yes' => __( 'Yes', 'wp-socializer' )
598
  )
599
  ),
600
  'wpsr_disable_floating_sharebar' => array(
601
  'default' => 'no',
602
  'options' => array(
603
+ 'no' => __( 'No', 'wp-socializer' ),
604
+ 'yes' => __( 'Yes', 'wp-socializer' )
605
  )
606
  ),
607
  'wpsr_disable_follow_icons' => array(
608
  'default' => 'no',
609
  'options' => array(
610
+ 'no' => __( 'No', 'wp-socializer' ),
611
+ 'yes' => __( 'Yes', 'wp-socializer' )
612
  )
613
  ),
614
  'wpsr_disable_text_sharebar' => array(
615
  'default' => 'no',
616
  'options' => array(
617
+ 'no' => __( 'No', 'wp-socializer' ),
618
+ 'yes' => __( 'Yes', 'wp-socializer' )
619
  )
620
  ),
621
 
core/share-counter.php CHANGED
@@ -209,14 +209,14 @@ class WPSR_Share_Counter{
209
  // Always get share count from ajax in if caching plugin is enabled
210
  if( ( defined( 'WP_CACHE' ) && WP_CACHE ) || !self::is_cached( $url, $services ) ){
211
  $value = ( $class == 'scount' ) ? $share_icon : '';
212
- return '<span class="' . $class . '" data-wpsrs="' . esc_attr( $url ) . '" data-wpsrs-svcs="' . join( ',', $services ) . '">' . $value . '</span>';
213
  }else{
214
  $count = self::total_count( $url, $services );
215
  $value = $count[ 'formatted' ];
216
  if( $count[ 'full' ] == 0 ){
217
  $value = ( $class == 'scount' ) ? $share_icon : '';
218
  }
219
- return '<span class="' . $class . '" data-wpsrs-cached="true">' . $value . '</span>';
220
  }
221
 
222
  }
@@ -264,16 +264,16 @@ class WPSR_Share_Counter{
264
 
265
  $total_holder = self::placeholder( $page_info, $settings[ 'add_services' ], 'scount' );
266
 
267
- $classes = array( 'wpsr-counter', 'wpsrc-sz-' . $settings[ 'size' ] );
268
 
269
  $style = '';
270
  if( $settings[ 'counter_color' ] != '' ){
271
- $style = 'style="color:' . $settings['counter_color'] . '"';
272
  }
273
 
274
  $html .= '<div class="' . implode( ' ', $classes ) . '" ' . $style . '>';
275
  $html .= $total_holder;
276
- $html .= '<small class="stext">' . $settings[ 'text' ] . '</small>';
277
  $html .= '</div>';
278
 
279
  return $html;
@@ -293,7 +293,12 @@ class WPSR_Share_Counter{
293
  return false;
294
  }
295
 
296
- $api = 'https://graph.facebook.com/v11.0/?id=' . $url . '&fields=og_object%7Bengagement%7D&access_token=' . $access_token;
 
 
 
 
 
297
  $data = self::remote_request_json( $api );
298
 
299
  if( $data == false ){
@@ -307,7 +312,11 @@ class WPSR_Share_Counter{
307
 
308
  public static function pinterest_count( $url ){
309
 
310
- $api = 'https://api.pinterest.com/v1/urls/count.json?callback=wpsr&url=' . $url;
 
 
 
 
311
  $response = wp_remote_get( $api );
312
 
313
  if( is_wp_error( $response ) ){
@@ -375,15 +384,15 @@ class WPSR_Share_Counter{
375
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
376
  echo '<div class="note">';
377
  echo '<ul>';
378
- echo '<li>' . __( 'Share count is supported only for sites: ', 'wpsr' ) . '<b>' . $services_text . '</b>' . '</li>';
379
- echo '<li>' . __( 'Share count will be <b>hidden</b> when it is 0', 'wpsr' ) . '</li>';
380
- echo '<li>' . __( 'Facebook like count is displayed when it is more than 100.', 'wpsr' ) . ' <a href="https://developers.facebook.com/support/bugs/318897266426699/?comment_id=323684205948005" target="_blank">Read Facebook note.</a></li>';
381
- echo '<li>' . __( 'Share counts are cached for every page. You can review the cache configuration in the settings page if needed.', 'wpsr' ) . '</li>';
382
  if( empty( $gs[ 'facebook_app_id' ] ) || empty( $gs[ 'facebook_app_secret' ] ) ){
383
- echo '<li>' . __( '<b>Facebook API details are not set</b>: To display facebook like count, please fill in the facebook API information in the settings page.', 'wpsr' ) . '</li>';
384
  }
385
  echo '</ul>';
386
- echo '<p><a href="' . admin_url( 'admin.php?page=wp_socializer&tab=general_settings' ) . '" target="_blank" class="button button-primary">' . __( 'Open settings', 'wpsr' ) . '</a></p>';
387
  echo '</div>';
388
 
389
  }
209
  // Always get share count from ajax in if caching plugin is enabled
210
  if( ( defined( 'WP_CACHE' ) && WP_CACHE ) || !self::is_cached( $url, $services ) ){
211
  $value = ( $class == 'scount' ) ? $share_icon : '';
212
+ return '<span class="' . esc_attr( $class ) . '" data-wpsrs="' . esc_attr( $url ) . '" data-wpsrs-svcs="' . esc_attr( join( ',', $services ) ) . '">' . $value . '</span>';
213
  }else{
214
  $count = self::total_count( $url, $services );
215
  $value = $count[ 'formatted' ];
216
  if( $count[ 'full' ] == 0 ){
217
  $value = ( $class == 'scount' ) ? $share_icon : '';
218
  }
219
+ return '<span class="' . esc_attr( $class ) . '" data-wpsrs-cached="true">' . $value . '</span>';
220
  }
221
 
222
  }
264
 
265
  $total_holder = self::placeholder( $page_info, $settings[ 'add_services' ], 'scount' );
266
 
267
+ $classes = array( 'wpsr-counter', 'wpsrc-sz-' . esc_attr( $settings[ 'size' ] ) );
268
 
269
  $style = '';
270
  if( $settings[ 'counter_color' ] != '' ){
271
+ $style = 'style="color:' . esc_attr( $settings['counter_color'] ) . '"';
272
  }
273
 
274
  $html .= '<div class="' . implode( ' ', $classes ) . '" ' . $style . '>';
275
  $html .= $total_holder;
276
+ $html .= '<small class="stext">' . esc_html( $settings[ 'text' ] ) . '</small>';
277
  $html .= '</div>';
278
 
279
  return $html;
293
  return false;
294
  }
295
 
296
+ $api = add_query_arg( array(
297
+ 'id' => $url,
298
+ 'fields' => 'og_object%7Bengagement%7D',
299
+ 'access_token' => $access_token
300
+ ), 'https://graph.facebook.com/v11.0/');
301
+
302
  $data = self::remote_request_json( $api );
303
 
304
  if( $data == false ){
312
 
313
  public static function pinterest_count( $url ){
314
 
315
+ $api = add_query_arg( array(
316
+ 'callback' => 'wpsr',
317
+ 'url' => $url
318
+ ), 'https://api.pinterest.com/v1/urls/count.json');
319
+
320
  $response = wp_remote_get( $api );
321
 
322
  if( is_wp_error( $response ) ){
384
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
385
  echo '<div class="note">';
386
  echo '<ul>';
387
+ echo '<li>' . esc_html__( 'Share count is supported only for sites: ', 'wp-socializer' ) . '<b>' . esc_html( $services_text ) . '</b>' . '</li>';
388
+ echo '<li>' . esc_html__( 'Share count will be hidden when it is 0', 'wp-socializer' ) . '</li>';
389
+ echo '<li>' . esc_html__( 'Facebook like count is displayed when it is more than 100.', 'wp-socializer' ) . ' <a href="https://developers.facebook.com/support/bugs/318897266426699/?comment_id=323684205948005" target="_blank">Read Facebook note.</a></li>';
390
+ echo '<li>' . esc_html__( 'Share counts are cached for every page. You can review the cache configuration in the settings page if needed.', 'wp-socializer' ) . '</li>';
391
  if( empty( $gs[ 'facebook_app_id' ] ) || empty( $gs[ 'facebook_app_secret' ] ) ){
392
+ echo '<li>' . esc_html__( 'Facebook API details are not set: To display facebook like count, please fill in the facebook API information in the settings page.', 'wp-socializer' ) . '</li>';
393
  }
394
  echo '</ul>';
395
+ echo '<p><a href="' . esc_url( admin_url( 'admin.php?page=wp_socializer&tab=general_settings' ) ) . '" target="_blank" class="button button-primary">' . esc_html__( 'Open settings', 'wp-socializer' ) . '</a></p>';
396
  echo '</div>';
397
 
398
  }
core/templates/floating-sharebar.php CHANGED
@@ -32,7 +32,7 @@ class WPSR_Template_Floating_Sharebar{
32
  if( $fsb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
33
  wp_reset_query();
34
  $gen_html = self::html( $fsb_settings );
35
- echo $gen_html;
36
  do_action( 'wpsr_do_floating_sharebar_print_template_end' );
37
  }
38
 
@@ -44,7 +44,7 @@ class WPSR_Template_Floating_Sharebar{
44
  $page_info = WPSR_Metadata::metadata();
45
 
46
  $counter_services = WPSR_Share_Counter::counter_services();
47
- $selected_icons = json_decode( base64_decode( $o[ 'selected_icons' ] ) );
48
 
49
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
50
 
@@ -62,7 +62,7 @@ class WPSR_Template_Floating_Sharebar{
62
  $icon_styles[ 'color' ] = $o[ 'icon_color' ];
63
  }
64
 
65
- $icon_styles_attr = 'style="' . WPSR_HTML_Tag::build_style( $icon_styles ) . '"';
66
 
67
  foreach( $selected_icons as $icon ){
68
 
@@ -77,7 +77,7 @@ class WPSR_Template_Floating_Sharebar{
77
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
78
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
79
 
80
- $settings = WPSR_Lists::set_defaults( (array) $icon->$id, array(
81
  'icon' => '',
82
  'text' => '',
83
  'hover_text' => ''
32
  if( $fsb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
33
  wp_reset_query();
34
  $gen_html = self::html( $fsb_settings );
35
+ echo wp_kses( $gen_html, WPSR_Lists::allowed_tags() );
36
  do_action( 'wpsr_do_floating_sharebar_print_template_end' );
37
  }
38
 
44
  $page_info = WPSR_Metadata::metadata();
45
 
46
  $counter_services = WPSR_Share_Counter::counter_services();
47
+ $selected_icons = WPSR_Lists::parse_template( $o[ 'selected_icons' ] );
48
 
49
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
50
 
62
  $icon_styles[ 'color' ] = $o[ 'icon_color' ];
63
  }
64
 
65
+ $icon_styles_attr = 'style="' . esc_attr( WPSR_HTML_Tag::build_style( $icon_styles ) ) . '"';
66
 
67
  foreach( $selected_icons as $icon ){
68
 
77
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
78
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
79
 
80
+ $settings = WPSR_Lists::set_defaults( $icon[ $id ], array(
81
  'icon' => '',
82
  'text' => '',
83
  'hover_text' => ''
core/templates/follow-icons.php CHANGED
@@ -31,7 +31,7 @@ class WPSR_Template_Follow_Icons{
31
 
32
  if( $fb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
33
  $gen_html = self::html( $fb_settings );
34
- echo $gen_html;
35
  do_action( 'wpsr_do_followbar_print_template_end' );
36
  }
37
 
@@ -41,8 +41,7 @@ class WPSR_Template_Follow_Icons{
41
 
42
  $opts = WPSR_Lists::set_defaults( $opts, WPSR_Options::default_values( 'follow_icons' ) );
43
  $template = $opts[ 'template' ];
44
- $decoded = base64_decode( $template );
45
- $btns = json_decode( $decoded );
46
  $sb_sites = WPSR_Lists::social_icons();
47
  $html = '';
48
 
@@ -63,7 +62,7 @@ class WPSR_Template_Follow_Icons{
63
  foreach( $btns as $btn_obj ){
64
 
65
  $btn_obj = apply_filters( 'wpsr_mod_followbar_button', $btn_obj );
66
- $id = key( (array) $btn_obj );
67
 
68
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
69
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
@@ -75,10 +74,10 @@ class WPSR_Template_Follow_Icons{
75
  $prop = $sb_sites[ $id ];
76
 
77
  $icon = '';
78
- if( $btn_obj->$id->icon == '' ){
79
  $icon = '<i class="' . esc_attr( $prop[ 'icon' ] ) . '"></i>';
80
  }else{
81
- $settings_icon = $btn_obj->$id->icon;
82
  if (strpos( $settings_icon, 'http' ) === 0) {
83
  $icon = '<img src="' . esc_attr( $settings_icon ) . '" alt="' . esc_attr( $prop[ 'name' ] ) . '" />';
84
  }else{
@@ -88,9 +87,9 @@ class WPSR_Template_Follow_Icons{
88
 
89
  $icon_tag->attrs = array(
90
  'rel' => 'nofollow',
91
- 'href' => $btn_obj->$id->url,
92
  'target' => '_blank',
93
- 'title' => ( ( $btn_obj->$id->text == '' ) ? $prop[ 'name' ] : urldecode( $btn_obj->$id->text ) )
94
  );
95
 
96
  if( array_key_exists( 'onclick', $prop ) ){
@@ -118,7 +117,7 @@ class WPSR_Template_Follow_Icons{
118
  $html = $scr_tag->open() . $html . $scr_tag->close();
119
 
120
  if( $floating ){
121
- $title = ( $opts[ 'title' ] != '' ) ? '<div class="sr-fb-title">' . $opts[ 'title' ] . '</div>' : '';
122
  $open_icon = WPSR_Lists::public_icons( 'fb_open' );
123
  $close_icon = WPSR_Lists::public_icons( 'fb_close' );
124
  $close_btn = '<div class="wpsr-fb-close wpsr-close-btn" title="Open or close follow icons"><span class="wpsr-bar-icon">' . $open_icon . $close_icon . '</span></div>';
@@ -137,7 +136,7 @@ class WPSR_Template_Follow_Icons{
137
  }
138
 
139
  if( !$floating && isset( $opts[ 'profile_text' ] ) && trim( $opts[ 'profile_text' ] ) != '' ){
140
- $html = '<p>' . $opts[ 'profile_text' ] . '</p>' . $html;
141
  }
142
 
143
  return $html;
31
 
32
  if( $fb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
33
  $gen_html = self::html( $fb_settings );
34
+ echo wp_kses( $gen_html, WPSR_Lists::allowed_tags() );
35
  do_action( 'wpsr_do_followbar_print_template_end' );
36
  }
37
 
41
 
42
  $opts = WPSR_Lists::set_defaults( $opts, WPSR_Options::default_values( 'follow_icons' ) );
43
  $template = $opts[ 'template' ];
44
+ $btns = WPSR_Lists::parse_template( $template );
 
45
  $sb_sites = WPSR_Lists::social_icons();
46
  $html = '';
47
 
62
  foreach( $btns as $btn_obj ){
63
 
64
  $btn_obj = apply_filters( 'wpsr_mod_followbar_button', $btn_obj );
65
+ $id = key( $btn_obj );
66
 
67
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
68
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
74
  $prop = $sb_sites[ $id ];
75
 
76
  $icon = '';
77
+ if( $btn_obj[ $id ][ 'icon' ] == '' ){
78
  $icon = '<i class="' . esc_attr( $prop[ 'icon' ] ) . '"></i>';
79
  }else{
80
+ $settings_icon = $btn_obj[ $id ][ 'icon' ];
81
  if (strpos( $settings_icon, 'http' ) === 0) {
82
  $icon = '<img src="' . esc_attr( $settings_icon ) . '" alt="' . esc_attr( $prop[ 'name' ] ) . '" />';
83
  }else{
87
 
88
  $icon_tag->attrs = array(
89
  'rel' => 'nofollow',
90
+ 'href' => $btn_obj[ $id ][ 'url' ],
91
  'target' => '_blank',
92
+ 'title' => ( ( $btn_obj[ $id ][ 'text' ] == '' ) ? $prop[ 'name' ] : urldecode( $btn_obj[ $id ][ 'text' ] ) )
93
  );
94
 
95
  if( array_key_exists( 'onclick', $prop ) ){
117
  $html = $scr_tag->open() . $html . $scr_tag->close();
118
 
119
  if( $floating ){
120
+ $title = ( $opts[ 'title' ] != '' ) ? '<div class="sr-fb-title">' . esc_html( $opts[ 'title' ] ) . '</div>' : '';
121
  $open_icon = WPSR_Lists::public_icons( 'fb_open' );
122
  $close_icon = WPSR_Lists::public_icons( 'fb_close' );
123
  $close_btn = '<div class="wpsr-fb-close wpsr-close-btn" title="Open or close follow icons"><span class="wpsr-bar-icon">' . $open_icon . $close_icon . '</span></div>';
136
  }
137
 
138
  if( !$floating && isset( $opts[ 'profile_text' ] ) && trim( $opts[ 'profile_text' ] ) != '' ){
139
+ $html = '<p>' . wp_kses_post( $opts[ 'profile_text' ] ) . '</p>' . $html;
140
  }
141
 
142
  return $html;
core/templates/popups.php CHANGED
@@ -39,8 +39,8 @@ class WPSR_Template_Popups{
39
  public static function header( $for, $heading ){
40
 
41
  echo '<div class="wpsr-pp-head">
42
- <h3>' . $heading . '</h3>
43
- <a href="#" class="wpsr-pp-close" data-id="' . $for . '" title="' . __( 'Close', 'wpsr' ) . '"><i class="fas fa-times"></i></a>
44
  </div>';
45
 
46
  }
@@ -85,15 +85,14 @@ class WPSR_Template_Popups{
85
  $title = esc_attr( $props[ 'title' ] );
86
 
87
  $icon = '<span class="wpsr-sm-icon"><i class="' . esc_attr( $props[ 'icon' ] ) . '"></i></span>';
88
- $text = '<span class="wpsr-sm-text">' . $props[ 'name' ] . '</span>';
89
 
90
- echo '<div><a href="#" rel="nofollow" title="' . $title . '" class="' . esc_attr( $classes ) . '" ' . $data_attr . ' style="background-color: ' . $props[ 'colors' ][ 0 ] . '">' . $icon . $text . '</a></div>';
91
  }
92
  echo $sm_links_wrap->close();
93
 
94
  echo '</div>'; // Content
95
 
96
- self::footer();
97
  echo '</div>';
98
  echo '</div>';
99
  echo '</div>';
@@ -109,19 +108,14 @@ class WPSR_Template_Popups{
109
  echo '<div class="wpsr-pp-content">';
110
  $copy_text = __( 'Copy link', 'wp-socializer' );
111
  $copied_text = __( 'Copied !', 'wp-socializer' );
112
- echo '<input type="text" id="wpsr-short-link-url" readonly /><a href="#" id="wpsr-sl-copy-btn" data-c="' . $copy_text . '" data-d="' . $copied_text . '">' . $copy_text . '</a>';
113
  echo '</div>';
114
- self::footer();
115
  echo '</div>';
116
  echo '</div>';
117
  echo '</div>';
118
 
119
  }
120
 
121
- public static function footer(){
122
- echo '<div class="wpsr-pp-foot">Powered by <a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank" rel="nofollow noopener">WP Socializer</a></div>';
123
- }
124
-
125
  }
126
 
127
  WPSR_Template_Popups::init();
39
  public static function header( $for, $heading ){
40
 
41
  echo '<div class="wpsr-pp-head">
42
+ <h3>' . esc_html( $heading ) . '</h3>
43
+ <a href="#" class="wpsr-pp-close" data-id="' . esc_attr( $for ) . '" title="' . esc_attr__( 'Close', 'wp-socializer' ) . '"><i class="fas fa-times"></i></a>
44
  </div>';
45
 
46
  }
85
  $title = esc_attr( $props[ 'title' ] );
86
 
87
  $icon = '<span class="wpsr-sm-icon"><i class="' . esc_attr( $props[ 'icon' ] ) . '"></i></span>';
88
+ $text = '<span class="wpsr-sm-text">' . esc_html( $props[ 'name' ] ) . '</span>';
89
 
90
+ echo '<div><a href="#" rel="nofollow" title="' . esc_attr( $title ) . '" class="' . esc_attr( $classes ) . '" ' . $data_attr . ' style="background-color: ' . esc_attr( $props[ 'colors' ][ 0 ] ) . '">' . $icon . $text . '</a></div>';
91
  }
92
  echo $sm_links_wrap->close();
93
 
94
  echo '</div>'; // Content
95
 
 
96
  echo '</div>';
97
  echo '</div>';
98
  echo '</div>';
108
  echo '<div class="wpsr-pp-content">';
109
  $copy_text = __( 'Copy link', 'wp-socializer' );
110
  $copied_text = __( 'Copied !', 'wp-socializer' );
111
+ echo '<input type="text" id="wpsr-short-link-url" readonly /><a href="#" id="wpsr-sl-copy-btn" data-c="' . esc_attr( $copy_text ) . '" data-d="' . esc_attr( $copied_text ) . '">' . esc_html( $copy_text ) . '</a>';
112
  echo '</div>';
 
113
  echo '</div>';
114
  echo '</div>';
115
  echo '</div>';
116
 
117
  }
118
 
 
 
 
 
119
  }
120
 
121
  WPSR_Template_Popups::init();
core/templates/share-icons.php CHANGED
@@ -60,7 +60,7 @@ class WPSR_Template_Share_Icons{
60
  $page_info = WPSR_Lists::set_defaults( $default_page_info, $page_info );
61
 
62
  $counter_services = WPSR_Share_Counter::counter_services();
63
- $selected_icons = json_decode( base64_decode( $tmpl[ 'selected_icons' ] ) );
64
 
65
  if( empty( $selected_icons ) ){
66
  return array(
@@ -84,7 +84,7 @@ class WPSR_Template_Share_Icons{
84
  $icon_styles[ 'color' ] = $tmpl[ 'icon_color' ];
85
  }
86
 
87
- $icon_styles_attr = 'style="' . WPSR_HTML_Tag::build_style( $icon_styles ) . '"';
88
 
89
  foreach( $selected_icons as $icon ){
90
 
@@ -99,7 +99,7 @@ class WPSR_Template_Share_Icons{
99
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
100
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
101
 
102
- $settings = WPSR_Lists::set_defaults( (array) $icon->$id, array(
103
  'icon' => '',
104
  'text' => '',
105
  'hover_text' => ''
@@ -123,7 +123,7 @@ class WPSR_Template_Share_Icons{
123
 
124
  $text = '';
125
  if( $settings[ 'text' ] != '' ){
126
- $text = '<span class="text">' . $settings[ 'text' ] . '</span>';
127
  $icon_wrap_tag->add_class( 'sr-text-in' );
128
  }
129
 
@@ -268,7 +268,7 @@ class WPSR_Template_Share_Icons{
268
  }
269
 
270
  $html .= $wrap_tag->open();
271
- if( trim( $tmpl[ 'heading' ] ) != '' ) $html .= $tmpl[ 'heading' ];
272
  $html .= '<div class="wpsr-si-inner">' . $row_html . '</div>';
273
  $html .= $wrap_tag->close();
274
 
60
  $page_info = WPSR_Lists::set_defaults( $default_page_info, $page_info );
61
 
62
  $counter_services = WPSR_Share_Counter::counter_services();
63
+ $selected_icons = WPSR_Lists::parse_template( $tmpl[ 'selected_icons' ] );
64
 
65
  if( empty( $selected_icons ) ){
66
  return array(
84
  $icon_styles[ 'color' ] = $tmpl[ 'icon_color' ];
85
  }
86
 
87
+ $icon_styles_attr = 'style="' . esc_attr( WPSR_HTML_Tag::build_style( $icon_styles ) ) . '"';
88
 
89
  foreach( $selected_icons as $icon ){
90
 
99
  $icon_wrap_tag = new WPSR_HTML_Tag( 'span', 'sr-' . $id );
100
  $icon_tag = new WPSR_HTML_Tag( 'a', '', $icon_styles );
101
 
102
+ $settings = WPSR_Lists::set_defaults( $icon[ $id ], array(
103
  'icon' => '',
104
  'text' => '',
105
  'hover_text' => ''
123
 
124
  $text = '';
125
  if( $settings[ 'text' ] != '' ){
126
+ $text = '<span class="text">' . esc_html( $settings[ 'text' ] ) . '</span>';
127
  $icon_wrap_tag->add_class( 'sr-text-in' );
128
  }
129
 
268
  }
269
 
270
  $html .= $wrap_tag->open();
271
+ if( trim( $tmpl[ 'heading' ] ) != '' ) $html .= wp_kses_post( $tmpl[ 'heading' ] );
272
  $html .= '<div class="wpsr-si-inner">' . $row_html . '</div>';
273
  $html .= $wrap_tag->close();
274
 
core/templates/text-sharebar.php CHANGED
@@ -31,7 +31,7 @@ class WPSR_Template_Text_Sharebar{
31
 
32
  if( $tsb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer && !wp_is_mobile() ){
33
  $gen_html = self::html( $tsb_settings );
34
- echo $gen_html;
35
  do_action( 'wpsr_do_text_sharebar_print_template_end' );
36
  }
37
 
@@ -41,8 +41,7 @@ class WPSR_Template_Text_Sharebar{
41
 
42
  $opts = WPSR_Lists::set_defaults( $opts, WPSR_Options::default_values( 'text_sharebar' ) );
43
  $template = $opts[ 'template' ];
44
- $decoded = base64_decode( $template );
45
- $btns = json_decode( $decoded );
46
  $sb_sites = WPSR_Lists::social_icons();
47
  $page_info = WPSR_Metadata::metadata();
48
  $html = '';
@@ -66,7 +65,7 @@ class WPSR_Template_Text_Sharebar{
66
 
67
  $icon = '';
68
  if( strpos( $sb_info[ 'icon' ], 'http' ) === 0 ){
69
- $icon = '<img src="' . $sb_info[ 'icon' ] . '" alt="' . esc_attr( $sb_info[ 'name' ] ) . '"/>';
70
  }else{
71
  $icon = '<i class="' . esc_attr( $sb_info[ 'icon' ] ) . '"></i>';
72
  }
31
 
32
  if( $tsb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer && !wp_is_mobile() ){
33
  $gen_html = self::html( $tsb_settings );
34
+ echo wp_kses( $gen_html, WPSR_Lists::allowed_tags() );
35
  do_action( 'wpsr_do_text_sharebar_print_template_end' );
36
  }
37
 
41
 
42
  $opts = WPSR_Lists::set_defaults( $opts, WPSR_Options::default_values( 'text_sharebar' ) );
43
  $template = $opts[ 'template' ];
44
+ $btns = WPSR_Lists::parse_template( $template );
 
45
  $sb_sites = WPSR_Lists::social_icons();
46
  $page_info = WPSR_Metadata::metadata();
47
  $html = '';
65
 
66
  $icon = '';
67
  if( strpos( $sb_info[ 'icon' ], 'http' ) === 0 ){
68
+ $icon = '<img src="' . esc_url( $sb_info[ 'icon' ] ) . '" alt="' . esc_attr( $sb_info[ 'name' ] ) . '"/>';
69
  }else{
70
  $icon = '<i class="' . esc_attr( $sb_info[ 'icon' ] ) . '"></i>';
71
  }
core/widgets/facebook.php CHANGED
@@ -11,7 +11,7 @@ class WPSR_Facebook_Widget extends WP_Widget {
11
  parent::__construct(
12
  'WPSR_Facebook_Widget',
13
  'Facebook page widget',
14
- array( 'description' => __( 'Display your Facebook page\'s posts using this widget.', 'wpsr' ), ),
15
  array('width' => 500, 'height' => 500)
16
  );
17
  }
@@ -24,7 +24,7 @@ class WPSR_Facebook_Widget extends WP_Widget {
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'facebook' ] = array(
27
- 'name' => __( 'Facebook widget', 'wpsr' ),
28
  'widget_class' => __class__
29
  );
30
 
@@ -35,12 +35,12 @@ class WPSR_Facebook_Widget extends WP_Widget {
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'facebook-widget' ] = array(
38
- 'name' => __( 'Facebook page widget', 'wpsr' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/facebook-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:facebook'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
- 'description' => __( 'If you have a facebook page, add a widget to display it\'s posts to the sidebar/footer.', 'wpsr' )
44
  );
45
 
46
  return $pages;
@@ -68,7 +68,7 @@ class WPSR_Facebook_Widget extends WP_Widget {
68
 
69
  $instance = array_map( 'esc_attr', $instance );
70
 
71
- echo '<div class="fb-page" data-href="' . $instance[ 'fb_page_url' ] . '" data-tabs="' . $instance[ 'fb_page_tabs' ] . '" data-width="" data-height="" data-small-header="' . $instance[ 'fb_page_small_header' ] . '" data-adapt-container-width="true" data-hide-cover="' . $instance[ 'fb_page_hide_cover' ] . '" data-show-facepile="' . $instance[ 'fb_page_show_faces' ] . '"><blockquote cite="' . $instance[ 'fb_page_url' ] . '" class="fb-xfbml-parse-ignore"><a href="' . $instance[ 'fb_page_url' ] . '">Facebook page</a></blockquote></div>';
72
 
73
  WPSR_Includes::add_active_includes( array( 'facebook_js' ) );
74
 
@@ -85,13 +85,13 @@ class WPSR_Facebook_Widget extends WP_Widget {
85
 
86
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
87
  if( empty( $gs[ 'facebook_app_id' ] ) ){
88
- echo '<p>' . __( 'Note: Facebook app ID is not set and it is required for the facebook widget. Please set it in the settings page', 'wpsr' ) . '</p>';
89
- echo '<p><a href="' . admin_url( 'admin.php?page=wp_socializer&tab=general_settings' ) . '" target="_blank" class="button button-primary">' . __( 'Open settings', 'wpsr' ) . '</a></p>';
90
  }
91
 
92
  $yes_no = array(
93
- 'true' => __( 'Yes', 'wpsr' ),
94
- 'false' => __( 'No', 'wpsr' )
95
  );
96
 
97
  $fields->text( 'title', 'Title' );
@@ -109,6 +109,11 @@ class WPSR_Facebook_Widget extends WP_Widget {
109
  }
110
 
111
  function update( $new_instance, $old_instance ){
 
 
 
 
 
112
  return $new_instance;
113
  }
114
 
11
  parent::__construct(
12
  'WPSR_Facebook_Widget',
13
  'Facebook page widget',
14
+ array( 'description' => __( 'Display your Facebook page\'s posts using this widget.', 'wp-socializer' ), ),
15
  array('width' => 500, 'height' => 500)
16
  );
17
  }
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'facebook' ] = array(
27
+ 'name' => __( 'Facebook widget', 'wp-socializer' ),
28
  'widget_class' => __class__
29
  );
30
 
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'facebook-widget' ] = array(
38
+ 'name' => __( 'Facebook page widget', 'wp-socializer' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/facebook-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:facebook'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
+ 'description' => __( 'If you have a facebook page, add a widget to display it\'s posts to the sidebar/footer.', 'wp-socializer' )
44
  );
45
 
46
  return $pages;
68
 
69
  $instance = array_map( 'esc_attr', $instance );
70
 
71
+ echo '<div class="fb-page" data-href="' . esc_attr( $instance[ 'fb_page_url' ] ) . '" data-tabs="' . esc_attr( $instance[ 'fb_page_tabs' ] ) . '" data-width="" data-height="" data-small-header="' . esc_attr( $instance[ 'fb_page_small_header' ] ) . '" data-adapt-container-width="true" data-hide-cover="' . esc_attr( $instance[ 'fb_page_hide_cover' ] ) . '" data-show-facepile="' . esc_attr( $instance[ 'fb_page_show_faces' ] ) . '"><blockquote cite="' . esc_attr( $instance[ 'fb_page_url' ] ) . '" class="fb-xfbml-parse-ignore"><a href="' . esc_attr( $instance[ 'fb_page_url' ] ) . '">Facebook page</a></blockquote></div>';
72
 
73
  WPSR_Includes::add_active_includes( array( 'facebook_js' ) );
74
 
85
 
86
  $gs = WPSR_Lists::set_defaults( get_option( 'wpsr_general_settings' ), WPSR_Options::default_values( 'general_settings' ) );
87
  if( empty( $gs[ 'facebook_app_id' ] ) ){
88
+ echo '<p>' . esc_html__( 'Note: Facebook app ID is not set and it is required for the facebook widget. Please set it in the settings page', 'wp-socializer' ) . '</p>';
89
+ echo '<p><a href="' . esc_url( admin_url( 'admin.php?page=wp_socializer&tab=general_settings' ) ) . '" target="_blank" class="button button-primary">' . esc_html__( 'Open settings', 'wp-socializer' ) . '</a></p>';
90
  }
91
 
92
  $yes_no = array(
93
+ 'true' => __( 'Yes', 'wp-socializer' ),
94
+ 'false' => __( 'No', 'wp-socializer' )
95
  );
96
 
97
  $fields->text( 'title', 'Title' );
109
  }
110
 
111
  function update( $new_instance, $old_instance ){
112
+
113
+ if( !current_user_can( 'unfiltered_html' ) ) {
114
+ $new_instance = wp_kses_post_deep( $new_instance );
115
+ }
116
+
117
  return $new_instance;
118
  }
119
 
core/widgets/follow-icons.php CHANGED
@@ -24,7 +24,7 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'follow_icons' ] = array(
27
- 'name' => __( 'Follow icons', 'wpsr' ),
28
  'widget_class' => __class__
29
  );
30
 
@@ -35,12 +35,12 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'follow-icons-widget' ] = array(
38
- 'name' => __( 'Follow icons widget', 'wpsr' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/follow-icons-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:follow_icons'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
- 'description' => __( 'Add links of your social media profiles to sidebar/footer using this widget.', 'wpsr' )
44
  );
45
 
46
  return $pages;
@@ -85,7 +85,7 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
85
 
86
  $fields->text( 'title', 'Title' );
87
 
88
- $tmpl_val = esc_attr( $instance[ 'template' ] );
89
  $tmpl_cnt_id = $this->get_field_id( 'template' );
90
  $tmpl_prev_id = $this->get_field_id( 'fbw_prev' );
91
 
@@ -94,15 +94,15 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
94
  $fields->text( 'orientation', '' );
95
  echo '</div>';
96
 
97
- $fields->heading( __( 'Selected icons', 'wpsr' ) );
98
- echo '<div class="clearfix" id="' . $tmpl_prev_id . '">';
99
  $tmpl = WPSR_Admin_Follow_Icons::read_template( $tmpl_val );
100
- echo $tmpl[ 'prev' ];
101
  echo '</div>';
102
 
103
- echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-wtmpl-cnt-id="' . $tmpl_cnt_id . '" data-wtmpl-prev-id="' . $tmpl_prev_id . '"><i class="fa fa-pencil"></i> ' . __( 'Open editor', 'wpsr' ) . '</button></p>';
104
 
105
- $fields->heading( __( 'Settings', 'wpsr' ) );
106
  $fields->select( 'shape', 'Icon shape', array(
107
  '' => 'Square',
108
  'circle' => 'Circle',
@@ -125,7 +125,7 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
125
  $fields->text( 'icon_color', 'Icon color', array( 'class' => 'smallfat wpsr-color-picker' ));
126
 
127
  $fields->select( 'hover', 'Hover effect', array(
128
- '' => __( 'None', 'wpsr' ),
129
  'opacity' => 'Fade',
130
  'rotate' => 'Rotate',
131
  'zoom' => 'Zoom',
@@ -140,7 +140,7 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
140
  ), array( 'class' => 'smallfat' ));
141
 
142
  $fields->textarea( 'profile_text', 'Text above follow icons' );
143
- echo '<span class="description">' . __( 'Add any text you like to see above the icons. HTML is allowed.', 'wpsr' ) . '</span>';
144
 
145
  $fields->footer();
146
 
@@ -149,6 +149,11 @@ class WPSR_Follow_Icons_Widget extends WP_Widget {
149
  }
150
 
151
  function update( $new_instance, $old_instance ){
 
 
 
 
 
152
  return $new_instance;
153
  }
154
 
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'follow_icons' ] = array(
27
+ 'name' => __( 'Follow icons', 'wp-socializer' ),
28
  'widget_class' => __class__
29
  );
30
 
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'follow-icons-widget' ] = array(
38
+ 'name' => __( 'Follow icons widget', 'wp-socializer' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/follow-icons-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:follow_icons'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
+ 'description' => __( 'Add links of your social media profiles to sidebar/footer using this widget.', 'wp-socializer' )
44
  );
45
 
46
  return $pages;
85
 
86
  $fields->text( 'title', 'Title' );
87
 
88
+ $tmpl_val = $instance[ 'template' ];
89
  $tmpl_cnt_id = $this->get_field_id( 'template' );
90
  $tmpl_prev_id = $this->get_field_id( 'fbw_prev' );
91
 
94
  $fields->text( 'orientation', '' );
95
  echo '</div>';
96
 
97
+ $fields->heading( __( 'Selected icons', 'wp-socializer' ) );
98
+ echo '<div class="clearfix" id="' . esc_attr( $tmpl_prev_id ) . '">';
99
  $tmpl = WPSR_Admin_Follow_Icons::read_template( $tmpl_val );
100
+ echo wp_kses( $tmpl[ 'prev' ], WPSR_Lists::allowed_tags() );
101
  echo '</div>';
102
 
103
+ echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-wtmpl-cnt-id="' . esc_attr( $tmpl_cnt_id ) . '" data-wtmpl-prev-id="' . esc_attr( $tmpl_prev_id ) . '"><i class="fa fa-pencil"></i> ' . __( 'Open editor', 'wp-socializer' ) . '</button></p>';
104
 
105
+ $fields->heading( __( 'Settings', 'wp-socializer' ) );
106
  $fields->select( 'shape', 'Icon shape', array(
107
  '' => 'Square',
108
  'circle' => 'Circle',
125
  $fields->text( 'icon_color', 'Icon color', array( 'class' => 'smallfat wpsr-color-picker' ));
126
 
127
  $fields->select( 'hover', 'Hover effect', array(
128
+ '' => __( 'None', 'wp-socializer' ),
129
  'opacity' => 'Fade',
130
  'rotate' => 'Rotate',
131
  'zoom' => 'Zoom',
140
  ), array( 'class' => 'smallfat' ));
141
 
142
  $fields->textarea( 'profile_text', 'Text above follow icons' );
143
+ echo '<span class="description">' . __( 'Add any text you like to see above the icons. HTML is allowed.', 'wp-socializer' ) . '</span>';
144
 
145
  $fields->footer();
146
 
149
  }
150
 
151
  function update( $new_instance, $old_instance ){
152
+
153
+ if( !current_user_can( 'unfiltered_html' ) ) {
154
+ $new_instance = wp_kses_post_deep( $new_instance );
155
+ }
156
+
157
  return $new_instance;
158
  }
159
 
core/widgets/twitter.php CHANGED
@@ -11,7 +11,7 @@ class WPSR_Twitter_Widget extends WP_Widget {
11
  parent::__construct(
12
  'WPSR_Twitter_Widget',
13
  'Twitter tweets/timeline widget',
14
- array( 'description' => __( 'Display your twitter tweets/timeline using this widget.', 'wpsr' ), ),
15
  array( 'width' => 500, 'height' => 500 )
16
  );
17
  }
@@ -24,7 +24,7 @@ class WPSR_Twitter_Widget extends WP_Widget {
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'twitter' ] = array(
27
- 'name' => __( 'Twitter widget', 'wpsr' ),
28
  'widget_class' => __class__
29
  );
30
 
@@ -35,12 +35,12 @@ class WPSR_Twitter_Widget extends WP_Widget {
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'twitter-widget' ] = array(
38
- 'name' => __( 'Twitter tweets widget', 'wpsr' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/twitter-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:twitter'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
- 'description' => __( 'Add a widget to sidebar/footer to display your twitter tweets.', 'wpsr' )
44
  );
45
 
46
  return $pages;
@@ -66,7 +66,7 @@ class WPSR_Twitter_Widget extends WP_Widget {
66
 
67
  $instance = array_map( 'esc_attr', $instance );
68
 
69
- echo '<a class="twitter-timeline" data-height="' . $instance[ 'twitter_widget_height' ] . '" data-theme="' . $instance[ 'twitter_widget_theme' ] . '" href="' . $instance[ 'twitter_widget_url' ] . '">Twitter</a>';
70
 
71
  WPSR_Includes::add_active_includes( array( 'twitter_js' ) );
72
 
@@ -102,6 +102,11 @@ class WPSR_Twitter_Widget extends WP_Widget {
102
  }
103
 
104
  function update( $new_instance, $old_instance ){
 
 
 
 
 
105
  return $new_instance;
106
  }
107
 
11
  parent::__construct(
12
  'WPSR_Twitter_Widget',
13
  'Twitter tweets/timeline widget',
14
+ array( 'description' => __( 'Display your twitter tweets/timeline using this widget.', 'wp-socializer' ), ),
15
  array( 'width' => 500, 'height' => 500 )
16
  );
17
  }
24
  public static function register( $widgets ){
25
 
26
  $widgets[ 'twitter' ] = array(
27
+ 'name' => __( 'Twitter widget', 'wp-socializer' ),
28
  'widget_class' => __class__
29
  );
30
 
35
  public static function register_admin_page( $pages ){
36
 
37
  $pages[ 'twitter-widget' ] = array(
38
+ 'name' => __( 'Twitter tweets widget', 'wp-socializer' ),
39
  'banner' => WPSR_ADMIN_URL . '/images/banners/twitter-widget.svg',
40
  'link' => admin_url('widgets.php#wp-socializer:twitter'),
41
  'category' => 'widget',
42
  'type' => 'widget',
43
+ 'description' => __( 'Add a widget to sidebar/footer to display your twitter tweets.', 'wp-socializer' )
44
  );
45
 
46
  return $pages;
66
 
67
  $instance = array_map( 'esc_attr', $instance );
68
 
69
+ echo '<a class="twitter-timeline" data-height="' . esc_attr( $instance[ 'twitter_widget_height' ] ) . '" data-theme="' . esc_attr( $instance[ 'twitter_widget_theme' ] ) . '" href="' . esc_attr( $instance[ 'twitter_widget_url' ] ) . '">Twitter</a>';
70
 
71
  WPSR_Includes::add_active_includes( array( 'twitter_js' ) );
72
 
102
  }
103
 
104
  function update( $new_instance, $old_instance ){
105
+
106
+ if( !current_user_can( 'unfiltered_html' ) ) {
107
+ $new_instance = wp_kses_post_deep( $new_instance );
108
+ }
109
+
110
  return $new_instance;
111
  }
112
 
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: vaakash
3
  Donate link: https://www.paypal.me/vaakash/6
4
  Tags: social media, share, buttons, social sharing, share buttons, social profile, social widget, icons, sharing icons, sharing buttons, social share, sharing, shortcode, widget, twitter tweets, facebook page, share count, whatsapp icon, whatsapp button, instagram icon, sticky share, floating share bar
5
- Requires at least: 4.6
6
- Tested up to: 6.0
7
- Stable tag: 7.2
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
@@ -217,6 +217,12 @@ Please refer [this page](https://www.aakashweb.com/docs/wp-socializer/) for the
217
 
218
  ## Changelog
219
 
 
 
 
 
 
 
220
  ### 7.2
221
  * New: Comments button for the share icon.
222
  * New: Comments count is displayed for the comments icon.
2
  Contributors: vaakash
3
  Donate link: https://www.paypal.me/vaakash/6
4
  Tags: social media, share, buttons, social sharing, share buttons, social profile, social widget, icons, sharing icons, sharing buttons, social share, sharing, shortcode, widget, twitter tweets, facebook page, share count, whatsapp icon, whatsapp button, instagram icon, sticky share, floating share bar
5
+ Requires at least: 5.0
6
+ Tested up to: 6.0.1
7
+ Stable tag: 7.3
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
  Requires PHP: 5.3
217
 
218
  ## Changelog
219
 
220
+ ### 7.3
221
+ * Fix: UTF-8 characters can now be set as icon text in all features.
222
+ * Fix: Icon configurations are now stored directly as JSON without base64 encoding.
223
+ * Fix: Most user inputs are now sanitized and escaped.
224
+ * Fix: Minor admin UI enhancements.
225
+
226
  ### 7.2
227
  * New: Comments button for the share icon.
228
  * New: Comments count is displayed for the comments icon.
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: Add various social media sharing features to posts/pages/widgets like social media share icons, floating/sticky share bar, follow my profile icons and more.
6
- * Version: 7.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', '7.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' ) );
@@ -22,8 +22,6 @@ final class WP_Socializer{
22
 
23
  function __construct(){
24
 
25
- add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) );
26
-
27
  $this->includes();
28
 
29
  }
@@ -73,10 +71,6 @@ final class WP_Socializer{
73
 
74
  }
75
 
76
- function load_text_domain(){
77
- load_plugin_textdomain( 'wpsr', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
78
- }
79
-
80
  }
81
 
82
  $wpsr = new WP_Socializer();
3
  * Plugin Name: WP Socializer
4
  * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
  * Description: Add various social media sharing features to posts/pages/widgets like social media share icons, floating/sticky share bar, follow my profile icons and more.
6
+ * Version: 7.3
7
  * Author: Aakash Chakravarthy
8
  * Author URI: https://www.aakashweb.com
9
+ * Text Domain: wp-socializer
10
  * Domain Path: /languages
11
  */
12
 
13
+ define( 'WPSR_VERSION', '7.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' ) );
22
 
23
  function __construct(){
24
 
 
 
25
  $this->includes();
26
 
27
  }
71
 
72
  }
73
 
 
 
 
 
74
  }
75
 
76
  $wpsr = new WP_Socializer();