Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for override of update/remove for CMB2_Field #65

Merged
merged 2 commits into from Nov 9, 2014
Merged

Allow for override of update/remove for CMB2_Field #65

merged 2 commits into from Nov 9, 2014

Conversation

sc0ttkclark
Copy link
Contributor

Added two filters, also tweaked $a usage for simplifying filters. Related #64

@sc0ttkclark sc0ttkclark changed the title Allow for override of update/remove for CMB2_Field - Resolves #64 Allow for override of update/remove for CMB2_Field Oct 30, 2014
if ( ! $a['single'] ) {
return add_metadata( $a['type'], $a['id'], $a['field_id'], $new_value, false );
// If no override, update as usual
if ( false !== $override ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably keep w/ the WP convention of using null: https://github.com/WordPress/WordPress/blob/master/wp-includes/meta.php#L466

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And done :)

@jtsternberg jtsternberg merged commit 79b643a into CMB2:master Nov 9, 2014
@jtsternberg
Copy link
Member

Thanks @sc0ttkclark. I added some additional documentation, as well as some additional filters in e2d931b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants