diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 28fb3394d2..ddc34db34f 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -906,17 +906,12 @@ function get_bloginfo( $show = '', $filter = 'raw' ) { break; } - $url = true; - - if ( ! str_contains( $show, 'url' ) - && ! str_contains( $show, 'directory' ) - && ! str_contains( $show, 'home' ) - ) { - $url = false; - } - if ( 'display' === $filter ) { - if ( $url ) { + if ( + str_contains( $show, 'url' ) + || str_contains( $show, 'directory' ) + || str_contains( $show, 'home' ) + ) { /** * Filters the URL returned by get_bloginfo(). *