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

WPCF7_ConstantContact_ContactPostRequest::add_street_address() public CF7 1.0

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

Хуков нет.

Возвращает

null. Ничего.

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

$WPCF7_ConstantContact_ContactPostRequest = new WPCF7_ConstantContact_ContactPostRequest();
$WPCF7_ConstantContact_ContactPostRequest->add_street_address( $street, $city, $state, $postal_code, $country, $kind );
$street (обязательный)
-
$city (обязательный)
-
$state (обязательный)
-
$postal_code (обязательный)
-
$country (обязательный)
-
$kind **
-
По умолчанию: 'home'

Код WPCF7_ConstantContact_ContactPostRequest::add_street_address() CF7 5.4.1

<?php
public function add_street_address( $street, $city, $state, $postal_code, $country, $kind = 'home' ) {
	$street = trim( $street );
	$city = trim( $city );
	$state = trim( $state );
	$postal_code = trim( $postal_code );
	$country = trim( $country );

	if ( ! ( $street || $city || $state || $postal_code || $country )
	or 1 <= count( $this->street_addresses )
	or ! in_array( $kind, array( 'home', 'work', 'other' ) )
	or 255 < $this->strlen( $street )
	or 50 < $this->strlen( $city )
	or 50 < $this->strlen( $state )
	or 50 < $this->strlen( $postal_code )
	or 50 < $this->strlen( $country ) ) {
		return false;
	}

	return $this->street_addresses[] = array(
		'kind' => $kind,
		'street' => $street,
		'city' => $city,
		'state' => $state,
		'postal_code' => $postal_code,
		'country' => $country,
	);
}