Hot answers tagged

2 votes
Accepted

wp_enqueue_scripts with JS script as a string

Unfortunately, wp_enqueue_script doesn't work that way — the second parameter is for a URL as per the documentation. But you could use wp_add_inline_script() (if there's an enqueue'd script to attach ...
1 vote

PHPUnit Ajax Serialization of 'Closure' is not allowed

Figured out that it was the @runTestsInSeparateProcesses annotation in the test class that was causing the error. Not sure why that would cause it. Once I removed it, the test completed successfully. ....
  • 181

Only top scored, non community-wiki answers of a minimum length are eligible