diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index e1d12f089f..9db1065c77 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -4284,9 +4284,9 @@ function get_parent_theme_file_path( $file = '' ) { function get_privacy_policy_url() { $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); - if ( empty( $policy_page_id ) ) { - return ''; + if ( ! empty( $policy_page_id ) && get_post_status( $policy_page_id ) === 'publish' ) { + return get_permalink( $policy_page_id ); } - return get_permalink( $policy_page_id ); + return ''; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8fec6817c0..d1380f706f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42994'; +$wp_version = '5.0-alpha-42995'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.