WordPress v5.0.3 Gutenberg & JS error “Uncaught SyntaxError: missing ) after argument list”

After update from WP 5.0.2 to 5.0.3 I had issues in wp-admin. I couldn’t edit post data. There was JS error “Uncaught SyntaxError: missing ) after argument list”, undefined “_” (lodash) etc. 3 Answers 3 The issue for me was the clean_script_tag() function from Soil. Removing add_filter(‘script_loader_tag’, ‘clean_script_tag’); solved the bug for me.

Why doesn’t wp_enqueue_script() work when including a JavaScript file with TEMPLATEPATH?

I am trying to use tips from here to add my JS file. I put the following in the functions.php of atahualpa theme I’ve got installed function lektor_init() { if (true) { wp_enqueue_script(‘lektor’,TEMPLATEPATH.’/js/synteza.js’); } } add_action(‘init’,’lektor_init’); TEMPLATEPATH has been already used before in there, so I just adapted it. But it doesn’t show up. What … Read more

Hooks are not executing

Based on my understanding of hooks, you create a hook, by doing do_action(‘hook_name’); then add something to said hook and call the method where you want it to do the hook, so: public function hook_name(){ do_action(‘hook_name’); } some where you do something like: add_action(‘hook_name’, ‘some_hook’); and then some where in the theme you call: hook_name(); … Read more

Admin Hook at the Login Page

I need to write code before user can enter username and password. So, I have code written just after the following line in wp-login.php page: $action = isset($_REQUEST[‘action’]) ? $_REQUEST[‘action’] : ‘login’; The above line is somewhere # 372. My line: if ($action == ‘login’) { // My code } When done like this, script … Read more

WooCommerce – Overwrite action hook [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third party plugins and themes are off topic, they are better asked about at their developers’ support routes. Closed 6 … Read more