AnsPress_Reputation_Query::__construct( array $args = array() )
Description #
Initialize the class.
Parameters #
- $argsarray (Optional) Arguments. Default value: array()
Source #
File: includes/reputation.php
public function __construct( $args = array() ) {
$this->events = ap_get_reputation_events();
$this->get_events_with_zero_points();
$this->paged = isset( $args['paged'] ) ? (int) $args['paged'] : 1;
$this->offset = $this->per_page * ( $this->paged - 1 );
$this->args = wp_parse_args(
$args,
array(
'user_id' => 0,
'number' => $this->per_page,
'offset' => $this->offset,
'order' => 'DESC',
)
);
$this->per_page = $this->args['number'];
$this->query();
}
Expand full source code Collapse full source code View on GitHub: includes/reputation.php:637
Add your comment