humanmade / Custom-Meta-Boxes

Lets you easily create metaboxes with custom fields that will blow your mind.
522 stars 124 forks source link

Unable to save gmap field when field is within a group #422

Closed dan-westall closed 7 years ago

dan-westall commented 7 years ago

When setting a gmap field within a group values will be saved but not returned in the expected structure on refresh, so setting will be lost on subsequent Updates.

Old structure

  [0]=>
  array(4) {
    ["text"]=>
    string(9) "Singapore"
    ["lat"]=>
    string(8) "1.352083"
    ["long"]=>
    string(18) "103.81983600000001"
    ["elevation"]=>
    string(17) "57.83905029296875"
  }
}

New Structure, expected for content to show.

  [0]=>
  array(1) {
    ["cmb-field-0"]=>
    array(4) {
      ["text"]=>
      string(9) "Singapore"
      ["lat"]=>
      string(8) "1.352083"
      ["long"]=>
      string(18) "103.81983600000001"
      ["elevation"]=>
      string(17) "57.83905029296875"
    }
  }
}