質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -85,6 +85,37 @@
|
|
85
85
|
|
86
86
|
今の状態のようにオブジェクトが増えた分だけforeachを増やせば出来ないことはないですが同じような記述が増えるのでもう少し良い記述が無いか探しています。
|
87
87
|
|
88
|
+
最終的にはこのようなかたちにしたいです
|
89
|
+
```PHP
|
90
|
+
array(3) {
|
91
|
+
["some_int"]=>
|
92
|
+
int(1)
|
93
|
+
["some_object"]=>
|
94
|
+
array(2) {
|
95
|
+
["some_object_child_1"]=>
|
96
|
+
array(3) {
|
97
|
+
["some_object_grand_child_1_1"]=>
|
98
|
+
string(27) "some_object_grand_child_1_1"
|
99
|
+
["some_object_grand_child_1_2"]=>
|
100
|
+
string(27) "some_object_grand_child_1_2"
|
101
|
+
["some_object_grand_child_1_3"]=>
|
102
|
+
string(27) "some_object_grand_child_1_3"
|
103
|
+
}
|
104
|
+
["some_object_child_2"]=>
|
105
|
+
array(3) {
|
106
|
+
["some_object_grand_child_2_1"]=>
|
107
|
+
string(27) "some_object_grand_child_2_1"
|
108
|
+
["some_object_grand_child_2_2"]=>
|
109
|
+
string(27) "some_object_grand_child_2_2"
|
110
|
+
["some_object_grand_child_2_3"]=>
|
111
|
+
string(27) "some_object_grand_child_2_3"
|
112
|
+
}
|
113
|
+
}
|
114
|
+
["some_bool"]=>
|
115
|
+
bool(false)
|
116
|
+
}
|
117
|
+
```
|
118
|
+
|
88
119
|
### 補足情報(FW/ツールのバージョンなど)
|
89
120
|
|
90
121
|
最終的にはWordPressのregister_settingのdefaultとpropertiesの値に入れるための処理です
|