VK All in One Expansion Unit - Version 9.15.4.0

Version Description

[ bugfix ][ smoothscroll ] [ bugfix ][ metakeyword ]

Download this release

Release Info

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

Code changes from version 9.15.3.0 to 9.15.4.0

assets/js/all.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";jQuery.changeLetterSize={handlers:[],interval:1e3,currentSize:0},function(t){function e(){i.appendTo("body");var t=i[0].offsetHeight;return i.remove(),n.currentSize!=t&&(n.currentSize=t,!0)}var n=t.changeLetterSize,i=t("<ins>M</ins>").css({display:"block",visibility:"hidden",position:"absolute",padding:"0",top:"0"});t(e);n.addHandler=function(t){n.handlers.push(t),n.handlers.length}}(jQuery),function(t){function e(t){var e=0;t.each(function(){var t=this.offsetHeight;e<t&&(e=t)}),t.css("height",e+"px")}var n=[];jQuery.fn.flatHeights=function(){return 1<this.length&&(e(this),n.push(this)),this};function i(){t.each(n,function(){this.height("auto"),e(this)})}t.changeLetterSize.addHandler(i),t(window).resize(i)}(jQuery),jQuery(document).ready(function(t){jQuery(".topPrTit a").flatHeights(),jQuery(".topPrDescription").flatHeights(),jQuery(".child_page_block h4 a").flatHeights()});var a=null;!function(t){t(function(){t(".prArea > .subSection-title").flatHeights(),t(".prArea > .summary").flatHeights()}),window.addEventListener("DOMContentLoaded",function(){t(".childPage_list_text").flatHeights()})}(jQuery),function(t,e){t.addEventListener("load",function(){var n=e.getElementsByClassName("veu_count_sns_hb");if(0!=n.length){var t=encodeURIComponent(location.href);fetch(vkExOpt.hatena_entry+t,{method:"GET"}).then(function(t){t.ok&&t.json().then(function(e){void 0!==e.count&&Array.prototype.forEach.call(n,function(t){return t.innerHTML=e.count})})}).catch(function(t){})}},!1)}(window,document),function(r,a){vkExOpt.enable_smooth_scroll&&r.addEventListener("load",function(){function n(t){var e=t.toElement.getAttribute("href"),n=0,i=a.getElementById(e.slice(1));if(i){var o=r.pageYOffset||a.documentElement.scrollTop;n=i.getBoundingClientRect().top+o}r.scrollTo({top:n,behavior:"smooth"}),t.preventDefault()}Array.prototype.forEach.call(a.getElementsByTagName("a"),function(t){var e=t.getAttribute("href");e&&0==e.indexOf("#")&&t.addEventListener("click",n)})})}(window,document),function(t,e,n){t.addEventListener("scroll",function(){0<t.pageYOffset?e.body.classList.add(n):e.body.classList.remove(n)})}(window,document,"scrolled");
1
+ "use strict";jQuery.changeLetterSize={handlers:[],interval:1e3,currentSize:0},function(t){function e(){i.appendTo("body");var t=i[0].offsetHeight;return i.remove(),n.currentSize!=t&&(n.currentSize=t,!0)}var n=t.changeLetterSize,i=t("<ins>M</ins>").css({display:"block",visibility:"hidden",position:"absolute",padding:"0",top:"0"});t(e);n.addHandler=function(t){n.handlers.push(t),n.handlers.length}}(jQuery),function(t){function e(t){var e=0;t.each(function(){var t=this.offsetHeight;e<t&&(e=t)}),t.css("height",e+"px")}var n=[];jQuery.fn.flatHeights=function(){return 1<this.length&&(e(this),n.push(this)),this};function i(){t.each(n,function(){this.height("auto"),e(this)})}t.changeLetterSize.addHandler(i),t(window).resize(i)}(jQuery),jQuery(document).ready(function(t){jQuery(".topPrTit a").flatHeights(),jQuery(".topPrDescription").flatHeights(),jQuery(".child_page_block h4 a").flatHeights()});var a=null;!function(t){t(function(){t(".prArea > .subSection-title").flatHeights(),t(".prArea > .summary").flatHeights()}),window.addEventListener("DOMContentLoaded",function(){t(".childPage_list_text").flatHeights()})}(jQuery),function(t,e){t.addEventListener("load",function(){var n=e.getElementsByClassName("veu_count_sns_hb");if(0!=n.length){var t=encodeURIComponent(location.href);fetch(vkExOpt.hatena_entry+t,{method:"GET"}).then(function(t){t.ok&&t.json().then(function(e){void 0!==e.count&&Array.prototype.forEach.call(n,function(t){return t.innerHTML=e.count})})}).catch(function(t){})}},!1)}(window,document),function(a,c){vkExOpt.enable_smooth_scroll&&a.addEventListener("load",function(){function n(t){for(var e=0;e<t.path.length&&!t.path[e].getAttribute("href");e++);var n=t.path[e].getAttribute("href");if(n){var i=0,o=c.getElementById(n.slice(1));if(o){var r=a.pageYOffset||c.documentElement.scrollTop;i=o.getBoundingClientRect().top+r}a.scrollTo({top:i,behavior:"smooth"}),t.preventDefault()}}Array.prototype.forEach.call(c.getElementsByTagName("a"),function(t){var e=t.getAttribute("href");e&&0==e.indexOf("#")&&t.addEventListener("click",n)})})}(window,document),function(t,e,n){t.addEventListener("scroll",function(){0<t.pageYOffset?e.body.classList.add(n):e.body.classList.remove(n)})}(window,document,"scrolled");
inc/meta-keyword/class-veu-metabox-meta-keyword.php CHANGED
@@ -10,7 +10,7 @@ class VEU_Metabox_Meta_Keyword extends VEU_Metabox {
10
11
$this->args = array(
12
'slug' => 'veu_meta_keyword',
13
- 'cf_name' => 'vkExUnit_common_keywords',
14
'title' => __( 'Meta Keywords', 'vk-all-in-one-expansion-unit' ),
15
'priority' => 50,
16
);
@@ -26,6 +26,10 @@ class VEU_Metabox_Meta_Keyword extends VEU_Metabox {
26
* @return [type] [description]
27
*/
28
public function metabox_body_form( $cf_value ) {
29
30
$theme_option_seo_link = '<a href="' . get_admin_url() . '/admin.php?page=vkExUnit_main_setting#vkExUnit_common_keywords" target="_blank">' . vkExUnit_get_name() . ' ' . __( 'Main setting', 'vk-all-in-one-expansion-unit' ) . '</a>';
31
@@ -38,6 +42,11 @@ class VEU_Metabox_Meta_Keyword extends VEU_Metabox {
38
return $form;
39
}
40
41
- } // class VEU_Metabox_Meta_Keyword {
42
43
- $veu_metabox_sns_title = new VEU_Metabox_Meta_Keyword();
10
11
$this->args = array(
12
'slug' => 'veu_meta_keyword',
13
+ 'cf_name' => 'vkExUnit_metaKeyword',
14
'title' => __( 'Meta Keywords', 'vk-all-in-one-expansion-unit' ),
15
'priority' => 50,
16
);
26
* @return [type] [description]
27
*/
28
public function metabox_body_form( $cf_value ) {
29
+ $keyword = vExUnit_meta_keywords::get_postKeyword();
30
+ if ( ! empty( $keyword ) ) {
31
+ $cf_value = $keyword;
32
+ }
33
34
$theme_option_seo_link = '<a href="' . get_admin_url() . '/admin.php?page=vkExUnit_main_setting#vkExUnit_common_keywords" target="_blank">' . vkExUnit_get_name() . ' ' . __( 'Main setting', 'vk-all-in-one-expansion-unit' ) . '</a>';
35
42
return $form;
43
}
44
45
+ public function save_custom_field( $post_id ) {
46
+ parent::save_custom_field( $post_id );
47
+ delete_post_meta( $post_id, 'vkExUnit_common_keywords' );
48
+ }
49
+ }
50
51
+ // If you delete the following 'new', metabox will not be displayed on the post edit screen.
52
+ $veu_metabox_meta_keyword = new VEU_Metabox_Meta_Keyword();
inc/meta-keyword/meta-keyword.php CHANGED
@@ -40,8 +40,6 @@ class vExUnit_meta_keywords {
40
41
protected function run_init() {
42
add_action( 'veu_package_init', array( $this, 'option_init' ) );
43
- // add_action( 'admin_menu', array( $this, 'add_custom_field' ) );
44
- // add_action( 'save_post', array( $this, 'save_custom_field' ) );
45
add_action( 'wp_head', array( $this, 'set_HeadKeywords' ), 1 );
46
}
47
@@ -93,27 +91,37 @@ class vExUnit_meta_keywords {
93
<?php
94
}
95
96
- public function get_postKeyword() {
97
$post_id = get_the_id();
98
99
if ( empty( $post_id ) ) {
100
- return null; }
101
102
$keyword = get_post_meta( $post_id, 'vkExUnit_metaKeyword', true );
103
- return $keyword;
104
- }
105
106
107
public function set_HeadKeywords() {
108
$commonKeyWords = self::get_option();
109
// get custom field
110
$entryKeyWords = self::get_postKeyword();
111
$keywords = array();
112
if ( $commonKeyWords ) {
113
$keywords[] = $commonKeyWords; }
114
if ( $entryKeyWords ) {
115
$keywords[] = $entryKeyWords; }
116
$key = implode( ',', $keywords );
117
// print individual keywords
118
if ( ! $key ) {
119
return; }
@@ -121,4 +129,4 @@ class vExUnit_meta_keywords {
121
}
122
}
123
124
- vExUnit_meta_keywords::instance();
40
41
protected function run_init() {
42
add_action( 'veu_package_init', array( $this, 'option_init' ) );
43
add_action( 'wp_head', array( $this, 'set_HeadKeywords' ), 1 );
44
}
45
91
<?php
92
}
93
94
+ public static function get_postKeyword() {
95
$post_id = get_the_id();
96
97
if ( empty( $post_id ) ) {
98
+ return null;
99
+ }
100
101
$keyword = get_post_meta( $post_id, 'vkExUnit_metaKeyword', true );
102
+ if ( !empty($keyword) ) {
103
+ return $keyword;
104
+ }
105
+
106
+ $keyword = get_post_meta( $post_id, 'vkExUnit_common_keywords', true );
107
+ if ( !empty($keyword) ) {
108
+ return $keyword;
109
+ }
110
111
+ }
112
113
public function set_HeadKeywords() {
114
$commonKeyWords = self::get_option();
115
// get custom field
116
$entryKeyWords = self::get_postKeyword();
117
+
118
$keywords = array();
119
if ( $commonKeyWords ) {
120
$keywords[] = $commonKeyWords; }
121
if ( $entryKeyWords ) {
122
$keywords[] = $entryKeyWords; }
123
$key = implode( ',', $keywords );
124
+
125
// print individual keywords
126
if ( ! $key ) {
127
return; }
129
}
130
}
131
132
+ vExUnit_meta_keywords::instance();
inc/smooth-scroll/js/smooth-scroll.js CHANGED
@@ -7,9 +7,14 @@
7
}
8
window.addEventListener('load', () =>{
9
function smooth_link(e) {
10
- let href = e.toElement.getAttribute('href')
11
- let y = 0
12
- let destination = document.getElementById(href.slice(1))
13
if(destination){
14
let scroll = window.pageYOffset || document.documentElement.scrollTop
15
y = destination.getBoundingClientRect().top + scroll
7
}
8
window.addEventListener('load', () =>{
9
function smooth_link(e) {
10
+ let i=0;
11
+ for(i;i<e.path.length;i++){
12
+ if(e.path[i].getAttribute('href')) break;
13
+ }
14
+ let href = e.path[i].getAttribute('href')
15
+ if (!href) return;
16
+ let y = 0,
17
+ destination = document.getElementById(href.slice(1))
18
if(destination){
19
let scroll = window.pageYOffset || document.documentElement.scrollTop
20
y = destination.getBoundingClientRect().top + scroll
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.3.2
7
- Stable tag: 9.15.3.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -93,11 +93,15 @@ e.g.
93
94
== Changelog ==
95
96
= 9.15.3.0 =
97
- [ BugFix ][ no index no follow ] don't work...
98
99
= 9.15.2.0 =
100
- [ BugFix ] MuitiSite Bug fix
101
102
= 9.15.0.0 =
103
[ Add function ][ Contactform7 Asset Optimize ] Contact Form Speeding up
@@ -162,14 +166,14 @@ Deploy setting
162
vk blocks 0.17.2 update
163
164
= 9.7.1.0 =
165
- [ Bugfix ][ content widget ] Cope with title style from block.
166
167
= 9.7.0.0 =
168
[ Add function ][ Block ] Core block style expand
169
170
171
= 9.6.9.0 =
172
- [ Bugfix ] Use with VK Post Author Display bug fix
173
174
= 9.6.8.0 =
175
[ Specification change ] ファイル階層一部変更
@@ -229,7 +233,7 @@ Merely Version Change
229
[ Add Function ][ VK Blocks ] Add marker
230
231
= 9.3.3.0( Beta ) =
232
- [ Bugfix ][ OG title ] When front-page that to be single page title, not blog name bug fixed.
233
234
= 9.3.2.0( Beta ) =
235
[ Desing tuning ] customize panel design tuning
@@ -505,7 +509,7 @@ Back version to 8.3.1
505
506
= 5.3.4 =
507
* [ Share Button ][ bug fix ] js error
508
- * [ 3PR Area Widget ][ Bugfix ] Link open blank not work …
509
* [ Facebook Page Plugin ] Multilingual
510
511
= 5.2.4 =
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.3.2
7
+ Stable tag: 9.15.4.0
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
93
94
== Changelog ==
95
96
+ = 9.15.4.0 =
97
+ [ bugfix ][ smoothscroll ]
98
+ [ bugfix ][ metakeyword ]
99
+
100
= 9.15.3.0 =
101
+ [ bugfix ][ no index no follow ] don't work...
102
103
= 9.15.2.0 =
104
+ [ bugfix ] MuitiSite Bug fix
105
106
= 9.15.0.0 =
107
[ Add function ][ Contactform7 Asset Optimize ] Contact Form Speeding up
166
vk blocks 0.17.2 update
167
168
= 9.7.1.0 =
169
+ [ bugfix ][ content widget ] Cope with title style from block.
170
171
= 9.7.0.0 =
172
[ Add function ][ Block ] Core block style expand
173
174
175
= 9.6.9.0 =
176
+ [ bugfix ] Use with VK Post Author Display bug fix
177
178
= 9.6.8.0 =
179
[ Specification change ] ファイル階層一部変更
233
[ Add Function ][ VK Blocks ] Add marker
234
235
= 9.3.3.0( Beta ) =
236
+ [ bugfix ][ OG title ] When front-page that to be single page title, not blog name bug fixed.
237
238
= 9.3.2.0( Beta ) =
239
[ Desing tuning ] customize panel design tuning
509
510
= 5.3.4 =
511
* [ Share Button ][ bug fix ] js error
512
+ * [ 3PR Area Widget ][ bugfix ] Link open blank not work …
513
* [ Facebook Page Plugin ] Multilingual
514
515
= 5.2.4 =
tests/test-meta-keywords.php ADDED
@@ -0,0 +1,88 @@
1
+ <?php
2
+ /**
3
+ * Class MetaKeywordsTest
4
+ *
5
+ * @package Vk_All_In_One_Expansion_Unit
6
+ */
7
+ /*
8
+ vccw
9
+ cd $(wp plugin path --dir vk-all-in-one-expansion-unit)
10
+ bash bin/install-wp-tests.sh wordpress_test root 'WordPress' localhost latest
11
+ */
12
+
13
+ /*
14
+ Flywheel
15
+ cd /app
16
+ bash setup-phpunit.sh
17
+ source ~/.bashrc
18
+ cd $(wp plugin path --dir vk-all-in-one-expansion-unit)
19
+ phpunit
20
+ */
21
+
22
+ /**
23
+ * Meta Keywords test case.
24
+ */
25
+ class MetaKeywordsTest extends WP_UnitTestCase {
26
+
27
+ function test_get_postKeyword() {
28
+
29
+ print PHP_EOL;
30
+ print '------------------------------------' . PHP_EOL;
31
+ print 'get_postKeyword' . PHP_EOL;
32
+ print '------------------------------------' . PHP_EOL;
33
+
34
+ // メタキーワードはデフォルトがoffなので有効化
35
+ $options_common = get_option( 'vkExUnit_common_options' );
36
+ $options_common['active_metaKeyword'] = true;
37
+ update_option( 'vkExUnit_common_options', $options_common );
38
+ veu_package_include();
39
+
40
+ $test_array = array(
41
+ array(
42
+ 'vkExUnit_metaKeyword' => 'aaa',
43
+ 'vkExUnit_common_keywords' => false,
44
+ 'correct' => 'aaa',
45
+ ),
46
+ array(
47
+ 'vkExUnit_metaKeyword' => false,
48
+ 'vkExUnit_common_keywords' => 'bbb',
49
+ 'correct' => 'bbb',
50
+ ),
51
+ array(
52
+ 'vkExUnit_metaKeyword' => 'aaa',
53
+ 'vkExUnit_common_keywords' => 'bbb',
54
+ 'correct' => 'aaa',
55
+ ),
56
+ );
57
+
58
+ foreach ( $test_array as $key => $test_value ) {
59
+
60
+ // Add test post
61
+ $post = array(
62
+ 'post_title' => 'title',
63
+ 'post_status' => 'publish',
64
+ 'post_content' => 'content',
65
+ );
66
+ $post_id = wp_insert_post( $post );
67
+
68
+ if (!empty($test_value['vkExUnit_metaKeyword'])){
69
+ update_post_meta( $post_id, 'vkExUnit_metaKeyword', $test_value['vkExUnit_metaKeyword'] );
70
+ }
71
+ if (!empty($test_value['vkExUnit_common_keywords'])){
72
+ update_post_meta( $post_id, 'vkExUnit_common_keywords', $test_value['vkExUnit_common_keywords'] );
73
+ }
74
+
75
+ // Move to target page
76
+ $this->go_to( get_permalink( $post_id ) );
77
+
78
+ $return = vExUnit_meta_keywords::get_postKeyword();
79
+
80
+ // print 'url :' . $_SERVER['REQUEST_URI'] . PHP_EOL;
81
+ print 'return :' . $return . PHP_EOL;
82
+ print 'correct :' . $test_value['correct'] . PHP_EOL;
83
+ $this->assertEquals( $test_value['correct'], $return );
84
+
85
+ }
86
+
87
+ }
88
+ }
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.15.3.0
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.15.4.0
7
* Author: Vektor,Inc.
8
* Text Domain: vk-all-in-one-expansion-unit
9
* Domain Path: /languages