Need to test for current Wordpress Category in a Slider Callback

I am using Master Slider and would like the slider to open automatically to a certain page number based upon the category of the post the slider is on.

The Slider Callback for Master Slider provides the following code to do this, I just need to write the "If" statement that checks for the Post Category and I don't know how.


var api =;

I know I can use this in my theme header.php to test for a category:

if (in_category ( array ( ‘myCategoryName’, "myOtherCategoryName' ) ) ) {};

But I don't know what to use in the Callback Function? The code I just posted does not seem to work.

Thanks for any and all help! I'm sure this is simple, I just don't know how.