I Write this code in my PHP file :
public function ScriptsStyles()
{
wp_enqueue_style(
'fontawesome',
plugins_url("/css/font-awesome.css", __FILE__),
array(),
'null'
);
wp_enqueue_style(
'base',
plugins_url("/css/base.css", __FILE__),
array('fontawesome'),
'null'
);
wp_enqueue_script(
'main',
plugins_url("/js/main.js", __FILE__),
array('test')
);
wp_enqueue_script(
'test',
plugins_url("/js/test.js", __FILE__),
array('jquery')
);
}
And when I checked it, using PHP Code Sniffer I get this Errors :
Opening parenthesis of a multi-line function call must be the last content on the line
those errors comes from this lines:
wp_enqueue_style(
'fontawesome',
plugins_url("/css/font-awesome.css", __FILE__),
array(),
'null'
);
wp_enqueue_style(
'base',
plugins_url("/css/base.css", __FILE__),
array('fontawesome'),
'null'
);
How to fix that ? And thanks
You have a space at the end of your line. :)
It expects the line to end in (
but it ends in [space]
.