Ticket #12842: 12842.diff

File 12842.diff, 1.3 KB (added by waltervos, 3 years ago)

Removes default hooking _future_post_hook to future_post and future_page and moves it to register_post_type

  • wp-includes/default-filters.php

     
    220220add_action( 'shutdown',                   'wp_ob_end_flush_all',      1    ); 
    221221add_action( 'pre_post_update',            'wp_save_post_revision'          ); 
    222222add_action( 'publish_post',               '_publish_post_hook',       5, 1 ); 
    223 add_action( 'future_post',                '_future_post_hook',        5, 2 ); 
    224 add_action( 'future_page',                '_future_post_hook',        5, 2 ); 
    225223add_action( 'save_post',                  '_save_post_hook',          5, 2 ); 
    226224add_action( 'transition_post_status',     '_transition_post_status',  5, 3 ); 
    227225add_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce'        ); 
  • wp-includes/post.php

     
    868868 
    869869        $wp_post_types[$post_type] = $args; 
    870870 
     871        add_action( 'future_' . $post_type, '_future_post_hook', 5, 2 ); 
     872 
    871873        foreach ( $args->taxonomies as $taxonomy ) { 
    872874                register_taxonomy_for_object_type( $taxonomy, $post_type ); 
    873875        }