bp_members_sanitize_invitation_property( int|string $value = '', string $property = '', string $context = 'html' )
Sanitize the invitation property output.
Parameters Parameters
- $value
-
(int|string) (Optional) The value for the requested property.
Default value: ''
- $property
-
(string) (Optional) The name of the requested property.
Default value: ''
- $context
-
(string) (Optional) The context of display.
Default value: 'html'
Return Return
(int|string) The sanitized value.
Source Source
File: bp-members/bp-members-filters.php
function bp_members_sanitize_invitation_property( $value = '', $property = '', $context = 'html' ) { if ( ! $property ) { return ''; } switch ( $property ) { case 'id': case 'user_id': case 'item_id': case 'secondary_item_id': $value = absint( $value ); break; case 'invite_sent': case 'accepted': $value = absint( $value ) ? __( 'Yes', 'buddypress' ) : __( 'No', 'buddypress' ); $value = 'attribute' === $context ? esc_attr( $value ) : esc_html( $value ); break; case 'invitee_email': $value = sanitize_email( $value ); break; case 'content': $value = wp_kses( $value, array() ); $value = wptexturize( $value ); break; case 'date_modified': $value = mysql2date( 'Y/m/d g:i:s a', $value ); $value = 'attribute' === $context ? esc_attr( $value ) : esc_html( $value ); break; default: $value = 'attribute' === $context ? esc_attr( $value ) : esc_html( $value ); break; } return $value; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
8.0.0 | Introduced. |