Social Share WordPress Plugin – AccessPress Social Share - Version 3.0.0

Version Description

  • Addition of the options of meta box for posts and pages to enable and disable the social share for it's content.
  • Removal of the loading text instead used the previous share counters.
Download this release

Release Info

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

Code changes from version 2.0.9 to 3.0.0

accesspress-social-share.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
4
  Plugin name: 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: 2.0.9
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:apss-share
@@ -30,7 +30,7 @@ if( !defined( 'APSS_LANG_DIR' ) ) {
30
  }
31
 
32
  if( !defined( 'APSS_VERSION' ) ) {
33
- define( 'APSS_VERSION', '2.0.9' );
34
  }
35
 
36
  if( !defined('APSS_TEXT_DOMAIN')){
@@ -65,6 +65,8 @@ if( !class_exists( 'APSS_Class' ) ){
65
  add_action('admin_post_apss_clear_cache',array($this,'apss_clear_cache'));//clear the cache of the social share counter.
66
  add_shortcode('apss-share', array($this, 'apss_shortcode')); //adds a shortcode
67
  add_shortcode('apss-count', array($this, 'apss_count_shortcode')); //adds a share count shortcode
 
 
68
 
69
  add_action('wp_ajax_nopriv_frontend_counter', array($this, 'frontend_counter')); //fetching of the social share count.
70
  add_action('wp_ajax_frontend_counter', array($this, 'frontend_counter')); // action for ajax counter.
@@ -131,17 +133,19 @@ if( !class_exists( 'APSS_Class' ) ){
131
  ob_get_clean();
132
 
133
  $share_shows_in_options=$options['share_options'];
 
 
134
  $all = in_array('all', $options['share_options']);
135
- $is_lists_authorized = (is_search()) && $all ? true : false;
136
 
137
  $is_attachement_check = in_array('attachment', $options['share_options']);
138
  $is_attachement = (is_attachment() && $is_attachement_check ) ? true : false;
139
 
140
  $front_page = in_array('front_page', $options['share_options']);
141
- $is_front_page=(is_front_page()) && $front_page ? true : false;
142
 
143
  $share_shows_in_options=$options['share_options'];
144
- $is_singular = is_singular($share_shows_in_options) && !is_front_page() ? true : false;
145
 
146
  if(!empty($share_shows_in_options)){
147
  $is_tax =is_tax($share_shows_in_options);
@@ -283,6 +287,70 @@ if( !class_exists( 'APSS_Class' ) ){
283
  }
284
  }
285
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  //plugins backend admin page
287
  function main_page() {
288
  include('inc/backend/main-page.php');
4
  Plugin name: 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: 3.0.0
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:apss-share
30
  }
31
 
32
  if( !defined( 'APSS_VERSION' ) ) {
33
+ define( 'APSS_VERSION', '3.0.0' );
34
  }
35
 
36
  if( !defined('APSS_TEXT_DOMAIN')){
65
  add_action('admin_post_apss_clear_cache',array($this,'apss_clear_cache'));//clear the cache of the social share counter.
66
  add_shortcode('apss-share', array($this, 'apss_shortcode')); //adds a shortcode
67
  add_shortcode('apss-count', array($this, 'apss_count_shortcode')); //adds a share count shortcode
68
+ add_action('add_meta_boxes', array($this, 'social_meta_box')); //for providing the option to disable the social share option in each frontend page
69
+ add_action('save_post', array($this, 'save_meta_values')); //function to save the post meta values of a plugin.
70
 
71
  add_action('wp_ajax_nopriv_frontend_counter', array($this, 'frontend_counter')); //fetching of the social share count.
72
  add_action('wp_ajax_frontend_counter', array($this, 'frontend_counter')); // action for ajax counter.
133
  ob_get_clean();
134
 
135
  $share_shows_in_options=$options['share_options'];
136
+ $content_flag = get_post_meta($post->ID, 'apss_content_flag', true);
137
+
138
  $all = in_array('all', $options['share_options']);
139
+ $is_lists_authorized = (is_search() && $content_flag !='1' ) && $all ? true : false;
140
 
141
  $is_attachement_check = in_array('attachment', $options['share_options']);
142
  $is_attachement = (is_attachment() && $is_attachement_check ) ? true : false;
143
 
144
  $front_page = in_array('front_page', $options['share_options']);
145
+ $is_front_page=(is_front_page() && $content_flag != '1' ) && $front_page ? true : false;
146
 
147
  $share_shows_in_options=$options['share_options'];
148
+ $is_singular = is_singular($share_shows_in_options) && !is_front_page() && $content_flag != '1' ? true : false;
149
 
150
  if(!empty($share_shows_in_options)){
151
  $is_tax =is_tax($share_shows_in_options);
287
  }
288
  }
289
 
290
+ ///////////////////////////for post meta options//////////////////////////////////
291
+ /**
292
+ * Adds a section in all the post and page section to disable the share options in frontend pages
293
+ */
294
+ function social_meta_box() {
295
+ add_meta_box('ap-share-box', 'AccessPress social share options', array($this, 'metabox_callback'), '', 'side', 'core');
296
+ }
297
+
298
+ function metabox_callback($post) {
299
+ wp_nonce_field('save_meta_values', 'ap_share_meta_nonce');
300
+ $content_flag = get_post_meta($post->ID, 'apss_content_flag', true);
301
+ ?>
302
+ <label><input type="checkbox" value="1" name="apss_content_flag" <?php checked($content_flag, true) ?>/><?php _e('Hide share icons in content', APSS_TEXT_DOMAIN ); ?></label><br>
303
+ <?php
304
+ }
305
+
306
+ /**
307
+ * Save Share Flags on post save
308
+ */
309
+ function save_meta_values($post_id) {
310
+
311
+ /*
312
+ * We need to verify this came from our screen and with proper authorization,
313
+ * because the save_post action can be triggered at other times.
314
+ */
315
+
316
+ // Check if our nonce is set.
317
+ if (!isset($_POST['ap_share_meta_nonce'])) {
318
+ return;
319
+ }
320
+
321
+ // Verify that the nonce is valid.
322
+ if (!wp_verify_nonce($_POST['ap_share_meta_nonce'], 'save_meta_values')) {
323
+ return;
324
+ }
325
+
326
+ // If this is an autosave, our form has not been submitted, so we don't want to do anything.
327
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
328
+ return;
329
+ }
330
+
331
+ // Check the user's permissions.
332
+ if (isset($_POST['post_type']) && 'page' == $_POST['post_type']) {
333
+
334
+ if (!current_user_can('edit_page', $post_id)) {
335
+ return;
336
+ }
337
+ } else {
338
+
339
+ if (!current_user_can('edit_post', $post_id)) {
340
+ return;
341
+ }
342
+ }
343
+
344
+ /* OK, it's safe for us to save the data now. */
345
+ // Make sure that it is set.
346
+ $content_flag = (isset($_POST['apss_content_flag']) && $_POST['apss_content_flag'] == 1) ? 1 : 0;
347
+
348
+ // Update the meta field in the database.
349
+ update_post_meta($post_id, 'apss_content_flag', $content_flag);
350
+ }
351
+
352
+ ////////////////////////////////////////////////////////////
353
+
354
  //plugins backend admin page
355
  function main_page() {
356
  include('inc/backend/main-page.php');
inc/frontend/content-filter.php CHANGED
@@ -33,6 +33,7 @@ foreach( $options['social_networks'] as $key=>$value ){
33
  //counter available for facebook
34
  case 'facebook':
35
  $link = 'https://www.facebook.com/sharer/sharer.php?u='.$url;
 
36
  ?>
37
  <div class='apss-facebook apss-single-icon'>
38
  <a rel='nofollow' title="<?php _e('Share on Facebook', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -42,7 +43,7 @@ foreach( $options['social_networks'] as $key=>$value ){
42
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
43
  </div>
44
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
45
- <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>">Loading...</div>
46
  <?php } ?>
47
  </a>
48
  </div>
@@ -57,6 +58,7 @@ foreach( $options['social_networks'] as $key=>$value ){
57
  $twitter_user = 'via='.$twitter_user;
58
  }
59
  $link ="https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
 
60
  ?>
61
  <div class='apss-twitter apss-single-icon'>
62
  <a rel='nofollow' title="<?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href="<?php echo $link; ?>">
@@ -65,7 +67,7 @@ foreach( $options['social_networks'] as $key=>$value ){
65
  <span class='apss-social-text'><?php _e( 'Share on Twitter', APSS_TEXT_DOMAIN ); ?></span><span class='apss-share'><?php _e( 'Tweet', APSS_TEXT_DOMAIN ); ?></span>
66
  </div>
67
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1'){ ?>
68
- <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>">Loading...</div>
69
  <?php } ?>
70
  </a>
71
  </div>
@@ -75,6 +77,7 @@ foreach( $options['social_networks'] as $key=>$value ){
75
  //counter available for google plus
76
  case 'google-plus':
77
  $link = 'https://plus.google.com/share?url='.$url;
 
78
  ?>
79
  <div class='apss-google-plus apss-single-icon'>
80
  <a rel='nofollow' title="<?php _e('Share on Google Plus', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -84,7 +87,7 @@ foreach( $options['social_networks'] as $key=>$value ){
84
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
85
  </div>
86
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
87
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
88
  <?php } ?>
89
  </a>
90
  </div>
@@ -93,6 +96,7 @@ foreach( $options['social_networks'] as $key=>$value ){
93
 
94
  //counter available for pinterest
95
  case 'pinterest':
 
96
  ?>
97
 
98
  <div class='apss-pinterest apss-single-icon'>
@@ -103,7 +107,7 @@ foreach( $options['social_networks'] as $key=>$value ){
103
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
104
  </div>
105
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1' ){ ?>
106
- <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
107
  <?php } ?>
108
 
109
  </a>
@@ -114,6 +118,7 @@ foreach( $options['social_networks'] as $key=>$value ){
114
  //couter available for linkedin
115
  case 'linkedin':
116
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
 
117
  ?>
118
 
119
  <div class='apss-linkedin apss-single-icon'>
@@ -123,7 +128,7 @@ foreach( $options['social_networks'] as $key=>$value ){
123
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
124
  </div>
125
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1' ){ ?>
126
- <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>">Loading...</div>
127
  <?php } ?>
128
  </a>
129
  </div>
33
  //counter available for facebook
34
  case 'facebook':
35
  $link = 'https://www.facebook.com/sharer/sharer.php?u='.$url;
36
+ $count = $this->get_count($key, $url);
37
  ?>
38
  <div class='apss-facebook apss-single-icon'>
39
  <a rel='nofollow' title="<?php _e('Share on Facebook', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
43
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
44
  </div>
45
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
46
+ <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>"><?php echo $count; ?></div>
47
  <?php } ?>
48
  </a>
49
  </div>
58
  $twitter_user = 'via='.$twitter_user;
59
  }
60
  $link ="https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
61
+ $count = $this->get_count($key, $url);
62
  ?>
63
  <div class='apss-twitter apss-single-icon'>
64
  <a rel='nofollow' title="<?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href="<?php echo $link; ?>">
67
  <span class='apss-social-text'><?php _e( 'Share on Twitter', APSS_TEXT_DOMAIN ); ?></span><span class='apss-share'><?php _e( 'Tweet', APSS_TEXT_DOMAIN ); ?></span>
68
  </div>
69
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1'){ ?>
70
+ <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>"><?php echo $count; ?></div>
71
  <?php } ?>
72
  </a>
73
  </div>
77
  //counter available for google plus
78
  case 'google-plus':
79
  $link = 'https://plus.google.com/share?url='.$url;
80
+ $count = $this->get_count($key, $url);
81
  ?>
82
  <div class='apss-google-plus apss-single-icon'>
83
  <a rel='nofollow' title="<?php _e('Share on Google Plus', APSS_TEXT_DOMAIN ); ?>" target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
87
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
88
  </div>
89
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
90
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
91
  <?php } ?>
92
  </a>
93
  </div>
96
 
97
  //counter available for pinterest
98
  case 'pinterest':
99
+ $count = $this->get_count($key, $url);
100
  ?>
101
 
102
  <div class='apss-pinterest apss-single-icon'>
107
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
108
  </div>
109
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1' ){ ?>
110
+ <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
111
  <?php } ?>
