From 812219e3727629cef14766e28858c75e614ba948 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 26 Jan 2016 14:00:39 +0100 Subject: [PATCH] consistent plugin usage - html_nugget this and followup commits touches: class method parenthesis "\n{\n \n}\n", case break switches, consistent boolean usage, append css to eventData and other cleanups --- .../serendipity_plugin_html_nugget.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php index bf869ef2..af71596f 100644 --- a/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php +++ b/plugins/serendipity_plugin_html_nugget/serendipity_plugin_html_nugget.php @@ -1,6 +1,11 @@ add('description', $desc); $propbag->add('stackable', true); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '1.0'); + $propbag->add('version', '1.1'); $propbag->add('configuration', array( 'title', 'backend_title', @@ -90,7 +95,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { return false; } - if ($this->get_config('markup', 'true') == 'true') { + if (serendipity_db_bool($this->get_config('markup', 'true'))) { $entry = array('html_nugget' => $this->get_config('content')); serendipity_plugin_api::hook_event('frontend_display', $entry); echo $entry['html_nugget']; @@ -98,6 +103,7 @@ class serendipity_plugin_html_nugget extends serendipity_plugin { echo $this->get_config('content'); } } + } ?> \ No newline at end of file