permalink_structure_changed

ACTION wp-includes\class-wp-rewrite.php (ligne 1977) github
Fires after the permalink structure is updated.

Paramètres

Entrée :
$old_permalink_structure, $permalink_structure
Sortie :
@param string $old_permalink_structure The previous permalink structure.
@param string $permalink_structure     The new permalink structure.

Utilisation

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

function ma_fonction_personnalisee($old_permalink_structure, $permalink_structure) {
    // Votre code ici
    error_log('Hook permalink_structure_changed déclenché');
}

Actualités

Chargement des actualités...