Make WordPress Core


Ignore:
Timestamp:
07/18/2018 11:51:06 AM (8 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/link-template.php

    r43109 r43507  
    41594159    $link               = '';
    41604160    $privacy_policy_url = get_privacy_policy_url();
    4161 
    4162     if ( $privacy_policy_url ) {
     4161    $policy_page_id     = (int) get_option( 'wp_page_for_privacy_policy' );
     4162    $page_title         = ( $policy_page_id ) ? get_the_title( $policy_page_id ) : '';
     4163
     4164    if ( $privacy_policy_url && $page_title ) {
    41634165        $link = sprintf(
    41644166            '<a class="privacy-policy-link" href="%s">%s</a>',
    41654167            esc_url( $privacy_policy_url ),
    4166             __( 'Privacy Policy' )
     4168            esc_html( $page_title )
    41674169        );
    41684170    }
Note: See TracChangeset for help on using the changeset viewer.