The first & in the function declaration calls PHP returns the link . & on $post makes a change to the actual variable that you pass to the function.
I really don’t understand why one of these (reference declarations) is used. It seems to me that this is an incorrect optimization attempt on Wordpress, or, most likely, compatibility with PHP 4. I think you can just ignore ampersands for your purposes.
source share