76 if (!isset($CONFIG->menus[$menu_name])) {
77 $CONFIG->menus[$menu_name] = array();
80 if (is_array($menu_item)) {
83 elgg_log(
"Unable to add menu item '{$menu_item['name']}' to '$menu_name' menu",
'WARNING');
90 $CONFIG->menus[$menu_name][] =
$item;
106 if (!isset($CONFIG->menus[$menu_name])) {
110 foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
112 if ($menu_object->getName() == $item_name) {
113 $item = $CONFIG->menus[$menu_name][$index];
114 unset($CONFIG->menus[$menu_name][$index]);
134 if (!isset($CONFIG->menus[$menu_name])) {
138 foreach ($CONFIG->menus[$menu_name] as $menu_object) {
140 if ($menu_object->getName() == $item_name) {
160 if (!isset($CONFIG->menus[$menu_name])) {
164 foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
166 if ($menu_object->getName() == $item_name) {
167 return $CONFIG->menus[$menu_name][$index];
204 'href' =>
"$handler/$name/$guid",
206 'link_class' =>
'elgg-button elgg-button-action',
223 if (!isset($CONFIG->breadcrumbs)) {
224 $CONFIG->breadcrumbs = array();
240 if (is_array($CONFIG->breadcrumbs)) {
241 return array_pop($CONFIG->breadcrumbs);
256 if (isset($CONFIG->breadcrumbs) && is_array($CONFIG->breadcrumbs)) {
257 return $CONFIG->breadcrumbs;
277 $registered =
$return[
'default'];
283 foreach ($registered as $index =>
$item) {
286 unset($registered[$index]);
299 $return[
'default'] = $featured;
300 if (count($registered) > 0) {
305 $max_display_items = 5;
311 $return[
'more'] = array_splice(
$return[
'default'], $max_display_items);
317 foreach (
$return as $section) {
320 foreach ($section as
$item) {
321 if ($item->getSelected()) {
331 foreach (
$return as $section_name => $section) {
339 if (
$item->getHref() == $current_url) {
361 if (
$item->annotation_id == 0) {
365 'href' =>
"#comments-add-$object->guid",
422 'href' =>
"$handler/edit/{$entity->getGUID()}",
432 'href' =>
"action/$handler/delete?guid={$entity->getGUID()}",
453 'name' =>
'collapse',
455 'href' =>
"#elgg-widget-content-$widget->guid",
456 'link_class' =>
'elgg-widget-collapse-button',
467 'href' =>
"action/widgets/delete?widget_guid=$widget->guid",
469 'link_class' =>
'elgg-widget-delete-button',
470 'id' =>
"elgg-widget-delete-button-$widget->guid",
471 'data-elgg-widget-type' =>
$widget->handler,
478 'name' =>
'settings',
481 'href' =>
"#widget-edit-$widget->guid",
482 'link_class' =>
"elgg-widget-edit-button",
501 'name' =>
'register',
502 'href' =>
'register',
504 'link_class' =>
'registration_link',
509 'name' =>
'forgotpassword',
510 'href' =>
'forgotpassword',
511 'text' =>
elgg_echo(
'user:password:lost'),
512 'link_class' =>
'forgot_link',
533 'href' =>
'http://elgg.org',
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_push_breadcrumb($title, $link=null)
Adds a breadcrumb to the breadcrumbs stack.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
elgg_unregister_menu_item($menu_name, $item_name)
Remove an item from a menu.
elgg_view_icon($name, $class= '')
View one of the elgg sprite icons.
elgg_add_action_tokens_to_url($url, $html_encode=false)
Adds action tokens to URL.
_elgg_login_menu_setup($hook, $type, $return, $params)
Add the register and forgot password links to login menu private.
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
if($guid==elgg_get_logged_in_user_guid()) $name
elgg_get_menu_item($menu_name, $item_name)
Get a menu item registered for a menu.
$guid
Removes an admin notice.
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
Register a callback as a plugin hook handler.
_elgg_widget_menu_setup($hook, $type, $return, $params)
Widget menu is a set of widget controls private.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_in_context($context)
Check if this context exists anywhere in the stack.
elgg_get_breadcrumbs()
Returns all breadcrumbs as an array of array('title' => 'Readable Title', 'link' => 'URL') ...
elgg_register_title_button($handler=null, $name= 'add')
Convenience function for registering a button to the title menu.
elgg_get_context()
Get the current context.
elgg global
Pointer to the global context.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_register_menu_item($menu_name, $menu_item)
Register an item for an Elgg menu.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
_elgg_entity_menu_setup($hook, $type, $return, $params)
Entity menu is list of links and info on any entity private.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
Register a callback as an Elgg event handler.
elgg_log($message, $level= 'NOTICE')
Display or log a message.
_elgg_site_menu_setup($hook, $type, $return, $params)
Set up the site menu.
elgg_get_version($human_readable=false)
Get the current Elgg version information.
_elgg_nav_init()
Navigation initialization private.
elgg_get_excerpt($text, $num_chars=250)
Returns an excerpt.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
_elgg_river_menu_setup($hook, $type, $return, $params)
Add the comment and like links to river actions menu private.
elgg_pop_breadcrumb()
Removes last breadcrumb entry.
elgg_is_menu_item_registered($menu_name, $item_name)
Check if a menu item has been registered.