From 558263ade1414956fe698200fbabfe4ad568017a Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Sun, 12 Jul 2015 19:23:41 +0700 Subject: [PATCH] Recent posts lists Add options recent.count to the recent posts list functions so we can change it using config.ini --- system/includes/functions.php | 9 ++++++++- themes/logs/post.html.php | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/system/includes/functions.php b/system/includes/functions.php index 4cff6c3..2642d2a 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -630,10 +630,17 @@ function keyword_count($keyword) return count($tmp); } +// Return recent posts lists function recent() { + $count = config('recent.count'); + + if (empty($count)) { + $count = 5; + } + $str = '