Riassunto AI
Descrizione
Il filtro wpforms_smart_tags viene utilizzato per creare, definire e registrare uno Smart Tag da utilizzare all'interno del form builder di WPForms.
Parametri
- $tags
- (array) (Richiesto) Chiave, Nome e registrazione dello Smart Tag.
Origine
wpforms/includes/class-smart-tags.php
Maggiori Informazioni
Il filtro viene utilizzato per creare, definire e registrare Smart Tag da utilizzare all'interno del costruttore di moduli WPForms.
L'utilizzo di questo filtro deve essere accompagnato anche da wpforms_smart_tag_process per poter elaborare lo Smart Tag.
Esempio
/**
* Create a WPForms Smart Tag.
* Register the Smart Tags so it will be available to select in the form builder.
*
* @link https://wpforms.com/developers/wpforms_smart_tags/
*
* @param array $tags Key, Name and registration of Smart Tag.
* @return array
*/
function wpf_dev_register_smarttag( $tags ) {
// Key is the tag, item is the tag name.
$tags[ 'key' ] = 'Smart Tag Name';
return $tags;
}
add_filter( 'wpforms_smart_tags', 'wpf_dev_register_smarttag', 10, 1 );
Articoli di riferimento
- Come creare uno Smart Tag personalizzato
- Come creare uno Smart Tag per l'ora corrente
- Come creare un ID univoco per ogni invio del modulo
- Come creare altri Smart Tag utente
- Come includere l'URL del post delle richieste nel messaggio di conferma
- Come creare uno Smart Tag da un campo ACF
- Come creare un URL di dominio Smart Tag