Changeset 4521
- Timestamp:
- 11/23/06 17:21:08 (2 years ago)
- Files:
-
- trunk/wp-includes/post.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/post.php
r4518 r4521 1039 1039 extract($r); 1040 1040 1041 $key = md5( serialize( $r ) ); 1042 if ( $cache = wp_cache_get( 'get_pages', 'page' ) ) 1043 if ( isset( $cache[ $key ] ) ) 1044 return apply_filters('get_pages', $cache[ $key ], $r ); 1045 1041 1046 $inclusions = ''; 1042 1047 if ( !empty($include) ) { 1043 $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include 1044 $exclude = ''; 1048 $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include 1049 $exclude = ''; 1045 1050 $meta_key = ''; 1046 1051 $meta_value = ''; … … 1055 1060 } 1056 1061 } 1057 if (!empty($inclusions)) 1058 $inclusions .= ')'; 1062 if (!empty($inclusions)) 1063 $inclusions .= ')'; 1059 1064 1060 1065 $exclusions = ''; … … 1118 1123 $pages = & get_page_children($child_of, $pages); 1119 1124 1125 $cache[ $key ] = $pages; 1126 wp_cache_set( 'get_pages', $cache, 'page' ); 1127 1120 1128 return $pages; 1121 1129 } 1130 1131 function delete_get_pages_cache() { 1132 wp_cache_delete( 'get_pages', 'page' ); 1133 } 1134 add_action( 'save_post', 'delete_get_pages_cache' ); 1122 1135 1123 1136 function generate_page_uri_index() {
