Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy. Fixes #38655. Built from https://develop.svn.wordpress.org/trunk@39210 git-svn-id: http://core.svn.wordpress.org/trunk@39150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e5b82c250f
commit
5f7bbe66d7
|
@ -1555,7 +1555,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
|
||||
?>
|
||||
<option value="default"><?php echo esc_html( $default_title ); ?></option>
|
||||
<?php page_template_dropdown( $post->page_template, $screen->post_type ) ?>
|
||||
<?php page_template_dropdown( '', $screen->post_type ) ?>
|
||||
</select>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
|
|
|
@ -297,7 +297,7 @@ function get_inline_data($post) {
|
|||
echo '<div class="post_parent">' . $post->post_parent . '</div>';
|
||||
}
|
||||
|
||||
echo '<div class="page_template">' . esc_html( $post->page_template ) . '</div>';
|
||||
echo '<div class="page_template">' . ( $post->page_template ? esc_html( $post->page_template ) : 'default' ) . '</div>';
|
||||
|
||||
if ( post_type_supports( $post->post_type, 'page-attributes' ) ) {
|
||||
echo '<div class="menu_order">' . $post->menu_order . '</div>';
|
||||
|
|
|
@ -129,9 +129,9 @@ inlineEditPost = {
|
|||
id = t.getId(id);
|
||||
}
|
||||
|
||||
fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order'];
|
||||
fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'ss', 'post_password', 'post_format', 'menu_order', 'page_template'];
|
||||
if ( t.type === 'page' ) {
|
||||
fields.push('post_parent', 'page_template');
|
||||
fields.push('post_parent');
|
||||
}
|
||||
|
||||
// add the new edit row with an extra blank row underneath to maintain zebra striping.
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta3-39209';
|
||||
$wp_version = '4.7-beta3-39210';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue