Skip to content

Commit 25af2f3

Browse files
Merge pull request #12 from voceconnect/allow-parent-argument
allow setting of post_parent in args
2 parents 22a33b7 + 7d01159 commit 25af2f3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

post-selection-ui.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Post Selection UI
44
Description: An extraction of the post selection interface from the posts-to-posts plugin
5-
Version: 1.0.11
5+
Version: 1.0.12
66
Author: prettyboymp, banderon, matstars
77
Plugin URI: http://voceconnect.com
88
@@ -171,6 +171,10 @@ private function get_addable_query($args) {
171171
'order' => $this->args['order']
172172
);
173173

174+
if ( isset( $this->args['post_parent'] ) && is_int( $this->args['post_parent'] ) ) {
175+
$defaults['post_parent'] = $this->args['post_parent'];
176+
}
177+
174178
if ( !empty( $this->args['tax_query'] ) ) {
175179
$defaults['tax_query'] = $this->args['tax_query'];
176180
}

0 commit comments

Comments
 (0)