What you are requesting here is slightly different than what you requested in
this thread. If you want the PetFrame visible as stated here then you don't need any special code for it since it is parented to PlayerFrame and will show and hide with it already.
If you never want to see PetFrameManaBar then just do:
Code:
PetFrameManaBar:SetScript("OnShow", PetFrameManaBar.Hide)