forked from friendica/friendica-addons
Code formatting
Wow.. This is very picky... |-(
This commit is contained in:
parent
537ee2e656
commit
d584196215
|
@ -41,12 +41,14 @@ function fancybox_render(App $a, array &$b)
|
||||||
}
|
}
|
||||||
$html = $b['html'];
|
$html = $b['html'];
|
||||||
while (preg_match($pattern, $html, $matches, PREG_OFFSET_CAPTURE)) {
|
while (preg_match($pattern, $html, $matches, PREG_OFFSET_CAPTURE)) {
|
||||||
if (is_array($matches)) $matches = $matches[0];
|
if (is_array($matches)) {
|
||||||
$part = $matches[0];
|
$matches = $matches[0];
|
||||||
|
}
|
||||||
|
$part = $matches[0];
|
||||||
$replaced = str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $part);
|
$replaced = str_replace('<a href', '<a data-fancybox="' . $gallery . '" href', $part);
|
||||||
$replaced = str_replace('<div class="body-attach"', '<div class="body-attach done"', $replaced);
|
$replaced = str_replace('<div class="body-attach"', '<div class="body-attach done"', $replaced);
|
||||||
$html = str_replace($part, $replaced, $html);
|
$html = str_replace($part, $replaced, $html);
|
||||||
}
|
}
|
||||||
$html = str_replace('class="body-attach done"', 'class="body-attach"', $html);
|
$html = str_replace('class="body-attach done"', 'class="body-attach"', $html);
|
||||||
$b['html'] = $html;
|
$b['html'] = $html;
|
||||||
}
|
}
|
Loading…
Reference in a new issue