Fix notices in WP_List_Table::ajax_response(). Props Utkarsh. Fixes #15185
git-svn-id: http://svn.automattic.com/wordpress/trunk@15894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
db6cb9d47f
commit
26f95f26d7
|
@ -782,11 +782,15 @@ class WP_List_Table {
|
||||||
$this->display_rows();
|
$this->display_rows();
|
||||||
$rows = ob_get_clean();
|
$rows = ob_get_clean();
|
||||||
|
|
||||||
die( json_encode( array(
|
$response = array( 'rows' => $rows );
|
||||||
'rows' => $rows,
|
|
||||||
'total_items' => sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ),
|
if ( isset( $total_items ) )
|
||||||
'total_pages' => $total_pages
|
$response['total_items'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) );
|
||||||
) ) );
|
|
||||||
|
if ( isset( $total_pages ) )
|
||||||
|
$response['total_pages'] = $total_pages;
|
||||||
|
|
||||||
|
die( json_encode( $response ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue