Upgrade to 3.7.0
This commit is contained in:
12
kirby/config/sections/mixins/headline.php
Normal file → Executable file
12
kirby/config/sections/mixins/headline.php
Normal file → Executable file
@@ -1,18 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Kirby\Cms\Helpers;
|
||||
use Kirby\Toolkit\I18n;
|
||||
|
||||
return [
|
||||
'props' => [
|
||||
/**
|
||||
* The headline for the section. This can be a simple string or a template with additional info from the parent page.
|
||||
* @todo deprecate in 3.7
|
||||
* @todo remove in 3.9.0
|
||||
*/
|
||||
'headline' => function ($headline = null) {
|
||||
// TODO: add deprecation notive in 3.8.0
|
||||
// if ($headline !== null) {
|
||||
// Helpers::deprecated('`headline` prop for sections has been deprecated and will be removed in Kirby 3.9.0. Use `label` instead.');
|
||||
// }
|
||||
|
||||
return I18n::translate($headline, $headline);
|
||||
},
|
||||
/**
|
||||
* label is the new official replacement for headline
|
||||
* The label for the section. This can be a simple string or
|
||||
* a template with additional info from the parent page.
|
||||
* Replaces the `headline` prop.
|
||||
*/
|
||||
'label' => function ($label = null) {
|
||||
return I18n::translate($label, $label);
|
||||
|
Reference in New Issue
Block a user