Handle future-scheduled custom post_type's. Props waltervos. Fixes #12842
git-svn-id: https://develop.svn.wordpress.org/trunk@14056 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c612c3db6f
commit
0197326e4c
|
@ -220,8 +220,6 @@ add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 );
|
|||
add_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
|
||||
add_action( 'pre_post_update', 'wp_save_post_revision' );
|
||||
add_action( 'publish_post', '_publish_post_hook', 5, 1 );
|
||||
add_action( 'future_post', '_future_post_hook', 5, 2 );
|
||||
add_action( 'future_page', '_future_post_hook', 5, 2 );
|
||||
add_action( 'save_post', '_save_post_hook', 5, 2 );
|
||||
add_action( 'transition_post_status', '_transition_post_status', 5, 3 );
|
||||
add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce' );
|
||||
|
|
|
@ -892,6 +892,8 @@ function register_post_type($post_type, $args = array()) {
|
|||
|
||||
$wp_post_types[$post_type] = $args;
|
||||
|
||||
add_action( 'future_' . $post_type, '_future_post_hook', 5, 2 );
|
||||
|
||||
foreach ( $args->taxonomies as $taxonomy ) {
|
||||
register_taxonomy_for_object_type( $taxonomy, $post_type );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue