Changeset 6501
- Timestamp:
- 12/27/2007 08:09:31 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r6491 r6501 749 749 750 750 if ( 'page' == $post->post_type) { 751 // if the page is defined in option page_on_front or post_for_posts, 751 // if the page is defined in option page_on_front or post_for_posts, 752 752 // adjust the corresponding options 753 753 if ( get_option('page_on_front') == $postid ) { … … 761 761 // Point children of this page to its parent, also clean the cache of affected children 762 762 $children_query = $wpdb->prepare("SELECT * FROM $wpdb->posts WHERE post_parent = %d AND post_type='page'", $postid); 763 $children = $wpdb->get_results($children_query); 763 $children = $wpdb->get_results($children_query); 764 764 765 765 $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) ); … … 778 778 clean_page_cache($postid); 779 779 780 foreach ( (array) $children as $child ) 780 foreach ( (array) $children as $child ) 781 781 clean_page_cache($child->ID); 782 782 … … 1050 1050 $wpdb->insert( $wpdb->posts, $data ); 1051 1051 $post_ID = (int) $wpdb->insert_id; 1052 1052 1053 1053 // use the newly generated $post_ID 1054 1054 $where = array( 'ID' => $post_ID ); … … 1194 1194 if ( empty($tags) ) 1195 1195 $tags = array(); 1196 $tags = (is_array($tags)) ? $tags : explode( ',', trim($tags, " \ s\n\t\r\0\x0B,") );1196 $tags = (is_array($tags)) ? $tags : explode( ',', trim($tags, " \n\t\r\0\x0B,") ); 1197 1197 wp_set_object_terms($post_id, $tags, 'post_tag', $append); 1198 1198 }
Note: See TracChangeset
for help on using the changeset viewer.