Image to Post - random

This commit is contained in:
Matthew Barbour
2020-10-26 10:17:15 -05:00
parent bfe95a09e7
commit 0db32f2ccc
4 changed files with 18 additions and 18 deletions

View File

@ -22,7 +22,7 @@ class RandomImage extends Extension
$image = Image::by_random($search_terms);
if (!$image) {
throw new SCoreException(
"Couldn't find any images randomly",
"Couldn't find any posts randomly",
Tag::implode($search_terms)
);
}
@ -43,7 +43,7 @@ class RandomImage extends Extension
public function onSetupBuilding(SetupBuildingEvent $event)
{
$sb = new SetupBlock("Random Image");
$sb = new SetupBlock("Random Post");
$sb->add_bool_option("show_random_block", "Show Random Block: ");
$event->panel->add_block($sb);
}
@ -62,7 +62,7 @@ class RandomImage extends Extension
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
{
if ($event->parent=="posts") {
$event->add_nav_link("posts_random", new Link('random_image/view'), "Random Image");
$event->add_nav_link("posts_random", new Link('random_image/view'), "Random Post");
}
}
}