pre_get_search_form

ACTION wp-includes\general-template.php (ligne 254) github
Fires before the search form is retrieved, at the start of get_search_form().

Paramètres

Entrée :
$args
Sortie :
@param array $args The array of arguments for building the search form.

Utilisation

// Ajouter une fonction au hook action 'pre_get_search_form'
add_action('pre_get_search_form', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($args) {
    // Votre code ici
    error_log('Hook pre_get_search_form déclenché');
}

Actualités

Chargement des actualités...