回答編集履歴
2
回答の推敲
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
wp_insert_post_dataというフックがあり、「publish_投稿2」の代わりにこちらを使用することで解決しました。
|
2
2
|
```php
|
3
|
-
add_action('
|
3
|
+
add_action('wp_insert_post_data', 'my_same_term');
|
4
4
|
```
|
5
5
|
##参考
|
6
6
|
[https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data](https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data)
|
1
回答欄推敲
answer
CHANGED
@@ -1,3 +1,6 @@
|
|
1
1
|
wp_insert_post_dataというフックがあり、「publish_投稿2」の代わりにこちらを使用することで解決しました。
|
2
|
-
|
2
|
+
```php
|
3
|
+
add_action('publish_投稿2', 'my_same_term');
|
4
|
+
```
|
5
|
+
##参考
|
3
6
|
[https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data](https://codex.wordpress.org/Plugin_API/Filter_Reference/wp_insert_post_data)
|