[wp-trac] [WordPress Trac] #34715: transition_post_status does not fire when untrashing a post
WordPress Trac
noreply at wordpress.org
Thu Nov 19 14:40:35 UTC 2015
#34715: transition_post_status does not fire when untrashing a post
-------------------------------+------------------------------
Reporter: SeBsZ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.3.1
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+------------------------------
Comment (by eventualo):
I've added this log function and I've made some tests with a couple of
custom post types:
{{{#!php
<?php
add_action('transition_post_status', function( $new_status, $old_status,
$post ){
error_log( 'Post ID '. $post->ID .': '. $old_status . ' => '.
$new_status );
}, 10, 3);
}}}
It seems that the action has been fired by all transitions and I can see
them in log, including old=trash => new=publish.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34715#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list