summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Metabox.php2
-rw-r--r--src/MetaboxField.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Metabox.php b/src/Metabox.php
index 4da3c4c..64f9bfb 100644
--- a/src/Metabox.php
+++ b/src/Metabox.php
@@ -150,7 +150,7 @@ class Metabox
}, $this->locations);
// merge with extra options
- $fieldGroup = array_merge_recursive([
+ $fieldGroup = array_replace_recursive([
'key' => $this->key,
'title' => $this->title,
'location' => $ruleGroups,
diff --git a/src/MetaboxField.php b/src/MetaboxField.php
index 8112d9b..4ace7b1 100644
--- a/src/MetaboxField.php
+++ b/src/MetaboxField.php
@@ -107,7 +107,7 @@ class MetaboxField
public function add()
{
// merge with extra options
- $field = array_merge_recursive([
+ $field = array_replace_recursive([
'key' => $this->key,
'label' => $this->names['label'],
'name' => $this->names['name'],