From 2bc800882dbce9042cf171b19be7d06302b05ad0 Mon Sep 17 00:00:00 2001 From: Scott Boms Date: Sat, 10 Feb 2024 13:13:20 -0800 Subject: [PATCH] Add new option to override date display. --- README.md | 5 +++-- composer.json | 8 ++++---- index.php | 3 ++- snippets/microseasons.php | 8 +++++--- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d6b48fb..fd9352b 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,10 @@ In any template, drop in the following line to include the output from this plug If you want to modify the wrapper HTML element, change the wrapper class, or output the date information in a custom format, you can configure this using the included plugin options. Date formatting follows the [available format options from PHP](https://www.php.net/manual/en/function.date.php). 'scottboms.microseasons' => [ - 'wrapper' => 'div', + 'wrapper' => 'div', // e.g. div, article, section, span, etc. 'class' => 'microseasons', - 'dateformat' => 'M d, Y' + 'includedates' => True, // True | False + 'dateformat' => 'M d, Y' // e.g. 'M d', 'Y-m-d', etc. ], ## Disclaimer diff --git a/composer.json b/composer.json index bf4029f..0226fb3 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "scottboms/microseasons", "description": "Kirby Micro Seasons plugin", "type": "kirby-plugin", - "version": "1.0.0", + "version": "1.0.1", "homepage": "https://github.com/scottboms/kirby-microseasons", "authors": [ { @@ -14,9 +14,9 @@ "license": "MIT", "keywords": [ - "kirby3", - "kirby3-cms", - "kirby3-plugin" + "kirby", + "kirby-cms", + "kirby-plugin" ], "require": { "getkirby/composer-installer": "^1.1" diff --git a/index.php b/index.php index c66a0c2..3bdbdf0 100644 --- a/index.php +++ b/index.php @@ -5,7 +5,7 @@ /** * Kirby Japanese Microseasons Plugin * - * @version 1.0.0 + * @version 1.0.1 * @author Scott Boms * @copyright Scott Boms * @link https://github.com/scottboms/kirby-microseasons @@ -23,6 +23,7 @@ 'options' => [ 'wrapper' => 'div', 'class' => 'microseasons', + 'includedates' => True, 'dateformat' => 'M d' ], 'snippets' => [ diff --git a/snippets/microseasons.php b/snippets/microseasons.php index 5ad042d..c9ae7b4 100644 --- a/snippets/microseasons.php +++ b/snippets/microseasons.php @@ -11,9 +11,11 @@ - + + + + \ No newline at end of file