1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-06 13:16:45 +02:00

feat(shortcodes): add getProjectUrl shortcode

This commit is contained in:
Awilum
2022-06-25 21:04:30 +03:00
parent 25af238e9c
commit 88b1c3ec0d

View File

@@ -51,6 +51,16 @@ parsers()->shortcodes()->addHandler('getAbsoluteUrl', static function () {
return getAbsoluteUrl();
});
// Shortcode: getProjectUrl
// Usage: (getProjectUrl)
parsers()->shortcodes()->addHandler('getProjectUrl', static function () {
if (! registry()->get('flextype.settings.parsers.shortcodes.shortcodes.url.enabled')) {
return '';
}
return getProjectUrl();
});
// Shortcode: getUriString
// Usage: (getUriString)
parsers()->shortcodes()->addHandler('getUriString', static function () {