Skip to content

Instantly share code, notes, and snippets.

View superpositif's full-sized avatar

Sébastien, french designer superpositif

View GitHub Profile
@superpositif
superpositif / jp_sync_acf_fields.php
Last active March 23, 2023 14:20 — forked from nkkollaw/jp_sync_acf_fields.php
Automatically update Advanced Custom Fields field groups via JSON
<?php
/**
*
* Function that will automatically remove ACF field groups via JSON file update
*
*/
function slh_acf_auto_suppr($json_dirs) {
$groups = acf_get_field_groups();
if (empty($groups)) {