VK All in One Expansion Unit - Version 9.41.0.0

Version Description

[ Specification Change ] Cope with G-XXXXXXXXXX [ Bug fix ][ Facebook Page Plugin / twitter widget ] fix unload

Download this release

Release Info

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

Code changes from version 9.40.0.0 to 9.41.0.0

admin/vk-admin/package/class-vk-admin.php CHANGED
@@ -100,11 +100,11 @@ if ( ! class_exists( 'Vk_Admin' ) ) {
100
  // プラグイン VK Block Patterns を有効化していない人にバナーを表示
101
  if ( ! self::plugin_exists( 'vk-block-patterns/vk-block-patterns.php' ) ) {
102
  if ( $lang == 'ja' ) {
103
- $bnr_file_name = 'vk-block-patterns_bnr.jpg';
104
  } else {
105
- $bnr_file_name = 'vk-block-patterns_bnr.jpg';
106
  }
107
- $banner .= '<a href="//wordpress.org/plugins/vk-block-patterns/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="VK Block Patterns" /></a>';
108
  }
109
 
110
  // プラグイン Link Target Controller を有効化していない人にバナーを表示
@@ -114,7 +114,7 @@ if ( ! class_exists( 'Vk_Admin' ) ) {
114
  } else {
115
  $bnr_file_name = 'vk-link-target-controller_notxt_bnr.jpg';
116
  }
117
- $banner .= '<a href="//wordpress.org/plugins/vk-link-target-controller/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="Link Target Controller" /></a>';
118
  }
119
 
120
  // プラグイン VK Aost Author Display を有効化していない人にバナーを表示
@@ -124,7 +124,7 @@ if ( ! class_exists( 'Vk_Admin' ) ) {
124
  } else {
125
  $bnr_file_name = 'post_author_display_bnr_en.jpg';
126
  }
127
- $banner .= '<a href="//wordpress.org/plugins/vk-post-author-display/" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="VK Post Author
128
  Display" /></a>';
129
  }
130
 
100
  // プラグイン VK Block Patterns を有効化していない人にバナーを表示
101
  if ( ! self::plugin_exists( 'vk-block-patterns/vk-block-patterns.php' ) ) {
102
  if ( $lang == 'ja' ) {
103
+ $bnr_file_name = 'vk-block-patterns_bnr_ja.jpg';
104
  } else {
105
+ $bnr_file_name = 'vk-block-patterns_bnr_en.jpg';
106
  }
107
+ $banner .= '<a href="'.admin_url('plugin-install.php?s=vk+block+patterns&tab=search&type=term').'" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="VK Block Patterns" /></a>';
108
  }
109
 
110
  // プラグイン Link Target Controller を有効化していない人にバナーを表示
114
  } else {
115
  $bnr_file_name = 'vk-link-target-controller_notxt_bnr.jpg';
116
  }
117
+ $banner .= '<a href="' . admin_url( 'plugin-install.php?s=vk+link+target+controller&tab=search&type=term' ) . '" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="Link Target Controller" /></a>';
118
  }
119
 
120
  // プラグイン VK Aost Author Display を有効化していない人にバナーを表示
124
  } else {
125
  $bnr_file_name = 'post_author_display_bnr_en.jpg';
126
  }
127
+ $banner .= '<a href="' . admin_url( 'plugin-install.php?s=VK+Post+Author+Display&tab=search&type=term' ) . '" target="_blank" class="admin_banner"><img src="' . $dir_url . 'images/' . $bnr_file_name . '" alt="VK Post Author
128
  Display" /></a>';
129
  }
130
 
admin/vk-admin/package/images/vk-block-patterns_bnr_en.jpg ADDED
Binary file
admin/vk-admin/package/images/vk-block-patterns_bnr_ja.jpg ADDED
Binary file
inc/google_analytics/ga_admin.php CHANGED
@@ -12,8 +12,8 @@
12
  <tr>
13
  <th><?php _e( 'Google Analytics Settings', 'vk-all-in-one-expansion-unit' ); ?></th>
14
  <td><?php _e( 'Please fill in the Google Analytics ID from the Analytics embed code used in the site.', 'vk-all-in-one-expansion-unit' ); ?><br />
15
- <p>UA-<input type="text" name="vkExUnit_ga_options[gaId]" id="gaId" value="<?php echo esc_attr( $options['gaId'] ); ?>" style="width:90%;" /><br />
16
- <?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' );?>XXXXXXXX-X</p>
17
 
18
  <dl>
19
  <dt><?php _e( 'Please select the type of Analytics code . (If you are unsure you can skip this.)', 'vk-all-in-one-expansion-unit' ); ?></dt>
