src/Traits/Component.php
protected function setup_components() {
		$this->load_components();

		$components = $this->get_components();
		$this->set_component_parents( $components );
		/** @var \ComposePress\Core\Abstracts\Component[] $components */
		foreach ( $components as $component ) {
			if ( method_exists( $component, 'init' ) ) {
				$component->init();
			}
		}
	}
protected function setup_components() {
		$this->load_components();

		$components = $this->get_components();
		$this->set_component_parents( $components );
		/** @var \ComposePress\Core\Abstracts\Component[] $components */
		foreach ( $components as $component ) {
			if ( method_exists( $component, 'init' ) ) {
				$component->init();
			}
		}
	}
protected function setup_components ( ) { $ this -> load_components ( ) ; $ components = $ this -> get_components ( ) ; $ this -> set_component_parents ( $ components ) ; /** @var \ComposePress\Core\Abstracts\Component[] $components */ foreach ( $ components as $ component ) { if ( method_exists ( $ component , 'init' ) ) { $ component -> init ( ) ; } } }
Setup components and run init
Setup components and run init