It's a little more complicated than what can fit inside of Bartender's custom conditions. You have to make this code into it's own addon. Treeston wrote it a while back:
LUA File
PHP Code:
local b1,b2 = "BT4Bar3", "BT4Bar4"
local function hook()
local s1,s2 = b1.SetAlpha,b2.SetAlpha
function b1:SetAlpha(v)
s1(b1,v)
s2(b2,v)
end
function b2:SetAlpha(v)
s1(b1,v)
s2(b2,v)
end
end
CreateFrame("Frame"):SetScript("OnUpdate", function(self)
local t1,t2 = (type(b1)=="string"),(type(b2)=="string")
if t1 and _G[b1] then
b1=_G[b1]
t1=false
end
if t2 and _G[b2] then
b2=_G[b2]
t2=false
end
if (not t1) and (not t2) then
self:Hide()
hook()
end
end)
How to use: http://addon.ziuo.net/