112
 
113
  </a>
118
  //couter available for linkedin
119
  case 'linkedin':
120
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
121
+ $count = $this->get_count($key, $url);
122
  ?>
123
 
124
  <div class='apss-linkedin apss-single-icon'>
128
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
129
  </div>
130
  <?php if( isset( $counter_enable_options ) && $counter_enable_options=='1' ){ ?>
131
+ <div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key; ?>"><?php echo $count; ?></div>
132
  <?php } ?>
133
  </a>
134
  </div>
inc/frontend/shortcode.php CHANGED
@@ -4,7 +4,6 @@ global $post;
4
  $options = get_option( APSS_SETTING_NAME );
5
  $apss_link_open_option=($options['dialog_box_options']=='1') ? "_blank": "";
6
  $twitter_user=$options['twitter_username'];
7
- //$counter_enable_options=$options['counter_enable_options'];
8
  $icon_set_value=$options['social_icon_set'];
9
  $url= get_permalink();
10
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period']*60*60 : 24 * 60 * 60 ;
@@ -66,6 +65,7 @@ foreach( $options['social_networks'] as $key=>$value ){
66
  //counter available for facebook
67
  case 'facebook':
68
  $link = 'https://www.facebook.com/sharer/sharer.php?u='.$url;
 
69
  ?>
70
  <div class='apss-facebook apss-single-icon'>
71
  <a rel='nofollow' title='<?php _e('Share on Facebook', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -75,7 +75,7 @@ foreach( $options['social_networks'] as $key=>$value ){
75
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
76
  </div>
77
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
78
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
79
  <?php } ?>
