diff --git a/README.md b/README.md index 7686652..a674826 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ c::set('comments.pages.comments.title', function ($page) { | `honeypot.human-value` | string | `""` | Value of an empty honeypot field. | | | `email.enabled` | bool | `false` | Whether the plugin should send email notifications. | | | `email.to` | array(string) | `array()` | List of email addresses that receive email notifications. | | -| `email.subject` | string | `New Comment on {{ page.title }}` | Subject of an email notification. | | +| `email.subject` | string | `"New Comment on {{ page.title }}"` | Subject of an email notification. | | | `email.undefined-value` | string | `"(not specified)"` | Text that is inserted for values that the comment’s author did not specify. | | | `session.key` | string | `"comments"` | Key used to store the comments session. | | | `setup.content-page.title` | Closure | `function ($page) { return $page->title(); }` | Takes a `Page` and returns its title as `string`. Is used for generating email notifications. | | @@ -306,7 +306,7 @@ If you don’t want every comment to have an ID you can check for `$comment->isP ## API Documentation -### `$comments : Comments implements Iterator` +### `$comments : Comments implements Iterator, Countable` The main object you will be using when working with Kirby Comments. diff --git a/comments.php b/comments.php index 3eb4f9f..9044e47 100644 --- a/comments.php +++ b/comments.php @@ -1,9 +1,9 @@ ", "license": "MIT", - "version": "1.4.0", + "version": "1.4.1", "type": "kirby-plugin", "repository": { "type": "git", diff --git a/plugin/comment.php b/plugin/Comment.php similarity index 100% rename from plugin/comment.php rename to plugin/Comment.php diff --git a/plugin/comments.php b/plugin/Comments.php similarity index 99% rename from plugin/comments.php rename to plugin/Comments.php index b058307..629a07d 100644 --- a/plugin/comments.php +++ b/plugin/Comments.php @@ -3,7 +3,7 @@ /** * Comments */ -class Comments implements Iterator +class Comments implements Iterator, Countable { /** * All default values linked to their options-keys. @@ -191,7 +191,7 @@ public function process() // Check Session.ID == POST.Session.ID - if ($is_send) { + if ($is_submit) { $session_id = $_SESSION[Comments::option('session.key')]; $post_session_id = $_POST[Comments::option('form.session_id')]; diff --git a/plugin/comments-email.php b/plugin/CommentsEmail.php similarity index 100% rename from plugin/comments-email.php rename to plugin/CommentsEmail.php diff --git a/plugin/comments-status.php b/plugin/CommentsStatus.php similarity index 100% rename from plugin/comments-status.php rename to plugin/CommentsStatus.php