Automattic / custom-metadata

A WordPress plugin that provides an easy way to add custom fields to your object types (post, pages, custom post types, users)
https://wordpress.org/plugins/custom-metadata/
193 stars 46 forks source link

removed line that reversed array of multiple fields before saving. #97

Closed dravidian7 closed 10 years ago

dravidian7 commented 11 years ago

Fields were being reversed upon saving the post each time.

mjangda commented 11 years ago

@jkudish before I merge, do you remember why the array_reverse was added? It was done before we moved to Github so I couldn't blame far enough :)

jkudish commented 11 years ago

I don't remember specifics, no. It definitely had something to do with order and saving things in the correct order/not deleting the wrong things. I also believe it only affected certain field types.

The change was introduced in v 0.5 with this giant commit http://plugins.trac.wordpress.org/changeset/431583 :-1: and this note exists in the readme for that version:

* NOTE: currently multiplied fields will display out of order after saving, however this should not affect anything else other than the admin, should be fixed soon

I think we should ideally write some unit tests to make sure that this doesn't break any scenario. At the very least this should be carefully tested manually.

mjangda commented 10 years ago

A few people have worked through this and can't see why the reverse is needed. Also, testing across fields has shown that removing it doesn't seem to have an impact. Merging.