function awesome_gallery($id, $attributes = array()) { $gallery = new ASG_Gallery($id, $attributes); $gallery->ping(); $gallery->render(); }