95 if (!isset($CONFIG->menus[$menu_name])) {
96 $CONFIG->menus[$menu_name] = array();
99 if (is_array($menu_item)) {
102 elgg_log(
"Unable to add menu item '{$menu_item['name']}' to '$menu_name' menu",
'WARNING');
109 $CONFIG->menus[$menu_name][] =
$item;
125 if (!isset($CONFIG->menus[$menu_name])) {
129 foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
131 if ($menu_object->getName() == $item_name) {
132 $item = $CONFIG->menus[$menu_name][$index];
133 unset($CONFIG->menus[$menu_name][$index]);
153 if (!isset($CONFIG->menus[$menu_name])) {
157 foreach ($CONFIG->menus[$menu_name] as $menu_object) {
159 if ($menu_object->getName() == $item_name) {
179 if (!isset($CONFIG->menus[$menu_name])) {
183 foreach ($CONFIG->menus[$menu_name] as $index => $menu_object) {
185 if ($menu_object->getName() == $item_name) {
186 return $CONFIG->menus[$menu_name][$index];
223 'href' =>
"$handler/$name/$guid",
225 'link_class' =>
'elgg-button elgg-button-action',
242 if (!isset($CONFIG->breadcrumbs)) {
243 $CONFIG->breadcrumbs = array();
259 if (is_array($CONFIG->breadcrumbs)) {
260 return array_pop($CONFIG->breadcrumbs);
275 if (isset($CONFIG->breadcrumbs) && is_array($CONFIG->breadcrumbs)) {
276 return $CONFIG->breadcrumbs;
296 $registered =
$return[
'default'];
302 foreach ($registered as $index =>
$item) {
305 unset($registered[$index]);
318 $return[
'default'] = $featured;
319 if (count($registered) > 0) {
324 $max_display_items = 5;
330 $return[
'more'] = array_splice(
$return[
'default'], $max_display_items);
336 foreach (
$return as $section) {
339 foreach ($section as
$item) {
340 if ($item->getSelected()) {
350 foreach (
$return as $section_name => $section) {
358 if (
$item->getHref() == $current_url) {
380 if (
$item->annotation_id == 0) {
384 'href' =>
"#comments-add-$object->guid",
441 'href' =>
"$handler/edit/{$entity->getGUID()}",
451 'href' =>
"action/$handler/delete?guid={$entity->getGUID()}",
472 'name' =>
'collapse',
474 'href' =>
"#elgg-widget-content-$widget->guid",
475 'link_class' =>
'elgg-widget-collapse-button',
486 'href' =>
"action/widgets/delete?widget_guid=$widget->guid",
488 'link_class' =>
'elgg-widget-delete-button',
489 'id' =>
"elgg-widget-delete-button-$widget->guid",
490 'data-elgg-widget-type' =>
$widget->handler,
497 'name' =>
'settings',
500 'href' =>
"#widget-edit-$widget->guid",
501 'link_class' =>
"elgg-widget-edit-button",
520 'name' =>
'register',
521 'href' =>
'register',
523 'link_class' =>
'registration_link',
528 'name' =>
'forgotpassword',
529 'href' =>
'forgotpassword',
530 'text' =>
elgg_echo(
'user:password:lost'),
531 'link_class' =>
'forgot_link',
552 '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.