Upgrade to 4.0.2

This commit is contained in:
Bastian Allgeier
2023-12-19 15:42:31 +01:00
parent 87ad81aeb9
commit 94d534e075
11 changed files with 217 additions and 119 deletions

View File

@@ -176,7 +176,11 @@ trait FileModifications
// fallback to content file options
if (($options['crop'] ?? false) === true) {
$options['crop'] = $this->focus()->value() ?? 'center';
if ($this instanceof ModelWithContent === true) {
$options['crop'] = $this->focus()->value() ?? 'center';
} else {
$options['crop'] = 'center';
}
}
// fallback to global config options

View File

@@ -9,6 +9,7 @@ use Kirby\Cms\Page;
use Kirby\Form\Form;
use Kirby\Http\Router;
use Kirby\Toolkit\I18n;
use Kirby\Toolkit\Str;
/**
* Provides common field prop definitions
@@ -222,6 +223,7 @@ class Field
return array_merge([
'label' => I18n::translate('slug'),
'type' => 'slug',
'allow' => Str::$defaults['slug']['allowed']
], $props);
}