Breadcrumbs from menu URL
You might want to try a community solution for this like breadcrumbs by path

Your custom function isn't doing anything with the url path itself, it's just using the breadcrumb variable. You can get the path with:

$_SERVER['HTTP_HOST'] . request_uri();


Then you could split by '/' and use drupal_set_breadcrumb to set it.