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_loader_files( $default_file )
Source
File: includes/libs/templates/template-loader.class.php
private function get_template_loader_files( $default_file ) { $templates = []; if( is_singular( Plugin::instance()->get_cpt()->get_post_type() ) ){ $object = get_queried_object(); $name_decoded = urldecode( $object->post_name ); if( $name_decoded != $object->post_name ){ $templates[] = sprintf( 'single-%s-%s.php', Plugin::instance()->get_cpt()->get_post_type(), $name_decoded ); } $templates[] = sprintf( 'single-%s-%s.php', Plugin::instance()->get_cpt()->get_post_type(), $object->post_name ); } if( Helper::is_video_taxonomy() ){ $object = get_queried_object(); $templates[] = 'taxonomy-' . $object->taxonomy . '-' . $object->slug . '.php'; $templates[] = Helper::template_path() . 'taxonomy-' . $object->taxonomy . '-' . $object->slug . '.php'; $templates[] = 'taxonomy-' . $object->taxonomy . '.php'; $templates[] = Helper::template_path() . 'taxonomy-' . $object->taxonomy . '.php'; if( is_tax( Plugin::instance()->get_cpt()->get_tag_tax() ) ){ $cs_taxonomy = str_replace( '_', '-', $object->taxonomy ); $cs_default = str_replace( '_', '-', $default_file ); $templates[] = 'taxonomy-' . $object->taxonomy . '-' . $object->slug . '.php'; $templates[] = Helper::template_path() . 'taxonomy-' . $cs_taxonomy . '-' . $object->slug . '.php'; $templates[] = 'taxonomy-' . $object->taxonomy . '.php'; $templates[] = Helper::template_path() . 'taxonomy-' . $cs_taxonomy . '.php'; $templates[] = $cs_default; } } $templates[] = $default_file; if ( isset( $cs_default ) ) { $templates[] = Helper::template_path() . $cs_default; } $templates[] = Helper::template_path() . $default_file; return array_unique( $templates ); }