From df945fcdcb78fa1b84d6fb5dee01188e4d578bf6 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Fri, 9 Jan 2015 16:40:22 +0000 Subject: [PATCH] In `get_permalink()`, don't resolve to pretty permalink if post has 'future' status. We already do this for other non-public statuses, to prevent leaking non-public information about unpublished posts. Props e.mazovetskiy, CalEvans. Fixes #30910. Built from https://develop.svn.wordpress.org/trunk@31114 git-svn-id: http://core.svn.wordpress.org/trunk@31095 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index bd5b0c48d2..33ca62a395 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -157,7 +157,7 @@ function get_permalink( $id = 0, $leavename = false ) { */ $permalink = apply_filters( 'pre_post_link', $permalink, $post, $leavename ); - if ( '' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft')) ) { + if ( '' != $permalink && !in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ) ) { $unixtime = strtotime($post->post_date); $category = ''; @@ -253,7 +253,7 @@ function get_post_permalink( $id = 0, $leavename = false, $sample = false ) { $slug = $post->post_name; - $draft_or_pending = isset($post->post_status) && in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ); + $draft_or_pending = isset( $post->post_status ) && in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft', 'future' ) ); $post_type = get_post_type_object($post->post_type); diff --git a/wp-includes/version.php b/wp-includes/version.php index 9f9cec47b2..65ecb05b9c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31113'; +$wp_version = '4.2-alpha-31114'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.