Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
b4844889
Commit
b4844889
authored
Dec 03, 2014
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SnowFlat: more compatible function override
parent
6e9611a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
30 deletions
+4
-30
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+4
-30
No files found.
qa-theme/SnowFlat/qa-theme.php
View file @
b4844889
...
...
@@ -228,10 +228,7 @@ class qa_html_theme extends qa_html_theme_base
}
/**
* The method has been overridden just to remove the '-' from the note
* for the category page (notes). I know it is not good idea to override
* this just for '-' it. But I did
* intentionally to avoid such issue during the updates.
* The method has been overridden to remove the '-' from the note for the category page (notes).
*
* @since Snow 1.4
* @param type $navlink
...
...
@@ -239,36 +236,13 @@ class qa_html_theme extends qa_html_theme_base
*/
public
function
nav_link
(
$navlink
,
$class
)
{
if
(
isset
(
$navlink
[
'url'
]))
{
$this
->
output
(
'<a href="'
.
$navlink
[
'url'
]
.
'" class="qa-'
.
$class
.
'-link'
.
(
@
$navlink
[
'selected'
]
?
(
' qa-'
.
$class
.
'-selected'
)
:
''
)
.
(
@
$navlink
[
'favorited'
]
?
(
' qa-'
.
$class
.
'-favorited'
)
:
''
)
.
'"'
.
(
strlen
(
@
$navlink
[
'popup'
])
?
(
' title="'
.
$navlink
[
'popup'
]
.
'"'
)
:
''
)
.
(
isset
(
$navlink
[
'target'
])
?
(
' target="'
.
$navlink
[
'target'
]
.
'"'
)
:
''
)
.
'>'
.
$navlink
[
'label'
]
.
'</a>'
);
}
else
{
$this
->
output
(
'<span class="qa-'
.
$class
.
'-nolink'
.
(
@
$navlink
[
'selected'
]
?
(
' qa-'
.
$class
.
'-selected'
)
:
''
)
.
(
@
$navlink
[
'favorited'
]
?
(
' qa-'
.
$class
.
'-favorited'
)
:
''
)
.
'"'
.
(
strlen
(
@
$navlink
[
'popup'
])
?
(
' title="'
.
$navlink
[
'popup'
]
.
'"'
)
:
''
)
.
'>'
.
$navlink
[
'label'
]
.
'</span>'
);
}
if
(
strlen
(
@
$navlink
[
'note'
]))
{
$qam_note_class
=
''
;
if
(
strpos
(
$navlink
[
'note'
],
'> -'
)
!==
false
)
{
$qam_note_class
=
!
empty
(
$navlink
[
'note'
])
?
' qam-cat-note'
:
null
;
}
// search and replace within the string
$search
=
array
(
' - <'
,
'> - '
);
$replace
=
array
(
' <'
,
'> '
);
$
output
=
$this
->
output
(
'<span class="qa-'
.
$class
.
'-note '
.
$qam_note_class
.
'">'
.
str_replace
(
$search
,
$replace
,
$navlink
[
'note'
])
.
'</span>'
);
$
navlink
[
'note'
]
=
str_replace
(
$search
,
$replace
,
$navlink
[
'note'
]
);
}
parent
::
nav_link
(
$navlink
,
$class
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment