Attacking creatures get +2/+0 until end of turn.
10/1/2009 An “attacking creature” is one that has been declared as an attacker this combat, or one that was put onto the battlefield attacking this combat. Unless that creature leaves combat, it continues to be an attacking creature through the end of combat step, even if the player it was attacking has left the game, or the planeswalker it was attacking has left combat.
10/1/2009 Even though Trumpet Blast affects only attacking creatures, the bonus will remain for the rest of the turn.
9/20/2014 Only creatures that are attacking as Trumpet Blast resolves will receive the bonus. In other words, casting it before you’ve declared attackers usually won’t do anything.