CodeExplorer get_per_page example
$comment_type = !
empty( $_REQUEST['comment_type'
] ) ?
$_REQUEST['comment_type'
] : '';
$search =
( isset( $_REQUEST['s'
] ) ) ?
$_REQUEST['s'
] : '';
$post_type =
( isset( $_REQUEST['post_type'
] ) ) ?
sanitize_key( $_REQUEST['post_type'
] ) : '';
$user_id =
( isset( $_REQUEST['user_id'
] ) ) ?
$_REQUEST['user_id'
] : '';
$orderby =
( isset( $_REQUEST['orderby'
] ) ) ?
$_REQUEST['orderby'
] : '';
$order =
( isset( $_REQUEST['order'
] ) ) ?
$_REQUEST['order'
] : '';
$comments_per_page =
$this->
get_per_page( $comment_status );
$doing_ajax =
wp_doing_ajax();
if ( isset( $_REQUEST['number'
] ) ) { $number =
(int) $_REQUEST['number'
];
} else { $number =
$comments_per_page +
min( 8,
$comments_per_page ); // Grab a few extra.
} $page =
$this->
get_pagenum();