Changeset 38951 for trunk/src/wp-admin/includes/template.php
- Timestamp:
- 10/26/2016 08:06:43 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/template.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r38831 r38951 294 294 <div class="post_password">' . esc_html( $post->post_password ) . '</div>'; 295 295 296 if ( $post_type_object->hierarchical ) 296 if ( $post_type_object->hierarchical ) { 297 297 echo '<div class="post_parent">' . $post->post_parent . '</div>'; 298 299 if ( $post->post_type == 'page' ) 300 echo '<div class="page_template">' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true )) . '</div>';301 302 if ( post_type_supports( $post->post_type, 'page-attributes' ) ) 298 } 299 300 echo '<div class="page_template">' . esc_html( $post->page_template ) . '</div>'; 301 302 if ( post_type_supports( $post->post_type, 'page-attributes' ) ) { 303 303 echo '<div class="menu_order">' . $post->menu_order . '</div>'; 304 } 304 305 305 306 $taxonomy_names = get_object_taxonomies( $post->post_type ); … … 762 763 * 763 764 * @since 1.5.0 764 * 765 * @param string $default Optional. The template file name. Default empty. 766 */ 767 function page_template_dropdown( $default = '' ) { 768 $templates = get_page_templates( get_post() ); 765 * @since 4.7.0 Added the `$post_type` parameter. 766 * 767 * @param string $default Optional. The template file name. Default empty. 768 * @param string $post_type Optional. Post type to get templates for. Default 'post'. 769 */ 770 function page_template_dropdown( $default = '', $post_type = 'page' ) { 771 $templates = get_page_templates( null, $post_type ); 769 772 ksort( $templates ); 770 773 foreach ( array_keys( $templates ) as $template ) {
Note: See TracChangeset
for help on using the changeset viewer.