Descrizione
Il wpforms_smart_tags
è usato per creare, definire e registrare uno Smart Tag da usare all'interno del costruttore di moduli di WPForms.
Parametri
- $tags
- (array) (Richiesto) Chiave, nome e registrazione dello smart tag.
Fonte
wpforms/includes/class-smart-tags.php
Ulteriori informazioni
Il filtro è usato per creare, definire e registrare gli Smart Tag da usare all'interno del costruttore di moduli WPForms.
L'utilizzo di questo filtro deve essere accompagnato anche dal wpforms_smart_tag_process
per 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 inserimento di un modulo
- Come creare più tag intelligenti per gli utenti
- Come includere l'URL dei post inviati nel messaggio di conferma
- Come creare uno smart tag da un campo ACF
- Come creare un URL di dominio Smart Tag