Version Description
[ Bug Fix ][ Custom Post Type Manager ] Fix translate [ Bug Fix ][ CSS Optimize lib ] library Update [ Bug Fix ] Fix load Font Awesome Files on WordPress.com [ Other ][ BreadCrumb ] Update composer library 0.2.2
Download this release
Release Info
Developer | kurudrive |
Plugin | VK All in One Expansion Unit |
Version | 9.76.1.0 |
Comparing to | |
See all releases |
Code changes from version 9.76.0.1 to 9.76.1.0
- inc/post-type-manager/package/class.post-type-manager.php +12 -3
- inc/vk-css-optimize/package/class-css-tree-shaking.php +350 -226
- inc/vk-css-optimize/package/class-vk-css-optimize.php +77 -40
- readme.txt +7 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +7 -7
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.json +18 -14
- vendor/composer/installed.php +15 -15
- vendor/vektor-inc/font-awesome-versions/src/VkFontAwesomeVersions.php +19 -5
- vendor/vektor-inc/font-awesome-versions/src/languages/font-awesome-versions-ja.po +1 -1
- vendor/vektor-inc/font-awesome-versions/src/languages/font-awesome-versioons.pot +1 -1
- vendor/vektor-inc/vk-breadcrumb/phpunit.xml.dist +15 -0
- vendor/vektor-inc/vk-breadcrumb/src/VkBreadcrumb.php +74 -62
- veu-packages.php +1 -2
- vkExUnit.php +1 -1
inc/post-type-manager/package/class.post-type-manager.php
CHANGED
@@ -365,17 +365,24 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
|
|
365 |
// REST API を使用するかどうか.
|
366 |
$rest_api_true = ( empty( $taxonomy['rest_api'] ) ) ? false : true;
|
367 |
|
|
|
|
|
|
|
|
|
368 |
$args = array(
|
369 |
'hierarchical' => $hierarchical_true,
|
370 |
'update_count_callback' => '_update_post_term_count',
|
371 |
-
'
|
372 |
-
'singular_label' => $taxonomy['label'],
|
373 |
'public' => true,
|
374 |
'show_ui' => true,
|
375 |
'show_in_rest' => $rest_api_true,
|
376 |
'show_admin_column' => true,
|
377 |
);
|
378 |
|
|
|
|
|
|
|
|
|
379 |
register_taxonomy(
|
380 |
$taxonomy['slug'],
|
381 |
$post_type_id,
|
@@ -401,7 +408,9 @@ if ( ! class_exists( 'VK_Post_Type_Manager' ) ) {
|
|
401 |
add_action( 'admin_init', array( $this, 'add_cap_post_type_manage' ) );
|
402 |
add_action( 'save_post', array( $this, 'save_cf_value' ) );
|
403 |
add_action( 'admin_menu', array( $this, 'add_meta_box' ) );
|
404 |
-
|
|
|
|
|
405 |
add_action( 'admin_notices', array( $this, 'add_post_notice' ) );
|
406 |
}
|
407 |
|
365 |
// REST API を使用するかどうか.
|
366 |
$rest_api_true = ( empty( $taxonomy['rest_api'] ) ) ? false : true;
|
367 |
|
368 |
+
$labels = array(
|
369 |
+
'name' => $taxonomy['label'],
|
370 |
+
);
|
371 |
+
|
372 |
$args = array(
|
373 |
'hierarchical' => $hierarchical_true,
|
374 |
'update_count_callback' => '_update_post_term_count',
|
375 |
+
'labels' => $labels,
|
|
|
376 |
'public' => true,
|
377 |
'show_ui' => true,
|
378 |
'show_in_rest' => $rest_api_true,
|
379 |
'show_admin_column' => true,
|
380 |
);
|
381 |
|
382 |
+
if ( $rest_api_true ) {
|
383 |
+
$args['rest_base'] = $taxonomy['slug'];
|
384 |
+
}
|
385 |
+
|
386 |
register_taxonomy(
|
387 |
$taxonomy['slug'],
|
388 |
$post_type_id,
|
408 |
add_action( 'admin_init', array( $this, 'add_cap_post_type_manage' ) );
|
409 |
add_action( 'save_post', array( $this, 'save_cf_value' ) );
|
410 |
add_action( 'admin_menu', array( $this, 'add_meta_box' ) );
|
411 |
+
// after_setup_theme では 6.0 頃から翻訳があたらなくなる .
|
412 |
+
// init でも 0 などなど早めのpriority 指定しないと投稿タイプに連動するウィジェットエリアが動作しない .
|
413 |
+
add_action( 'init', array( $this, 'add_post_type' ), 0 );
|
414 |
add_action( 'admin_notices', array( $this, 'add_post_notice' ) );
|
415 |
}
|
416 |
|
inc/vk-css-optimize/package/class-css-tree-shaking.php
CHANGED
@@ -7,252 +7,376 @@ If you want to change this file, please change the original file.
|
|
7 |
/**
|
8 |
* CSS Simple Tree Shaking
|
9 |
*
|
10 |
-
* Description: CSS
|
11 |
*
|
12 |
-
* Version: 1.0
|
13 |
* Author: enomoto@celtislab
|
14 |
* Modefied: Vektor:Inc.
|
15 |
* Author URI: https://celtislab.net/
|
16 |
* License: GPLv2
|
|
|
17 |
*/
|
18 |
-
namespace celtislab;
|
19 |
|
20 |
defined( 'ABSPATH' ) || exit;
|
21 |
|
|
|
22 |
class CSS_tree_shaking {
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
28 |
function __construct() {}
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
foreach ( $match[2] as $val ) {
|
100 |
-
// $jsaddlist 登録名が一部でも含まれていれば削除しない(処理を簡略化するため上位層のセレクタのみで判定)
|
101 |
-
if ( in_array( $val, self::$jsaddlist ) ) {
|
102 |
-
break;
|
103 |
-
}
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
127 |
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
if ( ! in_array( trim( $matches[1] ), self::$varlist ) ) {
|
146 |
-
$data = '';
|
147 |
-
}
|
148 |
-
return $data;
|
149 |
-
},
|
150 |
-
$ncss
|
151 |
-
);
|
152 |
-
$ncss = preg_replace_callback(
|
153 |
-
'|(\-\-[\w\-]+?):(.+?)([;\}])|u',
|
154 |
-
function( $matches ) {
|
155 |
-
$data = $matches[0];
|
156 |
-
if ( ! preg_match( '|url\(|u', $matches[2] ) && ! in_array( trim( $matches[1] ), self::$varlist ) ) {
|
157 |
-
$data = ( $matches[3] === '}' ) ? '}' : '';
|
158 |
-
}
|
159 |
-
return $data;
|
160 |
-
},
|
161 |
-
$ncss
|
162 |
-
);
|
163 |
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$css = preg_replace( '/([\{\}:=,\(*\/!;>])\s/', '$1', $css );
|
180 |
-
}
|
181 |
-
return $css;
|
182 |
-
}
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
}
|
7 |
/**
|
8 |
* CSS Simple Tree Shaking
|
9 |
*
|
10 |
+
* Description: CSS tree shaking minify library
|
11 |
*
|
12 |
+
* Version: 2.1.0
|
13 |
* Author: enomoto@celtislab
|
14 |
* Modefied: Vektor:Inc.
|
15 |
* Author URI: https://celtislab.net/
|
16 |
* License: GPLv2
|
17 |
+
*
|
18 |
*/
|
19 |
+
namespace celtislab\v2_1;
|
20 |
|
21 |
defined( 'ABSPATH' ) || exit;
|
22 |
|
23 |
+
|
24 |
class CSS_tree_shaking {
|
25 |
|
26 |
+
private static $cmplist;
|
27 |
+
private static $jsaddlist;
|
28 |
+
|
29 |
+
const SHAKING_PATTERN = '#@(?<pref>\-[\w]+\-)?(?<atname>((keyframes|supports|media|container|layer)[^\{]+?))\{(?<atstyle>.*?\})\}|@([^;\{\}]+?)(;|\{.*?\})|(?<sel>.+?)\{(?<pv>.+?)\}#u';
|
30 |
+
|
31 |
function __construct() {}
|
32 |
|
33 |
+
//上書きカスタムCSS(simple_minify済)をセレクタ(md5),プロパティ,値の配列にする
|
34 |
+
//※セレクタが複数の場合も考慮して完全同一記述のセレクタのみを簡潔に重複判定出来るよう md5 を使用
|
35 |
+
public static function create_csslist($cusomcss, &$csslist) {
|
36 |
+
if(preg_match_all( self::SHAKING_PATTERN, $cusomcss, $matches, PREG_SET_ORDER)){
|
37 |
+
foreach ($matches as $style) {
|
38 |
+
if(!empty($style['atname'])){
|
39 |
+
$atkey = md5(trim($style['pref'] . $style['atname']));
|
40 |
+
if(preg_match_all( '#(?<sel>.+?)\{(?<pv>.+?)\}#u', $style['atstyle'], $atcustoms, PREG_SET_ORDER)){
|
41 |
+
foreach ($atcustoms as $subitem) {
|
42 |
+
self::_create_csslist($atkey, $subitem['sel'], $subitem['pv'], $csslist);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
} elseif(!empty($style['sel'])) {
|
46 |
+
self::_create_csslist(0, $style['sel'], $style['pv'], $csslist);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
private static function _create_csslist($key, $sel, $pv, &$csslist) {
|
52 |
+
$sel = md5(trim($sel));
|
53 |
+
$pv = array_map("trim", preg_split("|[:;]|", $pv));
|
54 |
+
$pcnt= count($pv);
|
55 |
+
for($i=0; $i<$pcnt; $i += 2){
|
56 |
+
if(empty($pv[$i]))
|
57 |
+
break;
|
58 |
+
$csslist[ $key ][ $sel ][ $pv[$i] ] = $pv[$i+1];
|
59 |
+
}
|
60 |
+
}
|
61 |
|
62 |
+
//selector 内の :not :where :is :has 疑似クラスを退避(カッコ内の,区切りによるセレクタ誤解析回避のため)
|
63 |
+
public static function evacuate_pseudo($selector, &$temp) {
|
64 |
+
$newsel = '';
|
65 |
+
$ofset = 0;
|
66 |
+
$maxlen = strlen($selector);
|
67 |
+
while($ofset < $maxlen){
|
68 |
+
if(preg_match('#(:not|:where|:is|:has)\(#u', substr($selector, $ofset), $omatch)){
|
69 |
+
$open = strpos($selector, $omatch[0], $ofset) + strlen($omatch[0]);
|
70 |
+
if($ofset < $open){
|
71 |
+
$newsel .= substr($selector, $ofset, $open - $ofset);
|
72 |
+
}
|
73 |
+
$ofset = $open;
|
74 |
+
$depth = 1;
|
75 |
+
while($depth > 0){
|
76 |
+
if(preg_match('#(\(|\))#u', substr($selector, $ofset), $cmatch)){
|
77 |
+
$ofset = strpos($selector, $cmatch[0], $ofset) + strlen($cmatch[0]);
|
78 |
+
if($cmatch[1] == '('){
|
79 |
+
$depth++;
|
80 |
+
} else{
|
81 |
+
$depth--;
|
82 |
+
}
|
83 |
+
if($depth === 0){
|
84 |
+
$replace = substr($selector, $open, $ofset - $open - 1);
|
85 |
+
$pskey = md5($replace);
|
86 |
+
$temp[$pskey] = $replace;
|
87 |
+
$newsel .= $pskey . ')';
|
88 |
+
}
|
89 |
+
} else {
|
90 |
+
$newsel .= substr($selector, $ofset);
|
91 |
+
$ofset = $maxlen;
|
92 |
+
break;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
} else {
|
96 |
+
$newsel .= substr($selector, $ofset);
|
97 |
+
break;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
return $newsel;
|
101 |
+
}
|
102 |
|
103 |
+
//selector 内の :not :where :is :has 疑似クラスを復元
|
104 |
+
public static function restore_pseudo($selector, &$temp) {
|
105 |
+
if(!empty($temp)){
|
106 |
+
$selector = preg_replace_callback( '#(:not|:where|:is|:has)\((.*?)\)#u', function($match) use(&$temp) {
|
107 |
+
$kv = $match[2];
|
108 |
+
if(!empty($kv) && isset($temp[ $kv ])){
|
109 |
+
$kv = $temp[ $kv ];
|
110 |
+
}
|
111 |
+
return $match[1] . '(' . $kv . ')';
|
112 |
+
}, $selector);
|
113 |
+
}
|
114 |
+
return $selector;
|
115 |
+
}
|
116 |
|
117 |
+
//CSS から未使用の id, class, tag を含む定義を削除
|
118 |
+
private static function tree_shaking($css, $customcsslist=array(), $atkey='') {
|
119 |
+
$ncss = preg_replace_callback( self::SHAKING_PATTERN, function($mstyle) use(&$customcsslist, &$atkey) {
|
120 |
+
$data = $mstyle[0];
|
121 |
+
if(!empty($mstyle['atname'])){
|
122 |
+
$atkey = md5(trim($mstyle['pref'] . $mstyle['atname']));
|
123 |
+
$atcss = self::tree_shaking( $mstyle['atstyle'], $customcsslist, $atkey );
|
124 |
+
$atkey = ''; //key clear
|
125 |
+
$data = (!empty($atcss))? '@' . trim($mstyle['pref'] . $mstyle['atname']) . '{' . $atcss . '}' : '';
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
+
} elseif(!empty($mstyle['sel'])) {
|
128 |
+
$sel = $mstyle['sel'];
|
129 |
+
$pv = $mstyle['pv'];
|
130 |
+
if(!empty($customcsslist)){
|
131 |
+
//tree shaking 前に上書きカスタムCSSとの重複あれば該当プロパティを削除
|
132 |
+
$atkey = (!empty($atkey))? $atkey : 0;
|
133 |
+
$skey = md5(trim($sel));
|
134 |
+
if(!empty($customcsslist[$atkey][$skey])){
|
135 |
+
$_pv = array_map("trim", preg_split("|[:;]|", $pv));
|
136 |
+
$pcnt= count($_pv);
|
137 |
+
for($i=0; $i<$pcnt; $i += 2){
|
138 |
+
if(!empty($_pv[$i]) && isset( $customcsslist[ $atkey ][ $skey ][ $_pv[$i] ] )){
|
139 |
+
$pv = preg_replace( '/(^|;|\s)(' . preg_quote($_pv[$i]) . ')\s?:.*?(url\([^\)]+?\).*?)?(;|$)/u', '$1', $pv, 1 );
|
140 |
+
}
|
141 |
+
}
|
142 |
+
if(!empty($pv)){
|
143 |
+
$pv = preg_replace('/\s+/su', ' ', $pv);
|
144 |
+
$pv = trim($pv);
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
$pattern = array( 'id' => '|(#)([\w\-\\%]+)|u',
|
149 |
+
'class' => '|(\.)([\w\-\\%]+)|u',
|
150 |
+
'tag' => '/(^|[,\s>\+~\(\)\]\|])([\w\-]+)/iu',
|
151 |
+
);
|
152 |
|
153 |
+
$pseudo = array();
|
154 |
+
$sel = self::evacuate_pseudo($sel, $pseudo);
|
155 |
+
$slist = array_map("trim", explode(',', $sel));
|
156 |
+
foreach ($slist as $s) {
|
157 |
+
//selector の判定条件から :not :where :is :has を除外 ($_s で判定して削除時は $s で行う)
|
158 |
+
$_s = $s;
|
159 |
+
foreach (array(':not',':where',':is',':has') as $psd) {
|
160 |
+
if(strpos($_s, $psd) !== false){
|
161 |
+
$_s = preg_replace("/$psd\(.+?\)/", '', $_s );
|
162 |
+
}
|
163 |
+
}
|
164 |
+
foreach (array('id','class','tag') as $item) {
|
165 |
+
if(!empty($_s) && preg_match_all( $pattern[$item], $_s, $match)){
|
166 |
+
foreach ($match[2] as $v) {
|
167 |
+
//$jsaddlist 登録名が含まれていれば削除しない(処理を簡略化するため上位層のセレクタのみで判定)
|
168 |
+
if(isset(self::$jsaddlist[$v]))
|
169 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
|
171 |
+
//$cmplist 登録名に含まれていなければ削除
|
172 |
+
$delfg = false;
|
173 |
+
if(!isset(self::$cmplist[$item][$v]) && !preg_match('/^[0-9]+/', $v)){
|
174 |
+
$delfg = true;
|
175 |
+
} elseif($item === 'tag' && preg_match('#\[type\s?=\s?[\'"](.+?)[\'"]#', $_s, $type)){
|
176 |
+
if(!isset(self::$cmplist['type'][$type[1]])){
|
177 |
+
$delfg = true;
|
178 |
+
}
|
179 |
+
}
|
180 |
+
if($delfg){
|
181 |
+
$sel = preg_replace( '/(' . preg_quote($s) . ')(,|$)/u', '$2', $sel, 1 );
|
182 |
+
$_s = '';
|
183 |
+
break;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
if(!empty($_s)){
|
189 |
+
// id / css 属性セレクタ限定の部分マッチチェック
|
190 |
+
if(preg_match_all( '#\[(?<attr>class|id)(?<type>\^|\$|\*)?=["\'](?<str>[\w\-]+?)["\'].*?\]#', $_s, $smatch, PREG_SET_ORDER)){
|
191 |
+
foreach ($smatch as $item) {
|
192 |
+
$attr = $item['attr'];
|
193 |
+
$type = $item['type'];
|
194 |
+
if($type == '^'){
|
195 |
+
$str = $type . $item['str'];
|
196 |
+
} elseif($type == '$'){
|
197 |
+
$str = $item['str'] . $type;
|
198 |
+
} elseif($type == '*'){
|
199 |
+
$str = $item['str'];
|
200 |
+
} else {
|
201 |
+
$str = '^' . $item['str'] . '$';
|
202 |
+
}
|
203 |
+
//属性セレクタにマッチしなければ削除
|
204 |
+
if ( ($ret = strpos(self::$cmplist[ $attr . '_str' ], $str )) === false){
|
205 |
+
$sel = preg_replace( '/(' . preg_quote($s) . ')(,|$)/u', '$2', $sel, 1 );
|
206 |
+
$_s = '';
|
207 |
+
break;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
$sel = self::restore_pseudo($sel, $pseudo);
|
214 |
|
215 |
+
if(!empty($sel)){
|
216 |
+
$sel = preg_replace('/,+/su', ',', $sel);
|
217 |
+
$sel = preg_replace('/\s+/su', ' ', $sel);
|
218 |
+
$sel = trim($sel);
|
219 |
+
$sel = trim($sel, ',');
|
220 |
+
}
|
221 |
+
$data = (!empty($sel) && !empty($pv))? $sel . '{'. $pv .'}' : '';
|
222 |
+
}
|
223 |
+
return $data;
|
224 |
+
}, $css);
|
225 |
+
return $ncss;
|
226 |
+
}
|
|
|
|
|
|
|
|
|
227 |
|
228 |
+
//未使用変数定義の削除(tree_shaking 実行後に実施する)
|
229 |
+
//CSSファイルが分割されていると使われている変数定義まで削除の可能性があるので amp-custom style に限定した使用を想定
|
230 |
+
public static function tree_shaking4var($css) {
|
231 |
+
$varlist = array();
|
232 |
+
if(preg_match_all( "/var\((\-\-[^\s\),]+?)[\s\),]/iu", $css, $vmatches)){
|
233 |
+
foreach ($vmatches[1] as $v) {
|
234 |
+
$v = trim($v);
|
235 |
+
if(!isset($varlist[$v])){
|
236 |
+
$varlist[$v] = 1;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
}
|
240 |
+
//url() 定義時は文字列中に ; が含まれている場合あり
|
241 |
+
$pattern = '/(\-\-[\w\-]+?):.*?(url\([^\)]+?\).*?)?([;\}])/u';
|
242 |
+
$css = preg_replace_callback( $pattern, function($match) use(&$varlist) {
|
243 |
+
$vdef = $match[0];
|
244 |
+
$var = trim($match[1]);
|
245 |
+
if(!isset($varlist[ $var ])){
|
246 |
+
$vdef = ($match[3] === '}')? '}' : '';
|
247 |
+
}
|
248 |
+
return $vdef;
|
249 |
+
}, $css);
|
250 |
+
return $css;
|
251 |
+
}
|
252 |
+
|
253 |
+
/*=============================================================
|
254 |
+
* CSS 内のコメント、改行、空白等を削除するだけのシンプルな縮小化
|
255 |
+
*/
|
256 |
+
public static function simple_minify( $css ) {
|
257 |
+
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css );
|
258 |
+
$css = str_replace(array("\r", "\n"), '', $css);
|
259 |
+
$css = str_replace("\t", ' ', $css);
|
260 |
+
$css = preg_replace('/\s+/su', ' ', $css);
|
261 |
+
$css = preg_replace('/\s([\{\}=,\)\/;>])/', '$1', $css);
|
262 |
+
$css = preg_replace('/([\{\}:=,\(\/!;])\s/', '$1', $css);
|
263 |
+
return $css;
|
264 |
+
}
|
265 |
+
|
266 |
+
/*=============================================================
|
267 |
+
* css(simple_minify済)の未使用 id, class, tag に関する定義を取り除き縮小化
|
268 |
+
*/
|
269 |
+
public static function extended_minify($css, $html, $jsaddlist=array(), $varminify=false, $customcsslist=array()) {
|
270 |
+
self::$jsaddlist = array();
|
271 |
+
if(!empty($jsaddlist)){ //JS によりDOMロード後に追加される ID や class 等が除外されなくするための名前の事前登録用
|
272 |
+
foreach ($jsaddlist as $tag) {
|
273 |
+
if(!isset(self::$jsaddlist[$tag])){
|
274 |
+
self::$jsaddlist[$tag] = 1;
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
if(empty(self::$cmplist['parse'])){
|
280 |
+
self::$cmplist['parse'] = true;
|
281 |
+
self::$cmplist['id_str'] = '';
|
282 |
+
self::$cmplist['class_str'] = '';
|
283 |
+
|
284 |
+
$inidata = array(
|
285 |
+
'id' => array(),
|
286 |
+
'class' => array(
|
287 |
+
'device-mobile',
|
288 |
+
'header_scrolled',
|
289 |
+
'active',
|
290 |
+
'menu-open',
|
291 |
+
'vk-mobile-nav-menu-btn',
|
292 |
+
'vk-mobile-nav-open',
|
293 |
+
'vk-menu-acc-active',
|
294 |
+
'acc-parent-open',
|
295 |
+
'acc-btn',
|
296 |
+
'acc-btn-open',
|
297 |
+
'acc-btn-close',
|
298 |
+
'acc-child-open',
|
299 |
+
'carousel-item-left',
|
300 |
+
'carousel-item-next',
|
301 |
+
'carousel-item-right',
|
302 |
+
'carousel-item-prev',
|
303 |
+
'form-control',
|
304 |
+
'btn',
|
305 |
+
'btn-primary',
|
306 |
+
'.vk_post_imgOuter a:hover .card-img-overlay::after',
|
307 |
+
),
|
308 |
+
'tag' => array(
|
309 |
+
'html',
|
310 |
+
'head',
|
311 |
+
'body',
|
312 |
+
'title',
|
313 |
+
'style',
|
314 |
+
'meta',
|
315 |
+
'link',
|
316 |
+
'script',
|
317 |
+
'noscript',
|
318 |
+
),
|
319 |
+
);
|
320 |
+
$inidata = apply_filters( 'css_tree_shaking_exclude', $inidata );
|
321 |
|
322 |
+
foreach (array('id','class','tag') as $item) {
|
323 |
+
foreach ($inidata[$item] as $tag) {
|
324 |
+
if(!isset(self::$cmplist[$item][$tag])){
|
325 |
+
self::$cmplist[$item][$tag] = 1;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
}
|
329 |
+
//HTML から使用している tag, id, class 抽出
|
330 |
+
$pattern = '#<style(?<catrb>.*?)>.*?<\/style|<script(?<satrb>.*?)>.*?<\/script|<!--.+?-->|<(?<tag>[\w\-]+)(?<tatrb>.*?)>#si';
|
331 |
+
if(preg_match_all( $pattern, $html, $items, PREG_SET_ORDER)){
|
332 |
+
foreach ($items as $item) {
|
333 |
+
$atrb = '';
|
334 |
+
if(!empty($item['tag'])){
|
335 |
+
if(!isset(self::$cmplist['tag'][$item['tag']])){
|
336 |
+
self::$cmplist['tag'][$item['tag']] = 1;
|
337 |
+
}
|
338 |
+
$atrb = $item['tatrb'];
|
339 |
+
//type ほぼ input のみと思われる
|
340 |
+
if(preg_match('#type\s?=\s?[\'"](.+?)[\'"]#u', $atrb, $type)){
|
341 |
+
if(!isset(self::$cmplist['type'][$type[1]])){
|
342 |
+
self::$cmplist['type'][$type[1]] = 1;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
} elseif(!empty($item['catrb'])) {
|
346 |
+
$atrb = $item['catrb'];
|
347 |
+
} elseif(!empty($item['satrb'])) {
|
348 |
+
$atrb = $item['satrb'];
|
349 |
+
}
|
350 |
+
$atrb = trim($atrb);
|
351 |
+
if(!empty($atrb)){
|
352 |
+
if(preg_match('#id\s?=\s?[\'"](.+?)[\'"]#u', $atrb, $id)){
|
353 |
+
$arr = array_map("trim", explode(' ', $id[1]));
|
354 |
+
foreach($arr as $id){
|
355 |
+
$id = trim($id);
|
356 |
+
if(!isset(self::$cmplist['id'][$id])){
|
357 |
+
self::$cmplist['id'][$id] = 1;
|
358 |
+
self::$cmplist['id_str'] .= '^' . $id . '$';
|
359 |
+
}
|
360 |
+
}
|
361 |
+
}
|
362 |
+
if(preg_match('#class\s?=\s?[\'"](.+?)[\'"]#u', $atrb, $cls)){
|
363 |
+
$arr = array_map("trim", explode(' ', $cls[1]));
|
364 |
+
foreach($arr as $cls){
|
365 |
+
$cls = trim($cls);
|
366 |
+
if(!isset(self::$cmplist['class'][$cls])){
|
367 |
+
self::$cmplist['class'][$cls] = 1;
|
368 |
+
self::$cmplist['class_str'] .= '^' . $cls . '$';
|
369 |
+
}
|
370 |
+
}
|
371 |
+
}
|
372 |
+
}
|
373 |
+
}
|
374 |
+
}
|
375 |
+
}
|
376 |
+
$css = self::tree_shaking( $css, $customcsslist );
|
377 |
+
if($varminify){
|
378 |
+
$css = self::tree_shaking4var( $css );
|
379 |
+
}
|
380 |
+
return $css;
|
381 |
+
}
|
382 |
}
|
inc/vk-css-optimize/package/class-vk-css-optimize.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* VK CSS Optimize
|
4 |
-
*
|
5 |
* @package VK CSS Optimize
|
6 |
*/
|
7 |
|
@@ -27,8 +27,7 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
27 |
$options = self::get_css_optimize_options();
|
28 |
|
29 |
if ( ! empty( $options['tree_shaking'] ) ) {
|
30 |
-
|
31 |
-
add_action( 'shutdown', array( __CLASS__, 'get_html_end' ), 0 );
|
32 |
}
|
33 |
|
34 |
if ( ! empty( $options['preload'] ) ) {
|
@@ -38,6 +37,8 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
38 |
|
39 |
/**
|
40 |
* Customize Register
|
|
|
|
|
41 |
*/
|
42 |
public static function customize_register( $wp_customize ) {
|
43 |
global $prefix_customize_panel;
|
@@ -49,9 +50,7 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
49 |
)
|
50 |
);
|
51 |
|
52 |
-
// Tree shaking
|
53 |
-
//
|
54 |
-
|
55 |
$wp_customize->add_setting(
|
56 |
'tree_shaking_title',
|
57 |
array(
|
@@ -67,7 +66,6 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
67 |
'section' => 'css_optimize',
|
68 |
'type' => 'text',
|
69 |
'custom_title_sub' => '',
|
70 |
-
// 'custom_html' => __( 'Move part of CSS and JS to the footer to improve display speed.', 'vk-all-in-one-expansion-unit' ),
|
71 |
)
|
72 |
)
|
73 |
);
|
@@ -116,8 +114,7 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
116 |
)
|
117 |
);
|
118 |
|
119 |
-
// Preload
|
120 |
-
//
|
121 |
$wp_customize->add_setting(
|
122 |
'css_preload_title',
|
123 |
array(
|
@@ -133,7 +130,6 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
133 |
'section' => 'css_optimize',
|
134 |
'type' => 'text',
|
135 |
'custom_title_sub' => '',
|
136 |
-
// 'custom_html' => __( 'Move part of CSS and JS to the footer to improve display speed.', 'vk-all-in-one-expansion-unit' ),
|
137 |
)
|
138 |
)
|
139 |
);
|
@@ -186,6 +182,8 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
186 |
|
187 |
/**
|
188 |
* CSS Optimize Default Options
|
|
|
|
|
189 |
*/
|
190 |
public static function get_css_optimize_options_default() {
|
191 |
$vk_css_optimize_options_default = array(
|
@@ -197,10 +195,15 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
197 |
|
198 |
/**
|
199 |
* CSS Optimize Options
|
|
|
|
|
|
|
200 |
*/
|
201 |
public static function get_css_optimize_options() {
|
202 |
|
203 |
$theme_textdomain = wp_get_theme()->get( 'TextDomain' );
|
|
|
|
|
204 |
if ( 'lightning' === $theme_textdomain || 'lightning-pro' === $theme_textdomain ) {
|
205 |
$old_options = get_option( 'lightning_theme_options' );
|
206 |
} elseif ( 'katawara' === $theme_textdomain ) {
|
@@ -212,12 +215,11 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
212 |
$vk_css_optimize_options = get_option( 'vk_css_optimize_options' );
|
213 |
$vk_css_optimize_options_default = self::get_css_optimize_options_default();
|
214 |
|
215 |
-
//
|
216 |
-
// Actualy other array exist but optimize_css is most important
|
217 |
if ( ! isset( $vk_css_optimize_options['tree_shaking'] ) ) {
|
218 |
-
|
219 |
if ( isset( $old_options['optimize_css'] ) ) {
|
220 |
-
if (
|
221 |
$vk_css_optimize_options['tree_shaking'] = 'active';
|
222 |
} else {
|
223 |
$vk_css_optimize_options['tree_shaking'] = '';
|
@@ -225,16 +227,19 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
225 |
}
|
226 |
}
|
227 |
|
|
|
228 |
if ( ! isset( $vk_css_optimize_options['tree_shaking_class_exclude'] ) ) {
|
|
|
229 |
if ( ! empty( $old_options['tree_shaking_class_exclude'] ) ) {
|
230 |
$vk_css_optimize_options['tree_shaking_class_exclude'] = esc_html( $old_options['tree_shaking_class_exclude'] );
|
231 |
}
|
232 |
}
|
233 |
|
|
|
234 |
if ( ! isset( $vk_css_optimize_options['preload'] ) ) {
|
235 |
-
|
236 |
if ( isset( $old_options['optimize_css'] ) ) {
|
237 |
-
if ( $old_options['optimize_css']
|
238 |
$vk_css_optimize_options['preload'] = 'active';
|
239 |
} else {
|
240 |
$vk_css_optimize_options['preload'] = '';
|
@@ -255,22 +260,24 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
255 |
|
256 |
/**
|
257 |
* Get HTML Document Start
|
|
|
|
|
|
|
258 |
*/
|
259 |
-
public static function get_html_start() {
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
* Get HTML Document End
|
265 |
-
*/
|
266 |
-
public static function get_html_end() {
|
267 |
-
if ( ob_get_length() ) {
|
268 |
-
ob_end_flush();
|
269 |
}
|
|
|
270 |
}
|
271 |
|
272 |
/**
|
273 |
* Array of Apply Tree Shaking
|
|
|
|
|
|
|
274 |
*/
|
275 |
public static function css_tree_shaking_array() {
|
276 |
$vk_css_tree_shaking_array = array();
|
@@ -280,6 +287,9 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
280 |
|
281 |
/**
|
282 |
* Array of Apply Simple Minify
|
|
|
|
|
|
|
283 |
*/
|
284 |
public static function css_simple_minify_array() {
|
285 |
$vk_css_simple_minify_array = array();
|
@@ -291,35 +301,47 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
291 |
* Change Buffer of HTML Document
|
292 |
*
|
293 |
* @param string $buffer Gotten HTML Document
|
|
|
294 |
*/
|
295 |
public static function css_tree_shaking_buffer( $buffer ) {
|
296 |
|
297 |
$options = self::get_css_optimize_options();
|
298 |
|
299 |
-
// Lode Modules
|
|
|
300 |
require_once dirname( __FILE__ ) . '/class-css-tree-shaking.php';
|
301 |
|
302 |
-
// Load Arrays
|
|
|
303 |
$vk_css_tree_shaking_array = self::css_tree_shaking_array();
|
304 |
$vk_css_simple_minify_array = self::css_simple_minify_array();
|
305 |
|
306 |
-
//
|
|
|
|
|
|
|
|
|
307 |
foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
|
308 |
|
309 |
-
//
|
310 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
311 |
$path_name = $vk_css_array['path'];
|
312 |
if ( WP_Filesystem() ) {
|
313 |
global $wp_filesystem;
|
|
|
314 |
$css = $wp_filesystem->get_contents( $path_name );
|
315 |
}
|
316 |
|
317 |
-
|
|
|
|
|
|
|
318 |
$buffer = str_replace(
|
319 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '?ver=' . $vk_css_array['version'] . '\' type=\'text/css\' media=\'all\' />',
|
320 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
321 |
$buffer
|
322 |
);
|
|
|
|
|
323 |
$buffer = str_replace(
|
324 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '\' type=\'text/css\' media=\'all\' />',
|
325 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
@@ -328,24 +350,25 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
328 |
|
329 |
}
|
330 |
|
331 |
-
// CSS Simply Minify.
|
|
|
332 |
foreach ( $vk_css_simple_minify_array as $vk_css_array ) {
|
333 |
|
334 |
-
// WP File System で CSS ファイルを読み込み
|
335 |
-
require_once ABSPATH . 'wp-admin/includes/file.php';
|
336 |
$path_name = $vk_css_array['path'];
|
337 |
if ( WP_Filesystem() ) {
|
338 |
global $wp_filesystem;
|
339 |
$css = $wp_filesystem->get_contents( $path_name );
|
340 |
}
|
341 |
|
342 |
-
$css = celtislab\CSS_tree_shaking::simple_minify( $css );
|
343 |
|
|
|
344 |
$buffer = str_replace(
|
345 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '?ver=' . $vk_css_array['version'] . '\' type=\'text/css\' media=\'all\' />',
|
346 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
347 |
$buffer
|
348 |
);
|
|
|
349 |
$buffer = str_replace(
|
350 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '\' type=\'text/css\' media=\'all\' />',
|
351 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
@@ -357,6 +380,15 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
357 |
return $buffer;
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
public static function css_preload( $tag, $handle, $href, $media ) {
|
361 |
|
362 |
$vk_css_tree_shaking_array = self::css_tree_shaking_array();
|
@@ -367,25 +399,30 @@ if ( ! class_exists( 'VK_CSS_Optimize' ) ) {
|
|
367 |
$options = self::get_css_optimize_options();
|
368 |
|
369 |
// tree shaking がかかっているものはpreloadから除外する
|
370 |
-
//
|
371 |
foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
|
372 |
$exclude_handles[] = $vk_css_array['id'];
|
373 |
}
|
374 |
|
375 |
// Simple Minify がかかっているものはpreloadから除外する
|
376 |
-
//
|
377 |
foreach ( $vk_css_simple_minify_array as $vk_css_array ) {
|
378 |
$exclude_handles[] = $vk_css_array['id'];
|
379 |
}
|
380 |
|
|
|
381 |
if ( ! empty( $options['preload_handle_exclude'] ) ) {
|
382 |
-
|
|
|
|
|
383 |
$exclude_handles = array_merge( $exclude_array, $exclude_handles );
|
384 |
}
|
385 |
|
386 |
$exclude_handles = apply_filters( 'vk_css_preload_exclude_handles', $exclude_handles );
|
387 |
-
|
|
|
388 |
if ( ! in_array( $handle, $exclude_handles ) ) {
|
|
|
389 |
$tag = "<link rel='preload' id='" . $handle . "-css' href='" . $href . "' as='style' onload=\"this.onload=null;this.rel='stylesheet'\"/>\n";
|
390 |
$tag .= "<link rel='stylesheet' id='" . $handle . "-css' href='" . $href . "' media='print' onload=\"this.media='all'; this.onload=null;\">\n";
|
391 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
* VK CSS Optimize
|
4 |
+
*
|
5 |
* @package VK CSS Optimize
|
6 |
*/
|
7 |
|
27 |
$options = self::get_css_optimize_options();
|
28 |
|
29 |
if ( ! empty( $options['tree_shaking'] ) ) {
|
30 |
+
add_filter( 'wp_using_themes', array( __CLASS__, 'get_html_start' ), 1, 1 );
|
|
|
31 |
}
|
32 |
|
33 |
if ( ! empty( $options['preload'] ) ) {
|
37 |
|
38 |
/**
|
39 |
* Customize Register
|
40 |
+
*
|
41 |
+
* @param object $wp_customize : wp custommize object .
|
42 |
*/
|
43 |
public static function customize_register( $wp_customize ) {
|
44 |
global $prefix_customize_panel;
|
50 |
)
|
51 |
);
|
52 |
|
53 |
+
// Tree shaking.
|
|
|
|
|
54 |
$wp_customize->add_setting(
|
55 |
'tree_shaking_title',
|
56 |
array(
|
66 |
'section' => 'css_optimize',
|
67 |
'type' => 'text',
|
68 |
'custom_title_sub' => '',
|
|
|
69 |
)
|
70 |
)
|
71 |
);
|
114 |
)
|
115 |
);
|
116 |
|
117 |
+
// Preload.
|
|
|
118 |
$wp_customize->add_setting(
|
119 |
'css_preload_title',
|
120 |
array(
|
130 |
'section' => 'css_optimize',
|
131 |
'type' => 'text',
|
132 |
'custom_title_sub' => '',
|
|
|
133 |
)
|
134 |
)
|
135 |
);
|
182 |
|
183 |
/**
|
184 |
* CSS Optimize Default Options
|
185 |
+
*
|
186 |
+
* @return array $vk_css_optimize_options_default .
|
187 |
*/
|
188 |
public static function get_css_optimize_options_default() {
|
189 |
$vk_css_optimize_options_default = array(
|
195 |
|
196 |
/**
|
197 |
* CSS Optimize Options
|
198 |
+
* 古いオプションやデフォルト値を結合して返す
|
199 |
+
*
|
200 |
+
* @return array $vk_css_optimize_options .
|
201 |
*/
|
202 |
public static function get_css_optimize_options() {
|
203 |
|
204 |
$theme_textdomain = wp_get_theme()->get( 'TextDomain' );
|
205 |
+
|
206 |
+
// CSS高速化を各テーマなどで保存していた頃の互換処理.
|
207 |
if ( 'lightning' === $theme_textdomain || 'lightning-pro' === $theme_textdomain ) {
|
208 |
$old_options = get_option( 'lightning_theme_options' );
|
209 |
} elseif ( 'katawara' === $theme_textdomain ) {
|
215 |
$vk_css_optimize_options = get_option( 'vk_css_optimize_options' );
|
216 |
$vk_css_optimize_options_default = self::get_css_optimize_options_default();
|
217 |
|
218 |
+
// 新しい保存値に保存されていない場合.
|
|
|
219 |
if ( ! isset( $vk_css_optimize_options['tree_shaking'] ) ) {
|
220 |
+
// 古い設定がある場合(互換処理).
|
221 |
if ( isset( $old_options['optimize_css'] ) ) {
|
222 |
+
if ( 'optomize-all-css' === $old_options['optimize_css'] || 'tree-shaking' === $old_options['optimize_css'] ) {
|
223 |
$vk_css_optimize_options['tree_shaking'] = 'active';
|
224 |
} else {
|
225 |
$vk_css_optimize_options['tree_shaking'] = '';
|
227 |
}
|
228 |
}
|
229 |
|
230 |
+
// 除外指定がない場合.
|
231 |
if ( ! isset( $vk_css_optimize_options['tree_shaking_class_exclude'] ) ) {
|
232 |
+
// 古いoption値で除外指定が存在する場合(互換処理).
|
233 |
if ( ! empty( $old_options['tree_shaking_class_exclude'] ) ) {
|
234 |
$vk_css_optimize_options['tree_shaking_class_exclude'] = esc_html( $old_options['tree_shaking_class_exclude'] );
|
235 |
}
|
236 |
}
|
237 |
|
238 |
+
// プリロード指定がない場合.
|
239 |
if ( ! isset( $vk_css_optimize_options['preload'] ) ) {
|
240 |
+
// 古いoption値でプリロード設定が存在する場合(互換処理).
|
241 |
if ( isset( $old_options['optimize_css'] ) ) {
|
242 |
+
if ( 'optomize-all-css' === $old_options['optimize_css'] ) {
|
243 |
$vk_css_optimize_options['preload'] = 'active';
|
244 |
} else {
|
245 |
$vk_css_optimize_options['preload'] = '';
|
260 |
|
261 |
/**
|
262 |
* Get HTML Document Start
|
263 |
+
*
|
264 |
+
* @param bool $is_use_themes .
|
265 |
+
* @return $is_use_themes;
|
266 |
*/
|
267 |
+
public static function get_html_start( $is_use_themes ) {
|
268 |
+
// template_redirect が呼ばれる前でのみ実行する .
|
269 |
+
if ( $is_use_themes && did_action( 'template_redirect' ) === 0 ) {
|
270 |
+
// バッファ開始.
|
271 |
+
ob_start( 'VK_CSS_Optimize::css_tree_shaking_buffer' );
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
273 |
+
return $is_use_themes;
|
274 |
}
|
275 |
|
276 |
/**
|
277 |
* Array of Apply Tree Shaking
|
278 |
+
* Tree Shaking にかけるCSS情報の配列
|
279 |
+
*
|
280 |
+
* @return array $vk_css_tree_shaking_array.
|
281 |
*/
|
282 |
public static function css_tree_shaking_array() {
|
283 |
$vk_css_tree_shaking_array = array();
|
287 |
|
288 |
/**
|
289 |
* Array of Apply Simple Minify
|
290 |
+
* 単純なCSS最小化にかけるCSS情報の配列
|
291 |
+
*
|
292 |
+
* @return array $vk_css_simple_minify_array
|
293 |
*/
|
294 |
public static function css_simple_minify_array() {
|
295 |
$vk_css_simple_minify_array = array();
|
301 |
* Change Buffer of HTML Document
|
302 |
*
|
303 |
* @param string $buffer Gotten HTML Document
|
304 |
+
* @return $buffer
|
305 |
*/
|
306 |
public static function css_tree_shaking_buffer( $buffer ) {
|
307 |
|
308 |
$options = self::get_css_optimize_options();
|
309 |
|
310 |
+
// Lode Modules.
|
311 |
+
// Tree shaking モジュール読み込み .
|
312 |
require_once dirname( __FILE__ ) . '/class-css-tree-shaking.php';
|
313 |
|
314 |
+
// Load CSS Arrays
|
315 |
+
// 軽量化するCSSの情報配列読み込み.
|
316 |
$vk_css_tree_shaking_array = self::css_tree_shaking_array();
|
317 |
$vk_css_simple_minify_array = self::css_simple_minify_array();
|
318 |
|
319 |
+
// WP_Filesystem() が使えるように読み込み.
|
320 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
321 |
+
|
322 |
+
// CSS Tree Shaking //////////////////////////////////////////// .
|
323 |
+
|
324 |
foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
|
325 |
|
326 |
+
// 読み込むCSSファイルのパス.
|
|
|
327 |
$path_name = $vk_css_array['path'];
|
328 |
if ( WP_Filesystem() ) {
|
329 |
global $wp_filesystem;
|
330 |
+
// CSSのファイルの中身を取得.
|
331 |
$css = $wp_filesystem->get_contents( $path_name );
|
332 |
}
|
333 |
|
334 |
+
// ree shaking を実行して再格納 .
|
335 |
+
$css = celtislab\v2_1\CSS_tree_shaking::extended_minify( celtislab\v2_1\CSS_tree_shaking::simple_minify( $css ), $buffer );
|
336 |
+
|
337 |
+
// ファイルで読み込んでいるCSSを直接出力に置換(バージョンパラメーターあり).
|
338 |
$buffer = str_replace(
|
339 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '?ver=' . $vk_css_array['version'] . '\' type=\'text/css\' media=\'all\' />',
|
340 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
341 |
$buffer
|
342 |
);
|
343 |
+
|
344 |
+
// ファイルで読み込んでいるCSSを直接出力に置換(バージョンパラメーターなし).
|
345 |
$buffer = str_replace(
|
346 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '\' type=\'text/css\' media=\'all\' />',
|
347 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
350 |
|
351 |
}
|
352 |
|
353 |
+
// CSS Simply Minify //////////////////////////////////////////// .
|
354 |
+
|
355 |
foreach ( $vk_css_simple_minify_array as $vk_css_array ) {
|
356 |
|
|
|
|
|
357 |
$path_name = $vk_css_array['path'];
|
358 |
if ( WP_Filesystem() ) {
|
359 |
global $wp_filesystem;
|
360 |
$css = $wp_filesystem->get_contents( $path_name );
|
361 |
}
|
362 |
|
363 |
+
$css = celtislab\v2_1\CSS_tree_shaking::simple_minify( $css );
|
364 |
|
365 |
+
// ファイルで読み込んでいるCSSを直接出力に置換(バージョンパラメーターあり).
|
366 |
$buffer = str_replace(
|
367 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '?ver=' . $vk_css_array['version'] . '\' type=\'text/css\' media=\'all\' />',
|
368 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
369 |
$buffer
|
370 |
);
|
371 |
+
// ファイルで読み込んでいるCSSを直接出力に置換(バージョンパラメーターなし).
|
372 |
$buffer = str_replace(
|
373 |
'<link rel=\'stylesheet\' id=\'' . $vk_css_array['id'] . '-css\' href=\'' . $vk_css_array['url'] . '\' type=\'text/css\' media=\'all\' />',
|
374 |
'<style id=\'' . $vk_css_array['id'] . '-css\' type=\'text/css\'>' . $css . '</style>',
|
380 |
return $buffer;
|
381 |
}
|
382 |
|
383 |
+
/**
|
384 |
+
* Undocumented function
|
385 |
+
*
|
386 |
+
* @param string $tag .
|
387 |
+
* @param string $handle .
|
388 |
+
* @param string $href .
|
389 |
+
* @param string $media .
|
390 |
+
* @return string $tag .
|
391 |
+
*/
|
392 |
public static function css_preload( $tag, $handle, $href, $media ) {
|
393 |
|
394 |
$vk_css_tree_shaking_array = self::css_tree_shaking_array();
|
399 |
$options = self::get_css_optimize_options();
|
400 |
|
401 |
// tree shaking がかかっているものはpreloadから除外する
|
402 |
+
// でないと表示時に一瞬崩れて結局実用性に問題があるため.
|
403 |
foreach ( $vk_css_tree_shaking_array as $vk_css_array ) {
|
404 |
$exclude_handles[] = $vk_css_array['id'];
|
405 |
}
|
406 |
|
407 |
// Simple Minify がかかっているものはpreloadから除外する
|
408 |
+
// でないと表示時に一瞬崩れて結局実用性に問題があるため.
|
409 |
foreach ( $vk_css_simple_minify_array as $vk_css_array ) {
|
410 |
$exclude_handles[] = $vk_css_array['id'];
|
411 |
}
|
412 |
|
413 |
+
// プリロードから除外するCSSハンドルが option で保存されている場合.
|
414 |
if ( ! empty( $options['preload_handle_exclude'] ) ) {
|
415 |
+
// 保存されているされている除外するCSSハンドルを配列に変換.
|
416 |
+
$exclude_array = explode( ',', $options['preload_handle_exclude'] );
|
417 |
+
// 除外するCSSハンドルの配列をマージ.
|
418 |
$exclude_handles = array_merge( $exclude_array, $exclude_handles );
|
419 |
}
|
420 |
|
421 |
$exclude_handles = apply_filters( 'vk_css_preload_exclude_handles', $exclude_handles );
|
422 |
+
|
423 |
+
// クリティカルじゃないCSS(tree shakingにかけているもの以外)をpreload .
|
424 |
if ( ! in_array( $handle, $exclude_handles ) ) {
|
425 |
+
// preload を追加する.
|
426 |
$tag = "<link rel='preload' id='" . $handle . "-css' href='" . $href . "' as='style' onload=\"this.onload=null;this.rel='stylesheet'\"/>\n";
|
427 |
$tag .= "<link rel='stylesheet' id='" . $handle . "-css' href='" . $href . "' media='print' onload=\"this.media='all'; this.onload=null;\">\n";
|
428 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Google Analytics, New posts, Related Posts, sitemap, sns, twitter card, Fa
|
|
5 |
Requires at least: 5.3.0
|
6 |
Tested up to: 5.9.2
|
7 |
Requires PHP: 7.2
|
8 |
-
Stable tag: 9.76.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -81,6 +81,12 @@ e.g.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
= 9.76.0.1 =
|
85 |
* [ Specification Change ] Update VK Font Awesome Versions 0.4.0
|
86 |
* [ Bug fix ][ Child Page List / Contact section / Page list from ancestor ] Fix duplicate Additional CSS classes.
|
5 |
Requires at least: 5.3.0
|
6 |
Tested up to: 5.9.2
|
7 |
Requires PHP: 7.2
|
8 |
+
Stable tag: 9.76.1.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 9.76.1.0 =
|
85 |
+
[ Bug Fix ][ Custom Post Type Manager ] Fix translate
|
86 |
+
[ Bug Fix ][ CSS Optimize lib ] library Update
|
87 |
+
[ Bug Fix ] Fix load Font Awesome Files on WordPress.com
|
88 |
+
[ Other ][ BreadCrumb ] Update composer library 0.2.2
|
89 |
+
|
90 |
= 9.76.0.1 =
|
91 |
* [ Specification Change ] Update VK Font Awesome Versions 0.4.0
|
92 |
* [ Bug fix ][ Child Page List / Contact section / Page list from ancestor ] Fix duplicate Additional CSS classes.
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInitc288c9985326f80fe39a56b01787266f::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -28,7 +28,7 @@ class InstalledVersions
|
|
28 |
{
|
29 |
/**
|
30 |
* @var mixed[]|null
|
31 |
-
* @psalm-var array{root: array{name: string,
|
32 |
*/
|
33 |
private static $installed;
|
34 |
|
@@ -39,7 +39,7 @@ class InstalledVersions
|
|
39 |
|
40 |
/**
|
41 |
* @var array[]
|
42 |
-
* @psalm-var array<string, array{root: array{name: string,
|
43 |
*/
|
44 |
private static $installedByVendor = array();
|
45 |
|
@@ -243,7 +243,7 @@ class InstalledVersions
|
|
243 |
|
244 |
/**
|
245 |
* @return array
|
246 |
-
* @psalm-return array{name: string,
|
247 |
*/
|
248 |
public static function getRootPackage()
|
249 |
{
|
@@ -257,7 +257,7 @@ class InstalledVersions
|
|
257 |
*
|
258 |
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
259 |
* @return array[]
|
260 |
-
* @psalm-return array{root: array{name: string,
|
261 |
*/
|
262 |
public static function getRawData()
|
263 |
{
|
@@ -280,7 +280,7 @@ class InstalledVersions
|
|
280 |
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
281 |
*
|
282 |
* @return array[]
|
283 |
-
* @psalm-return list<array{root: array{name: string,
|
284 |
*/
|
285 |
public static function getAllRawData()
|
286 |
{
|
@@ -303,7 +303,7 @@ class InstalledVersions
|
|
303 |
* @param array[] $data A vendor/composer/installed.php data set
|
304 |
* @return void
|
305 |
*
|
306 |
-
* @psalm-param array{root: array{name: string,
|
307 |
*/
|
308 |
public static function reload($data)
|
309 |
{
|
@@ -313,7 +313,7 @@ class InstalledVersions
|
|
313 |
|
314 |
/**
|
315 |
* @return array[]
|
316 |
-
* @psalm-return list<array{root: array{name: string,
|
317 |
*/
|
318 |
private static function getInstalled()
|
319 |
{
|
28 |
{
|
29 |
/**
|
30 |
* @var mixed[]|null
|
31 |
+
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
32 |
*/
|
33 |
private static $installed;
|
34 |
|
39 |
|
40 |
/**
|
41 |
* @var array[]
|
42 |
+
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
43 |
*/
|
44 |
private static $installedByVendor = array();
|
45 |
|
243 |
|
244 |
/**
|
245 |
* @return array
|
246 |
+
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
247 |
*/
|
248 |
public static function getRootPackage()
|
249 |
{
|
257 |
*
|
258 |
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
259 |
* @return array[]
|
260 |
+
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
261 |
*/
|
262 |
public static function getRawData()
|
263 |
{
|
280 |
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
281 |
*
|
282 |
* @return array[]
|
283 |
+
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
284 |
*/
|
285 |
public static function getAllRawData()
|
286 |
{
|
303 |
* @param array[] $data A vendor/composer/installed.php data set
|
304 |
* @return void
|
305 |
*
|
306 |
+
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
307 |
*/
|
308 |
public static function reload($data)
|
309 |
{
|
313 |
|
314 |
/**
|
315 |
* @return array[]
|
316 |
+
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
317 |
*/
|
318 |
private static function getInstalled()
|
319 |
{
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit50d86ddd58170b8382a1f0e1f7e9c7e0
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
-
call_user_func(\Composer\Autoload\
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitc288c9985326f80fe39a56b01787266f
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInitc288c9985326f80fe39a56b01787266f', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc288c9985326f80fe39a56b01787266f', 'loadClassLoader'));
|
30 |
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitc288c9985326f80fe39a56b01787266f::getInitializer($loader));
|
33 |
|
34 |
$loader->register(true);
|
35 |
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'V' =>
|
@@ -46,9 +46,9 @@ class ComposerStaticInit50d86ddd58170b8382a1f0e1f7e9c7e0
|
|
46 |
public static function getInitializer(ClassLoader $loader)
|
47 |
{
|
48 |
return \Closure::bind(function () use ($loader) {
|
49 |
-
$loader->prefixLengthsPsr4 =
|
50 |
-
$loader->prefixDirsPsr4 =
|
51 |
-
$loader->classMap =
|
52 |
|
53 |
}, null, ClassLoader::class);
|
54 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitc288c9985326f80fe39a56b01787266f
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'V' =>
|
46 |
public static function getInitializer(ClassLoader $loader)
|
47 |
{
|
48 |
return \Closure::bind(function () use ($loader) {
|
49 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitc288c9985326f80fe39a56b01787266f::$prefixLengthsPsr4;
|
50 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitc288c9985326f80fe39a56b01787266f::$prefixDirsPsr4;
|
51 |
+
$loader->classMap = ComposerStaticInitc288c9985326f80fe39a56b01787266f::$classMap;
|
52 |
|
53 |
}, null, ClassLoader::class);
|
54 |
}
|
vendor/composer/installed.json
CHANGED
@@ -2,17 +2,17 @@
|
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "vektor-inc/font-awesome-versions",
|
5 |
-
"version": "0.4.
|
6 |
-
"version_normalized": "0.4.
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/vektor-inc/font-awesome-versions.git",
|
10 |
-
"reference": "
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
-
"url": "https://api.github.com/repos/vektor-inc/font-awesome-versions/zipball/
|
15 |
-
"reference": "
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require": {
|
@@ -22,7 +22,7 @@
|
|
22 |
"wp-phpunit/wp-phpunit": "^5.4",
|
23 |
"yoast/phpunit-polyfills": "^1.0"
|
24 |
},
|
25 |
-
"time": "2022-04-
|
26 |
"type": "library",
|
27 |
"installation-source": "dist",
|
28 |
"autoload": {
|
@@ -43,29 +43,33 @@
|
|
43 |
"description": "Font Awesome",
|
44 |
"support": {
|
45 |
"issues": "https://github.com/vektor-inc/font-awesome-versions/issues",
|
46 |
-
"source": "https://github.com/vektor-inc/font-awesome-versions/tree/0.4.
|
47 |
},
|
48 |
"install-path": "../vektor-inc/font-awesome-versions"
|
49 |
},
|
50 |
{
|
51 |
"name": "vektor-inc/vk-breadcrumb",
|
52 |
-
"version": "0.
|
53 |
-
"version_normalized": "0.
|
54 |
"source": {
|
55 |
"type": "git",
|
56 |
"url": "https://github.com/vektor-inc/vk-breadcrumb.git",
|
57 |
-
"reference": "
|
58 |
},
|
59 |
"dist": {
|
60 |
"type": "zip",
|
61 |
-
"url": "https://api.github.com/repos/vektor-inc/vk-breadcrumb/zipball/
|
62 |
-
"reference": "
|
63 |
"shasum": ""
|
64 |
},
|
65 |
"require": {
|
66 |
"vektor-inc/vk-helpers": "^0.0.2"
|
67 |
},
|
68 |
-
"
|
|
|
|
|
|
|
|
|
69 |
"type": "library",
|
70 |
"installation-source": "dist",
|
71 |
"autoload": {
|
@@ -86,7 +90,7 @@
|
|
86 |
"description": "WordPress Bread Crumb Class",
|
87 |
"support": {
|
88 |
"issues": "https://github.com/vektor-inc/vk-breadcrumb/issues",
|
89 |
-
"source": "https://github.com/vektor-inc/vk-breadcrumb/tree/0.
|
90 |
},
|
91 |
"install-path": "../vektor-inc/vk-breadcrumb"
|
92 |
},
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "vektor-inc/font-awesome-versions",
|
5 |
+
"version": "0.4.1",
|
6 |
+
"version_normalized": "0.4.1.0",
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/vektor-inc/font-awesome-versions.git",
|
10 |
+
"reference": "3a993f14a96dbe8095b3a34813310778d32847e2"
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/vektor-inc/font-awesome-versions/zipball/3a993f14a96dbe8095b3a34813310778d32847e2",
|
15 |
+
"reference": "3a993f14a96dbe8095b3a34813310778d32847e2",
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require": {
|
22 |
"wp-phpunit/wp-phpunit": "^5.4",
|
23 |
"yoast/phpunit-polyfills": "^1.0"
|
24 |
},
|
25 |
+
"time": "2022-04-24T06:53:01+00:00",
|
26 |
"type": "library",
|
27 |
"installation-source": "dist",
|
28 |
"autoload": {
|
43 |
"description": "Font Awesome",
|
44 |
"support": {
|
45 |
"issues": "https://github.com/vektor-inc/font-awesome-versions/issues",
|
46 |
+
"source": "https://github.com/vektor-inc/font-awesome-versions/tree/0.4.1"
|
47 |
},
|
48 |
"install-path": "../vektor-inc/font-awesome-versions"
|
49 |
},
|
50 |
{
|
51 |
"name": "vektor-inc/vk-breadcrumb",
|
52 |
+
"version": "0.2.2",
|
53 |
+
"version_normalized": "0.2.2.0",
|
54 |
"source": {
|
55 |
"type": "git",
|
56 |
"url": "https://github.com/vektor-inc/vk-breadcrumb.git",
|
57 |
+
"reference": "c3c9f09522b2d5688e31dac235a925731bf70d46"
|
58 |
},
|
59 |
"dist": {
|
60 |
"type": "zip",
|
61 |
+
"url": "https://api.github.com/repos/vektor-inc/vk-breadcrumb/zipball/c3c9f09522b2d5688e31dac235a925731bf70d46",
|
62 |
+
"reference": "c3c9f09522b2d5688e31dac235a925731bf70d46",
|
63 |
"shasum": ""
|
64 |
},
|
65 |
"require": {
|
66 |
"vektor-inc/vk-helpers": "^0.0.2"
|
67 |
},
|
68 |
+
"require-dev": {
|
69 |
+
"wp-phpunit/wp-phpunit": "^5.4",
|
70 |
+
"yoast/phpunit-polyfills": "^1.0"
|
71 |
+
},
|
72 |
+
"time": "2022-04-19T07:08:07+00:00",
|
73 |
"type": "library",
|
74 |
"installation-source": "dist",
|
75 |
"autoload": {
|
90 |
"description": "WordPress Bread Crumb Class",
|
91 |
"support": {
|
92 |
"issues": "https://github.com/vektor-inc/vk-breadcrumb/issues",
|
93 |
+
"source": "https://github.com/vektor-inc/vk-breadcrumb/tree/0.2.2"
|
94 |
},
|
95 |
"install-path": "../vektor-inc/vk-breadcrumb"
|
96 |
},
|
vendor/composer/installed.php
CHANGED
@@ -1,58 +1,58 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
-
'
|
4 |
-
'
|
|
|
|
|
5 |
'type' => 'project',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '14ef6bbaaeff2ec722c6ec100bf882f3ad5132e3',
|
9 |
-
'name' => 'vektor-inc/vk-all-in-one-expansion-unit',
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'vektor-inc/font-awesome-versions' => array(
|
14 |
-
'pretty_version' => '0.4.
|
15 |
-
'version' => '0.4.
|
|
|
16 |
'type' => 'library',
|
17 |
'install_path' => __DIR__ . '/../vektor-inc/font-awesome-versions',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '16b3f9fdf71cee93dafc01b56f190a463158bd30',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'vektor-inc/vk-all-in-one-expansion-unit' => array(
|
23 |
-
'pretty_version' => '9.76.0
|
24 |
-
'version' => '9.76.0
|
|
|
25 |
'type' => 'project',
|
26 |
'install_path' => __DIR__ . '/../../',
|
27 |
'aliases' => array(),
|
28 |
-
'reference' => '14ef6bbaaeff2ec722c6ec100bf882f3ad5132e3',
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
'vektor-inc/vk-breadcrumb' => array(
|
32 |
-
'pretty_version' => '0.
|
33 |
-
'version' => '0.
|
|
|
34 |
'type' => 'library',
|
35 |
'install_path' => __DIR__ . '/../vektor-inc/vk-breadcrumb',
|
36 |
'aliases' => array(),
|
37 |
-
'reference' => 'd323e0597729824532d21795f1a986dbde89ab4e',
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
'vektor-inc/vk-helpers' => array(
|
41 |
'pretty_version' => '0.0.2',
|
42 |
'version' => '0.0.2.0',
|
|
|
43 |
'type' => 'library',
|
44 |
'install_path' => __DIR__ . '/../vektor-inc/vk-helpers',
|
45 |
'aliases' => array(),
|
46 |
-
'reference' => '320155b9df7f9f57a889e144dd8b379184ac15ec',
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'vektor-inc/vk-term-color' => array(
|
50 |
'pretty_version' => '0.1.0',
|
51 |
'version' => '0.1.0.0',
|
|
|
52 |
'type' => 'library',
|
53 |
'install_path' => __DIR__ . '/../vektor-inc/vk-term-color',
|
54 |
'aliases' => array(),
|
55 |
-
'reference' => '6a03c52ffbbceba13f8429beb12bbcf4946335c1',
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
),
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
+
'name' => 'vektor-inc/vk-all-in-one-expansion-unit',
|
4 |
+
'pretty_version' => '9.76.1.0',
|
5 |
+
'version' => '9.76.1.0',
|
6 |
+
'reference' => '97d89442dc47546a1d22ea2d26cb09e687ecf7ac',
|
7 |
'type' => 'project',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
|
|
|
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'vektor-inc/font-awesome-versions' => array(
|
14 |
+
'pretty_version' => '0.4.1',
|
15 |
+
'version' => '0.4.1.0',
|
16 |
+
'reference' => '3a993f14a96dbe8095b3a34813310778d32847e2',
|
17 |
'type' => 'library',
|
18 |
'install_path' => __DIR__ . '/../vektor-inc/font-awesome-versions',
|
19 |
'aliases' => array(),
|
|
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'vektor-inc/vk-all-in-one-expansion-unit' => array(
|
23 |
+
'pretty_version' => '9.76.1.0',
|
24 |
+
'version' => '9.76.1.0',
|
25 |
+
'reference' => '97d89442dc47546a1d22ea2d26cb09e687ecf7ac',
|
26 |
'type' => 'project',
|
27 |
'install_path' => __DIR__ . '/../../',
|
28 |
'aliases' => array(),
|
|
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
'vektor-inc/vk-breadcrumb' => array(
|
32 |
+
'pretty_version' => '0.2.2',
|
33 |
+
'version' => '0.2.2.0',
|
34 |
+
'reference' => 'c3c9f09522b2d5688e31dac235a925731bf70d46',
|
35 |
'type' => 'library',
|
36 |
'install_path' => __DIR__ . '/../vektor-inc/vk-breadcrumb',
|
37 |
'aliases' => array(),
|
|
|
38 |
'dev_requirement' => false,
|
39 |
),
|
40 |
'vektor-inc/vk-helpers' => array(
|
41 |
'pretty_version' => '0.0.2',
|
42 |
'version' => '0.0.2.0',
|
43 |
+
'reference' => '320155b9df7f9f57a889e144dd8b379184ac15ec',
|
44 |
'type' => 'library',
|
45 |
'install_path' => __DIR__ . '/../vektor-inc/vk-helpers',
|
46 |
'aliases' => array(),
|
|
|
47 |
'dev_requirement' => false,
|
48 |
),
|
49 |
'vektor-inc/vk-term-color' => array(
|
50 |
'pretty_version' => '0.1.0',
|
51 |
'version' => '0.1.0.0',
|
52 |
+
'reference' => '6a03c52ffbbceba13f8429beb12bbcf4946335c1',
|
53 |
'type' => 'library',
|
54 |
'install_path' => __DIR__ . '/../vektor-inc/vk-term-color',
|
55 |
'aliases' => array(),
|
|
|
56 |
'dev_requirement' => false,
|
57 |
),
|
58 |
),
|
vendor/vektor-inc/font-awesome-versions/src/VkFontAwesomeVersions.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package vektor-inc/font-awesome-versions
|
6 |
* @license GPL-2.0+
|
7 |
*
|
8 |
-
* @version 0.4.
|
9 |
*/
|
10 |
|
11 |
namespace VektorInc\VK_Font_Awesome_Versions;
|
@@ -77,11 +77,25 @@ class VkFontAwesomeVersions {
|
|
77 |
* Undocumented function
|
78 |
*
|
79 |
* @since 0.3.0
|
|
|
80 |
* @return string $uri
|
81 |
*/
|
82 |
-
public static function get_directory_uri() {
|
83 |
-
|
84 |
-
$uri
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
return $uri;
|
86 |
}
|
87 |
|
@@ -373,7 +387,7 @@ class VkFontAwesomeVersions {
|
|
373 |
if ( '4.7' === $current_option ) {
|
374 |
$old_notice .= '<div class="error">';
|
375 |
$old_notice .= '<p>' . __( 'An older version of Font Awesome is selected. This version will be removed by August 2022.', 'font-awesome-versions' ) . '</p>';
|
376 |
-
$old_notice .= '<p>' . __( '
|
377 |
$old_notice .= '<p>' . __( '* It is necessary to reset the icon font in the place where Font Awesome is used.', 'font-awesome-versions' ) . '</p>';
|
378 |
$old_notice .= '</div>';
|
379 |
}
|
5 |
* @package vektor-inc/font-awesome-versions
|
6 |
* @license GPL-2.0+
|
7 |
*
|
8 |
+
* @version 0.4.1
|
9 |
*/
|
10 |
|
11 |
namespace VektorInc\VK_Font_Awesome_Versions;
|
77 |
* Undocumented function
|
78 |
*
|
79 |
* @since 0.3.0
|
80 |
+
* @param string $path : PHPUnit テスト用
|
81 |
* @return string $uri
|
82 |
*/
|
83 |
+
public static function get_directory_uri( $path = '' ) {
|
84 |
+
|
85 |
+
$uri = '';
|
86 |
+
|
87 |
+
if ( ! $path ) {
|
88 |
+
// このファイルのパス.
|
89 |
+
$path = wp_normalize_path( dirname( __FILE__ ) );
|
90 |
+
}
|
91 |
+
|
92 |
+
// ファイルのパスの wp-content より前の部分を site_url() に置換する
|
93 |
+
// ABSPATH の部分を site_url() に置換したいところだが、ABSPATHは WordPress.com で /wordpress/core/5.9.3/ のような返し方をされて、一般的なサーバーのパスとは異なるので、置換などには使用しない.
|
94 |
+
preg_match( '/(.*)(wp-content.*)/', $path, $matches, PREG_OFFSET_CAPTURE );
|
95 |
+
if ( ! empty( $matches[2][0] ) ) {
|
96 |
+
$uri = site_url( '/' ) . $matches[2][0] . '/';
|
97 |
+
}
|
98 |
+
|
99 |
return $uri;
|
100 |
}
|
101 |
|
387 |
if ( '4.7' === $current_option ) {
|
388 |
$old_notice .= '<div class="error">';
|
389 |
$old_notice .= '<p>' . __( 'An older version of Font Awesome is selected. This version will be removed by August 2022.', 'font-awesome-versions' ) . '</p>';
|
390 |
+
$old_notice .= '<p>' . __( 'Please change the version of FontAwesome on the Appearance > Customize screen.', 'font-awesome-versions' ) . '</p>';
|
391 |
$old_notice .= '<p>' . __( '* It is necessary to reset the icon font in the place where Font Awesome is used.', 'font-awesome-versions' ) . '</p>';
|
392 |
$old_notice .= '</div>';
|
393 |
}
|
vendor/vektor-inc/font-awesome-versions/src/languages/font-awesome-versions-ja.po
CHANGED
@@ -40,7 +40,7 @@ msgstr ""
|
|
40 |
|
41 |
#: src/VkFontAwesomeVersions.php:348
|
42 |
msgid ""
|
43 |
-
"
|
44 |
"screen."
|
45 |
msgstr "外観>カスタマイズ画面で、FontAwesomeのバージョンを変更してください。"
|
46 |
|
40 |
|
41 |
#: src/VkFontAwesomeVersions.php:348
|
42 |
msgid ""
|
43 |
+
"Please change the version of FontAwesome on the Appearance > Customize "
|
44 |
"screen."
|
45 |
msgstr "外観>カスタマイズ画面で、FontAwesomeのバージョンを変更してください。"
|
46 |
|
vendor/vektor-inc/font-awesome-versions/src/languages/font-awesome-versioons.pot
CHANGED
@@ -31,7 +31,7 @@ msgid "An older version of Font Awesome is selected. This version will be remove
|
|
31 |
msgstr ""
|
32 |
|
33 |
#: src/VkFontAwesomeVersions.php:348
|
34 |
-
msgid "
|
35 |
msgstr ""
|
36 |
|
37 |
#: src/VkFontAwesomeVersions.php:349
|
31 |
msgstr ""
|
32 |
|
33 |
#: src/VkFontAwesomeVersions.php:348
|
34 |
+
msgid "Please change the version of FontAwesome on the Appearance > Customize screen."
|
35 |
msgstr ""
|
36 |
|
37 |
#: src/VkFontAwesomeVersions.php:349
|
vendor/vektor-inc/vk-breadcrumb/phpunit.xml.dist
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<phpunit
|
3 |
+
bootstrap="tests/bootstrap.php"
|
4 |
+
backupGlobals="false"
|
5 |
+
colors="true"
|
6 |
+
convertErrorsToExceptions="true"
|
7 |
+
convertNoticesToExceptions="true"
|
8 |
+
convertWarningsToExceptions="true"
|
9 |
+
>
|
10 |
+
<testsuites>
|
11 |
+
<testsuite name="default">
|
12 |
+
<directory prefix="test-" suffix=".php">./tests/</directory>
|
13 |
+
</testsuite>
|
14 |
+
</testsuites>
|
15 |
+
</phpunit>
|
vendor/vektor-inc/vk-breadcrumb/src/VkBreadcrumb.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package vektor-inc/vk-breadcrumb
|
6 |
* @license GPL-2.0+
|
7 |
*
|
8 |
-
* @version 0.
|
9 |
*/
|
10 |
|
11 |
namespace VektorInc\VK_Breadcrumb;
|
@@ -350,19 +350,20 @@ class VkBreadcrumb {
|
|
350 |
|
351 |
|
352 |
/**
|
353 |
-
*
|
354 |
*
|
355 |
* @param array $options
|
356 |
*/
|
357 |
-
public static function
|
358 |
|
359 |
if ( ! $options ) {
|
360 |
$options = array(
|
361 |
-
'id_outer'
|
362 |
-
'class_outer'
|
363 |
-
'
|
364 |
-
'
|
365 |
-
'
|
|
|
366 |
);
|
367 |
}
|
368 |
|
@@ -377,8 +378,12 @@ class VkBreadcrumb {
|
|
377 |
$microdata_li_a = ' itemprop="item"';
|
378 |
$microdata_li_a_span = ' itemprop="name"';
|
379 |
|
380 |
-
$breadcrumb_html
|
381 |
-
|
|
|
|
|
|
|
|
|
382 |
$breadcrumb_html .= '<div class="' . esc_attr( $options['class_inner'] ) . '">';
|
383 |
$breadcrumb_html .= '<ol class="' . esc_attr( $options['class_list'] ) . '" itemscope itemtype="https://schema.org/BreadcrumbList">';
|
384 |
|
@@ -424,63 +429,70 @@ class VkBreadcrumb {
|
|
424 |
}
|
425 |
|
426 |
$breadcrumb_html .= '</ol>';
|
427 |
-
$breadcrumb_html .= '</div>
|
428 |
-
</div>
|
429 |
-
<!-- [ /#' . esc_attr( $options['class_outer'] ) . ' ] -->
|
430 |
-
';
|
431 |
$breadcrumb_html = apply_filters( 'vk_breadcrumb_html', $breadcrumb_html );
|
|
|
|
|
|
|
432 |
|
433 |
-
$allowed_html = array(
|
434 |
-
'div' => array(
|
435 |
-
'id' => array(),
|
436 |
-
'class' => array(),
|
437 |
-
'itemprop' => array(),
|
438 |
-
'itemscope' => array(),
|
439 |
-
'itemtype' => array(),
|
440 |
-
),
|
441 |
-
'ol' => array(
|
442 |
-
'id' => array(),
|
443 |
-
'class' => array(),
|
444 |
-
'itemprop' => array(),
|
445 |
-
'itemscope' => array(),
|
446 |
-
'itemtype' => array(),
|
447 |
-
),
|
448 |
-
'li' => array(
|
449 |
-
'id' => array(),
|
450 |
-
'class' => array(),
|
451 |
-
'itemprop' => array(),
|
452 |
-
'itemscope' => array(),
|
453 |
-
'itemtype' => array(),
|
454 |
-
),
|
455 |
-
'a' => array(
|
456 |
-
'id' => array(),
|
457 |
-
'class' => array(),
|
458 |
-
'href' => array(),
|
459 |
-
'target' => array(),
|
460 |
-
'itemprop' => array(),
|
461 |
-
),
|
462 |
-
'span' => array(
|
463 |
-
'id' => array(),
|
464 |
-
'class' => array(),
|
465 |
-
'itemprop' => array(),
|
466 |
-
'itemscope' => array(),
|
467 |
-
'itemtype' => array(),
|
468 |
-
),
|
469 |
-
'i' => array(
|
470 |
-
'id' => array(),
|
471 |
-
'class' => array(),
|
472 |
-
),
|
473 |
-
'meta' => array(
|
474 |
-
'itemprop' => array(),
|
475 |
-
'content' => array(),
|
476 |
-
),
|
477 |
-
'ruby' => array(),
|
478 |
-
'rt' => array(),
|
479 |
-
);
|
480 |
-
echo wp_kses( $breadcrumb_html, $allowed_html );
|
481 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
482 |
}
|
483 |
|
|
|
484 |
/**
|
485 |
* Scheme array
|
486 |
*
|
5 |
* @package vektor-inc/vk-breadcrumb
|
6 |
* @license GPL-2.0+
|
7 |
*
|
8 |
+
* @version 0.2.2
|
9 |
*/
|
10 |
|
11 |
namespace VektorInc\VK_Breadcrumb;
|
350 |
|
351 |
|
352 |
/**
|
353 |
+
* Get Bread Crumb
|
354 |
*
|
355 |
* @param array $options
|
356 |
*/
|
357 |
+
public static function get_breadcrumb( $options = array() ) {
|
358 |
|
359 |
if ( ! $options ) {
|
360 |
$options = array(
|
361 |
+
'id_outer' => 'breadcrumb',
|
362 |
+
'class_outer' => 'breadcrumb',
|
363 |
+
'wrapper_attributes' => '',
|
364 |
+
'class_inner' => 'container',
|
365 |
+
'class_list' => 'breadcrumb-list',
|
366 |
+
'class_list_item' => 'breadcrumb-list__item',
|
367 |
);
|
368 |
}
|
369 |
|
378 |
$microdata_li_a = ' itemprop="item"';
|
379 |
$microdata_li_a_span = ' itemprop="name"';
|
380 |
|
381 |
+
$breadcrumb_html = '<!-- [ #' . esc_attr( $options['class_outer'] ) . ' ] -->';
|
382 |
+
if ( ! empty( $options['wrapper_attributes'] ) ) {
|
383 |
+
$breadcrumb_html .= '<div id="' . esc_attr( $options['id_outer'] ) . '" ' . $options['wrapper_attributes'] . '>';
|
384 |
+
} else {
|
385 |
+
$breadcrumb_html .= '<div id="' . esc_attr( $options['id_outer'] ) . '" class="' . $options['class_outer'] . '">';
|
386 |
+
}
|
387 |
$breadcrumb_html .= '<div class="' . esc_attr( $options['class_inner'] ) . '">';
|
388 |
$breadcrumb_html .= '<ol class="' . esc_attr( $options['class_list'] ) . '" itemscope itemtype="https://schema.org/BreadcrumbList">';
|
389 |
|
429 |
}
|
430 |
|
431 |
$breadcrumb_html .= '</ol>';
|
432 |
+
$breadcrumb_html .= '</div>';
|
433 |
+
$breadcrumb_html .= '</div>';
|
434 |
+
$breadcrumb_html .= '<!-- [ /#' . esc_attr( $options['class_outer'] ) . ' ] -->';
|
|
|
435 |
$breadcrumb_html = apply_filters( 'vk_breadcrumb_html', $breadcrumb_html );
|
436 |
+
return $breadcrumb_html;
|
437 |
+
|
438 |
+
}
|
439 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
|
441 |
+
/**
|
442 |
+
* Print Bread Crumb
|
443 |
+
*/
|
444 |
+
public static function the_breadcrumb() {
|
445 |
+
$allowed_html = array(
|
446 |
+
'div' => array(
|
447 |
+
'id' => array(),
|
448 |
+
'class' => array(),
|
449 |
+
'itemprop' => array(),
|
450 |
+
'itemscope' => array(),
|
451 |
+
'itemtype' => array(),
|
452 |
+
),
|
453 |
+
'ol' => array(
|
454 |
+
'id' => array(),
|
455 |
+
'class' => array(),
|
456 |
+
'itemprop' => array(),
|
457 |
+
'itemscope' => array(),
|
458 |
+
'itemtype' => array(),
|
459 |
+
),
|
460 |
+
'li' => array(
|
461 |
+
'id' => array(),
|
462 |
+
'class' => array(),
|
463 |
+
'itemprop' => array(),
|
464 |
+
'itemscope' => array(),
|
465 |
+
'itemtype' => array(),
|
466 |
+
),
|
467 |
+
'a' => array(
|
468 |
+
'id' => array(),
|
469 |
+
'class' => array(),
|
470 |
+
'href' => array(),
|
471 |
+
'target' => array(),
|
472 |
+
'itemprop' => array(),
|
473 |
+
),
|
474 |
+
'span' => array(
|
475 |
+
'id' => array(),
|
476 |
+
'class' => array(),
|
477 |
+
'itemprop' => array(),
|
478 |
+
'itemscope' => array(),
|
479 |
+
'itemtype' => array(),
|
480 |
+
),
|
481 |
+
'i' => array(
|
482 |
+
'id' => array(),
|
483 |
+
'class' => array(),
|
484 |
+
),
|
485 |
+
'meta' => array(
|
486 |
+
'itemprop' => array(),
|
487 |
+
'content' => array(),
|
488 |
+
),
|
489 |
+
'ruby' => array(),
|
490 |
+
'rt' => array(),
|
491 |
+
);
|
492 |
+
echo wp_kses( self::get_breadcrumb(), $allowed_html );
|
493 |
}
|
494 |
|
495 |
+
|
496 |
/**
|
497 |
* Scheme array
|
498 |
*
|
veu-packages.php
CHANGED
@@ -104,7 +104,7 @@ function veu_get_packages() {
|
|
104 |
$deskSns[] = '<li>' . __( 'Print og tags to html head.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
105 |
$deskSns[] = '<li>' . __( 'Print twitter card tags to html head.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
106 |
$deskSns[] = '<li>' . __( 'Print social bookmark buttons.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
107 |
-
$deskSns[] = '<li>' . __( 'Facebook Page Plugin widget.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
108 |
$deskSns[] = '<li>' . __( 'Print Follow me box to content bottom.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
109 |
$deskSns[] = '</ul>';
|
110 |
$deskSns[] = '<p>' . sprintf( __( '* You can stop the function separately from the %s.', 'vk-all-in-one-expansion-unit' ), $settingPage ) . '</p>';
|
@@ -203,7 +203,6 @@ function veu_get_packages() {
|
|
203 |
$desk[] = '<li>' . __( 'VK_Recent Posts - display the link text and the date of the latest article title.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
204 |
$desk[] = '<li>' . __( 'VK_Page content to widget - display the contents of the page to the widgets.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
205 |
$desk[] = '<li>' . __( 'VK_Profile - display the profile entered in the widget.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
206 |
-
$desk[] = '<li>' . __( 'VK_FB Page Plugin - display the Facebook Page Plugin.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
207 |
$desk[] = '<li>' . __( 'VK_3PR area - display the 3PR area.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
208 |
$desk[] = '<li>VK_' . __( 'categories/tags list', 'vk-all-in-one-expansion-unit' ) . __( 'Displays a categories, tags or format list.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
209 |
$desk[] = '<li>VK_' . __( 'archive list', 'vk-all-in-one-expansion-unit' ) . __( 'Displays a list of archives. You can choose the post type and also to display archives by month or by year.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
104 |
$deskSns[] = '<li>' . __( 'Print og tags to html head.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
105 |
$deskSns[] = '<li>' . __( 'Print twitter card tags to html head.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
106 |
$deskSns[] = '<li>' . __( 'Print social bookmark buttons.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
107 |
+
$deskSns[] = '<li>' . __( 'VK_FB Page Plugin - display the Facebook Page Plugin widget.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
108 |
$deskSns[] = '<li>' . __( 'Print Follow me box to content bottom.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
109 |
$deskSns[] = '</ul>';
|
110 |
$deskSns[] = '<p>' . sprintf( __( '* You can stop the function separately from the %s.', 'vk-all-in-one-expansion-unit' ), $settingPage ) . '</p>';
|
203 |
$desk[] = '<li>' . __( 'VK_Recent Posts - display the link text and the date of the latest article title.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
204 |
$desk[] = '<li>' . __( 'VK_Page content to widget - display the contents of the page to the widgets.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
205 |
$desk[] = '<li>' . __( 'VK_Profile - display the profile entered in the widget.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
|
|
206 |
$desk[] = '<li>' . __( 'VK_3PR area - display the 3PR area.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
207 |
$desk[] = '<li>VK_' . __( 'categories/tags list', 'vk-all-in-one-expansion-unit' ) . __( 'Displays a categories, tags or format list.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
208 |
$desk[] = '<li>VK_' . __( 'archive list', 'vk-all-in-one-expansion-unit' ) . __( 'Displays a list of archives. You can choose the post type and also to display archives by month or by year.', 'vk-all-in-one-expansion-unit' ) . '</li>';
|
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.76.0
|
7 |
* Requires PHP: 7.2
|
8 |
* Author: Vektor,Inc.
|
9 |
* Text Domain: vk-all-in-one-expansion-unit
|
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.76.1.0
|
7 |
* Requires PHP: 7.2
|
8 |
* Author: Vektor,Inc.
|
9 |
* Text Domain: vk-all-in-one-expansion-unit
|