BP_XProfile_Field_Type_Textarea::admin_field_html( array $raw_properties = array() )
Output HTML for this field type on the wp-admin Profile Fields screen.
Description
Must be used inside the bp_profile_fields() template loop.
Parameters
- $raw_properties
-
(Optional) key/value array of permitted attributes that you want to add.
Default value: array()
Source
File: bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php
public function admin_field_html( array $raw_properties = array() ) {
$richtext_enabled = bp_xprofile_is_richtext_enabled_for_field();
if ( ! $richtext_enabled ) {
$r = bp_parse_args( $raw_properties, array(
'cols' => 40,
'rows' => 5,
) ); ?>
<textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>></textarea>
<?php
} else {
/** This filter is documented in bp-xprofile/classes/class-bp-xprofile-field-type-textarea.php */
$editor_args = apply_filters( 'bp_xprofile_field_type_textarea_editor_args', array(
'teeny' => true,
'media_buttons' => false,
'quicktags' => true,
'textarea_rows' => 1,
), 'admin' );
wp_editor(
'',
'xprofile_textarea_' . bp_get_the_profile_field_id(),
$editor_args
);
}
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.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.