12
  <tr>
13
  <th><?php _e( 'Google Analytics Settings', 'vk-all-in-one-expansion-unit' ); ?></th>
14
  <td><?php _e( 'Please fill in the Google Analytics ID from the Analytics embed code used in the site.', 'vk-all-in-one-expansion-unit' ); ?><br />
15
+ <p><input type="text" name="vkExUnit_ga_options[gaId]" id="gaId" value="<?php echo esc_attr( $options['gaId'] ); ?>" style="width:90%;" /><br />
16
+ <?php _e( 'ex) ', 'vk-all-in-one-expansion-unit' );?>UA-XXXXXXXX-X / G-XXXXXXXXXX</p>
17
 
18
  <dl>
19
  <dt><?php _e( 'Please select the type of Analytics code . (If you are unsure you can skip this.)', 'vk-all-in-one-expansion-unit' ); ?></dt>
inc/google_analytics/google_analytics.php CHANGED
@@ -93,7 +93,7 @@ function vkExUnit_googleAnalytics() {
93
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
94
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
95
 
96
- ga('create', 'UA-<?php echo $gaId; ?>', '<?php echo $domain; ?>');
97
  ga('send', 'pageview');
98
  </script>
99
  <?php
@@ -116,15 +116,19 @@ function vkExUnit_googleAnalytics() {
116
  <?php
117
  } else {
118
  // $gaType == 'gaType_gtag'
 
 
 
 
 
119
  ?>
120
- <!-- Global site tag (gtag.js) - Google Analytics -->
121
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-<?php echo $gaId; ?>"></script>
122
  <script>
123
- window.dataLayer = window.dataLayer || [];
124
- function gtag(){dataLayer.push(arguments);}
125
- gtag('js', new Date());
126
-
127
- gtag('config', 'UA-<?php echo $gaId; ?>');
128
  </script>
129
  <?php
130
  }
93
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
94
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
95
 
96
+ ga('create', 'UA-<?php echo esc_attr( $gaId ); ?>', '<?php echo $domain; ?>');
97
  ga('send', 'pageview');
98
  </script>
99
  <?php
116
  <?php
117
  } else {
118
  // $gaType == 'gaType_gtag'
119
+ if ( ! preg_match( '/G-/', $gaId ) && ! preg_match( '/UA-/', $gaId ) ){
120
+ $gtag_id = 'UA-' . $gaId;
121
+ } else {
122
+ $gtag_id = $gaId;
123
+ }
124
  ?>
125
+ <!-- Global site tag (gtag.js) - Google Analytics -->
126
+ <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo esc_attr( $gtag_id ); ?>"></script>
127
  <script>
128
+ window.dataLayer = window.dataLayer || [];
129
+ function gtag(){dataLayer.push(arguments);}
130
+ gtag('js', new Date());
131
+ gtag('config', '<?php echo esc_attr( $gtag_id ); ?>');
 
132
  </script>
133
  <?php
134
  }
