]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3860 changed context-sensitive to dynamic to describe menus
authorcash <cash.costello@gmail.com>
Sun, 2 Oct 2011 02:08:07 +0000 (22:08 -0400)
committercash <cash.costello@gmail.com>
Sun, 2 Oct 2011 02:08:07 +0000 (22:08 -0400)
engine/lib/navigation.php
engine/lib/views.php

index 778da94e9aff3d4b806905ce3c99e664997705fd..3f3a8ecd56aaab464c9f7a6f5b52a8c539ae362a 100644 (file)
  * Menus
  * Elgg uses a single interface to manage its menus. Menu items are added with
  * {@link elgg_register_menu_item()}. This is generally used for menus that
- * appear only once per page. For context-sensitive menus (such as the hover
+ * appear only once per page. For dynamic menus (such as the hover
  * menu for user's avatar), a plugin hook is emitted when the menu is being
  * created. The hook is 'register', 'menu:<menu_name>'. For more details on this,
  * @see elgg_view_menu().
  *
  * Menus supported by the Elgg core
  * Standard menus:
- *     site   Site navihgation shown on every page.
+ *     site   Site navigation shown on every page.
  *     page   Page menu usually shown in a sidebar. Uses Elgg's context.
  *     topbar Topbar menu shown on every page. The default has two sections.
  *     footer Like the topbar but in the footer.
  *     extras Links about content on the page. The RSS link is added to this.
  *
- * Context-sensitive (also called just-in-time menus):
+ * Dynamic menus (also called just-in-time menus):
  *     user_hover  Avatar hover menu. The user entity is passed as a parameter.
  *     entity      The set of links shown in the summary of an entity.
  *     river       Links shown on river items.
@@ -51,7 +51,7 @@
  *
  * @warning Generally you should not use this in response to the plugin hook:
  * 'register', 'menu:<menu_name>'. If you do, you may end up with many incorrect
- * links on a context-sensitive menu.
+ * links on a dynamic menu.
  *
  * @warning A menu item's name must be unique per menu. If more than one menu
  * item with the same name are registered, the last menu item takes priority.
index c31f61e841980f1a65b1482047a7bd43157b3b59..a18118f320df8efca121c83495baadbc587e177f 100644 (file)
@@ -709,9 +709,9 @@ function elgg_view_layout($layout_name, $vars = array()) {
  *
  * This function triggers a 'register', 'menu:<menu name>' plugin hook that enables
  * plugins to add menu items just before a menu is rendered. This is used by
- * context-sensitive menus (menus that are specific to a particular entity such
- * as the user hover menu). Using elgg_register_menu_item() in response to the hook
- * can cause incorrect links to show up. See the blog plugin's blog_owner_block_menu()
+ * dynamic menus (menus that change based on some input such as the user hover
+ * menu). Using elgg_register_menu_item() in response to the hook can cause
+ * incorrect links to show up. See the blog plugin's blog_owner_block_menu()
  * for an example of using this plugin hook.
  *
  * An additional hook is the 'prepare', 'menu:<menu name>' which enables plugins
@@ -724,8 +724,9 @@ function elgg_view_layout($layout_name, $vars = array()) {
  * @param array  $vars      An associative array of display options for the menu.
  *                          Options include:
  *                              sort_by => string or php callback
- *                                  string options: 'name', 'priority', 'title' (default), 'register' (registration order)
- *                                  php callback: a compare function for usort
+ *                                  string options: 'name', 'priority', 'title' (default),
+ *                                  'register' (registration order) or a
+ *                                  php callback (a compare function for usort)
  *                              handler: string the page handler to build action URLs
  *                              entity: ElggEntity to use to build action URLs
  *                              class: string the class for the entire menu.
@@ -744,7 +745,7 @@ function elgg_view_menu($menu_name, array $vars = array()) {
        $menu = $CONFIG->menus[$menu_name];
 
        // Give plugins a chance to add menu items just before creation.
-       // This supports context sensitive menus (ex. user_hover).
+       // This supports dynamic menus (example: user_hover).
        $menu = elgg_trigger_plugin_hook('register', "menu:$menu_name", $vars, $menu);
 
        $builder = new ElggMenuBuilder($menu);