Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
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
;
str_replace
$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
trim
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:254
$vars
$vars
Definition:
theme.php:5
Generated on Sat Oct 12 2024 00:02:40 for Elgg by
1.8.11