Maximum function nesting level of ‘200’ reached
-
Hello,
I’m making a php class and im trying to add_action to some scripts but when I run the method load_scripts I get
Fatal error: Maximum function nesting level of '200' reached, aborting! in /srv/www/starter-theme.com/current/web/wp/wp-includes/cache.php on line 724
If I comment out the method or even the add_action, all is fine.
Any insight?
Code Below:
class Theme_Setup { public function __construct() { $this->load_scripts(); } public function load_scripts() { add_action( 'wp_enqueue_scripts', array( $this, 'register_scripts' ) ); } public function register_scripts() { wp_enqueue_scripts( 'foundation-js', PARENT_URL . '/dist/scripts/foundation.min.js', array( 'jquery' ), '6.2.3', true ); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Maximum function nesting level of ‘200’ reached’ is closed to new replies.