Extending theme PHP class in plugin
Make your class visible to PHP after the theme has declared the parent class. Plugins are loaded first, the theme maybe later. This can be overridden. Theme code is available when the action after_setup_theme is fired, so you could use it like this: add_action( ‘after_setup_theme’, function() { require ‘ChildClass.php’; }); However, if the theme loads … Read more