Version Description
- Addition of the apply_filter "apss_share_url" hook for the url modification if needed.
- Removal of the session_init function from the plugin. This solved the loopback error occuring on security check.
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Share WordPress Plugin – AccessPress Social Share |
Version | 4.3.6 |
Comparing to | |
See all releases |
Code changes from version 4.3.5 to 4.3.6
- accesspress-social-share.php +6 -13
- inc/backend/main-page.php +33 -10
- inc/backend/save-settings.php +6 -3
- readme.txt +5 -1
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.3.
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain: accesspress-social-share
|
@@ -57,7 +57,6 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
57 |
$this->apss_settings = get_option( APSS_SETTING_NAME ); //get the plugin variable contents from the options table.
|
58 |
register_activation_hook( __FILE__, array( $this, 'plugin_activation' ) ); //load the default setting for the plugin while activating
|
59 |
add_action( 'init', array( $this, 'plugin_text_domain' ) ); //load the plugin text domain
|
60 |
-
add_action( 'init', array( $this, 'session_init' ) ); //start the session if not started yet.
|
61 |
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers all the assets required for wp-admin
|
62 |
add_filter( 'the_content', array( $this, 'apss_the_content_filter' ), 110 ); // add the filter function for display of social share icons in frontend //added 12 priority level at the end to make the plugin compactible with Visual Composer.
|
63 |
|
@@ -120,13 +119,6 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
120 |
load_plugin_textdomain( 'accesspress-social-share', false, APSS_LANG_DIR );
|
121 |
}
|
122 |
|
123 |
-
//starts the session with the call of init hook
|
124 |
-
function session_init() {
|
125 |
-
if ( !session_id() && !headers_sent() ) {
|
126 |
-
session_start();
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
//functions to register frontend styles and scripts
|
131 |
function register_admin_assets() {
|
132 |
/**
|
@@ -245,8 +237,7 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
245 |
if ( !empty( $_GET ) && wp_verify_nonce( $nonce, 'apss-restore-default-settings-nonce' ) ) {
|
246 |
//restore the default plugin activation settings from the activation page.
|
247 |
include( 'inc/backend/activation.php' );
|
248 |
-
|
249 |
-
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share' );
|
250 |
exit;
|
251 |
} else {
|
252 |
die( 'No script kiddies please!' );
|
@@ -268,8 +259,7 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
268 |
foreach ( $transient_array as $transient ) {
|
269 |
delete_transient( $transient );
|
270 |
}
|
271 |
-
|
272 |
-
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share' );
|
273 |
}
|
274 |
}
|
275 |
|
@@ -704,6 +694,9 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
704 |
////////////////////////////////////for count ends here/////////////////////////////////////////////
|
705 |
|
706 |
function get_count( $profile_name, $url ) {
|
|
|
|
|
|
|
707 |
switch ( $profile_name ) {
|
708 |
case 'facebook':
|
709 |
$count = $this->new_get_fb( $url );
|
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.3.6
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain: accesspress-social-share
|
57 |
$this->apss_settings = get_option( APSS_SETTING_NAME ); //get the plugin variable contents from the options table.
|
58 |
register_activation_hook( __FILE__, array( $this, 'plugin_activation' ) ); //load the default setting for the plugin while activating
|
59 |
add_action( 'init', array( $this, 'plugin_text_domain' ) ); //load the plugin text domain
|
|
|
60 |
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers all the assets required for wp-admin
|
61 |
add_filter( 'the_content', array( $this, 'apss_the_content_filter' ), 110 ); // add the filter function for display of social share icons in frontend //added 12 priority level at the end to make the plugin compactible with Visual Composer.
|
62 |
|
119 |
load_plugin_textdomain( 'accesspress-social-share', false, APSS_LANG_DIR );
|
120 |
}
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
//functions to register frontend styles and scripts
|
123 |
function register_admin_assets() {
|
124 |
/**
|
237 |
if ( !empty( $_GET ) && wp_verify_nonce( $nonce, 'apss-restore-default-settings-nonce' ) ) {
|
238 |
//restore the default plugin activation settings from the activation page.
|
239 |
include( 'inc/backend/activation.php' );
|
240 |
+
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=3' );
|
|
|
241 |
exit;
|
242 |
} else {
|
243 |
die( 'No script kiddies please!' );
|
259 |
foreach ( $transient_array as $transient ) {
|
260 |
delete_transient( $transient );
|
261 |
}
|
262 |
+
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=4' );
|
|
|
263 |
}
|
264 |
}
|
265 |
|
694 |
////////////////////////////////////for count ends here/////////////////////////////////////////////
|
695 |
|
696 |
function get_count( $profile_name, $url ) {
|
697 |
+
|
698 |
+
$url = apply_filters('apss_share_url', $url);
|
699 |
+
|
700 |
switch ( $profile_name ) {
|
701 |
case 'facebook':
|
702 |
$count = $this->new_get_fb( $url );
|
inc/backend/main-page.php
CHANGED
@@ -25,16 +25,39 @@
|
|
25 |
<?php _e( 'AccessPress Social Share', 'accesspress-social-share' ); ?>
|
26 |
</div>
|
27 |
</div>
|
28 |
-
<?php
|
29 |
-
|
30 |
-
?>
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
<div class="apps-wrap">
|
40 |
<form method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
|
25 |
<?php _e( 'AccessPress Social Share', 'accesspress-social-share' ); ?>
|
26 |
</div>
|
27 |
</div>
|
28 |
+
<?php
|
29 |
+
$options = get_option( APSS_SETTING_NAME );
|
30 |
+
if(isset($_GET['message']) && $_GET['message'] == '1'){ ?>
|
31 |
+
<div class="apss-message notice notice-success is-dismissible">
|
32 |
+
<p><strong><?php _e( 'Settings Saved Successfully.', 'accesspress-social-share' ); ?></strong></p>
|
33 |
+
<button type="button" class="notice-dismiss">
|
34 |
+
<span class="screen-reader-text"><?php _e('Dismiss this notice.', 'accesspress-social-share'); ?></span>
|
35 |
+
</button>
|
36 |
+
</div>
|
37 |
+
<?php
|
38 |
+
}else if(isset($_GET['message']) && $_GET['message'] == '3'){?>
|
39 |
+
<div class="apss-message notice notice-success is-dismissible">
|
40 |
+
<p><strong><?php _e('Settings restored successfully.', 'accesspress-social-share'); ?></strong></p>
|
41 |
+
<button type="button" class="notice-dismiss">
|
42 |
+
<span class="screen-reader-text"><?php _e('Dismiss this notice.', 'accesspress-social-share'); ?></span>
|
43 |
+
</button>
|
44 |
+
</div>
|
45 |
+
<?php
|
46 |
+
}else if(isset($_GET['message']) && $_GET['message'] == '4'){ ?>
|
47 |
+
<div class="apss-message notice notice-success is-dismissible">
|
48 |
+
<p><strong><?php _e( 'Cache cleared Successfully', 'accesspress-social-share' ); ?></strong></p>
|
49 |
+
<button type="button" class="notice-dismiss">
|
50 |
+
<span class="screen-reader-text"><?php _e('Dismiss this notice.', 'accesspress-social-share'); ?></span>
|
51 |
+
</button>
|
52 |
+
</div>
|
53 |
+
<?php
|
54 |
+
}else if(isset($_GET['message']) && $_GET['message'] != '3' && $_GET['message'] != '1'){
|
55 |
+
?>
|
56 |
+
<div class="apss-message notice notice-error is-dismissible">
|
57 |
+
<p><?php _e('There has been an error.', 'accesspress-social-share'); ?></p>
|
58 |
+
</div>
|
59 |
+
<?php
|
60 |
+
} ?>
|
61 |
|
62 |
<div class="apps-wrap">
|
63 |
<form method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
|
inc/backend/save-settings.php
CHANGED
@@ -45,8 +45,11 @@ if ( !isset( $apss_share_settings['apss_social_counts_transients'] ) ) {
|
|
45 |
}
|
46 |
|
47 |
// The option already exists, so we just update it.
|
48 |
-
update_option( APSS_SETTING_NAME, $apss_share_settings );
|
49 |
-
$
|
50 |
-
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share' );
|
|
|
|
|
|
|
51 |
exit;
|
52 |
|
45 |
}
|
46 |
|
47 |
// The option already exists, so we just update it.
|
48 |
+
$status = update_option( APSS_SETTING_NAME, $apss_share_settings );
|
49 |
+
if($status == TRUE){
|
50 |
+
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=1' );
|
51 |
+
}else{
|
52 |
+
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=2' );
|
53 |
+
}
|
54 |
exit;
|
55 |
|
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.8
|
7 |
-
Stable tag: 4.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -146,6 +146,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
|
|
146 |
6. Backend Miscellaneous Settings Section
|
147 |
|
148 |
== Changelog ==
|
|
|
|
|
|
|
|
|
149 |
= 4.3.5 =
|
150 |
* Removal of the google plus count as the API got depriciated.
|
151 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 4.3.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
146 |
6. Backend Miscellaneous Settings Section
|
147 |
|
148 |
== Changelog ==
|
149 |
+
= 4.3.6 =
|
150 |
+
* Addition of the apply_filter "apss_share_url" hook for the url modification if needed.
|
151 |
+
* Removal of the session_init function from the plugin. This solved the loopback error occuring on security check.
|
152 |
+
|
153 |
= 4.3.5 =
|
154 |
* Removal of the google plus count as the API got depriciated.
|
155 |
|