Site icon Hip-Hop Website Design and Development

How do I delete aspect from a serialized array upon deletion of a submit?

I need to delete a component (submit id) from a serialized array related to a selected meta_key. The next screenshot tells the entire story.

What you are seeing are, submit ids saved in a serialized array. Upon deletion of any submit the id of the submit needs to be faraway from meta_value the place meta_key is “no matter”. I need to wrap unset for components (each key and worth) inside a operate as proven beneath. Sounds complicated to me.

add_action('before_delete_post', 'upon_deleting_post');
operate upon_deleting_post($post_id){
....
};