Changes between Initial Version and Version 1 of Ticket #43620, comment 32
- Timestamp:
- 04/21/2018 10:50:38 AM (6 years ago)
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}}} :1 The {{{get_privacy_policy_url()}}} uses {{{get_permalink()}}} that returns a string or {{{false}}} on failure: 2 2 3 3 {{{ … … 6 6 }}} 7 7 8 so that means {{{get_privacy_policy_url()}}} can return a string or false 8 so 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 9 16 10 17 Examples: 11 12 18 13 19 {{{ … … 26 32 }}} 27 33 28 In general there's inconsistancy between core {{{get_*_url()}}} functions return, either empty string or falseon failure.34 In general there's inconsistancy between core {{{get_*_url()}}} functions return, either empty string or {{{false}}} on failure. 29 35 30 36 I think we should choose either {{{false}}} or empty string here. 31 37 32 38 33 There 'sexists a function since 4.7, with a familiar structure, that we could look into:39 There exists a function since 4.7, with a familiar structure, that we could look into: 34 40 35 41 {{{