回答編集履歴

2

コード追記

2017/12/17 03:47

投稿

退会済みユーザー
test CHANGED
@@ -67,3 +67,9 @@
67
67
 
68
68
 
69
69
  上記のコードでひとまず動くかも知れませんが、`wp_enqueue_scripts`アクションフックを使うかたちに修正することをおすすめします。
70
+
71
+ ```PHP
72
+
73
+ add_action( 'wp_enqueue_scripts', 'add_stylesheet' );
74
+
75
+ ```

1

コメント追記

2017/12/17 03:47

投稿

退会済みユーザー
test CHANGED
@@ -55,3 +55,15 @@
55
55
  add_action( 'wp_print_styles', 'add_stylesheet' );
56
56
 
57
57
  ```
58
+
59
+ ---
60
+
61
+ **追記**
62
+
63
+ [https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_print_styles)
64
+
65
+ > Since WordPress 3.3 wp_print_styles should not be used to enqueue styles or scripts.
66
+
67
+
68
+
69
+ 上記のコードでひとまず動くかも知れませんが、`wp_enqueue_scripts`アクションフックを使うかたちに修正することをおすすめします。