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.
Related Posts:
- How to enqueue script if widget is displayed on page?
- Why I can’t add a CSS style in this WordPress theme?
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- Is there a way to set the order of wp_footer hooked functions?
- What can I hook into after_setup_theme?
- What does “Do not deregister the jquery script in the administration area” mean?
- How do you enqueue script tags for ReactDOM in WordPress’ functions.php?
- using wp_enqueue_script to attach jquery-ui
- Enqueued Stylesheets Effecting Admin Styles
- wp_enqueue_script being ignored in custom theme
- Getting jquery to work with custom theme
- Is it safe to enqueue a font style without putting http or https?
- Adding wp_enqueue_media(); causes problem
- Is there a filter for enqueue script to strip the type=”text/javascript” property
- Including Javascript options
- Is my approach to enqueue styles inefficient?
- functions.php not hooking up with style.css
- way to include own functions independent of theme
- How to To Filter wp_enqueue_script() Scripts on Some Pages
- How to add Bootstrap Tour JavaScript to WordPress Admin Panel Dashboard Widget
- Difficulty loading jQuery with wp_enqueue_script
- jQuery not available to other scripts
- Can´t access child theme´s scripts dependencies found in parent
- How to modify default controls in WordPress theme customizer
- How to enqueue javascript for WP Customize options sidebar?
- Enqueued JavaScript is not working
- Overide enqueue in non plugable function via child theme
- How to register and enqueue JavaScript files without breaking plugin dependencies?
- How to enqueue a script which is type module without using script_loader_tag filter?
- Custom jquery not code not working in wordpress
- add jquery file if a certain page is included
- Adding google fonts to WordPress theme
- how can i remove js file from my footer in wordpress
- Find out the reason that the Styles and scripts in the theme are loading properly in localhost but Not in server after deploying
- Enqueue script for development purposes only?
- Correct was to customise theme using get_theme_mod in scripts
- how can I re-utilize and class on a child theme
- How do I get my theme scripts to load in a custom theme built from Bootstrap
- enqueue script if page is not equal to
- Theme now uses require.js and enqueue script no longer works
- Enqueue script/style with multiple GET parameters
- How to define and link full path to css located at a random folder on header.php
- CSS classes for theme
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- Trouble with conditional tags
- How Does One Change The Meta-Description Of Home-Page?
- Set front page as static page [closed]
- Theme Customizer – Choose where widget area appears, to let users organise widgets
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Adding default pagination to wordpress loop
- Recommended tools for Theme Development with SASS [closed]
- How to add font in wordpress
- What tags should be used for themes to show the type of layout?
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- How to call WooCommerce update cart function programatically
- Lightweight framework [closed]
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Echo all category names, apart from one
- Is it possible to visually group items on the theme customizer?
- Derive child theme from separate theme
- How to change footer or for different kinds of users in wordpress?
- How to Download Minimum Requirement of WordPress (Not Themes )
- Create a child theme from multiple themes
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- How to determine (via php) if site is using a static home page?
- Adding a new setting using Kirki or WP customizer with an if statement
- Translate a child theme with pure PHP and gettext
- Pagination: Keep prev and next link even on the first/ last page
- Is there a way to serve different resolution images to different devices?
- How to substitute old wordpress menu by wp 3 menu the right way?
- Catch the moment when theme is deleted
- Advanced method to control cache of enqueued style/script
- Attribute form NumberControl doesn’t update when I update page before it lose its focus
- Media & Plugin screens stall
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Create a variable with string, array or multiple values
- How can I include the js and css file of my custom theme dynamically in header.php
- Set start page depending on screen width [closed]
- Creating image grid on products page in wordpress
- Insert gutenberg blocks into template
- Bootstrap 4 mobile menu not working for WordPress Development
- Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel
- How to Enable Hot Module Replacement with Webpack
- What is the point of using archive.php instead of index.php?
- How to make it so I can “use” template parts in (classic/full) site editor
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles
- Cart button not working on mobile version [closed]
- Unwanted spacing for cover block
- Querying by post category slug with core/query block markup
- How to add multiple custom blocks in custom WordPress theme using create-block?
- Homepage with latest posts does not include current-menu-item
- WordPress 6.4.2 – can’t load editor style css using ‘after_setup_theme’ or ‘admin_init’ actions
- Create multiple facades for same product?
- Display Gutenberg blocks from “Posts Page” above the post list?
- Twenty Twenty-Four Theme, where to put the personalized CSS style rules?
- Get the name of the template/*html file used
- get_avatar() Returning a Number