aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-29 20:38:11 -0400
committercash <cash.costello@gmail.com>2011-06-29 20:38:11 -0400
commit8526e7d2d081dc516710864c79561abf974d8feb (patch)
tree53384cca30ac17da7c526e49d60b6066a1a4abf9 /engine/classes
parent0750728e977c04a4a358bac0496b9d31c958238f (diff)
downloadelgg-8526e7d2d081dc516710864c79561abf974d8feb.tar.gz
elgg-8526e7d2d081dc516710864c79561abf974d8feb.tar.bz2
handling spaces and uppercase characters when creating menu item classes
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggMenuItem.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 36c21b8b4..cfdc2f5fa 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -394,8 +394,10 @@ class ElggMenuItem {
*/
public function getItemClass() {
// allow people to specify name with underscores and colons
- $name = str_replace('_', '-', $this->getName());
+ $name = strtolower($this->getName());
+ $name = str_replace('_', '-', $name);
$name = str_replace(':', '-', $name);
+ $name = str_replace(' ', '-', $name);
$class = implode(' ', $this->data['itemClass']);
if ($class) {