Social Share WordPress Plugin – AccessPress Social Share - Version 1.0.8

Version Description

  • Added the summary text to the share link for LinkedIn.
  • Done bug fixing for share url for shortcodes.
Download this release

Release Info

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

Code changes from version 1.0.7 to 1.0.8

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: 1.0.7
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:apss-share
@@ -31,7 +31,7 @@ if( !defined( 'APSS_LANG_DIR' ) ) {
31
  }
32
 
33
  if( !defined( 'APSS_VERSION' ) ) {
34
- define( 'APSS_VERSION', '1.0.7' );
35
  }
36
 
37
  if(!defined('APSS_TEXT_DOMAIN')){
@@ -67,7 +67,7 @@ if( !class_exists( 'APSS_Class' ) ){
67
  add_action('admin_post_apss_clear_cache',array($this,'apss_clear_cache'));//clear the cache of the social share counter.
68
  add_shortcode('apss-share', array($this, 'apss_shortcode')); //adds a shortcode
69
  add_action('wp_ajax_nopriv_frontend_counter', array($this, 'frontend_counter'));
70
- add_action('wp_ajax_frontend_counter', array($this, 'frontend_counter')); // action for ajax counter
71
  }
72
 
73
  //called when plugin is activated
@@ -137,8 +137,12 @@ if( !class_exists( 'APSS_Class' ) ){
137
  global $post;
138
  $post_content=$content;
139
  $title = get_the_title();
140
- $content = strip_tags(get_the_content());
141
- $excerpt = substr($content, 0, 50);
 
 
 
 
142
  $options = $this->apss_settings;
143
  ob_start();
144
  include('inc/frontend/content-filter.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: 1.0.8
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain:apss-share
31
  }
32
 
33
  if( !defined( 'APSS_VERSION' ) ) {
34
+ define( 'APSS_VERSION', '1.0.8' );
35
  }
36
 
37
  if(!defined('APSS_TEXT_DOMAIN')){
67
  add_action('admin_post_apss_clear_cache',array($this,'apss_clear_cache'));//clear the cache of the social share counter.
68
  add_shortcode('apss-share', array($this, 'apss_shortcode')); //adds a shortcode
69
  add_action('wp_ajax_nopriv_frontend_counter', array($this, 'frontend_counter'));
70
+ add_action('wp_ajax_frontend_counter', array($this, 'frontend_counter')); // action for ajax counter
71
  }
72
 
73
  //called when plugin is activated
137
  global $post;
138
  $post_content=$content;
139
  $title = get_the_title();
140
+ $content=strip_shortcodes( strip_tags( get_the_content() ) );
141
+ if(strlen($content) >= 100){
142
+ $excerpt= substr($content, 0, 100).'...';
143
+ }else{
144
+ $excerpt = $content;
145
+ }
146
  $options = $this->apss_settings;
147
  ob_start();
148
  include('inc/frontend/content-filter.php');
inc/frontend/content-filter.php CHANGED
@@ -92,7 +92,8 @@ foreach( $options['social_networks'] as $key=>$value ){
92
 
93
  //couter available for linkedin
94
  case 'linkedin':
95
- $link = "http://www.linkedin.com/shareArticle?mini=true&ro=true&trk=JuizSocialPostSharer&title=".$title."&url=".$url;
 
96
  ?>
97
  <div class='apss-linkedin apss-single-icon'>
98
  <a title='Share on LinkedIn' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
92
 
93
  //couter available for linkedin
94
  case 'linkedin':
95
+ $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
96
+
97
  ?>
98
  <div class='apss-linkedin apss-single-icon'>
99
  <a title='Share on LinkedIn' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
inc/frontend/shortcode.php CHANGED
@@ -6,7 +6,7 @@ $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= $this->curPageURL();
10
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period']*60*60 : 24 * 60 * 60 ;
11
 
12
  if( isset($attr['networks']) ){
@@ -25,8 +25,12 @@ if( isset($attr['networks']) ){
25
  <?php
26
 
27
  $title=get_the_title();
28
- $content=strip_tags(get_the_content());
29
- $excerpt= substr($content, 0, 50 );
 
 
 
 
30
 
31
  foreach( $options['social_networks'] as $key=>$value ){
32
  if( intval($value)=='1' ){
@@ -94,9 +98,6 @@ foreach( $options['social_networks'] as $key=>$value ){
94
 
95
  //counter available for pinterest
96
  case 'pinterest':
97
- // if(has_post_thumbnail()){
98
- // $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
99
- // $link = 'http://pinterest.com/pin/create/bookmarklet/?media='.$image[0].'&amp;url='.$url.'&amp;title='.$title.'&amp;description='.$excerpt;
100
  ?>
101
 
102
  <div class='apss-pinterest apss-single-icon'>
@@ -114,12 +115,11 @@ foreach( $options['social_networks'] as $key=>$value ){
114
  </a>
115
  </div>
116
  <?php
117
- //}
118
  break;
119
 
120
  //couter available for linkedin
121
  case 'linkedin':
122
- $link = "http://www.linkedin.com/shareArticle?mini=true&amp;ro=true&amp;trk=JuizSocialPostSharer&amp;title=".$title."&amp;url=".$url;
123
  ?>
124
  <div class='apss-linkedin apss-single-icon'>
125
  <a title='Share on LinkedIn' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
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(); //$this->curPageURL();
10
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period']*60*60 : 24 * 60 * 60 ;
11
 
12
  if( isset($attr['networks']) ){
25
  <?php
26
 
27
  $title=get_the_title();
28
+ $content=strip_shortcodes(strip_tags(get_the_content()));
29
+ if(strlen($content) >= 100){
30
+ $excerpt= substr($content, 0, 100).'...';
31
+ }else{
32
+ $excerpt = $content;
33
+ }
34
 
35
  foreach( $options['social_networks'] as $key=>$value ){
36
  if( intval($value)=='1' ){
98
 
99
  //counter available for pinterest
100
  case 'pinterest':
 
 
 
101
  ?>
102
 
103
  <div class='apss-pinterest apss-single-icon'>
115
  </a>
116
  </div>
117
  <?php
 
118
  break;
119
 
120
  //couter available for linkedin
121
  case 'linkedin':
122
+ $link = "http://www.linkedin.com/shareArticle?mini=true&amp;title=".$title."&amp;url=".$url."&amp;summary=".$excerpt;
123
  ?>
124
  <div class='apss-linkedin apss-single-icon'>
125
  <a title='Share on LinkedIn' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
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.1
7
- Stable tag: 1.0.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -119,6 +119,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
119
  6. Backend Miscellaneous Settings Section
120
 
121
  == Changelog ==
 
 
 
 
122
  = 1.0.7 =
123
  * Fixed some design issues for the icon sets.
124
 
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
+ Stable tag: 1.0.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
119
  6. Backend Miscellaneous Settings Section
120
 
121
  == Changelog ==
122
+ = 1.0.8 =
123
+ * Added the summary text to the share link for LinkedIn.
124
+ * Done bug fixing for share url for shortcodes.
125
+
126
  = 1.0.7 =
127
  * Fixed some design issues for the icon sets.
128