I'm creating my first wordpress plugin and I'm struggling to find the correct and best way to make sure jquery and my own JS file is included on my settings page of my plugin.
I do not need them to load anywhere else unless on my settings page.
What code and where do I put it in my plugin?
This is what I have so far as for creating the settings page:
add_action("admin_menu", "create_admin_pages");
function create_admin_pages() {
add_submenu_page('options-general.php', "MYPLUGIN", "MYPLUGIN", 10, "my-plugin", 'settings_page');
}
functions settings_page() {
// Settings form is here and I need Jquery and my script loaded for this
}
EDIT: The code above is somewhat been dumbed down so not to reveal the plugins function until its ready to be released. The Plugin I'm coding is wrapped in a class so its ok that the function names are generic.