function wpv_users_query_limit_and_offset( $args, $view_settings, $view_id ) {
	if ( 
		$view_settings['users_limit'] !== '-1' 
		&& $view_settings['users_limit'] !== -1 
	) {
        $args['number'] = $view_settings['users_limit'];
    }
    $args['offset'] = $view_settings['users_offset'];
	
	$override_values = wpv_override_view_limit_offset();
	if ( isset( $override_values['limit'] ) ) {
		$args['number'] = intval( $override_values['limit'] );
	}
	if ( isset( $override_values['offset'] ) ) {
		$args['offset'] = intval( $override_values['offset'] );
	}
	
    if ( $args['offset'] > 0 ) {
		if ( 
			! isset( $args['number'] ) 
			|| ( 
				isset( $args['number'] ) 
				&& $args['number'] < 1 
			) 
		) {
			$args['number'] = 2147483647;
		}
    }
	return $args;
}
function wpv_filter_limit_taxonomy_post_query_filter($items, $tax_query_settings, $view_settings, $view_id)
{
    $limit = intval($view_settings['taxonomy_limit']);
    $offset = intval($view_settings['taxonomy_offset']);
    $override_values = wpv_override_view_limit_offset($view_id);
    if (isset($override_values['limit'])) {
        $limit = intval($override_values['limit']);
    }
    if (isset($override_values['offset'])) {
        $offset = intval($override_values['offset']);
    }
    if ($offset != 0 || $limit != -1) {
        if ($limit == -1) {
            $items = array_slice($items, $offset);
        } else {
            $items = array_slice($items, $offset, $limit);
        }
        if (empty($items)) {
            return array();
        }
    }
    return $items;
}