Social Share WordPress Plugin – AccessPress Social Share - Version 4.2.0

Version Description

  • Done the addition of new feature to fetch the share counts from http site as well if site has been moved from HTTP to HTTPS.
  • Done the addition of documentation links in how to use section.
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Share WordPress Plugin – AccessPress Social Share
Version 4.2.0
Comparing to
See all releases

Code changes from version 4.1.9 to 4.2.0

accesspress-social-share.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
4
  Plugin name: Social Share WordPress Plugin - AccessPress Social Share
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-share/
6
  Description: A plugin to add various social media shares to a site with dynamic configuration options.
7
- Version: 4.1.9
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain: accesspress-social-share
@@ -30,7 +30,7 @@ if ( !defined( 'APSS_LANG_DIR' ) ) {
30
  }
31
 
32
  if ( !defined( 'APSS_VERSION' ) ) {
33
- define( 'APSS_VERSION', '4.1.9' );
34
  }
35
 
36
  if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
@@ -728,6 +728,10 @@ if ( !class_exists( 'APSS_Class' ) ) {
728
  }
729
  return $count;
730
  }
 
 
 
 
731
  }
732
 
733
  //APSS_Class termination
4
  Plugin name: Social Share WordPress Plugin - AccessPress Social Share
5
  Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-share/
6
  Description: A plugin to add various social media shares to a site with dynamic configuration options.
7
+ Version: 4.2.0
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain: accesspress-social-share
30
  }
31
 
32
  if ( !defined( 'APSS_VERSION' ) ) {
33
+ define( 'APSS_VERSION', '4.2.0' );
34
  }
35
 
36
  if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
728
  }
729
  return $count;
730
  }
731
+
732
+ public static function get_http_url( $url ) {
733
+ return preg_replace( '/https:/i', 'http:', $url );
734
+ }
735
  }
736
 
737
  //APSS_Class termination
inc/backend/activation.php CHANGED
@@ -29,6 +29,7 @@ $apss_share_settings['api_configuration']['facebook'] = array(
29
  'app_secret'=>''
30
  );
31
  $apss_share_settings['total_counter_enable_options'] = '0';
 
32
  $apss_share_settings['enable_cache'] = '1';
33
  $apss_share_settings['cache_period'] = '24';
34
  $apss_share_settings['apss_social_counts_transients'] = array();
29
  'app_secret'=>''
30
  );
31
  $apss_share_settings['total_counter_enable_options'] = '0';
32
+ $apss_share_settings['enable_http_count'] = '0';
33
  $apss_share_settings['enable_cache'] = '1';
34
  $apss_share_settings['cache_period'] = '24';
35
  $apss_share_settings['apss_social_counts_transients'] = array();
inc/backend/how-to-use.php CHANGED
@@ -37,8 +37,9 @@ You can get the details instruction for creating facebook app <a href='http://de
37
  <li><i class="fa fa-check"></i>counter : You can enable or disable the share counter. To enable the share count use counter='1' and to disable it simply don't use counter parameter or use parameter counter='0'.</li>
38
  <li><i class="fa fa-check"></i>total_counter : You can enable or disable the total share counter. To enable the total share count use total_counter='1' and to disable it simply don't use total_counter parameter or use parameter total_counter='0'.</li>
39
  <li><i class="fa fa-check"></i>custom_share_link : You can enter the custom share link in case if the link provided by shortcode is not as per your need. To enable the custom share link use custom_share_link='custom link as per your need.'</li>
 
40
  </ul>
41
- <li><i class="fa fa-check"></i>Example 1.1: <code>[apss_share networks='facebook, twitter, pinterest' share_text='Share it' counter='1' total_counter='1']</code></li>
42
  </ul>
43
  </p></dd>
44
  <dd>
@@ -65,5 +66,8 @@ You can get the details instruction for creating facebook app <a href='http://de
65
  <dd>
66
  <p><b>For now you can use shortcode [apss-share] and [apss-count] for the display of the social shares and counts only as well but in upcoming plugin updates this shortcode will be removed and use the new one. So we suggest to use only the new shortcodes.</b></p>
67
  </dd>
 
 
 
68
 
69
  </dl>
37
  <li><i class="fa fa-check"></i>counter : You can enable or disable the share counter. To enable the share count use counter='1' and to disable it simply don't use counter parameter or use parameter counter='0'.</li>
