回答編集履歴
1
具体例の追加。
answer
CHANGED
@@ -7,4 +7,16 @@
|
|
7
7
|
}
|
8
8
|
}
|
9
9
|
add_action( 'admin_enqueue_scripts', 'my_admin_style' );
|
10
|
-
```
|
10
|
+
```
|
11
|
+
|
12
|
+
(参考)
|
13
|
+
【get_post_type() | Function | WordPress Developer Resources】
|
14
|
+
https://developer.wordpress.org/reference/functions/get_post_type/
|
15
|
+
> ```PHP
|
16
|
+
> function get_post_type( $post = null ) {
|
17
|
+
> if ( $post = get_post( $post ) )
|
18
|
+
> return $post->post_type;
|
19
|
+
>
|
20
|
+
> return false;
|
21
|
+
> }
|
22
|
+
> ```
|