git-svn-id: http://svn.automattic.com/wordpress/trunk@2064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
46fa15f8d1
commit
f20de56a5b
|
@ -93,9 +93,8 @@ function wp_update_post($postarr = array()) {
|
|||
extract($postarr);
|
||||
|
||||
// Make sure we set a valid category
|
||||
if (0 == count($post_category) || !is_array($post_category)) {
|
||||
if ( 0 == count($post_category) || !is_array($post_category) )
|
||||
$post_category = array($post_default_category);
|
||||
}
|
||||
|
||||
// Do some escapes for safety
|
||||
$post_title = $wpdb->escape($post_title);
|
||||
|
@ -123,6 +122,8 @@ function wp_update_post($postarr = array()) {
|
|||
|
||||
wp_set_post_cats('', $ID, $post_category);
|
||||
|
||||
do_action('edit_post', $ID);
|
||||
|
||||
return $wpdb->rows_affected;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue