Skip to content

Commit

Permalink
Merge pull request #12 from voceconnect/allow-parent-argument
Browse files Browse the repository at this point in the history
allow setting of post_parent in args
  • Loading branch information
kevinlangleyjr committed Dec 8, 2014
2 parents 22a33b7 + 7d01159 commit 25af2f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion post-selection-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Post Selection UI
Description: An extraction of the post selection interface from the posts-to-posts plugin
Version: 1.0.11
Version: 1.0.12
Author: prettyboymp, banderon, matstars
Plugin URI: http://voceconnect.com
Expand Down Expand Up @@ -171,6 +171,10 @@ private function get_addable_query($args) {
'order' => $this->args['order']
);

if ( isset( $this->args['post_parent'] ) && is_int( $this->args['post_parent'] ) ) {
$defaults['post_parent'] = $this->args['post_parent'];
}

if ( !empty( $this->args['tax_query'] ) ) {
$defaults['tax_query'] = $this->args['tax_query'];
}
Expand Down

0 comments on commit 25af2f3

Please sign in to comment.