WPCF7_ConstantContact_ContactPostRequest::add_custom_field()
Метод класса: WPCF7_ConstantContact_ContactPostRequest{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WPCF7_ConstantContact_ContactPostRequest = new WPCF7_ConstantContact_ContactPostRequest(); $WPCF7_ConstantContact_ContactPostRequest->add_custom_field( $custom_field_id, $value );
- $custom_field_id (обязательный)
- -
- $value (обязательный)
- -
Код WPCF7_ConstantContact_ContactPostRequest::add_custom_field() WPCF7 ConstantContact ContactPostRequest::add custom field CF7 5.9.8
public function add_custom_field( $custom_field_id, $value ) { $uuid_pattern = '/^[0-9a-f-]+$/i'; $value = trim( $value ); if ( 25 <= count( $this->custom_fields ) or ! preg_match( $uuid_pattern, $custom_field_id ) or 255 < $this->strlen( $value ) ) { return false; } return $this->custom_fields[] = array( 'custom_field_id' => $custom_field_id, 'value' => $value, ); }