WPCF7_Integration::add_category()publicCF7 1.0

Adds a service category to the categories list.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

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

Код WPCF7_Integration::add_category() CF7 5.9.3

public function add_category( $name, $title ) {
	$name = sanitize_key( $name );

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

	$this->categories[$name] = $title;
}