WordPress.org

Ready to get started?Download WordPress

Forums

CryptX
[resolved] wp_register_script is not called correctly (3 posts)

  1. Nick Halsey
    Member
    Posted 1 year ago #

    Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.) in [...]/wp-includes/functions.php on line 3012

    The issue is in cryptx.php:46. You can't just call wp_register_script raw, it needs to be added to an action. Looks like this was introduced in version 3.2.7.

    I would just do something like this:
    add_action('wp_enqueue_scripts','cryptx_register_script');, and move that code to that function.

    Using wp_enqueue_scripts also prevents it from running that code in the admin.

    http://wordpress.org/plugins/cryptx/

  2. Ralf Weber
    Member
    Plugin Author

    Posted 10 months ago #

    Fixed ;)

  3. Nick Halsey
    Member
    Posted 10 months ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.