From 689ccf5e86a0e4ea05d177de7129e0c5a7405775 Mon Sep 17 00:00:00 2001 From: ozhozh Date: Sun, 6 Sep 2009 22:01:41 +0000 Subject: [PATCH] Misc functions git-svn-id: http://yourls.googlecode.com/svn/trunk@131 12232710-3e20-11de-b438-597f59cd7555 --- includes/functions.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index a6c688a..0b84799 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1140,4 +1140,16 @@ function yourls_is_private() { function yourls_maybe_require_auth() { if( yourls_is_private() ) require_once( dirname(__FILE__).'/auth.php' ); +} + +// Echo HTML tag for a link +function yourls_html_link( $href, $title = '' ) { + if( !$title ) + $title = $href; + echo "$title"; +} + +// Return word or words if more than one +function yourls_plural( $word, $count=1 ) { + return $word . ($count > 1 ? 's' : ''); } \ No newline at end of file -- 2.45.0