Make WordPress Core

Changeset 59946


Ignore:
Timestamp:
03/06/2025 03:34:28 PM (2 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r59904 r59946  
    17161716
    17171717    $output = "User-agent: *\n";
    1718     $public = get_option( 'blog_public' );
     1718    $public = (bool) get_option( 'blog_public' );
    17191719
    17201720    $site_url = parse_url( site_url() );
Note: See TracChangeset for help on using the changeset viewer.