wp-includes/formatting.php:5816Extracts and returns the first URL from passed content.
$contentstringstring|falsefunction get_url_in_content( $content ) { if ( empty( $content ) ) { return false; } $processor = new WP_HTML_Tag_Processor( $content ); while ( $processor->next_tag( 'A' ) ) { $href = $processor->get_attribute( 'href' ); if ( is_string( $href ) && '' !== $href ) { return sanitize_url( $href ); } } return false;}Introduced in 3.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/formatting.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.