From ac338b166686de59a56f22257e205c3ae6be147e Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 18 Jul 2018 11:50:25 +0000 Subject: [PATCH] Privacy: Use the actual Privacy Policy page title in `get_the_privacy_policy_link()`. Props desrosj, birgire, ianbelanger, Ov3rfly. Fixes #44192. Built from https://develop.svn.wordpress.org/trunk@43506 git-svn-id: http://core.svn.wordpress.org/trunk@43335 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 815c539a4a..47f4376d92 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -4327,12 +4327,14 @@ function the_privacy_policy_link( $before = '', $after = '' ) { function get_the_privacy_policy_link( $before = '', $after = '' ) { $link = ''; $privacy_policy_url = get_privacy_policy_url(); + $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); + $page_title = ( $policy_page_id ) ? get_the_title( $policy_page_id ) : ''; - if ( $privacy_policy_url ) { + if ( $privacy_policy_url && $page_title ) { $link = sprintf( '%s', esc_url( $privacy_policy_url ), - __( 'Privacy Policy' ) + esc_html( $page_title ) ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 13c615e886..cb9873835b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43504'; +$wp_version = '5.0-alpha-43506'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.