The first two arguments are for $vefore and $after. If a post doesn’t have a title, you get not extra markup. The last argument makes the function returning the string. Otherwise it would print it out immediately.