protected function hierarchy() {

		// Uses the slugs to build a hierarchy.
		foreach ( $this->slugs as $slug ) {

			$templates[] = "{$this->name}/{$slug}.php";
		}

		// Add in a `default.php` template.
		if ( ! in_array( 'default', $this->slugs ) ) {

			$templates[] = "{$this->name}/default.php";
		}

		// Fallback to `{$name}.php` as a last resort.
		$templates[] = "{$this->name}.php";

		// Allow developers to overwrite the hierarchy.
		return apply_filters( "hybrid/view/{$this->name}/hierarchy", $templates, $this->slugs );
	}
protected function hierarchy() {

		// Uses the slugs to build a hierarchy.
		foreach ( $this->slugs as $slug ) {

			$templates[] = "{$this->name}/{$slug}.php";
		}

		// Add in a `default.php` template.
		if ( ! in_array( 'default', $this->slugs ) ) {

			$templates[] = "{$this->name}/default.php";
		}

		// Fallback to `{$name}.php` as a last resort.
		$templates[] = "{$this->name}.php";

		// Allow developers to overwrite the hierarchy.
		return apply_filters( "hybrid/view/{$this->name}/hierarchy", $templates, $this->slugs );
	}
protected function hierarchy ( ) { // Uses the slugs to build a hierarchy. foreach ( $ this -> slugs as $ slug ) { $ templates [ ] = "{$this->name}/{$slug}.php" ; } // Add in a `default.php` template. if ( ! in_array ( 'default' , $ this -> slugs ) ) { $ templates [ ] = "{$this->name}/default.php" ; } // Fallback to `{$name}.php` as a last resort. $ templates [ ] = "{$this->name}.php" ; // Allow developers to overwrite the hierarchy. return apply_filters ( "hybrid/view/{$this->name}/hierarchy" , $ templates , $ this -> slugs ) ; }
Uses the array of template slugs to build a hierarchy of potential
templates that can be used.

@since  5.0.0
@access protected
@return array
Uses the array of template slugs to build a hierarchy of potential templates that can be used .