Should probably use substr rather than str_replace. It should be faster and doesn't have the potential to cause issues with something like login_link_login_link_foo