From 1e3c1afcacac23f4f7d34657dce6ba462b7ed97e Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 29 Sep 2011 19:49:01 -0400 Subject: Fixes #3827 updated documentation on @return for elgg_get_entities* functions --- engine/lib/access.php | 2 +- engine/lib/annotations.php | 10 ++++------ engine/lib/metadata.php | 3 +-- engine/lib/plugins.php | 2 +- engine/lib/private_settings.php | 2 +- engine/lib/relationships.php | 9 +++++++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/engine/lib/access.php b/engine/lib/access.php index 6da747463..20f57ec41 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -776,7 +776,7 @@ function elgg_view_access_collections($owner_guid) { * access_id => int The access ID of the entity. * * @see elgg_get_entities() - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_access_id(array $options = array()) { diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index 80ffbe74e..9ab5a1b39 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -285,14 +285,12 @@ function elgg_list_annotations($options) { */ /** - * Returns entities based upon annotations. Accepts the same values as - * elgg_get_entities_from_metadata() but uses the annotations table. + * Returns entities based upon annotations. Also accepts all options available + * to elgg_get_entities() and elgg_get_entities_from_metadata(). * - * NB: Entity creation time is selected as max_time. To sort based upon + * Entity creation time is selected as max_time. To sort based upon * this, pass 'order_by' => 'maxtime asc' || 'maxtime desc' * - * time_created in this case will be the time the annotation was created. - * * @see elgg_get_entities * @see elgg_get_entities_from_metadata * @@ -321,7 +319,7 @@ function elgg_list_annotations($options) { * * annotation_ids => NULL|ARR Annotation IDs * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_annotations(array $options = array()) { diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index a6b1bb43a..2becc5f3c 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -366,7 +366,6 @@ function elgg_enable_metadata(array $options) { * When in doubt, use name_value_pairs. * * @see elgg_get_entities - * @see elgg_get_entities_from_annotations * * @param array $options Array in format: * @@ -398,7 +397,7 @@ function elgg_enable_metadata(array $options) { * * metadata_owner_guids => NULL|ARR guids for metadata owners * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_metadata(array $options = array()) { diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php index fd85ed9f0..365ef6fdf 100644 --- a/engine/lib/plugins.php +++ b/engine/lib/plugins.php @@ -978,7 +978,7 @@ function elgg_unset_all_plugin_settings($plugin_id = null) { * plugin_user_setting_name_value_pairs_operator => NULL|STR The operator to use for combining * (name = value) OPERATOR (name = value); default AND * - * @return mixed + * @return mixed int if count is true, an array of entity objects, or false on failure */ function elgg_get_entities_from_plugin_user_settings(array $options = array()) { // if they're passing it don't bother diff --git a/engine/lib/private_settings.php b/engine/lib/private_settings.php index e5e7b2213..d7d819e1c 100644 --- a/engine/lib/private_settings.php +++ b/engine/lib/private_settings.php @@ -38,7 +38,7 @@ * their own settings. * * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.8.0 */ function elgg_get_entities_from_private_settings(array $options = array()) { diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 9d5fd39b6..f1da65a34 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -235,6 +235,11 @@ function get_entity_relationships($guid, $inverse_relationship = FALSE) { /** * Return entities matching a given query joining against a relationship. + * Also accepts all options available to elgg_get_entities() and + * elgg_get_entities_from_metadata(). + * + * @see elgg_get_entities + * @see elgg_get_entities_from_metadata * * @param array $options Array in format: * @@ -244,7 +249,7 @@ function get_entity_relationships($guid, $inverse_relationship = FALSE) { * * inverse_relationship => BOOL Inverse the relationship * - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.7.0 */ function elgg_get_entities_from_relationship($options) { @@ -365,7 +370,7 @@ function elgg_list_entities_from_relationship(array $options = array()) { * * @param array $options An options array compatible with * elgg_get_entities_from_relationship() - * @return array + * @return mixed int if count is true, an array of entity objects, or false on failure * @since 1.8.0 */ function elgg_get_entities_from_relationship_count(array $options = array()) { -- cgit v1.2.3 From 7c52743cc264e258d55c42dccde021b1032f2358 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 29 Sep 2011 20:56:34 -0400 Subject: Fixes #3666, #3748 distinct CSS for inline vs popup date picker and fixed position bug for prev/next links in header --- views/default/css/elements/forms.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index 1fced0196..bf5518b09 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -253,18 +253,26 @@ input[type="radio"] { **************************************** */ .ui-datepicker { margin-top: 3px; + width: 208px; background-color: white; border: 1px solid #0054A7; -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; + overflow: hidden; + -webkit-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5); -moz-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5); box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5); - overflow: hidden; +} +.ui-datepicker-inline { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; } .ui-datepicker-header { + position: relative; background: #4690D6; color: white; padding: 2px 0; -- cgit v1.2.3 From 150452e26d589bddcd74fa65a1b320f16574613c Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 29 Sep 2011 22:31:11 -0400 Subject: Fixes #3894 ui-datepicker should start out hidden --- views/default/css/elements/forms.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/default/css/elements/forms.php b/views/default/css/elements/forms.php index bf5518b09..83ec2f602 100644 --- a/views/default/css/elements/forms.php +++ b/views/default/css/elements/forms.php @@ -252,6 +252,8 @@ input[type="radio"] { DATE PICKER **************************************** */ .ui-datepicker { + display: none; + margin-top: 3px; width: 208px; background-color: white; -- cgit v1.2.3 From d50ec282fa3da9947968e959affd48825b2a7bbb Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 30 Sep 2011 17:03:51 -0400 Subject: Fixes #3904 action word should come first for encode_text parameter --- engine/lib/navigation.php | 2 +- mod/groups/start.php | 4 ++-- mod/likes/views/default/annotation/likes.php | 2 +- mod/messageboard/start.php | 2 +- mod/messages/views/default/object/messages.php | 2 +- views/default/core/friends/collection.php | 2 +- views/default/output/confirmlink.php | 12 ++++++------ 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 27af26be2..778da94e9 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -393,7 +393,7 @@ function elgg_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); } diff --git a/mod/groups/start.php b/mod/groups/start.php index 9e4694457..0425bdea6 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -435,7 +435,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); @@ -447,7 +447,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) { 'name' => 'edit', 'href' => "#edit-annotation-$annotation->id", 'text' => elgg_echo('edit'), - 'text_encode' => false, + 'encode_text' => false, 'rel' => 'toggle', ); $return[] = ElggMenuItem::factory($options); diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php index e1ae20818..2dd01b6cd 100644 --- a/mod/likes/views/default/annotation/likes.php +++ b/mod/likes/views/default/annotation/likes.php @@ -31,7 +31,7 @@ if ($like->canEdit()) { 'href' => "action/likes/delete?annotation_id={$like->id}", 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, + 'encode_text' => false, )); } diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index 8a7f00958..0b0155069 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -150,7 +150,7 @@ function messageboard_annotation_menu_setup($hook, $type, $return, $params) { 'href' => $url, 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false + 'encode_text' => false ); $return[] = ElggMenuItem::factory($options); } diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php index b2d127d85..b6f9ed6d5 100644 --- a/mod/messages/views/default/object/messages.php +++ b/mod/messages/views/default/object/messages.php @@ -69,7 +69,7 @@ $delete_link = elgg_view("output/confirmlink", array( 'href' => "action/messages/delete?guid=" . $message->getGUID(), 'text' => "", 'confirm' => elgg_echo('deleteconfirm'), - 'text_encode' => false, + 'encode_text' => false, )); $body = <<owner_guid == elgg_get_logged_in_user_guid()) { 'href' => 'action/friends/collections/delete?collection=' . $coll->id, 'class' => 'delete_collection', 'text' => elgg_view_icon('delete'), - 'text_encode' => false, + 'encode_text' => false, )); echo ""; } diff --git a/views/default/output/confirmlink.php b/views/default/output/confirmlink.php index 31a34ae63..953c15f1b 100644 --- a/views/default/output/confirmlink.php +++ b/views/default/output/confirmlink.php @@ -6,16 +6,16 @@ * @package Elgg * @subpackage Core * - * @uses $vars['text'] The text of the link - * @uses $vars['href'] The address - * @uses $vars['title'] The title text (defaults to confirm text) - * @uses $vars['confirm'] The dialog text - * @uses $vars['text_encode'] Encode special characters? (false) + * @uses $vars['text'] The text of the link + * @uses $vars['href'] The address + * @uses $vars['title'] The title text (defaults to confirm text) + * @uses $vars['confirm'] The dialog text + * @uses $vars['encode_text'] Run $vars['text'] through htmlspecialchars() (false) */ $vars['rel'] = elgg_extract('confirm', $vars, elgg_echo('question:areyousure')); $vars['rel'] = addslashes($vars['rel']); -$encode = elgg_extract('text_encode', $vars, false); +$encode = elgg_extract('encode_text', $vars, false); // always generate missing action tokens $vars['href'] = elgg_add_action_tokens_to_url(elgg_normalize_url($vars['href']), true); -- cgit v1.2.3 From d44a060c8b9dbd94919bcf0edcb4f794da63d094 Mon Sep 17 00:00:00 2001 From: cash Date: Fri, 30 Sep 2011 17:22:49 -0400 Subject: Fixes #3890 removed admin check in useradd form since it is only used by admins --- views/default/forms/useradd.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/views/default/forms/useradd.php b/views/default/forms/useradd.php index 66f8846e2..4f337e4e4 100644 --- a/views/default/forms/useradd.php +++ b/views/default/forms/useradd.php @@ -17,10 +17,6 @@ if (elgg_is_sticky_form('useradd')) { } } -$admin_option = false; -if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { - $admin_option = true; -} ?>

