cuny-academic-commons / cbox-theme

Default theme for Commons In A Box
GNU General Public License v2.0
20 stars 15 forks source link

Add filter for slider controls #231

Closed christianwach closed 8 years ago

christianwach commented 9 years ago

I sometimes like to show slider controls, so this filter allows me to do so :grinning:

r-a-y commented 9 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?

christianwach commented 9 years ago

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.

christianwach commented 8 years ago

@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'.

christianwach commented 8 years ago

Bump.

Are there any objections to this PR being merged? It would reduce the complexity in my answer to this forum topic.

boonebgorges commented 8 years ago

I'm fine with merging it. @christianwach You should feel free to do the honors.

christianwach commented 8 years ago

Thanks @boonebgorges