Changeset 10968 for trunk/wp-admin/includes/template.php
- Timestamp:
- 04/17/2009 12:07:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r10943 r10968 1565 1565 setup_postdata($page); 1566 1566 1567 if ( 0 == $level && (int)$page->post_parent > 0 ) { 1568 //sent level 0 by accident, by default, or because we don't know the actual level 1569 $find_main_page = (int)$page->post_parent; 1570 while ( $find_main_page > 0 ) { 1571 $parent = get_page($find_main_page); 1572 1573 if ( is_null($parent) ) 1574 break; 1575 1576 $level++; 1577 $find_main_page = (int)$parent->post_parent; 1578 1579 if ( !isset($parent_name) ) 1580 $parent_name = $parent->post_title; 1581 } 1582 } 1583 1567 1584 $page->post_title = wp_specialchars( $page->post_title ); 1568 1585 $pad = str_repeat( '— ', $level ); … … 1627 1644 $edit_link = get_edit_post_link( $page->ID ); 1628 1645 ?> 1629 <td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); ?></strong>1646 <td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); echo isset($parent_name) ? ' | ' . __('Parent Page: ') . wp_specialchars($parent_name) : ''; ?></strong> 1630 1647 <?php 1631 1648 $actions = array();
Note: See TracChangeset
for help on using the changeset viewer.