WP Social Sharing - Version 1.7

Version Description

  • June 24, 2015 =
  • Add Text Before sharing buttons
Download this release

Release Info

Developer arjunjain08
Plugin Icon wp plugin WP Social Sharing
Version 1.7
Comparing to
See all releases

Code changes from version 1.6 to 1.7

includes/class-admin.php CHANGED
@@ -34,6 +34,7 @@ class SS_Admin {
34
  'pinterest_text'=>"Share on Pinterest",
35
  'pinterest_image'=>"",
36
  'show_icons'=>'0',
 
37
  );
38
  update_option( 'wp_social_sharing', $defaults );
39
  update_option( 'wss_wp_social_sharing','f,t,g,l,p');
@@ -51,6 +52,7 @@ class SS_Admin {
51
  }
52
 
53
  public function sanitize_settings( $settings ) {
 
54
  $settings['twitter_username'] = trim( strip_tags( $settings['twitter_username'] ) );
55
  $settings['facebook_text'] = trim( strip_tags( $settings['facebook_text'] ) );
56
  $settings['twitter_text'] = trim( strip_tags( $settings['twitter_text'] ) );
34
  'pinterest_text'=>"Share on Pinterest",
35
  'pinterest_image'=>"",
36
  'show_icons'=>'0',
37
+ 'before_button_text'=>''
38
  );
39
  update_option( 'wp_social_sharing', $defaults );
40
  update_option( 'wss_wp_social_sharing','f,t,g,l,p');
52
  }
53
 
54
  public function sanitize_settings( $settings ) {
55
+ $settings['before_button_text'] = trim( strip_tags( $settings['before_button_text'] ) );
56
  $settings['twitter_username'] = trim( strip_tags( $settings['twitter_username'] ) );
57
  $settings['facebook_text'] = trim( strip_tags( $settings['facebook_text'] ) );
58
  $settings['twitter_text'] = trim( strip_tags( $settings['twitter_text'] ) );
includes/class-public.php CHANGED
@@ -55,7 +55,8 @@ class SS_Public {
55
  'pinterest_text'=>__('Share on Pinterest','social-sharing'),
56
  'social_image'=> '',
57
  'icon_order'=>'f,t,g,l,p',
58
- 'show_icons'=>'0'
 
59
  ),$atts));
60
 
61
  if(!is_array($social_options))
@@ -109,6 +110,9 @@ class SS_Public {
109
  ob_start();
110
  ?>
111
  <div class="social-sharing <?php echo $sssocial_sharing;?>">
 
 
 
112
  <?php
113
  foreach($icon_order as $o) {
114
  switch($o) {
55
  'pinterest_text'=>__('Share on Pinterest','social-sharing'),
56
  'social_image'=> '',
57
  'icon_order'=>'f,t,g,l,p',
58
+ 'show_icons'=>'0',
59
+ 'before_button_text'=>''
60
  ),$atts));
61
 
62
  if(!is_array($social_options))
110
  ob_start();
111
  ?>
112
  <div class="social-sharing <?php echo $sssocial_sharing;?>">
113
+ <?php if(!empty($before_button_text)):?>
114
+ <span><?php echo $before_button_text; ?></span>
115
+ <?php endif;?>
116
  <?php
117
  foreach($icon_order as $o) {
118
  switch($o) {
includes/plugin.php CHANGED
@@ -21,6 +21,7 @@ function ss_get_options()
21
  'linkedin_text'=>"Share on Linkedin",
22
  'pinterest_text'=>"Share on Pinterest",
23
  'pinterest_image'=>"",
 
24
  );
25
 
26
  $db_option = get_option( 'wp_social_sharing', array());
21
  'linkedin_text'=>"Share on Linkedin",
22
  'pinterest_text'=>"Share on Pinterest",
23
  'pinterest_image'=>"",
24
+ 'before_button_text'=>'',
25
  );
26
 
27
  $db_option = get_option( 'wp_social_sharing', array());
