IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 258 | 258 | |
| 259 | 259 | if ( $reassign != '' ) { |
| 260 | 260 | $reassign = (int) $reassign; |
| | 261 | |
| | 262 | // get posts by user to invalidate cache |
| | 263 | $posts = get_posts( array( 'author' => $user_id, 'numberposts' => -1 ) ); |
| | 264 | foreach( $posts as $post ) { |
| | 265 | clean_post_cache( $post ); |
| | 266 | } |
| | 267 | |
| 261 | 268 | $wpdb->query( $wpdb->prepare("UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $user_id) ); |
| 262 | 269 | $wpdb->query( $wpdb->prepare("UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $user_id) ); |
| 263 | 270 | } |