This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Template_Loader::get_template_default_file()

Get the default filename for a template.


Return

(string)


Source

File: includes/libs/templates/template-loader.class.php

	private function get_template_default_file(){
		if( is_singular( Plugin::instance()->get_cpt()->get_post_type() ) ){
			$default_file = 'single-'. Plugin::instance()->get_cpt()->get_post_type() .'.php';
		}elseif ( Helper::is_video_taxonomy() ){
			$object = get_queried_object();

			if( is_tax( Plugin::instance()->get_cpt()->get_post_tax() ) || is_tax( Plugin::instance()->get_cpt()->get_tag_tax() ) ){
				$default_file = 'taxonomy-' . $object->taxonomy . '.php';
			}else{
				$default_file = '';
			}
		}elseif( is_post_type_archive() ){
			$pt = get_query_var( 'post_type' );
			if( !is_array( $pt ) ){
				$pt = [$pt];
			}

			if( in_array( Plugin::instance()->get_cpt()->get_post_type(), $pt ) ) {
				$default_file = 'archive-'
				                . Plugin::instance()->get_cpt()->get_post_type()
				                . '.php';
			}else{
				$default_file = '';
			}
		}else{
			$default_file = '';
		}

		return $default_file;
	}

Start your video site now!

Manage and coordinate your Vimeo channels, albums or videos with your WordPress website. Perfect fit for membership, portfolio, online courses or any type of video collection.

Get Vimeotheque PRO!