Elgg
Version master
views
default
output
friendlytitle.php
Go to the documentation of this file.
1
<?php
9
$title
=
elgg_extract
(
'title'
,
$vars
);
10
if
(empty(
$title
)) {
11
echo
$title
;
12
return
;
13
}
14
15
//$title = iconv('UTF-8', 'ASCII//TRANSLIT', $title);
16
$title
= preg_replace(
'/[^\w ]/'
,
''
,
$title
);
17
$title
= str_replace(
' '
,
'-'
,
$title
);
18
$title
= str_replace(
'--'
,
'-'
,
$title
);
19
$title
= trim(
$title
);
20
$title
=
elgg_strtolower
(
$title
);
21
22
echo
$title
;
$vars
$vars
Definition:
theme.php:5
elgg_extract
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition:
elgglib.php:256
$title
$title
Friendly title Makes a URL-friendly title.
Definition:
friendlytitle.php:9
elgg_strtolower
elgg_strtolower()
Wrapper function for mb_strtolower().
Definition:
mb_wrapper.php:125
Generated on Fri Aug 29 2025 00:01:59 for Elgg by
1.9.1