Skip to content

cmb2_can_save

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

Filter to determine if metabox is allowed to save.

Auto-generated Example

add_filter(
   'cmb2_can_save',
    function(
        bool $can_save,
        object $cmb
    ) {
        // Your code here.
        return $can_save;
    },
    10,
    2
);

Parameters

  • bool $can_save Whether the current metabox can save.
  • object $cmb The CMB2 instance.

Files

apply_filters( 'cmb2_can_save', $can_save, $this->cmb )

← All Hooks

Clone this wiki locally