WordPress.org

Make WordPress Core

Ticket #4328: 4328.diff

File 4328.diff, 1.1 KB (added by mdawaffe, 4 years ago)
  • wp-includes/default-filters.php

     
    233233add_action( 'template_redirect',  'wp_old_slug_redirect'       ); 
    234234add_action( 'edit_post',          'wp_check_for_changed_slugs' ); 
    235235add_action( 'edit_form_advanced', 'wp_remember_old_slug'       ); 
     236add_action( 'edit_page_form',     'wp_remember_old_slug'       ); 
    236237add_action( 'init',               '_show_post_preview'         ); 
    237238 
    238239// Timezone 
  • wp-includes/post.php

     
    36113611        $post = &get_post($post_id); 
    36123612 
    36133613        // we're only concerned with published posts 
    3614         if ( $post->post_status != 'publish' || $post->post_type != 'post' ) 
     3614        if ( 'publish' != $post->post_status || ( 'post' != $post->post_type && 'page' != $post->post_type ) ) 
    36153615                return $post_id; 
    36163616 
    36173617        // only bother if the slug has changed