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

WPCF7_FormTagsManager::scan_callback() private CF7 1.0

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

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

null. Ничего.

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

// private - только в коде основоного (родительского) класса
$result = $this->scan_callback( $m, $replace );
$m (обязательный)
-
$replace **
-
По умолчанию: false

Код WPCF7_FormTagsManager::scan_callback() CF7 5.4.1

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

	$tag = $m[2];
	$attr = $this->parse_atts( $m[3] );

	$scanned_tag = array(
		'type' => $tag,
		'basetype' => trim( $tag, '*' ),
		'name' => '',
		'options' => array(),
		'raw_values' => array(),
		'values' => array(),
		'pipes' => null,
		'labels' => array(),
		'attr' => '',
		'content' => '',
	);

	if ( is_array( $attr ) ) {
		if ( is_array( $attr['options'] ) ) {
			if ( $this->tag_type_supports( $tag, 'name-attr' )
			and ! empty( $attr['options'] ) ) {
				$scanned_tag['name'] = array_shift( $attr['options'] );

				if ( ! wpcf7_is_name( $scanned_tag['name'] ) ) {
					return $m[0]; // Invalid name is used. Ignore this tag.
				}
			}

			$scanned_tag['options'] = (array) $attr['options'];
		}

		$scanned_tag['raw_values'] = (array) $attr['values'];

		if ( WPCF7_USE_PIPE ) {
			$pipes = new WPCF7_Pipes( $scanned_tag['raw_values'] );
			$scanned_tag['values'] = $pipes->collect_befores();
			$scanned_tag['pipes'] = $pipes;
		} else {
			$scanned_tag['values'] = $scanned_tag['raw_values'];
		}

		$scanned_tag['labels'] = $scanned_tag['values'];

	} else {
		$scanned_tag['attr'] = $attr;
	}

	$scanned_tag['values'] = array_map( 'trim', $scanned_tag['values'] );
	$scanned_tag['labels'] = array_map( 'trim', $scanned_tag['labels'] );

	$content = trim( $m[5] );
	$content = preg_replace( "/<br[\r\n\t ]*\/?>$/m", '', $content );
	$scanned_tag['content'] = $content;

	$scanned_tag = apply_filters( 'wpcf7_form_tag', $scanned_tag, $replace );

	$scanned_tag = new WPCF7_FormTag( $scanned_tag );

	$this->scanned_tags[] = $scanned_tag;

	if ( $replace ) {
		$func = $this->tag_types[$tag]['function'];
		return $m[1] . call_user_func( $func, $scanned_tag ) . $m[6];
	} else {
		return $m[0];
	}
}