From 65ec726fcd31630725f13b14ca8f4b6120ea0605 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Sun, 20 Dec 2015 21:28:31 -0800 Subject: [PATCH] Code cleanup and add support for new Craft 2.5 plugin features --- README.md | 11 +++++++ parsedown/ParsedownPlugin.php | 57 ++++++++++++++++++++++++++++++++--- releases.json | 10 ++++++ 3 files changed, 73 insertions(+), 5 deletions(-) create mode 100644 releases.json diff --git a/README.md b/README.md index 03a21ec..1b63ae9 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,14 @@ $parsedText = craft()->parsedown->parseText($entry->myBodyField); $parsedLine = craft()->parsedown->parseLine($entry->title); ``` + + +## Changelog + +### 1.1 + +* Updated to take advantage of new Craft 2.5 plugin features. + +### 1.0 + +* Initial release. diff --git a/parsedown/ParsedownPlugin.php b/parsedown/ParsedownPlugin.php index 663e35a..5ede50c 100644 --- a/parsedown/ParsedownPlugin.php +++ b/parsedown/ParsedownPlugin.php @@ -6,26 +6,73 @@ */ class ParsedownPlugin extends BasePlugin { - function getName() + /** + * @return string + */ + public function getName() { return 'Parsedown'; } - function getVersion() + /** + * @return string + */ + public function getVersion() { - return '1.0'; + return '1.1'; } - function getDeveloper() + /** + * @return string + */ + public function getSchemaVersion() + { + return '1.0.0'; + } + + /** + * @return string + */ + public function getDeveloper() { return 'Pixel & Tonic'; } - function getDeveloperUrl() + /** + * @return string + */ + public function getDeveloperUrl() { return 'http://pixelandtonic.com'; } + /** + * @return string + */ + public function getPluginUrl() + { + return 'https://github.com/pixelandtonic/Parsedown'; + } + + /** + * @return string + */ + public function getDocumentationUrl() + { + return $this->getPluginUrl().'/blob/master/README.md'; + } + + /** + * @return string + */ + public function getReleaseFeedUrl() + { + return 'https://raw.githubusercontent.com/pixelandtonic/Parsedown/master/releases.json'; + } + + /** + * @return ParsedownTwigExtension + */ public function addTwigExtension() { Craft::import('plugins.parsedown.twigextensions.ParsedownTwigExtension'); diff --git a/releases.json b/releases.json new file mode 100644 index 0000000..124bf4d --- /dev/null +++ b/releases.json @@ -0,0 +1,10 @@ +[ + { + "version": "1.1", + "downloadUrl": "https://github.com/pixelandtonic/Parsedown/archive/1.1.zip", + "date": "2015-20-20T12:00:00-08:00", + "notes": [ + "[Improved] Updated to take advantage of new Craft 2.5 plugin features." + ] + } +]