Make WordPress Core


Ignore:
Timestamp:
07/18/2018 11:49:46 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link().

Props desrosj, birgire, ianbelanger, Ov3rfly.
Fixes #44192.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r43002 r43506  
    43284328    $link               = '';
    43294329    $privacy_policy_url = get_privacy_policy_url();
    4330 
    4331     if ( $privacy_policy_url ) {
     4330    $policy_page_id     = (int) get_option( 'wp_page_for_privacy_policy' );
     4331    $page_title         = ( $policy_page_id ) ? get_the_title( $policy_page_id ) : '';
     4332
     4333    if ( $privacy_policy_url && $page_title ) {
    43324334        $link = sprintf(
    43334335            '<a class="privacy-policy-link" href="%s">%s</a>',
    43344336            esc_url( $privacy_policy_url ),
    4335             __( 'Privacy Policy' )
     4337            esc_html( $page_title )
    43364338        );
    43374339    }
Note: See TracChangeset for help on using the changeset viewer.