回答編集履歴
2
コード追記
answer
CHANGED
@@ -32,4 +32,7 @@
|
|
32
32
|
[https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles)
|
33
33
|
> Since WordPress 3.3 wp_print_styles should not be used to enqueue styles or scripts.
|
34
34
|
|
35
|
-
上記のコードでひとまず動くかも知れませんが、`wp_enqueue_scripts`アクションフックを使うかたちに修正することをおすすめします。
|
35
|
+
上記のコードでひとまず動くかも知れませんが、`wp_enqueue_scripts`アクションフックを使うかたちに修正することをおすすめします。
|
36
|
+
```PHP
|
37
|
+
add_action( 'wp_enqueue_scripts', 'add_stylesheet' );
|
38
|
+
```
|
1
コメント追記
answer
CHANGED
@@ -26,4 +26,10 @@
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
add_action( 'wp_print_styles', 'add_stylesheet' );
|
29
|
-
```
|
29
|
+
```
|
30
|
+
---
|
31
|
+
**追記**
|
32
|
+
[https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles)
|
33
|
+
> Since WordPress 3.3 wp_print_styles should not be used to enqueue styles or scripts.
|
34
|
+
|
35
|
+
上記のコードでひとまず動くかも知れませんが、`wp_enqueue_scripts`アクションフックを使うかたちに修正することをおすすめします。
|