80
  </a>
81
  </div>
@@ -90,6 +90,7 @@ foreach( $options['social_networks'] as $key=>$value ){
90
  $twitter_user = 'via='.$twitter_user;
91
  }
92
  $link ="https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
 
93
  ?>
94
  <div class='apss-twitter apss-single-icon'>
95
  <a rel='nofollow' title='<?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href="<?php echo $link; ?>">
@@ -98,7 +99,7 @@ foreach( $options['social_networks'] as $key=>$value ){
98
  <span class='apss-social-text'><?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?></span><span class='apss-share'><?php _e( 'Tweet', APSS_TEXT_DOMAIN ); ?></span>
99
  </div>
100
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
101
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
102
  <?php } ?>
103
  </a>
104
  </div>
@@ -108,6 +109,7 @@ foreach( $options['social_networks'] as $key=>$value ){
108
  //counter available for google plus
109
  case 'google-plus':
110
  $link = 'https://plus.google.com/share?url='.$url;
 
111
  ?>
112
  <div class='apss-google-plus apss-single-icon'>
113
  <a rel='nofollow' title='<?php _e('Share on Google Plus', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -117,7 +119,7 @@ foreach( $options['social_networks'] as $key=>$value ){
117
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
118
  </div>
119
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
120
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
121
  <?php } ?>
