"to avoid" foods fall roughly into two categories:
1. Dangerous due to size or consistency.
With other words, anything that can't be chewed/munched,/mushed/nibbeled into small enough pieces to prevent choking. With some babies it's amazing what they manage to "chew" just with their gums, others will resist even the smallest chunks in their puree. It's hard to give a time frame, regardless what various books say, you need to watch your individual child.
Peanuts anyone? These clearly are among the most difficult things to chew: hard, slippery and easy to choke on because they are already quite small. So a no-no for small children. I have noticed that some babies insist on eating chunks of solid foods (as in solid like bread, pasta, banana or soft fruit) right from the start instead of puree from a spoon - and, in my experience, the more elder siblings the baby has, the higher the probability - but I digress.
2. Dangerous due to potential pathogens.
The more obvious candidates are raw eggs or undercooked chicken meat (Salmonella!), honey (Botulism!), undercooked meat, raw milk and cheeses (Listeria!) and anything that didn't adhere to the strictest food safety guidelines you find, for example, over at Seasoned Advice. A baby's / child's imune system and gut flora are not fully deveoped, this takes years. So as far as food safety is concerned, children fall into the same category as other imune compromised groups. Also remember that improper storage of food can be really, really dangerous. So while I might choose to eat that pasta salad that might have been out of the fridge a tad long, I would never give it to my children. You ask for a timeline: The one year mark is often given for honey and soft-boiled eggs. For that pasta salad I (personally) would at least wait until school age.
Now to the allergy and intolerance part (where peanuts come into the picture again):
Recommendations on what to feed or not to feed vary a lot, both over time and in different countries.
Simple example: In Germany (where I live), jars of baby food won't contain peas ("produce too much gas") or fish ("avoid fish in the first 12 months"), just across the Rhine in France (an hour or so from my home), peas and fish are considered an excellent source of protein and therefore in many jars. Somehow I doubt that homo sapiens has evolved differently on two sides of a river, so take these recommendations with a grain of salt.
While nine years ago, when I was pregnant with my first child, everyone was told to introduce grains with gluten as late as possible and by no means before the six month mark, current recommendation is to give small quantities as soon as by four months, especially if the child is at risk due to a gluten intolerance of a parent. Aehm.
I have seen similar statements like the one you linked in your comment concerning children whose parents have food allergies (not to be confused with intolerances), but in these cases, don't listen to strangers from the internet, talk to your doctor, please.