Version Description
- New: Add new filter mashsb_allowed_post_types for allowing or disabling share counts on particular posts types to lower the api requests to sharedcount.com
- Tweak: sharedcount.com lowered their free api limit to 500 daily requests. Change description in MashShare!
Download this release
Release Info
Developer | ReneHermi |
Plugin | Social Media Share Buttons | MashShare |
Version | 3.6.8 |
Comparing to | |
See all releases |
Code changes from version 3.6.7 to 3.6.8
- includes/admin/settings/register-settings.php +3 -3
- includes/template-functions.php +29 -2
- languages/mashsb-ar_AR.po +1 -1
- languages/mashsb-en_EN.po +1 -1
- languages/mashsb-en_US.po +2 -2
- languages/mashsb-es_ES.po +1 -1
- languages/mashsb-id_ID.po +1 -1
- languages/mashsb-it_IT.po +1 -1
- languages/mashsb-nl_NL.po +2 -2
- languages/mashsb-pt_BR.po +1 -1
- languages/mashsb.po +1 -1
- languages/mashsb_tr_TR.po +1 -1
- mashshare.php +2 -2
- readme.txt +6 -2
includes/admin/settings/register-settings.php
CHANGED
@@ -124,8 +124,8 @@ 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
|
128 |
-
'desc' => __( '- <i>SharedCount.com</i> is a third party service free for up to
|
129 |
'type' => 'select',
|
130 |
'options' => array(
|
131 |
//'mashengine' => 'MashEngine',
|
@@ -135,7 +135,7 @@ function mashsb_get_registered_settings() {
|
|
135 |
'mashsharer_apikey' => array(
|
136 |
'id' => 'mashsharer_apikey',
|
137 |
'name' => __( 'Sharedcount.com API Key', 'mashsb' ),
|
138 |
-
'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
|
139 |
'type' => 'text',
|
140 |
'size' => 'medium'
|
141 |
),
|
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 500 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://twitcount.com" target="_blank" rel="external nofollow">https://twitcount.com</a>. You must sign up with your Twitter account for this free service to get the twitter share count. Visit the site http://twitcount.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 |
+
'desc' => __( '- <i>SharedCount.com</i> is a third party service free for up to 500 daily requests. It collects shares for Facebook.<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 https://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' ),
|
129 |
'type' => 'select',
|
130 |
'options' => array(
|
131 |
//'mashengine' => 'MashEngine',
|
135 |
'mashsharer_apikey' => array(
|
136 |
'id' => 'mashsharer_apikey',
|
137 |
'name' => __( 'Sharedcount.com API Key', 'mashsb' ),
|
138 |
+
'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 500 free daily requests.', 'mashsb' ),
|
139 |
'type' => 'text',
|
140 |
'size' => 'medium'
|
141 |
),
|
includes/template-functions.php
CHANGED
@@ -159,6 +159,27 @@ function mashsbGetShareCountFromTransient($url){
|
|
159 |
}
|
160 |
}
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
|
163 |
/*
|
164 |
* Return the share count
|
@@ -167,9 +188,10 @@ function mashsbGetShareCountFromTransient($url){
|
|
167 |
* @returns int
|
168 |
*/
|
169 |
|
|
|
170 |
function getSharedcount( $url ) {
|
171 |
global $mashsb_options, $post, $mashsb_sharecount, $mashsb_debug; // todo test a global share count var if it reduces the amount of requests
|
172 |
-
|
173 |
/*
|
174 |
* Deactivate share count on:
|
175 |
* - 404 pages
|
@@ -730,9 +752,14 @@ function mashshareShow() {
|
|
730 |
*/
|
731 |
function mashsb_render_sharecounts( $customurl = '', $align = 'left', $size = false ) {
|
732 |
global $mashsb_options;
|
|
|
|
|
|
|
|
|
|
|
733 |
|
734 |
if( isset( $mashsb_options['disable_sharecount'] ) || !mashsb_curl_installed() || !mashsb_is_enabled_permalinks() ) {
|
735 |
-
return;
|
736 |
}
|
737 |
|
738 |
$url = empty( $customurl ) ? mashsb_get_url() : $customurl;
|
159 |
}
|
160 |
}
|
161 |
|
162 |
+
/**
|
163 |
+
* Allow or disable share counts for particular posts types to lower the api requests to sharedcount.com
|
164 |
+
* @return boolean
|
165 |
+
*/
|
166 |
+
function mashsbIsPostTypeAllowed(){
|
167 |
+
$postType = get_post_type();
|
168 |
+
|
169 |
+
$allowedPostTypes = apply_filters('mashsb_allowed_post_types', array() );
|
170 |
+
|
171 |
+
// If $allowedPostTypes is not defined all post types are allowed
|
172 |
+
if(empty($allowedPostTypes) ){
|
173 |
+
return true;
|
174 |
+
}
|
175 |
+
|
176 |
+
// If filter is used check if current post type is in array of allowed ones
|
177 |
+
if (in_array($postType, $allowedPostTypes)){
|
178 |
+
return true;
|
179 |
+
}
|
180 |
+
return false;
|
181 |
+
}
|
182 |
+
|
183 |
|
184 |
/*
|
185 |
* Return the share count
|
188 |
* @returns int
|
189 |
*/
|
190 |
|
191 |
+
|
192 |
function getSharedcount( $url ) {
|
193 |
global $mashsb_options, $post, $mashsb_sharecount, $mashsb_debug; // todo test a global share count var if it reduces the amount of requests
|
194 |
+
|
195 |
/*
|
196 |
* Deactivate share count on:
|
197 |
* - 404 pages
|
752 |
*/
|
753 |
function mashsb_render_sharecounts( $customurl = '', $align = 'left', $size = false ) {
|
754 |
global $mashsb_options;
|
755 |
+
|
756 |
+
// Share count disabled
|
757 |
+
if (false === mashsbIsPostTypeAllowed()){
|
758 |
+
return '';
|
759 |
+
}
|
760 |
|
761 |
if( isset( $mashsb_options['disable_sharecount'] ) || !mashsb_curl_installed() || !mashsb_is_enabled_permalinks() ) {
|
762 |
+
return '';
|
763 |
}
|
764 |
|
765 |
$url = empty( $customurl ) ? mashsb_get_url() : $customurl;
|
languages/mashsb-ar_AR.po
CHANGED
@@ -551,7 +551,7 @@ msgstr ""
|
|
551 |
#: includes/admin/settings/register-settings.php:137
|
552 |
msgid ""
|
553 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
554 |
-
"\">SharedCount.com</a> for
|
555 |
msgstr ""
|
556 |
|
557 |
#: includes/admin/settings/register-settings.php:143
|
551 |
#: includes/admin/settings/register-settings.php:137
|
552 |
msgid ""
|
553 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
554 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
555 |
msgstr ""
|
556 |
|
557 |
#: includes/admin/settings/register-settings.php:143
|
languages/mashsb-en_EN.po
CHANGED
@@ -135,7 +135,7 @@ msgstr ""
|
|
135 |
#: includes/admin/settings/register-settings.php:138
|
136 |
msgid ""
|
137 |
"Get it FREE at <a href=\"https://admin.sharedcount.com/admin/signup.php\" "
|
138 |
-
"target=\"_blank\">SharedCount.com</a> for
|
139 |
"essential for accurate function of this plugin. Make sure Curl is working on "
|
140 |
"your server."
|
141 |
msgstr ""
|
135 |
#: includes/admin/settings/register-settings.php:138
|
136 |
msgid ""
|
137 |
"Get it FREE at <a href=\"https://admin.sharedcount.com/admin/signup.php\" "
|
138 |
+
"target=\"_blank\">SharedCount.com</a> for 500 free daily requests. It´s "
|
139 |
"essential for accurate function of this plugin. Make sure Curl is working on "
|
140 |
"your server."
|
141 |
msgstr ""
|
languages/mashsb-en_US.po
CHANGED
@@ -175,7 +175,7 @@ msgid ""
|
|
175 |
"<i>MashEngine</i> collects shares by calling social networks directly from "
|
176 |
"your server. All shares are cached and stored in your database. <p> If you "
|
177 |
"notice performance issues choose the classical <i>Sharedcount.com</i>. This "
|
178 |
-
"needs an API key and is limited to
|
179 |
"little bit faster on requesting. After caching there is no performance "
|
180 |
"benefit compared to MashEngine! Only mashEngine is able to collect twitter "
|
181 |
"tweets.<p> <strong>MashEngine collects: </strong> Facebook, Twitter, "
|
@@ -195,7 +195,7 @@ msgstr ""
|
|
195 |
#: includes/admin/settings/register-settings.php:149
|
196 |
msgid ""
|
197 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
198 |
-
"\">SharedCount.com</a> for
|
199 |
msgstr ""
|
200 |
|
201 |
#: includes/admin/settings/register-settings.php:155
|
175 |
"<i>MashEngine</i> collects shares by calling social networks directly from "
|
176 |
"your server. All shares are cached and stored in your database. <p> If you "
|
177 |
"notice performance issues choose the classical <i>Sharedcount.com</i>. This "
|
178 |
+
"needs an API key and is limited to 500 free requests daily but it is a "
|
179 |
"little bit faster on requesting. After caching there is no performance "
|
180 |
"benefit compared to MashEngine! Only mashEngine is able to collect twitter "
|
181 |
"tweets.<p> <strong>MashEngine collects: </strong> Facebook, Twitter, "
|
195 |
#: includes/admin/settings/register-settings.php:149
|
196 |
msgid ""
|
197 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
198 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
199 |
msgstr ""
|
200 |
|
201 |
#: includes/admin/settings/register-settings.php:155
|
languages/mashsb-es_ES.po
CHANGED
@@ -549,7 +549,7 @@ msgstr ""
|
|
549 |
#: includes/admin/settings/register-settings.php:137
|
550 |
msgid ""
|
551 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
552 |
-
"\">SharedCount.com</a> for
|
553 |
msgstr ""
|
554 |
|
555 |
#: includes/admin/settings/register-settings.php:143
|
549 |
#: includes/admin/settings/register-settings.php:137
|
550 |
msgid ""
|
551 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
552 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
553 |
msgstr ""
|
554 |
|
555 |
#: includes/admin/settings/register-settings.php:143
|
languages/mashsb-id_ID.po
CHANGED
@@ -552,7 +552,7 @@ msgstr ""
|
|
552 |
#: includes/admin/settings/register-settings.php:137
|
553 |
msgid ""
|
554 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
555 |
-
"\">SharedCount.com</a> for
|
556 |
msgstr ""
|
557 |
|
558 |
#: includes/admin/settings/register-settings.php:143
|
552 |
#: includes/admin/settings/register-settings.php:137
|
553 |
msgid ""
|
554 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
555 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
556 |
msgstr ""
|
557 |
|
558 |
#: includes/admin/settings/register-settings.php:143
|
languages/mashsb-it_IT.po
CHANGED
@@ -548,7 +548,7 @@ msgstr ""
|
|
548 |
#: includes/admin/settings/register-settings.php:137
|
549 |
msgid ""
|
550 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
551 |
-
"\">SharedCount.com</a> for
|
552 |
msgstr ""
|
553 |
|
554 |
#: includes/admin/settings/register-settings.php:143
|
548 |
#: includes/admin/settings/register-settings.php:137
|
549 |
msgid ""
|
550 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
551 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
552 |
msgstr ""
|
553 |
|
554 |
#: includes/admin/settings/register-settings.php:143
|
languages/mashsb-nl_NL.po
CHANGED
@@ -565,10 +565,10 @@ msgstr "Sharedcount.com API-sleutel"
|
|
565 |
#: includes/admin/settings/register-settings.php:137
|
566 |
msgid ""
|
567 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
568 |
-
"\">SharedCount.com</a> for
|
569 |
msgstr ""
|
570 |
"Verkrijg deze op <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
571 |
-
"\">SharedCount.com</a> voor
|
572 |
|
573 |
#: includes/admin/settings/register-settings.php:143
|
574 |
msgid "Sharedcount.com endpint"
|
565 |
#: includes/admin/settings/register-settings.php:137
|
566 |
msgid ""
|
567 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
568 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
569 |
msgstr ""
|
570 |
"Verkrijg deze op <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
571 |
+
"\">SharedCount.com</a> voor 500 gratis dagelijkse aanvragen."
|
572 |
|
573 |
#: includes/admin/settings/register-settings.php:143
|
574 |
msgid "Sharedcount.com endpint"
|
languages/mashsb-pt_BR.po
CHANGED
@@ -551,7 +551,7 @@ msgstr ""
|
|
551 |
#: includes/admin/settings/register-settings.php:137
|
552 |
msgid ""
|
553 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
554 |
-
"\">SharedCount.com</a> for
|
555 |
msgstr ""
|
556 |
|
557 |
#: includes/admin/settings/register-settings.php:143
|
551 |
#: includes/admin/settings/register-settings.php:137
|
552 |
msgid ""
|
553 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
554 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
555 |
msgstr ""
|
556 |
|
557 |
#: includes/admin/settings/register-settings.php:143
|
languages/mashsb.po
CHANGED
@@ -135,7 +135,7 @@ msgstr ""
|
|
135 |
#: includes/admin/settings/register-settings.php:138
|
136 |
msgid ""
|
137 |
"Get it FREE at <a href=\"https://admin.sharedcount.com/admin/signup.php\" "
|
138 |
-
"target=\"_blank\">SharedCount.com</a> for
|
139 |
"essential for accurate function of this plugin. Make sure Curl is working on "
|
140 |
"your server."
|
141 |
msgstr ""
|
135 |
#: includes/admin/settings/register-settings.php:138
|
136 |
msgid ""
|
137 |
"Get it FREE at <a href=\"https://admin.sharedcount.com/admin/signup.php\" "
|
138 |
+
"target=\"_blank\">SharedCount.com</a> for 500 free daily requests. It´s "
|
139 |
"essential for accurate function of this plugin. Make sure Curl is working on "
|
140 |
"your server."
|
141 |
msgstr ""
|
languages/mashsb_tr_TR.po
CHANGED
@@ -568,7 +568,7 @@ msgstr ""
|
|
568 |
#: includes/admin/settings/register-settings.php:137
|
569 |
msgid ""
|
570 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
571 |
-
"\">SharedCount.com</a> for
|
572 |
msgstr ""
|
573 |
|
574 |
#: includes/admin/settings/register-settings.php:143
|
568 |
#: includes/admin/settings/register-settings.php:137
|
569 |
msgid ""
|
570 |
"Get it at <a href=\"https://www.sharedcount.com\" target=\"_blank"
|
571 |
+
"\">SharedCount.com</a> for 500 free daily requests."
|
572 |
msgstr ""
|
573 |
|
574 |
#: includes/admin/settings/register-settings.php:143
|
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.6.
|
10 |
* Text Domain: mashsb
|
11 |
* Domain Path: /languages
|
12 |
|
@@ -35,7 +35,7 @@ if( !defined( 'ABSPATH' ) )
|
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'MASHSB_VERSION' ) ) {
|
38 |
-
define( 'MASHSB_VERSION', '3.6.
|
39 |
}
|
40 |
|
41 |
// 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.6.8
|
10 |
* Text Domain: mashsb
|
11 |
* Domain Path: /languages
|
12 |
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'MASHSB_VERSION' ) ) {
|
38 |
+
define( 'MASHSB_VERSION', '3.6.8' );
|
39 |
}
|
40 |
|
41 |
// 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: 5.2
|
12 |
-
Stable tag: 3.6.
|
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,10 @@ Read here more about this: http://docs.mashshare.net/article/10-facebook-is-show
|
|
250 |
|
251 |
== Changelog ==
|
252 |
|
|
|
|
|
|
|
|
|
253 |
= 3.6.7 =
|
254 |
* Fix: Whatsapp sharing does not work
|
255 |
|
@@ -314,7 +318,7 @@ Read here more about this: http://docs.mashshare.net/article/10-facebook-is-show
|
|
314 |
|
315 |
= 3.5.4 =
|
316 |
* New: Support for Yoast custom variables e.g. %%title%%
|
317 |
-
* New: Add sharedcount.com
|
318 |
* New: Switch from newsharecount to opensharecount.com to collect twitter shares
|
319 |
* New: Collect twitter shares with social network add-on
|
320 |
|
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: 5.2
|
12 |
+
Stable tag: 3.6.8
|
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.6.8 =
|
254 |
+
* New: Add new filter mashsb_allowed_post_types for allowing or disabling share counts on particular posts types to lower the api requests to sharedcount.com
|
255 |
+
* Tweak: sharedcount.com lowered their free api limit to 500 daily requests. Change description in MashShare!
|
256 |
+
|
257 |
= 3.6.7 =
|
258 |
* Fix: Whatsapp sharing does not work
|
259 |
|
318 |
|
319 |
= 3.5.4 =
|
320 |
* New: Support for Yoast custom variables e.g. %%title%%
|
321 |
+
* New: Add sharedcount.com 500 free daily api requests
|
322 |
* New: Switch from newsharecount to opensharecount.com to collect twitter shares
|
323 |
* New: Collect twitter shares with social network add-on
|
324 |
|