diff --git src/wp-includes/functions.php src/wp-includes/functions.php
index dce925a..8ca5ca1 100644
--- src/wp-includes/functions.php
+++ src/wp-includes/functions.php
@@ -4740,7 +4740,9 @@ function reset_mbstring_encoding() {
 }
 
 /**
- * Alternative to filter_var( $var, FILTER_VALIDATE_BOOLEAN ).
+ * Filter/validate a variable as a boolean.
+ *
+ * Alternative to `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`.
  *
  * @since 4.0.0
  *
@@ -4752,7 +4754,7 @@ function wp_validate_boolean( $var ) {
 		return $var;
 	}
 
-	if ( 'false' === $var ) {
+	if ( is_string( $var ) && 'false' === strtolower( $var ) ) {
 		return false;
 	}
 
diff --git tests/phpunit/tests/functions.php tests/phpunit/tests/functions.php
index c52623e..2a3eb6d 100644
--- tests/phpunit/tests/functions.php
+++ tests/phpunit/tests/functions.php
@@ -571,4 +571,28 @@ class Tests_Functions extends WP_UnitTestCase {
 		$json = wp_json_encode( $data, 0, 1 );
 		$this->assertFalse( $json );
 	}
+
+	/**
+	 * @ticket 30238
+	 */
+	function test_wp_validate_boolean() {
+		// Cases where wp_validate_boolean() equals (bool) conversion:
+		$this->assertTrue( wp_validate_boolean( true ) );
+		$this->assertTrue( wp_validate_boolean( 1 ) );
+		$this->assertTrue( wp_validate_boolean( 'true' ) );
+		$this->assertTrue( wp_validate_boolean( 'TRUE' ) );
+		$this->assertTrue( wp_validate_boolean( 'foobar' ) );
+		$this->assertFalse( wp_validate_boolean( false ) );
+		$this->assertFalse( wp_validate_boolean( 0 ) );
+		$this->assertFalse( wp_validate_boolean( 0.0 ) );
+		$this->assertFalse( wp_validate_boolean( '' ) );
+		$this->assertFalse( wp_validate_boolean( '0' ) );
+		$this->assertFalse( wp_validate_boolean( array() ) );
+		$this->assertFalse( wp_validate_boolean( null ) );
+
+		// Cases where wp_validate_boolean() differs from (bool) conversion:
+		$this->assertFalse( wp_validate_boolean( 'false' ) );
+		$this->assertFalse( wp_validate_boolean( 'FALSE' ) );
+		$this->assertFalse( wp_validate_boolean( 'FalsE' ) );
+	}
 }
