Skip to content

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.

Auto-generated Example

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
);

Parameters

  • null|bool $check Whether to allow updating metadata for the given type.
  • array $args
  • array $field_args All field arguments
  • CMB2_Field object $field This field object
    • string $value The value to set
    • string $type The current object type
    • int $id The current object ID
    • string $field_id The ID of the field being updated
    • bool $repeat Whether current field is repeatable
    • bool $single Whether current field is a single database row

Files

apply_filters( 'cmb2_override_meta_save', null, $a, $this->args(), $this )

← All Hooks

Clone this wiki locally