includes/settings-page.php CHANGED
@@ -57,19 +57,25 @@ if( ! defined("SS_VERSION") ) {
57
  <tr valign="top">
58
  <th><label for="alws_show_icons"><?php _e('Always show social icons','wp-social-sharing');?></label></th>
59
  <td>
60
- <input type="checkbox" id="alws_show_icons" name="wp_social_sharing[show_icons]" value="1" <?php checked( '1', $opts['show_icons'], true ); ?>>
 
 
 
 
 
 
61
  </td>
62
  </tr>
63
  <tr valign="top">
64
  <th><label for="facebook_text"><?php _e('Facebook Share button text','wp-social-sharing');?></label></th>
65
  <td>
66
- <input type="text" class="widefat" name="wp_social_sharing[facebook_text]" id="facebook_text" value="<?php echo esc_attr($opts['facebook_text']); ?>">
67
  </td>
68
  </tr>
69
  <tr valign="top">
70
  <th><label for="twitter_text"><?php _e('Twitter Share button text','wp-social-sharing');?></label></th>
71
  <td>
72
- <input type="text" class="widefat" name="wp_social_sharing[twitter_text]" id="twitter_text" value="<?php echo esc_attr($opts['twitter_text']); ?>">
73
  </td>
74
  </tr>
75
  <tr valign="top">
57
  <tr valign="top">
58
  <th><label for="alws_show_icons"><?php _e('Always show social icons','wp-social-sharing');?></label></th>
59
  <td>
60
+ <input type="checkbox" id="alws_show_icons" name="wp_social_sharing[show_icons]" value="1" <?php checked( '1', $opts['show_icons'], true ); ?> />
61
+ </td>
62
+ </tr>
63
+ <tr valign="top">
64
+ <th><label for="before_button_text"><?php _e('Text before Sharing buttons','wp-social-sharing');?></label></th>
65
+ <td>
66
+ <input type="text" class="widefat" name="wp_social_sharing[before_button_text]" id="before_button_text" value="<?php echo esc_attr($opts['before_button_text']); ?>" />
67
  </td>
68
  </tr>
69
  <tr valign="top">
70
  <th><label for="facebook_text"><?php _e('Facebook Share button text','wp-social-sharing');?></label></th>
71
  <td>
72
+ <input type="text" class="widefat" name="wp_social_sharing[facebook_text]" id="facebook_text" value="<?php echo esc_attr($opts['facebook_text']); ?>" />
73
  </td>
74
  </tr>
75
  <tr valign="top">
76
  <th><label for="twitter_text"><?php _e('Twitter Share button text','wp-social-sharing');?></label></th>
77
  <td>
78
+ <input type="text" class="widefat" name="wp_social_sharing[twitter_text]" id="twitter_text" value="<?php echo esc_attr($opts['twitter_text']); ?>" />
79
  </td>
80
  </tr>
81
  <tr valign="top">
index.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Social Sharing
4
- Version: 1.6
5
  Plugin URI: http://wordpress.org/plugins/wp-social-sharing/
6
  Description: Adds very attractive responsive social sharing buttons of Facebook, Twitter, Linkedin, Pinterest and Google+ to wordpress posts, pages or media.
7
  Author: Arjun Jain
1
  <?php
2
  /*
3
  Plugin Name: WP Social Sharing
4
+ Version: 1.7
5
  Plugin URI: http://wordpress.org/plugins/wp-social-sharing/
6
  Description: Adds very attractive responsive social sharing buttons of Facebook, Twitter, Linkedin, Pinterest and Google+ to wordpress posts, pages or media.
7
  Author: Arjun Jain
readme.txt CHANGED
@@ -6,7 +6,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=SQC4WR7X
6
  Tags: responsive social buttons, responsive social sharing buttons, responsive button, social buttons, social sharing, sharing buttons, twitter, googleplus, facebook, linkedin, pinterest, add to custom post type
7
  Requires at least: 3.5
8
  Tested up to: 4.2.2
9
- Stable tag: 1.6
10
  License: GPLv3
11
 
12
  Adds very attractive responsive social sharing buttons of Facebook, Twitter, Linkedin, Pinterest and Google+ to wordpress posts, pages or media.
@@ -25,12 +25,13 @@ Most of the social sharing plugins uses images/api to display social share butto
25
  - Reorder Social icon order easily.
26
  - No Image, button created using CSS3. For device width less than 480px, this plugin used one single image to display social icons.
27
  - Provide Shortcode, can integrated with any theme easily.
 
28
 
29
  **Plugin Shortcode**
30
  You can also use following shortcode
31
 
32
  `
33
- [wp_social_sharing social_options='facebook,twitter,googleplus,linkedin,pinterest' twitter_username='arjun077' facebook_text='Share on Facebook' twitter_text='Share on Twitter' googleplus_text='Share on Google+' linkedin_text='Share on Linkedin' pinterest_text="Share on Pinterest" icon_order='f,t,g,l,p' show_icons='0']
34
  `
35
  [Demo](http://www.arjunjain.info/wp-social-sharing/)
36
 
@@ -52,6 +53,9 @@ You can also use following shortcode
52
  2. Alternatively, download the plugin and upload the contents of `wp-social-sharing.zip` to your plugins directory, which usually is `/wp-content/plugins/`. Activate the plugin.
53
 
54
  == Changelog ==
 
 
 
55
  = 1.6 - February 10, 2015 =
56
  - Add Pinterest share button
57
  - Update button CSS
6
  Tags: responsive social buttons, responsive social sharing buttons, responsive button, social buttons, social sharing, sharing buttons, twitter, googleplus, facebook, linkedin, pinterest, add to custom post type
7
  Requires at least: 3.5
8
  Tested up to: 4.2.2
9
+ Stable tag: 1.7
10
  License: GPLv3
11
 
12
  Adds very attractive responsive social sharing buttons of Facebook, Twitter, Linkedin, Pinterest and Google+ to wordpress posts, pages or media.
25
  - Reorder Social icon order easily.
26
  - No Image, button created using CSS3. For device width less than 480px, this plugin used one single image to display social icons.
27
  - Provide Shortcode, can integrated with any theme easily.
28
+ - Add text before share buttons
29
 
30
  **Plugin Shortcode**
31
  You can also use following shortcode
32
 
33
  `
34
+ [wp_social_sharing social_options='facebook,twitter,googleplus,linkedin,pinterest' twitter_username='arjun077' facebook_text='Share on Facebook' twitter_text='Share on Twitter' googleplus_text='Share on Google+' linkedin_text='Share on Linkedin' pinterest_text="Share on Pinterest" icon_order='f,t,g,l,p' show_icons='0' before_button_text='' social_image='']
35
  `
36
  [Demo](http://www.arjunjain.info/wp-social-sharing/)
37
 
53
  2. Alternatively, download the plugin and upload the contents of `wp-social-sharing.zip` to your plugins directory, which usually is `/wp-content/plugins/`. Activate the plugin.
54
 
55
  == Changelog ==
56
+ = 1.7 - June 24, 2015 =
57
+ - Add Text Before sharing buttons
58
+
59
  = 1.6 - February 10, 2015 =
60
  - Add Pinterest share button
61
  - Update button CSS
static/socialshare.css CHANGED
@@ -1,5 +1,5 @@
1
  @CHARSET "UTF-8";
2
- .social-sharing{width: 100%; clear: both;}
3
  a.button-facebook,a.button-googleplus,a.button-twitter,a.button-linkedin,a.button-pinterest{color: #fff;text-decoration:none;font-size: 16px;font-weight:normal; margin:1% 1% 1% 0;padding:5px 1%;padding:.5rem 1%;text-align:center;display: inline-block;text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);border:0px;}
4
  a.button-facebook {background-color: #2b4170;background: -moz-linear-gradient(top, #3b5998, #2b4170);background: -ms-linear-gradient(top, #3b5998, #2b4170);background: -webkit-linear-gradient(top, #3b5998, #2b4170);text-shadow: 0 -1px -1px #1f2f52;}
5
  a.button-facebook:hover {background-color: #3b5998;background: -moz-linear-gradient(top, #2b4170, #3b5998);background: -ms-linear-gradient(top, #2b4170, #3b5998);background: -webkit-linear-gradient(top, #2b4170, #3b5998);color:#fff;}
1
  @CHARSET "UTF-8";
2
+ .social-sharing{width: 100%; clear: both;} .social-sharing span{display: inline-block;font-size: 110%;}
3
  a.button-facebook,a.button-googleplus,a.button-twitter,a.button-linkedin,a.button-pinterest{color: #fff;text-decoration:none;font-size: 16px;font-weight:normal; margin:1% 1% 1% 0;padding:5px 1%;padding:.5rem 1%;text-align:center;display: inline-block;text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);border:0px;}
4
  a.button-facebook {background-color: #2b4170;background: -moz-linear-gradient(top, #3b5998, #2b4170);background: -ms-linear-gradient(top, #3b5998, #2b4170);background: -webkit-linear-gradient(top, #3b5998, #2b4170);text-shadow: 0 -1px -1px #1f2f52;}
5
  a.button-facebook:hover {background-color: #3b5998;background: -moz-linear-gradient(top, #2b4170, #3b5998);background: -ms-linear-gradient(top, #2b4170, #3b5998);background: -webkit-linear-gradient(top, #2b4170, #3b5998);color:#fff;}