  Sub-Neptunes around FGKM dwarfs are evenly distributed in log orbital period
down to $\sim$10 days, but dwindle in number at shorter periods. Both the break
at $\sim$10 days and the slope of the occurrence rate down to $\sim$1 day can
be attributed to the truncation of protoplanetary disks by their host star
magnetospheres at co-rotation. We demonstrate this by deriving planet
occurrence rate profiles from empirical distributions of pre-main-sequence
stellar rotation periods. Observed profiles are better reproduced when planets
are distributed randomly in disks---as might be expected if planets formed in
situ---rather than piled up near disk edges, as would be the case if they
migrated in by disk torques. Planets can be brought from disk edges to
ultra-short ($< 1$ day) periods by asynchronous equilibrium tides raised on
their stars. Tidal migration can account for how ultra-short period planets
(USPs) are more widely spaced than their longer period counterparts. Our
picture provides a starting point for understanding why metal-rich stars tend
to harbor more USPs, and why the sub-Neptune population drops at $\sim$10 days
regardless of whether the host star is of type FGK or early M. We predict
planet occurrence rates around A stars to also break at short periods, but at
$\sim$1 day instead of $\sim$10 days because A stars rotate faster than lower
mass stars (this prediction presumes that the planetesimal building blocks of
planets can drift inside the dust sublimation radius).
