BP_XProfile_Field_Type_Datebox::admin_field_html( array $raw_properties = array() )

Output HTML for this field type on the wp-admin Profile Fields screen.


Description Description

Must be used inside the bp_profile_fields() template loop.


Top ↑

Parameters Parameters

$raw_properties

(array) (Optional) key/value array of permitted attributes that you want to add.

Default value: array()


Source Source

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

	public function admin_field_html( array $raw_properties = array() ) {

		$day_r = bp_parse_args( $raw_properties, array(
			'id'   => bp_get_the_profile_field_input_name() . '_day',
			'name' => bp_get_the_profile_field_input_name() . '_day'
		) );

		$month_r = bp_parse_args( $raw_properties, array(
			'id'   => bp_get_the_profile_field_input_name() . '_month',
			'name' => bp_get_the_profile_field_input_name() . '_month'
		) );

		$year_r = bp_parse_args( $raw_properties, array(
			'id'   => bp_get_the_profile_field_input_name() . '_year',
			'name' => bp_get_the_profile_field_input_name() . '_year'
		) ); ?>

		<label for="<?php bp_the_profile_field_input_name(); ?>_day" class="xprofile-field-label"><?php
			esc_html_e( 'Day', 'buddypress' );
		?></label>
		<select <?php echo $this->get_edit_field_html_elements( $day_r ); ?>>
			<?php bp_the_profile_field_options( array( 'type' => 'day' ) ); ?>
		</select>

		<label for="<?php bp_the_profile_field_input_name(); ?>_month" class="xprofile-field-label"><?php
			esc_html_e( 'Month', 'buddypress' );
		?></label>
		<select <?php echo $this->get_edit_field_html_elements( $month_r ); ?>>
			<?php bp_the_profile_field_options( array( 'type' => 'month' ) ); ?>
		</select>

		<label for="<?php bp_the_profile_field_input_name(); ?>_year" class="xprofile-field-label"><?php
			esc_html_e( 'Year', 'buddypress' );
		?></label>
		<select <?php echo $this->get_edit_field_html_elements( $year_r ); ?>>
			<?php bp_the_profile_field_options( array( 'type' => 'year' ) ); ?>
		</select>

	<?php
	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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