aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/views.php2
-rw-r--r--views/default/layout/elements/title.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index bc9a6fd14..21409bab4 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1010,7 +1010,7 @@ function elgg_view_entity_annotations(ElggEntity $entity, $full = true) {
* This is a shortcut for {@elgg_view layout/elements/title}.
*
* @param string $title The page title
- * @param string $submenu Should a submenu be displayed? (default false, use not recommended and deprecated)
+ * @param string $submenu Should a submenu be displayed? (deprecated)
*
* @return string The HTML (etc)
*/
diff --git a/views/default/layout/elements/title.php b/views/default/layout/elements/title.php
index 5354352c9..19f47f4e6 100644
--- a/views/default/layout/elements/title.php
+++ b/views/default/layout/elements/title.php
@@ -1,9 +1,14 @@
<?php
/**
* Elgg title element
+ *
* @uses $vars['title'] The page title
+ * @uses $vars['class'] Optional class for heading
*/
-$display = "<h2>" . $vars['title'] . "</h2>";
+$class= '';
+if (isset($vars['class'])) {
+ $class = " class=\"{$vars['class']}\"";
+}
-echo $display; \ No newline at end of file
+echo "<h2{$class}>{$vars['title']}</h2>";