Semi-relevant thread:
https://www.pentaxforums.com/forums/general-technical-troubleshooting/168285-...tain-sync.html
Manual YNs (560, 460) does not interact with Pentax cameras. Therefore, if they are mounted on the camera, 2nd curtain sync option would not be available.
But. YN-560 could be placed off-camera & be triggered with in-camera strobe. Thus, if your in-cam strobe could be trailing synced, it may successfully lite off-camera YN-560.
As I have only manual lens, my in-cam strobe cannot be set to the trailing sync mode, so I cannot test this assumption with K-7, sorry. Though, on my Oly E-510 it works with some limitations described below.
You have to keep in mind, that in-cam flash would fire TTL pre-flash with 1st curtain. Thus, YN-560 in S1 mode will fire twice. In S2 mode you'll find yourself restricted to ~ 1/13 sec. of exposure or less.
1/10 sec., YN-560 in S2 mode didn't fire:
http://desu.org.ua/pf/2012/_6053431.JPG
1/13 sec., it fired:
http://desu.org.ua/pf/2012/_6053432.JPG
Maybe external optical slave sensors could help a little more with long exposures.