Code:
import "std.zh"

ffc script QH_Trigger{
	void run(int combo){
		while(Screen->State[13] == false){
			if(Link->X <= this->X + 8 && Link->X >= this->X - 8){
				if(Link->Y <= this->Y + 8 && Link->Y >= this->Y - 8){
					if(Screen->Quake >= 1){
						Game->PlaySound(27);
						Screen->State[13] = true;
						Screen->ComboF[combo] = 0;
						Link->PitWarp(Game->GetCurDMap(), Game->GetCurScreen());
					}
				}
			}
			Waitframe();		
		}
	}
}
This was inspired by the dungeon entrance to Turtle Rock from Lttp where you needed to use the quake spell to open it. Not similar at all but it works.

Since it checks for quake and not the use of a quake hammer it'll work for all quakes. This includes quakes caused by scripts and such. So you can't used this in a room with a quake effect because it'll auto-trigger. Just place the ffc where you want link to use the quake hammer, and if you want him to be able to use it anywhere, get rid of the lines that check Link's position.

If you have questions, or need help let me know. :)
Enjoy!

EDIT: Thanks to pkmnfrk for helping me figure out how to trigger the secrets, or rather emulate the effect.