Changeset 38951 for trunk/src/wp-admin/includes/theme.php
- Timestamp:
- 10/26/2016 08:06:43 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/theme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r38813 r38951 103 103 * 104 104 * @since 1.5.0 105 * 106 * @param WP_Post|null $post Optional. The post being edited, provided for context. 105 * @since 4.7.0 Added the `$post_type` parameter. 106 * 107 * @param WP_Post|null $post Optional. The post being edited, provided for context. 108 * @param string $post_type Optional. Post type to get the templates for. Default 'page'. 107 109 * @return array Key is the template name, value is the filename of the template 108 110 */ 109 function get_page_templates( $post = null ) {110 return array_flip( wp_get_theme()->get_page_templates( $post ) );111 function get_page_templates( $post = null, $post_type = 'page' ) { 112 return array_flip( wp_get_theme()->get_page_templates( $post, $post_type ) ); 111 113 } 112 114
Note: See TracChangeset
for help on using the changeset viewer.