wp-includes/comment.php:2607Extracts the mentioned user IDs from note content.
$contentstringint[]function wp_get_note_mentioned_user_ids( string $content ): array { if ( ! str_contains( $content, 'wp-note-mention' ) ) { return array(); } $user_ids = array(); $processor = new WP_HTML_Tag_Processor( $content ); while ( $processor->next_tag( array( 'tag_name' => 'SPAN', 'class_name' => 'wp-note-mention', ) ) ) { foreach ( $processor->class_list() as $class_name ) { if ( 1 === preg_match( '/^user-(\d+)$/', $class_name, $matches ) ) { $user_id = (int) $matches[1]; if ( $user_id > 0 ) { $user_ids[] = $user_id; } break; } } } return array_values( array_unique( $user_ids, SORT_NUMERIC ) );}Introduced in 7.1.0.
Signature, return type and hooks compared across 1 parsed release.
src/wp-includes/comment.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.