-
Notifications
You must be signed in to change notification settings - Fork 4
cmb2_override_meta_save
github-actions[bot] edited this page Jun 25, 2026
·
1 revision
Filter whether to override saving of meta value. Returning a non-null value will effectively short-circuit the function.
add_filter(
'cmb2_override_meta_save',
function(
null|bool $check,
array $args,
array $field_args,
CMB2_Field object
) {
// Your code here.
return $check;
},
10,
4
);-
null|bool$checkWhether to allow updating metadata for the given type. -
array$args -
array$field_argsAll field arguments -
CMB2_Fieldobject$field This field object-
string$valueThe value to set -
string$typeThe current object type -
int$idThe current object ID -
string$field_idThe ID of the field being updated -
bool$repeatWhether current field is repeatable -
bool$singleWhether current field is a single database row
-
apply_filters( 'cmb2_override_meta_save', null, $a, $this->args(), $this )add_action(
'cmb2_footer_enqueue',
function() {
// Your code here.
}
);do_action( 'cmb2_footer_enqueue' )