chapter hgroup + calming decor

This commit is contained in:
Julie Blanc 2026-04-07 18:09:15 +02:00
parent 0545b131de
commit 94d14d70c1
370 changed files with 9583 additions and 1566 deletions

View file

@ -3,6 +3,7 @@
namespace Kirby\Http;
use Kirby\Toolkit\Str;
use Whoops\Handler\PrettyPageHandler;
/**
* Static URL tools
@ -63,6 +64,23 @@ class Url
return dirname(static::current());
}
/**
* Use Whoops to create an editor URL to open
* a file at the given line number
* @since 5.3.0
*/
public static function editor(string|false $editor, string|null $file, int $line = 0): string|null
{
if ($editor === false || $file === null) {
return null;
}
$handler = new PrettyPageHandler();
$handler->setEditor($editor);
return $handler->getEditorHref($file, $line);
}
/**
* Tries to fix a broken url without protocol
* @psalm-return ($url is null ? string|null : string)
@ -223,6 +241,7 @@ class Url
/**
* Smart resolver for internal and external urls
* @deprecated 5.3.0 Use `Kirby\Cms\Url::to()` instead
*/
public static function to(
string|null $path = null,