From 8e74406b431f0570ca26a8f3063ee17613fea864 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 27 Nov 2008 01:43:55 +0000 Subject: [PATCH] ENHANCEMENT Added IsWYSIWYGEnabled() to check if it's enabled or not, used for templates to determine whether to return parsed content or just standard HTML --- code/BlogEntry.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/BlogEntry.php b/code/BlogEntry.php index 14becec..6d1c2a3 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -48,9 +48,20 @@ class BlogEntry extends Page { /** * Is WYSIWYG editing allowed? + * @var boolean */ static $allow_wysiwyg_editing = false; + /** + * Is WYSIWYG editing enabled? + * Used in templates. + * + * @return boolean + */ + public function IsWYSIWYGEnabled() { + return self::$allow_wysiwyg_editing; + } + /** * overload so that the default date is today. */