38
  <li><i class="fa fa-check"></i>total_counter : You can enable or disable the total share counter. To enable the total share count use total_counter='1' and to disable it simply don't use total_counter parameter or use parameter total_counter='0'.</li>
39
  <li><i class="fa fa-check"></i>custom_share_link : You can enter the custom share link in case if the link provided by shortcode is not as per your need. To enable the custom share link use custom_share_link='custom link as per your need.'</li>
40
+ <li><i class='fa fa-check'></i>http_count: You can set this option if you have moved your site from HTTP to HTTPS to show the share counts from your old http site as well. Please note that the share count will fetch if your site has been moved from HTTP to HTTPS eg if your old site was http://example.com and you have moved your site to https://example.com. But please not that if you have changed other url parameters then the count will not work for example if your old page slug was http://example.com/sample-page and you have changed it to https://example.com/sample-page-1 then the share counts will not work for old url.</li>
41
  </ul>
42
+ <li><i class="fa fa-check"></i>Example 1.1: <code>[apss_share networks='facebook, twitter, pinterest' share_text='Share it' counter='1' total_counter='1' http_count='1']</code></li>
43
  </ul>
44
  </p></dd>
45
  <dd>
66
  <dd>
67
  <p><b>For now you can use shortcode [apss-share] and [apss-count] for the display of the social shares and counts only as well but in upcoming plugin updates this shortcode will be removed and use the new one. So we suggest to use only the new shortcodes.</b></p>
68
  </dd>
69
+ <dd>
70
+ <p>For the complete documentation please visit:<br /> <a href='https://accesspressthemes.com/documentation/documentation-plugin-instruction-accesspress-social-share/' target="_blank">https://accesspressthemes.com/documentation/documentation-plugin-instruction-accesspress-social-share/</a> </p>
71
+ </dd>
72
 
73
  </dl>
inc/backend/main-page.php CHANGED
@@ -227,6 +227,23 @@
227
  } ?> /><label for="total_counter_enable_options_y"><?php _e( 'Yes', 'accesspress-social-share' ); ?></label></div>
228
  </div>
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  <div class="apss-dialog-boxs clearfix">
231
  <h4><?php _e( 'Social share link options:', 'accesspress-social-share' ); ?> </h4>
232
  <div class="misc-opt"><input type="radio" id='dialog_box_options_1' name="apss_share_settings[dialog_box_options]" value="0" <?php if ( $options['dialog_box_options'] == '0' ) {
227
  } ?> /><label for="total_counter_enable_options_y"><?php _e( 'Yes', 'accesspress-social-share' ); ?></label></div>
228
  </div>
229
 
230
+ <div class='apss_cache_enable_opt'>
231
+ <h4><?php _e( 'Fetch the share counts from HTTP url as well? ', 'accesspress-social-share' ); ?> </h4>
232
+ <div class='misc-opt'>
233
+ <input type="radio" id='enable_http_count_yes' name="apss_share_settings[enable_http_count]" value="1" <?php if ( isset($options['enable_http_count']) && $options['enable_http_count'] == '1' ) { echo "checked='checked'"; } ?> />
234
+ <label for='enable_http_count_yes'><?php _e('Yes', 'accesspress-social-share'); ?></label>
235
+ </div>
236
+ <div class='misc-opt'>
237
+ <input type="radio" id='enable_http_count_no' name="apss_share_settings[enable_http_count]" value="0" <?php if ( isset($options['enable_http_count']) && $options['enable_http_count'] == '0' ) { echo "checked='checked'"; } ?> />
238
+ <label for='enable_http_count_no'><?php _e('No', 'accesspress-social-share'); ?></label>
239
+ </div>
240
+ <br />
241
+ <div class="apss_notes_cache_settings">
242
+ <?php _e( '<b>Note:</b> Please select this option if you have moved your site from HTTP to HTTPS', 'accesspress-social-share' ); ?>
243
+ </div>
244
+ </div>
245
+ <br />
246
+
247
  <div class="apss-dialog-boxs clearfix">
248
  <h4><?php _e( 'Social share link options:', 'accesspress-social-share' ); ?> </h4>
