Changeset 24182
- Timestamp:
- 05/07/2013 11:46:35 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-media-list-table.php
r23430 r24182 303 303 304 304 case 'parent': 305 if ( $post->post_parent > 0 ) { 306 if ( get_post( $post->post_parent ) ) { 307 $title =_draft_or_post_title( $post->post_parent ); 308 } 305 if ( $post->post_parent > 0 && get_post( $post->post_parent ) ) { 306 $title = _draft_or_post_title( $post->post_parent ); 309 307 ?> 310 308 <td <?php echo $attributes ?>><strong> 311 <?php if ( current_user_can( 'edit_post', $post->post_parent ) ) { ?>309 <?php if ( current_user_can( 'edit_post', $post->post_parent ) ) { ?> 312 310 <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 313 311 <?php echo $title ?></a><?php … … 321 319 ?> 322 320 <td <?php echo $attributes ?>><?php _e( '(Unattached)' ); ?><br /> 323 <?php if ( $user_can_edit ) {?>321 <?php if ( $user_can_edit ) { ?> 324 322 <a class="hide-if-no-js" 325 323 onclick="findPosts.open( 'media[]','<?php echo $post->ID ?>' ); return false;" -
trunk/wp-includes/link-template.php
r23660 r24182 302 302 303 303 $post = get_post( $post ); 304 305 if ( $wp_rewrite->using_permalinks() && ( $post->post_parent > 0 ) && ( $post->post_parent != $post->ID ) ) { 306 $parent = get_post($post->post_parent);304 $parent = ( $post->post_parent > 0 && $post->post_parent != $post->ID ) ? get_post( $post->post_parent ) : false; 305 306 if ( $wp_rewrite->using_permalinks() && $parent ) { 307 307 if ( 'page' == $parent->post_type ) 308 308 $parentlink = _get_page_link( $post->post_parent ); // Ignores page_on_front
Note: See TracChangeset
for help on using the changeset viewer.