VK All in One Expansion Unit - Version 5.3.5

Version Description

Download this release

Release Info

Developer kurudrive
Plugin Icon 128x128 VK All in One Expansion Unit
Version 5.3.5
Comparing to
See all releases

Code changes from version 5.3.4 to 5.3.5

plugins/related_posts/related_posts.php CHANGED
@@ -67,17 +67,24 @@ function vkExUnit_get_relatedPosts( $post_type = 'post', $taxonomy = 'post_tag',
67
}
68
69
function vkExUnit_add_relatedPosts_html( $content ) {
70
- if( ! is_single() ) return $content;
71
72
- if ( ! is_single() || get_post_type() != 'post' ) { return $content; }
73
74
global $is_pagewidget;
75
- if ( $is_pagewidget ) { return $content; }
76
77
/*-------------------------------------------*/
78
/* Related posts
79
/*-------------------------------------------*/
80
- $related_posts = vkExUnit_get_relatedPosts();
81
82
if ( !$related_posts ) { return $content; }
83
@@ -117,3 +124,27 @@ function vkExUnit_add_relatedPosts_html( $content ) {
117
118
return $content;
119
}
67
}
68
69
function vkExUnit_add_relatedPosts_html( $content ) {
70
71
+ if( ! is_single() ) return $content;
72
73
global $is_pagewidget;
74
+ if ( $is_pagewidget ) return $content;
75
+
76
+ $related_post_types = apply_filters( 'veu_related_post_types', array( 'post' ) );
77
+ if ( !in_array( get_post_type(), $related_post_types ) ) return $content;
78
79
/*-------------------------------------------*/
80
/* Related posts
81
/*-------------------------------------------*/
82
+ $related_post_args = apply_filters( 'veu_related_post_args', array(
83
+ 'post_type' => 'post',
84
+ 'taxonomy' => 'post_tag',
85
+ 'max_show_posts' => 10
86
+ ) );
87
+ $related_posts = vkExUnit_get_relatedPosts( $related_post_args['post_type'], $related_post_args['taxonomy'], $related_post_args['max_show_posts'] );
88
89
if ( !$related_posts ) { return $content; }
90
124
125
return $content;
126
}
127
+
128
+ /*
129
+
130
+ hook sample
131
+
132
+ add_filter('veu_related_post_types', 'veu_related_post_types_custom');
133
+ function veu_related_post_types_custom( $related_post_types ){
134
+ $related_post_types[] = 'item';
135
+ return $related_post_types;
136
+ }
137
+
138
+ add_filter('veu_related_post_args', 'veu_related_post_args_custom');
139
+ function veu_related_post_args_custom( $related_post_args ){
140
+ if ( get_post_type() == 'item' ) {
141
+ $related_post_args = array(
142
+ 'post_type' => 'item',
143
+ 'taxonomy' => 'item-category',
144
+ 'max_show_posts' => 10
145
+ );
146
+ }
147
+ return $related_post_args;
148
+ }
149
+
150
+ */
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.7.2
7
- Stable tag: 5.3.4
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
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.7.2
7
+ Stable tag: 5.3.5
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
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: 5.3.4
7
* Author: Vektor,Inc.
8
* Text Domain: vkExUnit
9
* Domain Path: /languages
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: 5.3.5
7
* Author: Vektor,Inc.
8
* Text Domain: vkExUnit
9
* Domain Path: /languages