Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
page_title
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
page_title
Commits
e5b8fcc1
Commit
e5b8fcc1
authored
16 years ago
by
Nicholas Thompson
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue with inconsistent variable names in page_title_page_get_title - used instead of .
parent
54d6daef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
page_title.module
+13
-5
13 additions, 5 deletions
page_title.module
with
13 additions
and
5 deletions
page_title.module
+
13
−
5
View file @
e5b8fcc1
...
...
@@ -200,9 +200,17 @@ function page_title_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
*/
function
page_title_get_title
()
{
$display_options
=
variable_get
(
'page_title_display'
,
array
());
$node
=
((
arg
(
0
)
==
'node'
)
&&
(
is_numeric
(
arg
(
1
))))
?
menu_get_object
()
:
NULL
;
if
((
arg
(
0
)
==
'node'
)
&&
(
is_numeric
(
arg
(
1
))))
{
$node
=
menu_get_object
();
}
elseif
((
arg
(
0
)
==
'comment'
)
&&
(
arg
(
1
)
==
'reply'
)
&&
(
is_numeric
(
arg
(
2
))))
{
$node
=
menu_get_object
();
}
else
{
$node
=
NULL
;
}
if
(
$display_options
[
$node
->
type
]
&&
!
empty
(
$node
->
page_title
))
{
if
(
$node
&&
$display_options
[
$node
->
type
]
&&
!
empty
(
$node
->
page_title
))
{
return
check_plain
(
strip_tags
(
$node
->
page_title
));
}
else
{
...
...
@@ -257,11 +265,11 @@ function page_title_page_get_title() {
$node
=
((
arg
(
0
)
==
'node'
)
&&
(
is_numeric
(
arg
(
1
))))
?
menu_get_object
()
:
NULL
;
//Get the pattern for the node type. If no node type available, assume blank
$
page_title_pattern
=
variable_get
(
'page_title_type_'
.
(
isset
(
$node
->
type
)
?
$node
->
type
:
''
),
''
);
$
title
=
variable_get
(
'page_title_type_'
.
(
isset
(
$node
->
type
)
?
$node
->
type
:
''
),
''
);
//If pattern is emtpy (either if the type is not overridable or simply not set) fallback to the default pattern
if
(
empty
(
$
page_title_pattern
))
{
$
page_title_pattern
=
variable_get
(
'page_title_default'
,
'[page-title] | [site-name]'
);
if
(
empty
(
$
title
))
{
$
title
=
variable_get
(
'page_title_default'
,
'[page-title] | [site-name]'
);
}
//Define Token Types array
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment