WPCF7_Integration::add_service()publicCF7 1.0

Adds a service to the services list.

Метод класса: WPCF7_Integration{}

Хуков нет.

Возвращает

null. Ничего.

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

$WPCF7_Integration = new WPCF7_Integration();
$WPCF7_Integration->add_service( $name, $service );
$name (обязательный)
-
$service(WPCF7_Service) (обязательный)
-

Код WPCF7_Integration::add_service() CF7 5.7.5.1

public function add_service( $name, WPCF7_Service $service ) {
	$name = sanitize_key( $name );

	if ( empty( $name )
	or isset( $this->services[$name] ) ) {
		return false;
	}

	$this->services[$name] = $service;
}