dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add attributes parameter to ShowSearchHitTitle
[lhc/web/wiklou.git]
/
includes
/
widget
/
search
/
FullSearchResultWidget.php
diff --git
a/includes/widget/search/FullSearchResultWidget.php
b/includes/widget/search/FullSearchResultWidget.php
index
0d0fa12
..
4c98399
100644
(file)
--- a/
includes/widget/search/FullSearchResultWidget.php
+++ b/
includes/widget/search/FullSearchResultWidget.php
@@
-133,13
+133,14
@@
class FullSearchResultWidget implements SearchResultWidget {
$title = clone $result->getTitle();
$query = [];
$title = clone $result->getTitle();
$query = [];
+ $attributes = [ 'data-serp-pos' => $position ];
Hooks::run( 'ShowSearchHitTitle',
Hooks::run( 'ShowSearchHitTitle',
- [ &$title, &$snippet, $result, $terms, $this->specialPage, &$query ] );
+ [ &$title, &$snippet, $result, $terms, $this->specialPage, &$query
, &$attributes
] );
$link = $this->linkRenderer->makeLink(
$title,
$snippet,
$link = $this->linkRenderer->makeLink(
$title,
$snippet,
-
[ 'data-serp-pos' => $position ]
,
+
$attributes
,
$query
);
$query
);