function update_field_group($field_group) { // validate if (!acf_get_setting('json')) { return; } // get fields $field_group['fields'] = acf_get_fields($field_group); // save file acf_write_json_field_group($field_group); }
/** * Write settings to json file */ private function save_json() { acf_write_json_field_group($this->settings); }
/** * Write settings to json file */ private function save_json() { acf_write_json_field_group($this->settings); /* file_put_contents(get_template_directory() . '/acf-json/' . $this->settings['key'] . '.json', json_encode($this->settings)); */ }