122
  </a>
123
  </div>
@@ -126,6 +128,7 @@ foreach( $options['social_networks'] as $key=>$value ){
126
 
127
  //counter available for pinterest
128
  case 'pinterest':
 
129
  ?>
130
  <div class='apss-pinterest apss-single-icon'>
131
  <a rel='nofollow' title='<?php _e('Share on Pinterest', APSS_TEXT_DOMAIN ); ?>' href='javascript:pinIt();'>
@@ -135,7 +138,7 @@ foreach( $options['social_networks'] as $key=>$value ){
135
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
136
  </div>
137
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
138
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
139
  <?php } ?>
140
  </a>
141
  </div>
@@ -145,6 +148,7 @@ foreach( $options['social_networks'] as $key=>$value ){
145
  //couter available for linkedin
146
  case 'linkedin':
147
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
 
148
  ?>
149
  <div class='apss-linkedin apss-single-icon'>
150
  <a rel='nofollow' title='<?php _e('Share on LinkedIn', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
@@ -154,7 +158,7 @@ foreach( $options['social_networks'] as $key=>$value ){
154
  </div>
155
 
156
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
157
- <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>">Loading...</div>
158
  <?php } ?>
159
 
160
  </a>
4
  $options = get_option( APSS_SETTING_NAME );
5
  $apss_link_open_option=($options['dialog_box_options']=='1') ? "_blank": "";
6
  $twitter_user=$options['twitter_username'];
 
7
  $icon_set_value=$options['social_icon_set'];
8
  $url= get_permalink();
9
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period']*60*60 : 24 * 60 * 60 ;
65
  //counter available for facebook
66
  case 'facebook':
67
  $link = 'https://www.facebook.com/sharer/sharer.php?u='.$url;
68
+ $count = $this->get_count($key, $url);
69
  ?>
70
  <div class='apss-facebook apss-single-icon'>
71
  <a rel='nofollow' title='<?php _e('Share on Facebook', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
75
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
76
  </div>
77
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
78
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
79
  <?php } ?>
80
  </a>
81
  </div>
90
  $twitter_user = 'via='.$twitter_user;
91
  }
