Updated post title extension to resolve set_title being removed from display image event

Resolves #724
This commit is contained in:
Matthew Barbour 2020-05-28 08:30:18 -05:00 committed by Shish
parent 830915adf2
commit 6145ecc6f8

View file

@ -33,10 +33,10 @@ class PostTitles extends Extension
public function onDisplayingImage(DisplayingImageEvent $event)
{
global $config;
global $config, $page;
if ($config->get_bool(PostTitlesConfig::SHOW_IN_WINDOW_TITLE)) {
$event->set_title(self::get_title($event->get_image()));
$page->set_title(self::get_title($event->get_image()));
}
}