From: Iain Patterson Date: Fri, 10 May 2013 16:10:00 +0000 (-0400) Subject: Small link functions. X-Git-Tag: 2013-05-13~23 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=1f7a83666984030585efbd902006bd797da66ebc;hp=c330db029c59cfb11746f79e3362821dbfc9942d;p=readifood.git Small link functions. get_small_link() generates HTML for a small font link. small_link() outputs the link directly. --- diff --git a/lib/functions.php b/lib/functions.php index 511e0cf..e970f54 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -434,6 +434,18 @@ echo "Day: "; } + function get_small_link() { + /* Args are , , [ ...] */ + $args = func_get_args(); + $html = htmlspecialchars(array_shift($args)); + $url = array_shift($args); + return vsprintf("$html\n", $args); + } + + function small_link() { + echo call_user_func_array("get_small_link", func_get_args()); + } + include_once("$lib_root/admin.php"); include_once("$lib_root/forms.php");