bp_form_field_attributes

Output the attributes for a form field.

Description

bp_form_field_attributes( (string) $name = '', (array) $attributes = array() ); 

Parameters (2)

0. $name — Optional. (string) => ''
The field name to output attributes for.
1. $attributes — Optional. (array) => array()
Array of existing attributes to add.

Usage

  1. if ( !function_exists( 'bp_form_field_attributes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-template.php'; 
  3.  
  4. // The field name to output attributes for. 
  5. $name = ''; 
  6.  
  7. // Array of existing attributes to add. 
  8. $attributes = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_form_field_attributes($name, $attributes); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-template.php  
  1. function bp_form_field_attributes( $name = '', $attributes = array() ) { 
  2. echo bp_get_form_field_attributes( $name, $attributes );