# yatra/3.0.13/templates/parts/pagination.php

Yatra – Travel Booking &amp; Tour Operator Software, version 3.0.13. 34 lines.

- Page: https://pluginprobe.com/plugins/yatra/3.0.13/code/templates/parts/pagination.php
- Raw: https://pluginprobe.com/plugins/yatra/3.0.13/raw/templates/parts/pagination.php
- Modified: 2023-10-07T06:00:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/yatra/3.0.13/code/templates/parts/pagination.php#L10-L20`.

```php
<?php

if (!defined('ABSPATH')) {
    exit;
}

if ($total <= 1) {
    return;
}
$attributes = is_array($attributes) ? $attributes: array();
?>
<div class="yatra-row yatra-pagination-wrap">
    <nav id="post-navigation" class="yatra-pagination navigation pagination <?php echo esc_attr($class) ?>"
         attributes="<?php echo esc_attr(json_encode($attributes)) ?>" type="<?php echo esc_attr($type); ?>">
        <?php
        echo paginate_links(
            apply_filters(
                'yatra_pagination_args',
                array( // WPCS: XSS ok.
                    'base' => $base,
                    'format' => $format,
                    'add_args' => false,
                    'current' => max(1, $current),
                    'total' => $total,
                    'prev_text' => is_rtl() ? '&rarr;' : '&larr;',
                    'next_text' => is_rtl() ? '&larr;' : '&rarr;',
                    'end_size' => 3,
                    'mid_size' => 3,
                )
            )
        );
        ?>
    </nav>
</div>
```
