Closed christianwach closed 8 years ago
Instead of adding the filter to just one option, perhaps filter everything.
Perhaps it should be key-value based like:
apply_filters( 'cbox_slider_options', array(
'mode' => 'fade',
'video' => 'true',
// etc
) );
Then on output, we do a foreach / echo. What do others think?
That would certainly give ultimate flexibility. The reason I didn't implement something like that was because I couldn't actually think of a scenario where I'd want to change values other than showing the controls. They all seem like obvious defaults. Having said that, I probably should generalise from my own particular point-of-view.
@r-a-y Since there's been no movement on this for a while (and I needed it sorted for an urgent CBOX upgrade I had to do today) I went ahead and made all slider options filterable as you suggested. I called the filter cbox_flex_slider_controls
to avoid confusion between 'bxslider' and 'flexslider'.
Bump.
Are there any objections to this PR being merged? It would reduce the complexity in my answer to this forum topic.
I'm fine with merging it. @christianwach You should feel free to do the honors.
Thanks @boonebgorges
I sometimes like to show slider controls, so this filter allows me to do so :grinning: