Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#383382 - use drupal behaviors. #376958 - in_array is daft and doesn't work like you think it would. If you made two node types into sliders, and left one off, you would get an error message on all your nodes.
Version 2 of the Slider will change a couple of fundamental mechanisms. There is no upgrade path from Version 1. You need to uninstall it first. See the issue queue for all the changes.