wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
get_privacy_policy_url › WordPress Function
Depuis4.9.6
Dépréciéen/a
› get_privacy_policy_url ( Pas de paramètres )
| Retourne: |
|
| Défini(e) dans: |
|
| Codex: |
Retrieves the URL to the privacy policy page.
Fonctions en relation: get_privacy_policy_template, get_the_privacy_policy_link, the_privacy_policy_link, is_privacy_policy, wp_privacy_exports_url
Source
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 );
}