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

WPCF7_MailTaggedText::replace_tags_callback() private CF7 1.0

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

Возвращает

Null. Ничего.

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

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

Код WPCF7_MailTaggedText::replace_tags_callback() CF7 5.3

<?php
private function replace_tags_callback( $matches, $html = false ) {
	// allow [[foo]] syntax for escaping a tag
	if ( $matches[1] == '['
	and $matches[4] == ']' ) {
		return substr( $matches[0], 1, -1 );
	}

	$tag = $matches[0];
	$tagname = $matches[2];
	$values = $matches[3];

	$mail_tag = new WPCF7_MailTag( $tag, $tagname, $values );
	$field_name = $mail_tag->field_name();

	$submission = WPCF7_Submission::get_instance();
	$submitted = $submission
		? $submission->get_posted_data( $field_name )
		: null;

	if ( $mail_tag->get_option( 'do_not_heat' ) ) {
		$submitted = isset( $_POST[$field_name] ) ? $_POST[$field_name] : '';
	}

	$replaced = $submitted;

	if ( null !== $replaced ) {
		if ( $format = $mail_tag->get_option( 'format' ) ) {
			$replaced = $this->format( $replaced, $format );
		}

		$replaced = wpcf7_flat_join( $replaced );

		if ( $html ) {
			$replaced = esc_html( $replaced );
			$replaced = wptexturize( $replaced );
		}
	}

	if ( $form_tag = $mail_tag->corresponding_form_tag() ) {
		$type = $form_tag->type;

		$replaced = apply_filters(
			"wpcf7_mail_tag_replaced_{$type}", $replaced,
			$submitted, $html, $mail_tag
		);
	}

	$replaced = apply_filters(
		'wpcf7_mail_tag_replaced', $replaced,
		$submitted, $html, $mail_tag
	);

	if ( null !== $replaced ) {
		$replaced = wp_unslash( trim( $replaced ) );

		$this->replaced_tags[$tag] = $replaced;
		return $replaced;
	}

	$special = apply_filters( 'wpcf7_special_mail_tags', null,
		$mail_tag->tag_name(), $html, $mail_tag
	);

	if ( null !== $special ) {
		$this->replaced_tags[$tag] = $special;
		return $special;
	}

	return $tag;
}