wp_mail_content_type

wp_mail_content_type

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_mail_content_type') is found 2 times:

  • /wp-includes/formatting.php line 6127
    		$content_type = 'text/plain';
    	}
    
    	/** This filter is documented in wp-includes/pluggable.php */
    	$content_type = apply_filters( 'wp_mail_content_type', $content_type );
    
    	if ( 'text/html' === $content_type ) {
    		$mail['message'] = wp_staticize_emoji( $mail['message'] );
    	}
    
    	return $mail;
    
  • /wp-includes/pluggable.php line 480
    		 * @since 2.3.0
    		 *
    		 * @param string $content_type Default wp_mail() content type.
    		 */
    		$content_type = apply_filters( 'wp_mail_content_type', $content_type );
    
    		$phpmailer->ContentType = $content_type;
    
    		// Set whether it's plaintext, depending on $content_type.
    		if ( 'text/html' === $content_type ) {
    			$phpmailer->isHTML( true );
    

See this hook used in plugins: