WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

WPCF7_Mail::compose() private CF7 1.0

Это метод класса: WPCF7_Mail{}

Хуки из метода
Возвращает

Null. Ничего.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->compose( $send );

Код WPCF7_Mail::compose() CF7 5.3

<?php
private function compose( $send = true ) {
	$components = array(
		'subject' => $this->get( 'subject', true ),
		'sender' => $this->get( 'sender', true ),
		'body' => $this->get( 'body', true ),
		'recipient' => $this->get( 'recipient', true ),
		'additional_headers' => $this->get( 'additional_headers', true ),
		'attachments' => $this->attachments(),
	);

	$components = apply_filters( 'wpcf7_mail_components',
		$components, wpcf7_get_current_contact_form(), $this
	);

	if ( ! $send ) {
		return $components;
	}

	$subject = wpcf7_strip_newline( $components['subject'] );
	$sender = wpcf7_strip_newline( $components['sender'] );
	$recipient = wpcf7_strip_newline( $components['recipient'] );
	$body = $components['body'];
	$additional_headers = trim( $components['additional_headers'] );
	$attachments = $components['attachments'];

	$headers = "From: $sender\n";

	if ( $this->use_html ) {
		$headers .= "Content-Type: text/html\n";
		$headers .= "X-WPCF7-Content-Type: text/html\n";
	} else {
		$headers .= "X-WPCF7-Content-Type: text/plain\n";
	}

	if ( $additional_headers ) {
		$headers .= $additional_headers . "\n";
	}

	return wp_mail( $recipient, $subject, $body, $headers, $attachments );
}