0 ) {
// Instantiate pagination object with appropriate arguments
$items_per_page = 10;
$page = isset( $_GET['pagination-page'] ) ? abs( (int) $_GET['pagination-page'] ) : 1;
$offset = ( $page * $items_per_page ) - $items_per_page;
$start = $offset;
$end = $offset + $items_per_page;
$site_url = site_url();
$count = 0;
echo "
";
echo "| " . __( 'ID', 'wp-statistics' ) . " | ";
echo "" . __( 'Title', 'wp-statistics' ) . " | ";
echo "" . __( 'Link', 'wp-statistics' ) . " | ";
echo "" . __( 'Visits', 'wp-statistics' ) . " | ";
echo "
";
foreach ( $uris as $uri ) {
$count ++;
if ( $count >= $start ) {
//Check Pages Id exist
if ( $uri[2] > 0 ) {
$arg = array( 'page-id' => $uri[2] );
} else {
$arg = array( 'page-uri' => $uri[0] );
}
echo "";
echo "| " . $count . " | ";
echo "" . $uri[3] . " | ";
echo "" . htmlentities( urldecode( $uri[0] ), ENT_QUOTES ) . " | ";
echo "" . number_format_i18n( $uri[1] ) . " | ";
}
if ( $count == $start + 10 ) {
break;
}
}
echo "
";
}
?>
0 ) {
wp_statistics_paginate_links( array(
'item_per_page' => $items_per_page,
'total' => $total,
'current' => $page,
) );
} ?>