_get_template_part - joedolson/my-calendar GitHub Wiki
Allow template choices to be filtered.
The resulting array should be in the order of most specific first, to least specific last. e.g. 0 => recipe-instructions.php, 1 => recipe.php
Auto-generated Example
add_filter(
'_get_template_part',
function(
array $templates,
string $slug,
string $name
) {
// Your code here.
return $templates;
},
10,
3
);
Parameters
array$templatesNames of template files that should be looked for, for given slug and name.string$slugTemplate slug.string$nameTemplate variation name.
Files
apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name )