In wp_trash_post(), rename the trash_post action to wp_trash_post to avoid collision with the wp_transition_post_status() trash_post state transition. Props SergeyBiryukov. fixes #15628
git-svn-id: https://develop.svn.wordpress.org/trunk@18974 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8d945cd8a0
commit
df5f69fabc
|
@ -2075,7 +2075,7 @@ function wp_trash_post($post_id = 0) {
|
||||||
if ( $post['post_status'] == 'trash' )
|
if ( $post['post_status'] == 'trash' )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
do_action('trash_post', $post_id);
|
do_action('wp_trash_post', $post_id);
|
||||||
|
|
||||||
add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']);
|
add_post_meta($post_id,'_wp_trash_meta_status', $post['post_status']);
|
||||||
add_post_meta($post_id,'_wp_trash_meta_time', time());
|
add_post_meta($post_id,'_wp_trash_meta_time', time());
|
||||||
|
|
Loading…
Reference in New Issue