WordPress.org

Make WordPress Core

Ticket #25551: 25551.1.diff

File 25551.1.diff, 2.2 KB (added by kpdesign, 8 years ago)

Second pass

  • src/wp-mail.php

     
    1414if ( ! apply_filters( 'enable_post_by_email_configuration', true ) )
    1515        wp_die( __( 'This action has been disabled by the administrator.' ) );
    1616
    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 */
     22do_action( 'wp-mail.php' );
    1923
    2024/** Get the POP3 class with which to access the mailbox. */
    2125require_once( ABSPATH . WPINC . '/class-pop3.php' );
     
    176180        }
    177181        $content = trim($content);
    178182
    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 );
    182194
    183195        if ( false !== stripos($content_transfer_encoding, "quoted-printable") ) {
    184196                $content = quoted_printable_decode($content);
     
    194206
    195207        $content = trim($content);
    196208
    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 );
    198217
    199218        $post_title = xmlrpc_getposttitle($content);
    200219
     
    213232        if ( empty( $post_ID ) )
    214233                continue;
    215234
    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 );
    217243
    218244        echo "\n<p>" . sprintf(__('<strong>Author:</strong> %s'), esc_html($post_author)) . '</p>';
    219245        echo "\n<p>" . sprintf(__('<strong>Posted title:</strong> %s'), esc_html($post_title)) . '</p>';