public function get_pagenum()
    {
        $pagenum = isset($_REQUEST['paged']) ? absint($_REQUEST['paged']) : 0;

        if (isset($this->pagination_args['total_pages']) && $pagenum > $this->pagination_args['total_pages']) {
            $pagenum = $this->pagination_args['total_pages'];
        }

        return max(1, $pagenum);
    }