guest) { $item = $theme->item(); if ($item) { $watching = notification::is_watching($item); $menu ->append(Menu::factory("link") ->id("watch") ->label(t("Enable notifications for this album")) ->url(url::site("notification/watch/$item->id?csrf=" . access::csrf_token())) ->css_id($watching ? "gRemoveWatchLink" : "gAddWatchLink")); } } } }