From 0b4ebffe70f642fe2b24a2eb058122469c15e219 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 10 Apr 2010 12:17:19 +0000 Subject: [PATCH] Handle future-scheduled custom post_type's. Props waltervos. Fixes #12842 git-svn-id: http://svn.automattic.com/wordpress/trunk@14056 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 2 -- wp-includes/post.php | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 7a8c7842fa..2130587c6d 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -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' ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 50647f5a8d..33f149a9af 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 ); }