diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2017-04-25 00:09:35 +0900 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2017-04-25 00:09:35 +0900 |
| commit | bea631d3f5e7d533185187e284cd392da73de325 (patch) | |
| tree | 53bf1b5863d57b067ae535dfc988e97e25b0979f /templates/themes/recent/info.php | |
| parent | 501f2694ffc48968abbf75309522af4171805935 (diff) | |
Changes to add recent news to the Recent Posts Theme for the front page
Diffstat (limited to 'templates/themes/recent/info.php')
| -rw-r--r-- | templates/themes/recent/info.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/themes/recent/info.php b/templates/themes/recent/info.php index 58448b3d..bea3513c 100644 --- a/templates/themes/recent/info.php +++ b/templates/themes/recent/info.php @@ -64,12 +64,21 @@ 'comment' => '(eg. "recent.css" - see templates/themes/recent for details)' ); + $theme['config'][] = Array( + 'title' => '# of recent news', + 'name' => 'limit_news', + 'type' => 'text', + 'default' => '1', + 'comment' => '(maximum news to display)' + ); // Unique function name for building everything $theme['build_function'] = 'recentposts_build'; $theme['install_callback'] = 'recentposts_install'; if (!function_exists('recentposts_install')) { function recentposts_install($settings) { + if (!is_numeric($settings['limit_news']) || $settings['limit_news'] < 0) + return Array(false, '<strong>' . utf8tohtml($settings['limit_news']) . '</strong> is not a non-negative integer.'); if (!is_numeric($settings['limit_images']) || $settings['limit_images'] < 0) return Array(false, '<strong>' . utf8tohtml($settings['limit_images']) . '</strong> is not a non-negative integer.'); if (!is_numeric($settings['limit_posts']) || $settings['limit_posts'] < 0) |
