BP_Admin_Tab::add_checkbox_field( $name,  $label,  $callback_args = array(),  $field_args = 'intval',  $id = null )

Alias to add input check box field

Description

Source

File: bp-core/classes/class-bp-admin-tab.php

	public function add_checkbox_field( $name, $label, $callback_args = [], $field_args = 'intval', $id = null ) {
		$callback = [$this, 'render_checkbox_field_html'];

		$callback_args = wp_parse_args( $callback_args, [
			'input_name'        => $this->get_input_name( $name ),
			'input_id'          => $this->get_input_id( $name ),
			'input_text'        => '',
			'input_description' => '',
			'input_value'       => $this->get_input_value( $name, null ),
			'input_default'     => 0,
			'input_run_js'      => false,
		] );

		return $this->add_field( $name, $label, $callback, $field_args, $callback_args, $id );
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.