What is the equivalent of this old SPI code using the current SPI library? I see some old library code that initializes SPI this way:

    SPI.begin();
    SPI.setClockDivider(2);


It does not use beginTransaction/endTransaction blocks, and setClockDivider is now deprecated. The current way to use SPI is to use transaction blocks where you pass the settings in.

What is the equivalent to this code using transaction blocks? Also, since the other settings (max speed, data order, data mode) aren't specified in the above code, there must be defaults. What are these defaults?
The default is:


Mode 0
MSBFIRST


Not sure on the default speed. But:

setClockDivider() sets a speed relative to the system clock. So it's impossible to say what speed that will be since it'll be different on 8MHz boards compared to 16MHz.

setClockDivider(2) would be the same as using F_CPU/2 as a speed.