Use get_permalink() instead of get_post_permalink(). Limit to published post types. see #11817 #12566
git-svn-id: http://svn.automattic.com/wordpress/trunk@13714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -149,7 +149,7 @@ function wp_nav_menu_item_link_metabox() {
|
||||
* @param string $post_type The post type object.
|
||||
*/
|
||||
function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
|
||||
$args = array( 'post_type' => $post_type['args']->name, );
|
||||
$args = array( 'post_type' => $post_type['args']->name, 'post_status' => 'publish' );
|
||||
|
||||
if ( 'attachment' == $post_type['args']->name )
|
||||
$args['post_status'] = 'any';
|
||||
|
||||
Reference in New Issue
Block a user