• I get the following error on activation of the plugin:

    Fatal error: Call to undefined function: wp_get_current_user() in (…)/wp-includes/capabilities.php on line 447

    ???

    (Same with WP-CSS)

Viewing 2 replies - 1 through 2 (of 2 total)
  • try adding

    if (file_exists(ABSPATH . 'wp-includes/pluggable.php')) {
        require_once(ABSPATH . 'wp-includes/pluggable.php');
    }

    at the beginning of the file wp-js.php right before
    include_once('wp-js-functions.php');

    that solved for me. Maybe the same applies to wp-css too

    edit: plugin now installs but it’s not working
    here’s the output
    Oh crap,the plugin messed up.Send me a message.File:

    Thanks italianstyle. I’ve added those lines of code.

    Please can you send me:

    – source code of the page the error occurred on
    – what javascript you were using
    – if you were using the the built-in interface or raw code
    – the os
    – version of wp

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP JS] Error On Activation’ is closed to new replies.