WordPress.org

Make WordPress Core

Ticket #14299: make_argument_actually_integer_but_keep_filter.14299.diff

File make_argument_actually_integer_but_keep_filter.14299.diff, 810 bytes (added by filosofo, 4 years ago)
  • wp-includes/link-template.php

     
    108108        elseif ( $post->post_type == 'attachment' ) 
    109109                return get_attachment_link($post->ID); 
    110110        elseif ( in_array($post->post_type, get_post_types( array('_builtin' => false) ) ) ) 
    111                 return get_post_permalink($post, $leavename, $sample); 
     111                return get_post_permalink($post->ID, $leavename, $sample); 
    112112 
    113113        $permalink = get_option('permalink_structure'); 
    114114 
     
    204204                $post_link = home_url($post_link); 
    205205        } 
    206206 
    207         return apply_filters('post_type_link', $post_link, $id, $leavename, $sample); 
     207        return apply_filters('post_type_link', $post_link, $post, $leavename, $sample); 
    208208} 
    209209 
    210210/**