Changeset 21798
- Timestamp:
- 09/10/2012 07:56:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r21496 r21798 271 271 } else { 272 272 $reassign = (int) $reassign; 273 $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id ) ); 273 274 $wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) ); 275 if ( ! empty( $post_ids ) ) { 276 foreach ( $post_ids as $post_id ) 277 clean_post_cache( $post_id ); 278 } 279 $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); 274 280 $wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) ); 281 if ( ! empty( $link_ids ) ) { 282 foreach ( $link_ids as $link_id ) 283 clean_bookmark_cache( $link_id ); 284 } 275 285 } 276 286
Note: See TracChangeset
for help on using the changeset viewer.