Only show published items of custom post types in nav menu meta boxes. props duck_, fixes #13390.
git-svn-id: https://develop.svn.wordpress.org/trunk@14631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
06fc3ff50f
commit
1a1ae174ba
|
@ -951,6 +951,12 @@ function _wp_nav_menu_meta_box_object( $object = null ) {
|
|||
'orderby' => 'id',
|
||||
'order' => 'DESC',
|
||||
);
|
||||
|
||||
// custom post types should show only published items
|
||||
} else {
|
||||
$object->_default_query = array(
|
||||
'post_status' => 'publish',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue