Skip to content

cmb2_show_on

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

Filter to determine if metabox should show. Default is true.

Auto-generated Example

add_filter(
   'cmb2_show_on',
    function(
        array $show,
        mixed $meta_box_args,
        mixed $cmb
    ) {
        // Your code here.
        return $show;
    },
    10,
    3
);

Parameters

  • array $show Default is true, show the metabox.
  • mixed $meta_box_args Array of the metabox arguments.
  • mixed $cmb The CMB2 instance.

Files

apply_filters( 'cmb2_show_on', $show, $this->cmb->meta_box, $this->cmb )

← All Hooks

Clone this wiki locally