Make WordPress Core

Ticket #38655: 38655.3.diff

File 38655.3.diff, 2.3 KB (added by swissspidy, 8 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git src/wp-admin/includes/class-wp-posts-list-table.php src/wp-admin/includes/class-wp-posts-list-table.php
    index f228805..11877c9 100644
    class WP_Posts_List_Table extends WP_List_Table { 
    15541554                                /** This filter is documented in wp-admin/includes/meta-boxes.php */
    15551555                                $default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'quick-edit' );
    15561556                ?>
    1557                                 <option value="default"><?php echo esc_html( $default_title ); ?></option>
    1558                                 <?php page_template_dropdown( $post->page_template, $screen->post_type ) ?>
     1557                                <option value="default" <?php selected( '', $post->page_template ); ?>><?php echo esc_html( $default_title ); ?></option>
     1558                                <?php page_template_dropdown( '', $screen->post_type ) ?>
    15591559                        </select>
    15601560                </label>
    15611561        <?php endif; ?>
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index 27eadc6..181a307 100644
    function get_inline_data($post) { 
    297297                echo '<div class="post_parent">' . $post->post_parent . '</div>';
    298298        }
    299299
    300         echo '<div class="page_template">' . esc_html( $post->page_template ) . '</div>';
     300        echo '<div class="page_template">' . $post->page_template ? esc_html( $post->page_template ) : 'default' . '</div>';
    301301
    302302        if ( post_type_supports( $post->post_type, 'page-attributes' ) ) {
    303303                echo '<div class="menu_order">' . $post->menu_order . '</div>';
  • src/wp-admin/js/inline-edit-post.js

    diff --git src/wp-admin/js/inline-edit-post.js src/wp-admin/js/inline-edit-post.js
    index 9582707..84ffd78 100644
    inlineEditPost = { 
    129129                        id = t.getId(id);
    130130                }
    131131
    132                 fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order'];
     132                fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order', 'page_template'];
    133133                if ( t.type === 'page' ) {
    134                         fields.push('post_parent', 'page_template');
     134                        fields.push('post_parent');
    135135                }
    136136
    137137                // add the new edit row with an extra blank row underneath to maintain zebra striping.