我尝试过以这种方式更新$old_field = get_field( 'my-field', 'my-option-page' );$my_field_structure = [ 'level-1' => [ 'level-1-1' => [ 'level-1-1-text' => 'Test 1' ] ], 'level-2' => [ 'level-2-1' => [ 'level-2-1-text' => 'Test 2' ] ], // ... and so long];$old_field['level-1']['level-1-1']['level-1-1-text'] = 'Test 1 (Updated)';update_field( 'my-field', $old_field, 'my-option-page' );此后我失去了 update_field 的能力。场始终保持不变'Test 1 (Updated)'无论是手动管理区域还是以编程方式,我都无法更新字段值。价值始终保持不变Test 1 (Updated)如何正确更新嵌套字段并解决此问题?
添加回答
举报
0/150
提交
取消