Ticket #3794: post.php.diff
| File post.php.diff, 0.9 kB (added by Justinsomnia, 2 years ago) |
|---|
-
wp-includes/post.php
old new 489 489 if ( is_object($postarr) ) 490 490 $postarr = get_object_vars($postarr); 491 491 492 // export array as variables493 extract($postarr);494 495 492 // Are we updating or creating? 496 493 $update = false; 497 if ( !empty($ ID) ) {494 if ( !empty($postarr['ID']) ) { 498 495 $update = true; 499 $post = & get_post($ ID);496 $post = & get_post($postarr['ID']); 500 497 $previous_status = $post->post_status; 501 498 } 499 500 if ( $postarr['post_status'] == 'publish' && $previous_status != 'publish' ) { 501 $postarr = apply_filters('post_publish_pre', $postarr); 502 } else { 503 $postarr = apply_filters('post_save_pre', $postarr); 504 } 505 506 // export array as variables 507 extract($postarr); 502 508 503 509 // Get the basics. 504 510 if ( empty($no_filter) ) {