inc/sns/sns.php CHANGED
@@ -194,7 +194,7 @@ function exUnit_print_fbId_script() {
194
  ?>
195
  <script>
196
  ;(function(w,d){
197
- var f=function(){
198
  (function(d, s, id) {
199
  var js, fjs = d.getElementsByTagName(s)[0];
200
  if (d.getElementById(id)) return;
@@ -202,9 +202,19 @@ function exUnit_print_fbId_script() {
202
  js.src = "//connect.facebook.net/<?php echo esc_attr( _x( 'en_US', 'facebook language code', 'vk-all-in-one-expansion-unit' ) ); ?>/sdk.js#xfbml=1&version=v2.9&appId=<?php echo esc_html( $fbAppId ); ?>";
203
  fjs.parentNode.insertBefore(js, fjs);
204
  }(d, 'script', 'facebook-jssdk'));
 
 
 
205
  w.removeEventListener('scroll',f,true);
206
  };
207
- w.addEventListener('scroll',f,true);
 
 
 
 
 
 
 
208
  })(window,document);
209
  </script>
210
  <?php
@@ -218,15 +228,25 @@ function veu_print_twitter_script() {
218
  ?>
219
  <script type="text/javascript">
220
  ;(function(w,d){
221
- var f=function(){
222
  var s=d.createElement('script');
223
  s.async='async';
224
  s.charset='utf-8';
225
  s.src='//platform.twitter.com/widgets.js';
226
  d.body.appendChild(s);
 
 
 
227
  w.removeEventListener('scroll',f,true);
228
  };
229
- w.addEventListener('scroll',f,true);
 
 
 
 
 
 
 
230
  })(window,document);
231
  </script>
232
  <?php
194
  ?>
195
  <script>
196
  ;(function(w,d){
197
+ var load_contents=function(){
198
  (function(d, s, id) {
199
  var js, fjs = d.getElementsByTagName(s)[0];
200
  if (d.getElementById(id)) return;
202
  js.src = "//connect.facebook.net/<?php echo esc_attr( _x( 'en_US', 'facebook language code', 'vk-all-in-one-expansion-unit' ) ); ?>/sdk.js#xfbml=1&version=v2.9&appId=<?php echo esc_html( $fbAppId ); ?>";
203
  fjs.parentNode.insertBefore(js, fjs);
204
  }(d, 'script', 'facebook-jssdk'));
205
+ };
206
+ var f=function(){
207
+ load_contents();
208
  w.removeEventListener('scroll',f,true);
209
  };
210
+ var widget = d.getElementsByClassName("fb-page")[0];
211
+ var view_bottom = d.documentElement.scrollTop + d.documentElement.clientHeight;
212
+ var widget_top = widget.getBoundingClientRect().top + w.scrollY;
213
+ if ( widget_top < view_bottom) {
214
+ load_contents();
215
+ } else {
216
+ w.addEventListener('scroll',f,true);
217
+ }
218
  })(window,document);
219
  </script>
220
  <?php
228
  ?>
229
  <script type="text/javascript">
230
  ;(function(w,d){
231
+ var load_contents=function(){
232
  var s=d.createElement('script');
233
  s.async='async';
234
  s.charset='utf-8';
235
  s.src='//platform.twitter.com/widgets.js';
236
  d.body.appendChild(s);
237
+ };
238
+ var f=function(){
239
+ load_contents();
240
  w.removeEventListener('scroll',f,true);
241
  };
242
+ var widget = d.getElementsByClassName("twitter-timeline")[0];
243
+ var view_bottom = d.documentElement.scrollTop + d.documentElement.clientHeight;
244
+ var widget_top = widget.getBoundingClientRect().top + w.scrollY;
245
+ if ( widget_top < view_bottom) {
246
+ load_contents();
247
+ } else {
248
+ w.addEventListener('scroll',f,true);
249
+ }
250
  })(window,document);
251
  </script>
252
  <?php
inc/template-tags/package/template-tags.php CHANGED
@@ -200,10 +200,9 @@ if ( ! function_exists( 'vk_get_page_description' ) ) {
200
  function vk_get_page_description() {
201
  global $wp_query;
202
  $post = $wp_query->get_queried_object();
203
- if ( is_search() ) {
204
  $page_description = '';
205
- }
206
- elseif ( is_front_page() ) {
207
  if ( isset( $post->post_excerpt ) && $post->post_excerpt ) {
208
  $page_description = get_the_excerpt();
209
  } else {
200
  function vk_get_page_description() {
201
  global $wp_query;
202
  $post = $wp_query->get_queried_object();
203
+ if ( is_search() || is_404() ) {
204
  $page_description = '';
205
+ } elseif ( is_front_page() ) {
 
206
  if ( isset( $post->post_excerpt ) && $post->post_excerpt ) {
207
  $page_description = get_the_excerpt();
208
  } else {
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Plugin Name ===
2
- Contributors: vektor-inc,kurudrive,nc30,SaoriMiyazaki,catherine8007,naoki0h,rickaddison7634,una9,kaorock72
3
  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.1
7
- Stable tag: 9.40.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -81,6 +81,10 @@ e.g.
81
 
82
  == Changelog ==
83
 
 
 
 
 
84
  = 9.40.0.0 =
85
  [ Add filter ][ ie alert ] Can be able to change the message in the filter
86
 
1
  === Plugin Name ===
2
+ Contributors: vektor-inc,kurudrive,hinaloe,jim912,hideokamoto,nc30,SaoriMiyazaki,catherine8007,naoki0h,rickaddison7634,una9,kaorock72,kurishimak
3
  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.1
7
+ Stable tag: 9.41.0.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
81
 
82
  == Changelog ==
83
 
84
+ = 9.41.0.0 =
85
+ [ Specification Change ] Cope with G-XXXXXXXXXX
86
+ [ Bug fix ][ Facebook Page Plugin / twitter widget ] fix unload
87
+
88
  = 9.40.0.0 =
89
  [ Add filter ][ ie alert ] Can be able to change the message in the filter
90
 
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.40.0.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.41.0.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vk-all-in-one-expansion-unit
9
  * Domain Path: /languages