- Créer un groupe de champs ACF et activer l'option "Multi-étapes"
- Créer des champs de type "Groupe" et les remplir des sous-champs nécessaires. Chaque champ "Groupe" sera une étape à part entière dans le formulaire.
- Insérer le formulaire front-end avec acf_form en ajoutant les 2 champs de types hidden (acf_multisteps_form & acf_multistep_current_step).
- Enjoy !
This file contains 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-save_post/ | |
/** | |
* Enregistrer la variable d'un champ dans un autre champ du post | |
* Filtre : acf/save_post | |
*/ |
This file contains 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 | |
*/ |
This file contains 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-validate_value/ | |
/** | |
* Nettoyer/sécuriser la valeur d'un champ WYSIWYG | |
* Filtre : acf/update_value | |
*/ |
This file contains 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
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
This file contains 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 | |
/** | |
* Intercept form submission and process it | |
*/ | |
function gf_intercept_form_submission( $data, $form ) { | |
if ( (int) $form['id'] !== (int) get_field( 'submit_project_gf_form_id', 'option' ) ) { | |
return; | |
} | |
// Do something with $data |
This file contains 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 | |
/** | |
* Inspect/list functions called on hooks containing specific term | |
* | |
* @param array Array of terms that the hook should contain | |
* @return array | |
*/ | |
function inspect_hooks( $terms = [ 'wp_' ] ) { | |
global $wp_filter; | |
$related_hooks = []; |
This file contains 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 | |
namespace MSK\Blog\Mailchimp; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Inscrit un utilisateur dans une liste MailChimp | |
* |
This file contains 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 | |
namespace Mosaika; | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* Register our custom commands. |
This file contains 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 | |
/** | |
* Plugin Name: Contact Form 7 WooCommerce Order Select Field | |
* Description: Use the <code>[wc_order]</code> field in CF7 forms | |
* Author: Pierre Saïkali | |
* Author URI: https://saika.li | |
* Text Domain: cf7wcp | |
* Domain Path: /languages/ | |
* Version: 1.0.0 | |
*/ |