It only applies to handgun magazines and only when the handgun is immediately available for use with the magazine.
The reason it never applies to long gun magazines is because the entire law against concealing a firearm does not apply to long guns (PC12025.) The way case law defines a 'firearm capable of being concealed upon the person' does not apply to rifles or shotguns (or parts thereof.)
It applies to pistols, revolvers, and could also apply to things like small AOWS or legally defined short barreled rifles and shotguns. But specifically does not apply to rifles and shotguns as defined by state law. That would be a long gun over 26" in length (and centerfire rifles must be 30" in length to not be an 'assault weapon'.)
Shotguns with detachable magazines are assault weapons under the assault weapon laws, and legally registered assault weapons generally must be transported under the same requirements as handguns. So it hardly matters for them.
Non assault-weapon rifle detached magazines however would not count.
Non-assault weapon long guns for example can be concealed at will in a vehicle under the law, outside of any locked case for the same reason. You could have a rifle or shotgun sitting beside you in your car covered by a blanket or piece of clothing and be completely legal. Under the seat, along side the door, on the floor under things in the back seat, or anywhere in the vehicle it doesn't matter there is no law against having them concealed. PC12025 does not apply to them, and never has.
The relevant case law concerning handgun magazines explains it has to do with being part of the complete firearm when concerning handguns, as an essential component completing the firearm.
The case is People vs Hale.
To really understand case law though you need to know what various little word combinations they say refer to.
Seemingly normal speech can actually refer specifically to statute wording with its own case law definitions in the penal code (like 'firearm capable of being concealed' for example).
In Hale the court determined concealing the loaded magazine was partial concealment of the total firearm as it applies to PC12025 (but it is never considered a loaded firearm per PC12031.)
This is also why you know it specifically does not apply to long gun magazines, because partial concealment (or total concealment) of a long gun is not legally restricted.
Ironically the whole reason the judge likely made the crazy decision in the Hale case was so finding the drugs wouldn't become inadmissible because there was no legitimate legal reason to perform the search (which was supposedly to find ammunition for a firearm that was perfectly legal to have sitting out in the open at that time in the 70s.)
By saying a concealed magazine was in fact a crime it kept probable cause and the search valid, which means finding the drugs was still admissible. Since the drug charges were the cornerstone of the entire prosecution if the probable cause for the search was not valid the entire case would have been thrown out.
Here is a summary of the important part of the Hale case which cites additional case law in it:
http://ca.findacase.com/research/wfrmDocViewer.aspx/xq/fac.\CA\CA3\1974\19741120_0040106.CA.htm/qx
[43 CalApp3d Page 356]
The facts known to the officer at the time of the search gave him reasonable cause to suspect Hale was committing a crime, viz. unlicensed carrying of a firearm concealed in a vehicle (Pen. Code, ? 12025*fn2). Only partial concealment of a firearm is required. (People v. Koehn, 25 Cal. App. 3d 799, 802 [102 Cal. Rptr. 102]; People v. Tarkington, 273 Cal. App. 2d 466, 469 [78 Cal. Rptr. 149]; People v. Linden, 185 Cal. App. 2d 752, 757 [8 Cal. Rptr. 640].) One portion of the automatic pistol, the housing and barrel, was visible, and it was reasonable for the officer to suspect concealment nearby of the remaining portion of the firearm, the automatic clip and ammunition. (See Green v. State (Okla.Crim.) 489 P.2d 768.) A firearm disassembled into two or more parts, can nevertheless constitute an operable weapon within the meaning of the Dangerous Weapons Control Law. (People v. Ekberg, 94 Cal. App. 2d 613, 616-617 [211 P.2d 316]; see also, State v. Ware (Fla.App.) 253 So.2d 145.)
"The carrying of concealed firearms is prohibited as a means of preventing physical harm to persons other than the offender." (People v. Jurado, 25 Cal. App. 3d 1027, 1032 [102 Cal. Rptr. 498].) In our opinion concealment of an essential component of a visible weapon, when done in such a fashion as to make the weapon readily available for use as a firearm, presents a threat to public order comparable to concealment of the entire firearm and falls within the prohibition of section 12025. In the light of the bizarre arsenal of weaponry Hale had installed around the driver's seat of his automobile, Officer Price had reasonable cause to suspect that a clip and ammunition for the automatic pistol might be hidden close at hand and to make a search for them.
So it becomes illegal to conceal the magazine when it makes "the weapon readily available for use as a firearm".
It is a loaded magazine that made the firearm readily available (which is entirely legal under PC12031 the loaded weapon law as that does not qualify as loaded per statute and case law) and the fact that it was concealed that makes it a crime per PC12025 according to the case law set by Hale.
Obviously if the handgun itself is locked up or at home then the magazine does not make it readily available as a weapon. The magazine itself is completely useless as a weapon.
Per the case law it is both the availability of the "clip and ammunition" combined with having the rest of the firearm at hand that made it available as a weapon and according to the judge constituted a violation because it made the 'weapon readily available for use as a firearm' partially concealed when the loaded magazine was concealed.
Making it a partially concealed handgun per the Hale decision.
In light of the case law one would probably be best not concealing a magazine while having a handgun readily available (not locked up.) But according to the case law it is the whole package being readily available for use as a weapon that made concealing part of it illegal.