Make WordPress Core

Ticket #38655: 38655.diff

File 38655.diff, 1.9 KB (added by dd32, 8 years ago)
  • src/wp-admin/js/inline-edit-post.js

    inlineEditPost = { 
    117117                        $( 'tr.inline-editor textarea[data-wp-taxonomy]' ).each( function ( i, element ) {
    118118                                $( element ).wpTagsSuggest();
    119119                        } );
    120120                }
    121121                $('html, body').animate( { scrollTop: 0 }, 'fast' );
    122122        },
    123123
    124124        edit : function(id) {
    125125                var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, f, val, pw;
    126126                t.revert();
    127127
    128128                if ( typeof(id) === 'object' ) {
    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.
    138138                editRow = $('#inline-edit').clone(true);
    139139                $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length );
    140140
    141141                $(t.what+id).removeClass('is-expanded').hide().after(editRow).after('<tr class="hidden"></tr>');
    142142
    143143                // populate the data
    144144                rowData = $('#inline_'+id);
    145145                if ( !$(':input[name="post_author"] option[value="' + $('.post_author', rowData).text() + '"]', editRow).val() ) {
    146146                        // author no longer has edit caps, so we need to add them to the list of authors
    147147                        $(':input[name="post_author"]', editRow).prepend('<option value="' + $('.post_author', rowData).text() + '">' + $('#' + t.type + '-' + id + ' .author').text() + '</option>');
    148148                }
    149149                if ( $( ':input[name="post_author"] option', editRow ).length === 1 ) {