質問編集履歴

2

更新理由くそだるい

2018/03/30 14:08

投稿

gatyame
gatyame

スコア7

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,13 @@
16
16
 
17
17
  関係ないかもですが、投稿時にメールが飛ぶ条件は以下のコードです。
18
18
 
19
+ ```
20
+
19
- if ( 'publish' == $new_status && 'publish' != $old_status && 'top_info' == $post->post_type ) {
21
+ if ( 'publish' == $new_status && 'publish' !=
22
+
23
+ $old_status && 'top_info' == $post->post_type ) {
24
+
25
+ ```
20
26
 
21
27
 
22
28
 
@@ -32,11 +38,15 @@
32
38
 
33
39
  【追記】
34
40
 
41
+ ```
42
+
35
43
  function publishSentMail ( $new_status, $old_status, $post ) {
36
44
 
37
45
 
38
46
 
39
- if ( 'publish' == $new_status && 'publish' != $old_status && 'top_info' == $post->post_type ) {
47
+ if ( 'publish' == $new_status && 'publish' != $old_status
48
+
49
+ && 'top_info' == $post->post_type ) {
40
50
 
41
51
 
42
52
 
@@ -45,3 +55,9 @@
45
55
 
46
56
 
47
57
  $response = mb_send_mail( $to, $subject, $text, $header);
58
+
59
+ ```
60
+
61
+
62
+
63
+ テーマ編集でfunctions.phpに直に書いております

1

要望

2018/03/30 14:08

投稿

gatyame
gatyame

スコア7

test CHANGED
File without changes
test CHANGED
@@ -27,3 +27,21 @@
27
27
 
28
28
 
29
29
  その後$text内に、どのように書けばいいのでしょうか?
30
+
31
+
32
+
33
+ 【追記】
34
+
35
+ function publishSentMail ( $new_status, $old_status, $post ) {
36
+
37
+
38
+
39
+ if ( 'publish' == $new_status && 'publish' != $old_status && 'top_info' == $post->post_type ) {
40
+
41
+
42
+
43
+ 送信先やテキスト
44
+
45
+
46
+
47
+ $response = mb_send_mail( $to, $subject, $text, $header);