LEPTON CMS
7.4.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.get_parent_titles.php
Go to the documentation of this file.
1
<?php
2
18
// include secure.php to protect this file and the whole CMS!
19
if
(!defined(
"SEC_FILE"
)){define(
"SEC_FILE"
,
'/framework/secure.php'
);}
20
if
(defined(
'LEPTON_PATH'
)) {
21
include LEPTON_PATH.SEC_FILE;
22
}
else
{
23
$oneback =
"../"
;
24
$root
= $oneback;
25
$level
= 1;
26
while
((
$level
< 10) && (!file_exists(
$root
.SEC_FILE))) {
27
$root
.= $oneback;
28
$level
+= 1;
29
}
30
if
(file_exists(
$root
.SEC_FILE)) {
31
include
$root
.SEC_FILE;
32
}
else
{
33
trigger_error(sprintf(
"[ <b>%s</b> ] Can't include secure.php!"
, $_SERVER[
'SCRIPT_NAME'
]), E_USER_ERROR);
34
}
35
}
36
// end include secure file
37
38
39
// Function to get all parent page titles
40
function
get_parent_titles
( $parent_id )
41
{
42
$info =
'@TEMP_DEPRECATED 20250418: this function has to be reworked in L* 7.4.0")'
;
43
echo(
LEPTON_tools::display
($info,
'pre'
,
'ui orange message'
));
44
echo (
LEPTON_tools::display
(debug_print_backtrace(),
'pre'
,
'ui message'
));
45
46
LEPTON_handle::register
(
"is_parent"
,
"get_menu_title"
);
47
48
$titles[] =
get_menu_title
( $parent_id );
49
$iTempParent =
is_parent
( $parent_id );
50
if
( $iTempParent !== 0 )
51
{
52
$parent_titles =
get_parent_titles
( $iTempParent );
53
$titles = array_merge( $titles, $parent_titles );
54
}
55
return
$titles;
56
}
LEPTON_handle\register
static register()
Definition
lepton_handle.php:729
LEPTON_tools\display
static display(mixed $something_to_display="", string $tag="pre", string|null $css_class=null, bool|null $useVarDump=null)
Definition
lepton_tools.php:65
get_menu_title
get_menu_title(int $PageId=0)
Definition
function.get_menu_title.php:49
get_parent_titles
get_parent_titles( $parent_id)
Definition
function.get_parent_titles.php:40
$root
$root
Definition
function.get_parent_titles.php:24
$level
$level
Definition
function.get_parent_titles.php:25
is_parent
is_parent(int $iPageId)
Definition
function.is_parent.php:49
SVN
upload
framework
functions
function.get_parent_titles.php
Generated by
1.12.0