Filters list of page templates for a theme.
The dynamic portion of the hook name, $post_type, refers to the post type.
Possible hook names include:
theme_post_templatestheme_page_templatestheme_attachment_templates$post_templates = (array) apply_filters( "theme_{$post_type}_templates", $post_templates, $this, $post, $post_type );
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/theme_post_type_templates