Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 /**
  * Write settings to json file
  */
 private function save_json()
 {
     acf_write_json_field_group($this->settings);
 }
Ejemplo n.º 3
0
 /**
  * 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));
     */
 }