WordPress.org

Make WordPress Core

Ticket #10696: 10696.diff

File 10696.diff, 2.3 KB (added by Denis-de-Bernardy, 4 years ago)
  • wp-admin/includes/template.php

     
    806806        $posts_columns['cb'] = '<input type="checkbox" />'; 
    807807        $posts_columns['title'] = __('Title'); 
    808808        $posts_columns['author'] = __('Author'); 
     809        $posts_columns['page_template'] = __('Template'); 
    809810        $post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all'; 
    810811        if ( !in_array( $post_status, array('pending', 'draft', 'future') ) ) 
    811812                $posts_columns['comments'] = '<div class="vers"><img alt="" src="images/comment-grey-bubble.png" /></div>'; 
     
    15991600                } 
    16001601        } 
    16011602 
     1603        $page_templates = array_flip(get_page_templates()); 
     1604        $page->page_template = get_post_meta( $page->ID, '_wp_page_template', true ); 
     1605        $page->page_template_nice = $page_templates[$page->page_template]; 
     1606        if ( 0 == strlen($page->page_template_nice) ) $page->page_template_nice = '-/-'; 
     1607 
    16021608        $page->post_title = esc_html( $page->post_title ); 
    16031609        $pad = str_repeat( '&#8212; ', $level ); 
    16041610        $id = (int) $page->ID; 
     
    17201726                <?php 
    17211727                break; 
    17221728 
     1729        case 'page_template': 
     1730                ?> 
     1731                <td <?php echo $attributes ?>><?php printf('<span title="%s">%s</span>', esc_attr($page->page_template), $page->page_template_nice); ?> </td> 
     1732                <?php 
     1733                break; 
     1734 
    17231735        default: 
    17241736                ?> 
    17251737                <td <?php echo $attributes ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td> 
     
    34843496function screen_meta($screen) { 
    34853497        global $wp_meta_boxes, $_wp_contextual_help, $typenow; 
    34863498 
    3487         $screen = str_replace('.php', '', $screen); 
    3488         $screen = str_replace('-new', '', $screen); 
    3489         $screen = str_replace('-add', '', $screen); 
     3499        $screen = str_replace(array('.php', '-new', '-add' ), '', $screen); 
    34903500        $screen = apply_filters('screen_meta_screen', $screen); 
    34913501 
    34923502        $column_screens = get_column_headers($screen); 
  • wp-admin/css/wp-admin.dev.css

     
    31863186 
    31873187.fixed .column-response, 
    31883188.fixed .column-author, 
     3189.fixed .column-page_template, 
    31893190.fixed .column-categories, 
    31903191.fixed .column-tags, 
    31913192.fixed .column-rel,