General: Cast $public param to bool in do_robots().

This changeset properly casts the `$public` variable into `bool` in `do_robots()` for better consistency between code and docs.

Props SergeyBiryukov, shailu25, kapilpaul.
Fixes #63039.


Built from https://develop.svn.wordpress.org/trunk@59946


git-svn-id: http://core.svn.wordpress.org/trunk@59288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2025-03-06 15:36:26 +00:00
parent 9f477686c8
commit bd18318a94
2 changed files with 2 additions and 2 deletions

View File

@ -1715,7 +1715,7 @@ function do_robots() {
do_action( 'do_robotstxt' );
$output = "User-agent: *\n";
$public = get_option( 'blog_public' );
$public = (bool) get_option( 'blog_public' );
$site_url = parse_url( site_url() );
$path = ( ! empty( $site_url['path'] ) ) ? $site_url['path'] : '';

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-beta1-59945';
$wp_version = '6.8-beta1-59946';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.