Ticket #26871: 26871.diff
File 26871.diff, 792 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/link-template.php
2454 2454 // Return p= link for all public post types. 2455 2455 if ( ! empty( $post_id ) ) { 2456 2456 $post_type = get_post_type_object( $post->post_type ); 2457 if ( $post_type->public ) 2458 $shortlink = home_url('?p=' . $post_id); 2457 2458 if ( 'page' === $post->post_type && $post->ID == get_option( 'page_on_front' ) && 'page' == get_option( 'show_on_front' ) ) { 2459 $shortlink = home_url( '/' ); 2460 } elseif ( $post_type->public ) { 2461 $shortlink = home_url( '?p=' . $post_id ); 2462 } 2459 2463 } 2460 2464 2461 2465 return apply_filters('get_shortlink', $shortlink, $id, $context, $allow_slugs);