I was about to comment when you pushed the update for this codeblock.

Okay, I guess it could be useful. The `rtrim()` and the appended slash however are not necessary, `site_url()` will take care of that.