249
  <div class="misc-opt"><input type="radio" id='dialog_box_options_1' name="apss_share_settings[dialog_box_options]" value="0" <?php if ( $options['dialog_box_options'] == '0' ) {
inc/backend/save-settings.php CHANGED
@@ -33,6 +33,7 @@ $apss_share_settings['api_configuration']['facebook'] = array(
33
  );
34
 
35
  $apss_share_settings['total_counter_enable_options'] = $_POST['apss_share_settings']['total_counter_enable_options'];
 
36
  $apss_share_settings['enable_cache'] = $_POST['apss_share_settings']['enable_cache'];
37
  $apss_share_settings['cache_period'] = is_numeric( $_POST['apss_share_settings']['cache_settings'] ) ? $_POST['apss_share_settings']['cache_settings'] : '24';
38
  $apss_share_settings['dialog_box_options'] = $_POST['apss_share_settings']['dialog_box_options'];
33
  );
34
 
35
  $apss_share_settings['total_counter_enable_options'] = $_POST['apss_share_settings']['total_counter_enable_options'];
36
+ $apss_share_settings['enable_http_count'] = $_POST['apss_share_settings']['enable_http_count'];
37
  $apss_share_settings['enable_cache'] = $_POST['apss_share_settings']['enable_cache'];
38
  $apss_share_settings['cache_period'] = is_numeric( $_POST['apss_share_settings']['cache_settings'] ) ? $_POST['apss_share_settings']['cache_settings'] : '24';
39
  $apss_share_settings['dialog_box_options'] = $_POST['apss_share_settings']['dialog_box_options'];
inc/frontend/content-filter.php CHANGED
@@ -19,6 +19,16 @@ if ( isset( $options['total_counter_enable_options'] ) ) {
19
  } else {
20
  $enable_counter = 0;
21
  }
 
 
 
 
 
 
 
 
 
 
22
  ?>
23
 
24
 
