wp_before_include_template

ACTION wp-includes\template-loader.php (ligne 123) github
Fires immediately before including the template.

Paramètres

Entrée :
$template
Sortie :
@param string $template The path of the template about to be included.

Utilisation

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

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

Actualités

Chargement des actualités...