From 8698d840a63d4547a34a62a2f8e97711ac9275c5 Mon Sep 17 00:00:00 2001
From: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
Date: Thu, 12 Jan 2023 19:09:56 +0900
Subject: [PATCH] Search Block: Apply border color correctly when button is
outside or absent (#47067)
---
packages/block-library/src/search/index.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/block-library/src/search/index.php b/packages/block-library/src/search/index.php
index 26b6a7585ccc7f..c7461a86795b50 100644
--- a/packages/block-library/src/search/index.php
+++ b/packages/block-library/src/search/index.php
@@ -66,14 +66,14 @@ function render_block_core_search( $attributes ) {
if ( $show_input ) {
$input_classes = array( 'wp-block-search__input' );
- if ( $is_button_inside ) {
+ if ( ! $is_button_inside && ! empty( $border_color_classes ) ) {
$input_classes[] = $border_color_classes;
}
if ( ! empty( $typography_classes ) ) {
$input_classes[] = $typography_classes;
}
$input_markup = sprintf(
- '',
+ '',
$input_id,
esc_attr( implode( ' ', $input_classes ) ),
get_search_query(),