HEX
Server: Apache
System: Linux www 5.10.0-10-amd64 #1 SMP Debian 5.10.84-1 (2021-12-08) x86_64
User: root (0)
PHP: 8.2.1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals
Upload Files
File: /mnt/drbd/www/edenhouse/wp-content/plugins/essential-blocks/views/common/pagination.php
<?php

$html = '';

if ( isset( $totalPosts ) && (int) $totalPosts > (int) $per_page ) {
    if ( isset( $enableMorePosts ) && $enableMorePosts ) {
        $html .= sprintf(
            '<div class="%1$s ebpg-pagination %2$s">',
            isset( $parent_class ) ? $parent_class : '',
            $loadMoreType === '3' ? "prev-next-btn" : ""
        );

        if ( $loadMoreType === '1' ) {
            $html .= sprintf(
                '<button class="btn ebpg-pagination-button" data-pagenumber="1">%1$s</button>',
                esc_html( $loadMoreButtonTxt )
            );
        }

        $prevTxt = isset( $prevTxt ) ? $prevTxt : "<";
        $nextTxt = isset( $nextTxt ) ? $nextTxt : ">";

        if ( isset( $totalPosts ) && ( $loadMoreType === '2' || $loadMoreType === '3' ) ) {
            $totalPages = ceil( (int) $totalPosts / (int) $per_page );
            $html .= sprintf(
                '<button class="ebpg-pagination-item-previous">%1$s</button>',
                esc_html( $prevTxt )
            );
            for ( $i = 1; $i <= $totalPages; $i++ ) {
                $active = $i == 1 ? "active" : "";

                $html .= sprintf(
                    '<button class="ebpg-pagination-item %2$s" data-pagenumber="%1$s">
                        %1$s
                    </button>',
                    $i,
                    $active
                );
            }
            $html .= sprintf(
                '<button class="ebpg-pagination-item-next">%1$s</button>',
                esc_html( $nextTxt )
            );
        }

        $html .= '</div>';
    }
}

echo wp_kses( $html, 'post' );