@@ -67,18 +63,15 @@ if ((elgg_get_logged_in_user_entity()->isAdmin()) && ($vars['show_admin'])) { )); ?>
- +
"; echo elgg_view('input/checkboxes', array( 'name' => "admin", 'options' => array(elgg_echo('admin_option') => 1), 'value' => $admin, )); - echo "
"; -} ?> +
elgg_echo('register'))); ?> -- cgit v1.2.3 From 6b77c7de7a4b1c9d31236ccd7802bf9526cd1f41 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Oct 2011 11:33:06 -0400 Subject: Fixes #3826 using wwwroot in 1.8.x releases --- engine/lib/configuration.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php index b756d2e70..3a2364057 100644 --- a/engine/lib/configuration.php +++ b/engine/lib/configuration.php @@ -464,11 +464,6 @@ function get_config($name, $site_guid = 0) { $dep_version = 1.8; break; - case 'wwwroot': - $new_name = 'www_root'; - $dep_version = 1.8; - break; - case 'sitename': $new_name = 'site_name'; $dep_version = 1.8; @@ -553,7 +548,7 @@ function set_default_config() { 'path' => "$install_root/", 'view_path' => "$install_root/views/", 'plugins_path' => "$install_root/mod/", - 'www_root' => $www_root, + 'wwwroot' => $www_root, 'url' => $www_root, 'site_name' => 'New Elgg site', 'language' => 'en', @@ -561,8 +556,6 @@ function set_default_config() { // compatibility with old names for ppl not using get_config() 'viewpath' => "$install_root/views/", 'pluginspath' => "$install_root/mod/", - 'wwwroot' => $www_root, - 'url' => $www_root, 'sitename' => 'New Elgg site', ); -- cgit v1.2.3 From dc0a24816ee224962511739b312898ffaf19d8ae Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 Oct 2011 19:36:29 -0400 Subject: more was defined twice in the core language file --- languages/en.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/languages/en.php b/languages/en.php index 9d0590b2d..27b07d11c 100644 --- a/languages/en.php +++ b/languages/en.php @@ -826,8 +826,6 @@ $english = array( 'top' => 'Top', 'bottom' => 'Bottom', - 'more' => 'more', - 'invite' => "Invite", 'resetpassword' => "Reset password", -- cgit v1.2.3 From 8be10bb100a6a4d9abc6bf7ee928d5c2e60004de Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 Oct 2011 19:53:37 -0400 Subject: Fixes #3912 checking that the upload succeeded before resizing --- actions/avatar/upload.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/actions/avatar/upload.php b/actions/avatar/upload.php index 19976ea87..885a16557 100644 --- a/actions/avatar/upload.php +++ b/actions/avatar/upload.php @@ -11,6 +11,11 @@ if (!$owner || !($owner instanceof ElggUser) || !$owner->canEdit()) { forward(REFERER); } +if ($_FILES['avatar']['error'] != 0) { + register_error(elgg_echo('avatar:upload:fail')); + forward(REFERER); +} + //@todo make this configurable? $icon_sizes = array( 'topbar' => array('w'=>16, 'h'=>16, 'square'=>TRUE, 'upscale'=>TRUE), @@ -42,7 +47,7 @@ foreach ($icon_sizes as $name => $size_info) { $file->delete(); } - system_message(elgg_echo('avatar:resize:fail')); + register_error(elgg_echo('avatar:resize:fail')); forward(REFERER); } } -- cgit v1.2.3 From a186ad16e258c6335e1757a20845c64056b87f15 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 Oct 2011 20:09:16 -0400 Subject: Fixes #3913 registering jquery.imgareaselect --- engine/lib/elgglib.php | 3 +++ views/default/forms/avatar/crop.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 7bdc5972a..c62175629 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -2031,7 +2031,10 @@ function elgg_init() { elgg_register_js('elgg.userpicker', 'js/lib/userpicker.js'); elgg_register_js('elgg.friendspicker', 'js/lib/friends_picker.js'); elgg_register_js('jquery.easing', 'vendors/jquery/jquery.easing.1.3.packed.js'); + elgg_register_js('jquery.imgareaselect', 'vendors/jquery/jquery.imgareaselect-0.9.8/scripts/jquery.imgareaselect.min.js'); + elgg_register_css('jquery.imgareaselect', 'vendors/jquery/jquery.imgareaselect-0.9.8/css/imgareaselect-deprecated.css'); + // Trigger the shutdown:system event upon PHP shutdown. register_shutdown_function('_elgg_shutdown_hook'); diff --git a/views/default/forms/avatar/crop.php b/views/default/forms/avatar/crop.php index 9fcae25c4..b97db939c 100644 --- a/views/default/forms/avatar/crop.php +++ b/views/default/forms/avatar/crop.php @@ -5,6 +5,9 @@ * @uses $vars['entity'] */ +elgg_load_js('jquery.imgareaselect'); +elgg_load_css('jquery.imgareaselect'); + $master_image = $vars['entity']->getIconUrl('master'); ?> @@ -25,8 +28,6 @@ echo elgg_view('input/submit', array('value' => elgg_echo('avatar:create'))); ?>
- - -- cgit v1.2.3 From 3f3994647b238f05233da5f22f75a88582562308 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Oct 2011 21:51:53 -0400 Subject: Fixes #3686 added work around for PHP bug when validating URLs with dashes --- mod/bookmarks/actions/bookmarks/save.php | 19 ++++++++++++++++++- mod/bookmarks/languages/en.php | 3 ++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/mod/bookmarks/actions/bookmarks/save.php b/mod/bookmarks/actions/bookmarks/save.php index 19bb3c73a..f240c4b26 100644 --- a/mod/bookmarks/actions/bookmarks/save.php +++ b/mod/bookmarks/actions/bookmarks/save.php @@ -24,7 +24,24 @@ if ($address && !preg_match("#^((ht|f)tps?:)?//#i", $address)) { $address = "http://$address"; } -if (!$title || !$address || !filter_var($address, FILTER_VALIDATE_URL)) { +if (!$title || !$address) { + register_error(elgg_echo('bookmarks:save:failed')); + forward(REFERER); +} + +// see https://bugs.php.net/bug.php?id=51192 +$php_5_2_13_and_below = version_compare(PHP_VERSION, '5.2.14', '<'); +$php_5_3_0_to_5_3_2 = version_compare(PHP_VERSION, '5.3.0', '>=') && + version_compare(PHP_VERSION, '5.3.3', '<'); + +$validated = false; +if ($php_5_2_13_and_below || $php_5_3_0_to_5_3_2) { + $tmp_address = str_replace("-", "", $address); + $validated = filter_var($tmp_address, FILTER_VALIDATE_URL); +} else { + $validated = filter_var($address, FILTER_VALIDATE_URL); +} +if (!$validated) { register_error(elgg_echo('bookmarks:save:failed')); forward(REFERER); } diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 1d32a0344..0478e292f 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -24,7 +24,7 @@ $english = array( 'bookmarks:with' => "Share with", 'bookmarks:new' => "A new bookmark", 'bookmarks:via' => "via bookmarks", - 'bookmarks:address' => "Address of the resource to bookmark", + 'bookmarks:address' => "Address of the bookmark", 'bookmarks:none' => 'No bookmarks', 'bookmarks:delete:confirm' => "Are you sure you want to delete this resource?", @@ -75,6 +75,7 @@ $english = array( */ 'bookmarks:save:failed' => "Your bookmark could not be saved. Make sure you've entered a title and address and then try again.", + 'bookmarks:save:invalid' => "The address of the bookmark is invalid and could nto be saved.", 'bookmarks:delete:failed' => "Your bookmark could not be deleted. Please try again.", ); -- cgit v1.2.3 From ad016fd1254aa03afa7c24fdb82b35faa3c5019f Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Oct 2011 22:08:07 -0400 Subject: Fixes #3860 changed context-sensitive to dynamic to describe menus --- engine/lib/navigation.php | 8 ++++---- engine/lib/views.php | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 778da94e9..3f3a8ecd5 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -20,20 +20,20 @@ * 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:'. 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:'. 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. diff --git a/engine/lib/views.php b/engine/lib/views.php index c31f61e84..a18118f32 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -709,9 +709,9 @@ function elgg_view_layout($layout_name, $vars = array()) { * * This function triggers a 'register', 'menu:' 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:' 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); -- cgit v1.2.3