| 785 | | die( json_encode( array( |
| 786 | | 'rows' => $rows, |
| 787 | | 'total_items' => sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ), |
| 788 | | 'total_pages' => $total_pages |
| 789 | | ) ) ); |
| | 785 | $response = array( 'rows' => $rows ); |
| | 786 | |
| | 787 | if( isset( $total_items ) ) |
| | 788 | $response['total_items'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ); |
| | 789 | |
| | 790 | if( isset( $total_pages ) ) |
| | 791 | $response['total_pages'] = $total_pages; |
| | 792 | |
| | 793 | die( json_encode( $response ) ); |