[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-xprofile/classes/ -> class-bp-xprofile-field-type-wordpress-textbox.php (summary)

BuddyPress XProfile Classes.

File Size: 344 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BP_XProfile_Field_Type_WordPress_Textbox:: (11 methods):
  __construct()
  set_wp_user_key()
  get_field_value()
  sanitize_for_db()
  sanitize_for_output()
  edit_field_html()
  admin_field_html()
  get_field_settings()
  admin_save_settings()
  admin_new_field_html()
  display_filter()


Class: BP_XProfile_Field_Type_WordPress_Textbox  - X-Ref

WordPress xProfile regular field type.

__construct()   X-Ref
Constructor for the WordPress regular field type.

since: 8.0.0

set_wp_user_key( $field )   X-Ref
Sets the WordPress field wp_user_key property before saving the xProfile field.

param: BP_XProfile_Field $field Field object.
since: 8.0.0

get_field_value( $user_id, $field_id = 0 )   X-Ref
Gets the WordPress field value during an xProfile fields loop.

This function is used inside `BP_XProfile_ProfileData::get_data_for_user()`
to include the WordPress field value into the xProfile fields loop.

return: array An array containing the metadata `id`, `value` and `table_name`.
param: integer $user_id The user ID.
param: integer $field_id The xProfile field ID.
since: 8.0.0

sanitize_for_db( $value )   X-Ref
Sanitize the user field before saving it to db.

return: string The sanitized field value.
param: string $value The user field value.
since: 8.0.0

sanitize_for_output( $value, $user_id = 0 )   X-Ref
Sanitize the user field before displaying it as an attribute.

return: string The sanitized field value.
param: string $value The user field value.
since: 8.0.0

edit_field_html( array $raw_properties = array()   X-Ref
Output the edit field HTML for this field type.

Must be used inside the {@link bp_profile_fields()} template loop.

param: array $raw_properties Optional key/value array of
since: 8.0.0

admin_field_html( array $raw_properties = array()   X-Ref
Output HTML for this field type on the wp-admin Profile Fields screen.

Must be used inside the {@link bp_profile_fields()} template loop.

param: array $raw_properties Optional key/value array of permitted attributes that you want to add.
since: 8.0.0

get_field_settings( $field_id )   X-Ref
Get settings for a given WordPress field.

return: string The meta_key used for this field.
param: int $field_id ID of the field.
since: 8.0.0

admin_save_settings( $field_id, $settings )   X-Ref
Save settings from the field edit screen in the Dashboard.

return: bool True on success.
param: int   $field_id ID of the field.
param: array $settings Array of settings.
since: 8.0.0

admin_new_field_html( BP_XProfile_Field $current_field, $control_type = '' )   X-Ref
This method usually outputs HTML for this field type's children options on the wp-admin Profile Fields
"Add Field" and "Edit Field" screens, but for this field type, we don't want it, so it's stubbed out.

param: BP_XProfile_Field $current_field The current profile field on the add/edit screen.
param: string            $control_type  Optional. HTML input type used to render the
since: 8.0.0

display_filter( $field_value, $field_id = '' )   X-Ref
Format WordPress field values for display.

return: string The sanitized WordPress field.
param: string     $field_value The field value, as saved in the database.
param: string|int $field_id    Optional. ID of the field.
since: 8.0.0



Generated: Thu Nov 21 01:00:57 2024 Cross-referenced by PHPXref 0.7.1