WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have extended class WP_List_Table to create a custom sortable table of posts along with a quick edit box with custom meta boxes.

The meta boxes populate and save but when I click submit the field values disappear and the defaults ( cb, title, tags, cats, etc) which are not even included in my class get added back to the column saved. This throws off the other columns on the page. The saved custom field values return when the page is refreshed.

It seams like on submit the $post_object is missing.

I'm using a hacked get_inline_data function that includes the meta_values in my quick edit form instead of calling get_inline_data in my class.

My save function for the meta boxes:

add_action( 'save_post', 'save_inline_edit_meta' );
function save_inline_edit_meta( $post_id  ) {
    global $pagenow;

    if ( $pagenow == 'admin.php' ) {
     if ( isset( $_POST[ 'is_quickedit' ] )  && isset( $_POST[ 'standinghead' ] ) )
        update_post_meta( $post_id, '_wnd_standing_head', $_POST[ 'standinghead' ] );

    if ( isset( $_POST[ 'is_quickedit' ] )  && isset( $_POST[ 'headline' ] ) )
        update_post_meta( $post_id, '_wnd_alt_title', $_POST[ 'headline' ] );

    if ( isset( $_POST[ 'is_quickedit' ] )  && isset( $_POST[ 'deck' ] ) )
        update_post_meta( $post_id, '_wnd_deck', $_POST[ 'deck' ] );
  return $post_id;


My Javascript save function:

save : function(id) {
        var params, fields, page = $('.post_status_page').val() || '';

        if ( typeof(id) == 'object' )
            id = this.getId(id);
        $('table.widefat .inline-edit-save .waiting').show();
        params = {
            action: 'inline-save',
            post_ID: id,
            post_type: 'post',
            edit_date: 'true',
            post_status: page
        fields = $('#edit-'+id+' :input').serialize();
        params = fields + '&' + $.param(params);

        $.post('admin-ajax.php', params,
            function(r) {
                $('table.widefat .inline-edit-save .waiting').hide();

                if (r) {
                    if ( -1 != r.indexOf('<tr') ) {
                    } else {
                        r = r.replace( /<.[^<>]*?>/g, '' );
                        $('#edit-'+id+' .inline-edit-save .error').html(r).show();
                } else {
                    $('#edit-'+id+' .inline-edit-save .error').html(inlineEditL10n.error).show();
        , 'html');
        return false;

enter image description here

share|improve this question
I'm trying to do the same, but I haven't found any nice information about it, it seems you are the only one there building a custom table and trying to put some custom fields on the quick edit, can you share it ? :-) – Adan Archila May 11 '12 at 18:26

I just run in the same error when adding extra columns to the default post types.

The offending line was the $pagenow check.
Quick Edit uses admin-ajax.php so it doesn't renders the custom columns when it's done.

This doesn't work:

if( 'edit.php' == $pagenow && is_admin() )
    add_action( 'admin_init', array( $this, 'init_id_column' ), 999 );
    add_action( 'admin_init', array( $this, 'init_thumb_column' ), 999 );

But this does:

    ( 'edit.php' == $pagenow && is_admin() ) 
    ( 'admin-ajax.php' == $pagenow && 'inline-save' == $_POST['action'] && 'list' == $_POST['post_view'] )
    add_action( 'admin_init', array( $this, 'init_id_column' ), 999 );
    add_action( 'admin_init', array( $this, 'init_thumb_column' ), 999 );

I'm not sure if it's the best method to do this checking, though...

Related track ticket.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.