Just a quick note to mention that I’m working on a brand new preferences system for MediaWiki, the free software that runs Wikipedia.
Since it’s mostly done, I’ve activated a test setup of it over at my test wiki. Improvements include about ten bug fixes, see the tracking bug for full details (click on the links [...]
I guess the code says it all.
/**
* Insert array into another array after the specified *KEY*
* @param array $array The array.
* @param array $insert The array to insert.
* @param mixed $after The key to insert after
*/
function array_insert_after( $array, $insert, $after ) {
// Find the offset of the element to insert after.
$keys = [...]