wp enqueue script help!
-
Hi,
I’m trying to use the wp enqueue script function to get around plugin js conflicts, but I’m afraid javascript doesn’t really agree with me. Can anyone help me with this please? I’m trying to convert this code from the Inline MP3 plugin:
function setplayerscripts() { ?> <link rel="stylesheet" href="/wp-content/plugins/mp3inline/css/player.css" type="text/css" media="screen" /> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/prototype.js"></script> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/domready.js"></script> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/sprintf.js"></script> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/Sound.js"></script> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/Player.js"></script> <script type="text/javascript" src="/wp-content/plugins/mp3inline/javascripts/scriptaculous.js"></script> <?php } add_action('wp_head', 'setplayerscripts'); ?>
In this format:
wp_enqueue_script('prototype', '/wp-content/plugins/mp3inline/javascripts/prototype.js'); wp_enqueue_script('domready', '/wp-content/plugins/mp3inline/javascripts/domready.js');
etc.
I have no idea if this is even the correct way of doing it, I’m just in dire need of making Inline MP3 & NextGen work together, and it looks like this is the only way…
As always, any help much appreciated!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘wp enqueue script help!’ is closed to new replies.