Load JS script in head
-
Hi there.
I am currently setting up my own plugin, and in this ocasion i wish to add a javascript in head. I must be sure it is run AFTER the TinyMCE editor is loaded.
I want to add this code to head:
<script type=”text/javascript” src=”/WP-PDW-Load.js”></script>I have so far tried with this, in my plugin:
function load_PDW() { return '<script type="text/javascript" src="/the_full_path/WP-PDW-Load.js"></script>'; } add_action('admin_head', 'wp_head', 'load_PDW');
- The topic ‘Load JS script in head’ is closed to new replies.