Support » Plugin: CryptX » wp_register_script is not called correctly

  • Resolved Nick Halsey


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wp_register_script is not called correctly’ is closed to new replies.