function button_filter($buttons) { if (empty($this->media)) { $this->init(); } $buttons[] = $this->render(); return $buttons; }