Sorter integer keys get overwritten
Same issue as https://github.com/reduxframework/redux-framework/pull/1146
When having an integer as the key, after resetting, editing, saving, reloading page - the key now becomes a lowercase version of the value. i.e. key=value
//initial default:
array(13 = 'Title')
//after edit/save
array('title' = 'Title')
array(
'id' => 'opt-homepage-layout',
'type' => 'sorter',
'title' => 'Layout Manager Advanced',
'subtitle' => 'You can add multiple drop areas or columns.',
'compiler' => 'true',
'data' => array('disabled'=>'posts'),
'options' => array(
'enabled' => array(),
'disabled' => array(),
),
),
So any data type where the key is an integer (id field) will have this problem. e.g. post, page, term.
Using the pull request as a guide, I tried using array_replace instead of array_merge as it treats them all as key/value pairs instead of index/value however that didnt seem to work. The only change I could get to work was by patching it to prefix the key. I'll submit a patch for those after that feature.
Pull request to add prefix to key: https://github.com/reduxframework/redux-framework/pull/2428
That's fine, but we have a VERY strict policy about break backwards compatibility. Please make sure any pull request does not do so. It's been a problem as of late. :)
Addressed in Redux 4.