Version Description
- Tweak: Explain better sharedcount and opensharecount integration
- Fix: Error array_merge is not an array
- Fix: MashShare social media meta box not shown if another plugin is using the same meta-box library
- Fix: Incompatibility with meta-box add-ons
- Fix: Whatsapp Button not visible on AMP pages
- Tweak: Change welcome message
Download this release
Release Info
Developer | ReneHermi |
Plugin | Social Media Share Buttons | MashShare |
Version | 3.5.5 |
Comparing to | |
See all releases |
Code changes from version 3.5.4 to 3.5.5
- includes/admin/meta-box/inc/meta-box.php +5 -5
- includes/admin/settings/register-settings.php +2 -2
- includes/admin/welcome.php +3 -2
- includes/sharedcount.class.php +1 -0
- includes/template-functions.php +3 -2
- mashshare.php +2 -2
- readme.txt +10 -2
includes/admin/meta-box/inc/meta-box.php
CHANGED
@@ -98,7 +98,7 @@ class MASHSB_RW_Meta_Box
|
|
98 |
if ( ! $this->is_edit_screen() )
|
99 |
return;
|
100 |
|
101 |
-
wp_enqueue_style( 'rwmb', MASHSB_RWMB_CSS_URL . 'style.css', array(), MASHSB_RWMB_VER );
|
102 |
if( is_rtl() )
|
103 |
wp_enqueue_style( 'mashsb-rwmb-rtl', MASHSB_RWMB_CSS_URL . 'style-rtl.css', array(), MASHSB_RWMB_VER );
|
104 |
|
@@ -213,8 +213,8 @@ class MASHSB_RW_Meta_Box
|
|
213 |
// Allow users to add custom code before meta box content
|
214 |
// 1st action applies to all meta boxes
|
215 |
// 2nd action applies to only current meta box
|
216 |
-
do_action( '
|
217 |
-
do_action( "
|
218 |
|
219 |
foreach ( $this->fields as $field )
|
220 |
{
|
@@ -261,8 +261,8 @@ class MASHSB_RW_Meta_Box
|
|
261 |
$post_id = $the_post;
|
262 |
|
263 |
// Before save action
|
264 |
-
do_action( '
|
265 |
-
do_action( "
|
266 |
|
267 |
foreach ( $this->fields as $field )
|
268 |
{
|
98 |
if ( ! $this->is_edit_screen() )
|
99 |
return;
|
100 |
|
101 |
+
wp_enqueue_style( 'mashsb-rwmb', MASHSB_RWMB_CSS_URL . 'style.css', array(), MASHSB_RWMB_VER );
|
102 |
if( is_rtl() )
|
103 |
wp_enqueue_style( 'mashsb-rwmb-rtl', MASHSB_RWMB_CSS_URL . 'style-rtl.css', array(), MASHSB_RWMB_VER );
|
104 |
|
213 |
// Allow users to add custom code before meta box content
|
214 |
// 1st action applies to all meta boxes
|
215 |
// 2nd action applies to only current meta box
|
216 |
+
do_action( 'mashsb_rwmb_before', $this );
|
217 |
+
do_action( "mashsb_rwmb_before_{$this->meta_box['id']}", $this );
|
218 |
|
219 |
foreach ( $this->fields as $field )
|
220 |
{
|
261 |
$post_id = $the_post;
|
262 |
|
263 |
// Before save action
|
264 |
+
do_action( 'mashsb_rwmb_before_save_post', $post_id );
|
265 |
+
do_action( "mashsb_rwmb_{$this->meta_box['id']}_before_save_post", $post_id );
|
266 |
|
267 |
foreach ( $this->fields as $field )
|
268 |
{
|
includes/admin/settings/register-settings.php
CHANGED
@@ -124,7 +124,7 @@ function mashsb_get_registered_settings() {
|
|
124 |
'mashsb_sharemethod' => array(
|
125 |
'id' => 'mashsb_sharemethod',
|
126 |
'name' => __( 'Share Count', 'mashsb' ),
|
127 |
-
'desc' => __( '<i>MashEngine</i> collects shares by direct request to social networks.<br><br><i>SharedCount.com</i> is a third party service free for up to 10.000 daily requests. For GDPR compliance you should select the sharedcount.com service
|
128 |
'type' => 'select',
|
129 |
'options' => array(
|
130 |
'mashengine' => 'MashEngine',
|
@@ -134,7 +134,7 @@ function mashsb_get_registered_settings() {
|
|
134 |
'mashsharer_apikey' => array(
|
135 |
'id' => 'mashsharer_apikey',
|
136 |
'name' => __( 'Sharedcount.com API Key', 'mashsb' ),
|
137 |
-
'desc' => __( 'Get it at <a href="https://admin.sharedcount.com/admin/signup.php?utm_campaign=settings&utm_medium=plugin&utm_source=mashshare" target="_blank">SharedCount.com</a> for 10.000 free daily requests.', 'mashsb' ),
|
138 |
'type' => 'text',
|
139 |
'size' => 'medium'
|
140 |
),
|
124 |
'mashsb_sharemethod' => array(
|
125 |
'id' => 'mashsb_sharemethod',
|
126 |
'name' => __( 'Share Count', 'mashsb' ),
|
127 |
+
'desc' => __( '- <i>MashEngine</i> collects shares by direct request to social networks.<br><br><i>SharedCount.com</i> is a third party service free for up to 10.000 daily requests. It collects shares for Facebook, Pinterest, Stumbleupon. (For GDPR compliance you should select the sharedcount.com service.)<br><br>Twitter count is aggreagated via <a href="https://opensharecount.com" target="_blank" rel="external nofollow">https://opensharecount.com</a>. You must sign up with your Twitter account for this free service to get the twitter share count. Visit the site http://opensharecount.com, fill in your website domain and click on <i>Sign up</i>. <br><br><strong>Note: You need <a href="https://mashshare.net/downloads/mashshare-social-networks-addon/" target="_blank">MashShare Social Network Add-On</a> for enabling Twitter count.</strong>', 'mashsb' ),
|
128 |
'type' => 'select',
|
129 |
'options' => array(
|
130 |
'mashengine' => 'MashEngine',
|
134 |
'mashsharer_apikey' => array(
|
135 |
'id' => 'mashsharer_apikey',
|
136 |
'name' => __( 'Sharedcount.com API Key', 'mashsb' ),
|
137 |
+
'desc' => __( 'This is needed to use the sharedcount.com Share Count method. Get it at <a href="https://admin.sharedcount.com/admin/signup.php?utm_campaign=settings&utm_medium=plugin&utm_source=mashshare" target="_blank">SharedCount.com</a> for 10.000 free daily requests.', 'mashsb' ),
|
138 |
'type' => 'text',
|
139 |
'size' => 'medium'
|
140 |
),
|
includes/admin/welcome.php
CHANGED
@@ -131,7 +131,8 @@ class MASHSB_Welcome {
|
|
131 |
$this->tabs();
|
132 |
?>
|
133 |
<?php if (isset($_GET['redirect'])) {?>
|
134 |
-
<p class="about-description mashsb-notice" style="background-color:#00abed;color:white;padding:20px;margin-top:20px;border:3px solid white;"><?php _e( '<strong>Facebook</strong> and <strong>Twitter Share Buttons</strong> have been enabled on all your posts! <br>Use the instructions below to customize MashShare.<br><br
|
|
|
135 |
<?php } ?>
|
136 |
<div class="changelog clear">
|
137 |
<h1><?php _e( 'Create Your First Social Sharing Button', 'mashsb' ); ?></h1>
|
@@ -225,7 +226,7 @@ class MASHSB_Welcome {
|
|
225 |
<!--<img class="mashsb-badge" src="<?php //echo . 'assets/images/mashsb-logo.svg'; ?>" alt="<?php //_e( 'MashShare', 'mashsb' ); ?>" / >//-->
|
226 |
<h1><?php printf( __( 'Welcome to MashShare %s', 'mashsb' ), $display_version ); ?></h1>
|
227 |
<h1 class="about-text">
|
228 |
-
<?php _e( 'Congrats for Choosing MashShare<br>MashShare
|
229 |
</h1>
|
230 |
</div>
|
231 |
<?php
|
131 |
$this->tabs();
|
132 |
?>
|
133 |
<?php if (isset($_GET['redirect'])) {?>
|
134 |
+
<p class="about-description mashsb-notice" style="background-color:#00abed;color:white;padding:20px;margin-top:20px;border:3px solid white;"><?php _e( '<strong>Facebook</strong> and <strong>Twitter Share Buttons</strong> have been enabled on all your posts! <br>Use the instructions below to customize MashShare.<br><br>:</strong>MashShare uses new sharedcount.com integration to be GDPR compliant.
|
135 |
+
Register for sharedcount.com at <a href="'.admin_url().'admin.php?page=mashsb-settings" style="color:white;">MashShare > Settings > Sharecount</a>', 'mashsb' ); ?></p>
|
136 |
<?php } ?>
|
137 |
<div class="changelog clear">
|
138 |
<h1><?php _e( 'Create Your First Social Sharing Button', 'mashsb' ); ?></h1>
|
226 |
<!--<img class="mashsb-badge" src="<?php //echo . 'assets/images/mashsb-logo.svg'; ?>" alt="<?php //_e( 'MashShare', 'mashsb' ); ?>" / >//-->
|
227 |
<h1><?php printf( __( 'Welcome to MashShare %s', 'mashsb' ), $display_version ); ?></h1>
|
228 |
<h1 class="about-text">
|
229 |
+
<?php _e( 'Congrats for Choosing MashShare<br>MashShare has been Activated And is Ready to Increase Your Social Media Traffic!', 'mashsb' ); ?>
|
230 |
</h1>
|
231 |
</div>
|
232 |
<?php
|
includes/sharedcount.class.php
CHANGED
@@ -143,6 +143,7 @@ class mashsbSharedcount {
|
|
143 |
}
|
144 |
|
145 |
try {
|
|
|
146 |
//$counts = $this->_curl( 'http://' . $domain . "/?url=" . $this->url . "&apikey=" . $this->apikey );
|
147 |
$counts = $this->_curl( 'https://api.sharedcount.com/v1.0/?url=' . $this->url . "&apikey=" . $this->apikey );
|
148 |
if( isset( $counts["Error"] ) && isset( $counts['Domain'] ) && $counts["Type"] === "domain_apikey_mismatch" ) {
|
143 |
}
|
144 |
|
145 |
try {
|
146 |
+
$counts = array();
|
147 |
//$counts = $this->_curl( 'http://' . $domain . "/?url=" . $this->url . "&apikey=" . $this->apikey );
|
148 |
$counts = $this->_curl( 'https://api.sharedcount.com/v1.0/?url=' . $this->url . "&apikey=" . $this->apikey );
|
149 |
if( isset( $counts["Error"] ) && isset( $counts['Domain'] ) && $counts["Type"] === "domain_apikey_mismatch" ) {
|
includes/template-functions.php
CHANGED
@@ -516,7 +516,8 @@ function mashsb_getNetworks( $is_shortcode = false, $services = 0 ) {
|
|
516 |
if( $startcounter == $maxcounter ) {
|
517 |
$onoffswitch = onOffSwitch(); // Start More Button
|
518 |
//$startsecondaryshares = '</div>'; // End Primary Buttons
|
519 |
-
$
|
|
|
520 |
} else {
|
521 |
$onoffswitch = '';
|
522 |
$onoffswitch2 = '';
|
@@ -536,7 +537,7 @@ function mashsb_getNetworks( $is_shortcode = false, $services = 0 ) {
|
|
536 |
$name = ucfirst( $enablednetworks[$key]['id'] ); // Use the id as share label. Capitalize it!
|
537 |
}
|
538 |
|
539 |
-
$enablednetworks[$key]['id'] == 'whatsapp' ? $display = 'style="display:none;"' : $display = ''; // Whatsapp button is made visible via js when opened on mobile devices
|
540 |
|
541 |
// Lets use the data attribute to prevent that pininit.js is overwriting our pinterest button - PR: https://secure.helpscout.net/conversation/257066283/954/?folderId=924740
|
542 |
if ('pinterest' === $enablednetworks[$key]['id'] && !mashsb_is_amp_page() ) {
|
516 |
if( $startcounter == $maxcounter ) {
|
517 |
$onoffswitch = onOffSwitch(); // Start More Button
|
518 |
//$startsecondaryshares = '</div>'; // End Primary Buttons
|
519 |
+
$visibility = mashsb_is_amp_page() ? '' : 'display:none;';
|
520 |
+
$startsecondaryshares .= '<div class="secondary-shares" style="'.$visibility.'">'; // Start secondary-shares
|
521 |
} else {
|
522 |
$onoffswitch = '';
|
523 |
$onoffswitch2 = '';
|
537 |
$name = ucfirst( $enablednetworks[$key]['id'] ); // Use the id as share label. Capitalize it!
|
538 |
}
|
539 |
|
540 |
+
$enablednetworks[$key]['id'] == 'whatsapp' && !mashsb_is_amp_page() ? $display = 'style="display:none;"' : $display = ''; // Whatsapp button is made visible via js when opened on mobile devices
|
541 |
|
542 |
// Lets use the data attribute to prevent that pininit.js is overwriting our pinterest button - PR: https://secure.helpscout.net/conversation/257066283/954/?folderId=924740
|
543 |
if ('pinterest' === $enablednetworks[$key]['id'] && !mashsb_is_amp_page() ) {
|
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.5.
|
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.5.
|
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.5.5
|
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.5.5' );
|
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, dsgvo
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.9
|
12 |
-
Stable tag: 3.5.
|
13 |
Requires PHP: 5.2
|
14 |
|
15 |
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
|
@@ -250,6 +250,14 @@ Read here more about this: http://docs.mashshare.net/article/10-facebook-is-show
|
|
250 |
|
251 |
== Changelog ==
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
= 3.5.4 =
|
254 |
* New: Support for Yoast custom variables e.g. %%title%%
|
255 |
* New: Add sharedcount.com 10.000 free daily api requests
|
@@ -337,7 +345,7 @@ https://www.mashshare.net/changelog/
|
|
337 |
|
338 |
== Upgrade Notice ==
|
339 |
|
340 |
-
= 3.5.
|
341 |
* New: Support for Yoast custom variables e.g. %%title%%
|
342 |
* New: Add sharedcount.com 10.000 free daily api requests
|
343 |
* New: Switch from newsharecount to opensharecount.com to collect twitter shares
|
9 |
Tags: Share buttons, Social Sharing, social media, Facebook, Twitter, Subscribe, Traffic posts, pages, widget, social share buttons, analytics, email, dsgvo
|
10 |
Requires at least: 3.6+
|
11 |
Tested up to: 4.9
|
12 |
+
Stable tag: 3.5.5
|
13 |
Requires PHP: 5.2
|
14 |
|
15 |
Social Media Share Buttons for Twitter, Facebook and other social networks. Highly customizable Social Media ecosystem
|
250 |
|
251 |
== Changelog ==
|
252 |
|
253 |
+
= 3.5.5 =
|
254 |
+
* Tweak: Explain better sharedcount and opensharecount integration
|
255 |
+
* Fix: Error array_merge is not an array
|
256 |
+
* Fix: MashShare social media meta box not shown if another plugin is using the same meta-box library
|
257 |
+
* Fix: Incompatibility with meta-box add-ons
|
258 |
+
* Fix: Whatsapp Button not visible on AMP pages
|
259 |
+
* Tweak: Change welcome message
|
260 |
+
|
261 |
= 3.5.4 =
|
262 |
* New: Support for Yoast custom variables e.g. %%title%%
|
263 |
* New: Add sharedcount.com 10.000 free daily api requests
|
345 |
|
346 |
== Upgrade Notice ==
|
347 |
|
348 |
+
= 3.5.5 =
|
349 |
* New: Support for Yoast custom variables e.g. %%title%%
|
350 |
* New: Add sharedcount.com 10.000 free daily api requests
|
351 |
* New: Switch from newsharecount to opensharecount.com to collect twitter shares
|