WordPress.org

Forums

Table of Contents Plus
Correctly enqueue scripts (2 posts)

  1. keithdevon
    Member
    Posted 2 years ago #

    In your toc.php file you have the following on line 126:

    add_action( 'init', array(&$this, 'init') );

    This should use the wp_enqueue_scripts action, like so:

    add_action( 'wp_enqueue_scripts', array(&$this, 'init') );

    The incorrect addition of scripts was breaking properly enqueued scripts on my site.

    http://wordpress.org/extend/plugins/table-of-contents-plus/

  2. Mike
    Member
    Plugin Author

    Posted 2 years ago #

    I'm only registering the scripts on init. I'm enqueueing them on wp_print_styles and template_redirect. Thanks for raising it, I'll take a closer look though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Table of Contents Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic