hooks[] = $hook; return $this; } public function register_hooks() { foreach ( $this->hooks as $hook ) { $hook->register_hook(); } } }