Privacy: Use the actual Privacy Policy page title in `get_the_privacy_policy_link()`.
Props desrosj, birgire, ianbelanger, Ov3rfly. Merges [43506] to the 4.9 branch. Fixes #44192. Built from https://develop.svn.wordpress.org/branches/4.9@43507 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a6101fc53
commit
53ae774168
|
@ -4158,12 +4158,14 @@ function the_privacy_policy_link( $before = '', $after = '' ) {
|
||||||
function get_the_privacy_policy_link( $before = '', $after = '' ) {
|
function get_the_privacy_policy_link( $before = '', $after = '' ) {
|
||||||
$link = '';
|
$link = '';
|
||||||
$privacy_policy_url = get_privacy_policy_url();
|
$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(
|
$link = sprintf(
|
||||||
'<a class="privacy-policy-link" href="%s">%s</a>',
|
'<a class="privacy-policy-link" href="%s">%s</a>',
|
||||||
esc_url( $privacy_policy_url ),
|
esc_url( $privacy_policy_url ),
|
||||||
__( 'Privacy Policy' )
|
esc_html( $page_title )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9.8-beta1-43505';
|
$wp_version = '4.9.8-beta1-43507';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue