[wp-trac] [WordPress Trac] #43715: Add Privacy Policy link to bundled theme footers
WordPress Trac
noreply at wordpress.org
Fri Apr 20 23:24:12 UTC 2018
#43715: Add Privacy Policy link to bundled theme footers
-------------------------+-----------------------
Reporter: xkon | Owner: xkon
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.9.6
Component: General | Version:
Severity: normal | Resolution:
Keywords: gdpr | Focuses: ui
-------------------------+-----------------------
Comment (by birgire):
@xkon those theme screenshots are very informative.
do you think it would make sense here to have a function like:
{{{
/**
* Determines whether the privacy policy page is set.
*
* @since 4.9.6
*
* @return bool If the privacy policy page is set.
*/
function has_privacy_policy() {
return (bool) get_option( 'wp_page_for_privacy_policy' );
}
}}}
to simplify theme codes like:
{{{
if ( has_privacy_policy() ) {
printf(
'<span class="privacy-policy-page-link"><a
href="%s">%s</a></span>',
esc_attr( $url ),
esc_html__( 'Privacy Policy', 'twentyten' ),
);
}
}}}
Not far away from existing functions like:
- {{{has_header_image()}}}
- {{{has_header_video()}}}
- {{{has_custom_header()}}}
- {{{has_site_icon()}}}
- {{{has_custom_logo()}}}
- {{{has_nav_menu()}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43715#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list