Here's a pull request that implements two small changes that make Crelly Slider more flexible.
The Diffs are a mess, because your source files include lots of superfluous whitespace, you should check your editor settings to automatically remove them. As mine does, to adhere to WordPress Coding Standards, the whole file looks changed, but there are only small tweaks done.
One change is to add a filtering mechanism to the CSS and JS for Crelly Slider. This way, a theme can choose if and where these resources should be loaded.
Here's an example for my theme, where I never load the CSS (it is included in my theme's stylesheet) and I only load the JS on the frontpage:
The other change is a small addition to the JS callback functions, so that they pass the slide_index into the callback. When reacting to slide changes, it is important to know which slide will come next, as the order is not fixed when having controls enabled.
I am not sure if this is the way to solve these problems, but it works for me know. So, even if you don't like the coding style, keep in mind that these are real issues for practical usage that should be solved.
Hello,
Here's a pull request that implements two small changes that make Crelly Slider more flexible.
The Diffs are a mess, because your source files include lots of superfluous whitespace, you should check your editor settings to automatically remove them. As mine does, to adhere to WordPress Coding Standards, the whole file looks changed, but there are only small tweaks done.
One change is to add a filtering mechanism to the CSS and JS for Crelly Slider. This way, a theme can choose if and where these resources should be loaded.
Here's an example for my theme, where I never load the CSS (it is included in my theme's stylesheet) and I only load the JS on the frontpage:
The other change is a small addition to the JS callback functions, so that they pass the
slide_index
into the callback. When reacting to slide changes, it is important to know which slide will come next, as the order is not fixed when having controls enabled.I am not sure if this is the way to solve these problems, but it works for me know. So, even if you don't like the coding style, keep in mind that these are real issues for practical usage that should be solved.
Thanks for the great plugin!
Alain