public function display() {

		// Compatibility with core WP's template parts.
		$this->templatePartCompat();

		if ( $this->template() ) {

			// Maybe remove core WP's `prepend_attachment`.
			$this->maybeShiftAttachment();

			// Make the `$data` variable available to the template.
			$data = $this->data;

			// Extract the data into individual variables. Each of
			// these variables will be available in the template.
			if ( $this->data instanceof Collection ) {
				extract( $this->data->all() );
			}

			// Load the template.
			include( $this->template() );
		}
	}
public function display() {

		// Compatibility with core WP's template parts.
		$this->templatePartCompat();

		if ( $this->template() ) {

			// Maybe remove core WP's `prepend_attachment`.
			$this->maybeShiftAttachment();

			// Make the `$data` variable available to the template.
			$data = $this->data;

			// Extract the data into individual variables. Each of
			// these variables will be available in the template.
			if ( $this->data instanceof Collection ) {
				extract( $this->data->all() );
			}

			// Load the template.
			include( $this->template() );
		}
	}
public function display ( ) { // Compatibility with core WP's template parts. $ this -> templatePartCompat ( ) ; if ( $ this -> template ( ) ) { // Maybe remove core WP's `prepend_attachment`. $ this -> maybeShiftAttachment ( ) ; // Make the `$data` variable available to the template. $ data = $ this -> data ; // Extract the data into individual variables. Each of // these variables will be available in the template. if ( $ this -> data instanceof Collection ) { extract ( $ this -> data -> all ( ) ) ; } // Load the template. include ( $ this -> template ( ) ) ; } }
Sets up data to be passed to the template and renders it.

@since  5.0.0
@access public
@return void
Sets up data to be passed to the template and renders it .