回答編集履歴
1
具体例の追加。
test
CHANGED
@@ -17,3 +17,27 @@
|
|
17
17
|
add_action( 'admin_enqueue_scripts', 'my_admin_style' );
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
(参考)
|
24
|
+
|
25
|
+
【get_post_type() | Function | WordPress Developer Resources】
|
26
|
+
|
27
|
+
https://developer.wordpress.org/reference/functions/get_post_type/
|
28
|
+
|
29
|
+
> ```PHP
|
30
|
+
|
31
|
+
> function get_post_type( $post = null ) {
|
32
|
+
|
33
|
+
> if ( $post = get_post( $post ) )
|
34
|
+
|
35
|
+
> return $post->post_type;
|
36
|
+
|
37
|
+
>
|
38
|
+
|
39
|
+
> return false;
|
40
|
+
|
41
|
+
> }
|
42
|
+
|
43
|
+
> ```
|