Created
March 4, 2018 15:28
-
-
Save psaikali/442b1e27e63668e1d1e7d9dff3db49ae to your computer and use it in GitHub Desktop.
Ne pas enregistrer la valeur d'un champ ACF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Article/tutoriel complet sur https://mosaika.fr/astuces-developpement-acf/ | |
// Documentation officielle https://www.advancedcustomfields.com/resources/acf-update_value/ | |
/** | |
* Comparer la valeur de 2 champs pour accepter/refuser leur validation | |
* Filtre : acf/update_value | |
*/ | |
function msk_acf_do_not_save_field_value($value, $post_id, $field) { | |
return null; | |
} | |
//add_filter('acf/update_value/type=password', 'msk_acf_do_not_save_field_value', 10, 3); | |
add_filter('acf/update_value/name=annonceur_mot_de_passe', 'msk_acf_do_not_save_field_value', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment