Created
October 25, 2016 18:23
-
-
Save wkw/f32b1391b94aa0db459e1fe01a379b66 to your computer and use it in GitHub Desktop.
WordPress: allow draft, private posts to be selected in Parent page dropdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show draft and private pages in hierarchicial Parent pages dropdown. | |
* will work for any hier. post type. | |
*/ | |
function filter_attributes_dropdown_pages_args($dropdown_args) { | |
$dropdown_args['post_status'] = array('publish','draft', 'private'); | |
return $dropdown_args; | |
} | |
add_filter('page_attributes_dropdown_pages_args', __NAMESPACE__ . '\\filter_attributes_dropdown_pages_args', 100, 1); | |
add_filter( 'quick_edit_dropdown_pages_args', __NAMESPACE__ . '\\filter_attributes_dropdown_pages_args', 100, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment