Skip to content

cmb2_save_field

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

Hooks after save field action.

Auto-generated Example

add_action(
   'cmb2_save_field',
    function(
        string $field_id,
        bool $updated,
        string $action,
        CMB2_Field object
    ) {
        // Your code here.
    },
    10,
    4
);

Parameters

  • string $field_id the current field id paramater.
  • bool $updated Whether the metadata update action occurred.
  • string $action Action performed. Could be "repeatable", "updated", or "removed".
  • CMB2_Field object $field This field object

Files

do_action( 'cmb2_save_field', $field_id, $updated, $action, $this )

← All Hooks

Clone this wiki locally