BP_Admin_Tab::add_input_field( $name,  $label,  $callback_args = array(),  $field_args = 'sanitize_text_field',  $id = null )

Alias to add input text box field

Description

Source

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

	public function add_input_field( $name, $label, $callback_args = [], $field_args = 'sanitize_text_field', $id = null ) {
		$callback = [$this, 'render_input_field_html'];

		$callback_args = wp_parse_args( $callback_args, [
			'input_type'        => 'text',
			'input_name'        => $this->get_input_name( $name ),
			'input_id'          => $this->get_input_id( $name ),
			'input_description' => '',
			'input_value'       => $this->get_input_value( $name ),
			'input_placeholder' => ''
		] );

		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.