92
  $link ="https://twitter.com/intent/tweet?text=$title&amp;url=$url_twitter&amp;$twitter_user";
93
+ $count = $this->get_count($key, $url);
94
  ?>
95
  <div class='apss-twitter apss-single-icon'>
96
  <a rel='nofollow' title='<?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href="<?php echo $link; ?>">
99
  <span class='apss-social-text'><?php _e('Share on Twitter', APSS_TEXT_DOMAIN ); ?></span><span class='apss-share'><?php _e( 'Tweet', APSS_TEXT_DOMAIN ); ?></span>
100
  </div>
101
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
102
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
103
  <?php } ?>
104
  </a>
105
  </div>
109
  //counter available for google plus
110
  case 'google-plus':
111
  $link = 'https://plus.google.com/share?url='.$url;
112
+ $count = $this->get_count($key, $url);
113
  ?>
114
  <div class='apss-google-plus apss-single-icon'>
115
  <a rel='nofollow' title='<?php _e('Share on Google Plus', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
119
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
120
  </div>
121
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
122
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
123
  <?php } ?>
124
  </a>
125
  </div>
128
 
129
  //counter available for pinterest
130
  case 'pinterest':
131
+ $count = $this->get_count($key, $url);
132
  ?>
133
  <div class='apss-pinterest apss-single-icon'>
134
  <a rel='nofollow' title='<?php _e('Share on Pinterest', APSS_TEXT_DOMAIN ); ?>' href='javascript:pinIt();'>
138
  <span class='apss-share'><?php _e( 'Share', APSS_TEXT_DOMAIN ); ?></span>
139
  </div>
140
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
141
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
142
  <?php } ?>
143
  </a>
144
  </div>
148
  //couter available for linkedin
149
  case 'linkedin':
150
  $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
151
+ $count = $this->get_count($key, $url);
152
  ?>
153
  <div class='apss-linkedin apss-single-icon'>
154
  <a rel='nofollow' title='<?php _e('Share on LinkedIn', APSS_TEXT_DOMAIN ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
158
  </div>
159
 
160
  <?php if(isset($counter_enable_options) && $counter_enable_options=='1'){ ?>
161
+ <div class='count apss-count' data-url='<?php echo $url;?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url.'_'.$key;?>"><?php echo $count; ?></div>
162
  <?php } ?>
163
 
164
  </a>
readme.txt CHANGED
@@ -4,7 +4,7 @@ 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.2
7
- Stable tag: 2.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -131,6 +131,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
131
  6. Backend Miscellaneous Settings Section
132
 
133
  == Changelog ==
 
 
 
 
134
  = 2.0.9 =
135
  * changed the facebook count url for the facebook share count as pervious share count url is returning total of share and likes as shares count.
136
  * Demo url link change.
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.2
7
+ Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
131
  6. Backend Miscellaneous Settings Section
132
 
133
  == Changelog ==
134
+ = 3.0.0 =
135
+ * Addition of the options of meta box for posts and pages to enable and disable the social share for it's content.
136
+ * Removal of the loading text instead used the previous share counters.
137
+
138
  = 2.0.9 =
139
  * changed the facebook count url for the facebook share count as pervious share count url is returning total of share and likes as shares count.
140
  * Demo url link change.