@@ -30,12 +40,42 @@ $total_count = 0;
30
  foreach ( $options['social_networks'] as $key => $value ) {
31
  if ( intval( $value ) == '1' ) {
32
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  $total_count += $count;
34
  switch ( $key ) {
35
  //counter available for facebook
36
  case 'facebook':
37
  $link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
38
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ?>
41
  <div class='apss-facebook apss-single-icon'>
@@ -62,6 +102,21 @@ foreach ( $options['social_networks'] as $key => $value ) {
62
  }
63
  $link = "https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
64
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  ?>
66
  <div class='apss-twitter apss-single-icon'>
67
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" href='javascript:void(0);' <?php }else{ ?> href="<?php echo $link; ?>" <?php } ?> title="<?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?>" target='<?php echo $apss_link_open_option; ?>'>
@@ -81,6 +136,21 @@ foreach ( $options['social_networks'] as $key => $value ) {
81
  case 'google-plus':
82
  $link = 'https://plus.google.com/share?url=' . $url;
83
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ?>
85
  <div class='apss-google-plus apss-single-icon'>
86
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title="<?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -100,6 +170,21 @@ foreach ( $options['social_networks'] as $key => $value ) {
100
  //counter available for pinterest
101
  case 'pinterest':
102
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  ?>
104
 
105
  <div class='apss-pinterest apss-single-icon'>
@@ -122,6 +207,21 @@ foreach ( $options['social_networks'] as $key => $value ) {
122
  case 'linkedin':
123
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=" . $title . "&amp;url=" . $url . "&amp;summary=" . $excerpt;
124
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  ?>
126
 
127
  <div class='apss-linkedin apss-single-icon'>
19
  } else {
20
  $enable_counter = 0;
21
  }
22
+
23
+ if(isset($options['enable_http_count'])){
24
+ if ( $options['enable_http_count'] == '1' ) {
25
+ $http_url_checked = 1;
26
+ }else{
27
+ $http_url_checked = 0;
28
+ }
29
+ }else {
30
+ $http_url_checked = 0;
31
+ }
32
  ?>
33
 
34
 
40
  foreach ( $options['social_networks'] as $key => $value ) {
41
  if ( intval( $value ) == '1' ) {
42
  $count = $this->get_count( $key, $url );
43
+ ////////////////////////////////////////
44
+ if(isset($http_url_checked) && $http_url_checked=='1'){
45
+ $url_check = parse_url($url);
46
+ if($url_check['scheme'] == 'https'){
47
+ $flag=TRUE;
48
+ }else{
49
+ $flag=FALSE;
50
+ }
51
+
52
+ if($flag == TRUE){
53
+ $url1 = APSS_Class:: get_http_url($url);
54
+ $count += APSS_Class:: get_count($key, $url1);
55
+ }
56
+ }
57
+ ///////////////////////////////////////////
58
  $total_count += $count;
59
  switch ( $key ) {
60
  //counter available for facebook
61
  case 'facebook':
62
  $link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
63
  $count = $this->get_count( $key, $url );
64
+ ////////////////////////////////////////
65
+ if(isset($http_url_checked) && $http_url_checked=='1'){
66
+ $url_check = parse_url($url);
67
+ if($url_check['scheme'] == 'https'){
68
+ $flag=TRUE;
69
+ }else{
70
+ $flag=FALSE;
71
+ }
72
+
73
+ if($flag == TRUE){
74
+ $url1 = APSS_Class:: get_http_url($url);
75
+ $count += APSS_Class:: get_count($key, $url1);
76
+ }
77
+ }
78
+ ///////////////////////////////////////////
79
 
80
  ?>
81
  <div class='apss-facebook apss-single-icon'>
102
  }
103
  $link = "https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
104
  $count = $this->get_count( $key, $url );
105
+ ////////////////////////////////////////
106
+ if(isset($http_url_checked) && $http_url_checked=='1'){
107
+ $url_check = parse_url($url);
108
+ if($url_check['scheme'] == 'https'){
109
+ $flag=TRUE;
110
+ }else{
111
+ $flag=FALSE;
112
+ }
113
+
114
+ if($flag == TRUE){
115
+ $url1 = APSS_Class:: get_http_url($url);
116
+ $count += APSS_Class:: get_count($key, $url1);
117
+ }
118
+ }
119
+ ///////////////////////////////////////////
120
  ?>
121
  <div class='apss-twitter apss-single-icon'>
122
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" href='javascript:void(0);' <?php }else{ ?> href="<?php echo $link; ?>" <?php } ?> title="<?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?>" target='<?php echo $apss_link_open_option; ?>'>
136
  case 'google-plus':
137
  $link = 'https://plus.google.com/share?url=' . $url;
138
  $count = $this->get_count( $key, $url );
139
+ ////////////////////////////////////////
140
+ if(isset($http_url_checked) && $http_url_checked=='1'){
141
+ $url_check = parse_url($url);
142
+ if($url_check['scheme'] == 'https'){
143
+ $flag=TRUE;
144
+ }else{
145
+ $flag=FALSE;
146
+ }
147
+
148
+ if($flag == TRUE){
149
+ $url1 = APSS_Class:: get_http_url($url);
150
+ $count += APSS_Class:: get_count($key, $url1);
151
+ }
152
+ }
153
+ ///////////////////////////////////////////
154
  ?>
155
  <div class='apss-google-plus apss-single-icon'>
156
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title="<?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
170
  //counter available for pinterest
171
  case 'pinterest':
172
  $count = $this->get_count( $key, $url );
173
+ ////////////////////////////////////////
174
+ if(isset($http_url_checked) && $http_url_checked=='1'){
175
+ $url_check = parse_url($url);
176
+ if($url_check['scheme'] == 'https'){
177
+ $flag=TRUE;
178
+ }else{
179
+ $flag=FALSE;
180
+ }
181
+
182
+ if($flag == TRUE){
183
+ $url1 = APSS_Class:: get_http_url($url);
184
+ $count += APSS_Class:: get_count($key, $url1);
185
+ }
186
+ }
187
+ ///////////////////////////////////////////
188
  ?>
189
 
190
  <div class='apss-pinterest apss-single-icon'>
207
  case 'linkedin':
208
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=" . $title . "&amp;url=" . $url . "&amp;summary=" . $excerpt;
209
  $count = $this->get_count( $key, $url );
210
+ ////////////////////////////////////////
211
+ if(isset($http_url_checked) && $http_url_checked=='1'){
212
+ $url_check = parse_url($url);
213
+ if($url_check['scheme'] == 'https'){
214
+ $flag=TRUE;
215
+ }else{
216
+ $flag=FALSE;
217
+ }
218
+
219
+ if($flag == TRUE){
220
+ $url1 = APSS_Class:: get_http_url($url);
221
+ $count += APSS_Class:: get_count($key, $url1);
222
+ }
223
+ }
224
+ ///////////////////////////////////////////
225
  ?>
226
 
227
  <div class='apss-linkedin apss-single-icon'>
inc/frontend/count_shortcode.php CHANGED
@@ -16,11 +16,37 @@ if ( isset( $attr['network'] ) ) {
16
  }
17
  $options['social_networks'] = $new_array;
18
  }
 
 
 
 
 
 
 
 
 
 
 
19
  $total_count = 0;
20
  $count = 0;
21
  foreach ( $options['social_networks'] as $key => $value ) {
22
  if ( intval( $value ) == '1' ) {
23
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  $total_count += $count;
25
  }
26
  }
16
  }
17
  $options['social_networks'] = $new_array;
18
  }
19
+
20
+ if(isset($options['enable_http_count'])){
21
+ if ( $options['enable_http_count'] == '1' ) {
22
+ $http_url_checked = 1;
23
+ }else{
24
+ $http_url_checked = 0;
25
+ }
26
+ }else {
27
+ $http_url_checked = 0;
28
+ }
29
+
30
  $total_count = 0;
31
  $count = 0;
32
  foreach ( $options['social_networks'] as $key => $value ) {
33
  if ( intval( $value ) == '1' ) {
34
  $count = $this->get_count( $key, $url );
35
+ ////////////////////////////////////////
36
+ if(isset($http_url_checked) && $http_url_checked=='1'){
37
+ $url_check = parse_url($url);
38
+ if($url_check['scheme'] == 'https'){
39
+ $flag=TRUE;
40
+ }else{
41
+ $flag=FALSE;
42
+ }
43
+
44
+ if($flag == TRUE){
45
+ $url1 = APSS_Class:: get_http_url($url);
46
+ $count += APSS_Class:: get_count($key, $url1);
47
+ }
48
+ }
49
+ ///////////////////////////////////////////
50
  $total_count += $count;
51
  }
52
  }
inc/frontend/shortcode.php CHANGED
@@ -36,6 +36,13 @@ if ( isset( $attr['total_counter'] ) ) {
36
  $total_counter_enable_options = 0;
37
  }
38
 
 
 
 
 
 
 
 
39
 
40
  if ( isset( $attr['counter'] ) ) {
41
  if ( $attr['counter'] == '1' ) {
@@ -64,12 +71,45 @@ if ( strlen( $content ) >= 100 ) {
64
  foreach ( $options['social_networks'] as $key => $value ) {
65
  if ( intval( $value ) == '1' ) {
66
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  $total_count += $count;
68
  switch ( $key ) {
69
  //counter available for facebook
70
  case 'facebook':
71
  $link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
72
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  ?>
74
  <div class='apss-facebook apss-single-icon'>
75
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -95,6 +135,22 @@ if ( strlen( $content ) >= 100 ) {
95
  }
96
  $link = "https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
97
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  ?>
99
  <div class='apss-twitter apss-single-icon'>
100
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" href='javascript:void(0);' <?php }else{ ?> href="<?php echo $link; ?>" <?php } ?> title='<?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>'>
@@ -114,6 +170,23 @@ if ( strlen( $content ) >= 100 ) {
114
  case 'google-plus':
115
  $link = 'https://plus.google.com/share?url=' . $url;
116
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  ?>
118
  <div class='apss-google-plus apss-single-icon'>
119
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -133,6 +206,21 @@ if ( strlen( $content ) >= 100 ) {
133
  //counter available for pinterest
134
  case 'pinterest':
135
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  ?>
137
  <div class='apss-pinterest apss-single-icon'>
138
  <a rel='nofollow' title='<?php _e( 'Share on Pinterest', 'accesspress-social-share' ); ?>' href='javascript:pinIt();'>
@@ -153,6 +241,21 @@ if ( strlen( $content ) >= 100 ) {
153
  case 'linkedin':
154
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=" . $title . "&amp;url=" . $url . "&amp;summary=" . $excerpt;
155
  $count = $this->get_count( $key, $url );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  ?>
157
  <div class='apss-linkedin apss-single-icon'>
158
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
36
  $total_counter_enable_options = 0;
37
  }
38
 
39
+ if ( isset( $attr['http_count'] ) ) {
40
+ if ( $attr['http_count'] == '1' ) {
41
+ $http_url_checked = 1;
42
+ }
43
+ } else {
44
+ $http_url_checked = 0;
45
+ }
46
 
47
  if ( isset( $attr['counter'] ) ) {
48
  if ( $attr['counter'] == '1' ) {
71
  foreach ( $options['social_networks'] as $key => $value ) {
72
  if ( intval( $value ) == '1' ) {
73
  $count = $this->get_count( $key, $url );
74
+
75
+ ////////////////////////////////////////
76
+ if(isset($http_url_checked) && $http_url_checked=='1'){
77
+ $url_check = parse_url($url);
78
+ if($url_check['scheme'] == 'https'){
79
+ $flag=TRUE;
80
+ }else{
81
+ $flag=FALSE;
82
+ }
83
+
84
+ if($flag == TRUE){
85
+ $url1 = APSS_Class:: get_http_url($url);
86
+ $count += APSS_Class:: get_count($key, $url1);
87
+ }
88
+ }
89
+ ///////////////////////////////////////////
90
+
91
  $total_count += $count;
92
  switch ( $key ) {
93
  //counter available for facebook
94
  case 'facebook':
95
  $link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
96
  $count = $this->get_count( $key, $url );
97
+
98
+ ////////////////////////////////////////
99
+ if(isset($http_url_checked) && $http_url_checked=='1'){
100
+ $url_check = parse_url($url);
101
+ if($url_check['scheme'] == 'https'){
102
+ $flag=TRUE;
103
+ }else{
104
+ $flag=FALSE;
105
+ }
106
+
107
+ if($flag == TRUE){
108
+ $url1 = APSS_Class:: get_http_url($url);
109
+ $count += APSS_Class:: get_count($key, $url1);
110
+ }
111
+ }
112
+ ///////////////////////////////////////////
113
  ?>
114
  <div class='apss-facebook apss-single-icon'>
115
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
135
  }
136
  $link = "https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
137
  $count = $this->get_count( $key, $url );
138
+
139
+ ////////////////////////////////////////
140
+ if(isset($http_url_checked) && $http_url_checked=='1'){
141
+ $url_check = parse_url($url);
142
+ if($url_check['scheme'] == 'https'){
143
+ $flag=TRUE;
144
+ }else{
145
+ $flag=FALSE;
146
+ }
147
+
148
+ if($flag == TRUE){
149
+ $url1 = APSS_Class:: get_http_url($url);
150
+ $count += APSS_Class:: get_count($key, $url1);
151
+ }
152
+ }
153
+ ///////////////////////////////////////////
154
  ?>
155
  <div class='apss-twitter apss-single-icon'>
156
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" href='javascript:void(0);' <?php }else{ ?> href="<?php echo $link; ?>" <?php } ?> title='<?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>'>
170
  case 'google-plus':
171
  $link = 'https://plus.google.com/share?url=' . $url;
172
  $count = $this->get_count( $key, $url );
173
+
174
+ ////////////////////////////////////////
175
+ if(isset($http_url_checked) && $http_url_checked=='1'){
176
+ $url_check = parse_url($url);
177
+ if($url_check['scheme'] == 'https'){
178
+ $flag=TRUE;
179
+ }else{
180
+ $flag=FALSE;
181
+ }
182
+
183
+ if($flag == TRUE){
184
+ $url1 = APSS_Class:: get_http_url($url);
185
+ $count += APSS_Class:: get_count($key, $url1);
186
+ }
187
+ }
188
+ ///////////////////////////////////////////
189
+
190
  ?>
191
  <div class='apss-google-plus apss-single-icon'>
192
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
206
  //counter available for pinterest
207
  case 'pinterest':
208
  $count = $this->get_count( $key, $url );
209
+ ////////////////////////////////////////
210
+ if(isset($http_url_checked) && $http_url_checked=='1'){
211
+ $url_check = parse_url($url);
212
+ if($url_check['scheme'] == 'https'){
213
+ $flag=TRUE;
214
+ }else{
215
+ $flag=FALSE;
216
+ }
217
+
218
+ if($flag == TRUE){
219
+ $url1 = APSS_Class:: get_http_url($url);
220
+ $count += APSS_Class:: get_count($key, $url1);
221
+ }
222
+ }
223
+ ///////////////////////////////////////////
224
  ?>
225
  <div class='apss-pinterest apss-single-icon'>
226
  <a rel='nofollow' title='<?php _e( 'Share on Pinterest', 'accesspress-social-share' ); ?>' href='javascript:pinIt();'>
241
  case 'linkedin':
242
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=" . $title . "&amp;url=" . $url . "&amp;summary=" . $excerpt;
243
  $count = $this->get_count( $key, $url );
244
+ ////////////////////////////////////////
245
+ if(isset($http_url_checked) && $http_url_checked=='1'){
246
+ $url_check = parse_url($url);
247
+ if($url_check['scheme'] == 'https'){
248
+ $flag=TRUE;
249
+ }else{
250
+ $flag=FALSE;
251
+ }
252
+
253
+ if($flag == TRUE){
254
+ $url1 = APSS_Class:: get_http_url($url);
255
+ $count += APSS_Class:: get_count($key, $url1);
256
+ }
257
+ }
258
+ ///////////////////////////////////////////
259
  ?>
260
  <div class='apss-linkedin apss-single-icon'>
261
  <a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
readme.txt CHANGED
@@ -4,13 +4,15 @@ Tags: social share counter, social share, social media share, social network sha
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.6
7
- Stable tag: 4.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Share your site urls in most popular social medias and show share counts on your website with various designs.
12
 
13
  == Description ==
 
 
14
  <strong>AccessPress Social Share</strong> is a <strong>Free WordPress plugin</strong> to allow anyone easily share website content (page, posts, image, media) on major social media (Facebook, Twitter, Google+, Pinterest, LinkedIn and Digg ) by the use of the latest APIs on your website!
15
 
16
  A perfect plugin to make any content on your website social-share-friendly, and increase your social reach dramatically!
@@ -25,6 +27,10 @@ Just get it done in a few minutes!
25
  sidebar options, widget options, more shortcode options. Pinterest pin
26
  it button for each images. Please upgrade to Premium version.`
27
 
 
 
 
 
28
  = Free Features: =
29
 
30
  * <strong>Beautifully designed 5 themes to select from.</strong> More available in Pro versoin.
@@ -135,6 +141,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
135
  6. Backend Miscellaneous Settings Section
136
 
137
  == Changelog ==
 
 
 
 
138
  = 4.1.9 =
139
  * Done the bug fixing for the theme 3 for the mobile displays.
140
  * Done the bug fixing for the content share for the linkedin.
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.6
7
+ Stable tag: 4.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  Share your site urls in most popular social medias and show share counts on your website with various designs.
12
 
13
  == Description ==
14
+ [Homepage](https://accesspressthemes.com/) | [Documentation](https://accesspressthemes.com/documentation/documentation-plugin-instruction-accesspress-social-share/) | [Support](https://accesspressthemes.com/support) | [Demo](http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-share/) | [Premium Version](https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/)
15
+
16
  <strong>AccessPress Social Share</strong> is a <strong>Free WordPress plugin</strong> to allow anyone easily share website content (page, posts, image, media) on major social media (Facebook, Twitter, Google+, Pinterest, LinkedIn and Digg ) by the use of the latest APIs on your website!
17
 
18
  A perfect plugin to make any content on your website social-share-friendly, and increase your social reach dramatically!
27
  sidebar options, widget options, more shortcode options. Pinterest pin
28
  it button for each images. Please upgrade to Premium version.`
29
 
30
+ `Have you moved your site from HTTP to HTTPS and lost your share counts?
31
+ No worries! Now you can get your http site's share counts back using our
32
+ plugin.`
33
+
34
  = Free Features: =
35
 
36
  * <strong>Beautifully designed 5 themes to select from.</strong> More available in Pro versoin.
141
  6. Backend Miscellaneous Settings Section
142
 
143
  == Changelog ==
144
+ = 4.2.0 =
145
+ * Done the addition of new feature to fetch the share counts from http site as well if site has been moved from HTTP to HTTPS.
146
+ * Done the addition of documentation links in how to use section.
147
+
148
  = 4.1.9 =
149
  * Done the bug fixing for the theme 3 for the mobile displays.
150
  * Done the bug fixing for the content share for the linkedin.