(function($) { $(document).ready(function() { // https://gist.github.com/hannit/71919aa6c736882cd1b80e9837ca9652 var $wp_inline_edit = inlineEditPost.edit; inlineEditPost.edit = function(id){ $wp_inline_edit.apply(this,arguments); var $post_id = 0; if(typeof(id) == 'object'){ $post_id = parseInt(this.getId(id)); } if($post_id > 0){ var $edit_row = $('#edit-' + $post_id); var $post_row = $('#post-' + $post_id); var $aFSPrior = $('#aFSPrior-' + $post_id).text(); var $aFSldTyp = $('#aFSldTyp-' + $post_id).text(); $('input[name="aFSPrior"]',$edit_row).val($aFSPrior); $('input[value="'+$aFSldTyp+'"]',$edit_row).prop('checked',$aFSldTyp); } }; $('#bulk_edit').live('click',function(){ var $bulk_row = $('#bulk-edit'); var $post_ids = new Array(); $bulk_row.find('#bulk-titles').children().each(function(){ $post_ids.push($(this).attr('id').replace(/^(ttle)/i,'')); }); var $aFSPrior = $bulk_row.find('input[name="aFSPrior"]').val(); var $aFSldTyp = $bulk_row.find('input[name="aFSldTyp"]:checked').val(); $.ajax({ url: ajaxurl, type: 'POST', async: false, cache: false, data: { action: 'aFS_bulk_quick_save_edit', post_ids: $post_ids, aFSPrior: $aFSPrior, aFSldTyp: $aFSldTyp, } }); }); }); })(jQuery);