Changeset 8670
- Timestamp:
- 07/23/2014 01:05:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-functions.php
r8638 r8670 324 324 } 325 325 326 /**327 * If the field type is a URL and doesn't appear to contain a scheme,328 * we presume it needs http:// appended (unless a relative link starting329 * with / or a php file).330 */331 if ( 'url' === $field_type ) {332 if ( ( strpos( $value, ':' ) === false )333 && ( substr( $value, 0, 1 ) !== '/' )334 && ( substr( $value, 0, 1 ) !== '#' )335 && ! preg_match( '/^[a-z0-9-]+?\.php/i', $value )336 ) {337 $value = 'http://' . $value;338 }339 }340 341 326 // Check the value is in an accepted format for this form field. 342 327 if ( ! $field_type_obj->is_valid( $value ) ) {
Note: See TracChangeset
for help on using the changeset viewer.