Skip to content

Instantly share code, notes, and snippets.

@dimsemenov
Last active July 12, 2017 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimsemenov/979eced23ca97cf666b6a4f8359d466a to your computer and use it in GitHub Desktop.
Save dimsemenov/979eced23ca97cf666b6a4f8359d466a to your computer and use it in GitHub Desktop.
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