WordPress.org

Make WordPress Core

Changeset 13714


Ignore:
Timestamp:
03/16/2010 04:34:30 PM (10 years ago)
Author:
ryan
Message:

Use get_permalink() instead of get_post_permalink(). Limit to published post types. see #11817 #12566

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/nav-menu.php

    r13704 r13714  
    150150 */
    151151function wp_nav_menu_item_post_type_metabox( $object, $post_type ) {
    152     $args = array( 'post_type' => $post_type['args']->name, );
     152    $args = array( 'post_type' => $post_type['args']->name, 'post_status' => 'publish' );
    153153   
    154154    if ( 'attachment' == $post_type['args']->name )
  • trunk/wp-includes/nav-menu.php

    r13704 r13714  
    211211
    212212            $menu_item->title = $menu_item->post_title;
    213             $menu_item->url = get_post_permalink( $menu_item->ID );
     213            $menu_item->url = get_permalink( $menu_item->ID );
    214214            $menu_item->target = '_none';
    215215           
Note: See TracChangeset for help on using the changeset viewer.