Support » Plugins and Hacks » [Resolved] admin_head and wp_enqueue_script

[Resolved] admin_head and wp_enqueue_script

  • I want to use jquery in my plugin’s option page (the plugin itself does not need jquery). I could do this by simply adding a “wp_enqueue_script(‘jquery’)” in my code. This works fine but unfortunately it also loads jquery everytime the blog is displayed and not only if the option page is loaded.

    To avoid this overhead I tried to load jquery the following way:

    function load_jquery() {
    add_action('admin_head', 'load_jquery');

    load_jquery() is executed but the jquery loading code does not appear in the head of the option page. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] admin_head and wp_enqueue_script’ is closed to new replies.
Skip to toolbar