Ticket #38655: 38655.2.diff
File 38655.2.diff, 3.6 KB (added by , 8 years ago) |
---|
-
src/wp-admin/js/inline-edit-post.js
inlineEditPost = { 117 117 $( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) { 118 118 $( element ).wpTagsSuggest(); 119 119 } ); 120 120 } 121 121 $('html, body').animate( { scrollTop: 0 }, 'fast' ); 122 122 }, 123 123 124 124 edit : function(id) { 125 125 var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, f, val, pw; 126 126 t.revert(); 127 127 128 128 if ( typeof(id) === 'object' ) { 129 129 id = t.getId(id); 130 130 } 131 131 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']; 133 133 if ( t.type === 'page' ) { 134 fields.push('post_parent' , 'page_template');134 fields.push('post_parent'); 135 135 } 136 136 137 137 // add the new edit row with an extra blank row underneath to maintain zebra striping. 138 138 editRow = $('#inline-edit').clone(true); 139 139 $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); 140 140 141 141 $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>'); 142 142 143 143 // populate the data 144 144 rowData = $('#inline_'+id); 145 145 if ( !$(':input[name="post_author"] option[value="' + $('.post_author', rowData).text() + '"]', editRow).val() ) { 146 146 // author no longer has edit caps, so we need to add them to the list of authors 147 147 $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>'); 148 148 } 149 149 if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) { -
src/wp-admin/includes/class-wp-posts-list-table.php
class WP_Posts_List_Table extends WP_Lis 1543 1543 endif; // page-attributes 1544 1544 ?> 1545 1545 1546 1546 <?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?> 1547 1547 <label> 1548 1548 <span class="title"><?php _e( 'Template' ); ?></span> 1549 1549 <select name="page_template"> 1550 1550 <?php if ( $bulk ) : ?> 1551 1551 <option value="-1"><?php _e( '— No Change —' ); ?></option> 1552 1552 <?php endif; // $bulk ?> 1553 1553 <?php 1554 1554 /** This filter is documented in wp-admin/includes/meta-boxes.php */ 1555 1555 $default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' ); 1556 1556 ?> 1557 1557 <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 ) ?> 1559 1559 </select> 1560 1560 </label> 1561 1561 <?php endif; ?> 1562 1562 1563 1563 <?php if ( count( $flat_taxonomies ) && !$bulk ) : ?> 1564 1564 1565 1565 <?php foreach ( $flat_taxonomies as $taxonomy ) : ?> 1566 1566 <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : 1567 1567 $taxonomy_name = esc_attr( $taxonomy->name ); 1568 1568 1569 1569 ?> 1570 1570 <label class="inline-edit-tags"> 1571 1571 <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> 1572 1572 <textarea data-wp-taxonomy="<?php echo $taxonomy_name; ?>" cols="22" rows="1" name="tax_input[<?php echo $taxonomy_name; ?>]" class="tax_input_<?php echo $taxonomy_name; ?>"></textarea> 1573 1573 </label>