Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function modify_rs_init_code() {
$custom_init_code = "$('.royalSlider').royalSlider({autoScaleSlider:true,autoScaleSliderWidth:960,autoScaleSliderHeight:850});";
include_once(ABSPATH."wp-content/plugins/new-royalslider/classes/NewRoyalSliderMain.php");
if( isset(NewRoyalSliderMain::$sliders_init_code) ) {
foreach(NewRoyalSliderMain::$sliders_init_code as $key => $value) {
NewRoyalSliderMain::$sliders_init_code[$key] = $custom_init_code;
}
}
}
add_filter( 'wp_footer', 'modify_rs_init_code' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment