aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-06-28 07:30:22 -0400
committerCash Costello <cash.costello@gmail.com>2011-06-28 07:30:22 -0400
commiteb43980ad428e9c64406579de0677da7a4fcd081 (patch)
treeba8f044d070bd04ea9525d290ac04940cbae28c1 /engine/lib
parentf2bc7dd672a0717bd388fee51c4e97e1cb46f312 (diff)
downloadelgg-eb43980ad428e9c64406579de0677da7a4fcd081.tar.gz
elgg-eb43980ad428e9c64406579de0677da7a4fcd081.tar.bz2
using elgg_view_title() in content layout header
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/views.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 7358fc0ba..aff0dbd0d 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1076,21 +1076,24 @@ function elgg_view_entity_annotations(ElggEntity $entity, $full_view = true) {
}
/**
- * Returns a rendered title.
+ * Renders a title.
*
* This is a shortcut for {@elgg_view page/elements/title}.
*
- * @param string $title The page title
- * @param string $submenu Should a submenu be displayed? (deprecated)
+ * @param string $title The page title
+ * @param string $vars View variables (was submenu be displayed? (deprecated))
*
* @return string The HTML (etc)
*/
-function elgg_view_title($title, $submenu = false) {
- if ($submenu !== false) {
+function elgg_view_title($title, $vars = array()) {
+ if (!is_array($vars)) {
elgg_deprecated_notice('setting $submenu in elgg_view_title() is deprecated', 1.8);
+ $vars = array('submenu' => $vars);
}
- return elgg_view('page/elements/title', array('title' => $title, 'submenu' => $submenu));
+ $vars['title'] = $title;
+
+ return elgg_view('page/elements/title', $vars);
}
/**