The error describes WordPress attempting to execute an action resulting in Enqueue::css()
receiving too few arguments (it requires at least two).
In the constructor you are hooking Enqueue::css()
to the wp_enqueue_scripts
action. When wp_enqueue_scripts
is executed, it receives no additional arguments, so it calls Enqueue::css()
with no arguments, triggering the error.
Long story short, all of your methods in the Enqueue
class appear to be intended to enqueue scripts and stylesheets – there’s no reason to attach them to *_enqueue_scripts
action hooks. While functions hooked to those actions are an ideal place to enqueue scripts, hooking the functions which enqueue the scripts to them makes little sense – it is the equivalent of
add_action( 'wp_enqueue_scripts', 'wp_enqueue_script' );
The immediate solution is to remove all of the add_action()
calls from your constructor; longer-term the Enqueue
class’s functionality will need to be re-assessed.