Version Description
- Fix: Custom CSS field not working since 3.3.5
Download this release
Release Info
Developer | ReneHermi |
Plugin | Social Media Share Buttons | MashShare |
Version | 3.3.6 |
Comparing to | |
See all releases |
Code changes from version 3.3.5 to 3.3.6
- README.md +5 -5
- includes/admin/settings/register-settings.php +17 -16
- includes/template-functions.php +8 -3
- mashshare.php +2 -2
- readme.txt +5 -1
README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# [
|
2 |
|
3 |
|
4 |
![Plugin Version](https://img.shields.io/wordpress/plugin/v/mashsharer.svg?maxAge=2592000)
|
@@ -18,8 +18,8 @@ More information can be found at [mashshare.net](https://www.mashshare.net/).
|
|
18 |
|
19 |
## Note ##
|
20 |
|
21 |
-
This is the latest developer version of
|
22 |
-
if you just want to use
|
23 |
|
24 |
## Installation ##
|
25 |
|
@@ -34,11 +34,11 @@ This will download the latest developer copy of Mashshare.
|
|
34 |
If you find an issue, let us know [here](https://github.com/mashshare/Mashshare/issues?state=open)!
|
35 |
|
36 |
## Support ##
|
37 |
-
This is a developer's portal for
|
38 |
Please visit the [support forums](https://www.mashshare.net/support).
|
39 |
|
40 |
## Contributions ##
|
41 |
-
Anyone is welcome to contribute to
|
42 |
|
43 |
There are various ways you can contribute:
|
44 |
|
1 |
+
# [MashShare](https://www.mashshare.net)
|
2 |
|
3 |
|
4 |
![Plugin Version](https://img.shields.io/wordpress/plugin/v/mashsharer.svg?maxAge=2592000)
|
18 |
|
19 |
## Note ##
|
20 |
|
21 |
+
This is the latest developer version of MashShare.
|
22 |
+
if you just want to use MashShare install the productive version which you get at [wordpress.org](http://wordpress.org/plugins/mashsharer/)
|
23 |
|
24 |
## Installation ##
|
25 |
|
34 |
If you find an issue, let us know [here](https://github.com/mashshare/Mashshare/issues?state=open)!
|
35 |
|
36 |
## Support ##
|
37 |
+
This is a developer's portal for MashShare and should _not_ be used for support.
|
38 |
Please visit the [support forums](https://www.mashshare.net/support).
|
39 |
|
40 |
## Contributions ##
|
41 |
+
Anyone is welcome to contribute to MashShare. Please read the [guidelines for contributing](https://github.com/mashshare/Mashshare/blob/master/CONTRIBUTING.md) to this repository.
|
42 |
|
43 |
There are various ways you can contribute:
|
44 |
|
includes/admin/settings/register-settings.php
CHANGED
@@ -555,10 +555,10 @@ So the MashShare open graph data will be containing the same social meta data th
|
|
555 |
'type' => 'add_content',
|
556 |
'options' => array(
|
557 |
'box1' => array(
|
558 |
-
'id' => '
|
559 |
'name' => __( 'General CSS', 'mashsb' ),
|
560 |
'desc' => __( 'This css is loaded on all pages where the Mashshare buttons are enabled and it\'s loaded as an additonal inline css on your site', 'mashsb' ),
|
561 |
-
'type' => '
|
562 |
'textarea_rows' => '3',
|
563 |
'size' => 15
|
564 |
),
|
@@ -1053,22 +1053,23 @@ function mashsb_textarea_callback( $args ) {
|
|
1053 |
* @since 1.0
|
1054 |
* @param array $args Arguments passed by the setting
|
1055 |
* @global $mashsb_options Array of all the MASHSB Options
|
|
|
1056 |
* @return void
|
1057 |
*/
|
1058 |
-
function
|
1059 |
-
global $mashsb_options;
|
1060 |
-
|
1061 |
-
if( isset( $mashsb_options[$args['id']] ) )
|
1062 |
-
$value = $mashsb_options[$args['id']];
|
1063 |
-
else
|
1064 |
-
$value = isset( $args['std'] ) ? $args['std'] : '';
|
1065 |
-
|
1066 |
-
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : '40';
|
1067 |
-
$html = '<textarea class="large-text mashsb-textarea" cols="50" rows="' . $size . '" id="mashsb_settings[' . $args['id'] . ']" name="mashsb_settings[' . $args['id'] . ']">' . esc_textarea( $value ) . '</textarea>';
|
1068 |
-
$html .= '<label class="mashsb_hidden" for="mashsb_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
1069 |
-
|
1070 |
-
echo $html;
|
1071 |
-
}
|
1072 |
|
1073 |
/**
|
1074 |
* Password Callback
|
555 |
'type' => 'add_content',
|
556 |
'options' => array(
|
557 |
'box1' => array(
|
558 |
+
'id' => 'custom_css',
|
559 |
'name' => __( 'General CSS', 'mashsb' ),
|
560 |
'desc' => __( 'This css is loaded on all pages where the Mashshare buttons are enabled and it\'s loaded as an additonal inline css on your site', 'mashsb' ),
|
561 |
+
'type' => 'textarea',
|
562 |
'textarea_rows' => '3',
|
563 |
'size' => 15
|
564 |
),
|
1053 |
* @since 1.0
|
1054 |
* @param array $args Arguments passed by the setting
|
1055 |
* @global $mashsb_options Array of all the MASHSB Options
|
1056 |
+
* @deprecated 3.3.6
|
1057 |
* @return void
|
1058 |
*/
|
1059 |
+
//function mashsb_customcss_callback( $args ) {
|
1060 |
+
// global $mashsb_options;
|
1061 |
+
//
|
1062 |
+
// if( isset( $mashsb_options[$args['id']] ) )
|
1063 |
+
// $value = $mashsb_options[$args['id']];
|
1064 |
+
// else
|
1065 |
+
// $value = isset( $args['std'] ) ? $args['std'] : '';
|
1066 |
+
//
|
1067 |
+
// $size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : '40';
|
1068 |
+
// $html = '<textarea class="large-text mashsb-textarea" cols="50" rows="' . $size . '" id="mashsb_settings[' . $args['id'] . ']" name="mashsb_settings[' . $args['id'] . ']">' . esc_textarea( $value ) . '</textarea>';
|
1069 |
+
// $html .= '<label class="mashsb_hidden" for="mashsb_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
1070 |
+
//
|
1071 |
+
// echo $html;
|
1072 |
+
//}
|
1073 |
|
1074 |
/**
|
1075 |
* Password Callback
|
includes/template-functions.php
CHANGED
@@ -56,6 +56,7 @@ function mashsbGetShareObj( $url ) {
|
|
56 |
}
|
57 |
|
58 |
//mashdebug()->info( 'mashsbGetShareObj() url: ' . $url );
|
|
|
59 |
$mashsbSharesObj = new mashengine( $url );
|
60 |
return $mashsbSharesObj;
|
61 |
|
@@ -144,7 +145,7 @@ function mashsbGetNonPostShares( $url ) {
|
|
144 |
function getSharedcount( $url ) {
|
145 |
global $mashsb_options, $post, $mashsb_sharecount, $mashsb_error; // todo test a global share count var if it reduces the amount of requests
|
146 |
|
147 |
-
$mashsb_error[] = 'MashShare: Trying to get share count';
|
148 |
|
149 |
// Return global share count variable to prevent multiple execution
|
150 |
if (is_array($mashsb_sharecount) && array_key_exists($url, $mashsb_sharecount) && !empty($mashsb_sharecount[$url]) && !mashsb_is_cache_refresh() ){
|
@@ -201,8 +202,8 @@ function getSharedcount( $url ) {
|
|
201 |
// Write timestamp (Use this on top of this condition. If this is not on top following return statements will be skipped and ignored - possible bug?)
|
202 |
update_post_meta( $post->ID, 'mashsb_timestamp', time() );
|
203 |
|
204 |
-
MASHSB()->logger->info( 'Refresh Cache: Update Timestamp: ' . time() );
|
205 |
-
|
206 |
// Get the share Object
|
207 |
$mashsbSharesObj = mashsbGetShareObj( $url );
|
208 |
// Get the share count Method
|
@@ -212,6 +213,9 @@ function getSharedcount( $url ) {
|
|
212 |
|
213 |
// Create global sharecount
|
214 |
$mashsb_sharecount = array($url => $mashsbShareCounts->total);
|
|
|
|
|
|
|
215 |
/*
|
216 |
* Update post_meta only when API is requested and
|
217 |
* API share count is greater than real fresh requested share count ->
|
@@ -232,6 +236,7 @@ function getSharedcount( $url ) {
|
|
232 |
// Return cached results
|
233 |
$cachedCountsMeta = get_post_meta( $post->ID, 'mashsb_shares', true );
|
234 |
$cachedCounts = $cachedCountsMeta + getFakecount();
|
|
|
235 |
MASHSB()->logger->info( 'Cached Results: ' . $cachedCounts . ' url:' . $url );
|
236 |
return apply_filters( 'filter_get_sharedcount', $cachedCounts );
|
237 |
}
|
56 |
}
|
57 |
|
58 |
//mashdebug()->info( 'mashsbGetShareObj() url: ' . $url );
|
59 |
+
MASHSB()->logger->info( 'mashsbGetShareObj() url: ' . $url );
|
60 |
$mashsbSharesObj = new mashengine( $url );
|
61 |
return $mashsbSharesObj;
|
62 |
|
145 |
function getSharedcount( $url ) {
|
146 |
global $mashsb_options, $post, $mashsb_sharecount, $mashsb_error; // todo test a global share count var if it reduces the amount of requests
|
147 |
|
148 |
+
$mashsb_error[] = 'MashShare: Trying to get share count!';
|
149 |
|
150 |
// Return global share count variable to prevent multiple execution
|
151 |
if (is_array($mashsb_sharecount) && array_key_exists($url, $mashsb_sharecount) && !empty($mashsb_sharecount[$url]) && !mashsb_is_cache_refresh() ){
|
202 |
// Write timestamp (Use this on top of this condition. If this is not on top following return statements will be skipped and ignored - possible bug?)
|
203 |
update_post_meta( $post->ID, 'mashsb_timestamp', time() );
|
204 |
|
205 |
+
MASHSB()->logger->info( 'Code:4 Refresh Cache: Update Timestamp: ' . time() );
|
206 |
+
$mashsb_error[] = 'Code:4 Refresh Cache: Update Timestamp: ' . time();
|
207 |
// Get the share Object
|
208 |
$mashsbSharesObj = mashsbGetShareObj( $url );
|
209 |
// Get the share count Method
|
213 |
|
214 |
// Create global sharecount
|
215 |
$mashsb_sharecount = array($url => $mashsbShareCounts->total);
|
216 |
+
|
217 |
+
$mashsb_error[] = 'Code: 5 Get Share count for URL: ' . $url . ' Shares: ' . $mashsbShareCounts->total;
|
218 |
+
MASHSB()->logger->info( 'Code: 5 Get Share count for URL: ' . $url . ' Shares: ' . $mashsbShareCounts->total );
|
219 |
/*
|
220 |
* Update post_meta only when API is requested and
|
221 |
* API share count is greater than real fresh requested share count ->
|
236 |
// Return cached results
|
237 |
$cachedCountsMeta = get_post_meta( $post->ID, 'mashsb_shares', true );
|
238 |
$cachedCounts = $cachedCountsMeta + getFakecount();
|
239 |
+
$mashsb_error[] = 'Cached Results: ' . $cachedCounts . ' url:' . $url;
|
240 |
MASHSB()->logger->info( 'Cached Results: ' . $cachedCounts . ' url:' . $url );
|
241 |
return apply_filters( 'filter_get_sharedcount', $cachedCounts );
|
242 |
}
|
mashshare.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
|
7 |
* Author: René Hermenau
|
8 |
* Author URI: https://www.mashshare.net
|
9 |
-
* Version: 3.3.
|
10 |
* Text Domain: mashsb
|
11 |
* Domain Path: /languages
|
12 |
* Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
|
@@ -37,7 +37,7 @@ if( !defined( 'ABSPATH' ) )
|
|
37 |
|
38 |
// Plugin version
|
39 |
if( !defined( 'MASHSB_VERSION' ) ) {
|
40 |
-
define( 'MASHSB_VERSION', '3.3.
|
41 |
}
|
42 |
|
43 |
// Debug mode
|
6 |
* Description: Mashshare is a Share functionality inspired by the the great website Mashable for Facebook and Twitter. More networks available.
|
7 |
* Author: René Hermenau
|
8 |
* Author URI: https://www.mashshare.net
|
9 |
+
* Version: 3.3.6
|
10 |
* Text Domain: mashsb
|
11 |
* Domain Path: /languages
|
12 |
* Credits: Thanks go to Pippin Williamson and the edd team. When we started with Mashshare we decided to use the EDD code base and
|
37 |
|
38 |
// Plugin version
|
39 |
if( !defined( 'MASHSB_VERSION' ) ) {
|
40 |
+
define( 'MASHSB_VERSION', '3.3.6' );
|
41 |
}
|
42 |
|
43 |
// Debug mode
|
readme.txt
CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
9 |
Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.7
|
12 |
-
Stable tag: 3.3.
|
13 |
|
14 |
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
|
15 |
|
@@ -316,6 +316,10 @@ Read here more FAQ: [https://www.mashshare.net/faq/](https://www.mashshare.net/f
|
|
316 |
|
317 |
== Changelog ==
|
318 |
|
|
|
|
|
|
|
|
|
319 |
= 3.3.5 =
|
320 |
|
321 |
* New: Add new Facebook Access Token to bypass the rate limit issue
|
9 |
Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.7
|
12 |
+
Stable tag: 3.3.6
|
13 |
|
14 |
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
|
15 |
|
316 |
|
317 |
== Changelog ==
|
318 |
|
319 |
+
= 3.3.6 =
|
320 |
+
* Fix: Custom CSS field not working since 3.3.5
|
321 |
+
|
322 |
+
|
323 |
= 3.3.5 =
|
324 |
|
325 |
* New: Add new Facebook Access Token to bypass the rate limit issue
|