Ticket #1914: 1914.3.diff
| File 1914.3.diff, 2.6 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/post.php
1296 1296 $view_link = get_preview_post_link( $post, array(), $draft_link ); 1297 1297 $preview_target = " target='wp-preview-{$post->ID}'"; 1298 1298 } else { 1299 if ( 'publish' === $post->post_status ) {1299 if ( 'publish' === $post->post_status || 'attachment' === $post->post_type ) { 1300 1300 $view_link = get_permalink( $post ); 1301 1301 } else { 1302 1302 // Allow non-published (private, future) to be viewed at a pretty permalink. … … 1310 1310 $return = '<strong>' . __( 'Permalink:' ) . "</strong>\n"; 1311 1311 1312 1312 if ( false !== $view_link ) { 1313 $return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $ permalink . "</a>\n";1313 $return .= '<a id="sample-permalink" href="' . esc_url( $view_link ) . '"' . $preview_target . '>' . $view_link . "</a>\n"; 1314 1314 } else { 1315 1315 $return .= '<span id="sample-permalink">' . $permalink . "</span>\n"; 1316 1316 } -
src/wp-includes/link-template.php
386 386 387 387 $post = get_post( $post ); 388 388 $parent = ( $post->post_parent > 0 && $post->post_parent != $post->ID ) ? get_post( $post->post_parent ) : false; 389 if ( $parent && ! in_array( $parent->post_type, get_post_types() ) ) { 390 $parent = false; 391 } 389 392 390 393 if ( $wp_rewrite->using_permalinks() && $parent ) { 391 394 if ( 'page' == $parent->post_type ) … … 403 406 404 407 if ( ! $leavename ) 405 408 $link = str_replace( '%postname%', $name, $link ); 409 } elseif ( $wp_rewrite->using_permalinks() && ! $leavename ) { 410 $link = home_url( user_trailingslashit( $post->post_name ) ); 406 411 } 407 412 408 413 if ( ! $link ) -
src/wp-includes/query.php
3580 3580 // Check post status to determine if post should be displayed. 3581 3581 if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) { 3582 3582 $status = get_post_status($this->posts[0]); 3583 if ( 'attachment' === $this->posts[0]->post_type && 0 === (int) $this->posts[0]->post_parent ) { 3584 $this->is_page = false; 3585 $this->is_single = true; 3586 $this->is_attachment = true; 3587 } 3583 3588 $post_status_obj = get_post_status_object($status); 3584 3589 //$type = get_post_type($this->posts[0]); 3585 3590
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)