From ea2146b2db19ae4e72f5b72c272c47292183e9dc Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Tue, 6 Dec 2016 19:31:29 +0100 Subject: [PATCH] Remove default plugins PicoParsePagesContent and PicoExcerpt As previously announced (see [Upgrade to Pico 1.0 page](http://picocms.org/in-depth/upgrade/)) we'll remove the default plugins `PicoParsePagesContent` and `PicoExcerpt` with the next Pico milestone. Needless to say, that you can still install both plugins without any problem - we'll add them to Pico's official [Plugins collection](http://picocms.org/plugins/) by then. Please note that the disadvantages of these plugins are still critical and we strongly advise to not use them. Please refer to the [Upgrade to Pico 1.0 page](http://picocms.org/in-depth/upgrade/) for details. --- plugins/01-PicoParsePagesContent.php | 40 -------------- plugins/02-PicoExcerpt.php | 81 ---------------------------- 2 files changed, 121 deletions(-) delete mode 100644 plugins/01-PicoParsePagesContent.php delete mode 100644 plugins/02-PicoExcerpt.php diff --git a/plugins/01-PicoParsePagesContent.php b/plugins/01-PicoParsePagesContent.php deleted file mode 100644 index 6611c90..0000000 --- a/plugins/01-PicoParsePagesContent.php +++ /dev/null @@ -1,40 +0,0 @@ -prepareFileContent($pageData['raw_content'], $pageData['meta']); - $pageData['content'] = $this->parseFileContent($pageData['content']); - } - } -} diff --git a/plugins/02-PicoExcerpt.php b/plugins/02-PicoExcerpt.php deleted file mode 100644 index 00cae14..0000000 --- a/plugins/02-PicoExcerpt.php +++ /dev/null @@ -1,81 +0,0 @@ -createExcerpt( - strip_tags($pageData['content']), - $this->getConfig('excerpt_length') - ); - } - } - - /** - * Helper function to create a excerpt of a string - * - * @param string $string the string to create a excerpt from - * @param int $wordLimit the maximum number of words the excerpt should be long - * @return string excerpt of $string - */ - protected function createExcerpt($string, $wordLimit) - { - $words = explode(' ', $string); - if (count($words) > $wordLimit) { - return trim(implode(' ', array_slice($words, 0, $wordLimit))) . '…'; - } - return $string; - } -}