Changeset 24683 for trunk/wp-includes/formatting.php
- Timestamp:
- 07/12/2013 07:38:37 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/formatting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/formatting.php
r24642 r24683 3411 3411 return stripslashes_deep( $value ); 3412 3412 } 3413 3414 /** 3415 * Extract and return the first URL from passed content. 3416 * 3417 * @since 3.6.0 3418 * 3419 * @param string $content A string which might contain a URL. 3420 * @return string The found URL. 3421 */ 3422 function get_url_in_content( $content ) { 3423 if ( empty( $content ) ) 3424 return ''; 3425 3426 if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) 3427 return esc_url_raw( $matches[2] ); 3428 3429 return false; 3430 }
Note: See TracChangeset
for help on using the changeset viewer.