Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

BP_XProfile_Field::type_metabox()

Output the metabox for setting what type of field this is.


Return Return

(void) If default field.


Source Source

File: bp-xprofile/classes/class-bp-xprofile-field.php

	private function type_metabox() {

		// Default field cannot change type.
		if ( true === $this->is_default_field() ) {
			return;
		}
		?>

		<div class="postbox">
			<h2><label for="fieldtype"><?php esc_html_e( 'Type', 'buddypress'); ?></label></h2>
			<div class="inside" aria-live="polite" aria-atomic="true" aria-relevant="all">
				<?php if ( ! $this->field_type_supports( 'switch_fieldtype' ) ) : ?>
					<input type="text" disabled="true" value="<?php echo esc_attr( $this->type_obj->name ); ?>">
					<input type="hidden" name="fieldtype" id="fieldtype" value="<?php echo esc_attr( $this->type ); ?>">

				<?php else : ?>
					<select name="fieldtype" id="fieldtype" onchange="show_options(this.value)">

						<?php bp_xprofile_admin_form_field_types( $this->type ); ?>

					</select>
				<?php endif; ?>

				<?php

				// Deprecated filter, don't use. Go look at {@link BP_XProfile_Field_Type::admin_new_field_html()}.
				do_action( 'xprofile_field_additional_options', $this );

				$this->render_admin_form_children(); ?>

			</div>
		</div>

	<?php
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.