Elgg  Version 2.3
save.php
Go to the documentation of this file.
1 <?php
9 // featured menu items
10 $featured_names = get_input('featured_menu_names', array());
11 $featured_names = array_unique($featured_names);
12 if (in_array(' ', $featured_names)) {
13  unset($featured_names[array_search(' ', $featured_names)]);
14 }
15 elgg_save_config('site_featured_menu_names', $featured_names);
16 
17 // custom menu items
18 $custom_menu_titles = get_input('custom_menu_titles', array());
19 $custom_menu_urls = get_input('custom_menu_urls', array());
22 for ($i = 0; $i < $num_menu_items; $i++) {
23  if (trim($custom_menu_urls[$i]) && trim($custom_menu_titles[$i])) {
24  $url = $custom_menu_urls[$i];
27  }
28 }
29 elgg_save_config('site_custom_menu_items', $custom_menu_items);
30 
31 
32 system_message(elgg_echo('admin:menu_items:saved'));
33 
$custom_menu_items
Definition: save.php:21
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_save_config($name, $value, $site_guid=0)
Save a configuration setting.
$featured_names
Definition: save.php:10
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
$url
Definition: exceptions.php:24
$title
Definition: save.php:22
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
const REFERER
Definition: elgglib.php:2123
$num_menu_items
Definition: save.php:20
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:390
$custom_menu_urls
Definition: save.php:19
$custom_menu_titles
Definition: save.php:18