Make WordPress Core

Ticket #47822: 47822.diff

File 47822.diff, 1.8 KB (added by majemedia, 5 years ago)

patch for ticket

  • src/wp-includes/formatting.php

     
    56945694                return $mail;
    56955695        }
    56965696
     5697        if( isset( $mail['convert_symbols'] ) && FALSE === $mail['convert_symbols'] ) {
     5698                return $mail;
     5699        }
     5700
    56975701        /*
    56985702         * We can only transform the emoji into images if it's a text/html email.
    56995703         * To do that, here's a cut down version of the same process that happens
  • src/wp-includes/pluggable.php

     
    165165         * @param string       $message     Message contents
    166166         * @param string|array $headers     Optional. Additional headers.
    167167         * @param string|array $attachments Optional. Files to attach.
     168         * @param bool $convert_symbols Optional. Passes to 'wp_mail' filter.
    168169         * @return bool Whether the email contents were sent successfully.
    169170         */
    170         function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
     171        function wp_mail( $to, $subject, $message, $headers = '', $attachments = array(), $convert_symbols = TRUE ) {
    171172                // Compact the input, apply the filters, and extract them back out
    172173
    173174                /**
     
    178179                 * @param array $args A compacted array of wp_mail() arguments, including the "to" email,
    179180                 *                    subject, message, headers, and attachments values.
    180181                 */
    181                 $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
     182                $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments', 'convert_symbols' ) );
    182183
    183184                if ( isset( $atts['to'] ) ) {
    184185                        $to = $atts['to'];