get_page_templates
get_page_templates ( $post = null, $post_type = 'page' )
Parameters:- (WP_Post|null) post Optional. The post being edited, provided for context.
- (string) post_type Optional. Post type to get the templates for. Default 'page'.
Returns:- (string[]) Array of template file names keyed by the template header name.
Defined at:Change Log: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Gets the page templates available in this theme.