-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
30 lines (23 loc) · 818 Bytes
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use TightenCo\Jigsaw\Jigsaw;
/** @var $container \Illuminate\Container\Container */
/** @var $events \TightenCo\Jigsaw\Events\EventBus */
$events->afterBuild(function ($jigsaw) {
$jigsaw->getFilesystem()->copyDirectory(__DIR__ . '/source/_assets/favicons', $jigsaw->getDestinationPath());
});
function media($path)
{
$cloudName = $GLOBALS['container']->config['services']['cloudinary']['cloudName'];
return "https://res.cloudinary.com/{$cloudName}/{$path}";
}
function content_sanitize($value)
{
return str_replace(["\r", "\n", "\r\n", ' '], ' ', strip_tags($value));
}
function str_limit_soft($value, $limit = 100, $end = '...')
{
if (mb_strlen($value, 'UTF-8') <= $limit) {
return $value;
}
return rtrim(strtok(wordwrap($value, $limit, "\n"), "\n"), ' .') . $end;
}