Move deleted_post back. Props Denis-de-Bernardy . see #9422
git-svn-id: http://svn.automattic.com/wordpress/trunk@10858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1feb9dc86
commit
7d37926ebc
|
@ -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 '',
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue