回答編集履歴
1
コード追記
test
CHANGED
@@ -15,3 +15,27 @@
|
|
15
15
|
add_action( 'publish_post', 'delete_makername_dammy', 1 ,2);
|
16
16
|
|
17
17
|
```
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
**追記**
|
26
|
+
|
27
|
+
```PHP
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
function teratail75274_publish_post($post_id) {
|
32
|
+
|
33
|
+
delete_post_meta($post_id, 'makername_dammy');
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
//publish_post
|
38
|
+
|
39
|
+
add_action( 'publish_post', 'teratail75274_publish_post', 99998);
|
40
|
+
|
41
|
+
```
|