Changeset 3139330
- Timestamp:
- 08/21/2024 11:17:08 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
email-post-changes/trunk/class.email-post-changes.php
r3139326 r3139330 74 74 75 75 // Transitioning from an Auto Draft to Published shouldn't result in a notification. 76 if ( $post_before->post_status === 'auto-draft' && $post_after->post_status === 'publish' ) 77 return; 76 if ( $post_before->post_status === 'auto-draft' && $post_after->post_status === 'publish' ) { 77 return; 78 } 78 79 79 80 // If we're purely saving a draft, and don't have the draft option enabled, skip. If we're transitioning one way or the other, send a notification. … … 86 87 } 87 88 88 if ( !in_array( $post_before->post_type, $options['post_types'] ) ) 89 return; 89 if ( !in_array( $post_before->post_type, $options['post_types'] ) ) { 90 return; 91 } 90 92 91 93 $this->left_post = $post_before; … … 98 100 } 99 101 100 if ( !$this->left_post || !$this->right_post ) 101 return; 102 if ( !$this->left_post || !$this->right_post ) { 103 return; 104 } 102 105 103 106 $html_diffs = array(); … … 139 142 $the_permalink = esc_url( get_permalink( $this->right_post->ID ) ); 140 143 $the_edit_link = esc_url( get_edit_post_link( $this->right_post->ID ) ); 141 142 144 143 145 // Send email … … 191 193 $html_diff_head .= '<p>' . sprintf( $head_sprintf, 192 194 esc_html( $the_author ), 193 "<a href='$the_permalink'>" . esc_html( $the_title ) . '</a>',195 "<a href='$the_permalink'>" . esc_html( $the_title ) . '</a>', 194 196 "<a href='$the_edit_link'>" . __( '[edit]' ) . '</a>', 195 197 $post_type_label,
Note: See TracChangeset
for help on using the changeset viewer.