Ticket #25551: 25551.1.diff
File 25551.1.diff, 2.2 KB (added by , 11 years ago) |
---|
-
src/wp-mail.php
14 14 if ( ! apply_filters( 'enable_post_by_email_configuration', true ) ) 15 15 wp_die( __( 'This action has been disabled by the administrator.' ) ); 16 16 17 /** Allow a plugin to do a complete takeover of Post by Email **/ 18 do_action('wp-mail.php'); 17 /** 18 * Fires to allow a plugin to do a complete takeover of Post by Email. 19 * 20 * @since 2.9.0 21 */ 22 do_action( 'wp-mail.php' ); 19 23 20 24 /** Get the POP3 class with which to access the mailbox. */ 21 25 require_once( ABSPATH . WPINC . '/class-pop3.php' ); … … 176 180 } 177 181 $content = trim($content); 178 182 179 //Give Post-By-Email extending plugins full access to the content 180 //Either the raw content or the content of the last quoted-printable section 181 $content = apply_filters('wp_mail_original_content', $content); 183 /** 184 * Filter the original content of the email. 185 * 186 * Give Post-By-Email extending plugins full access to the content, either 187 * the raw content, or the content of the last quoted-printable section. 188 * 189 * @since 2.8.0 190 * 191 * @param string $content The original email content. 192 */ 193 $content = apply_filters( 'wp_mail_original_content', $content ); 182 194 183 195 if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) { 184 196 $content = quoted_printable_decode($content); … … 194 206 195 207 $content = trim($content); 196 208 197 $post_content = apply_filters('phone_content', $content); 209 /** 210 * Filter the content of the post submitted by email before saving. 211 * 212 * @since 1.2.1 213 * 214 * @param string $content The email content. 215 */ 216 $post_content = apply_filters( 'phone_content', $content ); 198 217 199 218 $post_title = xmlrpc_getposttitle($content); 200 219 … … 213 232 if ( empty( $post_ID ) ) 214 233 continue; 215 234 216 do_action('publish_phone', $post_ID); 235 /** 236 * Fires after a post submitted by email is published. 237 * 238 * @since 1.2.1 239 * 240 * @param int $post_ID The post ID. 241 */ 242 do_action( 'publish_phone', $post_ID ); 217 243 218 244 echo "\n<p>" . sprintf(__('<strong>Author:</strong> %s'), esc_html($post_author)) . '</p>'; 219 245 echo "\n<p>" . sprintf(__('<strong>Posted title:</strong> %s'), esc_html($post_title)) . '</p>';