Social Share WordPress Plugin – AccessPress Social Share - Version 1.1.5

Version Description

  • Added the share options to the attachement pages.
Download this release

Release Info

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

Code changes from version 1.1.4 to 1.1.5

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.1.4
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', '1.1.4' );
34
  }
35
 
36
  if(!defined('APSS_TEXT_DOMAIN')){
@@ -58,7 +58,6 @@ if( !class_exists( 'APSS_Class' ) ){
58
  add_action('init',array( $this,'session_init')); //start the session if not started yet.
59
  add_action('admin_enqueue_scripts', array($this, 'register_admin_assets')); //registers all the assets required for wp-admin
60
  add_filter( 'the_content', array($this, 'apss_the_content_filter' )); // add the filter function for display of social share icons in frontend
61
- //add_filter( 'the_excerpt', array($this, 'apss_the_content_filter' )); // add the filter function for display of social share icons in frontend
62
  add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); // registers all the assets required for the frontend
63
  add_action( 'admin_menu', array( $this, 'add_apss_menu' ) ); //register the plugin menu in backend
64
  add_action('admin_post_apss_save_options', array( $this, 'apss_save_options')); //save the options in the wordpress options table.
@@ -132,9 +131,9 @@ if( !class_exists( 'APSS_Class' ) ){
132
  $all = in_array('all', $options['share_options']);
133
  $is_lists_authorized = (is_search()) && $all ? true : false;
134
 
135
- $all = in_array('all', $options['share_options']);
136
- $is_lists_authorized = (is_search()) && $all ? true : false;
137
-
138
  $front_page = in_array('front_page', $options['share_options']);
139
  $is_front_page=(is_front_page()) && $front_page ? true : false;
140
 
@@ -158,7 +157,7 @@ if( !class_exists( 'APSS_Class' ) ){
158
  if( empty($options['share_options']) ){
159
  return $post_content;
160
 
161
- }else if( $is_lists_authorized || $is_singular || $is_tax || $is_front_page || $default_category || $default_archives ){
162
  if ( $options['share_positions'] == 'below_content' ) {
163
  return $post_content . "<div class='apss-social-share apss-theme-$icon_set_value clearfix' >" . $html_content . "</div>";
164
  }
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.1.5
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', '1.1.5' );
34
  }
35
 
36
  if(!defined('APSS_TEXT_DOMAIN')){
58
  add_action('init',array( $this,'session_init')); //start the session if not started yet.
59
  add_action('admin_enqueue_scripts', array($this, 'register_admin_assets')); //registers all the assets required for wp-admin
60
  add_filter( 'the_content', array($this, 'apss_the_content_filter' )); // add the filter function for display of social share icons in frontend
 
61
  add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); // registers all the assets required for the frontend
62
  add_action( 'admin_menu', array( $this, 'add_apss_menu' ) ); //register the plugin menu in backend
63
  add_action('admin_post_apss_save_options', array( $this, 'apss_save_options')); //save the options in the wordpress options table.
131
  $all = in_array('all', $options['share_options']);
132
  $is_lists_authorized = (is_search()) && $all ? true : false;
133
 
134
+ $is_attachement_check = in_array('attachment', $options['share_options']);
135
+ $is_attachement = (is_attachment() && $is_attachement_check ) ? true : false;
136
+
137
  $front_page = in_array('front_page', $options['share_options']);
138
  $is_front_page=(is_front_page()) && $front_page ? true : false;
139
 
157
  if( empty($options['share_options']) ){
158
  return $post_content;
159
 
160
+ }else if( $is_lists_authorized || $is_attachement || $is_singular || $is_tax || $is_front_page || $default_category || $default_archives ){
161
  if ( $options['share_positions'] == 'below_content' ) {
162
  return $post_content . "<div class='apss-social-share apss-theme-$icon_set_value clearfix' >" . $html_content . "</div>";
163
  }
inc/backend/main-page.php CHANGED
@@ -87,6 +87,8 @@ if(isset($_SESSION['apss_message'])){ ?>
87
  <p><input type="checkbox" id="apss_front_page" value="front_page" name="apss_share_settings[share_options][]" <?php if (in_array("front_page", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_front_page"><?php _e('Front Page', APSS_TEXT_DOMAIN ); ?></label></p>
88
  <p><input type="checkbox" id="apss_archives" value="archives" name="apss_share_settings[share_options][]" <?php if (in_array("archives", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_archives"><?php _e('Archives', APSS_TEXT_DOMAIN ); ?></label></p>
89
 
 
 
90
  <p><input type="checkbox" id="apss_categories" value="categories" name="apss_share_settings[share_options][]" <?php if (in_array("categories", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_categories"><?php _e('Categories', APSS_TEXT_DOMAIN ); ?></label></p>
91
  <p><input type="checkbox" id="apss_all" value="all" name="apss_share_settings[share_options][]" <?php if (in_array("all", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_all"><?php _e('Other (search results, etc)', APSS_TEXT_DOMAIN ); ?></label></p>
92
 
87
  <p><input type="checkbox" id="apss_front_page" value="front_page" name="apss_share_settings[share_options][]" <?php if (in_array("front_page", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_front_page"><?php _e('Front Page', APSS_TEXT_DOMAIN ); ?></label></p>
88
  <p><input type="checkbox" id="apss_archives" value="archives" name="apss_share_settings[share_options][]" <?php if (in_array("archives", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_archives"><?php _e('Archives', APSS_TEXT_DOMAIN ); ?></label></p>
89
 
90
+ <p><input type="checkbox" id="apss_attachement" value="attachment" name="apss_share_settings[share_options][]" <?php if (in_array("attachment", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_attachment"><?php _e('Attachment pages', APSS_TEXT_DOMAIN ); ?></label></p>
91
+
92
  <p><input type="checkbox" id="apss_categories" value="categories" name="apss_share_settings[share_options][]" <?php if (in_array("categories", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_categories"><?php _e('Categories', APSS_TEXT_DOMAIN ); ?></label></p>
93
  <p><input type="checkbox" id="apss_all" value="all" name="apss_share_settings[share_options][]" <?php if (in_array("all", $options['share_options'])) { echo "checked='checked'"; } ?> ><label for="apss_all"><?php _e('Other (search results, etc)', APSS_TEXT_DOMAIN ); ?></label></p>
94
 
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.1.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -131,6 +131,9 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
131
  6. Backend Miscellaneous Settings Section
132
 
133
  == Changelog ==
 
 
 
134
  = 1.1.4 =
135
  * Addition of the links to the banner images
136
  * Code optimization.
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.1
7
+ Stable tag: 1.1.5
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
+ = 1.1.5 =
135
+ * Added the share options to the attachement pages.
136
+
137
  = 1.1.4 =
138
  * Addition of the links to the banner images
139
  * Code optimization.