Version Description
[ bug fix ] fix Relate Posts date.
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 9.31.6.0 |
Comparing to | |
See all releases |
Code changes from version 9.31.5.0 to 9.31.6.0
- inc/related_posts/related_posts.php +78 -41
- readme.txt +4 -1
- vkExUnit.php +1 -1
inc/related_posts/related_posts.php
CHANGED
@@ -1,22 +1,37 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
/*-------------------------------------------*/
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
/*
|
21 |
キャメルケースは非推奨なので関数名を変更したが、
|
22 |
プラグイン外で関数が使用されているかもしれないので念の為旧関数でも動作するように
|
@@ -35,9 +50,12 @@ function vkExUnit_get_relatedPosts( $post_type = 'post', $taxonomy = 'post_tag',
|
|
35 |
veu_get_related_posts( $post_type, $taxonomy, $max_show_posts );
|
36 |
}
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
41 |
/*
|
42 |
loop_end でも出力出来るように一時期していたが、
|
43 |
コンテンツエリアのタグより外に出力されるなどで、
|
@@ -56,9 +74,12 @@ function veu_add_related_loopend( $query ) {
|
|
56 |
echo veu_add_related_posts_html( '' );
|
57 |
}
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
62 |
/*
|
63 |
関連記事の投稿データを取得
|
64 |
*/
|
@@ -127,9 +148,12 @@ function veu_get_related_posts( $post_type = 'post', $taxonomy = 'post_tag', $ma
|
|
127 |
return $related_posts;
|
128 |
}
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
133 |
/*
|
134 |
関連記事の1件分のHTML
|
135 |
*/
|
@@ -145,7 +169,7 @@ function veu_add_related_posts_item_html( $post ) {
|
|
145 |
endif;
|
146 |
$post_item_html .= '<div class="media-body">';
|
147 |
$post_item_html .= '<div class="media-heading"><a href="' . get_the_permalink( $post->ID ) . '">' . $post->post_title . '</a></div>';
|
148 |
-
$post_item_html .= '<div class="media-date published"><i class="fa fa-calendar"></i> ' . get_the_date(
|
149 |
$post_item_html .= '</div>';
|
150 |
$post_item_html .= '</div>';
|
151 |
$post_item_html .= '</div>' . "\n";
|
@@ -153,9 +177,12 @@ function veu_add_related_posts_item_html( $post ) {
|
|
153 |
return $post_item_html;
|
154 |
}
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
|
|
|
|
|
|
159 |
/*
|
160 |
関連記事のHTML
|
161 |
*/
|
@@ -184,7 +211,8 @@ function veu_add_related_posts_html( $content ) {
|
|
184 |
}
|
185 |
|
186 |
$related_post_args = apply_filters(
|
187 |
-
'veu_related_post_args',
|
|
|
188 |
'post_type' => 'post',
|
189 |
'taxonomy' => 'post_tag',
|
190 |
'max_show_posts' => $count,
|
@@ -230,8 +258,10 @@ function veu_add_related_posts_html( $content ) {
|
|
230 |
return $content;
|
231 |
}
|
232 |
|
233 |
-
|
234 |
-
|
|
|
|
|
235 |
/*-------------------------------------------*/
|
236 |
|
237 |
if ( apply_filters( 'veu_customize_panel_activation', false ) ) {
|
@@ -241,7 +271,8 @@ if ( apply_filters( 'veu_customize_panel_activation', false ) ) {
|
|
241 |
function veu_customize_register_related( $wp_customize ) {
|
242 |
// セクション追加
|
243 |
$wp_customize->add_section(
|
244 |
-
'veu_related_setting',
|
|
|
245 |
'title' => __( 'Related Settings', 'vk-all-in-one-expansion-unit' ),
|
246 |
'priority' => 1000,
|
247 |
'panel' => 'veu_setting',
|
@@ -249,7 +280,8 @@ function veu_customize_register_related( $wp_customize ) {
|
|
249 |
);
|
250 |
// セッティング
|
251 |
$wp_customize->add_setting(
|
252 |
-
'vkExUnit_related_options[related_title]',
|
|
|
253 |
'default' => '',
|
254 |
'type' => 'option', // 保存先 option or theme_mod
|
255 |
'capability' => 'edit_theme_options',
|
@@ -258,7 +290,8 @@ function veu_customize_register_related( $wp_customize ) {
|
|
258 |
);
|
259 |
// コントロール
|
260 |
$wp_customize->add_control(
|
261 |
-
'related_title',
|
|
|
262 |
'label' => __( 'Title:', 'vk-all-in-one-expansion-unit' ),
|
263 |
'section' => 'veu_related_setting',
|
264 |
'settings' => 'vkExUnit_related_options[related_title]',
|
@@ -269,7 +302,8 @@ function veu_customize_register_related( $wp_customize ) {
|
|
269 |
|
270 |
// セッティング _ 表示件数
|
271 |
$wp_customize->add_setting(
|
272 |
-
'vkExUnit_related_options[related_display_count]',
|
|
|
273 |
'default' => '',
|
274 |
'type' => 'option', // 保存先 option or theme_mod
|
275 |
'capability' => 'edit_theme_options',
|
@@ -278,7 +312,8 @@ function veu_customize_register_related( $wp_customize ) {
|
|
278 |
);
|
279 |
// コントロール _ 表示件数
|
280 |
$wp_customize->add_control(
|
281 |
-
'related_display_count',
|
|
|
282 |
'label' => __( 'Display count', 'vk-all-in-one-expansion-unit' ),
|
283 |
'section' => 'veu_related_setting',
|
284 |
'settings' => 'vkExUnit_related_options[related_display_count]',
|
@@ -287,20 +322,22 @@ function veu_customize_register_related( $wp_customize ) {
|
|
287 |
)
|
288 |
);
|
289 |
|
290 |
-
|
291 |
-
|
|
|
|
|
292 |
/*-------------------------------------------*/
|
293 |
$wp_customize->selective_refresh->add_partial(
|
294 |
-
'vkExUnit_related_options[related_title]',
|
|
|
295 |
'selector' => '.veu_relatedPosts',
|
296 |
'render_callback' => '',
|
297 |
-
'supports'
|
298 |
)
|
299 |
);
|
300 |
}
|
301 |
|
302 |
/*
|
303 |
-
|
304 |
hook sample
|
305 |
|
306 |
add_filter('veu_related_post_types', 'veu_related_post_types_custom');
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
-------------------------------------------*/
|
5 |
+
/*
|
6 |
+
非推奨タグ / Deprecated Tag
|
7 |
+
/*
|
8 |
+
-------------------------------------------*/
|
9 |
+
/*
|
10 |
+
出力先
|
11 |
+
/*
|
12 |
+
-------------------------------------------*/
|
13 |
+
/*
|
14 |
+
veu_get_related_posts()
|
15 |
+
/*
|
16 |
+
-------------------------------------------*/
|
17 |
+
/*
|
18 |
+
veu_add_related_posts_item_html()
|
19 |
+
/*
|
20 |
+
-------------------------------------------*/
|
21 |
+
/*
|
22 |
+
veu_add_related_posts_html()
|
23 |
+
/*
|
24 |
+
-------------------------------------------*/
|
25 |
+
/*
|
26 |
+
Customizer
|
27 |
/*-------------------------------------------*/
|
28 |
|
29 |
+
/*
|
30 |
+
-------------------------------------------*/
|
31 |
+
/*
|
32 |
+
非推奨タグ / Deprecated Tag
|
33 |
+
/*
|
34 |
+
-------------------------------------------*/
|
35 |
/*
|
36 |
キャメルケースは非推奨なので関数名を変更したが、
|
37 |
プラグイン外で関数が使用されているかもしれないので念の為旧関数でも動作するように
|
50 |
veu_get_related_posts( $post_type, $taxonomy, $max_show_posts );
|
51 |
}
|
52 |
|
53 |
+
/*
|
54 |
+
-------------------------------------------*/
|
55 |
+
/*
|
56 |
+
出力先
|
57 |
+
/*
|
58 |
+
-------------------------------------------*/
|
59 |
/*
|
60 |
loop_end でも出力出来るように一時期していたが、
|
61 |
コンテンツエリアのタグより外に出力されるなどで、
|
74 |
echo veu_add_related_posts_html( '' );
|
75 |
}
|
76 |
|
77 |
+
/*
|
78 |
+
-------------------------------------------*/
|
79 |
+
/*
|
80 |
+
veu_get_related_posts()
|
81 |
+
/*
|
82 |
+
-------------------------------------------*/
|
83 |
/*
|
84 |
関連記事の投稿データを取得
|
85 |
*/
|
148 |
return $related_posts;
|
149 |
}
|
150 |
|
151 |
+
/*
|
152 |
+
-------------------------------------------*/
|
153 |
+
/*
|
154 |
+
veu_add_related_posts_item_html()
|
155 |
+
/*
|
156 |
+
-------------------------------------------*/
|
157 |
/*
|
158 |
関連記事の1件分のHTML
|
159 |
*/
|
169 |
endif;
|
170 |
$post_item_html .= '<div class="media-body">';
|
171 |
$post_item_html .= '<div class="media-heading"><a href="' . get_the_permalink( $post->ID ) . '">' . $post->post_title . '</a></div>';
|
172 |
+
$post_item_html .= '<div class="media-date published"><i class="fa fa-calendar"></i> ' . get_the_date( '', $post->ID ) . '</div>';
|
173 |
$post_item_html .= '</div>';
|
174 |
$post_item_html .= '</div>';
|
175 |
$post_item_html .= '</div>' . "\n";
|
177 |
return $post_item_html;
|
178 |
}
|
179 |
|
180 |
+
/*
|
181 |
+
-------------------------------------------*/
|
182 |
+
/*
|
183 |
+
veu_add_related_posts_html()
|
184 |
+
/*
|
185 |
+
-------------------------------------------*/
|
186 |
/*
|
187 |
関連記事のHTML
|
188 |
*/
|
211 |
}
|
212 |
|
213 |
$related_post_args = apply_filters(
|
214 |
+
'veu_related_post_args',
|
215 |
+
array(
|
216 |
'post_type' => 'post',
|
217 |
'taxonomy' => 'post_tag',
|
218 |
'max_show_posts' => $count,
|
258 |
return $content;
|
259 |
}
|
260 |
|
261 |
+
/*
|
262 |
+
-------------------------------------------*/
|
263 |
+
/*
|
264 |
+
Customizer
|
265 |
/*-------------------------------------------*/
|
266 |
|
267 |
if ( apply_filters( 'veu_customize_panel_activation', false ) ) {
|
271 |
function veu_customize_register_related( $wp_customize ) {
|
272 |
// セクション追加
|
273 |
$wp_customize->add_section(
|
274 |
+
'veu_related_setting',
|
275 |
+
array(
|
276 |
'title' => __( 'Related Settings', 'vk-all-in-one-expansion-unit' ),
|
277 |
'priority' => 1000,
|
278 |
'panel' => 'veu_setting',
|
280 |
);
|
281 |
// セッティング
|
282 |
$wp_customize->add_setting(
|
283 |
+
'vkExUnit_related_options[related_title]',
|
284 |
+
array(
|
285 |
'default' => '',
|
286 |
'type' => 'option', // 保存先 option or theme_mod
|
287 |
'capability' => 'edit_theme_options',
|
290 |
);
|
291 |
// コントロール
|
292 |
$wp_customize->add_control(
|
293 |
+
'related_title',
|
294 |
+
array(
|
295 |
'label' => __( 'Title:', 'vk-all-in-one-expansion-unit' ),
|
296 |
'section' => 'veu_related_setting',
|
297 |
'settings' => 'vkExUnit_related_options[related_title]',
|
302 |
|
303 |
// セッティング _ 表示件数
|
304 |
$wp_customize->add_setting(
|
305 |
+
'vkExUnit_related_options[related_display_count]',
|
306 |
+
array(
|
307 |
'default' => '',
|
308 |
'type' => 'option', // 保存先 option or theme_mod
|
309 |
'capability' => 'edit_theme_options',
|
312 |
);
|
313 |
// コントロール _ 表示件数
|
314 |
$wp_customize->add_control(
|
315 |
+
'related_display_count',
|
316 |
+
array(
|
317 |
'label' => __( 'Display count', 'vk-all-in-one-expansion-unit' ),
|
318 |
'section' => 'veu_related_setting',
|
319 |
'settings' => 'vkExUnit_related_options[related_display_count]',
|
322 |
)
|
323 |
);
|
324 |
|
325 |
+
/*
|
326 |
+
-------------------------------------------*/
|
327 |
+
/*
|
328 |
+
Add Edit Customize Link Btn
|
329 |
/*-------------------------------------------*/
|
330 |
$wp_customize->selective_refresh->add_partial(
|
331 |
+
'vkExUnit_related_options[related_title]',
|
332 |
+
array(
|
333 |
'selector' => '.veu_relatedPosts',
|
334 |
'render_callback' => '',
|
335 |
+
'supports' => array(),
|
336 |
)
|
337 |
);
|
338 |
}
|
339 |
|
340 |
/*
|
|
|
341 |
hook sample
|
342 |
|
343 |
add_filter('veu_related_post_types', 'veu_related_post_types_custom');
|
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: 5.0.0
|
6 |
Tested up to: 5.5.0
|
7 |
-
Stable tag: 9.31.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,6 +99,9 @@ e.g.
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
102 |
= 9.31.5.0 =
|
103 |
Only Change Version Number
|
104 |
|
4 |
Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
|
5 |
Requires at least: 5.0.0
|
6 |
Tested up to: 5.5.0
|
7 |
+
Stable tag: 9.31.6.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 9.31.6.0 =
|
103 |
+
[ bug fix ] fix Relate Posts date.
|
104 |
+
|
105 |
= 9.31.5.0 =
|
106 |
Only Change Version Number
|
107 |
|
vkExUnit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: VK All in One Expansion Unit
|
4 |
* Plugin URI: https://ex-unit.nagoya
|
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: 9.31.
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vk-all-in-one-expansion-unit
|
9 |
* Domain Path: /languages
|
3 |
* Plugin Name: VK All in One Expansion Unit
|
4 |
* Plugin URI: https://ex-unit.nagoya
|
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: 9.31.6.0
|
7 |
* Author: Vektor,Inc.
|
8 |
* Text Domain: vk-all-in-one-expansion-unit
|
9 |
* Domain Path: /languages
|