From f818f2f707c89e77c43afe158095ada0d197e564 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 3 Mar 2019 21:47:31 +0300 Subject: [PATCH] Flextype Core: SiteUrl Shortcodes - fixes. --- flextype/shortcodes/SiteUrlShortcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flextype/shortcodes/SiteUrlShortcode.php b/flextype/shortcodes/SiteUrlShortcode.php index 88a893f8..6daec452 100644 --- a/flextype/shortcodes/SiteUrlShortcode.php +++ b/flextype/shortcodes/SiteUrlShortcode.php @@ -16,6 +16,6 @@ use Thunder\Shortcode\ShortcodeFacade; use Thunder\Shortcode\Shortcode\ShortcodeInterface; // Shortcode: [site_url] -$flextype['shortcodes']->addHandler('site_url', function() { - return Http::getBaseUrl(); +$flextype['shortcodes']->addHandler('site_url', function() use ($flextype) { + return \Slim\Http\Uri::createFromEnvironment(new \Slim\Http\Environment($_SERVER))->getBaseUrl(); });