Inline edit: fix name collision
git-svn-id: http://svn.automattic.com/wordpress/trunk@8951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
157b89fe18
commit
509904e7d9
|
@ -749,7 +749,7 @@ function inline_edit_row( $type ) {
|
||||||
<div <?php echo $attributes ?> title="<?php _e('Status'); ?>">
|
<div <?php echo $attributes ?> title="<?php _e('Status'); ?>">
|
||||||
<div class="title"><?php _e('Status'); ?></div>
|
<div class="title"><?php _e('Status'); ?></div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<select name="post_status">
|
<select name="_status">
|
||||||
<?php if ( current_user_can('publish_posts') ) { // Contributors only get "Unpublished" and "Pending Review" ?>
|
<?php if ( current_user_can('publish_posts') ) { // Contributors only get "Unpublished" and "Pending Review" ?>
|
||||||
<option value='publish'><?php _e('Published') ?></option>
|
<option value='publish'><?php _e('Published') ?></option>
|
||||||
<option value='future'><?php _e('Scheduled') ?></option>
|
<option value='future'><?php _e('Scheduled') ?></option>
|
||||||
|
@ -812,6 +812,9 @@ function inline_save_row( $data ) {
|
||||||
// statuses
|
// statuses
|
||||||
if ( 'private' == $data['keep_private'] )
|
if ( 'private' == $data['keep_private'] )
|
||||||
$data['post_status'] = 'private';
|
$data['post_status'] = 'private';
|
||||||
|
else
|
||||||
|
$data['post_status'] = $data['_status'];
|
||||||
|
|
||||||
if ( empty($data['comment_status']) )
|
if ( empty($data['comment_status']) )
|
||||||
$data['comment_status'] = 'closed';
|
$data['comment_status'] = 'closed';
|
||||||
if ( empty($data['ping_status']) )
|
if ( empty($data['ping_status']) )
|
||||||
|
@ -845,7 +848,7 @@ function get_inline_data($post) {
|
||||||
<input type="hidden" name="" class="post_author" value="' . $post->post_author . '" />
|
<input type="hidden" name="" class="post_author" value="' . $post->post_author . '" />
|
||||||
<input type="hidden" name="" class="comment_status" value="' . $post->comment_status . '" />
|
<input type="hidden" name="" class="comment_status" value="' . $post->comment_status . '" />
|
||||||
<input type="hidden" name="" class="ping_status" value="' . $post->ping_status . '" />
|
<input type="hidden" name="" class="ping_status" value="' . $post->ping_status . '" />
|
||||||
<input type="hidden" name="" class="post_status" value="' . $post->post_status . '" />
|
<input type="hidden" name="" class="_status" value="' . $post->post_status . '" />
|
||||||
<input type="hidden" name="" class="jj" value="' . mysql2date( 'd', $post->post_date ) . '" />
|
<input type="hidden" name="" class="jj" value="' . mysql2date( 'd', $post->post_date ) . '" />
|
||||||
<input type="hidden" name="" class="mm" value="' . mysql2date( 'm', $post->post_date ) . '" />
|
<input type="hidden" name="" class="mm" value="' . mysql2date( 'm', $post->post_date ) . '" />
|
||||||
<input type="hidden" name="" class="aa" value="' . mysql2date( 'Y', $post->post_date ) . '" />
|
<input type="hidden" name="" class="aa" value="' . mysql2date( 'Y', $post->post_date ) . '" />
|
||||||
|
|
|
@ -49,7 +49,7 @@ inlineEdit = {
|
||||||
t.revert(old);
|
t.revert(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
var fields = ['post_title', 'post_name', 'post_author', 'post_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'post_password'];
|
var fields = ['post_title', 'post_name', 'post_author', '_status', 'jj', 'mm', 'aa', 'hh', 'mn', 'post_password'];
|
||||||
if ( type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
|
if ( type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
|
||||||
if ( type == 'post' ) fields.push('tags_input');
|
if ( type == 'post' ) fields.push('tags_input');
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ inlineEdit = {
|
||||||
$('ul.cat-checklist :checkbox').val(cats.split(','));
|
$('ul.cat-checklist :checkbox').val(cats.split(','));
|
||||||
|
|
||||||
// handle the post status
|
// handle the post status
|
||||||
var status = $('.post_status', rowData).val();
|
var status = $('._status', rowData).val();
|
||||||
if ( status != 'future' ) $('select[name="post_status"] option[value="future"]', editRow).remove();
|
if ( status != 'future' ) $('select[name="_status"] option[value="future"]', editRow).remove();
|
||||||
if ( status == 'private' ) $('input[name="keep_private"]', editRow).attr("checked", "checked");
|
if ( status == 'private' ) $('input[name="keep_private"]', editRow).attr("checked", "checked");
|
||||||
|
|
||||||
// remove the current page and children from the parent dropdown
|
// remove the current page and children from the parent dropdown
|
||||||
|
|
Loading…
Reference in New Issue