回答編集履歴
2
test
CHANGED
@@ -39,3 +39,21 @@
|
|
39
39
|
add_filter( 'style_loader_tag', 'hide_style_id' );
|
40
40
|
|
41
41
|
```
|
42
|
+
|
43
|
+
**複数の場合**
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
function hide_style_id( $html ) {
|
48
|
+
|
49
|
+
$html = str_replace( " id='freesiaempire-style-css' ", '', $html );
|
50
|
+
|
51
|
+
$html = str_replace( " id='hogehoge' ", '', $html );
|
52
|
+
|
53
|
+
return $html;
|
54
|
+
|
55
|
+
}
|
56
|
+
|
57
|
+
add_filter( 'style_loader_tag', 'hide_style_id' );
|
58
|
+
|
59
|
+
```
|
1
test
CHANGED
@@ -15,3 +15,27 @@
|
|
15
15
|
Communications
|
16
16
|
|
17
17
|
[http://www.current-com.com/](http://www.current-com.com/)
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
**追記**
|
22
|
+
|
23
|
+
そのプラグインでIDが消せるかどうか忘れましたが、CSSのIDを消すだけならプラグインを使わなくても```style_loader_tag```で非表示にできます。
|
24
|
+
|
25
|
+
style_loader_tag
|
26
|
+
|
27
|
+
[https://developer.wordpress.org/reference/hooks/style_loader_tag/](https://developer.wordpress.org/reference/hooks/style_loader_tag/)
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
function hide_style_id( $html ) {
|
34
|
+
|
35
|
+
return str_replace( " id='freesiaempire-style-css' ", '', $html );
|
36
|
+
|
37
|
+
}
|
38
|
+
|
39
|
+
add_filter( 'style_loader_tag', 'hide_style_id' );
|
40
|
+
|
41
|
+
```
|