遗憾的是,没有用于在快速编辑中修改post status select的筛选器或操作(WP_Posts_List_Table::inline_edit()
) - 您需要求助于JavaScript:
(function($){
$( "select[name=_status]" ).each(
function () {
var value = $( this ).val();
if ( value === "pending" )
$( "option[value=pending]", this ).after( "<option value=\'status-1\'>Status 1</option>" );
else if ( value === "status-1" )
$( "option[value=status-1]", this ).after( "<option value=\'status-2\'>Status 2</option>" );
}
);
})(jQuery);