WPCF7_TagGenerator::add()publicCF7 1.0

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

Хуков нет.

Возвращает

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

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

$WPCF7_TagGenerator = new WPCF7_TagGenerator();
$WPCF7_TagGenerator->add( $id, $title, $callback, $options );
$id (обязательный)
-
$title (обязательный)
-
$callback (обязательный)
-
$options **
-
По умолчанию: array()

Код WPCF7_TagGenerator::add() CF7 5.9.3

public function add( $id, $title, $callback, $options = array() ) {
	$id = trim( $id );

	if ( '' === $id
	or ! wpcf7_is_name( $id ) ) {
		return false;
	}

	$this->panels[$id] = array(
		'title' => $title,
		'content' => 'tag-generator-panel-' . $id,
		'options' => $options,
		'callback' => $callback,
	);

	return true;
}