get_privacy_policy_url() WP 1.0
Retrieves the URL to the privacy policy page.
Works based on: get_option(), get_permalink()
Basis of: get_the_privacy_policy_link()
Hooks from the function
Return
String. The URL to the privacy policy page. Empty string if it doesn't exist.
Usage
get_privacy_policy_url();
Changelog
Since 4.9.6 | Introduced. |
Code of get_privacy_policy_url() get privacy policy url WP 5.6
function get_privacy_policy_url() {
$url = '';
$policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' );
if ( ! empty( $policy_page_id ) && get_post_status( $policy_page_id ) === 'publish' ) {
$url = (string) get_permalink( $policy_page_id );
}
/**
* Filters the URL of the privacy policy page.
*
* @since 4.9.6
*
* @param string $url The URL to the privacy policy page. Empty string
* if it doesn't exist.
* @param int $policy_page_id The ID of privacy policy page.
*/
return apply_filters( 'privacy_policy_url', $url, $policy_page_id );
}Related Functions
From tag: Link (URL)
- admin_url()
- attachment_url_to_postid()
- build_query()
- comment_link()
- content_url()
- get_comments_link()
- get_comments_pagenum_link()
- get_edit_post_link()
- get_edit_term_link()
- get_home_url()
- get_next_comments_link()
- get_post_embed_url()
- get_post_permalink()
More from category: Uncategorized
- cache_javascript_headers()
- do_robots()
- download_url()
- is_blog_installed()
- is_wp_error()
- maybe_convert_table_to_utf8mb4()
- nocache_headers()