Move deleted_post back. Props Denis-de-Bernardy . see #9422

git-svn-id: https://develop.svn.wordpress.org/trunk@10858 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-01 16:10:14 +00:00
parent a55e87736b
commit 36859acb5c
2 changed files with 4 additions and 4 deletions

View File

@ -68,7 +68,7 @@ CREATE TABLE $wpdb->comments (
comment_approved varchar(20) NOT NULL default '1',
comment_agent varchar(255) NOT NULL default '',
comment_type varchar(20) NOT NULL default '',
comment_parent bigint(20) NOT NULL default '0',
comment_parent bigint(20) unsigned NOT NULL default '0',
user_id bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (comment_ID),
KEY comment_approved (comment_approved),
@ -85,7 +85,7 @@ CREATE TABLE $wpdb->links (
link_category bigint(20) NOT NULL default '0',
link_description varchar(255) NOT NULL default '',
link_visible varchar(20) NOT NULL default 'Y',
link_owner bigint(20) NOT NULL default '1',
link_owner bigint(20) unsigned NOT NULL default '1',
link_rating int(11) NOT NULL default '0',
link_updated datetime NOT NULL default '0000-00-00 00:00:00',
link_rel varchar(255) NOT NULL default '',

View File

@ -1159,8 +1159,6 @@ function wp_delete_post($postid = 0) {
foreach ( $revision_ids as $revision_id )
wp_delete_post_revision( $revision_id );
do_action('deleted_post', $postid);
// Point all attachments to this post up one level
$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) );
@ -1181,6 +1179,8 @@ function wp_delete_post($postid = 0) {
clean_post_cache($postid);
}
do_action('deleted_post', $postid);
return $post;
}