You appear to be a bot. Output may be restricted
Description
Extract and return the first URL from passed content.
Usage
$string|false = get_url_in_content( $content );
Parameters
- $content
- ( string ) required – A string which might contain a URL.
Returns
string|false The found URL.
Source
File name: wordpress/wp-includes/formatting.php
Lines:
1 to 11 of 11
function get_url_in_content( $content ) { if ( empty( $content ) ) { return false; } if ( preg_match( '/<a\s[^>]*?href=([\'"])(.+?)\1/is', $content, $matches ) ) { return esc_url_raw( $matches[2] ); } return false; }