Version Description
- [ bug fix ] Archive Widget Link bug fix.
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 3.7.10 |
Comparing to | |
See all releases |
Code changes from version 3.7.9 to 3.7.10
- plugins/other_widget/other_widget.php +20 -5
- readme.txt +4 -1
- vkExUnit.php +1 -1
plugins/other_widget/other_widget.php
CHANGED
@@ -20,12 +20,27 @@ function vkExUnit_info_getarchives_where( $where, $r ) {
|
|
20 |
return $where;
|
21 |
}
|
22 |
|
23 |
-
add_filter( 'get_archives_link', '
|
24 |
-
function
|
25 |
global $my_archives_post_type;
|
26 |
-
if ( $my_archives_post_type != '' ) {
|
27 |
-
|
28 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
return $link_html;
|
31 |
}
|
20 |
return $where;
|
21 |
}
|
22 |
|
23 |
+
add_filter( 'get_archives_link', 'vkExUnit_rewrite_archives_link' );
|
24 |
+
function vkExUnit_rewrite_archives_link( $link_html ) {
|
25 |
global $my_archives_post_type;
|
26 |
+
if ( $my_archives_post_type && $my_archives_post_type != 'post' ) {
|
27 |
+
|
28 |
+
$link_url_before = preg_replace("/^.+<a.+href=\'(.+)\'.+$/is", "$1", $link_html );
|
29 |
+
if( $link_html == $link_url_before ) return $link_html;
|
30 |
+
|
31 |
+
$olink = parse_url($link_url_before);
|
32 |
+
if( preg_match("/\/".$my_archives_post_type."\/?/", $olink['path'] ) ) return $link_html;
|
33 |
+
|
34 |
+
if( ! isset( $olink['query'] ) ) $olink['query'] = '';
|
35 |
+
parse_str( $olink['query'], $query );
|
36 |
+
if( isset( $query['post_type'] ) && $query['post_type'] ) return $link_html;
|
37 |
+
|
38 |
+
$query['post_type'] = $my_archives_post_type;
|
39 |
+
$new_query = '?' . http_build_query($query);
|
40 |
+
$new_url = $olink['scheme'] . '://' . $olink['host'] . $olink['path'] . $new_query;
|
41 |
+
|
42 |
+
$link_html = preg_replace( "/href=\'(.+)\'/", "href='" . $new_url. "'", $link_html );
|
43 |
+
return $link_html;
|
44 |
}
|
45 |
return $link_html;
|
46 |
}
|
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.4.2
|
7 |
-
Stable tag: 3.7.
|
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.7.0 =
|
75 |
* [ Add function ] Insert Page list from ancestor.
|
76 |
* [ Specification change ][ Related post ] Change related logic.
|
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.4.2
|
7 |
+
Stable tag: 3.7.10
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 3.7.10 =
|
75 |
+
* [ bug fix ] Archive Widget Link bug fix.
|
76 |
+
|
77 |
= 3.7.0 =
|
78 |
* [ Add function ] Insert Page list from ancestor.
|
79 |
* [ Specification change ][ Related post ] Change related logic.
|
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.7.
|
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.7.10
|
7 |
Author: Vektor,Inc.
|
8 |
Author URI: http://vektor-inc.co.jp
|
9 |
License: GPL2
|