Changeset 3229 for trunk/wp-includes/functions.php
- Timestamp:
- 11/29/2005 01:43:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r3220 r3229 586 586 } 587 587 588 function set_page_path($page) { 589 $page->fullpath = '/' . $page->post_name; 590 $path = $page->fullpath; 591 $curpage = $page; 592 while ($curpage->post_parent != 0) { 593 $curpage = get_page($curpage->post_parent); 594 $path = '/' . $curpage->post_name . $path; 595 } 596 597 $page->fullpath = $path; 598 599 return $page; 600 } 601 588 602 // Retrieves page data given a page ID or page object. 589 603 // Handles page caching. … … 613 627 } 614 628 } 629 630 if (!isset($_page->fullpath)) { 631 $_page = set_page_path($_page); 632 wp_cache_replace($_page->cat_ID, $_page, 'pages'); 633 } 615 634 616 635 if ( $output == OBJECT ) { … … 719 738 720 739 return $cat_ids; 740 } 741 742 function get_all_page_ids() { 743 global $wpdb; 744 745 if ( ! $page_ids = wp_cache_get('all_page_ids', 'posts') ) { 746 $page_ids = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE post_status='static'"); 747 wp_cache_add('all_page_ids', $page_ids, 'pages'); 748 } 749 750 return $page_ids; 721 751 } 722 752
Note: See TracChangeset
for help on using the changeset viewer.