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

wpcf7_get_properties_for_api() CF7 1.0

Хуков нет.

Возвращает

Null. Ничего.

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

wpcf7_get_properties_for_api( $contact_form );

Код wpcf7_get_properties_for_api() CF7 5.3

<?php
function wpcf7_get_properties_for_api( WPCF7_ContactForm $contact_form ) {
	$properties = $contact_form->get_properties();

	$properties['form'] = array(
		'content' => (string) $properties['form'],
		'fields' => array_map(
			function( WPCF7_FormTag $form_tag ) {
				return array(
					'type' => $form_tag->type,
					'basetype' => $form_tag->basetype,
					'name' => $form_tag->name,
					'options' => $form_tag->options,
					'raw_values' => $form_tag->raw_values,
					'labels' => $form_tag->labels,
					'values' => $form_tag->values,
					'pipes' => $form_tag->pipes instanceof WPCF7_Pipes
						? $form_tag->pipes->to_array()
						: $form_tag->pipes,
					'content' => $form_tag->content,
				);
			},
			$contact_form->scan_form_tags()
		),
	);

	$properties['additional_settings'] = array(
		'content' => (string) $properties['additional_settings'],
		'settings' => array_filter( array_map(
			function( $setting ) {
				$pattern = '/^([a-zA-Z0-9_]+)[\t ]*:(.*)$/';

				if ( preg_match( $pattern, $setting, $matches ) ) {
					$name = trim( $matches[1] );
					$value = trim( $matches[2] );

					if ( in_array( $value, array( 'on', 'true' ), true ) ) {
						$value = true;
					} elseif ( in_array( $value, array( 'off', 'false' ), true ) ) {
						$value = false;
					}

					return array( $name, $value );
				}

				return false;
			},
			explode( "\n", $properties['additional_settings'] )
		) ),
	);

	return $properties;
}