Open carstingaxion opened 2 months ago
Added PR #882
I was able to add in the Filter, but something was reverting to the defaults when the block was selected.
Here is an example filter.
addFilter(
'gatherpress.durationOptions',
'gatherpress/durationOptionsTest',
(options) => {
return [
{
label: '2 hours',
value: 2,
},
{
label: '10 hours',
value: 10,
},
{
label: 'Set an end time...',
value: false,
},
];
},
99
);
QUEUED for Discussion - October 25
Faisal --- drag this one over the finish line.
Faisal working on this
Is your enhancement related to a problem? Please describe.
While I really like the new duration defaults within the event date block, the suggested default durations might not fit in every use case.
I would love if one could hook into the defaults and modify the list to whatever is needed.
Bonus: If the list gets populated with more than n values, it’ll show as a NumberControl with a calculated steps attribute, based on the given durations.
Designs
As this list seems to be only relevant inside the editor, I would prefer a client side filter in JS.
Describe alternatives you've considered
No response
Code of Conduct