Skip to content

cmb2_override_meta_remove

github-actions[bot] edited this page Jun 25, 2026 · 1 revision

Filter whether to override removing of meta value. Returning a non-null value will effectively short-circuit the function.

'type' : Current object type 'id' : Current object ID 'field_id' : Current Field ID 'repeat' : Whether current field is repeatable 'single' : Whether to save as a single meta value

Auto-generated Example

add_filter(
   'cmb2_override_meta_remove',
    function(
        null|bool $delete,
        array $args,
        array $field_args,
        CMB2_Field object
    ) {
        // Your code here.
        return $delete;
    },
    10,
    4
);

Parameters

  • null|bool $delete Whether to allow metadata deletion of the given type.
  • array $args Array of data about current field including:
  • array $field_args All field arguments
  • CMB2_Field object $field This field object

Files

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

← All Hooks

Clone this wiki locally