Programmatically Adding a Menu Item to a WordPress Menu

Just today I had to add a logo to a WordPress menu on a site I was working on. Because it is a graphic that I needed to add, I couldn’t easily use the default WordPress menu functionality to accomplish this. One possible workaround, I think, could have been to add a class to the…