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

Prevent empty rows of data from being saved within multifields #91

Closed greatislander closed 1 year ago

greatislander commented 11 years ago

Currently, if a multifield is empty, an empty row of data will be serialized and saved (and likewise if an empty row is left within a multifield, it will be serialized and saved amidst the set values). This pull request makes sure that multifields are only saved if data is present and filters out empty rows within multifields before saving.