jkudish/custom-metadata — pull request #1 by bobbysmith007 (2012-02-02 20:25:05+00:00)
Title: Fixed save callback to call before save OR delete (rather than only on the save branch)

Also made the argument order match $custom_metadata_manager->
save_metadata_field for ease of calling the default
method. (Essentially I am trying to allow custom save permissions).

This seems like it could break existing code, but it also seems like a better use / definition of save_callback than previously.

This is my callback, does that seem like a reasonable use case for the save callback?
Is it safe to clear the save_callback then recall the default? It seems like this should work, but I dont yet have a grasp on how everything is fitting together.

```php
function eit_readonly_save_cb($field_slug, $field, $object_type, $object_id, $value){
global $custom_metadata_manager;
if(current_user_can('edit_users')){
$field->save_callback = null;
$custom_metadata_manager->save_metadata_field( $field_slug, $field, $object_type, $object_id);
}
}
```

Hope this helps,
Russ