[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

BuddyPress XProfile Classes.

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

Defines 1 class

BP_XProfile_Field_Type_URL:: (6 methods):
  __construct()
  edit_field_html()
  admin_field_html()
  admin_new_field_html()
  pre_validate_filter()
  display_filter()


Class: BP_XProfile_Field_Type_URL  - X-Ref

URL xprofile field type.

__construct()   X-Ref
Constructor for the URL field type

since: 2.1.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: 2.1.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
since: 2.1.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 current
since: 2.1.0

pre_validate_filter( $submitted_value = '', $field_id = '' )   X-Ref
Modify submitted URL values before validation.

The URL validation regex requires a http(s) protocol, so that all
values saved in the database are fully-formed URLs. However, we
still want to allow users to enter URLs without a protocol, for a
better user experience. So we catch submitted URL values, and if
the protocol is missing, we prepend 'http://' before passing to
is_valid().

param: string     $submitted_value Raw value submitted by the user.
param: string|int $field_id        Optional. ID of the field.
since: 2.1.0
since: 2.4.0 Added the `$field_id` parameter.
return: string

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

param: string     $field_value The URL value, as saved in the database.
param: string|int $field_id    Optional. ID of the field.
since: 2.1.0
since: 2.4.0 Added the `$field_id` parameter.
return: string URL converted to a link.



Generated: Sun Dec 22 01:00:54 2024 Cross-referenced by PHPXref 0.7.1