Don't overwrite the post global in _get_page_link(). see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e49b0dd8ea
commit
861a8fb246
@ -266,12 +266,9 @@ function get_page_link( $id = false, $leavename = false, $sample = false ) {
|
||||
* @return string
|
||||
*/
|
||||
function _get_page_link( $id = false, $leavename = false, $sample = false ) {
|
||||
global $post, $wp_rewrite;
|
||||
global $wp_rewrite;
|
||||
|
||||
if ( !$id )
|
||||
$id = (int) $post->ID;
|
||||
else
|
||||
$post = &get_post($id);
|
||||
$post = get_post( $id );
|
||||
|
||||
$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user