BP_XProfile_Field_Type_WordPress_Biography::edit_field_html( array $raw_properties = array() )

Output the edit field HTML for this field type.


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-wordpress-biography.php

	public function edit_field_html( array $raw_properties = array() ) {
		/*
		 * User_id is a special optional parameter that certain other fields
		 * types pass to {@link bp_the_profile_field_options()}.
		 */
		if ( ! is_admin() && isset( $raw_properties['user_id'] ) ) {
			unset( $raw_properties['user_id'] );
		}

		$user_id = bp_displayed_user_id();
		if ( isset( $raw_properties['user_id'] ) && $raw_properties['user_id'] ) {
			$user_id = (int) $raw_properties['user_id'];
			unset( $raw_properties['user_id'] );
		}
		?>

		<label for="<?php bp_the_profile_field_input_name(); ?>">
			<?php bp_the_profile_field_name(); ?>
			<?php bp_the_profile_field_required_label(); ?>
		</label>

		<?php
		/** This action is documented in bp-xprofile/bp-xprofile-classes */
		do_action( bp_get_the_profile_field_errors_action() );

		$r = wp_parse_args( $raw_properties, array(
			'cols' => 40,
			'rows' => 5,
		) );
		?>

		<textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php
			echo $this->sanitize_for_output( bp_get_user_meta( $user_id, $this->wp_user_key, true ), $user_id );
		?></textarea>

		<?php
	}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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