[wp-trac] [WordPress Trac] #63039: Incorrect type for the $public parameter in 'robots_txt' filter
WordPress Trac
noreply at wordpress.org
Sat Mar 1 00:15:58 UTC 2025
#63039: Incorrect type for the $public parameter in 'robots_txt' filter
----------------------------+--------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: General | Version:
Severity: normal | Keywords:
Focuses: docs |
----------------------------+--------------------
In the `robots_txt` filter, the `$public` parameter is documented as
`bool`. However, in practice it's a string, either `'0'` or `'1'`,
retrieved from `get_option( 'blog_public' )`.
We should either cast the value to `bool` for the filter, to match the
documented type, or correct the documentation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63039>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list