Ticket #31977: 31977.1.diff
File 31977.1.diff, 2.8 KB (added by , 9 years ago) |
---|
-
src/wp-admin/includes/class-wp-posts-list-table.php
1269 1269 <input type="checkbox" name="comment_status" value="open" /> 1270 1270 <span class="checkbox-title"><?php _e( 'Allow Comments' ); ?></span> 1271 1271 </label> 1272 <?php endif; if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?> 1272 <?php else : ?> 1273 <input type="hidden" name="comment_status" /> 1274 <?php endif;?> 1275 1276 <?php if ( post_type_supports( $screen->post_type, 'trackbacks' ) ) : ?> 1273 1277 <label class="alignleft"> 1274 1278 <input type="checkbox" name="ping_status" value="open" /> 1275 1279 <span class="checkbox-title"><?php _e( 'Allow Pings' ); ?></span> 1276 1280 </label> 1281 <?php else: ?> 1282 <input type="hidden" name="ping_status" /> 1277 1283 <?php endif; ?> 1278 1284 </div> 1279 1285 -
src/wp-admin/js/inline-edit-post.js
117 117 }, 118 118 119 119 edit : function(id) { 120 var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val ;120 var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, cur_format, f, val, comment_status, ping_status; 121 121 t.revert(); 122 122 123 123 if ( typeof(id) === 'object' ) { … … 162 162 $(':input[name="' + fields[f] + '"]', editRow).val( val ); 163 163 } 164 164 165 if ( $( '.comment_status', rowData ).text() === 'open' ) { 166 $( 'input[name="comment_status"]', editRow ).prop( 'checked', true ); 167 } 168 if ( $( '.ping_status', rowData ).text() === 'open' ) { 169 $( 'input[name="ping_status"]', editRow ).prop( 'checked', true ); 170 } 165 comment_status = $( '.comment_status', rowData ).text(); 166 if( 'undefined' != typeof $( 'input[name="comment_status"][type="checkbox"]') ) { 167 if ( comment_status === 'open' ) { 168 $( 'input[name="comment_status"]', editRow ).prop( 'checked', true ); 169 } 170 } else { 171 $('input[name="comment_status"]').val( comment_status ) 172 } 173 174 ping_status = $( '.ping_status', rowData ).text(); 175 if( $( 'input[name="ping_status"]').is(':checkbox') ) { 176 if ( ping_status === 'open' ) { 177 $( 'input[name="ping_status"]', editRow ).prop( 'checked', true ); 178 } 179 } else { 180 $('input[name="ping_status"]').val( ping_status ) 181 } 182 183 184 171 185 if ( $( '.sticky', rowData ).text() === 'sticky' ) { 172 186 $( 'input[name="sticky"]', editRow ).prop( 'checked', true ); 173 187 }