Upgrade to 4.0.2
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user