VK All in One Expansion Unit - Version 9.43.0.0

Version Description

[ Specification Change ][ CSS Optimize ] default off / exclude wooCommerce preload [ Add function ][ CSS Optimize ] Add exclude handles

Download this release

Release Info

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

Code changes from version 9.42.1.0 to 9.43.0.0

inc/term-color/package/class.term-color.php CHANGED
@@ -38,7 +38,7 @@ if ( ! class_exists( 'Vk_term_color' ) ) {
38
  ?>
39
  <div class="form-field">
40
  <?php wp_nonce_field( basename( __FILE__ ), 'term_color_nonce' ); ?>
41
- <label for="term_color"><?php _e( 'Color', 'vk_term_color_textdomain' ); ?></label>
42
  <input type="text" name="term_color" id="term_color" class="term_color" value="">
43
  </div>
44
  <?php
@@ -53,7 +53,7 @@ if ( ! class_exists( 'Vk_term_color' ) ) {
53
  $term_color = self::get_term_color( $term->term_id );
54
  ?>
55
  <tr class="form-field">
56
- <th scope="row" valign="top"><label for="term_color"><?php _e( 'Color', 'vk_term_color_textdomain' ); ?></label></th>
57
  <td>
58
  <?php wp_nonce_field( basename( __FILE__ ), 'term_color_nonce' ); ?>
59
  <input type="text" name="term_color" id="term_color" class="term_color" value="<?php echo $term_color; ?>">
@@ -127,7 +127,7 @@ if ( ! class_exists( 'Vk_term_color' ) ) {
127
 
128
  function edit_term_columns( $columns ) {
129
 
130
- $columns['color'] = __( 'Color', 'vk_term_color_textdomain' );
131
 
132
  return $columns;
133
  }
38
  ?>
39
  <div class="form-field">
40
  <?php wp_nonce_field( basename( __FILE__ ), 'term_color_nonce' ); ?>
41
+ <label for="term_color"><?php _e( 'Color', 'vk-all-in-one-expansion-unit' ); ?></label>
42
  <input type="text" name="term_color" id="term_color" class="term_color" value="">
43
  </div>
44
  <?php
53
  $term_color = self::get_term_color( $term->term_id );
54
  ?>
55
  <tr class="form-field">
56
+ <th scope="row" valign="top"><label for="term_color"><?php _e( 'Color', 'vk-all-in-one-expansion-unit' ); ?></label></th>
57
  <td>
58
  <?php wp_nonce_field( basename( __FILE__ ), 'term_color_nonce' ); ?>
59
  <input type="text" name="term_color" id="term_color" class="term_color" value="<?php echo $term_color; ?>">
127
 
128
  function edit_term_columns( $columns ) {
129
 
130
+ $columns['color'] = __( 'Color', 'vk-all-in-one-expansion-unit' );
131
 
132
  return $columns;
133
  }
inc/vk-css-optimize/package/class-vk-css-optimize.php CHANGED
@@ -100,7 +100,7 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
100
  $wp_customize->add_control(
101
  'vk_css_optimize_options[tree_shaking_class_exclude]',
102
  array(
103
- 'label' => __( 'Exclude class of tree shaking', 'vk-all-in-one-expansion-unit' ),
104
  'section' => 'css_optimize',
105
  'settings' => 'vk_css_optimize_options[tree_shaking_class_exclude]',
106
  'type' => 'textarea',
@@ -154,6 +154,34 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
154
  )
155
  );
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
 
159
  /**
@@ -171,10 +199,7 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
171
  }
172
 
173
  $vk_css_optimize_options = get_option( 'vk_css_optimize_options' );
174
- $vk_css_optimize_options_default = array(
175
- 'tree_shaking' => 'active',
176
- 'preload' => 'active',
177
- );
178
 
179
  // fall back function
180
  // Actualy other array exist but optimize_css is most important
@@ -275,17 +300,24 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
275
 
276
  $vk_css_tree_shaking_array = VK_CSS_Optimize::css_tree_shaking_array();
277
 
278
- $tree_shaking_handles = array();
279
 
280
  $options = VK_CSS_Optimize::get_css_optimize_options();
281
 
282
  // tree shaking がかかっているものはpreloadから除外する
283
  // でないと表示時に一瞬崩れて結局実用性に問題があるため
284
  foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
285
- $tree_shaking_handles[] = $vk_css_array['id'];
286
  }
 
 
 
 
 
 
 
287
  // クリティカルじゃないCSS(tree shakingにかけているもの以外)をpreload
288
- if ( ! in_array( $handle, $tree_shaking_handles ) ){
289
  $tag = "<link rel='preload' id='".$handle."-css' href='".$href."' as='style' onload=\"this.onload=null;this.rel='stylesheet'\"/>\n";
290
  $tag .= "<link rel='stylesheet' id='".$handle."-css' href='".$href."' media='print' onload=\"this.media='all'; this.onload=null;\">\n";
291
  }
100
  $wp_customize->add_control(
101
  'vk_css_optimize_options[tree_shaking_class_exclude]',
102
  array(
103
+ 'label' => __( 'Exclude class of Tree shaking', 'vk-all-in-one-expansion-unit' ),
104
  'section' => 'css_optimize',
105
  'settings' => 'vk_css_optimize_options[tree_shaking_class_exclude]',
106
  'type' => 'textarea',
154
  )
155
  );
156
 
157
+ $wp_customize->add_setting(
158
+ 'vk_css_optimize_options[preload_handle_exclude]',
159
+ array(
160
+ 'default' => '',
161
+ 'type' => 'option',
162
+ 'capability' => 'edit_theme_options',
163
+ 'sanitize_callback' => 'sanitize_text_field',
164
+ )
165
+ );
166
+ $wp_customize->add_control(
167
+ 'vk_css_optimize_options[preload_handle_exclude]',
168
+ array(
169
+ 'label' => __( 'Exclude class of Preload CSS', 'vk-all-in-one-expansion-unit' ),
170
+ 'section' => 'css_optimize',
171
+ 'settings' => 'vk_css_optimize_options[preload_handle_exclude]',
172
+ 'type' => 'textarea',
173
+ 'description' => __( 'If you choose "Active Preload CSS" that css load timing was changed.If you have any do not want to preload css file that please fill in handle(id) name. Ex) pluginname_a-style,pluginname_b-css' ),
174
+ )
175
+ );
176
+
177
+ }
178
+
179
+ public static function get_css_optimize_options_default(){
180
+ $vk_css_optimize_options_default = array(
181
+ 'tree_shaking' => '',
182
+ 'preload' => '',
183
+ );
184
+ return apply_filters( 'vk_css_optimize_options_default', $vk_css_optimize_options_default );
185
  }
186
 
187
  /**
199
  }
200
 
201
  $vk_css_optimize_options = get_option( 'vk_css_optimize_options' );
202
+ $vk_css_optimize_options_default = VK_CSS_Optimize::get_css_optimize_options_default();
 
 
 
203
 
204
  // fall back function
205
  // Actualy other array exist but optimize_css is most important
300
 
301
  $vk_css_tree_shaking_array = VK_CSS_Optimize::css_tree_shaking_array();
302
 
303
+ $exclude_handles = array( 'woocommerce-layout', 'woocommerce-smallscreen-css', 'woocommerce-general-css' );
304
 
305
  $options = VK_CSS_Optimize::get_css_optimize_options();
306
 
307
  // tree shaking がかかっているものはpreloadから除外する
308
  // でないと表示時に一瞬崩れて結局実用性に問題があるため
309
  foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
310
+ $exclude_handles[] = $vk_css_array['id'];
311
  }
312
+
313
+ if ( ! empty( $options['preload_handle_exclude'] ) ){
314
+ $exclude_array = explode(",", $options['preload_handle_exclude']);
315
+ $exclude_handles = array_merge( $exclude_array, $exclude_handles );
316
+ }
317
+
318
+ $exclude_handles = apply_filters( 'vk_css_preload_exclude_handles', $exclude_handles );
319
  // クリティカルじゃないCSS(tree shakingにかけているもの以外)をpreload
320
+ if ( ! in_array( $handle, $exclude_handles ) ){
321
  $tag = "<link rel='preload' id='".$handle."-css' href='".$href."' as='style' onload=\"this.onload=null;this.rel='stylesheet'\"/>\n";
322
  $tag .= "<link rel='stylesheet' id='".$handle."-css' href='".$href."' media='print' onload=\"this.media='all'; this.onload=null;\">\n";
323
  }
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.1
7
- Stable tag: 9.42.1.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.42.1.0 =
85
  [ Bug fix ] Fix Customize error ( ad vk customize helpers )
86
 
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.43.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.43.0.0 =
85
+ [ Specification Change ][ CSS Optimize ] default off / exclude wooCommerce preload
86
+ [ Add function ][ CSS Optimize ] Add exclude handles
87
+
88
  = 9.42.1.0 =
89
  [ Bug fix ] Fix Customize error ( ad vk customize helpers )
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.42.1.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.43.0.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vk-all-in-one-expansion-unit
9
  * Domain Path: /languages