Pass the post object rather than the post ID between the post permalink functions. Fixes #28425. Props arnee
Built from https://develop.svn.wordpress.org/trunk@29024


git-svn-id: http://core.svn.wordpress.org/trunk@28812 1a063a9b-81f0-0310-95a4-ce76da25c4cd