I did find the answer, but it's not pretty.
There are several steps. Firstly add into a module:
add_action('quick_edit_custom_box', 'add_quickedit_box');
// Outputs the new custom Quick Edit field HTML
function add_quickedit_box($column_name) {
?>
<fieldset class="inline-edit-col-right">
<div class="inline-edit-col">
<span class="title">Field Title</span>
<?php
// Output your form field here. You don't have
// to populate it with content as that's done with
// javascript later.
echo '<input type="text" name="newquickeditinput" />';
?>
</div>
</fieldset>
<?php
}
add_filter('manage_posts_columns', 'add_quickedit_column', 10, 1);
// Makes a new container column for your fields to live in.
function add_quickedit_column($posts_columns) {
// This never gets used, but if you don't create one the
// code to output stuff above doesn't get run
$posts_columns['anything'] = __('Name of column');
return $posts_columns;
}
add_action('save_post', 'save_quickedit_box');
function save_quickedit_box($post_id) {
// Save your new value - get it out of $_POST
delete_post_meta(
$post_id,
'newquickeditinput'
);
add_post_meta(
$post_id,
'newquickeditinput',
$_POST['newquickeditinput']
);
return $post_id;
}
That will give you a new box and will also save the data. However the javascript that updates the quickedit box won't handle your new field, you'll have data from the last item on the page in your new field.
To fix this we have to alter two files. The first is wp-admin/includes/template.php, in function get_inline_data. You have to add a div into the output that has the class the same as the name of your new field, and the content inside the new div, eg (line 1320 or so)
<div class="post_category">' . implode( ',', wp_get_post_categories( $post->ID ) ) . '</div>
<div class="sticky">' . (is_sticky($post->ID) ? 'sticky' : '') . '</div>
<div class="newquickeditinput">'.get_post_meta($post->ID, 'newquickeditinput', true).'</div>';
The second file to alter is wp-admin/js/inline-edit-post.js. Firstly, save inline-edit-post.dev.js over the top - it's the same file but unminified. Now on line ~122 you need to add your new field into the list of fields that get their values picked up by javascript:
if ( t.type == 'page' ) fields.push('post_parent', 'menu_order', 'page_template');
if ( t.type == 'post' ) fields.push('tags_input');
if ( t.type == 'post' ) fields.push('newquickeditinput');
That should work :)