Last active
July 12, 2017 14:49
-
-
Save dimsemenov/979eced23ca97cf666b6a4f8359d466a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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