Version Description
- [ bug fix ][ SNS Buttons ] ignore post id no work...
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 3.8.2 |
Comparing to | |
See all releases |
Code changes from version 3.8.1 to 3.8.2
- plugins/sns/function_snsBtns.php +18 -4
- plugins/sns/function_twitterCard.php +1 -1
- plugins/sns/sns.php +2 -2
- plugins/sns/sns_admin.php +2 -2
- readme.txt +4 -1
- vkExUnit.php +1 -1
plugins/sns/function_snsBtns.php
CHANGED
@@ -3,6 +3,21 @@
|
|
3 |
add_filter( 'the_content', 'vkExUnit_add_snsBtns', 200, 1 );
|
4 |
// is_single()
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
function vkExUnit_add_snsBtns( $content ) {
|
7 |
global $is_pagewidget;
|
8 |
if ( $is_pagewidget ) { return $content; }
|
@@ -26,9 +41,8 @@ function vkExUnit_add_snsBtns( $content ) {
|
|
26 |
if ( ! $pageTitle ) {
|
27 |
$pageTitle = urlencode( vkExUnit_get_wp_head_title() );
|
28 |
}
|
29 |
-
|
30 |
-
|
31 |
-
if ( !isset( $options['SnsBtn_ignorePost'] ) || $options['SnsBtn_ignorePost'] != $post->ID ) {
|
32 |
$socialSet = '<div class="veu_socialSet veu_contentAddSection"><script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));</script><ul>';
|
33 |
// facebook
|
34 |
$socialSet .= '<li class="sb_facebook sb_icon"><a href="http://www.facebook.com/sharer.php?src=bm&u='.$linkUrl.'&t='.$pageTitle.'" target="_blank" ><span class="vk_icon_w_r_sns_fb icon_sns"></span><span class="sns_txt">Facebook</span><span class="veu_count_sns_fb"></span></a></li>';
|
@@ -46,7 +60,7 @@ function vkExUnit_add_snsBtns( $content ) {
|
|
46 |
|
47 |
$socialSet .= '</ul></div><!-- [ /.socialSet ] -->';
|
48 |
$content .= $socialSet;
|
49 |
-
} // if ( !isset( $options['
|
50 |
|
51 |
endif;
|
52 |
return $content;
|
3 |
add_filter( 'the_content', 'vkExUnit_add_snsBtns', 200, 1 );
|
4 |
// is_single()
|
5 |
|
6 |
+
function vkExUnit_is_snsBtns_display(){
|
7 |
+
global $post;
|
8 |
+
$options = vkExUnit_get_sns_options();
|
9 |
+
$ignorePosts = explode(",", $options['snsBtn_ignorePosts']);
|
10 |
+
if ( !isset( $options['snsBtn_ignorePosts'] ) ){
|
11 |
+
return true;
|
12 |
+
} else if ( isset( $options['snsBtn_ignorePosts'] ) && $options['snsBtn_ignorePosts'] == $post->ID ) {
|
13 |
+
return false;
|
14 |
+
} else if ( is_array( $ignorePosts ) && in_array( $post->ID, $ignorePosts ) ){
|
15 |
+
return false;
|
16 |
+
} else {
|
17 |
+
return true;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
function vkExUnit_add_snsBtns( $content ) {
|
22 |
global $is_pagewidget;
|
23 |
if ( $is_pagewidget ) { return $content; }
|
41 |
if ( ! $pageTitle ) {
|
42 |
$pageTitle = urlencode( vkExUnit_get_wp_head_title() );
|
43 |
}
|
44 |
+
|
45 |
+
if ( vkExUnit_is_snsBtns_display() ) {
|
|
|
46 |
$socialSet = '<div class="veu_socialSet veu_contentAddSection"><script>window.twttr=(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],t=window.twttr||{};if(d.getElementById(id))return t;js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);t._e=[];t.ready=function(f){t._e.push(f);};return t;}(document,"script","twitter-wjs"));</script><ul>';
|
47 |
// facebook
|
48 |
$socialSet .= '<li class="sb_facebook sb_icon"><a href="http://www.facebook.com/sharer.php?src=bm&u='.$linkUrl.'&t='.$pageTitle.'" target="_blank" ><span class="vk_icon_w_r_sns_fb icon_sns"></span><span class="sns_txt">Facebook</span><span class="veu_count_sns_fb"></span></a></li>';
|
60 |
|
61 |
$socialSet .= '</ul></div><!-- [ /.socialSet ] -->';
|
62 |
$content .= $socialSet;
|
63 |
+
} // if ( !isset( $options['snsBtn_ignorePosts'] ) || $options['snsBtn_ignorePosts'] != $post->ID ) {
|
64 |
|
65 |
endif;
|
66 |
return $content;
|
plugins/sns/function_twitterCard.php
CHANGED
@@ -8,7 +8,7 @@ function vkExUnit_add_twitterCard() {
|
|
8 |
global $vkExUnit_sns_options;
|
9 |
|
10 |
$options = vkExUnit_get_sns_options();
|
11 |
-
$ignores = explode( ",", $options["
|
12 |
|
13 |
if( in_array( get_the_id(), $ignores ) ) return false;
|
14 |
|
8 |
global $vkExUnit_sns_options;
|
9 |
|
10 |
$options = vkExUnit_get_sns_options();
|
11 |
+
$ignores = explode( ",", $options["snsBtn_ignorePosts"] );
|
12 |
|
13 |
if( in_array( get_the_id(), $ignores ) ) return false;
|
14 |
|
plugins/sns/sns.php
CHANGED
@@ -41,7 +41,7 @@ function vkExUnit_get_sns_options_default() {
|
|
41 |
'enableTwitterCardTags' => true,
|
42 |
'enableSnsBtns' => true,
|
43 |
'enableFollowMe' => true,
|
44 |
-
'
|
45 |
'followMe_title' => 'Follow me!',
|
46 |
);
|
47 |
return apply_filters( 'vkExUnit_sns_options_default', $default_options );
|
@@ -58,7 +58,7 @@ function vkExUnit_sns_options_validate( $input ) {
|
|
58 |
$output['fbPageUrl'] = $input['fbPageUrl'];
|
59 |
$output['ogImage'] = $input['ogImage'];
|
60 |
$output['twitterId'] = $input['twitterId'];
|
61 |
-
$output['
|
62 |
$output['enableOGTags'] = ( isset( $input['enableOGTags'] ) && isset( $input['enableOGTags'] ) == 'true' )? true: false;
|
63 |
$output['enableTwitterCardTags'] = ( isset( $input['enableTwitterCardTags'] ) && isset( $input['enableTwitterCardTags'] ) == 'true' )? true: false;
|
64 |
$output['enableSnsBtns'] = ( isset( $input['enableSnsBtns'] ) && isset( $input['enableSnsBtns'] ) == 'true' )? true: false;
|
41 |
'enableTwitterCardTags' => true,
|
42 |
'enableSnsBtns' => true,
|
43 |
'enableFollowMe' => true,
|
44 |
+
'snsBtn_ignorePosts' => '',
|
45 |
'followMe_title' => 'Follow me!',
|
46 |
);
|
47 |
return apply_filters( 'vkExUnit_sns_options_default', $default_options );
|
58 |
$output['fbPageUrl'] = $input['fbPageUrl'];
|
59 |
$output['ogImage'] = $input['ogImage'];
|
60 |
$output['twitterId'] = $input['twitterId'];
|
61 |
+
$output['snsBtn_ignorePosts'] = preg_replace('/[^0-9,]/', '', $input['snsBtn_ignorePosts']);
|
62 |
$output['enableOGTags'] = ( isset( $input['enableOGTags'] ) && isset( $input['enableOGTags'] ) == 'true' )? true: false;
|
63 |
$output['enableTwitterCardTags'] = ( isset( $input['enableTwitterCardTags'] ) && isset( $input['enableTwitterCardTags'] ) == 'true' )? true: false;
|
64 |
$output['enableSnsBtns'] = ( isset( $input['enableSnsBtns'] ) && isset( $input['enableSnsBtns'] ) == 'true' )? true: false;
|
plugins/sns/sns_admin.php
CHANGED
@@ -58,8 +58,8 @@
|
|
58 |
</tr>
|
59 |
|
60 |
<tr>
|
61 |
-
<th><label for="
|
62 |
-
<td><input type="text" id="
|
63 |
<br/>
|
64 |
<?php _e( 'if you need filtering by post_ID, add the ignore post_ID separate by ",".', 'vkExUnit' );
|
65 |
echo '<br/>';
|
58 |
</tr>
|
59 |
|
60 |
<tr>
|
61 |
+
<th><label for="snsBtn_ignorePosts"><?php _e( 'ignore postID for SNS buttons' ,'vkExUnit'); ?></label></th>
|
62 |
+
<td><input type="text" id="snsBtn_ignorePosts" name="vkExUnit_sns_options[snsBtn_ignorePosts]" value="<?php if( isset( $options['snsBtn_ignorePosts'] ) ) echo $options['snsBtn_ignorePosts'] ?>" />
|
63 |
<br/>
|
64 |
<?php _e( 'if you need filtering by post_ID, add the ignore post_ID separate by ",".', 'vkExUnit' );
|
65 |
echo '<br/>';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.5.1
|
7 |
-
Stable tag: 3.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -71,6 +71,9 @@ e.g.
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
74 |
= 3.8.1 =
|
75 |
* [ bug fix ][ SNS Buttons ] ignore post id no work...
|
76 |
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 4.2
|
6 |
Tested up to: 4.5.1
|
7 |
+
Stable tag: 3.8.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 3.8.2 =
|
75 |
+
* [ bug fix ][ SNS Buttons ] ignore post id no work...
|
76 |
+
|
77 |
= 3.8.1 =
|
78 |
* [ bug fix ][ SNS Buttons ] ignore post id no work...
|
79 |
|
vkExUnit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: VK All in One Expansion Unit
|
4 |
Plugin URI: http://ex-unit.vektor-inc.co.jp
|
5 |
Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
-
Version: 3.8.
|
7 |
Author: Vektor,Inc.
|
8 |
Author URI: http://vektor-inc.co.jp
|
9 |
License: GPL2
|
3 |
Plugin Name: VK All in One Expansion Unit
|
4 |
Plugin URI: http://ex-unit.vektor-inc.co.jp
|
5 |
Description: This plug-in is an integrated plug-in with a variety of features that make it powerful your web site. Many features can be stopped individually. Example Facebook Page Plugin,Social Bookmarks,Print OG Tags,Print Twitter Card Tags,Print Google Analytics tag,New post widget,Insert Related Posts and more!
|
6 |
+
Version: 3.8.2
|
7 |
Author: Vektor,Inc.
|
8 |
Author URI: http://vektor-inc.co.jp
|
9 |
License: GPL2
|