VK All in One Expansion Unit - Version 7.9.1

Version Description

[ Bug fix ][ CSS Customize ] encode bug fix

Download this release

Release Info

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

Code changes from version 7.9.0 to 7.9.1

plugins/css_customize/css_customize-single.php CHANGED
@@ -6,7 +6,7 @@
6
  add_action( 'admin_menu', 'veu_custom_css_hooks' );
7
  add_action( 'save_post', 'veu_save_custom_css' );
8
  // </head>タグの直上に出力させたいので第三引数に 50 を設定
9
- add_action( 'wp_head', 'veu_insert_custom_css', 50 );
10
 
11
 
12
  /*
@@ -67,6 +67,19 @@ function veu_save_custom_css( $post_id ) {
67
  } // function veu_save_custom_css($post_id) {
68
 
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  /*
71
  入力された CSS をソースに出力
72
  /* ------------------------------------------------ */
@@ -78,8 +91,8 @@ function veu_insert_custom_css() {
78
  if ( have_posts() ) :
79
  while ( have_posts() ) :
80
  the_post();
81
- // preg_replace で改行を削除して wp_kses_post でエスケープする
82
- echo '<style type="text/css">' . wp_kses_post( preg_replace( '/(?:\n|\r|\r\n)/', '', get_post_meta( get_the_ID(), '_veu_custom_css', true ) ) ) . '</style>';
83
  endwhile;
84
  endif;
85
  // ページ上の別の場所で同じクエリを再利用するために、ループの投稿情報を巻き戻し、前回と同じ順序で先頭の投稿を取得できるように
6
  add_action( 'admin_menu', 'veu_custom_css_hooks' );
7
  add_action( 'save_post', 'veu_save_custom_css' );
8
  // </head>タグの直上に出力させたいので第三引数に 50 を設定
9
+ add_action( 'wp_head', 'veu_insert_custom_css', 201 );
10
 
11
 
12
  /*
67
  } // function veu_save_custom_css($post_id) {
68
 
69
 
70
+ function veu_get_the_custom_css_single( $post ) {
71
+ $css_customize = get_post_meta( $post->ID, '_veu_custom_css', true );
72
+ if ( $css_customize ) {
73
+ // delete br
74
+ $css_customize = str_replace( PHP_EOL, '', $css_customize );
75
+ // delete tab
76
+ $css_customize = preg_replace( '/[\n\r\t]/', '', $css_customize );
77
+ // multi space convert to single space
78
+ $css_customize = preg_replace( '/\s(?=\s)/', '', $css_customize );
79
+ }
80
+ return strip_tags( $css_customize );
81
+ }
82
+
83
  /*
84
  入力された CSS をソースに出力
85
  /* ------------------------------------------------ */
91
  if ( have_posts() ) :
92
  while ( have_posts() ) :
93
  the_post();
94
+ global $post;
95
+ echo '<style type="text/css">' . veu_get_the_custom_css_single( $post ) . '</style>';
96
  endwhile;
97
  endif;
98
  // ページ上の別の場所で同じクエリを再利用するために、ループの投稿情報を巻き戻し、前回と同じ順序で先頭の投稿を取得できるように
plugins/css_customize/css_customize.php CHANGED
@@ -103,22 +103,14 @@ class veu_css_customize {
103
  $data['mess'] = '<div id="message" class="error"><p>' . __( 'Error occured. Please try again.', 'biz-vektor' ) . '</p></div>'; }
104
  }
105
 
106
- $data['customCss'] = $this->css_customize_get_css();
107
 
108
  return $data;
109
  }
110
 
 
111
 
112
- public function css_customize_get_css() {
113
-
114
- if ( get_option( 'vkExUnit_css_customize' ) ) {
115
- return get_option( 'vkExUnit_css_customize' ); } else {
116
- return ''; }
117
- }
118
-
119
- public function css_customize_get_css_min() {
120
-
121
- $css_customize = $this->css_customize_get_css();
122
 
123
  if ( $css_customize ) {
124
  // delete br
@@ -132,11 +124,16 @@ class veu_css_customize {
132
 
133
  }
134
 
 
 
 
 
 
135
  public function css_customize_push_css() {
136
- $css_customize = $this->css_customize_get_css_min();
137
  if ( $css_customize ) {
138
  ?>
139
- <style type="text/css">/* <?php echo veu_get_short_name(); ?> CSS Customize */<?php echo wp_kses_post( $css_customize ); ?>/* End <?php echo veu_get_short_name(); ?> CSS Customize */</style>
140
  <?php
141
  } // if ( get_option( 'vkExUnit_css_customize' ) ) {
142
  } // public function css_customize_push_css() {
103
  $data['mess'] = '<div id="message" class="error"><p>' . __( 'Error occured. Please try again.', 'biz-vektor' ) . '</p></div>'; }
104
  }
105
 
106
+ $data['customCss'] = get_option( 'vkExUnit_css_customize' );
107
 
108
  return $data;
109
  }
110
 
111
+ public static function css_customize_get_css_min() {
112
 
113
+ $css_customize = get_option( 'vkExUnit_css_customize' );
 
 
 
 
 
 
 
 
 
114
 
115
  if ( $css_customize ) {
116
  // delete br
124
 
125
  }
126
 
127
+ public static function css_customize_get_the_css_min() {
128
+ $css_customize = strip_tags( veu_css_customize::css_customize_get_css_min() );
129
+ return $css_customize;
130
+ }
131
+
132
  public function css_customize_push_css() {
133
+ $css_customize = veu_css_customize::css_customize_get_the_css_min();
134
  if ( $css_customize ) {
135
  ?>
136
+ <style type="text/css">/* <?php echo veu_get_short_name(); ?> CSS Customize */<?php echo $css_customize; ?>/* End <?php echo veu_get_short_name(); ?> CSS Customize */</style>
137
  <?php
138
  } // if ( get_option( 'vkExUnit_css_customize' ) ) {
139
  } // public function css_customize_push_css() {
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.4
6
  Tested up to: 5.0.3
7
- Stable tag: 7.9.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -86,6 +86,10 @@ e.g.
86
 
87
  == Changelog ==
88
 
 
 
 
 
89
  = 7.9.0 =
90
  [ Add Function][ Add Insert ] Google Auto Ads
91
  [ Bug fix ][ smooth scroll ] Anchor link header fix offset
4
  Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Facebook Page Plugin, OG tags,
5
  Requires at least: 4.4
6
  Tested up to: 5.0.3
7
+ Stable tag: 7.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
86
 
87
  == Changelog ==
88
 
89
+
90
+ = 7.9.1 =
91
+ [ Bug fix ][ CSS Customize ] encode bug fix
92
+
93
  = 7.9.0 =
94
  [ Add Function][ Add Insert ] Google Auto Ads
95
  [ Bug fix ][ smooth scroll ] Anchor link header fix offset
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: 7.9.0
7
  * Author: Vektor,Inc.
8
  * Text Domain: vkExUnit
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: 7.9.1
7
  * Author: Vektor,Inc.
8
  * Text Domain: vkExUnit
9
  * Domain Path: /languages