WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43620, comment 32


Ignore:
Timestamp:
04/21/2018 10:50:38 AM (2 years ago)
Author:
birgire
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43620, comment 32

    initial v1  
    1 The {{{get_privacy_policy_url()}}} uses {{{get_permalink()}}} that returns a string or {{{false}}}:
     1The {{{get_privacy_policy_url()}}} uses {{{get_permalink()}}} that returns a string or {{{false}}} on failure:
    22
    33{{{
     
    66}}}
    77
    8 so that means {{{get_privacy_policy_url()}}} can return a string or false
     8so that means {{{get_privacy_policy_url()}}} can return both empty string or false on failure. But that's currently not reflected in the doc block of {{{get_privacy_policy_url()}}}:
     9
     10
     11{{{
     12 * @return string The URL to the privacy policy page. Empty string if it doesn't exist.
     13
     14}}}
     15
    916
    1017Examples:
    11 
    1218
    1319{{{
     
    2632}}}
    2733
    28 In general there's inconsistancy between core {{{get_*_url()}}} functions return, either empty string or false on failure.
     34In general there's inconsistancy between core {{{get_*_url()}}} functions return, either empty string or {{{false}}} on failure.
    2935
    3036I think we should choose either {{{false}}} or empty string here.
    3137       
    3238
    33 There's exists a function since 4.7, with a familiar structure, that we could look into:
     39There exists a function since 4.7, with a familiar structure, that we could look into:
    3440
    3541{{{