Skip to content

Commit

Permalink
Merge pull request #16 from voceconnect/intval
Browse files Browse the repository at this point in the history
adding intval to post_per_page before comparing it since wp_query can…
  • Loading branch information
Sean McCafferty committed Jul 23, 2015
2 parents cfe0401 + b10c626 commit 3c846c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Post_Selection_Box.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private function get_addable_query($args) {
if ( !empty( $this->args['post__in'] ) ) {
$defaults['post__in'] = $this->args['post__in'];
}
if( isset( $this->args['post_per_page'] ) && ( $this->args['post_per_page'] > 100 || $this->args['post_per_page'] === -1 ) ) {
if( isset( $this->args['post_per_page'] ) && ( intval( $this->args['post_per_page'] ) > 100 || intval( $this->args['post_per_page'] ) === -1 ) ) {
$this->args['post_per_page'] = 10;
}
$query_args = wp_parse_args($args, $defaults);
Expand Down

0 comments on commit 3c846c6

Please sign in to comment.