WPCF7_FormTagsManager::collect_tag_types()
Returns form-tag types that support the given features.
Метод класса: WPCF7_FormTagsManager{}
Хуков нет.
Возвращает
Массив
. An array of form-tag types. If the $features param is empty, returns all form-tag types that have been registered.
Использование
$WPCF7_FormTagsManager = new WPCF7_FormTagsManager(); $WPCF7_FormTagsManager->collect_tag_types( $features, $invert );
- $features(массив|строка)
- The feature to check or an array of features.
По умолчанию: empty array - $invert(true|false)
- If this value is true, returns form-tag types that do not support the given features.
По умолчанию: false
Код WPCF7_FormTagsManager::collect_tag_types() WPCF7 FormTagsManager::collect tag types CF7 5.9.3
public function collect_tag_types( $features = array(), $invert = false ) { $tag_types = array_keys( $this->tag_types ); if ( empty( $features ) ) { return $tag_types; } $output = array(); foreach ( $tag_types as $tag_type ) { if ( ! $invert && $this->tag_type_supports( $tag_type, $features ) || $invert && ! $this->tag_type_supports( $tag_type, $features ) ) { $output[] = $tag_type; } } return $output; }