No.
My father has just bought an Apple iMac. He uses the speakers most of the time, but wants to be able to use his wireless headphones sometimes. At the moment this involves plugging the base station for the headphones in and out of the 3.5mm socket (which, of course is located on the back of the machine).
I can see two possible solutions. The first is a toggle switch which is either on “speakers” or “headphones”. That way the wireless headphone dock is permanently plugged in.
The second solution is to fix it in software. I don’t mind how it’s done. It just needs to be done. There is no reason why plugging in headphones should mute the speakers!