WordPress.org

Make WordPress Core

Changeset 39210


Ignore:
Timestamp:
11/13/2016 07:41:30 AM (4 years ago)
Author:
dd32
Message:

Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.

Props dd32, swissspidy.
Fixes #38655.

Location:
trunk/src/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-posts-list-table.php

    r38965 r39210  
    15561556                ?>
    15571557                <option value="default"><?php echo esc_html( $default_title ); ?></option>
    1558                 <?php page_template_dropdown( $post->page_template, $screen->post_type ) ?>
     1558                <?php page_template_dropdown( '', $screen->post_type ) ?>
    15591559            </select>
    15601560        </label>
  • trunk/src/wp-admin/includes/template.php

    r39059 r39210  
    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' ) ) {
  • trunk/src/wp-admin/js/inline-edit-post.js

    r38797 r39210  
    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
Note: See TracChangeset for help on using the changeset viewer.