From 566b755be286b794a07bc92655ec6791012b58ca Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 20 Nov 2010 18:55:24 +0000 Subject: added some light styling to the widget control buttons git-svn-id: http://code.elgg.org/elgg/trunk@7388 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggWidget.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engine/classes/ElggWidget.php') diff --git a/engine/classes/ElggWidget.php b/engine/classes/ElggWidget.php index 1622aa5b3..15e942aa3 100644 --- a/engine/classes/ElggWidget.php +++ b/engine/classes/ElggWidget.php @@ -101,6 +101,21 @@ class ElggWidget extends ElggObject { return get_private_setting($this->guid, 'context'); } + /** + * Get the title of the widget + * + * @return string + * @since 1.8.0 + */ + public function getTitle() { + $title = $this->title; + if (!$title) { + global $CONFIG; + $title = $CONFIG->widgets->handlers[$this->handler]->name; + } + return $title; + } + /** * Move the widget * -- cgit v1.2.3