From when I was looking at shotguns that is what I was told. I also did a quick search back then but didnt come up with anything definative other than what you posted about under 30 but over 26 with 18 in barrel then pistol and over 30 w/18in barrel then shotgun, but then I wasnt going to be installing the pistol grip anyways so I didnt look too hard. But here is what I remember. As always this is not legal advise nor quotes of laws. Just what I was told by a few well meaning gun counter clerks. ( I know second worst group to take legal advise from right behind LE so I'll put on the flame retardant shorts now)
If sold with a pistol grip installed with a CPL or Purchase permit used to register on 4473 and with local law enforcement then its a 12ga pistol. One even went so far as to say in this case you could not then install the standard length stock.
If sold with standard rifle type stock installed and listed on 4473 as shotgun 12ga without CPL or PP being used then it was a regular shotgun and could not be converted or re-registered as a pistol after changing the stock over to the included pistol grip.
Was kinda put to me as a purchase time decision without the ability of changing after the fact even if registered as a pistol to start with.